android - Toolbar TextInputLayout EditText - lost HINT -


please have problem second toolbar.

i want have textinputlayout in toolbar, not want focusable. used filters. user can not type edittext.

my code:

  <android.support.v7.widget.toolbar                 android:id="@+id/toolbar_2"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:background="@color/colorprimary"                 android:theme="@style/themeoverlay.appcompat.dark.actionbar"                 app:layout_collapsemode="none"                 app:elevation="0dp"                 app:layout_scrollflags="scroll"                 app:popuptheme="@style/themeoverlay.appcompat.light">                  <linearlayout                     android:layout_width="match_parent"                     android:layout_height="match_parent"                     android:orientation="vertical"                     android:background="?attr/selectableitembackground"                     android:gravity="center_vertical"                     android:minheight="@dimen/spacing_xxlarge">                      <android.support.design.widget.textinputlayout                         android:id="@+id/lnamelayout2"                         android:layout_width="match_parent"                         android:layout_height="wrap_content"                          android:paddingleft="30dp"                         android:paddingstart="30dp"                         android:paddingend="30dp"                         android:paddingright="30dp">                          <edittext                             android:id="@+id/ldesc"                             android:fontfamily="sans-serif-thin"                              android:clickable="false"                             android:cursorvisible="false"                              android:focusable="false"                             android:focusableintouchmode="false"                              android:layout_width="match_parent"                             android:layout_height="wrap_content"                             android:textsize="16sp"                             android:text="another toolbar text"                             android:textcolor="@color/colorprimaryblack"                             android:hint="@string/pref_title_filters"/>                     </android.support.design.widget.textinputlayout>                   </linearlayout>             </android.support.v7.widget.toolbar> 

when use: android:focusable="false" android:focusableintouchmode="false", hint disappear.

what should do? !! :)

enter image description here

programmatically, can following:

youredittext.setkeylistener(null); youredittext.settext("whatever want"); 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -