문제

which is added to rootView = (FrameLayout) activity.findViewById(android.R.id.content); using method rootView.addView(View child).

Here is it's layout:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/popup_container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@android:color/transparent" >

    <RelativeLayout
        android:id="@+id/popup"
        android:layout_width="284dp"
        android:layout_height="302dp"
        android:background="@drawable/ll_popup_background"
        android:orientation="vertical" >

/* Some textviews, imageviews etc */

    </RelativeLayout>

</RelativeLayout>

When this pop-up is added, if it overlays some other views (e.g. button), when clicked on some area of the pop-up (e.g. textview), the underlying view is getting the event (button is clicked, edittext is popping up the keyboard and getting focused).

Is there anyway to avoid it?

도움이 되었습니까?

해결책

You can make the outer most ViewGroup clickable and addandroid:soundEffectsEnabled="false" to disable the click sound.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top