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

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

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

    1. <legend id='HPl0k'><style id='HPl0k'><dir id='HPl0k'><q id='HPl0k'></q></dir></style></legend>
    2. 使用屏幕鍵盤鍵入時(shí),Android 中的 EditText 不顯示

      EditText in Android doesn#39;t show text when typing while using the on-screen keyboard(使用屏幕鍵盤鍵入時(shí),Android 中的 EditText 不顯示文本)

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

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

        • <tfoot id='fzT8u'></tfoot>
          <legend id='fzT8u'><style id='fzT8u'><dir id='fzT8u'><q id='fzT8u'></q></dir></style></legend>
            <bdo id='fzT8u'></bdo><ul id='fzT8u'></ul>
              <tbody id='fzT8u'></tbody>
              1. 本文介紹了使用屏幕鍵盤鍵入時(shí),Android 中的 EditText 不顯示文本的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                問(wèn)題描述

                我有一個(gè)由 3 個(gè) EditText 字段組成的活動(dòng)(其中包括 TextViews 和一些按鈕).我還有一個(gè) AutoCompleteTextView,其中包含使用 ArrayAdapter 的字符串列表.

                I have an activity consisting of 3 EditText fields (amongst other things like TextViews and a few buttons). I also have an AutoCompleteTextView with a list of String's using an ArrayAdapter.

                每當(dāng)我在模擬器中測(cè)試應(yīng)用程序時(shí),我可以在鍵盤啟動(dòng)時(shí)鍵入,但它不顯示文本(它仍然提供預(yù)測(cè)),并且文本僅在鍵盤關(guān)閉后出現(xiàn)在 EditText 框中.當(dāng)我在手機(jī)上測(cè)試它時(shí)也會(huì)發(fā)生這種情況.但是,如果屏幕鍵盤沒(méi)有啟動(dòng)并且您只是正常輸入,它會(huì)在您在模擬器上輸入時(shí)顯示出來(lái).

                Whenever I test the app in an emulator, I can type when the keyboard is up but it doesn't show the text (it still gives predictions) and the text only appears in the EditText box once the keyboard is closed down. This happens when I test it on my phone, too. However, it works and shows up as you type on the emulator if the on-screen keyboard isn't up and you're just typing normally.

                我不知道為什么!

                這是我的活動(dòng) XML(EditText 是前 3 個(gè)塊)

                Here is my Activity XML (where the EditText's are the top 3 blocks)

                 <?xml version="1.0" encoding="utf-8"?>
                    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                    android:id="@+id/l"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:layout_x="3dp"
                    android:layout_y="5dp"
                    android:background="@drawable/gymbg" >
                
                
                   <AutoCompleteTextView android:id="@+id/inputExercise"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:completionThreshold="1"
                        android:inputType="text"
                        android:layout_alignParentRight="true"
                        android:layout_below="@+id/timeSet"
                        android:layout_margin="10dp"
                        android:layout_marginTop="50dp"
                        android:width="200dp" />  
                
                    <EditText
                        android:id="@+id/inputWeight"
                        android:inputType="number"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentRight="true"
                        android:layout_below="@+id/inputExercise"
                        android:layout_margin="10dp"
                        android:layout_marginTop="50dp"
                        android:width="200dp" >
                    </EditText>
                
                    <EditText
                        android:id="@+id/inputReps"
                        android:inputType="number"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentRight="true"
                        android:layout_below="@+id/inputWeight"
                        android:layout_margin="10dp"
                        android:layout_marginTop="50dp"
                        android:width="200dp" >
                    </EditText>
                
                    <TextView
                        android:id="@+id/timeMain"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_centerHorizontal="true"
                        android:text="@string/timeMain"
                        android:textSize="32sp" 
                        android:textColor="#0F293B"/>
                
                    <TextView
                        android:id="@+id/timeSet"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_below="@+id/timeMain"
                        android:layout_centerHorizontal="true"
                        android:layout_marginTop="24dp"
                        android:text="@string/timeSet" 
                        android:layout_marginBottom="50dp"
                        android:textColor="#0F293B"/>
                
                    <TextView
                        android:id="@+id/labExercise"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignLeft="@+id/addbutton"
                        android:layout_alignParentLeft="true"
                        android:layout_below="@+id/timeSet"
                        android:layout_centerVertical="true"
                        android:layout_margin="10dp"
                        android:layout_marginLeft="15dp"
                        android:text="@string/labExercise"   
                        android:layout_toLeftOf="@+id/inputExercise"
                        android:textColor="#ffffff"/>
                
                    <Button
                        android:id="@+id/addbutton"
                        android:layout_width="fill_parent"
                        android:layout_height="50dp"
                        android:layout_alignParentBottom="true"
                        android:layout_alignParentLeft="true"
                        android:layout_alignParentRight="true"
                        android:layout_margin="10dp"
                        android:text="@string/add" />
                
                
                    <Button
                    android:id="@+id/startStop"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content" 
                    android:layout_above="@+id/addbutton" 
                    android:layout_alignParentLeft="true"
                    android:layout_margin="10dp"
                    android:text="@string/startStop" />
                
                    <TextView
                        android:id="@+id/labWeight"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentLeft="true"
                        android:layout_below="@+id/inputExercise"
                        android:layout_margin="10dp"
                        android:text="@string/labWeight" 
                        android:textColor="#ffffff"/>
                
                    <TextView
                        android:id="@+id/labReps"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentLeft="true"
                        android:layout_alignTop="@+id/inputReps"
                        android:layout_margin="10dp"
                        android:text="@string/labReps" 
                        android:textColor="#ffffff"/>
                
                    <TextView
                        android:id="@+id/seePrevious"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_above="@+id/inputExercise"
                        android:layout_centerHorizontal="true"
                        android:layout_marginBottom="22dp"
                        android:text="@string/tapToViewPrevious" 
                        android:textColor="#505050"/>
                
                </RelativeLayout>
                

                這是我在活動(dòng)中使用的代碼:(我已經(jīng)刪除了不必要的代碼)

                and here is the code I used in my activity: (I have stripped out unneccesary code)

                public class MyWorkoutDiary1Activity extends Activity implements OnClickListener, TextWatcher 
                {
                
                    TextView seePrevious;
                    DatabaseHandler db;
                
                    AutoCompleteTextView myAutoComplete;
                
                    ArrayList<String> exerciseType = new ArrayList<String>();
                
                
                    @Override
                    public void onCreate(Bundle savedInstanceState) {
                        super.onCreate(savedInstanceState);
                        setContentView(R.layout.main);
                
                
                        exercise = new EditText(this); 
                        exercise = (EditText)findViewById(R.id.inputExercise); 
                
                        db = new DatabaseHandler(this);
                        exerciseType = db.getUniqueExercises();
                
                        myAutoComplete = (AutoCompleteTextView)findViewById(R.id.inputExercise);
                
                        myAutoComplete.addTextChangedListener(this);
                        myAutoComplete.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, exerciseType));
                
                
                        weight = new EditText(this); 
                        weight = (EditText)findViewById(R.id.inputWeight); 
                
                
                        reps = new EditText(this); 
                        reps = (EditText)findViewById(R.id.inputReps); 
                
                    }
                
                }
                

                感謝閱讀

                推薦答案

                好的,所以我找出了問(wèn)題所在!

                Ok, so I worked out what the issue was!

                我沒(méi)有發(fā)布的代碼因?yàn)槲艺J(rèn)為它無(wú)關(guān)緊要"包含一個(gè)線程

                The code which I didn't post because I thought it was 'irrelevant' contained a thread

                public static Runnable updateTimerMethod = new Runnable() 
                {
                
                    public void run() 
                    {
                        sessionTimer.setText(TimerHandler.theTime);  
                
                        myHandler.postDelayed(this, 0);
                
                    }
                 }; 
                

                通過(guò)將 postDelayed 設(shè)置為 0,我意識(shí)到線程基本上占用了所有活動(dòng)(我真的不知道如何正確解釋).一旦我將其更改為... 100,然后 EditText工作.

                I realised that the thread was basically taking up all of the activity (I don't really know how to explain that properly) by having the postDelayed as 0. Once I changed this to say... 100, then the EditText worked.

                感謝幫助我的@NKN.

                Thank you to @NKN who helped me.

                這可能是針對(duì)我的,但希望這對(duì)其他人有所幫助.

                This may be specific to me, but hopefully this will help somebody else.

                這篇關(guān)于使用屏幕鍵盤鍵入時(shí),Android 中的 EditText 不顯示文本的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                相關(guān)文檔推薦

                Converting a string to an integer on Android(在Android上將字符串轉(zhuǎn)換為整數(shù))
                Android Jack mockito alternative(Android Jack mockito 替代品)
                Is it possible to use Espresso#39;s IdlingResource to wait until a certain view appears?(是否可以使用 Espresso 的 IdlingResource 等到某個(gè)視圖出現(xiàn)?)
                Integrate window tester with eclipse for testing UI(將 window tester 與 eclipse 集成以測(cè)試 UI)
                How to press a button twice using Google UiAutomator?(如何使用 Google UiAutomator 按兩次按鈕?)
                How can I bind a specific key to different launch configurations in Eclipse?(如何將特定鍵綁定到 Eclipse 中的不同啟動(dòng)配置?)

                    <tfoot id='9yOMW'></tfoot>

                    <small id='9yOMW'></small><noframes id='9yOMW'>

                      <bdo id='9yOMW'></bdo><ul id='9yOMW'></ul>

                        1. <legend id='9yOMW'><style id='9yOMW'><dir id='9yOMW'><q id='9yOMW'></q></dir></style></legend>
                          <i id='9yOMW'><tr id='9yOMW'><dt id='9yOMW'><q id='9yOMW'><span id='9yOMW'><b id='9yOMW'><form id='9yOMW'><ins id='9yOMW'></ins><ul id='9yOMW'></ul><sub id='9yOMW'></sub></form><legend id='9yOMW'></legend><bdo id='9yOMW'><pre id='9yOMW'><center id='9yOMW'></center></pre></bdo></b><th id='9yOMW'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='9yOMW'><tfoot id='9yOMW'></tfoot><dl id='9yOMW'><fieldset id='9yOMW'></fieldset></dl></div>
                            <tbody id='9yOMW'></tbody>
                          主站蜘蛛池模板: 亚洲www | 天天躁日日躁性色aⅴ电影 免费在线观看成年人视频 国产欧美精品 | 亚洲成人精品国产 | 亚洲欧美日韩成人在线 | 一区二区高清 | 一区二区三区四区在线视频 | 午夜精品一区二区三区在线观看 | 亚洲精品一区二区三区在线 | 精品福利视频一区二区三区 | 久久久久中文字幕 | 国户精品久久久久久久久久久不卡 | 中文字幕在线观看www | 日韩午夜场 | 欧美成人a | 天堂影院av | 国产精品美女在线观看 | 国产精品一区二区三 | 欧美高清视频在线观看 | 国产成人综合久久 | 成人av一区二区三区 | 天天草天天 | 午夜不卡福利视频 | 久久欧美高清二区三区 | 国产精品高潮呻吟久久 | 欧美九九 | 亚洲国产精品久久久 | 九九热在线视频免费观看 | 欧美日韩精品一区二区三区蜜桃 | 国产精品久久久久久久久久三级 | 天天操天天摸天天爽 | 爱高潮www亚洲精品 中文字幕免费视频 | 99久久精品免费视频 | 亚洲欧美日韩国产综合 | 精品久久久久久久久久久院品网 | 欧美精品久久久久久 | 三级高清| 成人片免费看 | 爱爱无遮挡 | 免费同性女女aaa免费网站 | 亚洲一区二区日韩 | 久久国产欧美日韩精品 |