2017-08-28 4 views
-1

私は、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 私はこの項目のレイアウトあなたがrecyclerviewを使用してgridlayoutmanagerとそのレイアウトマネージャを設定することができ

Item layout that I need

答えて

0

を作る必要があります。 recyclerviewのアダプターでは、特定のグリッド項目のレイアウトを定義することができます。

+0

ありがとうございますが、私はアイテムのXMLレイアウト –

+1

の助けが必要です。 –

+0

私はこれのXMLが必要です。 https://i.stack.imgur.com/fTcSk.png –

関連する問題