私は次のことがxmlで達成できるかどうか疑問に思っていました:
私は次のようなこの単純なレイアウトを持っています:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:text="Address: "
android:textSize="14dp" />
</LinearLayout>
このレイアウトを他のxmlに含めると、別のTextViewを追加できるので、結果は次のようになります。
アドレス:別のテキストビューのテキスト。
プログラムではなく、xmlでこれを実行したいと思います。
私は以下を試しました:
<include layout="@layout/mybaselayout" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text="mylocalizedstring" />
</include>
それは機能していません、私はここでxmlで行うことが不可能なことを試みていますか?
ありがとう。