2014年10月5日 星期日
小鍵盤往上頂
小鍵盤往上頂
1.activity設定
<activity
android:name=".MainActivity"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateUnspecified|adjustResize">
2.layout上ScrollView作為根 並且設定粗體
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@+id/butto_register"
android:windowSoftInputMode="adjustPan">
//don't use this if you want scrollView`
// getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言