Android programming implements the method of placing the tab at the bottom of the screen

This example describes the method of placing the tab tab at the bottom of the screen in Android programming. Share with you for your reference, as follows:

When writing tab today, I checked the data due to the jump problem of tab. Instead, I found a more interesting problem, that is, how to place tab at the bottom of the screen. It's a little similar to the layout in the iPhone, ha ha ~ (in fact, it was later found that this should not be made with tab, but with buttonbar, or he rewrites the tab? In short, it's not simply put the tab at the bottom).

To place the bottom end, Android's own routines cannot be done (see development apidemo for routines). First, you need to write an XML layout document named bottomtab.xml.

Then here is the complete code:

The page Jump is:

In this way, the following thing is formed. In fact, it hasn't been put on it to look good... Therefore, it is also confirmed that the above application does not simply place the tab at the bottom. If you have a chance, you'd better look at the buttonbar again.

Note: activities such as weather.class should be declared in androidmenifest.xml

Add the following code between the application tag:

PS: for the properties and functions related to the androidmanifest.xml file, please refer to the online tools of this website:

Description of Android manifest functions and permissions: http://tools.jb51.net/table/AndroidManifest

More readers interested in Android related content can view the special topics of this site: introduction and advanced tutorial of Android development, summary of Android debugging skills and common problem solving methods, summary of Android basic component usage, summary of Android view skills, summary of Android layout skills and summary of Android control usage

I hope this article will help you in Android programming.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>