android - 编辑文本更改时在编辑文本下方显示下拉列表
解决方案
实现您的设计的一种方法
在 XML 中
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<EditText
android:id="@+id/id_search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/enter_building_or_street_address"/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/id_recyclerview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"/>
</LinearLayout>
在班上
实施
TextWatcher
为EditText
onTextChanged -如果响应不为空,则调用 place api并列出响应
recyclerview
推荐阅读
- python - 如何使用 pyglet 创建 3D?
- python - 根据列值将行拆分为多行
- python - 使用 folium 为特定国家绘制世界等值线图时出错
- php - 如何翻译 symfony 表单错误信息?
- java - 如何让代码等待所有请求完成 Android okhttp
- c++ - 在字符串中输入换行符
- python - How to iterate this n dimensional array?
- iso8583 - difference between iso8583 authorize request and authorize advice request
- ruby-on-rails - Ruby On Rails - "OpenSSL::Cipher::CipherError at ..." when connecting to imported database
- python-3.x - How to improve SpaCy matcher pattern