이미지가 레이아웃의 경계를 정의하고 다른 모든 elemets가 자신을 방향 지을 필요가 있습니다. 여기이미지가 안드로이드에서 레이아웃을 정의하게하는 방법
내 문제는 이미지의 끝에 도달 할 때 내가 텍스트 줄 바꿈 할 것입니다. 레이아웃 XML을 통해이 문제를 해결하는 방법을 알고 싶습니다. 아니면 코드를 통해이를 구현해야합니까?
내 현재 레이아웃은 다음과 같습니다
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/KHFGreen"
android:padding="3dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:layout_gravity="left|center_vertical">
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/five"
android:scaleType="fitCenter"
android:adjustViewBounds="true" />
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="20dp"
android:text="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore. "
android:layout_gravity="left|center_vertical"
android:nestedScrollingEnabled="false" />
</FrameLayout>
</FrameLayout>
많은 감사를!
사용 matchparent ellipsize ="텍스트 "종료 – KOTIOS
감사합니다 nswer하지만이 불행히도 아무것도 변경되지 않습니다 :/ –
난 그저 UR 레이아웃을 누른 다음 r에 동일한 이미지를 사용하여 국경을 볼 수 있습니까? – KOTIOS