的Android收藏的联系人布局

问题描述:

我试图做出类似到Android的常用联系人的布局,但我不知道该怎么做,或使用什么计划(FrameLayout里,LinearLayout中,...)的Android收藏的联系人布局

有谁能够帮助我?

谢谢。

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:id="@+id/cv" 
android:layout_width="175dp" 
android:layout_height="140dp" 
android:layout_margin="1dp" 
android:background="@drawable/contacts_back_free" 
android:orientation="vertical" 
android:padding="1dp" 
android:paddingTop="10dp"> 

<ImageView 
    android:id="@+id/person_photo" 
    android:layout_width="70dp" 
    android:layout_height="70dp" 
    android:layout_gravity="center_horizontal" 
    android:layout_margin="1dp" 
    android:adjustViewBounds="true" 
    android:background="@android:drawable/ic_menu_gallery" 
    android:padding="6dp" 
    android:paddingTop="10dp" /> 

<TextView 
    android:id="@+id/person_name" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignParentTop="true" 
    android:layout_toRightOf="@+id/person_photo" 
    android:textAlignment="center" 
    android:textSize="14sp" 
    tools:text="Nombre telefono" /> 

<TextView 
    android:id="@+id/person_age" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_below="@+id/person_name" 
    android:layout_toRightOf="@+id/person_photo" 
    android:textAlignment="center" 
    android:textSize="10sp" 
    tools:text="id estado" /> 

Contacts layout image 我需要做这个项目的布局

Item layout that I need

你可以使用recyclerview并设置其布局经理gridlayoutmanager。并在recyclerview的适配器中,您可以定义特定网格项目的布局。

+0

谢谢,但我需要项目XML布局 –

+1

的帮助,你能否描述你卡在哪里? –

+0

我需要这个XML。 https://i.stack.imgur.com/fTcSk.png –