mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-27 22:37:15 +00:00
Bug 3204 - Lollipop protest time chooser
This commit is contained in:
1 parent
728f06e4c4
commit
957fe53224
1 file changed
+9
-7
+9
-7
@@ -6,6 +6,7 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.util.SparseBooleanArray;
|
||||
@@ -105,14 +106,15 @@ public class ProtestTimeDialogFragment extends AttachedDialogFragment {
|
||||
timePicker = (TimePicker) view.findViewById(R.id.protest_time_time_time_picker);
|
||||
setupTimePicker(timePicker);
|
||||
|
||||
ViewGroup.LayoutParams layoutParams = racesList.getLayoutParams();
|
||||
layoutParams.height = 49 * races.size();
|
||||
int screenHeight = (int)(ScreenHelper.on(getActivity()).getScreenHeight() * 0.65);
|
||||
if (layoutParams.height > screenHeight) {
|
||||
layoutParams.height = screenHeight;
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|
||||
// TODO: @Samuel -> please check, why we did this, because I can't remember
|
||||
ViewGroup.LayoutParams layoutParams = racesList.getLayoutParams();
|
||||
layoutParams.height = 49 * races.size();
|
||||
int screenHeight = (int)(ScreenHelper.on(getActivity()).getScreenHeight() * 0.65);
|
||||
if (layoutParams.height > screenHeight) {
|
||||
layoutParams.height = screenHeight;
|
||||
}
|
||||
}
|
||||
view.setLayoutParams(layoutParams);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user