mirror of
https://github.com/MatomoCamp/matomocamp-companion-android.git
synced 2024-09-19 16:13:46 +02:00
Improved preferences screen display to make it look more live the native one
This commit is contained in:
parent
1c7f29d17c
commit
56f3843d9f
1 changed files with 3 additions and 1 deletions
|
@ -68,9 +68,11 @@ public abstract class PreferenceFragment extends Fragment {
|
|||
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle savedInstanceState) {
|
||||
ListView listView = new ListView(getActivity());
|
||||
listView.setId(android.R.id.list);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
||||
if ((Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) && (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)) {
|
||||
final int horizontalPadding = (int) (HC_HORIZONTAL_PADDING * getResources().getDisplayMetrics().density + 0.5f);
|
||||
listView.setPadding(horizontalPadding, 0, horizontalPadding, 0);
|
||||
listView.setClipToPadding(false);
|
||||
listView.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);
|
||||
}
|
||||
return listView;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue