Q:

Android chat head disables touch on the entire row

I initiate a Service to inflate a chatHead view with following params:
 windowManager = (WindowManager) getSystemService(WINDOW_SERVICE);
        // use your custom view here
        floatingView = LayoutInflater.from(this).inflate(R.layout.screenshot_layout, null);

       // floatingView = View.inflate(getBaseContext(), R.layout.screenshot_layout,null);            //floatingView.setOnTouchListener(mOnTouchListener);
        params = new WindowManager.LayoutParams(
                WindowManager.LayoutParams.WRAP_CONTENT,
                WindowManager.LayoutParams.WRAP_CONTENT,
                WindowManager.LayoutParams.TYPE_PHONE,
                WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE|WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
                PixelFormat.TRANSLUCENT);

Following was reflected:

Now the problem is : That the entire area (strip) parallel to the icons have their touch disabled which is not intended. I have tried tweeking with the parameters of the window manager, but the problem persists. Looking for a solution here. 
Adding the XML :
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/screenShot_root"
    android:background="@android:color/transparent">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_alignParentRight="true"
        android:id="@+id/ll_screenshot_head"
        android:orientation="vertical"
        android:gravity="center">

        <ImageView
            android:layout_width="65dp"
            android:layout_height="65dp"
            android:id="@+id/iv_camera"
            android:src="@drawable/screenshot_external_icon"/>

        <ImageView
            android:layout_width="40dp"
            android:layout_height="40dp"
            android:layout_marginTop="5dp"
            android:id="@+id/iv_close"
            android:src="@drawable/cross_external_icon"/>

    </LinearLayout>

</RelativeLayout>

A:

Well the issue was resolved by finding height & width of the layout at runtime as follows:
 int  w = (int) (TypedValue.applyDimension(
                TypedValue.COMPLEX_UNIT_DIP, 67, getResources().getDisplayMetrics()));
        int  h = (int) (TypedValue.applyDimension(
                TypedValue.COMPLEX_UNIT_DIP, 114, getResources().getDisplayMetrics()));

Where, 67 is the hardcoded width of the UI in dp and 114 is the height in dp. Above gave me height and width in pixels as per phone screen resolution.
I defined the new params as:
params = new WindowManager.LayoutParams(
                w,h,
                WindowManager.LayoutParams.TYPE_PHONE,
                WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE|WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH,
                PixelFormat.TRANSLUCENT);

Hence solving the problem of disabled touch area parallel to the UI.

