大家好我試圖展示一個Android微調,但不顯示爲灰色。我嘗試過使用setFocusable(false),它在編輯框上工作正常,但不在spinners上。除非我說的那樣,否則我不希望微調者可以改變。基本上我有一個顯示數據的屏幕,我想把它放在「更新模式」中。在用戶選擇更新數據之前,應該僅查看。有任何想法嗎?如何禁用android微調器而不使它變灰?
0
A
回答
0
我結束了作弊一點 退房this link。在禁用該字段之前,我獲得了背景圖像,然後在禁用該字段後將背景設置爲該圖像。
// Deal with spinners. I don't want to gray out the background
// because it looks bad against our dark theme.
Drawable d = type.getBackground().getCurrent(); // the enabled background
type.setEnabled(enabled);
// set all of the spinners back to the enabled background
if(!enabled){
type.setBackgroundDrawable(d);
}
1
也許你可以創建一個自定義選擇,並把它設置爲微調的背景下,對於選擇
相關問題
- 1. 如何在Android中使微調變灰?
- 2. 禁用JToggleButton而不將它灰色
- 3. 如何在JavaFX中禁用某個節點而不使它變爲灰色?
- 4. 如何從另一個微調器禁用微調器?
- 5. 如何使用android導航微調器
- 6. 微調器dropUP而不是dropDOWN android
- 7. 如何禁用PrinterJob.pringDialog()中的微調器?
- 8. 禁用微調android系統
- 9. 使用Android微調器
- 10. 使用checbox禁用JQuery UI微調器
- 11. 如何使微調項禁用
- 12. 禁用微調器值?
- 13. 如何使用微調器
- 14. 如何通過Android上的微調器禁用屏幕?
- 15. 如何使用數組而不是光標的微調器
- 16. 如何禁用UITabBarItem而不使灰色項目
- 17. Android - 如何更改微調器值而不觸發setOnItemSelectedListener
- 18. 禁用複選框而不用灰色
- 19. Android微調器選擇禁用另一個微調器中的選擇
- 20. 代碼不工作在微調器禁用物品的Android
- 21. Android - 如何使改變兩個值的微調器
- 22. 微調器高度不變
- 23. Android微調器。如何從微調器中刪除項目?
- 24. Android微調器使幾行不可見
- 25. 是否有可能在Android中變灰(而不僅僅是禁用)MenuItem?
- 26. Android:更改微調項目而不關閉微調框
- 27. ANDROID>如何使用微調
- 28. 如何用圖像而不是文本創建微調器?
- 29. 按鈕禁用但不會變灰
- 30. 禁用Firefox插件ActionButton不會變灰