本文介紹了請(qǐng)求焦點(diǎn)不起作用的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!
問(wèn)題描述
限時(shí)送ChatGPT賬號(hào)..
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="20dp" >
<AutoCompleteTextView
android:id="@+id/autocomplete_zone"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:dropDownVerticalOffset="0.2dp"
android:ems="10"
android:hint="@string/zone_hint"
android:inputType="text"
android:lines="1"
android:maxLines="1"
android:popupBackground="#00ffffff"
android:textColor="#ffffff"
android:textColorHint="#ffffff" >
<requestFocus />
</AutoCompleteTextView>
<ProgressBar
android:id="@+id/progressBar1"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_alignBottom="@id/autocomplete_zone"
android:layout_alignRight="@id/autocomplete_zone"
android:layout_alignTop="@id/autocomplete_zone"
android:paddingBottom="5dp"
android:visibility="invisible" />
</RelativeLayout>
在上面的標(biāo)記中
<requestFocus />
不起作用.活動(dòng)啟動(dòng)時(shí),文本視圖未聚焦.這是因?yàn)楦采w文本視圖的進(jìn)度條嗎?任何想法如何解決這個(gè)問(wèn)題?
does not work. The text view is not focused when the activity is started. Is this because of the progress bar which overlays the text view? Any ideas how to fix this?
推薦答案
解決了!在清單中,我在活動(dòng)中添加了以下內(nèi)容:
Solved it! In manifest I added following to the activity:
android:windowSoftInputMode="stateAlwaysVisible"
這篇關(guān)于請(qǐng)求焦點(diǎn)不起作用的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!