new images for flag down

This commit is contained in:
Peter Siegmund
2016-02-16 16:38:42 +01:00
parent b028513fbf
commit 192f0b89f4
70 changed files with 358 additions and 65 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1004 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 934 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 934 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1004 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

@@ -6,7 +6,7 @@
android:top="0dp">
<bitmap
android:gravity="center"
android:src="@drawable/flag_first_blue_32dp"/>
android:src="@drawable/flag_blue_first_32dp"/>
</item>
</layer-list>
@@ -6,7 +6,7 @@
android:top="0dp">
<bitmap
android:gravity="center"
android:src="@drawable/flag_first_blue_32dp"/>
android:src="@drawable/flag_blue_first_32dp"/>
</item>
<item
@@ -6,7 +6,7 @@
android:top="0dp">
<bitmap
android:gravity="center"
android:src="@drawable/flag_first_blue_64dp"/>
android:src="@drawable/flag_blue_first_48dp"/>
</item>
</layer-list>
@@ -6,7 +6,7 @@
android:top="0dp">
<bitmap
android:gravity="center"
android:src="@drawable/flag_first_blue_48dp"/>
android:src="@drawable/flag_blue_first_48dp"/>
</item>
<item
@@ -6,7 +6,7 @@
android:top="0dp">
<bitmap
android:gravity="center"
android:src="@drawable/flag_first_blue_48dp"/>
android:src="@drawable/flag_blue_first_64dp"/>
</item>
</layer-list>
@@ -6,7 +6,7 @@
android:top="0dp">
<bitmap
android:gravity="center"
android:src="@drawable/flag_first_blue_64dp"/>
android:src="@drawable/flag_blue_first_64dp"/>
</item>
<item
@@ -6,7 +6,7 @@
android:top="0dp">
<bitmap
android:gravity="center"
android:src="@drawable/flag_first_blue_96dp"/>
android:src="@drawable/flag_blue_first_96dp"/>
</item>
</layer-list>
@@ -6,7 +6,7 @@
android:top="0dp">
<bitmap
android:gravity="center"
android:src="@drawable/flag_first_blue_96dp"/>
android:src="@drawable/flag_blue_first_96dp"/>
</item>
<item
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:left="0dp"
android:top="0dp">
<bitmap
android:gravity="center"
android:src="@drawable/flag_blue_last_32dp"/>
</item>
</layer-list>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:left="0dp"
android:top="0dp">
<bitmap
android:gravity="center"
android:src="@drawable/flag_blue_last_32dp"/>
</item>
<item
android:left="0dp"
android:top="0dp">
<bitmap
android:gravity="center"
android:src="@drawable/flag_shape_01_outline_32dp"/>
</item>
</layer-list>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:left="0dp"
android:top="0dp">
<bitmap
android:gravity="center"
android:src="@drawable/flag_blue_last_48dp"/>
</item>
</layer-list>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:left="0dp"
android:top="0dp">
<bitmap
android:gravity="center"
android:src="@drawable/flag_blue_last_48dp"/>
</item>
<item
android:left="0dp"
android:top="0dp">
<bitmap
android:gravity="center"
android:src="@drawable/flag_shape_01_outline_48dp"/>
</item>
</layer-list>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:left="0dp"
android:top="0dp">
<bitmap
android:gravity="center"
android:src="@drawable/flag_blue_last_64dp"/>
</item>
</layer-list>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:left="0dp"
android:top="0dp">
<bitmap
android:gravity="center"
android:src="@drawable/flag_blue_last_64dp"/>
</item>
<item
android:left="0dp"
android:top="0dp">
<bitmap
android:gravity="center"
android:src="@drawable/flag_shape_01_outline_64dp"/>
</item>
</layer-list>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:left="0dp"
android:top="0dp">
<bitmap
android:gravity="center"
android:src="@drawable/flag_blue_last_96dp"/>
</item>
</layer-list>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:left="0dp"
android:top="0dp">
<bitmap
android:gravity="center"
android:src="@drawable/flag_blue_last_96dp"/>
</item>
<item
android:left="0dp"
android:top="0dp">
<bitmap
android:gravity="center"
android:src="@drawable/flag_shape_01_outline_96dp"/>
</item>
</layer-list>
@@ -6,7 +6,7 @@
tools:showIn="@layout/race_panel_flags_ver">
<RelativeLayout
android:id="@+id/more_flags_layer"
android:id="@+id/blue_first_flags_layer"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerInParent="true">
@@ -25,7 +25,7 @@
<ImageView
android:layout_width="match_parent"
android:layout_height="@dimen/side_button_imageSize"
android:src="?attr/flags_more" />
android:src="?attr/flags_blue_first" />
</RelativeLayout>
<TextView
@@ -37,7 +37,7 @@
</LinearLayout>
<FrameLayout
android:id="@+id/more_flags_lock"
android:id="@+id/blue_first_flags_lock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<merge 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"
tools:showIn="@layout/race_panel_flags_ver">
<RelativeLayout
android:id="@+id/blue_last_flags_layer"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerInParent="true">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical">
<RelativeLayout
android:layout_width="@dimen/side_button_imageSize"
android:layout_height="@dimen/side_button_imageSize"
android:layout_gravity="center_horizontal">
<ImageView
android:layout_width="match_parent"
android:layout_height="@dimen/side_button_imageSize"
android:src="?attr/flags_blue_last" />
</RelativeLayout>
<TextView
android:id="@+id/blue_last_flags_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:textAppearance="?attr/textPanelCaption"
tools:text="00:12:34" />
</LinearLayout>
<FrameLayout
android:id="@+id/blue_last_flags_lock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:background="@color/lock_background"
android:padding="@dimen/panel_lock_padding"
android:visibility="gone"
tools:visibility="visible">
<ImageView
android:layout_width="@dimen/side_button_lockSize"
android:layout_height="@dimen/side_button_lockSize"
android:src="?attr/lock_outline" />
</FrameLayout>
</RelativeLayout>
</merge>
@@ -36,7 +36,7 @@
android:layout_gravity="center"
android:layout_marginLeft="@dimen/side_padding"
android:layout_marginRight="@dimen/side_padding"
android:src="?attr/flag_first_blue" />
android:src="?attr/flag_blue_first" />
<TextView
android:id="@+id/header_headline"
@@ -79,19 +79,35 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/more_flags"
android:id="@+id/blue_first_flags"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<ImageView
android:id="@+id/more_flags_marker"
android:id="@+id/first_blue_flags_marker"
android:layout_width="@dimen/thin_line"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:src="?attr/marker"/>
<include layout="@layout/panel_button_more"/>
<include layout="@layout/panel_button_blue_first"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/blue_last_flags"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<ImageView
android:id="@+id/blue_down_flags_marker"
android:layout_width="@dimen/thin_line"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:src="?attr/marker"/>
<include layout="@layout/panel_button_blue_last"/>
</RelativeLayout>
<RelativeLayout
@@ -80,19 +80,35 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/more_flags"
android:id="@+id/blue_first_flags"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<ImageView
android:id="@+id/more_flags_marker"
android:id="@+id/first_blue_flags_marker"
android:layout_width="match_parent"
android:layout_height="@dimen/thin_line"
android:layout_alignParentBottom="true"
android:src="?attr/marker"/>
<include layout="@layout/panel_button_more"/>
<include layout="@layout/panel_button_blue_first"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/blue_last_flags"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<ImageView
android:id="@+id/blue_down_flags_marker"
android:layout_width="match_parent"
android:layout_height="@dimen/thin_line"
android:layout_alignParentBottom="true"
android:src="?attr/marker"/>
<include layout="@layout/panel_button_blue_last"/>
</RelativeLayout>
<RelativeLayout
@@ -5,11 +5,13 @@
<item name="chevron_left">@drawable/ic_chevron_left_white_36dp</item>
<item name="chevron_right">@drawable/ic_chevron_right_white_36dp</item>
<item name="flag_first_blue">@drawable/flag_first_blue_32dp_dark</item>
<item name="flag_blue_first">@drawable/flag_blue_first_32dp_dark</item>
<item name="flag_blue_last">@drawable/flag_blue_last_32dp_dark</item>
<item name="flags_abandon">@drawable/flags_abandon_64dp_dark</item>
<item name="flags_blue_first">@drawable/flag_blue_first_64dp_dark</item>
<item name="flags_blue_last">@drawable/flag_blue_last_64dp_dark</item>
<item name="flags_course">@drawable/flags_course_64dp_dark</item>
<item name="flags_more">@drawable/flags_more_64dp_dark</item>
<item name="flags_postpone">@drawable/flags_postpone_64dp_dark</item>
<item name="flags_recall">@drawable/flags_recall_64dp_dark</item>
</style>
@@ -5,11 +5,13 @@
<item name="chevron_left">@drawable/ic_chevron_left_black_36dp</item>
<item name="chevron_right">@drawable/ic_chevron_right_black_36dp</item>
<item name="flag_first_blue">@drawable/flag_first_blue_32dp_light</item>
<item name="flag_blue_first">@drawable/flag_blue_first_32dp_light</item>
<item name="flag_blue_last">@drawable/flag_blue_last_32dp_light</item>
<item name="flags_abandon">@drawable/flags_abandon_64dp_light</item>
<item name="flags_blue_first">@drawable/flag_blue_first_64dp_light</item>
<item name="flags_blue_last">@drawable/flag_blue_last_64dp_light</item>
<item name="flags_course">@drawable/flags_course_64dp_light</item>
<item name="flags_more">@drawable/flags_more_64dp_light</item>
<item name="flags_postpone">@drawable/flags_postpone_64dp_light</item>
<item name="flags_recall">@drawable/flags_recall_64dp_light</item>
</style>
@@ -5,11 +5,13 @@
<item name="chevron_left">@drawable/ic_chevron_left_white_36dp</item>
<item name="chevron_right">@drawable/ic_chevron_right_white_36dp</item>
<item name="flag_first_blue">@drawable/flag_first_blue_48dp_dark</item>
<item name="flag_blue_first">@drawable/flag_blue_first_48dp_dark</item>
<item name="flag_blue_last">@drawable/flag_blue_last_48dp_dark</item>
<item name="flags_abandon">@drawable/flags_abandon_96dp_dark</item>
<item name="flags_blue_first">@drawable/flag_blue_first_96dp_dark</item>
<item name="flags_blue_last">@drawable/flag_blue_last_96dp_dark</item>
<item name="flags_course">@drawable/flags_course_96dp_dark</item>
<item name="flags_more">@drawable/flags_more_96dp_dark</item>
<item name="flags_postpone">@drawable/flags_postpone_96dp_dark</item>
<item name="flags_recall">@drawable/flags_recall_96dp_dark</item>
</style>
@@ -5,11 +5,13 @@
<item name="chevron_left">@drawable/ic_chevron_left_black_36dp</item>
<item name="chevron_right">@drawable/ic_chevron_right_black_36dp</item>
<item name="flag_first_blue">@drawable/flag_first_blue_48dp_light</item>
<item name="flag_blue_first">@drawable/flag_blue_first_48dp_light</item>
<item name="flag_blue_last">@drawable/flag_blue_last_48dp_light</item>
<item name="flags_abandon">@drawable/flags_abandon_96dp_light</item>
<item name="flags_blue_first">@drawable/flag_blue_first_96dp_light</item>
<item name="flags_blue_last">@drawable/flag_blue_last_96dp_light</item>
<item name="flags_course">@drawable/flags_course_96dp_light</item>
<item name="flags_more">@drawable/flags_more_96dp_light</item>
<item name="flags_postpone">@drawable/flags_postpone_96dp_light</item>
<item name="flags_recall">@drawable/flags_recall_96dp_light</item>
</style>
@@ -86,14 +86,18 @@
<attr name="wind_off" format="reference"/>
<!-- flag drawables -->
<attr name="flag_first_blue" format="reference"/>
<attr name="flag_blue_first" format="reference"/>
<attr name="flag_blue_last" format="reference"/>
<attr name="flag_ap_alpha_96dp" format="reference"/>
<attr name="flag_ap_hotel_96dp" format="reference"/>
<attr name="flag_november_alpha_96dp" format="reference"/>
<attr name="flag_november_hotel_96dp" format="reference"/>
<attr name="flags_abandon" format="reference"/>
<attr name="flags_blue_first" format="reference"/>
<attr name="flags_blue_last" format="reference"/>
<attr name="flags_course" format="reference"/>
<attr name="flags_more" format="reference"/>
<attr name="flags_postpone" format="reference"/>
<attr name="flags_recall" format="reference"/>
@@ -106,11 +106,13 @@
<item name="chevron_left">@drawable/ic_chevron_left_white_24dp</item>
<item name="chevron_right">@drawable/ic_chevron_right_white_24dp</item>
<item name="flag_first_blue">@drawable/flag_first_blue_32dp_dark</item>
<item name="flag_blue_first">@drawable/flag_blue_first_32dp_dark</item>
<item name="flag_blue_last">@drawable/flag_blue_last_32dp_dark</item>
<item name="flags_abandon">@drawable/flags_abandon_64dp_dark</item>
<item name="flags_blue_first">@drawable/flag_blue_first_64dp_dark</item>
<item name="flags_blue_last">@drawable/flag_blue_last_64dp_dark</item>
<item name="flags_course">@drawable/flags_course_64dp_dark</item>
<item name="flags_more">@drawable/flags_more_64dp_dark</item>
<item name="flags_postpone">@drawable/flags_postpone_64dp_dark</item>
<item name="flags_recall">@drawable/flags_recall_64dp_dark</item>
</style>
@@ -115,11 +115,13 @@
<item name="chevron_left">@drawable/ic_chevron_left_black_24dp</item>
<item name="chevron_right">@drawable/ic_chevron_right_black_24dp</item>
<item name="flag_first_blue">@drawable/flag_first_blue_32dp_light</item>
<item name="flag_blue_first">@drawable/flag_blue_first_32dp_light</item>
<item name="flag_blue_last">@drawable/flag_blue_last_32dp_light</item>
<item name="flags_abandon">@drawable/flags_abandon_64dp_light</item>
<item name="flags_blue_first">@drawable/flag_blue_first_64dp_light</item>
<item name="flags_blue_last">@drawable/flag_blue_last_64dp_light</item>
<item name="flags_course">@drawable/flags_course_64dp_light</item>
<item name="flags_more">@drawable/flags_more_64dp_light</item>
<item name="flags_postpone">@drawable/flags_postpone_64dp_light</item>
<item name="flags_recall">@drawable/flags_recall_64dp_light</item>
</style>
@@ -10,6 +10,7 @@ import android.support.v4.content.LocalBroadcastManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.sap.sailing.android.shared.logging.ExLog;
import com.sap.sailing.android.shared.util.ViewHelper;
@@ -22,6 +23,7 @@ import com.sap.sailing.racecommittee.app.ui.fragments.raceinfo.AbortFlagsFragmen
import com.sap.sailing.racecommittee.app.ui.fragments.raceinfo.EmptyFragment;
import com.sap.sailing.racecommittee.app.ui.fragments.raceinfo.MoreFlagsFragment;
import com.sap.sailing.racecommittee.app.ui.fragments.raceinfo.RecallFlagsFragment;
import com.sap.sailing.racecommittee.app.utils.TimeUtils;
import com.sap.sse.common.TimePoint;
public class FlagPanelFragment extends BasePanelFragment {
@@ -48,9 +50,14 @@ public class FlagPanelFragment extends BasePanelFragment {
private View mCourseFlags;
private View mCourseLock;
// More Toggle (Finish)
private View mMoreFlags;
private View mMoreLock;
// Blue First
private View mBlueFirstFlag;
private View mBlueFirstLock;
// Blue Last
private View mBlueLastFlag;
private View mBlueLastLock;
private TextView mBlueLastText;
public FlagPanelFragment() {
mReceiver = new IntentReceiver();
@@ -93,11 +100,18 @@ public class FlagPanelFragment extends BasePanelFragment {
}
mCourseLock = ViewHelper.get(layout, R.id.course_flags_lock);
mMoreFlags = ViewHelper.get(layout, R.id.more_flags);
if (mMoreFlags != null) {
mMoreFlags.setOnClickListener(new MoreFlagsClick());
mBlueFirstFlag = ViewHelper.get(layout, R.id.blue_first_flags);
if (mBlueFirstFlag != null) {
mBlueFirstFlag.setOnClickListener(new BlueFirstFlagClick());
}
mMoreLock = ViewHelper.get(layout, R.id.more_flags_lock);
mBlueFirstLock = ViewHelper.get(layout, R.id.blue_first_flags_lock);
mBlueLastFlag = ViewHelper.get(layout, R.id.blue_last_flags);
if (mBlueLastFlag != null) {
mBlueLastFlag.setOnClickListener(new BlueLastFlagClick());
}
mBlueLastLock = ViewHelper.get(layout, R.id.blue_last_flags_lock);
mBlueLastText = ViewHelper.get(layout, R.id.blue_last_flags_text);
return layout;
}
@@ -133,7 +147,8 @@ public class FlagPanelFragment extends BasePanelFragment {
changeVisibility(mAbandonLock, mAbandonLayer, View.GONE);
changeVisibility(mRecallLock, null, View.GONE);
changeVisibility(mCourseLock, null, View.GONE);
changeVisibility(mMoreLock, null, View.GONE);
changeVisibility(mBlueFirstLock, null, View.GONE);
changeVisibility(mBlueLastLock, null, View.GONE);
switch (getRace().getStatus()) {
case UNSCHEDULED:
@@ -141,7 +156,8 @@ public class FlagPanelFragment extends BasePanelFragment {
changeVisibility(mAbandonFlags, null, View.VISIBLE);
changeVisibility(mRecallFlags, null, View.VISIBLE);
changeVisibility(mCourseFlags, null, View.GONE);
changeVisibility(mMoreFlags, null, View.VISIBLE);
changeVisibility(mBlueFirstFlag, null, View.VISIBLE);
changeVisibility(mBlueLastFlag, null, View.GONE);
uncheckMarker(mCourseFlags);
break;
@@ -151,11 +167,13 @@ public class FlagPanelFragment extends BasePanelFragment {
changeVisibility(mAbandonFlags, null, View.GONE);
changeVisibility(mRecallFlags, null, View.GONE);
changeVisibility(mCourseFlags, null, View.GONE);
changeVisibility(mMoreFlags, null, View.GONE);
changeVisibility(mBlueFirstFlag, null, View.GONE);
changeVisibility(mBlueLastFlag, null, View.GONE);
uncheckMarker(mAbandonFlags);
uncheckMarker(mCourseFlags);
uncheckMarker(mMoreFlags);
uncheckMarker(mBlueFirstFlag);
uncheckMarker(mBlueLastFlag);
break;
case SCHEDULED:
@@ -164,11 +182,13 @@ public class FlagPanelFragment extends BasePanelFragment {
changeVisibility(mAbandonFlags, null, View.GONE);
changeVisibility(mRecallFlags, null, View.GONE);
changeVisibility(mCourseFlags, null, View.GONE);
changeVisibility(mMoreFlags, null, View.GONE);
changeVisibility(mBlueFirstFlag, null, View.GONE);
changeVisibility(mBlueLastFlag, null, View.GONE);
uncheckMarker(mAbandonFlags);
uncheckMarker(mRecallFlags);
uncheckMarker(mMoreFlags);
uncheckMarker(mBlueFirstFlag);
uncheckMarker(mBlueLastFlag);
break;
case RUNNING:
@@ -178,7 +198,8 @@ public class FlagPanelFragment extends BasePanelFragment {
changeVisibility(mAbandonFlags, null, View.VISIBLE);
changeVisibility(mRecallFlags, null, View.VISIBLE);
changeVisibility(mCourseFlags, null, View.GONE);
changeVisibility(mMoreFlags, null, View.VISIBLE);
changeVisibility(mBlueFirstFlag, null, View.VISIBLE);
changeVisibility(mBlueLastFlag, null, View.GONE);
uncheckMarker(mCourseFlags);
break;
@@ -190,21 +211,24 @@ public class FlagPanelFragment extends BasePanelFragment {
changeVisibility(mAbandonFlags, null, View.VISIBLE);
changeVisibility(mRecallFlags, null, View.GONE);
changeVisibility(mCourseFlags, null, View.GONE);
changeVisibility(mMoreFlags, null, View.GONE);
changeVisibility(mBlueFirstFlag, null, View.GONE);
changeVisibility(mBlueLastFlag, null, View.VISIBLE);
uncheckMarker(mRecallFlags);
uncheckMarker(mCourseFlags);
uncheckMarker(mMoreFlags);
uncheckMarker(mBlueFirstFlag);
uncheckMarker(mBlueLastFlag);
break;
case FINISHED:
changeVisibility(mPostponeLock, mPostponeLayer, View.VISIBLE);
changeVisibility(mPostponeFlags, null, View.VISIBLE);
changeVisibility(mAbandonFlags, null, View.VISIBLE);
changeVisibility(mRecallFlags, null, View.VISIBLE);
changeVisibility(mPostponeFlags, null, View.GONE);
changeVisibility(mAbandonFlags, null, View.GONE);
changeVisibility(mRecallFlags, null, View.GONE);
changeVisibility(mCourseFlags, null, View.GONE);
changeVisibility(mMoreFlags, null, View.VISIBLE);
changeVisibility(mBlueFirstFlag, null, View.GONE);
changeVisibility(mBlueLastFlag, null, View.GONE);
uncheckMarker(mCourseFlags);
break;
@@ -214,13 +238,15 @@ public class FlagPanelFragment extends BasePanelFragment {
changeVisibility(mAbandonFlags, null, View.GONE);
changeVisibility(mRecallFlags, null, View.GONE);
changeVisibility(mCourseFlags, null, View.GONE);
changeVisibility(mMoreFlags, null, View.GONE);
changeVisibility(mBlueFirstFlag, null, View.GONE);
changeVisibility(mBlueLastFlag, null, View.GONE);
uncheckMarker(mPostponeFlags);
uncheckMarker(mAbandonFlags);
uncheckMarker(mRecallFlags);
uncheckMarker(mCourseFlags);
uncheckMarker(mMoreFlags);
uncheckMarker(mBlueFirstFlag);
uncheckMarker(mBlueLastFlag);
break;
}
}
@@ -243,8 +269,12 @@ public class FlagPanelFragment extends BasePanelFragment {
setMarkerLevel(mCourseFlags, R.id.course_flags_marker, LEVEL_NORMAL);
}
if (!view.equals(mMoreFlags)) {
setMarkerLevel(mMoreFlags, R.id.more_flags_marker, LEVEL_NORMAL);
if (!view.equals(mBlueFirstFlag)) {
setMarkerLevel(mBlueFirstFlag, R.id.first_blue_flags_marker, LEVEL_NORMAL);
}
if (!view.equals(mBlueLastFlag)) {
setMarkerLevel(mBlueLastFlag, R.id.blue_down_flags_marker, LEVEL_NORMAL);
}
}
}
@@ -270,6 +300,10 @@ public class FlagPanelFragment extends BasePanelFragment {
break;
case FINISHING:
mBlueLastText.setText(TimeUtils.formatDurationSince(now.minus(getRaceState().getFinishingTime().asMillis()).asMillis()));
changeVisibility(mRecallLock, mRecallLayer, View.VISIBLE);
break;
case FINISHED:
changeVisibility(mRecallLock, mRecallLayer, View.VISIBLE);
break;
@@ -445,16 +479,16 @@ public class FlagPanelFragment extends BasePanelFragment {
}
}
private class MoreFlagsClick implements View.OnClickListener, DialogInterface.OnClickListener {
private class BlueFirstFlagClick implements View.OnClickListener, DialogInterface.OnClickListener {
private final String TAG = MoreFlagsClick.class.getName();
private final View container = mMoreFlags;
private final int markerId = R.id.more_flags_marker;
private final String TAG = BlueFirstFlagClick.class.getName();
private final View container = mBlueFirstFlag;
private final int markerId = R.id.first_blue_flags_marker;
@Override
public void onClick(View v) {
if (mMoreLock != null) {
if (mMoreLock.getVisibility() == View.VISIBLE && isNormal(container, markerId)) {
if (mBlueFirstLock != null) {
if (mBlueFirstLock.getVisibility() == View.VISIBLE && isNormal(container, markerId)) {
showChangeDialog(this);
} else {
toggleFragment();
@@ -485,6 +519,33 @@ public class FlagPanelFragment extends BasePanelFragment {
}
}
private class BlueLastFlagClick implements View.OnClickListener, DialogInterface.OnClickListener {
private final String TAG = BlueLastFlagClick.class.getName();
private final View container = mBlueLastFlag;
private final int markerId = R.id.blue_down_flags_marker;
@Override
public void onClick(DialogInterface dialog, int which) {
if (mBlueLastLock != null) {
if (mBlueLastLock.getVisibility() == View.VISIBLE && isNormal(container, markerId)) {
showChangeDialog(this);
} else {
toggleFragment();
}
}
}
@Override
public void onClick(View v) {
toggleFragment();
}
private void toggleFragment() {
}
}
private class IntentReceiver extends BroadcastReceiver {
@Override
@@ -505,7 +566,7 @@ public class FlagPanelFragment extends BasePanelFragment {
} else if (AppConstants.INTENT_ACTION_TOGGLE_COURSE.equals(data)) {
uncheckMarker(mCourseFlags);
} else if (AppConstants.INTENT_ACTION_TOGGLE_MORE.equals(data)) {
uncheckMarker(mMoreFlags);
uncheckMarker(mBlueFirstFlag);
} else {
uncheckMarker(new View(context));
}
@@ -168,8 +168,7 @@ public class MoreFlagsFragment extends BaseFragment implements MoreFlagItemClick
case 1: // Race-State: Finishing -> End Finishing
ImageView flag = ViewHelper.get(getView(), R.id.header_flag);
if (flag != null) {
flag.setImageDrawable(FlagsResources
.getFlagDrawable(getActivity(), Flags.BLUE.name(), getResources().getInteger(R.integer.flag_size)));
flag.setImageDrawable(FlagsResources.getFlagDrawable(getActivity(), Flags.BLUE.name(), getResources().getInteger(R.integer.flag_size)));
}
TextView headline = ViewHelper.get(getView(), R.id.header_headline);