私は画像ビューとスクロールビュー内のすべての右側に直接2列のテキストビューを持つアンドロイドレイアウトを作成しようとしています。Q:複数のTextViewが隣接しているAndroid Imagview
ユーザーのプロフィール写真と基本情報のレイアウトのように考える。
私は達成しようとしているワイヤーフレームを作成しましたが、残念ながら私はimageviewのレイアウトを得ることができません - textview - textview correct。
他にも私が行ったことがあります。
EDIT これは、私は運なしで試してみましたものです:ImageView
と2 LinearLayout
で
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scrollbars="none"
android:layout_weight="1">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:weightSum="1"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:weight="0.4"
android:src="@drawable/profileImg" />
<LinearLayout
android:weight="0.6"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:weightSum="1"
android:orientation="vertical">
<RelativeLayout
android:weight="0.25">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="10sp"
android:text="User ID"
android:textColor="#fff" />
<TextView
android:id="@+id/pUID"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="10sp"
android:text="pUID"
android:textColor="#fff" />
</RelativeLayout>
<RelativeLayout
android:weight="0.25">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="10sp"
android:text="Full Name"
android:textColor="#fff" />
<TextView
android:id="@+id/fName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="10sp"
android:text="fName"
android:textColor="#fff" />
</RelativeLayout>
<RelativeLayout
android:weight="0.25">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="10sp"
android:text="Age"
android:textColor="#fff" />
<TextView
android:id="@+id/pAge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="10sp"
android:text="pAge"
android:textColor="#fff" />
</RelativeLayout>
<RelativeLayout
android:weight="0.25">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="10sp"
android:text="Date of Birth"
android:textColor="#fff" />
<TextView
android:id="@+id/pDOB"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="10sp"
android:text="pDOB"
android:textColor="#fff" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
あなたのXMLコードを表示します。 –
何かを表示...あなたのXMLファイルなどを投稿してください... – Aspicas
@Aspicas私はいくつかのaxmlを追加しました – jaymarvels