0

ユーザーが最近使用したアプリケーションを GridView に表示したい。これまでのところ、これを含める必要があることはわかっています: http://developer.android.com/resources/samples/Home/src/com/example/android/home/ApplicationInfo.html

そして、main.xml に GridView のセットアップがあります。

<GridView
    android:id="@+id/Icons"
    android:layout_width="match_parent"
    android:layout_height="739px"
    android:layout_marginTop="42px"
    android:columnWidth="122px"
    android:horizontalSpacing="31px"
    android:numColumns="4"
    android:verticalSpacing="42px" >

</GridView>

しかし、そのスペースにアプリケーションをロードするにはどうすればよいでしょうか?

4

1 に答える 1

0

ListAdapterデータ モデル (「最近使用したアプリケーション」) をラップする を作成し、グリッドのセルを作成できます。ArrayAdapterあなたの意志で、おそらくList<ActivityManager.RecentTaskInfo>うまくいくでしょう。

于 2012-02-29T20:47:43.293 に答える