문제

I just want my GUI elements to stay where they are.

Instead, whenever the keyboard comes up, they push half the labels and buttons up.

I'm using relative layout if it helps.

I've tried adding things like:

    android:windowSoftInputMode="adjustPan"

to the manifest.xml but it hasn't done anything.

Ideas??

도움이 되었습니까?

해결책

This is how I solved it.

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

in the onCreate() method.

다른 팁

You should use in EditText component in layout.xml if you use scroll,

android:overScrollMode="always"
    android:scrollHorizontally="false"
    android:scrollbarAlwaysDrawVerticalTrack="true"
    android:scrollbarStyle="insideInset"
    android:scrollbars="vertical"
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top