どういうわけか、eclipse と android SDK を使用して設計するのに非常に苦労しています。レイアウトの作成は非常に難しく、WPF/Visual Studio ほど簡単ではありません。
私は次のことを達成しようとしています:
Top: what I have
Bottom: what I want to achieve
現在のコード:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:padding="10dip"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:textIsSelectable="false"
android:id="@+id/line1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:textSize="18sp"
android:layout_weight="1"
android:textStyle="bold"
/>
<TextView
android:textIsSelectable="false"
android:id="@+id/line2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="18sp"
/>
<TextView
android:textIsSelectable="false"
android:id="@+id/line3"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:textSize="18sp"
/>
</LinearLayout>
編集:
また、Horizontal LinearLayout 内で Vertical LinearLayout を使用しようとしましたが、多くのエラーが発生しました。
編集2:
マイナス評価はどうした?
編集3:
このリンクを試してみました : http://android-developers.blogspot.ca/2009/02/android-layout-tricks-1.html