2017-04-19 6 views
0

コーディネーターのレイアウト作業に苦労しています。誰かがこれで私を助けることができますか?これをコーディネーターレイアウトに配置するにはどうすればよいですか?

私はただのシンプルなレイアウトたい:私を得る代わりに、(下)NameLabel、AgeLabel

(下記)のプロフィールPIC

(下記) TextLabel ImageViewの

をこれと私の年齢ラベルと名前ラベルは神がどこにいるかを知っています。 enter image description here

<android.support.design.widget.CoordinatorLayout 
xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:app="http://schemas.android.com/apk/res-auto" 
xmlns:tools="http://schemas.android.com/tools" 
android:id="@+id/activity_home" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:paddingBottom="@dimen/activity_vertical_margin" 
android:paddingLeft="@dimen/activity_horizontal_margin" 
android:paddingRight="@dimen/activity_horizontal_margin" 
android:paddingTop="@dimen/activity_vertical_margin" 
tools:context=".HomeActivity"> 

<include 
    layout="@layout/toolbar_main" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    /> 


    <com.android.volley.toolbox.NetworkImageView 
     android:id="@+id/home_fb_pic_thumbnail" 
     android:layout_width="120dp" 
     android:layout_height="120dp" 
     android:layout_gravity="top|center" 
    /> 

    <TextView 
     android:id="@+id/nameTextView" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="name" /> 

    <TextView 
     android:id="@+id/ageTextView" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="age" /> 


<ImageButton 
     android:id="@+id/imageButton" 
     android:layout_width="248dp" 
     android:layout_height="200dp" 
     android:layout_alignParentBottom="true" 
     android:layout_centerHorizontal="true" 
     android:layout_centerVertical="true" 
     android:layout_gravity="bottom" 
     android:onClick="startRecording" 
     app:srcCompat="@drawable/intro_camera_2" /> 

    <TextView 
     android:id="@+id/introductionTextView" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_centerHorizontal="true" 
     android:layout_gravity="center" 
     android:text="Introduce Yourself! Video Introductions Last 24 Hours" 
     android:textAppearance="@android:style/TextAppearance.Material.Medium" /> 

+1

たとえば、 'android:layout_below =" @ + id/image "'を使用します –

答えて

1

あなたが気づくことができれば、これら2つのテキストビューは、[デザイン]タブに表示されます。しかし、問題は、あなたが他のビューのために行ったように、それらの配置に関して制約を指定していないことです。左、右、上、下の余白を設定するか、すでに持っている画像の下に配置するなど、必要な場所に配置するための制約を配置します。役立ちます。

関連する問題