为什么我的APP在主视图之前加载视图?
请查看我们的Android manifests.xml文件
<intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter>
这组代码负责共进午餐第一个活动
你需要把这个你的活动标签内像这样
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
确保您的主要活动类正在调用正确的布局。您是否在使用Genymotion使用Android Studio?
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
保护无效onCreate(Bundle savedInstanceState){ \t \t super.onCreate(savedInstanceState); \t \t requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); \t \t setContentView(R.layout.activity_main); \t getWindow()。setFeatureInt(Window.FEATURE_CUSTOM_TITLE,R.layout.title); \t \t \t}我使用Genymotion的eclipse。 –