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围绕您的数据模型(“最近使用的应用程序”),并可以为您的网格创建单元格。ArrayAdapterList<ActivityManager.RecentTaskInfo>可能会做得很好。

于 2012-02-29T20:47:43.293 回答