0
私はAndroid向けの作業を開始し、レイアウトについて質問しました。私のアプリは、価格、価格の変化、量、量の変化などのデータを持つ株式シンボルのスクロールリストを表示します。TableRowにテキストを配置する
これは私の最初のアンドロイドアプリですので、私はまだ「どのようにすべてこれをやっていますか?」という段階にあります。どのように私がこれを敷設したかについてコメントすることができますか、またはそれをレイアウトする方法の提案を提供できますか?
今はIDEでTableRow形式を設計しています。実際のアプリでは、プログラムでTableRowを追加していきます。レイアウトを把握するだけです。私は今私が持っているものと私のXMLのイメージを含んでいます。イメージには、1つの在庫を示す単一のTableRowが含まれています。私はこの大丈夫、何か恐ろしい初心者の間違いをしていますか?
ありがとうございます。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<TableLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="20"
android:background="#3fad86">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="GE"
android:id="@+id/textView"
android:textSize="50sp" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="80"
android:background="#d52424">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="50"
android:background="#ffe203">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="$54.32"
android:id="@+id/textView3"
android:textSize="20sp"
android:background="#76bfff"
android:layout_weight="50"
android:layout_gravity="center_vertical"
android:gravity="center" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="($1.25)"
android:id="@+id/textView2"
android:textSize="20sp"
android:background="#f09ba0"
android:layout_weight="50"
android:layout_gravity="center_vertical"
android:gravity="center" />
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="50">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="58492395"
android:id="@+id/textView4"
android:textSize="20sp"
android:background="#4bff0f"
android:layout_weight="50"
android:layout_gravity="center_vertical"
android:gravity="center" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="(2052342)"
android:id="@+id/textView5"
android:textSize="20sp"
android:background="#00a6ff"
android:layout_weight="50"
android:layout_gravity="center_vertical"
android:gravity="center" />
</LinearLayout>
</LinearLayout>
</TableRow>
</TableLayout>
</LinearLayout>
この解像度を単一解像度のデバイスまたは他のデバイスに使用しますか? –