UX/UI가 가장 짜증나는 부분인거 같다...
여튼 필요한 Activity의 메니페스트에 해당 라인 추가해준다...
android:windowSoftInputMode="adjustResize"
필요한 속성은 |(or)연산자로 조합이 가능하다(중첩되지 않는 속성 또한 존재함)
Android Develop API 가이드를 보면 아래와 같이 나와있다
Value | Description |
---|---|
"stateUnspecified " |
The state of the soft keyboard (whether it is hidden or visible) is not specified. The system will choose an appropriate state or rely on the setting in the theme.
This is the default setting for the behavior of the soft keyboard. |
"stateUnchanged " |
The soft keyboard is kept in whatever state it was last in, whether visible or hidden, when the activity comes to the fore. |
"stateHidden " |
The soft keyboard is hidden when the user chooses the activity — that is, when the user affirmatively navigates forward to the activity, rather than backs into it because of leaving another activity. |
"stateAlwaysHidden " |
The soft keyboard is always hidden when the activity's main window has input focus. |
"stateVisible " |
The soft keyboard is visible when that's normally appropriate (when the user is navigating forward to the activity's main window). |
"stateAlwaysVisible " |
The soft keyboard is made visible when the user chooses the activity — that is, when the user affirmatively navigates forward to the activity, rather than backs into it because of leaving another activity. |
"adjustUnspecified " |
It is unspecified whether the activity's main window resizes to make room for the soft keyboard, or whether the contents of the window pan to make the current focus visible on-screen. The system will automatically select one of these modes depending on whether the content of the window has any layout views that can scroll their contents. If there is such a view, the window will be resized, on the assumption that scrolling can make all of the window's contents visible within a smaller area.
This is the default setting for the behavior of the main window. |
"adjustResize " |
The activity's main window is always resized to make room for the soft keyboard on screen. |
"adjustPan " |
The activity's main window is not resized to make room for the soft keyboard. Rather, the contents of the window are automatically panned so that the current focus is never obscured by the keyboard and users can always see what they are typing. This is generally less desirable than resizing, because the user may need to close the soft keyboard to get at and interact with obscured parts of the window. |
'Android' 카테고리의 다른 글
ovenapp.io를 통한 앱 프로토 타입 구현 (0) | 2016.02.23 |
---|---|
BroadcastReceiver vs WakefulBroadcastReceiver (0) | 2016.02.15 |
Android TextView 내부 String 길이 (0) | 2015.06.19 |