Reputation: 1459
I am using AutoCompleteTextView
in each recyclerview
row, then i got the problem when dropdown show, it overlay autocompletetextview
, so can see what I text in this.
Here is my xml for recyclerview adapter
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:drawme="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:orientation="vertical">
<com.rafakob.drawme.DrawMeTextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:gravity="center"
android:padding="10dp"
android:textColor="#000000"
android:textSize="18sp"
android:textStyle="bold"
drawme:dm_backColor="@color/background_light"
drawme:dm_radiusTopLeft="10dp"
drawme:dm_radiusTopRight="10dp">
<requestFocus />
</com.rafakob.drawme.DrawMeTextView>
<com.rafakob.drawme.DrawMeLinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
drawme:dm_backColor="@color/grayColor70"
drawme:dm_radiusBottomLeft="10dp"
drawme:dm_radiusBottomRight="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="10dp">
<AutoCompleteTextView
android:id="@+id/machine"
style="@style/Widget.AppCompat.Spinner.DropDown"
android:layout_width="match_parent"
android:layout_height="46dp"
android:layout_weight="1"
android:gravity="center" />
<CheckBox
android:id="@+id/checkbox"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp" />
</LinearLayout>
</LinearLayout>
</com.rafakob.drawme.DrawMeLinearLayout>
</LinearLayout>
In code i'm using normal implement with using arrayAdapter, then setadapter for that autocompletetextview In manifest i set adjustPan|adjustResize but still not working. Does anyone have solution for this?
UPDATE
I just tested with only autocompletetextview as a child of RecyclerView row. The result image below:
Upvotes: 1
Views: 2000
Reputation: 1459
After reading AutoCompleteTextView document from Android, i found the solution is just use android:dropDownVerticalOffset
it's solve my problem ^.,.^
Upvotes: 1