質問

Just a simple maybe stupid question. Is it ok to use multiple activities at once in an android application using an Inflater? I want to have multiple views on my screen without losing the previous view. For example, a user clicks on a button and a information screen shows up. Start Intent would convert the whole screen to the information screen activity.

Using an Inflater works but I'm just wondering if its the right way to display multiple views. Thanks in advance.

役に立ちましたか?

解決

You should be using Fragments for this. Each fragment has a view/layout and you can move them in & out of your main view as you require. There are many tutorials

他のヒント

You can set the visibility of the views, e.g.:

Button b = (Button)findViewById(R.id.button);
b.setVisibility(View.GONE);
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top