1
RelativeLayout에 몇 개의 EditText가 있고 그 아래에 버튼이 정렬되어 있습니다. 키보드가 튀어 오를 때, 크기를 재조정하기를 원합니다 (따라서, android : windowSoftInputMode = "adjustResize"를 사용하고 있습니다) 작은 화면에서 크기를 조절하는 것만으로는 충분하지 않기 때문에 스크롤 가능으로하고 싶습니다.키보드가 나타나면 스크롤 뷰가 스크롤되지 않습니다.
문제는 스크롤 할 수 없다는 것입니다.
버튼이 화면 하단에 있어야합니다.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFF">
<!-- some hidden RelativeLayouts, filling the whole screen -->
<RelativeLayout
android:id="@+id/form_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent" android:layout_height="match_parent"
android:fillViewport="true" android:layout_above="@+id/ok_btn">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" android:background="#99000000" android:visibility="visible">
<View
android:id="@+id/shade"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_alignTop="@+id/logradouro1"
android:background="#FFF" android:layout_marginTop="-30dp"/>
<!-- some visible EditTexts and TextViews here -->
</RelativeLayout>
</ScrollView>
<Button android:id="@+id/ok_btn"
android:layout_width="match_parent"
android:layout_height="50dp" android:background="@color/verdeBotao" android:text="Cadastrar"
android:textColor="#FFF" android:layout_alignParentBottom="true"/>
</RelativeLayout>
</RelativeLayout>
다음은 어떤 일이 벌어지고 있는지를 보여주는 2 개의 스크린 샷입니다. 키보드가 올라간 후에는 스크롤 할 수 없습니다. 감사합니다. 나는 당신의 UI와 비슷한 뭔가를 게시하고
당신이있는 ScrollView를 사용하지 않는? 작은 화면을 처리하는 데 사용해야한다고 생각합니다 –
내 문제는 어떻게 든 android : layout_alignParentBottom = "true"'ScrollView –
에있는 뷰에서 설정하는 것과 관련이 있습니다. 선형 레이아웃을 rootelement로 사용합니다. 시도 해봐. –