これは簡単な質問ですが、私はアンドロイドでは新しいので、どうやってやるのか分かりません。アンドロイドでtextviewsを分ける方法は?
私は2つの相対的なレイアウトを持っていますが、最初にTextView
が大きくなるとそれを避けたいもう1つの書き込みをしますTextView
。どうしたらいいですか?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="first"
android:gravity="left"/>
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="second"
android:layout_alignParentRight="true"/>
</RelativeLayout>
ただし、text = firstfirstfirst....
が第2のtextviewを上書きする場合。
アンドロイド:layout_toLeftOfまたはtoRightOf属性を使用する –