|
@@ -62,6 +62,8 @@ import java.util.ArrayList;
|
|
|
|
|
|
import third_parties.in.srain.cube.GridViewWithHeaderAndFooter;
|
|
|
|
|
|
+import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
|
|
|
+
|
|
|
public class ExtendedListFragment extends Fragment
|
|
|
implements OnItemClickListener, OnEnforceableRefreshListener, SearchView.OnQueryTextListener {
|
|
|
|
|
@@ -170,7 +172,11 @@ public class ExtendedListFragment extends Fragment
|
|
|
DisplayMetrics displaymetrics = new DisplayMetrics();
|
|
|
getActivity().getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
|
|
|
int width = displaymetrics.widthPixels;
|
|
|
- searchView.setMaxWidth((int)(width * 0.7));
|
|
|
+ if (getResources().getConfiguration().orientation == ORIENTATION_LANDSCAPE) {
|
|
|
+ searchView.setMaxWidth((int)(width * 0.8));
|
|
|
+ } else {
|
|
|
+ searchView.setMaxWidth((int)(width * 0.7));
|
|
|
+ }
|
|
|
|
|
|
searchView.setOnQueryTextFocusChangeListener(new View.OnFocusChangeListener() {
|
|
|
@Override
|