клавиатура не перемещает компоненты в эмуляторе Android. Я использую Nexus 5X API 26 (Android 8.0.0, API 26)
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.seung.chatapp2">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
android:windowSoftInputMode="adjustPan|adjustResize"
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
`activity_main.xml`
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
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"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="549dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:gravity="center_horizontal"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<EditText
android:id="@+id/emailEdit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="100dp"
/>
<TextView
android:id="@+id/emailText"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<EditText
android:id="@+id/pswdEdit"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/pswdText"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Button
android:id="@+id/LoginBtn"
android:layout_width="350dp"
android:layout_height="wrap_content"
android:layout_marginTop="100dp"
android:background="@drawable/ripple"
android:text="login"
android:textColor="@color/white" />
<Button
android:id="@+id/signupBtn"
android:layout_width="350dp"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/ripple"
android:text="SIgn up"
android:textColor="@color/white" />
</LinearLayout>
</android.support.constraint.ConstraintLayout>
когда я запустил приложение на своем эмуляторе перед установкой android:windowSoftInputMode="adjustPan|adjustResize"
, компоненты все еще не были перемещены на keayboard.
, а затем я обнаружил, что InputMode
.но они еще не сдвинулись.
Я использую Nexus 5X API 26 (Android 8.0.0, API 26).