2015-10-21 21 views
0

我想爲android做一個應用程序,並需要第一個頁面視圖像playstore。它應該顯示一些項目。我想創建一個像PlayStore項目列表

one

我怎樣才能使應用程序看起來像這樣。

就像我可以使用什麼樣的適配器。

我Google了很多,但找不到答案。任何類型的幫助將不勝感激。

即使您有任何資源鏈接會被罰款。

+0

您需要使用'自定義GridView'與'Adapter'和'對象'。 Google再次搜索'如何使用適配器製作自定義GridView' – Aspicas

回答

0

您可以通過創建自定義GridView來創建它。

Here是鏈接相同。從這個

只是改變:

<GridView 
    android:id="@+id/gridView1" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignParentLeft="true" 
    android:layout_below="@+id/textView1" 
    android:numColumns="3" > 

這樣:

<GridView 
    android:id="@+id/gridView1" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignParentLeft="true" 
    android:layout_below="@+id/textView1" 
    android:numColumns="2" > 

如果你想兩列。

0

「網格樣式列表」是可能的RecyclerView

RecyclerView yourRecyclerView;//make your RecylclerView 
YourRecyclerViewAdapter mAdapter;//make your adapter with extends RecyclerView.Adapter<YourRecyclerViewAdapter.YourViewHolder> 
mGridLayoutManager = new GridLayoutManager(mContext,2); 
yourRecyclerView.setLayoutManager(mGridLayoutManager); 
yourRecyclerView.setAdapter(mAdapter); 
相關問題