this question has answer here:
i have following layout:
<linearlayout android:id="@+id/linearlayoutholder" android:layout_alignparentbottom="true" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:gravity="center_vertical" android:background="@android:color/white" > <edittext android:id="@+id/edit_message" android:layout_weight="1" android:layout_width="0dp" android:layout_height="50dp" android:inputtype="textcapsentences" android:background="@android:color/transparent" android:hint="@string/edit_message" android:textcolorhint="@android:color/darker_gray" android:windowsoftinputmode="statehidden"/> </linearlayout>
this produces:
now, when user presses show background apps button @ bottom (as shown in above picture), , when user comes app, soft keyboard gets shown.
i don't want soft keyboard shown in case.
how can done?
in androidmanifest.xml
, add below attribute entry of activity
:
android:windowsoftinputmode="statehidden"
it not supposed written in layout xml, androidmanifest.xml
.
to set more 1 soft input modes, can set like:
android:windowsoftinputmode="statehidden|adjustresize"
for more information, can refer documentation.
Comments
Post a Comment