Add back menu entry

This commit is contained in:
Mario Danic 2017-02-19 19:38:12 +01:00 committed by AndyScherzinger
parent 0fd9a47b23
commit 150a19c5b7
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -30,6 +30,7 @@ import android.support.v4.view.MenuItemCompat;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.SearchView;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
@ -165,7 +166,12 @@ public class ExtendedListFragment extends Fragment
searchView.setOnQueryTextListener(this);
final Handler handler = new Handler();
searchView.setMaxWidth(Integer.MAX_VALUE);
//searchView.setMaxWidth(Integer.MAX_VALUE);
DisplayMetrics displaymetrics = new DisplayMetrics();
getActivity().getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
int width = displaymetrics.widthPixels;
searchView.setMaxWidth((int)(width * 0.7));
searchView.setOnQueryTextFocusChangeListener(new View.OnFocusChangeListener() {
@Override