14

iPhone では、タブ バーを持つビューを作成し、それをアプリケーションのルート ビューにしてから、タブ バーを使用してサブ ビューをナビゲートできます。

Androidでこれに最も近いアプローチは何ですか?

タブ付きコントロールを使用することですか? ただし、これには 1 つのアクティビティのみを使用することも含まれます。

iPhone と同様の方法で他のアクティビティへのナビゲーション コントロールを持つアクティビティを作成するために Android で使用するアプローチは何ですか?

4

4 に答える 4

13

Android dev サイトに「タブ レイアウト」を作成するためのチュートリアルがあります。

タブ コンテンツは 2 つの方法のいずれかで実装できます。タブを使用して同じアクティビティ内のビューを交換するか、タブを使用してまったく別のアクティビティ間で変更します。

タブのレイアウト
(ソース: android.com )

于 2010-07-26T01:09:50.067 に答える
3

申し訳ありませんが、私は本当に iPhone を知りませんが、QuickAction ダイアログが役に立ちますか??

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

そのダイアログのいくつかのアクティビティのリストを想像します。

これがあなたの望むものに近いことを願っています。

于 2010-07-25T22:00:23.850 に答える
2

周りにいくつかの例があります

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

これはスクロール可能です http://code.google.com/p/mobyfactory-uiwidgets-android/

于 2010-07-26T12:03:23.123 に答える
1
<?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>
于 2011-01-28T09:19:18.990 に答える