android - Activity with EditText in layout, EditText is selected by default -
i have activity
simple layout, kind of 'faux' web browser edittext
url input, defined follows:
<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <linearlayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingtop="10dp" android:paddingleft="10dp" android:paddingright="10dp" android:paddingbottom="6dp" android:background="@drawable/activity_title_bar"> <edittext android:id="@+id/address" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" android:maxlines="1" android:scrollhorizontally="true" android:hint="@string/browser_hint_url" android:text="@string/browser_url"> </edittext> <imagebutton android:id="@+id/button_refresh" android:layout_width="50dp" android:layout_height="match_parent" android:src="@drawable/browser_button_refresh"> </imagebutton> </linearlayout> <scrollview android:layout_width="match_parent" android:layout_height="match_parent" android:fillviewport="true"> <imageview android:layout_width="882sp" android:layout_height="1532sp" android:src="@drawable/browser_background"> </imageview> </scrollview> </linearlayout>
the problem having when activity
started, default edittext
selected , soft keyboard activated. i'd nothing selected start, , not have soft keyboard active, can't figure out how via xml.
any suggestions?
thanks, paul
android:windowsoftinputmode=[ "stateunchanged", "statehidden", "statealwayshidden", "statevisible", "statealwaysvisible", "adjustresize", ] >
use of in manifest, hide automatic keyboard pop up. however, if using edittext input @ time you'll need keyboard. :)
statehidden
work
Comments
Post a Comment