0
我有以下佈局:檢測,如果裏面的ImageView圖像重疊的TextView
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<com.myapp.imagezoom.ImageViewTouch
android:id="@+id/image"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<TextView
android:id="@+id/txtTitle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:layout_marginBottom="3dp"
android:gravity="center"
android:maxLines="2"/>
<ProgressBar
android:id="@+id/loading"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone" />
正如你可以看到有一個可縮放的ImageView。只要不縮放,TextView就會顯示在ImageView下面。如果用戶放大ImageView,它就會放在ImageView上。 如何檢測顯示的ImageView是否與TextView重疊以顯示TextView的背景?
非常感謝