iPhone- like tab bar in Android?

前端 未结 4 738
南旧
南旧 2020-12-29 09:47

In iPhone we can create a view that has a tab bar and make it the root view of the application then use the tab bar to navigate through sub views.

what is the most c

相关标签:
4条回答
  • 2020-12-29 10:25

    Sorry, I really don't know the iPhone, but may a QuickAction Dialog help you??

    http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/

    I imagine a list of some activities in that dialog.

    I hope this is close to what you want.

    0 讨论(0)
  • 2020-12-29 10:26

    There's a tutorial for creating a "Tab Layout" on the android dev site:

    You can implement your tab content in one of two ways: use the tabs to swap Views within the same Activity, or use the tabs to change between entirely separate activities


    (source: android.com)

    0 讨论(0)
  • 2020-12-29 10:38
    <?xml version="1.0" encoding="utf-8"?>
    <TabHost xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@android:id/tabhost" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"
    >
    <LinearLayout
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"        
    android:layout_marginBottom="0dp" 
    >
        <FrameLayout
        android:id="@android:id/tabcontent"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"            
        android:layout_weight="1" 
        />
    
        <TabWidget
        android:id="@android:id/tabs"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="0"
       />
    </LinearLayout>
    </TabHost>
    
    0 讨论(0)
  • 2020-12-29 10:48

    There are a couple of examples around

    http://www.anddev.org/code-snippets-for-android-f33/iphone-tabs-for-android-t14678.html

    This one is scrollable http://code.google.com/p/mobyfactory-uiwidgets-android/

    0 讨论(0)
提交回复
热议问题