From c5c6e8205a8a04c28001280e459752ec8f910e25 Mon Sep 17 00:00:00 2001 From: Vavassor Date: Mon, 26 Jun 2017 15:38:04 -0400 Subject: [PATCH] Fixes autocomplete list getting cut off in the composer if the user is using an app or launcher that hides the status bar. --- .../java/com/keylesspalace/tusky/ComposeActivity.java | 8 +++++--- app/src/main/res/layout/activity_compose.xml | 1 + app/src/main/res/layout/item_autocomplete.xml | 1 - 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java index 5c20d627..f0876e22 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java @@ -64,6 +64,7 @@ import android.view.LayoutInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; +import android.view.WindowManager; import android.webkit.MimeTypeMap; import android.widget.ArrayAdapter; import android.widget.Button; @@ -1369,7 +1370,8 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFragm return resultList.get(index); } - @Override @NonNull + @Override + @NonNull public Filter getFilter() { return new Filter() { @Override @@ -1399,8 +1401,8 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFragm }; } - - @Override @NonNull + @Override + @NonNull public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) { View view = convertView; diff --git a/app/src/main/res/layout/activity_compose.xml b/app/src/main/res/layout/activity_compose.xml index 1e837d2c..2cbd4bbf 100644 --- a/app/src/main/res/layout/activity_compose.xml +++ b/app/src/main/res/layout/activity_compose.xml @@ -64,6 +64,7 @@ android:hint="@string/hint_compose" android:inputType="text|textMultiLine|textCapSentences" android:dropDownWidth="wrap_content" + android:dropDownHeight="58dp" android:completionThreshold="2" /> -