大佬教程收集整理的这篇文章主要介绍了android – 试图隐藏标题栏时应用程序崩溃,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
android:theme="@android:style/Theme.NotitleBar.Fullscreen"
在任何设备上运行时,应用程序崩溃.我所做的更改已被StackOverflow中的许多帖子推荐,我无法弄清楚我做错了什么.
清单文件
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://scheR_682_11845@as.android.com/apk/res/android" package="com.example.app" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="19" /> <application android:allowBACkup="true" android:icon="@drawable/ic_launcher" android:label="@String/app_name" android:theme="@android:style/Theme.NotitleBar.Fullscreen"> <activity android:name="com.example.app.MainActivity" android:label="@String/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
import android.support.v7.app.ActionBarActivity;
延伸:
public class SplashScreen extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceStatE) { super.onCreate(savedInstanceStatE); getSupportActionBar().hide(); setContentView(R.layout.splash_screen); } }
它的工作正常,API等级为7或更高.
编辑:
使用AppCompatActivity,因为ActionBarActivity @deprecated在API 23中.
以上是大佬教程为你收集整理的android – 试图隐藏标题栏时应用程序崩溃全部内容,希望文章能够帮你解决android – 试图隐藏标题栏时应用程序崩溃所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。