[英]Why is my positive and negative button text in EditTextPreference not showing up?
所以我有一個具有edittextpreference 的首選項屏幕。 我還在 XML 文件中設置了它的正按鈕和負按鈕的文本,如下所示: 但是,當我運行應用程序時顯示的是這樣的 我不確定它是因為顏色是白色還是只是沒有出現。 我怎樣才能解決這個問題? ...
[英]Why is my positive and negative button text in EditTextPreference not showing up?
所以我有一個具有edittextpreference 的首選項屏幕。 我還在 XML 文件中設置了它的正按鈕和負按鈕的文本,如下所示: 但是,當我運行應用程序時顯示的是這樣的 我不確定它是因為顏色是白色還是只是沒有出現。 我怎樣才能解決這個問題? ...
[英]How to show and hide Android Edit Text Preference?
我只想知道如何顯示或隱藏用於添加用戶名和密碼的編輯文本首選項。 我可以在這里使用這種功能嗎 - 啟用或禁用 xml 中的按鈕來編輯文本首選項 ImageButton ready = (ImageButton) findViewById(R.id.ready); ready.setVis ...
[英]How to accept more than one value from Android Text Preference?
下面是我用來從文本首選項接受用戶名和密碼的代碼。 問題是我必須先接受用戶名保存然后密碼。 有沒有更簡單的方法可以一鍵同時獲取用戶名和密碼。 可能是兩個文本字段,點擊用戶信息並同時接受它們。 ...
[英]Changing the Title and EditText color in androidx.preference.EditTextPreference
我在這個主題上發現了一些類似的問題,但它適用於support version ,而不適用於androidx 。 我無法在 androidx 上進行此更改。 但是在以前的支持版本上已經有解決方案了。 誰能給我一些關於如何在EditTextPreference中更改標題和 editetext 字段文本顏 ...
[英]AndroidX: Set Enter key to validate EditTextPreference dialog box
我正在嘗試使用AndroidX制作首選項屏幕,但遇到了一個小問題...... 當我使用虛擬鍵盤上的“確定”按鈕驗證我的輸入時,不會驗證首選項。 (鍵盤被隱藏了,僅此而已...) 使用 AndroidX,我們不能再覆蓋EditTextPreference中的showDialog() ......而且 ...
[英]EditTextPreference inputType=textPassword not working
我已經用模板創建了一個 SettingsActivity 並在我的 root_preferences.xml 中放置了一個 EditTextPreference。 它應該包含一個密碼,所以我像這樣編輯它: 我的問題是 inputType、singleLine 和 setAllOnFocus 都 ...
[英]Android Preference. How to force update summary for the preference with SummaryProvider setted?
我使用SimpleSummaryProvider修改了EditTextPreference : 如果我以編程方式更改此首選項(例如在onSharedPreferenceChanged事件中),則圖形界面中的摘要將不會更新。 有什么方法可以通知 Preference 小部件它需要再次讀取該值並將其 ...
[英]Add a neutral button to androidx EditTextPrefence / DialogPreference
我一直在使用我自己的從 EditTextPreference 派生的首選項類來包含一個中性按鈕(以便用戶可以選擇默認值)。 我通過覆蓋 onPrepareDialogBuilder (當然來自搜索 stackoverflow。) 但是,使用 androidx EditTextPreferen ...
[英]Allow AndroidX EditTextPreference to only accept letters
我有一個 EditTextPreference 設置了一個過濾器來限制它的大小,如下所示: 我還想限制它只接受字母(不僅僅是 a-zA-Z,因為該應用程序接受不止一種語言)。 我該怎么做呢? 我以前嘗試過許多過濾器,包括這些問題中建議的所有過濾器以及類似的過濾器: 使 EditText 字 ...
[英]How to make a normal lines numbering in EditText?
我正在為 Android 制作一個文本編輯器,我想顯示EditText中每行的數量。 我的解決方案是制作一個帶有行號的TextView並在TextView旁邊放置一個EditText 。 像這樣 這工作正常,但有一個事實......如果行數約為 600,當調用TextView's onMeasur ...
[英]How to set maximal length of EditTextPreference of AndroidX Library?
最近,我將我的 android 項目遷移到了 AndroidX,並使用了 AndroidX 庫中的 EditTextPreference。 現在,我想將 EditTextPreference 的最大長度設置為 50。我嘗試使用: 但它不起作用。 似乎所有 android 命名空間都不適用於 E ...
[英]Change text size on the positveButtonText in the EditTextPreference dialog
我無法弄清楚如何在EditTextPreference對話框彈出框中的按鈕上更改文本大小。 我希望我的應用程序中的所有文本都精簡到24 sp。 除PreferenceScreen中的此對話框外,其他任何地方都發生這種情況。 正如您在ListPreference中看到的那樣,我弄清楚了如何隱 ...
[英]Android: EditTextPreference dialog showing value from previous invocation
在我的應用程序中,我在設置屏幕中有一個帳戶列表。 如果單擊一個帳戶,則轉到顯示該帳戶詳細信息的屏幕。 帳戶名稱是一個EditTextPreference,如果您單擊它,Android將顯示一個對話框,使您可以更改帳戶名稱。 第一次顯示此對話框時,未指定任何值。 用戶輸入帳戶的新名稱, ...
[英]EditTextPreference not showing numeric keyboard after migrating project to androidx
使用Android Studio提供的Migrate to AndroidX...功能Migrate to AndroidX...我的項目Migrate to AndroidX...並相應地更改了我的依賴項以使所有內容按預期運行后,我遇到了一個小問題,但我一直無法解決。 為了在我的應用程序 ...
[英]Fill EditTextPreference programmatically on edit
以下是我的代碼的一部分,該代碼可以自動設置電話號碼。 單擊mPhoneNumber並打開編輯窗口時,是否可以通過編程方式用mPhoneNumber填充EditTextPreference ? 我想讓用戶可以編輯他們的號碼,而現在他們還不能。 ...
[英]Why I can't enforce EditTextPreference to take just numbers?
目標:使用EditTextPreference從用戶獲取數字輸入。 問題:我正在使用support.v7.preference ,而且據我所知,這個庫帶來了創建自定義DialogPreference (如何使用帶有AppCompat的support.v7.preference和潛在的缺點 ...
[英]Change fontFamily for Android EditTextPreference
我試圖更改EditTextPreference fontFamily,以便所有可見的文本(包括Preference標題和Dialog標題)都使用自定義字體資源顯示。 有什么建議么? 我嘗試在styles.xml中建立fontFamily以及創建自定義EditTextPreference。 ...
[英]How to show the enter button in keyboard after adding textNoSuggestions to editText?
基本上,我試圖從editText刪除建議下划線,這是由textNoSuggestions中的editText完成的。 但是現在的問題是鍵盤沒有顯示輸入按鈕。 因此,我想知道即使添加了標志后如何顯示enterKey嗎? 碼: ...
[英]Change EditTextPreference dialog input text color
我可以更改我的編輯文本首選項的標題和摘要顏色。 當您單擊它時,背景為黑色,按鈕為白色。 我仍然需要弄清楚如何更改實際值文本。 有任何想法嗎? 如果我也可以更改該行的顏色,那將是很棒的。 我的風格在這里: ...
[英]Display text from an EditTextPreference in the app?
我在“設置”菜單中創建了一個設置,允許用戶輸入其名稱。 我現在需要知道的是如何顯示該名稱。 除了在nameLabel的右側顯示名稱之外,我幾乎完成了所有工作。 任何幫助是極大的贊賞。 activity_main.xml preferences.xml MainAct ...