diff --git a/app/src/main/java/com/keylesspalace/tusky/SearchActivity.java b/app/src/main/java/com/keylesspalace/tusky/SearchActivity.java index 141e18df..f75b33ac 100644 --- a/app/src/main/java/com/keylesspalace/tusky/SearchActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/SearchActivity.java @@ -89,7 +89,8 @@ public class SearchActivity extends BaseActivity implements SearchView.OnQueryTe super.onCreateOptionsMenu(menu); getMenuInflater().inflate(R.menu.search_toolbar, menu); - SearchView searchView = (SearchView) menu.findItem(R.id.action_search).getActionView(); + SearchView searchView = (SearchView) menu.findItem(R.id.action_search) + .getActionView(); setupSearchView(searchView); if (currentQuery != null) { @@ -160,6 +161,8 @@ public class SearchActivity extends BaseActivity implements SearchView.OnQueryTe searchView.setOnQueryTextListener(this); searchView.setFocusable(false); searchView.setFocusableInTouchMode(false); + + searchView.setMaxWidth(Integer.MAX_VALUE); } private void search(String query) { diff --git a/app/src/main/res/layout/activity_search.xml b/app/src/main/res/layout/activity_search.xml index 81ae2b0b..04ec3127 100644 --- a/app/src/main/res/layout/activity_search.xml +++ b/app/src/main/res/layout/activity_search.xml @@ -16,7 +16,8 @@ android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/toolbar_background_color" - app:navigationIcon="?attr/homeAsUpIndicator" /> + app:navigationIcon="?attr/homeAsUpIndicator" + app:contentInsetStartWithNavigation="0dp" /> + \ No newline at end of file diff --git a/app/src/main/res/menu/search_toolbar.xml b/app/src/main/res/menu/search_toolbar.xml index 172a1208..31a7f860 100644 --- a/app/src/main/res/menu/search_toolbar.xml +++ b/app/src/main/res/menu/search_toolbar.xml @@ -6,5 +6,6 @@ android:title="@string/action_search" android:icon="@android:drawable/ic_menu_search" app:actionViewClass="android.support.v7.widget.SearchView" + android:actionLayout="@layout/search_view" app:showAsAction="always" /> \ No newline at end of file