1

私のAndroidアプリケーションでは、ListViewアイテムを右から左に移動し、その行に追加のオプションを表示したいと思います。質問の仕方がわからないので、撮った写真をお見せしたいと思います。どうすればそれを行うことができますか、それは何と呼ばれていますか?

  1. これが最初の状態です。これが最初の状態です
  2. これは2番目の状態です(右側の「PLUS」アイコンをクリックした後)。これは2番目の状態です(クリックした後
  3. これは、追加の選択肢を示す最終状態でした

    最後のスクリーショット

4

2 に答える 2

1

ViewPagerを使用できる可能性はありますか?

画面のごく一部でしか機能しないかどうかはわかりませんが、試してみる価値はあります... :)
詳細についてはこちら(d.android.com)をご覧ください。

于 2012-09-19T23:25:01.390 に答える
1

更新:「ToVine」のおかげで、ビュートランジションを調査しました。ViewFlipperは、私が言ったことにぴったりです:)。これは私のカスタムリストビュー行のxmlです。

<ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:onClick="buttonClickHandler" >

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="TextView" />
    <ImageButton
        android:id="@+id/imageButton1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@null"
        android:onClick="buttonClickHandler"
        android:src="@android:drawable/btn_star_big_on" />

</LinearLayout>

<TextView
    android:id="@+id/textView2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center_vertical|center_horizontal"
    android:text="TextView2" /> 
</ViewFlipper>
于 2012-09-25T17:32:20.273 に答える