Android implementation hides status bar and title bar

Source: Internet
Author: User

This article mainly introduces the Android implementation of the hidden status bar and the title bar of the relevant information, the need for friends can refer to the

To hide the title bar you need to use a predefined style: Android:theme= "@android: Style/theme.notitlebar".

Hide status bar: Android:theme= "@android: Style/theme.notitlebar.fullscreen".

?

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 <?xml version= "1.0" encoding= "Utf-8"?> <manifest xmlns:android= "http://schemas.android.com/apk/res/" Android "package=" De.vogella.android.temperature "android:versioncode=" 1 "android:versionname=" 1.0 "> < Application android:icon= "@drawable/icon" android:label= "@string/app_name" > <activity android:name= ". Convert "android:label=" @string/app_name "Android:theme=" @android: Style/theme.notitlebar.fullscreen "> < intent-filter> <action android:name= "Android.intent.action.MAIN"/> <category " Android.intent.category.LAUNCHER "/> </intent-filter> </activity> </application> <uses-sdk android:minsdkversion= "9"/> </manifest>

?

1 2 3 4 5 6 7 8 9 10 11 12 13-14 @Override public void OnCreate (Bundle savedinstancestate) {super.oncreate (savedinstancestate);//Hide titlebar of appli cation//must be before setting layout requestwindowfeature (Window.feature_no_title); Hide StatusBar of Android//could also is done later GetWindow (). SetFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); Setcontentview (R.layout.main);   Text = (edittext) Findviewbyid (r.id.edittext01); }

The above mentioned is the entire content of this article, I hope you can enjoy.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.