Edittext 및 보내기 버튼이 맨 아래에있는 채팅 응용 프로그램에서 작업 중입니다. 활동은 전체 화면, 숨겨진 탐색 및 상태 표시 줄입니다. 키보드에 포커스가 있으면 edittext를 밀고 버튼을 보내야합니다.키보드 오버랩 Edittext - Activity 전체 화면
- 나는 android : windowSoftInputMode = "adjustResize"를 설정하려고했지만 작동하지 않았습니다.
- https://github.com/madebycm/AndroidBug5497Workaround에서 언급 한 AndroidBug5497Workaround.assistActivity (this) 클래스를 사용해 보았지만 작동하지 않았습니다.이
decorView = getWindow().getDecorView(); uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
테마 :
이<style name="AppTheme_DarkStatus" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryveryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> <item name="android:windowContentTransitions">true</item> <item name="android:windowDrawsSystemBarBackgrounds">true</item>
XML :
<RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/include_view" android:isScrollContainer="true" android:background="@android:color/white"> <com.handmark.pulltorefresh.library.PullToRefreshListView xmlns:ptr="http://schemas.android.com/apk/res-auto" android:id="@+id/lv_chat" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_above="@+id/rl_send" android:divider="@null" android:fadeScrollbars="false" android:fadingEdge="none" android:overScrollMode="never" android:scrollbars="none" ptr:ptrHeaderSubTextColor="@color/c_input_text_color" ptr:ptrHeaderTextColor="@color/c_input_text_color" ptr:ptrOverScroll="false" ptr:ptrPullLabel="Pull to refresh" ptr:ptrRefreshLabel="Loading..." ptr:ptrReleaseLabel="Release to refresh" ptr:ptrRotateDrawableWhilePulling="true" ptr:ptrShowIndicator="false" > </com.handmark.pulltorefresh.library.PullToRefreshListView> <RelativeLayout android:id="@+id/rl_send" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:background="@color/c_white" android:gravity="center" > <View android:id="@+id/view_dummy" android:layout_width="match_parent" android:layout_height="@dimen/d_diff_p5dp" android:background="@color/c_text_light_color" /> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/view_dummy" android:layout_toLeftOf="@+id/btn_send" android:layout_marginRight="@dimen/d_diff_5dp" android:layout_marginLeft="@dimen/d_diff_10dp" android:layout_marginTop="@dimen/s_diff_7sp" android:layout_marginBottom="@dimen/s_diff_7sp" android:background="@drawable/opawhite_rectcorner_all" android:id="@+id/relativeLayout"> <EditText android:id="@+id/et_message" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/d_diff_1dp" android:background="@null" android:focusableInTouchMode="true" android:maxHeight="100dp" android:hint="Type here..." android:maxLength="150" android:textSize="@dimen/s_diff_16sp" android:padding="@dimen/s_diff_6sp" android:textColorHint="@color/c_input_text_color" android:textColor="@color/c_black" /> </RelativeLayout> <Textview android:id="@+id/btn_send" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@color/c_white" android:text="Send" android:padding="@dimen/d_diff_5dp" android:layout_marginRight="@dimen/d_diff_5dp" android:gravity="center" android:textColor="@color/c_orange_main" android:textSize="@dimen/s_diff_16sp" android:layout_centerVertical="true" android:layout_alignParentRight="true" android:layout_alignParentEnd="true"/> </RelativeLayout> </RelativeLayout>
내가 원하는 아래
이 줄을 숨기고 전체 화면을 만들기 위해 활동 내 활동 테마 코드입니다 edittext를 표시하고 키보드 위에 버튼을 보내지 만 edittext와 겹칩니다.
감사합니다.
누구나 확인할 수 있습니까? –