Renamed AP Button label to aborting Flag button label, implemented ap

handling in Startphase fragement
This commit is contained in:
Armin Zamani committed 2013-04-08 13:31:17 +02:00
1 parent 4d8156faeb
commit 4541f3067b
5 files changed
+483 -456

No files matched your search

@@ -114,7 +114,7 @@
android:contentDescription="@string/flag_ap"
android:src="@drawable/ap_flag" />
<TextView
android:id="@+id/apButtonLabel"
android:id="@+id/abortingFlagButtonLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
@@ -1,143 +1,143 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:id="@+id/raceCountdown"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Welter.ExtraBigTitleLabel" />
<TextView
android:id="@+id/nextFlagCountdown"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
<ImageView
android:layout_width="500dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:contentDescription="@string/empty"
android:paddingBottom="2dp"
android:scaleType="fitXY"
android:src="@android:drawable/divider_horizontal_textfield" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="10dip"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:layout_marginTop="10dip"
android:baselineAligned="false"
android:orientation="horizontal" >
<RelativeLayout
android:id="@+id/flagDisplaySpaceLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="0.618"
android:gravity="fill_horizontal"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/upFlagsSpace"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:orientation="horizontal" >
<ImageView
android:id="@+id/currentlyDisplayedFlag"
android:layout_width="200dp"
android:layout_height="130dp"
android:layout_centerInParent="true"
android:layout_marginRight="50dp"
android:layout_marginTop="20dp"
android:contentDescription="@string/start_mode_flag"
android:src="@drawable/ap_flag" />
<com.sap.sailing.racecommittee.app.utils.views.MyVerticalTextView
android:id="@+id/flagsUpLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp"
android:layout_marginTop="20dp"
android:text="@string/flags_up"
android:textAppearance="@style/TextAppearance.Welter.VeryBigTitleLabel" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/downFlagsSpace"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="horizontal" >
<ImageView
android:id="@+id/nextFlagToBeDisplayed"
android:layout_width="200dp"
android:layout_height="130dp"
android:layout_centerInParent="true"
android:layout_marginRight="10dp"
android:contentDescription="@string/start_mode_flag"
android:src="@drawable/three_min_flag" />
<com.sap.sailing.racecommittee.app.utils.views.MyVerticalTextView
android:id="@+id/flagsDownLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginBottom="20dp"
android:layout_marginRight="10dp"
android:text="@string/flags_down"
android:textAppearance="@style/TextAppearance.Welter.VeryBigTitleLabel" />
</RelativeLayout>
</RelativeLayout>
<TextView
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="#DADADA" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.99"
android:gravity="center_horizontal"
android:orientation="vertical" >
<ImageButton
android:id="@+id/apButton"
android:layout_width="200dp"
android:layout_height="110dp"
android:contentDescription="@string/flag_ap"
android:scaleType="fitCenter"
android:src="@drawable/ap_flag" />
<TextView
android:id="@+id/apButtonLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginTop="2dp"
android:text="@string/abort_starting_phase"
android:textAppearance="@style/TextAppearance.Welter.TitleLabel" />
<Button
android:id="@+id/resetTimeButton"
android:layout_width="200dp"
android:layout_height="50dp"
android:text="@string/reset_time" />
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:id="@+id/raceCountdown"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Welter.ExtraBigTitleLabel" />
<TextView
android:id="@+id/nextFlagCountdown"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
<ImageView
android:layout_width="500dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:contentDescription="@string/empty"
android:paddingBottom="2dp"
android:scaleType="fitXY"
android:src="@android:drawable/divider_horizontal_textfield" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="10dip"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:layout_marginTop="10dip"
android:baselineAligned="false"
android:orientation="horizontal" >
<RelativeLayout
android:id="@+id/flagDisplaySpaceLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="0.618"
android:gravity="fill_horizontal"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/upFlagsSpace"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:orientation="horizontal" >
<ImageView
android:id="@+id/currentlyDisplayedFlag"
android:layout_width="200dp"
android:layout_height="130dp"
android:layout_centerInParent="true"
android:layout_marginRight="50dp"
android:layout_marginTop="20dp"
android:contentDescription="@string/start_mode_flag"
android:src="@drawable/ap_flag" />
<com.sap.sailing.racecommittee.app.utils.views.MyVerticalTextView
android:id="@+id/flagsUpLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp"
android:layout_marginTop="20dp"
android:text="@string/flags_up"
android:textAppearance="@style/TextAppearance.Welter.VeryBigTitleLabel" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/downFlagsSpace"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="horizontal" >
<ImageView
android:id="@+id/nextFlagToBeDisplayed"
android:layout_width="200dp"
android:layout_height="130dp"
android:layout_centerInParent="true"
android:layout_marginRight="10dp"
android:contentDescription="@string/start_mode_flag"
android:src="@drawable/three_min_flag" />
<com.sap.sailing.racecommittee.app.utils.views.MyVerticalTextView
android:id="@+id/flagsDownLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginBottom="20dp"
android:layout_marginRight="10dp"
android:text="@string/flags_down"
android:textAppearance="@style/TextAppearance.Welter.VeryBigTitleLabel" />
</RelativeLayout>
</RelativeLayout>
<TextView
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="#DADADA" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.99"
android:gravity="center_horizontal"
android:orientation="vertical" >
<ImageButton
android:id="@+id/abortingFlagButton"
android:layout_width="200dp"
android:layout_height="110dp"
android:contentDescription="@string/flag_ap"
android:scaleType="fitCenter"
android:src="@drawable/ap_flag" />
<TextView
android:id="@+id/abortingFlagButtonLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginTop="2dp"
android:text="@string/abort_starting_phase"
android:textAppearance="@style/TextAppearance.Welter.TitleLabel" />
<Button
android:id="@+id/resetTimeButton"
android:layout_width="200dp"
android:layout_height="50dp"
android:text="@string/reset_time" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
@@ -1,117 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical" >
<TextView
android:id="@+id/raceCountdown"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Welter.ExtraBigTitleLabel" />
<TextView
android:id="@+id/nextFlagCountdown"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
<ImageView
android:layout_width="500dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:paddingBottom="2dp"
android:scaleType="fitXY"
android:contentDescription="@string/empty"
android:src="@android:drawable/divider_horizontal_textfield" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="10dip"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:layout_marginTop="10dip"
android:baselineAligned="false"
android:orientation="horizontal" >
<RelativeLayout
android:id="@+id/InnerRelativeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.618"
android:gravity="fill_horizontal" >
<LinearLayout
android:id="@+id/classWithGroupFlag"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:gravity="center_horizontal"
android:orientation="vertical" >
</LinearLayout>
<com.sap.sailing.racecommittee.app.ui.views.VerticalTextView
android:id="@+id/flagsUpLable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginTop="20dp"
android:text="@string/flags_up"
android:textAppearance="@style/TextAppearance.Welter.VeryBigTitleLabel" />
<com.sap.sailing.racecommittee.app.ui.views.VerticalTextView
android:id="@+id/flagsDownLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="20dp"
android:text="@string/flags_down"
android:textAppearance="@style/TextAppearance.Welter.VeryBigTitleLabel" />
</RelativeLayout>
<TextView
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="#DADADA" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.99"
android:gravity="center_horizontal"
android:orientation="vertical" >
<ImageButton
android:id="@+id/apButton"
android:layout_width="200dp"
android:layout_height="110dp"
android:scaleType="fitCenter"
android:contentDescription="@string/flag_ap"
android:src="@drawable/ap_flag" />
<TextView
android:id="@+id/apButtonLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginTop="2dp"
android:text="@string/abort_starting_phase"
android:textAppearance="@style/TextAppearance.Welter.TitleLabel" />
<Button
android:id="@+id/resetTimeButton"
android:layout_width="200dp"
android:layout_height="50dp"
android:text="@string/reset_time" />
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical" >
<TextView
android:id="@+id/raceCountdown"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Welter.ExtraBigTitleLabel" />
<TextView
android:id="@+id/nextFlagCountdown"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
<ImageView
android:layout_width="500dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:paddingBottom="2dp"
android:scaleType="fitXY"
android:contentDescription="@string/empty"
android:src="@android:drawable/divider_horizontal_textfield" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="10dip"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:layout_marginTop="10dip"
android:baselineAligned="false"
android:orientation="horizontal" >
<RelativeLayout
android:id="@+id/InnerRelativeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.618"
android:gravity="fill_horizontal" >
<LinearLayout
android:id="@+id/classWithGroupFlag"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:gravity="center_horizontal"
android:orientation="vertical" >
</LinearLayout>
<com.sap.sailing.racecommittee.app.ui.views.VerticalTextView
android:id="@+id/flagsUpLable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginTop="20dp"
android:text="@string/flags_up"
android:textAppearance="@style/TextAppearance.Welter.VeryBigTitleLabel" />
<com.sap.sailing.racecommittee.app.ui.views.VerticalTextView
android:id="@+id/flagsDownLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="20dp"
android:text="@string/flags_down"
android:textAppearance="@style/TextAppearance.Welter.VeryBigTitleLabel" />
</RelativeLayout>
<TextView
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="#DADADA" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.99"
android:gravity="center_horizontal"
android:orientation="vertical" >
<ImageButton
android:id="@+id/abortingFlagButton"
android:layout_width="200dp"
android:layout_height="110dp"
android:scaleType="fitCenter"
android:contentDescription="@string/flag_ap"
android:src="@drawable/ap_flag" />
<TextView
android:id="@+id/abortingFlagButtonLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginTop="2dp"
android:text="@string/abort_starting_phase"
android:textAppearance="@style/TextAppearance.Welter.TitleLabel" />
<Button
android:id="@+id/resetTimeButton"
android:layout_width="200dp"
android:layout_height="50dp"
android:text="@string/reset_time" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
@@ -1,196 +1,196 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical" >
<TextView
android:id="@+id/raceCountdown"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Welter.ExtraBigTitleLabel" />
<TextView
android:id="@+id/nextFlagCountdown"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
<ImageView
android:layout_width="500dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:paddingBottom="2dp"
android:scaleType="fitXY"
android:contentDescription="@string/empty"
android:src="@android:drawable/divider_horizontal_textfield" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="10dip"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:layout_marginTop="10dip"
android:baselineAligned="false"
android:orientation="horizontal" >
<RelativeLayout
android:id="@+id/InnerRelativeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.618"
android:gravity="fill_horizontal" >
<ImageView
android:id="@+id/startModeFlag"
android:layout_width="200dp"
android:layout_height="130dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginRight="50dp"
android:contentDescription="@string/start_mode_flag"
android:src="@drawable/papa_flag_mini" />
<LinearLayout
android:id="@+id/classWithGroupFlag"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:gravity="center_horizontal"
android:orientation="vertical" >
<ImageView
android:id="@+id/classFlag"
android:layout_width="200dp"
android:layout_height="130dp"
android:src="@drawable/generic_class"
android:padding="10dp"
android:contentDescription="@string/class_flag"
android:background="@color/welter_offwhite" />
<ImageView
android:id="@+id/startTypeFlag"
android:layout_width="200dp"
android:layout_height="130dp"
android:src="@drawable/golf_flag"
android:contentDescription="@string/flag_golf"
android:visibility="gone" />
</LinearLayout>
<com.sap.sailing.racecommittee.app.utils.views.MyVerticalTextView
android:id="@+id/flagsUpLable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginTop="20dp"
android:text="@string/flags_up"
android:textAppearance="@style/TextAppearance.Welter.VeryBigTitleLabel" />
<com.sap.sailing.racecommittee.app.utils.views.MyVerticalTextView
android:id="@+id/flagsDownLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="20dp"
android:text="@string/flags_down"
android:textAppearance="@style/TextAppearance.Welter.VeryBigTitleLabel" />
</RelativeLayout>
<TextView
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="#DADADA" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.99"
android:gravity="center_horizontal"
android:orientation="vertical" >
<ImageButton
android:id="@+id/startModeButton"
android:layout_width="200dp"
android:layout_height="130dp"
android:scaleType="fitCenter"
android:contentDescription="@string/empty"
android:src="@drawable/startmode_flags" />
<TextView
android:id="@+id/startModeButtonLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginTop="2dp"
android:text="@string/choose_start_mode_flag"
android:textAppearance="@style/TextAppearance.Welter.TitleLabel" />
<TextView
android:id="@+id/pathfinderLabel"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="2dp"
android:text="@string/no_pathfinder_selected"
android:textAppearance="@style/TextAppearance.Welter.TitleLabel"/>
<Button
android:id="@+id/pathFinderButton"
android:visibility="gone"
android:layout_width="200dp"
android:layout_height="50dp"
android:layout_marginBottom="20dp"
android:text="@string/set_pathfinder" />
<TextView
android:id="@+id/lineOpeningTimeLabel"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="2dp"
android:text="@string/no_line_opening_time_selected"
android:textAppearance="@style/TextAppearance.Welter.TitleLabel"/>
<Button
android:id="@+id/lineOpeningTimeButton"
android:visibility="gone"
android:layout_width="200dp"
android:layout_height="50dp"
android:layout_marginBottom="20dp"
android:text="@string/set_line_opening_time" />
<ImageButton
android:id="@+id/apButton"
android:layout_width="200dp"
android:layout_height="110dp"
android:scaleType="fitCenter"
android:contentDescription="@string/flag_ap"
android:src="@drawable/ap_flag" />
<TextView
android:id="@+id/apButtonLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginTop="2dp"
android:text="@string/abort_starting_phase"
android:textAppearance="@style/TextAppearance.Welter.TitleLabel" />
<Button
android:id="@+id/resetTimeButton"
android:layout_width="200dp"
android:layout_height="50dp"
android:text="@string/reset_time" />
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical" >
<TextView
android:id="@+id/raceCountdown"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Welter.ExtraBigTitleLabel" />
<TextView
android:id="@+id/nextFlagCountdown"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.Welter.BigTitleLabel" />
<ImageView
android:layout_width="500dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:paddingBottom="2dp"
android:scaleType="fitXY"
android:contentDescription="@string/empty"
android:src="@android:drawable/divider_horizontal_textfield" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="10dip"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:layout_marginTop="10dip"
android:baselineAligned="false"
android:orientation="horizontal" >
<RelativeLayout
android:id="@+id/InnerRelativeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.618"
android:gravity="fill_horizontal" >
<ImageView
android:id="@+id/startModeFlag"
android:layout_width="200dp"
android:layout_height="130dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginRight="50dp"
android:contentDescription="@string/start_mode_flag"
android:src="@drawable/papa_flag_mini" />
<LinearLayout
android:id="@+id/classWithGroupFlag"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:gravity="center_horizontal"
android:orientation="vertical" >
<ImageView
android:id="@+id/classFlag"
android:layout_width="200dp"
android:layout_height="130dp"
android:src="@drawable/generic_class"
android:padding="10dp"
android:contentDescription="@string/class_flag"
android:background="@color/welter_offwhite" />
<ImageView
android:id="@+id/startTypeFlag"
android:layout_width="200dp"
android:layout_height="130dp"
android:src="@drawable/golf_flag"
android:contentDescription="@string/flag_golf"
android:visibility="gone" />
</LinearLayout>
<com.sap.sailing.racecommittee.app.utils.views.MyVerticalTextView
android:id="@+id/flagsUpLable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginTop="20dp"
android:text="@string/flags_up"
android:textAppearance="@style/TextAppearance.Welter.VeryBigTitleLabel" />
<com.sap.sailing.racecommittee.app.utils.views.MyVerticalTextView
android:id="@+id/flagsDownLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="20dp"
android:text="@string/flags_down"
android:textAppearance="@style/TextAppearance.Welter.VeryBigTitleLabel" />
</RelativeLayout>
<TextView
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="#DADADA" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.99"
android:gravity="center_horizontal"
android:orientation="vertical" >
<ImageButton
android:id="@+id/startModeButton"
android:layout_width="200dp"
android:layout_height="130dp"
android:scaleType="fitCenter"
android:contentDescription="@string/empty"
android:src="@drawable/startmode_flags" />
<TextView
android:id="@+id/startModeButtonLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginTop="2dp"
android:text="@string/choose_start_mode_flag"
android:textAppearance="@style/TextAppearance.Welter.TitleLabel" />
<TextView
android:id="@+id/pathfinderLabel"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="2dp"
android:text="@string/no_pathfinder_selected"
android:textAppearance="@style/TextAppearance.Welter.TitleLabel"/>
<Button
android:id="@+id/pathFinderButton"
android:visibility="gone"
android:layout_width="200dp"
android:layout_height="50dp"
android:layout_marginBottom="20dp"
android:text="@string/set_pathfinder" />
<TextView
android:id="@+id/lineOpeningTimeLabel"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="2dp"
android:text="@string/no_line_opening_time_selected"
android:textAppearance="@style/TextAppearance.Welter.TitleLabel"/>
<Button
android:id="@+id/lineOpeningTimeButton"
android:visibility="gone"
android:layout_width="200dp"
android:layout_height="50dp"
android:layout_marginBottom="20dp"
android:text="@string/set_line_opening_time" />
<ImageButton
android:id="@+id/abortingFlagButton"
android:layout_width="200dp"
android:layout_height="110dp"
android:scaleType="fitCenter"
android:contentDescription="@string/flag_ap"
android:src="@drawable/ap_flag" />
<TextView
android:id="@+id/abortingFlagButtonLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginTop="2dp"
android:text="@string/abort_starting_phase"
android:textAppearance="@style/TextAppearance.Welter.TitleLabel" />
<Button
android:id="@+id/resetTimeButton"
android:layout_width="200dp"
android:layout_height="50dp"
android:text="@string/reset_time" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
@@ -1,17 +1,23 @@
package com.sap.sailing.racecommittee.app.ui.fragments.raceinfo;
import android.app.Activity;
import android.app.FragmentManager;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;
import com.sap.sailing.domain.common.TimePoint;
import com.sap.sailing.domain.common.racelog.Flags;
import com.sap.sailing.racecommittee.app.AppConstants;
import com.sap.sailing.racecommittee.app.R;
import com.sap.sailing.racecommittee.app.ui.fragments.RaceFragment;
import com.sap.sailing.racecommittee.app.ui.fragments.dialogs.AbortModeSelectionDialog;
import com.sap.sailing.racecommittee.app.ui.fragments.dialogs.RaceDialogFragment;
import com.sap.sailing.racecommittee.app.utils.TimeUtils;
public class StartphaseRaceFragment extends RaceFragment {
@@ -19,6 +25,7 @@ public class StartphaseRaceFragment extends RaceFragment {
private RaceInfoListener infoListener;
private TextView raceCountdown;
private ImageButton abortingFlagButton;
@Override
public void onAttach(Activity activity) {
@@ -35,8 +42,7 @@ public class StartphaseRaceFragment extends RaceFragment {
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.race_startphase_gen_view, container, false);
}
@@ -51,6 +57,15 @@ public class StartphaseRaceFragment extends RaceFragment {
}
});
raceCountdown = (TextView) getView().findViewById(R.id.raceCountdown);
abortingFlagButton = (ImageButton) getView().findViewById(R.id.abortingFlagButton);
abortingFlagButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
showAPModeDialog();
}
});
}
public void notifyTick() {
@@ -70,5 +85,17 @@ public class StartphaseRaceFragment extends RaceFragment {
getString(R.string.race_startphase_countdown_start),
TimeUtils.prettyString(millisecondsTillStart), getRace().getName()));
}
protected void showAPModeDialog() {
FragmentManager fragmentManager = getFragmentManager();
RaceDialogFragment fragment = new AbortModeSelectionDialog();
Bundle args = getParameterBundle();
args.putString(AppConstants.FLAG_KEY, Flags.AP.name());
fragment.setArguments(args);
fragment.show(fragmentManager, "dialogAPMode");
}
}