私はregsister.xmlにandroid.support.design.widget.TextInputLayoutを使用しています 。しかし、ページが最初に開くとき、edittextヒントは上向きですが、キーボードは表示されません。私が望むのはヒントです。キーボードが表示されるまでヒントを上に移動しないでください - android.support.design.widget.TextInputLayout
と私のxmlファイル、あなたの親のレイアウトに
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<LinearLayout
android:id="@+id/linear_details"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="?attr/actionBarSize"
android:orientation="vertical">
<android.support.design.widget.TextInputLayout
android:id="@+id/input_layout_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:theme="@style/TextLabel">
<EditText
android:id="@+id/input_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Name"
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/input_layout_age"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:theme="@style/TextLabel">
<EditText
android:id="@+id/input_age"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Age"
android:inputType="number" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/input_layout_phone_number"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:theme="@style/TextLabel">
<EditText
android:id="@+id/input_phone_number"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Phone Number"
android:inputType="number" />
</android.support.design.widget.TextInputLayout>
<Spinner
android:id="@+id/spinner_gender"
style="@style/Widget.AppCompat.Spinner.Underlined"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:theme="@style/ThemeSpinner">
</Spinner>
<Spinner
android:id="@+id/spinner_blood_group"
style="@style/Widget.AppCompat.Spinner.Underlined"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:theme="@style/ThemeSpinner">
</Spinner>
<android.support.design.widget.TextInputLayout
android:id="@+id/input_layout_city"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:theme="@style/TextLabel">
<EditText
android:id="@+id/input_city"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="City"
android:inputType="text"
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/input_layout_area"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:theme="@style/TextLabel">
<EditText
android:id="@+id/input_area"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Area"
android:inputType="text"
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
</LinearLayout>
<Button
android:id="@+id/submit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/linear_details"
android:layout_marginBottom="10dp"``
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="@color/colorPrimary"
android:text="Submit"
android:textColor="@android:color/white" />
</RelativeLayout>
edittextを明示的にクリックすると、キーボードが表示されますか? android:windowSoftInputMode = "stateHidden"をマニフェストに適用しましたか? – tahsinRupam
はい..キーボードを明示的にクリックしてtext.andをクリックしたときにキーボードが表示され、アンドロイドを適用しませんでした:windowSoftInputMode = "stateHidden" – Nan
私の答えplsをチェックしてください。 – tahsinRupam