I believe many people like the cool iPhone interface. Although the native control of Android is beautiful enough, it often cannot satisfy users' more and more discerning eyes. In fact, we can draw the interface by ourselves. Today, I will share with you how to create a tab interface that is the same as that of the iPhone. Next let's take a look at the effects on the iPhone.
Before we start, we must maste
1, implement Tabhost custom format, then only display the background and text, preview: (bottom bar shown)(Picture variant)2,xml Configuration
XML configuration for Activity_user
1 Tabhostxmlns:android= "Http://schemas.android.com/apk/res/android"2 Xmlns:tools= "Http://schemas.android.com/tools"3 Android:id= "@+id/tabhost"4 Android:layout_width= "Match_parent"5 Android:layout_height= "Match_parent"6 Android:layout_alignparentbott
The example in this article describes how Android simply implements the tab menu at the bottom of the screen. Share to everyone for your reference, specific as follows:
See a lot of popular Android programs (such as: Sina Weibo, Tencent Weibo, Jingdong Mall, Taobao, when, etc.) using tabbed style as the main frame structure of the program interface, and the
Android UI TabThe Tab is a commonly used UI control during uidesign. It enables fast switching between multiple pages, and different content can be displayed on each page.TabHost is equivalent to the set of tab distribution in the browser, while Tabspec is equivalent to each paging area in the browser. In Android, each
The Tab is a very convenient component. Today, I know a simple implementation of the android Tab. this article comes from the IT technology learning network (http://www.hopean.com) Source: http://www.hopean.com/devlop/ below is a simple step. 1. use FrameLayout in the layout file to list the Tab component and the conte
Android UI: Tab interface summary, androidui
Reprinted please indicate the source: http://blog.csdn.net/crazy1235/article/details/42678877
It is very common to implement the Tab interface in the Android program, which is often used in projects. So I would like to summarize several methods to implement the
) {//handles Tab clicks, Viewpager slide to the corresponding position Mviewpager.setcurrentitem (tab.getposition ());} @Overridepublic void ontabunselected (Actionbar.tab tab,fragmenttransaction fragmenttransaction) {} @Overridepublic void ontabreselected (Actionbar.tab tab,fragmenttransaction fragmenttransaction) {}Following these steps, we have achieved the de
Early Android (ANDROID.SUPPORT.V4) provides a series of classes that support fragment sliding switching, mainly:1, Viewpager: It fragment container, you can manage multiple fragment at the same time, and allow multiple fragment to provide animation effect when switching.2, Fragmentpageradapter:adapter class, used to provide multiple fragment for Viewpager. This class usually needs to be extended.3. Pagertitlestrip: Used in conjunction with Viewpager t
Tabhost is the entire tab container, contains the Tabwidget and framelayout two parts, Tabwidget is the expression of each tab (icon effect), Framelayout is the tab contentThere are two ways of implementing this:1. Inheriting tabactivity2. Inheriting Activity classMethod One: Inherit TabactivityGet Tabhost from tabactivity with the Gettabhost () method and set th
version and mobile phone must be later than 4.0, Or I reference the android-support-v13.jar, this jar, not V4.
Package Org. liushui. tabdemo. frag; import Java. util. arraylist; import Java. util. list; import Org. liushui. tabdemo. r; import android. app. actionbar; import android. app. actionbar. tab; import
Android Study Notes (30): tab TabHost Analysis
The TabHost component is a container that can store multiple tabs on the interface. The tab size is the same as that of the external container.
The TabWidget component is the title bar of TabHost. You can click the tab to switch.
The TabSpec component is a
Instructions for using the TAB component:1. Use framelayout in the layout file to list the tab component and the content component in the tab.2, activity to inherit tabactivity.3. Call Tabactivity's Gettabhost () method properly Tabhost object.4. Create tab options via Tabhost.Let's look at a small example:Framelayout
The usage of the options described in the previous sections basically uses tabactivity and viewpager to meet the development requirements. However, here is another tips. Sometimes, when using viewpager and fragment in front of the page, you may feel a little useless.
Http://blog.csdn.net/xia215266092/article/details/9613897
Http://blog.csdn.net/xia215266092/article/details/9613985
Http://blog.csdn.net/xia215266092/article/details/9616075
For example, in the following case, there is a
Create a tab layout for Android (note)
You can use TabHost to create a label-based layout and switch between different labels to display different background images. The effect is as follows:
11000000006 image resources (gray.png, white.png, gray2.png, white2.png, gray3.png, and white3.png indicate the default label status and the status after the tag is pressed.
2. Create a New XML file in the drawable f
Many Android applications now use the bottom navigation bar, which allows users to switch between different pages at will, and now I use the Tabhost component to customize the function of a bottom navigation bar.Let's take a look at the frame diagram of the demo instance:The role of each of the classes and resource files are not explained in detail, there is also a resource image (in the demo borrowed other applications of the resource picture) also d
Android custom rolling Tab and androidtabRequirements
Tab labels can be horizontally rolled, selected, and underlined.Analysis
It can inherit the HorizontalScrollView implementation, and the label ITem can be TextView, And the underline can be painted in the Draw method.Implementation
Add a Tab Item (TextView)
/***
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.