キーボードが表示されているときに自分のアクティビティレイアウトのサイズを変更すると同時に、ツールバーの位置を変更しないでください。これまではすべての画面が上にシフトし、編集テキストをクリックするとキーボードが表示されます。キーボードの前にソフトキーボードが表示されたときにツールバーが上に移動する
キーボードが表示されたら、ツールバーはもう見えない。
私はその場所にキーボードを維持したいとその下にシフトします画像。 キーボードが表示されたときに編集テキストが表示されなくなるため、マニフェストで指定できるのはandroid:windowSoftInputMode="adjustNothing"
です。
これまでのところ、私は次のコードを使用したAndroidManifest.xmlで
:レイアウトで
android:windowSoftInputMode="adjustPan|stateHidden"
:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:clickable="true"
android:fitsSystemWindows="true"
android:focusable="true"
android:focusableInTouchMode="true"
tools:context="studentplanner.mobile.yardi.com.studplan.presentation.activities.PersonalInformationActivity">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_and_button_height"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:elevation="4dp"
android:background="@color/main">
<TextView
android:id="@+id/toolbar_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/personal_information_text"
android:textColor="@android:color/white"
android:textSize="@dimen/medium2_text_size" />
</android.support.v7.widget.Toolbar>
<ImageView
android:id="@+id/background_container"
android:layout_width="match_parent"
android:layout_height="@dimen/extra_large5_dimen"
android:layout_below="@+id/toolbar"
android:scaleType="center"
android:src="@drawable/userbackground" />
を...
すべてのヘルプは歓迎されます!
uのアクティビティを使用したのか?空のアクティビティまたは空のアクティビティ? –
空の活動、サー。 –
この空白の活動をしてください。 –