I'm working on creating an Android app.
The first layout I show will go full screen. I have the status bar up top, then my application title, then my layout.
I switch to other layouts when buttons get clicked.
Button bLogon = (Button) findViewById(R.id.bLogOn);
bLogon.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
startActivity(new Intent("com.testy1.myapptest2.CREDENTIALS"));
}
});
Any other layout that is shown using this method, will not go fullscreen. I've played with fill_parent, match_parent, etc. It simply comes do开发者_如何学运维wn to what layout is shown first. Any layout afterwards shows the first layout behind it, and sizes itself to only use as much space as it needs.
I haven't played with Android for some time, but I think that you should set such things in manifest xml for every activity.
As Losiowaty said, it's in your'e manifest where the problem lies. For each activity that you want not to be set to defaul you have to set a theme. So after youre android:name=".myactivity"
for example you have to add android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
or whatever theme you prefer.
精彩评论