我想在圖像上方顯示一些信息(TextView)。當我在圖像上顯示Textview時,背景圖像會干擾文本。所以我想使背景圖像(淡入淡出),以便它不會干擾TextView。我怎樣才能做到這一點?需要在背景圖像上方顯示一些信息
<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="match_parent"
tools:context=".MainActivity" >
<ImageView
android:id="@+id/background"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:padding="20dp"
android:scaleType="center"
android:src="@drawable/cor" />
<TextView
android:id="@+id/info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignTop="@+id/background"
android:layout_marginLeft="66dp"
android:layout_marginTop="26dp"
android:text="Some information"
android:textAppearance="?android:attr/textAppearanceLarge" />
你可以發佈您的代碼,以便它可以在圖助陣實際問題 –