user2550411
user2550411

Reputation: 31

android: unwanted activity is shown previous to main activity

Im developing an Android application in Eclipse. It's very simple...just three or four activities. My app is named "GeoLocation".

When I start the application the main activity is shown..however, previously to this activity other one is displayed for 2 or 3 seconds...

The image is a small icon at the topleft and the app title at the topright.

I dont know nothing about this activity. It's not mine...I suposse it is some default activity provided by Eclipse IDE or something similar. How can I remove this activity or change it?

Thanks.

Upvotes: 1

Views: 83

Answers (2)

user2550411
user2550411

Reputation: 31

My main activity code is very simple:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.init_activity);

}

I did set a breakpoint and the unwanted activity is shown before onCreate is called.

Upvotes: 0

JesusS
JesusS

Reputation: 1665

You're doing some work before setContentView(R.layout.activity_main); right? you layout wont load if you dont use that method, so doing work before that will make an empty layout to appear

Upvotes: 1

Related Questions