一番下のソフトキーから戻るボタンを押すbuttom button
と が表示されますが、アプリが最初に読み込まれるとbutton
、ソフトキーの下に隠れます。アプリは、Android 9 パイを除くすべてのバージョンで、ソフトキーの下部バーで正常に動作しています。私は次の方法を試しましたが、成功しませんでした
第一歩
android:windowSoftInputMode="adjustResize" in manifest
ステップ2
mainView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
ステップ 3
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
ステップ 4
getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN`enter code here
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
私はこの問題で立ち往生しています、事前に感謝します。これが私のレイアウトXmlコードです
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/main_bg">
<RelativeLayout
android:background="@color/dark_blue_color"
android:id="@+id/action_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true">
<!--android:background="@color/dark_blue_color"-->
<ImageButton
android:id="@+id/back_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:background="@null"
android:tint="@color/tint_color"
android:src="@drawable/btn_back" />
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_centerHorizontal="true"
android:layout_toLeftOf="@id/call_btn"
android:layout_toRightOf="@+id/back_btn"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:text="Booking"
android:textColor="@color/primary_text_color"
android:textSize="27sp" />
<ImageButton
android:id="@+id/call_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="@null"
android:padding="15dp"
android:tint="@color/tint_color"
android:src="@drawable/btn_cal" />
<ImageButton
android:id="@+id/help_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:background="@drawable/round_help_icon"
android:backgroundTint="@color/text_color_white"
android:clickable="true"
android:padding="15dp"
android:tint="@android:color/white"
android:visibility="gone" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/alert_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:background="@drawable/alert_bg"
android:visibility="gone">
<include layout="@layout/alert_layout" />
</RelativeLayout>
<View
android:alpha="0.2"
android:id="@+id/view1"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@+id/action_bar"
android:background="@color/view_tint_color" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_below="@+id/view1"
android:weightSum="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
android:layout_weight="0.9"
android:weightSum="1">
<ScrollView
android:id="@+id/container_scroll"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginLeft="15dp"
android:layout_marginTop="20dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="10dp"
android:paddingBottom="5dp"
android:layout_weight="1"
android:scrollbars="none">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<appname.Views.FlowLayout xmlns:f="http://schemas.android.com/apk/res/appname"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
f:horizontalSpacing="4dp"
f:verticalSpacing="10dp">
</appname.Views.FlowLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
android:layout_weight="0.1"
android:weightSum="1">
<FrameLayout
android:layout_gravity="center"
android:id="@+id/continue_btn"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:focusable="true"
android:layout_marginBottom="10dp"
android:background="@drawable/button">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:textStyle="bold"
android:text="@string/continue_txt"
android:textAllCaps="false"
android:textColor="@color/text_color_white"
android:textSize="18sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|right"
android:layout_marginRight="10dp"
android:text=""
android:textColor="@color/text_color_white"
android:textSize="15sp"
android:textStyle="bold" />
<ImageView
android:id="@+id/indicator_img"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center_vertical|left"
android:layout_marginLeft="10dp"
android:adjustViewBounds="true"
android:scaleType="centerCrop"/>
</FrameLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>