Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How html hides and shows windows

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces html how to hide and display window related knowledge, content detailed and easy to understand, simple and fast operation, has a certain reference value, I believe we read this html how to hide and display window articles will have some gains, let's take a look at it.

Quote:

Android programs to set full screen includes two parts: full screen window and A activity full screen.

Window full screen refers to hiding the title bar at the top of the system used to display information such as time, electricity, signal, etc. Active full screen refers to hiding the title bar of the program. This can be set in the program code or by modifying the AndroidManifest.xml file.

1. Modify the program code.

We need to add the corresponding code to the onCreate method of Activity. Please note the location of the code, call before setContentView() method.

Java code

1. public class Home extends Activity {

2.

3. @Override

4. protected void onCreate(Bundle savedInstanceState) {

5. super.onCreate(savedInstanceState);

6. requestWindowFeature(Window.FEATURE_NO_TITLE);//does not display the title bar of the program

7. getWindow().setFlags(WindowManager.LayoutParams. FLAG_FULLSCREEN ,WindowManager.LayoutParams. FLAG_FULLSCREEN);//does not display the title bar of the system

8. setContentView(R.layout.main);

9. }

10.

11. }

public class Home extends Activity {

@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

requestWindowFeature(Window.FEATURE_NO_TITLE);//does not display the title bar of the program

getWindow().setFlags(WindowManager.LayoutParams. FLAG_FULLSCREEN ,WindowManager.LayoutParams. FLAG_FULLSCREEN);//does not display the title bar of the system

setContentView(R.layout.main);

}

}

2. Modify AndroidManifest.xml.

we can modify

< application>

label or

< activity>

The attribute value of the tag is implemented. The difference between them is modification.

< application>

All activities after the tag will be full screen, and modify

< activity>

This only applies to the current Activity. Note: android:theme="@android:style/Theme.NoTitleBar.Fullscreen" position, I set it in two places, you can make adjustments according to the actual situation.

About "html how to hide and display windows" the content of this article is introduced here, thank you for reading! I believe everyone has a certain understanding of "how to hide and display html windows" knowledge. If you still want to learn more knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report