Some improvements

Media3
Thomas 10 months ago
parent e20fdafaa5
commit 892bb521e5

@ -133,6 +133,9 @@ public class SearchResultTabActivity extends BaseBarActivity {
inflater.inflate(R.menu.menu_search, menu); inflater.inflate(R.menu.menu_search, menu);
SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE); SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
SearchView searchView = (SearchView) menu.findItem(R.id.action_search).getActionView(); SearchView searchView = (SearchView) menu.findItem(R.id.action_search).getActionView();
if(searchView == null) {
return true;
}
if (search != null) { if (search != null) {
searchView.setQuery(search, false); searchView.setQuery(search, false);
} }

@ -170,7 +170,7 @@ public class FragmentMastodonTag extends Fragment {
Collections.sort(tags, (obj1, obj2) -> Integer.compare(obj2.getWeight(), obj1.getWeight())); Collections.sort(tags, (obj1, obj2) -> Integer.compare(obj2.getWeight(), obj1.getWeight()));
boolean isInCollection = false; boolean isInCollection = false;
for (Tag tag : tags) { for (Tag tag : tags) {
if (tag.name.compareToIgnoreCase(search) == 0) { if (tag.name.trim().compareToIgnoreCase(search.trim()) == 0) {
isInCollection = true; isInCollection = true;
break; break;
} }

@ -26,7 +26,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:tabGravity="fill" app:tabGravity="fill"
app:tabMode="scrollable" /> app:tabMode="auto" />
<androidx.viewpager.widget.ViewPager <androidx.viewpager.widget.ViewPager
android:id="@+id/search_viewpager" android:id="@+id/search_viewpager"

Loading…
Cancel
Save