mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-19 04:05:36 +00:00
competitor list while finishing phase inclusive extended meta data
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
tools:text="https://dev.sapsailing.com"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<com.sap.sailing.racecommittee.app.ui.views.FloatLabelLayout
|
||||
<com.sap.sailing.racecommittee.app.ui.layouts.FloatLabelLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:floatLabelPaddingLeft="@dimen/float_label_padding"
|
||||
@@ -59,9 +59,9 @@
|
||||
android:textAppearance="?attr/textSmall"
|
||||
android:textColor="@color/constant_black"
|
||||
android:textColorHint="@color/dialog_color_text"/>
|
||||
</com.sap.sailing.racecommittee.app.ui.views.FloatLabelLayout>
|
||||
</com.sap.sailing.racecommittee.app.ui.layouts.FloatLabelLayout>
|
||||
|
||||
<com.sap.sailing.racecommittee.app.ui.views.FloatLabelLayout
|
||||
<com.sap.sailing.racecommittee.app.ui.layouts.FloatLabelLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:floatLabelPaddingLeft="@dimen/float_label_padding"
|
||||
@@ -76,7 +76,7 @@
|
||||
android:textAppearance="?attr/textSmall"
|
||||
android:textColor="@color/constant_black"
|
||||
android:textColorHint="@color/dialog_color_text"/>
|
||||
</com.sap.sailing.racecommittee.app.ui.views.FloatLabelLayout>
|
||||
</com.sap.sailing.racecommittee.app.ui.layouts.FloatLabelLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/login_request"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/side_padding">
|
||||
|
||||
<com.sap.sailing.racecommittee.app.ui.views.FloatLabelLayout
|
||||
<com.sap.sailing.racecommittee.app.ui.layouts.FloatLabelLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/side_padding"
|
||||
@@ -24,9 +24,9 @@
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/dialog_color_text"
|
||||
tools:text="@string/preference_server_url_default"/>
|
||||
</com.sap.sailing.racecommittee.app.ui.views.FloatLabelLayout>
|
||||
</com.sap.sailing.racecommittee.app.ui.layouts.FloatLabelLayout>
|
||||
|
||||
<com.sap.sailing.racecommittee.app.ui.views.FloatLabelLayout
|
||||
<com.sap.sailing.racecommittee.app.ui.layouts.FloatLabelLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/side_padding"
|
||||
@@ -45,5 +45,5 @@
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/dialog_color_text"
|
||||
tools:text="N10"/>
|
||||
</com.sap.sailing.racecommittee.app.ui.views.FloatLabelLayout>
|
||||
</com.sap.sailing.racecommittee.app.ui.layouts.FloatLabelLayout>
|
||||
</LinearLayout>
|
||||
-134
@@ -1,134 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingRight="24dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/competitor_position_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@string/position"
|
||||
android:textColor="@color/dialog_color_text" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/competitor_position"
|
||||
android:layout_width="@dimen/competitor_edit_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/spinner_background_light"
|
||||
android:spinnerMode="dropdown" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/competitor_penalty_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@string/penalty"
|
||||
android:textColor="@color/dialog_color_text" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/competitor_penalty"
|
||||
android:layout_width="@dimen/competitor_edit_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginBottom="@dimen/side_padding"
|
||||
android:layout_marginTop="@dimen/side_padding"
|
||||
android:background="@drawable/spinner_background_light"
|
||||
android:spinnerMode="dropdown" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/competitor_score_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@string/score"
|
||||
android:textColor="@color/dialog_color_text" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/competitor_score"
|
||||
android:layout_width="@dimen/competitor_edit_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:inputType="numberDecimal" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/competitor_finish_time_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@string/finishing_time"
|
||||
android:textColor="@color/dialog_color_text" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="@dimen/competitor_edit_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<NumberPicker
|
||||
android:id="@+id/competitor_finish_time_hours"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<NumberPicker
|
||||
android:id="@+id/competitor_finish_time_minutes"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<NumberPicker
|
||||
android:id="@+id/competitor_finish_time_seconds"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/competitor_comment_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@string/comment"
|
||||
android:textColor="@color/dialog_color_text" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/competitor_comment"
|
||||
android:layout_width="@dimen/competitor_edit_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text"
|
||||
android:layout_alignParentRight="true" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
+163
@@ -0,0 +1,163 @@
|
||||
<?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="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingRight="24dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/competitor_position_label"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/position"
|
||||
android:textColor="@color/dialog_color_text"/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/competitor_position"
|
||||
android:layout_width="@dimen/competitor_edit_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/spinner_background_light"
|
||||
android:spinnerMode="dropdown"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/competitor_penalty_label"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/penalty"
|
||||
android:textColor="@color/dialog_color_text"/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/competitor_penalty"
|
||||
android:layout_width="@dimen/competitor_edit_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/side_padding"
|
||||
android:layout_marginTop="@dimen/side_padding"
|
||||
android:background="@drawable/spinner_background_light"
|
||||
android:spinnerMode="dropdown"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/competitor_score_label"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/score"
|
||||
android:textColor="@color/dialog_color_text"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/competitor_score"
|
||||
android:layout_width="@dimen/competitor_edit_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberDecimal"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/competitor_finish_date_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/finishing_date"
|
||||
android:textColor="@color/dialog_color_text"/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/competitor_finish_date"
|
||||
android:layout_width="@dimen/competitor_edit_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/side_padding"
|
||||
android:layout_marginTop="@dimen/side_padding"
|
||||
android:background="@drawable/spinner_background_light"
|
||||
android:spinnerMode="dropdown"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/competitor_finish_time_label"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:maxLines="2"
|
||||
android:text="@string/finishing_time"
|
||||
android:textColor="@color/dialog_color_text"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="@dimen/competitor_edit_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<NumberPicker
|
||||
android:id="@+id/competitor_finish_time_hours"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<NumberPicker
|
||||
android:id="@+id/competitor_finish_time_minutes"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<NumberPicker
|
||||
android:id="@+id/competitor_finish_time_seconds"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/competitor_comment_label"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/comment"
|
||||
android:textColor="@color/dialog_color_text"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/competitor_comment"
|
||||
android:layout_width="@dimen/competitor_edit_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
+167
@@ -0,0 +1,167 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingRight="24dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/float_label_padding">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/competitor_position_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="@string/position"
|
||||
android:textColor="@color/dialog_color_text"/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/competitor_position"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/spinner_background_light"
|
||||
android:spinnerMode="dropdown"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/float_label_padding"
|
||||
android:paddingTop="@dimen/side_padding">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/competitor_penalty_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="@string/penalty"
|
||||
android:textColor="@color/dialog_color_text"/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/competitor_penalty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/spinner_background_light"
|
||||
android:spinnerMode="dropdown"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/side_padding">
|
||||
|
||||
<com.sap.sailing.racecommittee.app.ui.layouts.FloatLabelLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:floatLabelPaddingLeft="@dimen/float_label_padding"
|
||||
app:floatLabelTextAppearance="@style/AppTheme.AlertDialog.FloatLabel">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/competitor_score"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/score"
|
||||
android:inputType="numberDecimal"
|
||||
android:textColorHint="@color/dialog_color_text"/>
|
||||
</com.sap.sailing.racecommittee.app.ui.layouts.FloatLabelLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/competitor_finish_date_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/float_label_padding"
|
||||
android:paddingTop="@dimen/side_padding">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="@string/finishing_date"
|
||||
android:textColor="@color/dialog_color_text"/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/competitor_finish_date"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/spinner_background_light"
|
||||
android:spinnerMode="dropdown"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/float_label_padding"
|
||||
android:paddingTop="@dimen/side_padding">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/competitor_finish_time_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="2"
|
||||
android:text="@string/finishing_time"
|
||||
android:textColor="@color/dialog_color_text"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="@dimen/competitor_edit_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<NumberPicker
|
||||
android:id="@+id/competitor_finish_time_hours"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/side_padding"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<NumberPicker
|
||||
android:id="@+id/competitor_finish_time_minutes"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/side_padding"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginTop="@dimen/side_padding"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<NumberPicker
|
||||
android:id="@+id/competitor_finish_time_seconds"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/side_padding"
|
||||
android:layout_weight="1"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.sap.sailing.racecommittee.app.ui.layouts.FloatLabelLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:floatLabelPaddingLeft="@dimen/float_label_padding"
|
||||
app:floatLabelTextAppearance="@style/AppTheme.AlertDialog.FloatLabel">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/competitor_comment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/comment"
|
||||
android:inputType="text"
|
||||
android:textColorHint="@color/dialog_color_text"/>
|
||||
</com.sap.sailing.racecommittee.app.ui.layouts.FloatLabelLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -90,22 +90,35 @@
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<FrameLayout
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@id/panel_switcher">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/page_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingBottom="@dimen/side_padding"
|
||||
android:paddingTop="@dimen/side_padding"
|
||||
android:text="@string/tracking_list_01"
|
||||
android:textAppearance="?textXSmall"
|
||||
android:visibility="gone" />
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/list_positioning_chosen"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/page_title"
|
||||
android:visibility="visible" />
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/list_positioning_all"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/page_title"
|
||||
android:visibility="gone" />
|
||||
</FrameLayout>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
@@ -472,6 +472,7 @@
|
||||
<string name="penalty">Strafe</string>
|
||||
<string name="score">Punkte</string>
|
||||
<string name="finishing_time">Zielzeit</string>
|
||||
<string name="finishing_date">Zieldatum</string>
|
||||
<string name="comment">Kommentar</string>
|
||||
<string name="get_started_url">https://www.sapsailing.com/gwt/Home.html?locale=de#SolutionsPlace:navigationTab=RaceCommitteeApp</string>
|
||||
<string name="user_unauthorized">Request fehlgeschlagen. User ist nicht autorisiert.</string>
|
||||
|
||||
@@ -75,7 +75,8 @@
|
||||
<dimen name="flags">64dp</dimen>
|
||||
|
||||
<dimen name="competitor_dialog_width">420dp</dimen>
|
||||
<dimen name="competitor_edit_width">220dp</dimen>
|
||||
<dimen name="competitor_edit_width">200dp</dimen>
|
||||
<dimen name="dialog_top_padding">24dp</dimen>
|
||||
|
||||
<!-- custom dimens (float, integer) -->
|
||||
<item name="picker_scale" format="float" type="integer">1</item>
|
||||
|
||||
@@ -515,5 +515,7 @@
|
||||
<string name="preference_heading_with_declination_subtracted_summary_is_enabled">Magnetic</string>
|
||||
<string name="preference_heading_with_declination_subtracted_summary_is_disabled">North-based</string>
|
||||
<string name="preference_heading_with_declination_subtracted_enabled">Heading</string>
|
||||
<string name="finishing_date">Finishing Date</string>
|
||||
<string name="date_short">yyyy-MM-dd</string>
|
||||
|
||||
</resources>
|
||||
@@ -9,6 +9,10 @@
|
||||
<item name="android:windowTitleStyle">@style/AlertDialogHeader</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.AlertDialog.FloatLabel">
|
||||
<item name="android:textColor">@color/dialog_color_text</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.Dialog" parent="AppTheme.AlertDialog">
|
||||
<item name="android:windowNoTitle">false</item>
|
||||
</style>
|
||||
@@ -21,7 +25,7 @@
|
||||
<style name="ToolBarStyle" parent="@style/ThemeOverlay.AppCompat.Dark">
|
||||
<item name="android:textColorSecondary">@color/constant_white</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="ToolBarRacingStyle" parent="ToolBarStyle">
|
||||
<item name="drawerArrowStyle">@style/DrawerButton</item>
|
||||
<item name="titleTextStyle">@style/RacingToolBarTitle</item>
|
||||
|
||||
+4
-3
@@ -1,5 +1,8 @@
|
||||
package com.sap.sailing.racecommittee.app.ui.adapters;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.DataSetObserver;
|
||||
import android.support.annotation.NonNull;
|
||||
@@ -12,9 +15,6 @@ import android.widget.TextView;
|
||||
import com.sap.sailing.android.shared.util.ViewHelper;
|
||||
import com.sap.sailing.racecommittee.app.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
||||
public class StringArraySpinnerAdapter implements SpinnerAdapter {
|
||||
|
||||
private ArrayList<String> mArray;
|
||||
@@ -91,6 +91,7 @@ public class StringArraySpinnerAdapter implements SpinnerAdapter {
|
||||
TextView mainText = ViewHelper.get(layout, android.R.id.text1);
|
||||
if (mainText != null) {
|
||||
mainText.setText(mArray.get(position));
|
||||
mainText.setTextColor(context.getResources().getColor(R.color.constant_black));
|
||||
}
|
||||
|
||||
return layout;
|
||||
|
||||
+35
-13
@@ -1,11 +1,19 @@
|
||||
package com.sap.sailing.racecommittee.app.ui.fragments.raceinfo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Loader;
|
||||
import android.graphics.drawable.NinePatchDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -13,6 +21,7 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.h6ah4i.android.widget.advrecyclerview.animator.SwipeDismissItemAnimator;
|
||||
@@ -20,6 +29,7 @@ import com.h6ah4i.android.widget.advrecyclerview.draggable.RecyclerViewDragDropM
|
||||
import com.h6ah4i.android.widget.advrecyclerview.swipeable.RecyclerViewSwipeManager;
|
||||
import com.h6ah4i.android.widget.advrecyclerview.touchguard.RecyclerViewTouchActionGuardManager;
|
||||
import com.h6ah4i.android.widget.advrecyclerview.utils.WrapperAdapterUtils;
|
||||
import com.sap.sailing.android.shared.util.AppUtils;
|
||||
import com.sap.sailing.android.shared.util.ViewHelper;
|
||||
import com.sap.sailing.domain.abstractlog.race.CompetitorResult;
|
||||
import com.sap.sailing.domain.abstractlog.race.CompetitorResults;
|
||||
@@ -44,11 +54,6 @@ import com.sap.sailing.racecommittee.app.ui.layouts.HeaderLayout;
|
||||
import com.sap.sse.common.Util;
|
||||
import com.sap.sse.common.impl.MillisecondsTimePoint;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class TrackingListFragment extends BaseFragment
|
||||
implements CompetitorAdapter.CompetitorClick, FinishListAdapter.FinishEvents, View.OnClickListener {
|
||||
|
||||
@@ -64,6 +69,7 @@ public class TrackingListFragment extends BaseFragment
|
||||
private ArrayList<Competitor> mCompetitorData;
|
||||
private int mId = 0;
|
||||
private HeaderLayout mHeader;
|
||||
private TextView mPageTitle;
|
||||
|
||||
public TrackingListFragment() {
|
||||
mCompetitorData = new ArrayList<>();
|
||||
@@ -105,9 +111,8 @@ public class TrackingListFragment extends BaseFragment
|
||||
btnNext.setOnClickListener(this);
|
||||
}
|
||||
|
||||
HeaderLayout header = ViewHelper.get(layout, R.id.header);
|
||||
if (header != null) {
|
||||
header.setHeaderOnClickListener(new View.OnClickListener() {
|
||||
if (mHeader != null) {
|
||||
mHeader.setHeaderOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
sendIntent(AppConstants.INTENT_ACTION_CLEAR_TOGGLE);
|
||||
@@ -117,8 +122,13 @@ public class TrackingListFragment extends BaseFragment
|
||||
}
|
||||
|
||||
if (getArguments().getInt(START_MODE, 0) != 0) {
|
||||
if (header != null) {
|
||||
header.setVisibility(View.GONE);
|
||||
mPageTitle = ViewHelper.get(layout, R.id.page_title);
|
||||
if (mPageTitle != null) {
|
||||
mPageTitle.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
if (mHeader != null) {
|
||||
mHeader.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
View buttonBar = ViewHelper.get(layout, R.id.bottom_bar);
|
||||
@@ -380,9 +390,16 @@ public class TrackingListFragment extends BaseFragment
|
||||
|
||||
@Override
|
||||
public void onEditItem(final CompetitorResultWithIdImpl item, int position) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(), R.style.AppTheme_AlertDialog);
|
||||
Context context = getActivity();
|
||||
if (context instanceof AppCompatActivity) {
|
||||
ActionBar actionBar = ((AppCompatActivity) context).getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
context = actionBar.getThemedContext();
|
||||
}
|
||||
}
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context, R.style.AppTheme_AlertDialog);
|
||||
builder.setTitle(item.getCompetitorDisplayName());
|
||||
final CompetitorEditLayout layout = new CompetitorEditLayout(getActivity(), item, position, mFinishedAdapter.getItemCount());
|
||||
final CompetitorEditLayout layout = new CompetitorEditLayout(getActivity(), getRace().getState().getFinishingTime(), item, position, mFinishedAdapter.getItemCount());
|
||||
builder.setView(layout);
|
||||
builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
@@ -409,7 +426,9 @@ public class TrackingListFragment extends BaseFragment
|
||||
builder.setNegativeButton(android.R.string.cancel, null);
|
||||
AlertDialog dialog = builder.create();
|
||||
dialog.show();
|
||||
dialog.getWindow().setLayout(getResources().getDimensionPixelSize(R.dimen.competitor_dialog_width), ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
if (AppUtils.with(getActivity()).isTablet()) {
|
||||
dialog.getWindow().setLayout(getResources().getDimensionPixelSize(R.dimen.competitor_dialog_width), ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
}
|
||||
}
|
||||
|
||||
private CharSequence[] getAllMaxPointsReasons() {
|
||||
@@ -476,6 +495,9 @@ public class TrackingListFragment extends BaseFragment
|
||||
default:
|
||||
mHeader.setHeaderText(R.string.tracking_list_02);
|
||||
}
|
||||
if (mPageTitle != null) {
|
||||
mPageTitle.setText(mHeader.getHeaderText());
|
||||
}
|
||||
}
|
||||
mConfirm.setEnabled(mActivePage != 0 || mDots.size() == 0);
|
||||
}
|
||||
|
||||
+71
-15
@@ -1,16 +1,26 @@
|
||||
package com.sap.sailing.racecommittee.app.ui.layouts;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.EditText;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.NumberPicker;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.Spinner;
|
||||
|
||||
import com.sap.sailing.android.shared.util.AppUtils;
|
||||
import com.sap.sailing.android.shared.util.ViewHelper;
|
||||
import com.sap.sailing.domain.abstractlog.race.CompetitorResult;
|
||||
import com.sap.sailing.domain.abstractlog.race.impl.CompetitorResultImpl;
|
||||
@@ -19,16 +29,12 @@ import com.sap.sailing.racecommittee.app.R;
|
||||
import com.sap.sailing.racecommittee.app.domain.impl.CompetitorResultWithIdImpl;
|
||||
import com.sap.sailing.racecommittee.app.ui.adapters.StringArraySpinnerAdapter;
|
||||
import com.sap.sailing.racecommittee.app.utils.ThemeHelper;
|
||||
import com.sap.sailing.racecommittee.app.utils.TimeUtils;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.common.impl.MillisecondsTimePoint;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public class CompetitorEditLayout extends FrameLayout {
|
||||
@SuppressLint("ViewConstructor")
|
||||
public class CompetitorEditLayout extends ScrollView {
|
||||
|
||||
private CompetitorResultWithIdImpl mCompetitor;
|
||||
private GregorianCalendar mCalendar;
|
||||
@@ -36,18 +42,28 @@ public class CompetitorEditLayout extends FrameLayout {
|
||||
private Spinner mPosition;
|
||||
private Spinner mPenalty;
|
||||
private EditText mScore;
|
||||
private Spinner mDate;
|
||||
private NumberPicker mHours;
|
||||
private NumberPicker mMinutes;
|
||||
private NumberPicker mSeconds;
|
||||
private EditText mComment;
|
||||
|
||||
public CompetitorEditLayout(Context context, CompetitorResultWithIdImpl competitor, int currentPos, int maxPos) {
|
||||
public CompetitorEditLayout(Context context, TimePoint startTime, CompetitorResultWithIdImpl competitor, int currentPos, int maxPos) {
|
||||
super(context);
|
||||
init(competitor, currentPos, maxPos);
|
||||
init(startTime, competitor, currentPos, maxPos);
|
||||
}
|
||||
|
||||
private void init(CompetitorResultWithIdImpl competitor, int currentPos, int maxPos) {
|
||||
View layout = LayoutInflater.from(getContext()).inflate(R.layout.race_tracking_list_competitor_edit, this, false);
|
||||
private void init(TimePoint startTime, CompetitorResultWithIdImpl competitor, int currentPos, int maxPos) {
|
||||
int layoutId;
|
||||
if (AppUtils.with(getContext()).isPhone() && AppUtils.with(getContext()).isHDPI()) {
|
||||
layoutId = R.layout.race_tracking_list_competitor_edit_small;
|
||||
} else {
|
||||
layoutId = R.layout.race_tracking_list_competitor_edit_normal;
|
||||
}
|
||||
View layout = LayoutInflater.from(getContext()).inflate(layoutId, this, false);
|
||||
|
||||
setFillViewport(true);
|
||||
setPadding(0, getResources().getDimensionPixelSize(R.dimen.dialog_top_padding), 0, 0);
|
||||
|
||||
mCompetitor = competitor;
|
||||
|
||||
@@ -90,6 +106,18 @@ public class CompetitorEditLayout extends FrameLayout {
|
||||
mPenalty.setSelection(penaltyAdapter.getPosition(mCompetitor.getMaxPointsReason().toString()));
|
||||
}
|
||||
|
||||
mDate = ViewHelper.get(layout, R.id.competitor_finish_date);
|
||||
if (mDate != null) {
|
||||
String[] dates = getDates(startTime);
|
||||
StringArraySpinnerAdapter dateAdapter = new StringArraySpinnerAdapter(dates);
|
||||
mDate.setAdapter(dateAdapter);
|
||||
mDate.setOnItemSelectedListener(new SpinnerSelectedListener(dateAdapter));
|
||||
mDate.setSelection(findDate(dates, competitor.getFinishingTime()));
|
||||
if (dates.length == 1) {
|
||||
mDate.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
mScore = ViewHelper.get(layout, R.id.competitor_score);
|
||||
if (mScore != null && mCompetitor.getScore() != null) {
|
||||
mScore.setText(String.format(Locale.US, "%f", mCompetitor.getScore()));
|
||||
@@ -103,6 +131,26 @@ public class CompetitorEditLayout extends FrameLayout {
|
||||
addView(layout);
|
||||
}
|
||||
|
||||
private String[] getDates(@NonNull TimePoint startTime) {
|
||||
TimePoint now = MillisecondsTimePoint.now();
|
||||
ArrayList<String> dates = TimeUtils.getDates(getContext(), startTime, now);
|
||||
return dates.toArray(new String[dates.size()]);
|
||||
}
|
||||
|
||||
private int findDate(@NonNull String[] dates, @Nullable TimePoint finishingTime) {
|
||||
int pos = 0;
|
||||
if (finishingTime != null) {
|
||||
SimpleDateFormat simpleFormat = new SimpleDateFormat(getContext().getString(R.string.date_short), Locale.US);
|
||||
String finishDate = simpleFormat.format(finishingTime.asDate());
|
||||
for (int i = 0; i < dates.length; i++) {
|
||||
if (finishDate.equals(dates[i])) {
|
||||
pos = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
private String[] getAllMaxPointsReasons() {
|
||||
List<String> result = new ArrayList<>();
|
||||
for (MaxPointsReason reason : MaxPointsReason.values()) {
|
||||
@@ -132,6 +180,12 @@ public class CompetitorEditLayout extends FrameLayout {
|
||||
if (mScore != null && !TextUtils.isEmpty(mScore.getText())) {
|
||||
score = Double.valueOf(mScore.getText().toString());
|
||||
}
|
||||
if (mDate != null) {
|
||||
String[] date = ((String) mDate.getSelectedItem()).split("-");
|
||||
mCalendar.set(Calendar.YEAR, Integer.parseInt(date[0]));
|
||||
mCalendar.set(Calendar.MONTH, Integer.parseInt(date[1]) - 1);
|
||||
mCalendar.set(Calendar.DAY_OF_MONTH, Integer.parseInt(date[2]));
|
||||
}
|
||||
if (mHours != null) {
|
||||
mCalendar.set(Calendar.HOUR_OF_DAY, mHours.getValue());
|
||||
}
|
||||
@@ -146,7 +200,8 @@ public class CompetitorEditLayout extends FrameLayout {
|
||||
if (mComment != null) {
|
||||
comment = mComment.getText().toString();
|
||||
}
|
||||
CompetitorResult result = new CompetitorResultImpl(mCompetitor.getCompetitorId(), mCompetitor.getCompetitorDisplayName(), oneBaseRank, maxPointsReason, score, finishingTime, comment);
|
||||
CompetitorResult result = new CompetitorResultImpl(mCompetitor.getCompetitorId(), mCompetitor
|
||||
.getCompetitorDisplayName(), oneBaseRank, maxPointsReason, score, finishingTime, comment);
|
||||
return new CompetitorResultWithIdImpl(mCompetitor.getId(), result);
|
||||
}
|
||||
|
||||
@@ -160,8 +215,9 @@ public class CompetitorEditLayout extends FrameLayout {
|
||||
return String.format(Locale.US, "%02d", value);
|
||||
}
|
||||
});
|
||||
ThemeHelper.setPickerColor(getContext(), picker, getContext().getResources().getColor(R.color.dialog_color_text),
|
||||
getContext().getResources().getColor(R.color.dialog_color_button));
|
||||
ThemeHelper
|
||||
.setPickerColor(getContext(), picker, getContext().getResources().getColor(R.color.dialog_color_text), getContext().getResources()
|
||||
.getColor(R.color.dialog_color_button));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+17
-4
@@ -1,7 +1,9 @@
|
||||
package com.sap.sailing.racecommittee.app.utils;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Locale;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import android.content.Context;
|
||||
@@ -22,10 +24,6 @@ public class TimeUtils {
|
||||
// only static methods
|
||||
}
|
||||
|
||||
public static long timeUntil(TimePoint targetTime) {
|
||||
return targetTime.asMillis() - MillisecondsTimePoint.now().asMillis();
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats your time to 'kk:mm:ss'.
|
||||
*
|
||||
@@ -201,6 +199,21 @@ public class TimeUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static ArrayList<String> getDates(Context context, TimePoint start, TimePoint end) {
|
||||
ArrayList<String> dates = new ArrayList<>();
|
||||
SimpleDateFormat simpleFormat = new SimpleDateFormat(context.getString(R.string.date_short), Locale.US);
|
||||
Calendar startDate = Calendar.getInstance();
|
||||
Calendar endDate = (Calendar) startDate.clone();
|
||||
startDate.setTime(start.asDate());
|
||||
endDate.setTime(end.asDate());
|
||||
int dayDiff = daysBetween(endDate, startDate);
|
||||
for (int i = 0; i <= dayDiff; i++) {
|
||||
dates.add(simpleFormat.format(startDate.getTime()));
|
||||
startDate.add(Calendar.DAY_OF_MONTH, 1);
|
||||
}
|
||||
return dates;
|
||||
}
|
||||
|
||||
public static TimePoint getTime(TimePicker timePicker) {
|
||||
Calendar time = Calendar.getInstance();
|
||||
time.set(Calendar.HOUR_OF_DAY, timePicker.getCurrentHour());
|
||||
|
||||
Reference in New Issue
Block a user