fixed scrolling speed in start time fragment on old devices (layout while notifyTick)

This commit is contained in:
Peter Siegmund
2016-07-26 19:55:49 +02:00
parent bafc21b334
commit 470dc20424
2 changed files with 59 additions and 71 deletions
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/header"
@@ -25,13 +25,13 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="?attr/chevron_left_24dp"
android:visibility="gone"/>
android:visibility="gone" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_time"
android:textAppearance="?attr/textHeader"/>
android:textAppearance="?attr/textHeader" />
</LinearLayout>
<View
@@ -39,7 +39,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/thin_line"
android:layout_alignParentBottom="true"
android:background="?attr/black"/>
android:background="?attr/black" />
</RelativeLayout>
<LinearLayout
@@ -63,7 +63,7 @@
android:text="@string/dependent_races_absolute"
android:textAllCaps="true"
android:textColor="?attr/sap_yellow_1"
android:textSize="@dimen/textSize_20"/>
android:textSize="@dimen/textSize_20" />
<Button
android:id="@+id/relative"
@@ -76,7 +76,7 @@
android:text="@string/dependent_races_relative"
android:textAllCaps="true"
android:textColor="?attr/sap_light_gray"
android:textSize="@dimen/textSize_20"/>
android:textSize="@dimen/textSize_20" />
</LinearLayout>
<FrameLayout
@@ -99,24 +99,18 @@
android:layout_height="@dimen/selector_header_height"
android:layout_alignParentTop="true">
<LinearLayout
android:layout_width="wrap_content"
<TextView
android:id="@+id/start_countdown"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="horizontal">
<TextView
android:id="@+id/start_countdown"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginRight="@dimen/default_margin"
android:textColor="?attr/white"
android:textSize="@dimen/textSize_72"
android:visibility="visible"
tools:text="1:01:00"/>
</LinearLayout>
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginRight="@dimen/default_margin"
android:gravity="center"
android:textColor="?attr/white"
android:textSize="@dimen/textSize_72"
android:visibility="visible"
tools:text="1:01:00" />
</RelativeLayout>
<RelativeLayout
@@ -137,21 +131,21 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:descendantFocusability="blocksDescendants"/>
android:descendantFocusability="blocksDescendants" />
<include
android:id="@+id/start_time_picker"
layout="@layout/time_picker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"/>
android:layout_gravity="center_vertical" />
<NumberPicker
android:id="@+id/start_time_seconds"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:descendantFocusability="blocksDescendants"/>
android:descendantFocusability="blocksDescendants" />
</LinearLayout>
</RelativeLayout>
@@ -167,7 +161,7 @@
android:layout_marginTop="@dimen/side_padding"
android:maxWidth="400dp"
android:text="@string/race_set_time"
android:textSize="@dimen/textSize_18"/>
android:textSize="@dimen/textSize_18" />
<Button
android:id="@+id/sync_to_minute"
@@ -182,7 +176,7 @@
android:textColor="?attr/white"
android:textSize="@dimen/textSize_18"
android:visibility="gone"
tools:visibility="visible"/>
tools:visibility="visible" />
<TextView
android:id="@+id/debug_time"
@@ -192,7 +186,7 @@
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:visibility="gone"
tools:text="12:12:12"/>
tools:text="12:12:12" />
</RelativeLayout>
<RelativeLayout
@@ -223,7 +217,7 @@
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginTop="@dimen/default_margin"
android:scaleX="@integer/picker_scale"
android:scaleY="@integer/picker_scale"/>
android:scaleY="@integer/picker_scale" />
<LinearLayout
android:id="@+id/relative_spinner_area"
@@ -242,7 +236,7 @@
android:layout_marginTop="@dimen/default_margin_half"
android:background="?attr/spinner_background"
android:dropDownWidth="wrap_content"
android:spinnerMode="dropdown"/>
android:spinnerMode="dropdown" />
<Spinner
android:id="@+id/dependent_fleet"
@@ -253,7 +247,7 @@
android:dropDownWidth="wrap_content"
android:spinnerMode="dropdown"
android:visibility="gone"
tools:visibility="visible"/>
tools:visibility="visible" />
<Spinner
android:id="@+id/dependent_racegroup"
@@ -262,7 +256,7 @@
android:layout_marginTop="@dimen/default_margin_half"
android:background="?attr/spinner_background"
android:dropDownWidth="wrap_content"
android:spinnerMode="dropdown"/>
android:spinnerMode="dropdown" />
</LinearLayout>
<TextView
@@ -273,7 +267,7 @@
android:layout_alignParentTop="true"
android:paddingLeft="@dimen/spinner_padding"
android:text="@string/minutes_after"
android:textAppearance="?attr/textSmall"/>
android:textAppearance="?attr/textSmall" />
</RelativeLayout>
</RelativeLayout>
@@ -288,7 +282,7 @@
android:layout_marginTop="@dimen/side_padding"
android:maxWidth="400dp"
android:text="@string/race_set_time"
android:textSize="@dimen/textSize_18"/>
android:textSize="@dimen/textSize_18" />
</RelativeLayout>
</FrameLayout>
</RelativeLayout>
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/header"
@@ -25,13 +25,13 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="?attr/chevron_left_24dp"
android:visibility="gone"/>
android:visibility="gone" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_time"
android:textAppearance="?attr/textHeader"/>
android:textAppearance="?attr/textHeader" />
</LinearLayout>
<View
@@ -39,7 +39,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/thick_line"
android:layout_alignParentBottom="true"
android:background="?attr/black"/>
android:background="?attr/black" />
</RelativeLayout>
<LinearLayout
@@ -61,7 +61,7 @@
android:text="@string/dependent_races_absolute"
android:textAllCaps="true"
android:textColor="?attr/sap_yellow_1"
android:textSize="@dimen/textSize_26"/>
android:textSize="@dimen/textSize_26" />
<Button
android:id="@+id/relative"
@@ -72,7 +72,7 @@
android:text="@string/dependent_races_relative"
android:textAllCaps="true"
android:textColor="?attr/sap_light_gray"
android:textSize="@dimen/textSize_26"/>
android:textSize="@dimen/textSize_26" />
</LinearLayout>
<FrameLayout
@@ -95,24 +95,18 @@
android:layout_height="@dimen/selector_header_height"
android:layout_alignParentTop="true">
<LinearLayout
android:layout_width="wrap_content"
<TextView
android:id="@+id/start_countdown"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginRight="@dimen/default_margin"
android:layout_marginTop="@dimen/default_margin_half"
android:orientation="horizontal">
<TextView
android:id="@+id/start_countdown"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginRight="@dimen/default_margin"
android:textAppearance="?attr/textXLarge"
android:visibility="visible"
tools:text="1:01:00"/>
</LinearLayout>
android:textAppearance="?attr/textXLarge"
android:visibility="visible"
tools:text="1:01:00" />
</RelativeLayout>
<RelativeLayout
@@ -138,7 +132,7 @@
android:text="@string/sync_to_minute"
android:textColor="?attr/white"
android:visibility="gone"
tools:visibility="visible"/>
tools:visibility="visible" />
<Button
android:id="@+id/set_start_time_absolute"
@@ -146,7 +140,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/default_margin"
android:text="@string/race_set_time"/>
android:text="@string/race_set_time" />
</LinearLayout>
</RelativeLayout>
@@ -169,21 +163,21 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:descendantFocusability="blocksDescendants"/>
android:descendantFocusability="blocksDescendants" />
<include
android:id="@+id/start_time_picker"
layout="@layout/time_picker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"/>
android:layout_gravity="center_vertical" />
<NumberPicker
android:id="@+id/start_time_seconds"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:descendantFocusability="blocksDescendants"/>
android:descendantFocusability="blocksDescendants" />
</LinearLayout>
</RelativeLayout>
@@ -196,7 +190,7 @@
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:visibility="gone"
tools:text="12:12:12"/>
tools:text="12:12:12" />
</RelativeLayout>
<RelativeLayout
@@ -220,7 +214,7 @@
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_margin="@dimen/default_margin_twice"
android:text="@string/race_set_time"/>
android:text="@string/race_set_time" />
</RelativeLayout>
<RelativeLayout
@@ -241,7 +235,7 @@
android:layout_gravity="center_vertical"
android:layout_margin="@dimen/default_margin"
android:scaleX="@integer/picker_scale"
android:scaleY="@integer/picker_scale"/>
android:scaleY="@integer/picker_scale" />
<TextView
android:layout_width="wrap_content"
@@ -249,7 +243,7 @@
android:layout_gravity="center_vertical"
android:padding="@dimen/default_padding_half"
android:text="@string/minutes_after"
android:textAppearance="?attr/textLarge"/>
android:textAppearance="?attr/textLarge" />
<LinearLayout
android:layout_width="@dimen/unscheduled_spinner_width"
@@ -263,7 +257,7 @@
android:layout_height="wrap_content"
android:background="?attr/spinner_background"
android:dropDownWidth="wrap_content"
android:spinnerMode="dropdown"/>
android:spinnerMode="dropdown" />
<Spinner
android:id="@+id/dependent_fleet"
@@ -274,7 +268,7 @@
android:dropDownWidth="wrap_content"
android:spinnerMode="dropdown"
android:visibility="gone"
tools:visibility="visible"/>
tools:visibility="visible" />
<Spinner
android:id="@+id/dependent_racegroup"
@@ -283,7 +277,7 @@
android:layout_marginTop="@dimen/default_margin_half"
android:background="?attr/spinner_background"
android:dropDownWidth="wrap_content"
android:spinnerMode="dropdown"/>
android:spinnerMode="dropdown" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>