我得到並獲取當前位置和所選的位置,但是當我按下了取消十字按鈕,它會清除這一切,但現在還不能從變量清楚..請幫助我 Thanx提前地方自動填充碎片清除按鈕設置可見不見了
1
A
回答
0
您無法將其可見性設置消失。 也沒有聽衆。
可能會在谷歌下次更新中提供。
不是一個正確的解決方案,但如果你真的需要它。 您可以使用相對佈局在十字按鈕上創建白色視圖,以便用戶無法看到十字按鈕。
<RelativeLayout
android:layout_below="@+id/actionBar"
android:id="@+id/ll1"
android:layout_width="match_parent"
android:layout_height="@dimen/_40sdp"
android:alpha=".9"
android:background="@drawable/home_page_search"
android:layout_margin="10dp"
>
<fragment
android:id="@+id/place_autocomplete_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:name="com.google.android.gms.location.places.ui.PlaceAutocompleteFragment"
/>
<View
android:id="@+id/view1"
android:layout_width="@dimen/_50sdp"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:background="@color/white"
android:layout_margin="@dimen/_5sdp"
/>
</RelativeLayout>
,並把clicklistener它使十字無法點擊
0
該解決方案爲我工作:
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<fragment android:name="com.google.android.gms.location.places.ui.PlaceAutocompleteFragment"
android:id="@+id/place_autocomplete_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<View
android:id="@+id/view_callback"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_gravity="right|center_vertical"
android:background="@android:color/transparent"/>
</FrameLayout>
我已經把在PlaceAutocompleteFragment透明視圖。該視圖應該包含取消按鈕。然後,在活動/片段,obtining觀看基準後:
closeCallback.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
autocompleteFragment.setText("");
return true;
}
});
此解決方案,因爲當你把一個空字符串,我們得到了相同的結果。
相關問題
- 1. Android - 可見和不可見按鈕
- 2. 將CSS可見性設置爲可見按鈕點擊 - Reactjs
- 3. Android碎片Tabbar - 主頁上不可見?
- 4. 設置按鈕能見度
- 5. 按鈕在ActionBar設置可見性?
- 6. Behat填充表格字段被動態設置爲'可見'
- 7. 設置跨度可見和不可見
- 8. 即使設置其可見性後,按鈕視圖也不可見
- 9. 按鈕變爲不可見
- 10. 按鈕動作後不可見變化
- 11. 滾動listview導致按鈕不可見
- 12. 在畫布上設置DrawingVisual的可見性(可見,不可見)
- 13. 如何在自定義ListView中設置按鈕的可見性?
- 14. 填充在div塊內不可見?
- 15. matlab:如何設置動態不可見什麼是可見的
- 16. 設置浮動動作按鈕圖像以填充按鈕
- 17. 添加swiperefreshlayout後不見了按鈕
- 18. ListView設置爲不可見後獲得按鈕出現
- 19. 設置可見性從動漫到可見動畫在RecyclerView
- 20. Openui5移動設備splitapp菜單按鈕不可見
- 21. iOS按鈕可見,不可點擊
- 22. Android列表視圖顯示按鈕可見和不可見?
- 23. 懸停按鈕上,可見度:可見不起作用
- 24. Android - 可見和不可見標籤:按鈕處理
- 25. UWP按鈕可見性屬性不可見
- 26. 設置每次按下按鈕時可見的編輯文本
- 27. Android按鈕不可見不起作用
- 28. 1dp填充在低分辨率設備中不可見
- 29. 按鈕在文本和可見的上方文本下不可見
- 30. WPF ListBox滾動和按鈕可見性
autoCompleteTextView.setText(「」);簡單,因爲 –
無法從變量意味着?? –
如何檢查空文本到位autocomplete片段?當我點擊交叉(取消)按鈕時,jzt清除但不能從變量中清除當前位置。我想刪除十字按鈕。 Plz幫助我@ Bajirao Shinde – Shaalz