2016-10-16 6 views
0

こんにちは、私はちょうど相対的なレイアウトのアプリを持っていると私は10の中程度のサイズのテキストを持っているような中規模のテキストがたくさんある。非常に多くの仕切りを追加するには?

各テキストの下にディバイダ/セパレータを追加します。

私は手動でそれらを毎回配置するために、私はその非常に難しいこの

<View 
android:layout_width = "match_parent" 
android:layout_height = "1dp" 
android:background="?android:attr/listDivider"/> 

で試みたが、しています。私はこれを多くの異なる活動で行う必要があります

このようにするには、事前に感謝してください。

答えて

1

RelativeLayoutを使用し、android:layout_belowを含めてテキストの下に配置します。

<TextView 
     android:id="@+id/textidhere" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent"/> 
<View 
     android:id="@+id/divider" 
     android:layout_width="match_parent" 
     android:layout_height="1dip" 
     android:layout_marginTop="10dp" 
     android:layout_marginBottom="10dp" 
     android:background="#dcddde" 
     android:layout_below="@id/textidhere"/> 
+0

ありがとうございました。仕事: –

+0

喜んで助けてください。 :) –

関連する問題