久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <i id='HtG9t'><tr id='HtG9t'><dt id='HtG9t'><q id='HtG9t'><span id='HtG9t'><b id='HtG9t'><form id='HtG9t'><ins id='HtG9t'></ins><ul id='HtG9t'></ul><sub id='HtG9t'></sub></form><legend id='HtG9t'></legend><bdo id='HtG9t'><pre id='HtG9t'><center id='HtG9t'></center></pre></bdo></b><th id='HtG9t'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='HtG9t'><tfoot id='HtG9t'></tfoot><dl id='HtG9t'><fieldset id='HtG9t'></fieldset></dl></div>
    <tfoot id='HtG9t'></tfoot>

      <bdo id='HtG9t'></bdo><ul id='HtG9t'></ul>

        <small id='HtG9t'></small><noframes id='HtG9t'>

        <legend id='HtG9t'><style id='HtG9t'><dir id='HtG9t'><q id='HtG9t'></q></dir></style></legend>
      1. 創建Activity時如何使EditText不聚焦

        How to make EditText not focused when creating Activity(創建Activity時如何使EditText不聚焦)
      2. <tfoot id='ANapA'></tfoot>
          <bdo id='ANapA'></bdo><ul id='ANapA'></ul>

                <small id='ANapA'></small><noframes id='ANapA'>

                <legend id='ANapA'><style id='ANapA'><dir id='ANapA'><q id='ANapA'></q></dir></style></legend>
                  <tbody id='ANapA'></tbody>
                <i id='ANapA'><tr id='ANapA'><dt id='ANapA'><q id='ANapA'><span id='ANapA'><b id='ANapA'><form id='ANapA'><ins id='ANapA'></ins><ul id='ANapA'></ul><sub id='ANapA'></sub></form><legend id='ANapA'></legend><bdo id='ANapA'><pre id='ANapA'><center id='ANapA'></center></pre></bdo></b><th id='ANapA'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ANapA'><tfoot id='ANapA'></tfoot><dl id='ANapA'><fieldset id='ANapA'></fieldset></dl></div>

                1. 本文介紹了創建Activity時如何使EditText不聚焦的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我已經閱讀了討論這個問題的其他問題,所有這些問題都適用于我的布局,除了對于第一個創建的布局.

                  I've read the other questions discussing this, and all of them work for my layouts, except for the very first one created.

                  目前,這是我的 onCreate 方法的頂部:

                  At the moment, this is at the top of my onCreate method:

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

                  ^ 這樣至少鍵盤不會在啟動時彈出,但 EditText 仍然專注于.

                  ^ That makes it so at least the keyboard doesn't pop up on startup, but the EditText is still focused on.

                  這是我的 EditTextXML:

                  <EditText
                      android:id="@+id/password"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_below="@+id/changePass"
                      android:layout_centerHorizontal="true"
                      android:layout_marginTop="167dp"
                      android:ems="10"
                      android:imeOptions="flagNoExtractUi"
                      android:inputType="textPassword"
                      android:maxLength="30" >
                  </EditText>
                  

                  這就是我提出我的活動時的樣子:

                  This is what it looks like when I bring up my activity:

                  問題在于,對于某些手機,當 EditText 像這樣聚焦時,它們無法在其中寫入.我希望它聚焦.

                  The problem is that with some phones, when an EditText is focused like this, they can't write in it. I want it to not focus.

                  我所做的工作適用于提出的下一個布局,因為 EditTexts 沒有關注它,并且看起來更像這樣:

                  What I've done works for the next layouts brought up in that it the EditTexts are not focused on and would look more like this:

                  但請注意,這是相同的布局.這是用戶被帶回該屏幕后的屏幕,這表明 XML 沒有問題,因為這是相同的 XML,但問題是EditText 僅在創建 Activity 時關注.

                  Notice that it's the same layout, though. This is the screen after the user has been brought back to this screen, which would indicate nothing wrong with the XML because this is the same XML, but the problem is that the EditText is only focused on when the activity is created.

                  我已經完成了研究,所有其他問題都沒有幫助我解決這個問題(但他們確實幫助鍵盤沒有出現,謝天謝地).我怎樣才能使啟動時的 EditText 看起來像第二個屏幕截圖,而不是第一個屏幕截圖?

                  I've done research and all of the other questions don't help me with this (they did however help the keyboard not show up, thankfully). How can I make it so the EditText on startup will look like the second screenshot, rather than the first?

                  推薦答案

                  您可以設置 Layout 的屬性,如 android:descendantFocusability="beforeDescendants"android:focusableInTouchMode="true"

                  You can set property of Layout like android:descendantFocusability="beforeDescendants" and android:focusableInTouchMode="true"

                  示例:

                  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                    android:id="@+id/mainLayout"
                    android:descendantFocusability="beforeDescendants"
                    android:focusableInTouchMode="true" >
                  
                      <EditText
                          android:id="@+id/password"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_below="@+id/changePass"
                          android:layout_centerHorizontal="true"
                          android:layout_marginTop="167dp"
                          android:ems="10"
                          android:imeOptions="flagNoExtractUi"
                          android:inputType="textPassword"
                          android:maxLength="30" >
                      </EditText>
                  
                  </RelativeLayout>
                  

                  希望這篇文章有幫助;)

                  May this one helpful ;)

                  這篇關于創建Activity時如何使EditText不聚焦的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關系嗎?)
                  How to convert Integer to int?(如何將整數轉換為整數?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內創建一個隨機打亂數字的 int 數組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠將 0xff000000 存儲為 int?)

                  <small id='CuqFn'></small><noframes id='CuqFn'>

                    <i id='CuqFn'><tr id='CuqFn'><dt id='CuqFn'><q id='CuqFn'><span id='CuqFn'><b id='CuqFn'><form id='CuqFn'><ins id='CuqFn'></ins><ul id='CuqFn'></ul><sub id='CuqFn'></sub></form><legend id='CuqFn'></legend><bdo id='CuqFn'><pre id='CuqFn'><center id='CuqFn'></center></pre></bdo></b><th id='CuqFn'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='CuqFn'><tfoot id='CuqFn'></tfoot><dl id='CuqFn'><fieldset id='CuqFn'></fieldset></dl></div>
                    <legend id='CuqFn'><style id='CuqFn'><dir id='CuqFn'><q id='CuqFn'></q></dir></style></legend>

                      <bdo id='CuqFn'></bdo><ul id='CuqFn'></ul>
                          <tbody id='CuqFn'></tbody>

                        1. <tfoot id='CuqFn'></tfoot>

                            主站蜘蛛池模板: 欧美精品 在线观看 | 国产精品毛片久久久久久 | 精品一区二区久久久久久久网站 | 成人午夜在线 | 欧美综合视频在线 | 欧美aaaaa| 欧美日韩在线成人 | 国产精品美女久久久久久免费 | 亚洲一二视频 | 亚洲中字在线 | 国产精品夜间视频香蕉 | 美女黄视频网站 | 日本一二区视频 | 色av一区二区 | 欧美在线a | 污视频免费在线观看 | 午夜爱爱网 | 精品国产视频 | 巨大荫蒂视频欧美另类大 | 免费麻豆视频 | 天堂网av在线 | 麻豆一区二区三区精品视频 | 在线亚洲欧美 | 香蕉国产在线视频 | 久在线观看 | 亚洲欧洲成人在线 | 欧美精品免费观看二区 | 麻豆精品一区二区三区在线观看 | 粉嫩av在线 | 永久免费视频 | av一级久久 | 国产精品视频久久 | 亚洲午夜电影 | 狠狠干五月天 | 成人精品在线观看 | 激情91| 久久精品成人 | 黄色一级视频免费 | 亚洲国产aⅴ精品 | 日韩精品免费一区 | 久久精品国产99国产精品 |