現在、私はlist
を含むandroid
アプリケーションを開発中です。 私はモバイル(ハンドセット)デバイスで1つ作成しました。 と私はそれをresponsive
の錠剤(7 "-10")ディスプレイにしたいと思っています。 header
とcolumn
はモバイルディスプレイと同じように見えます。ここTableLayout Responsiveを作成するには
は5" 〜defferenceですと7" 表示:
これは私の現在のXMLコード
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent"
android:tag="reqtag"
>
<TableLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent"
android:showDividers="beginning|end"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Date"
android:id="@+id/tvClaimDateReimbursementRequest"
android:layout_marginRight="50dp"
android:textSize="12dp"
android:width="100dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Type"
android:textSize="12dp"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:id="@+id/tvTypeRequestReimbursement"
android:width="80dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Amount"
android:textSize="10dp"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:width="100dp"
android:id="@+id/tvAmountReimbursementRequest" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Status"
android:textSize="12dp"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:id="@+id/tvStatusReimbursementRequest" />
</TableRow>
</TableLayout>
である私がしましたここに書類を見てくださいhttps://developer.android.com/guide/practices/screens_support.html
しかし、私はまだそれを取得しません、 このようなことを行うためのベストプラクティスはありますか?
おかげ
変更テーブル:線形レイアウト(縦)と下:私は(縦)と内部の親linenarのレイアウトを追加しますこの線形レイアウトは、リサイクル・ビューです。それを反応させるには、Stas Melnychenkoが言ったように重力を使う。マージンを取り除き、より大きいテキストサイズを与え、テキストを追加するためにstrings.xmlを使用します。テキストをハーベストしないでください。コードを維持する必要がある場合は有用ではありません。 – Jaco