0
Fragmentで動的に作成されたカスタムリストビューの要素の等幅スペースの設定に問題があります。すべての要素は同じリストビューに配置されます。カスタムビューで一意にする方法を考えてください。この画像をご覧ください。助けて。前もって感謝します!!!!どのようにアンドロイドで動的に作成されたカスタムリストビューの同じ外観を設定するには?
コード------>
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TableRow>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="20dp"
android:textSize="18sp"
android:textColor="#800080"
android:id="@+id/txt1">
</TextView>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="20dp"
android:textSize="18sp"
android:textColor="#800080"
android:id="@+id/txt2">
</TextView>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="20dp"
android:textSize="18sp"
android:textColor="#800080"
android:id="@+id/txt3">
</TextView>
<Button
android:id="@+id/del_button"
android:text="Delete"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:onClick="addItems"
android:layout_gravity="right"
android:theme="@style/MyButton"/>
</TableRow>
すみません。これは私のために働いていません..私に他のアイデアを教えてください。 –
TableRow.LayoutParams [here](https://developer.android.com/reference/android/widget/TableRow.LayoutParams.html)を使用できます – MeLine
このweightsum牽引リストビューの間のスペースを増やしましたが、私は単一のリストビューの要素の間に等しいスペースを作る必要があります.. –