Out Side Touch Should Be Enable When We Add View In Window Manager
Out side touch should be enable when we add view in window manager but in my case outside touch disable when i add view in window manager. WindowManager.LayoutParams params;
Solution 1:
I tried this its working you can try this .must take the permission <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
in mainifests.xml
WindowManagerwm= (WindowManager) getSystemService(WINDOW_SERVICE);
WindowManager.LayoutParamsdialogParams=newWindowManager.LayoutParams(
WindowManager.LayoutParams.MATCH_PARENT,
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY,
WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,
PixelFormat.TRANSLUCENT);
LayoutInflaterinflater= LayoutInflater.from(getApplicationContext());
ViewactivityView= inflater.inflate(R.layout.bottom, null);
wm.addView(activityView, dialogParams);
bottom.xml
<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"><Buttonandroid:layout_width="match_parent"android:layout_height="wrap_content"android:layout_alignParentBottom="true"android:layout_alignParentLeft="true"android:layout_alignParentStart="true"android:layout_marginBottom="11dp" /></RelativeLayout>
Post a Comment for "Out Side Touch Should Be Enable When We Add View In Window Manager"