added link icon into NavDrawer
No files matched your search
|
After Width: | Height: | Size: 323 B |
|
After Width: | Height: | Size: 335 B |
|
After Width: | Height: | Size: 221 B |
|
After Width: | Height: | Size: 229 B |
|
After Width: | Height: | Size: 377 B |
|
After Width: | Height: | Size: 398 B |
|
After Width: | Height: | Size: 539 B |
|
After Width: | Height: | Size: 567 B |
|
After Width: | Height: | Size: 641 B |
|
After Width: | Height: | Size: 691 B |
@@ -71,34 +71,40 @@
|
||||
android:src="?marker_race"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/race_flag"
|
||||
android:id="@+id/additional_info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:orientation="vertical">
|
||||
android:layout_centerVertical="true">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/current_flag"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:scaleType="centerInside"
|
||||
tools:src="@drawable/alpha_flag"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/has_dependent_races"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
android:src="?link_18dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="5dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/race_flag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/arrow_direction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:src="?arrow_down"/>
|
||||
android:id="@+id/current_flag"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:scaleType="centerInside"
|
||||
tools:src="@drawable/alpha_flag"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/flag_timer"
|
||||
@@ -106,6 +112,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:textAppearance="?textXSmall"
|
||||
android:drawableLeft="?arrow_down"
|
||||
tools:text="01:12"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -119,8 +126,8 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="@dimen/default_margin"
|
||||
android:layout_marginStart="@dimen/default_margin"
|
||||
android:layout_toLeftOf="@id/race_flag"
|
||||
android:layout_toStartOf="@id/race_flag"
|
||||
android:layout_toLeftOf="@id/additional_info"
|
||||
android:layout_toStartOf="@id/additional_info"
|
||||
android:orientation="vertical"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?textNormal"
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
<attr name="course_updown_64dp" format="reference"/>
|
||||
<attr name="dns_48dp" format="reference"/>
|
||||
<attr name="hearing_48dp" format="reference"/>
|
||||
<attr name="link_18dp" format="reference"/>
|
||||
<attr name="lock_outline" format="reference"/>
|
||||
<attr name="marker" format="reference"/>
|
||||
<attr name="marker_race" format="reference"/>
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
<item name="course_updown_64dp">@drawable/course_updown_64dp_dark</item>
|
||||
<item name="dns_48dp">@drawable/ic_dns_white_48dp</item>
|
||||
<item name="hearing_48dp">@drawable/ic_hearing_white_48dp</item>
|
||||
<item name="link_18dp">@drawable/ic_link_white_18dp</item>
|
||||
<item name="lock_outline">@drawable/lock_outline_dark</item>
|
||||
<item name="marker">@drawable/marker_dark</item>
|
||||
<item name="marker_race">@drawable/marker_race_dark</item>
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
<item name="course_updown_64dp">@drawable/course_updown_64dp_light</item>
|
||||
<item name="dns_48dp">@drawable/ic_dns_black_48dp</item>
|
||||
<item name="hearing_48dp">@drawable/ic_hearing_black_48dp</item>
|
||||
<item name="link_18dp">@drawable/ic_link_black_18dp</item>
|
||||
<item name="lock_outline">@drawable/lock_outline_light</item>
|
||||
<item name="marker">@drawable/marker_light</item>
|
||||
<item name="marker_race">@drawable/marker_race_light</item>
|
||||
|
||||
@@ -54,7 +54,6 @@ public class ManagedRaceListAdapter extends ArrayAdapter<RaceListDataType> imple
|
||||
private ImageView current_flag;
|
||||
private TextView race_name;
|
||||
private TextView flag_timer;
|
||||
private ImageView arrow_direction;
|
||||
private TextView boat_class;
|
||||
private TextView fleet_series;
|
||||
private ImageView protest_image;
|
||||
@@ -277,7 +276,6 @@ public class ManagedRaceListAdapter extends ArrayAdapter<RaceListDataType> imple
|
||||
|
||||
private void findViews(View convertView) {
|
||||
marker = ViewHolder.get(convertView, R.id.race_marker);
|
||||
arrow_direction = ViewHolder.get(convertView, R.id.arrow_direction);
|
||||
current_flag = ViewHolder.get(convertView, R.id.current_flag);
|
||||
update_badge = ViewHolder.get(convertView, R.id.update_badge);
|
||||
race_flag = ViewHolder.get(convertView, R.id.race_flag);
|
||||
@@ -328,16 +326,14 @@ public class ManagedRaceListAdapter extends ArrayAdapter<RaceListDataType> imple
|
||||
if (state == null || state.getStartTime() == null) {
|
||||
return;
|
||||
}
|
||||
FlagPoleState flagPoleState = state.getTypedRacingProcedure()
|
||||
.getActiveFlags(state.getStartTime(), MillisecondsTimePoint.now());
|
||||
FlagPoleState flagPoleState = state.getTypedRacingProcedure().getActiveFlags(state.getStartTime(), MillisecondsTimePoint.now());
|
||||
List<FlagPole> flagChanges = flagPoleState.computeUpcomingChanges();
|
||||
if (!flagChanges.isEmpty()) {
|
||||
TimePoint changeAt = flagPoleState.getNextStateValidFrom();
|
||||
FlagPole changePole = FlagPoleState.getMostInterestingFlagPole(flagChanges);
|
||||
|
||||
if (changeAt != null) {
|
||||
current_flag.setImageDrawable(
|
||||
FlagsResources.getFlagDrawable(getContext(), changePole.getUpperFlag().name(), 48));
|
||||
current_flag.setImageDrawable(FlagsResources.getFlagDrawable(getContext(), changePole.getUpperFlag().name(), 48));
|
||||
String text = getDuration(changeAt.asDate(), Calendar.getInstance().getTime());
|
||||
flag_timer.setText(text.replace("-", ""));
|
||||
Drawable arrow;
|
||||
@@ -346,7 +342,7 @@ public class ManagedRaceListAdapter extends ArrayAdapter<RaceListDataType> imple
|
||||
} else {
|
||||
arrow = BitmapHelper.getAttrDrawable(getContext(), R.attr.arrow_down);
|
||||
}
|
||||
arrow_direction.setImageDrawable(arrow);
|
||||
flag_timer.setCompoundDrawablesWithIntrinsicBounds(arrow, null, null, null);
|
||||
race_flag.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||