![](/img/trans.png)
[英]I inflated a view 5 times, the view which was inflated had a EditText, now i have 5 EditText on the screen, how to get the text from those EditTexts
[英]How do I get the EditText with the cursor in a list of EditTexts?
我有一個彈出對話框,允許用戶一次發送多封電子郵件。
上半部分是EditTexts數組,下半部分是帶有“建議電子郵件”的可單擊列表視圖,我希望onItemClickEvent將建議的電子郵件放入“選定的” EditText。 isSelected()不起作用,並且isCursorVisible()僅是API 16+,我什至不確定這是否可以解決我的問題。
tl; dr如何從一組EditTexts中獲取“選定的” EditText?
對於以后尋求該問題答案的任何人,我已經回答了我自己的問題:
EditText.isSelected()是EditText不會自動實例化為Selected視圖的正確方法。 手動將EditText設置為選定狀態,它將按預期運行。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.