タイトルの通りですが、
やりたいことは左にテキスト、右に画像(150dp固定)を表示したいです。
ところが、以下の画像のようにテキストが画像を押し出してしまっているようです。
何が間違っているのでしょうか。
レイアウトは以下の通りです。
xml
1<?xml version="1.0" encoding="utf-8"?> 2<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:layout_width="match_parent" 4 android:layout_height="wrap_content" 5 android:orientation="vertical"> 6 7 <LinearLayout 8 android:layout_width="match_parent" 9 android:layout_height="wrap_content" 10 android:orientation="horizontal"> 11 12 <TextView 13 android:id="@+id/explanation_text" 14 android:layout_width="wrap_content" 15 android:layout_height="wrap_content" 16 android:textColor="@android:color/black" 17 android:text="ああああああああああああああああああああああああああああああああああああああああああああ"/> 18 19 <LinearLayout 20 android:layout_width="150dp" 21 android:layout_height="wrap_content" 22 android:padding="1dp" 23 android:background="@color/line_gray" 24 android:orientation="vertical"> 25 <ImageView 26 android:id="@+id/image" 27 android:layout_width="match_parent" 28 android:layout_height="wrap_content" 29 android:adjustViewBounds="true" 30 android:scaleType="fitCenter" 31 android:src="@drawable/googlelogo"/> 32 </LinearLayout> 33 </LinearLayout> 34</LinearLayout> 35
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/02/15 01:42