TextView에 ImageView를 삽입하는 방법은 없습니까? 나는 여러 가지 방법을 시도했지만 TextView는 항상 "우선 순위"에 모자를 쓰고 맨 위에 표시됩니다 (이미지에서). 어떻게 할 생각인가? (오른쪽 녹색 텍스트 - "DNES"는 이미지 뷰이며, "소보 ..."는 텍스트 뷰입니다) ImageView를 통해 TextView
XML 레이아웃하십시오 RelativeLayout
또는 FrameLayout
의 아이들의
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="220dp"
android:minHeight="220dp"
android:padding="4dp"
android:background="@drawable/event_card" >
<ImageView
android:id="@+id/event_poster"
android:layout_width="match_parent"
android:layout_height="220dp"
android:src="@drawable/stub_img_new"
android:scaleType="centerCrop" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="90dp"
android:minHeight="90dp"
android:background="#D9F0F0F0" >
<cus.haw.sat.ImageViewRounded
android:id="@+id/event_club_logo"
android:layout_width="78dp"
android:layout_height="78dp"
android:scaleType="fitXY"
android:layout_marginLeft="5dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true" />
<cus.haw.sat.AutofitTextView
android:id="@+id/event_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_toRightOf="@id/event_club_logo"
android:textSize="17sp"
android:layout_marginLeft="7dp"
android:layout_marginRight="7dp"
android:layout_alignParentTop="true"
android:layout_marginTop="5dp"
android:maxLines="2"
android:textStyle="bold" />
<cus.haw.sat.AutofitTextView
android:id="@+id/event_club_title"
android:layout_width="105dp"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/event_club_logo"
android:textSize="15sp"
android:layout_marginLeft="7dp"
android:gravity="bottom"
android:layout_marginRight="7dp"
android:layout_alignParentBottom="true"
android:layout_marginBottom="5dp"
android:maxLines="2" />
<ImageView
android:id="@+id/event_today"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:layout_alignParentRight="true"
android:layout_marginLeft="7dp"
android:layout_marginRight="20dp"
android:layout_alignParentBottom="true"
android:layout_marginBottom="5dp"
android:src="@drawable/ic_today"
/>
<TextView
android:id="@+id/event_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textSize="14sp"
android:layout_marginLeft="7dp"
android:layout_marginRight="7dp"
android:layout_alignParentBottom="true"
android:layout_marginBottom="5dp"
android:maxLines="3" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="29dp"
android:minHeight="39dp"
android:background="#D9F0F0F0"
android:layout_alignParentBottom="true"
android:paddingLeft="4dp"
android:paddingRight="4dp" >
<cus.haw.sat.AutofitTextView
android:id="@+id/event_bonus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="12sp"
android:gravity="center"
android:layout_centerInParent="true"
android:maxLines="2" />
</RelativeLayout>
</RelativeLayout>
예, RelativeLayout의 또는 FrameLayout이 –