我有一個EditText和發送按鈕定位在XML中的TabLayout之上。EditText和Button上面TabLayout
- 是否有可能使默認情況下,EditText和發送按鈕不可見,但當用戶單擊某些按鈕時,它會出現?
- 用戶應該能夠保持EditText打開並滾動EditText所在的屏幕。
- 這應該可以在任何選項卡中執行。
當我以前嘗試過時,用戶可以看到並單擊EditText後面的RecyclerView項目,但我將EditText背景設置爲白色。
代表的什麼,我試圖做的:
By default, the EditText and send button are hidden
When the user clicks "Reply", the EditText and send button appear
謝謝!
感謝您的答覆工作至今。我試圖找出如何在碎片和活動之間進行溝通。 EditText,發送按鈕和TabLayout的XML位於同一個XML文件中。該活動會膨脹此XML文件,但片段需要能夠設置活動膨脹的XML文件的可見性。 希望有一次,我會理解一次:https://developer.android.com/training/basics/fragments/communicating.html – Decimal