开发者

"No such resource" setting activity's theme

开发者 https://www.devze.com 2023-03-05 21:04 出处:网络
I want to display a picture full screen without an action bar in Android tablet, but when I write android:theme=\"@android:s开发者_JAVA百科tyle/Theme_NoTitleBar_Fullscreen\" in Android Manifest, it sa

I want to display a picture full screen without an action bar in Android tablet, but when I write android:theme="@android:s开发者_JAVA百科tyle/Theme_NoTitleBar_Fullscreen" in Android Manifest, it says there is no such resource. How is it possible since it is on the list of themes?


You should use:

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"


you can use this

@Override
public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);
        this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消