From c5269a3129e5334427a9c51c6610fa4687e6cda4 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 9 Oct 2020 18:37:54 +0200 Subject: [PATCH] comment #5 - Some improvements --- .../java/app/fedilab/fedilabtube/SepiaSearchActivity.java | 6 ++++++ app/src/main/res/layout/activity_sepia_search.xml | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/app/fedilab/fedilabtube/SepiaSearchActivity.java b/app/src/main/java/app/fedilab/fedilabtube/SepiaSearchActivity.java index 7322319..43fd5d1 100644 --- a/app/src/main/java/app/fedilab/fedilabtube/SepiaSearchActivity.java +++ b/app/src/main/java/app/fedilab/fedilabtube/SepiaSearchActivity.java @@ -19,6 +19,7 @@ import android.content.SharedPreferences; import android.os.Bundle; import android.view.MenuItem; import android.view.View; +import android.view.WindowManager; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; @@ -46,6 +47,7 @@ import app.fedilab.fedilabtube.helper.Helper; import mabbas007.tagsedittext.TagsEditText; import static app.fedilab.fedilabtube.MainActivity.peertubeInformation; +import static app.fedilab.fedilabtube.PeertubeActivity.hideKeyboard; public class SepiaSearchActivity extends AppCompatActivity { @@ -309,9 +311,13 @@ public class SepiaSearchActivity extends AppCompatActivity { }); Button apply_filter = findViewById(R.id.apply_filter); apply_filter.setOnClickListener(v-> makeSearch()); + + searchBar.openSearch(); + getWindow().setSoftInputMode (WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); } private void makeSearch(){ + hideKeyboard(SepiaSearchActivity.this); if( sepia_element_one_of_tags.getTags().size() > 0 ) { sepiaSearchVideo.setTagsOneOf(sepia_element_one_of_tags.getTags()); }else{ diff --git a/app/src/main/res/layout/activity_sepia_search.xml b/app/src/main/res/layout/activity_sepia_search.xml index 59124a8..e923702 100644 --- a/app/src/main/res/layout/activity_sepia_search.xml +++ b/app/src/main/res/layout/activity_sepia_search.xml @@ -366,6 +366,5 @@ android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_marginBottom="?attr/actionBarSize" />