I have an Activity with a simple layout, a kind of 'faux' web browser with an EditText for the URL input, defined as 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 I am having is that when the Activity is started, be default the EditText is selected and the soft keyboard activated. I'd like for nothing to be selected to start, and thus not have the soft keyboard active, but can't figure out how to do this via XML.
Any suggestions?
Thanks, Paul