我必须指定Android清单父活动叫什么名字? [英] Must I specify the parent activity name in the Android Manifest?
问题描述
我有一个启动另一个活动的活动。 这是必须通过我指定的Android清单父活动? 我要问这个,因为可能还有其他的活动,将启动该之一,也是,所以我应该指定其中的呢?
安卓parentActivityName =com.example.myfirstapp.MainActivity
您只需指定,如果你打算使用最多导航(如按后退按钮而不是导航)。在其他情况下,你不需要它。
请在这里约了导航:<一href="http://developer.android.com/design/patterns/navigation.html">http://developer.android.com/design/patterns/navigation.html
I have an activity that starts another activity. Is it mandatory that I specify the parent activity in the Android Manifest? Im asking this because there might be other activities that will start this one as well, so should I specify all of them?
android:parentActivityName="com.example.myfirstapp.MainActivity"
You only need to specify that if you're going to use up-navigation (as opposed to navigation by back button). In other cases, you don't need it.
Check in here about up-navigation: http://developer.android.com/design/patterns/navigation.html
这篇关于我必须指定Android清单父活动叫什么名字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!