mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
Fix landscape
This commit is contained in:
parent
4fa40f7392
commit
27716f8425
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue