android - How to click through part of an Activity? -


recently had create transparent activity toolbar user type content queried. rest of activity should transparent , allow user interactions. i've found for doing is:

getwindow().addflags(windowmanager.layoutparams.flag_not_touchable);   

as indicated in question: link. i've tried solution

getwindow().setflags(windowmanager.layoutparams.flag_not_touch_modal,                 windowmanager.layoutparams.flag_not_touch_modal);         getwindow().setflags(windowmanager.layoutparams.flag_watch_outside_touch,                 windowmanager.layoutparams.flag_watch_outside_touch); 

as said here: link

the problem first link top activity (which contains toolbar) no longer receives click events. problem second 1 bottom activity not receives click event. how can make top activity receive click events , pass bottom activity when click made in transparent activity?

this top activity layout:

<?xml version="1.0" encoding="utf-8"?> <linearlayout     android:id="@+id/root_layout"     xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:orientation="vertical">      <android.support.design.widget.appbarlayout         android:layout_width="match_parent"         android:layout_height="wrap_content">          <android.support.v7.widget.toolbar             android:id="@+id/toolbar"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:background="@android:color/white"             android:clickable="true"             android:elevation="2dp"             android:minheight="?attr/actionbarsize"             app:layout_scrollflags="scroll|enteralways"             app:popuptheme="@style/themeoverlay.appcompat.light"             app:theme="@style/themeoverlay.appcompat.dark.actionbar">              <edittext                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:layout_marginright="10dip"                 android:backgroundtint="#fff"                 android:hint="@string/act_search_toolbar_hint"                 android:textcolor="#757575"                 android:textcolorhint="#757575"/>          </android.support.v7.widget.toolbar>     </android.support.design.widget.appbarlayout>      <view         android:layout_width="match_parent"         android:layout_height="5dp"         android:background="#fff"/>  </linearlayout> 

how looks like:

enter image description here

you can't transparent activity. when put activity up, original paused , non-interactive. want fragment instead.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -