TextViewとImageViewで構成される相対レイアウトがあります。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:adjustViewBounds="true"/>
</RelativeLayout>
次のようになります。
私が達成したいのは:
これは、ImageViewを高さでTextViewに合わせて拡大縮小することを意味します。Javaコーディングなしでxmlで実行できますか?私が次のようなものを書くことができれば
android:layout_height="match_that_TextView"
それはこの問題を解決するでしょうが、それは私が推測することは不可能です。