键盘把视图顶起来

getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);

 或在AndroidManifest.xml

  <activity

android:name="com.audiocn.karaoke.phone.live.FlowerCharmActivity"
android:configChanges="keyboardHidden|navigation|orientation|locale|screenLayout|screenSize"
android:exported="true"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/no_title"
android:windowSoftInputMode="adjustResize" />

相关推荐