馬上加入Android 台灣中文網,立即免費下載應用遊戲。
您需要 登錄 才可以下載或查看,沒有帳號?註冊
x
本帖最後由 wind8894 於 2012-10-5 00:18 編輯
layout裡面有edittext
為什麼我一進這個layout,就會自動彈出鍵盤,其他layout也有edittext,但是都是被動的,要點擊才會彈出
能夠讓他設成被動嗎?- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_marginBottom="15.0dip"
- android:orientation="horizontal" >
- <EditText
- android:id="@+id/edittext"
- android:layout_width="fill_parent"
- android:layout_height="200dp"
- android:layout_marginLeft="@dimen/register_account_edittext_margin_left"
- android:layout_marginRight="@dimen/register_account_edittext_margin_left"
- android:layout_marginTop="10.0dip"
- android:background="@drawable/global_edittext_bg"
- android:capitalize="sentences"
- android:gravity="top|left"
- android:imeOptions="actionDone"
- android:inputType="textMultiLine"
- android:isScrollContainer="true"
- android:singleLine="false"
- android:text=""
- android:textColor="@color/register_account_edittext_color"
- android:hint="請輸入意見"
- android:focusable="true" />
- </LinearLayout>
複製代碼 解決了:
方法是在AndroidManifest.xml 加上這兩行- android:windowSoftInputMode="adjustUnspecified|stateHidden"
- android:configChanges="orientation|keyboardHidden"
複製代碼- <activity android:name="mainactivity" android:windowSoftInputMode="adjustUnspecified|stateHidden"
- android:configChanges="orientation|keyboardHidden"/>
複製代碼 |

|