[android] fix: Colors fixed.

This commit is contained in:
Alexander Marchuk 2015-12-29 14:58:14 +03:00 committed by Constantin Shalnev
parent ddb5a271ef
commit 6548967a72
11 changed files with 31 additions and 44 deletions

View file

@ -7,7 +7,7 @@
android:layout_marginTop="@dimen/margin_base"
android:paddingLeft="@dimen/margin_half_plus"
android:paddingRight="@dimen/margin_half_plus"
android:background="?panel"
android:background="?ppButtonsBackground"
android:clickable="true">
<LinearLayout
android:id="@+id/general"

View file

@ -4,7 +4,8 @@
android:id="@+id/slots"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:orientation="horizontal"
android:background="?colorPrimary">
<include
android:id="@+id/from"
layout="@layout/routing_point_slot"

View file

@ -4,7 +4,8 @@
android:id="@+id/slots"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical"
android:background="?colorPrimary">
<include
android:id="@+id/from"
layout="@layout/routing_point_slot"

View file

@ -46,7 +46,7 @@
android:id="@+id/drag_handle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:tint="?iconTint"
android:tint="?iconTintLight"
android:src="@drawable/ic_move"/>
</LinearLayout>
</FrameLayout>

View file

@ -8,8 +8,8 @@
<color name="text_light_subtitle">#B3FFFFFF</color>
<color name="text_light_hint">#4CFFFFFF</color>
<color name="base_green">#FF209852</color>
<color name="darker_green">#FF188044</color>
<color name="base_green">#FF1F9952</color>
<color name="darker_green">#FF197E46</color>
<color name="base_accent">#FF1E96F0</color>
<color name="base_accent_night">#FFFFE68C</color>
@ -28,8 +28,8 @@
<color name="bg_window">#FFFFFFFF</color>
<color name="bg_window_night">#FF32363A</color>
<color name="bg_primary">@color/base_green</color>
<color name="bg_primary_night">#FF14181C</color>
<color name="bg_panel">#FFF4F4F4</color>
<color name="bg_primary_night">#FF1E2226</color>
<color name="bg_panel">#FFF5F5F5</color>
<color name="bg_panel_night">#FF3C4044</color>
<color name="bg_side_panel">#FFFFFFFF</color>
<color name="bg_side_panel_night">@color/bg_panel_night</color>
@ -43,14 +43,12 @@
<color name="bg_menu_closed_night">#CC2D3237</color>
<color name="bg_statusbar">@color/darker_green</color>
<color name="bg_statusbar_night">#FF181C21</color>
<color name="bg_statusbar_night">#FF000000</color>
<color name="bg_azimut_arrow">#1D414651</color>
<color name="fg_azimut_arrow">#FFFFFFFF</color>
<!-- Downloader -->
<color name="downloader_accent">#FF179E4D</color>
<color name="downloader_accent_night">@color/base_accent_night</color>
<color name="downloader_progress_primary">@color/base_accent</color>
<color name="downloader_progress_secondary">#FFF0F0F0</color>
<color name="downloader_gray">#FF999999</color>
@ -62,9 +60,9 @@
<!-- Routing-->
<color name="routing_progress">#FF757575</color>
<color name="routing_slot_background">#FFFFFFFF</color>
<color name="routing_slot_background_night">#FF191E23</color>
<color name="routing_slot_background_night">@color/bg_panel_night</color>
<color name="routing_slot_background_pressed">#FFF0F0F0</color>
<color name="routing_slot_background_pressed_night">#FF111411</color>
<color name="routing_slot_background_pressed_night">@color/bg_window_night</color>
<color name="routing_slot_shadow">#3D000000</color>
<color name="routing_start">@color/base_accent</color>

View file

@ -17,10 +17,10 @@
<attr name="zoomMinus" format="reference"/>
<attr name="ppBackground" format="color"/>
<attr name="ppButtonsBackground" format="color"/>
<attr name="ppPreviewHead" format="reference"/>
<attr name="routingSlot" format="reference"/>
<attr name="routingSlotFrame" format="color"/>
<attr name="routingSlotPressed" format="reference"/>
<attr name="routingSlotMarker" format="reference"/>
<attr name="routingStartButton" format="reference"/>

View file

@ -34,10 +34,10 @@
<item name="dividerHorizontal">@color/divider</item>
<item name="ppBackground">@color/bg_window</item>
<item name="ppButtonsBackground">?panel</item>
<item name="ppPreviewHead">@drawable/bg_place_page_back</item>
<item name="routingSlot">@drawable/routing_slot_background</item>
<item name="routingSlotFrame">?colorPrimary</item>
<item name="routingSlotPressed">@drawable/routing_slot_background_pressed</item>
<item name="routingSlotMarker">@drawable/routing_slot_marker</item>
<item name="routingStartButton">@drawable/routing_start_button</item>
@ -83,11 +83,11 @@
<item name="secondary">@color/text_light_hint</item>
<item name="dividerHorizontal">@color/divider_night</item>
<item name="ppBackground">@color/bg_window_night</item>
<item name="ppBackground">?panel</item>
<item name="ppButtonsBackground">@color/bg_window_night</item>
<item name="ppPreviewHead">@drawable/bg_place_page_back_night</item>
<item name="routingSlot">@drawable/routing_slot_background_night</item>
<item name="routingSlotFrame">?panel</item>
<item name="routingSlotPressed">@drawable/routing_slot_background_pressed_night</item>
<item name="routingSlotMarker">@drawable/routing_slot_marker_night</item>
<item name="routingStartButton">@drawable/routing_start_button_night</item>

View file

@ -16,12 +16,10 @@
<style name="MwmTheme.Settings"/>
<style name="MwmTheme.Night.Settings">
<item name="colorAccent">?android:textColorPrimary</item>
<item name="colorSwitchThumbNormal">?android:colorControlNormal</item>
</style>
<style name="MwmTheme.Downloader">
<item name="colorAccent">@color/downloader_accent</item>
<item name="countrySeparator">@color/downloader_spacer</item>
<item name="countryDownloaded">?android:textColorPrimary</item>
<item name="countryOutdated">?android:textColorSecondary</item>
@ -30,7 +28,6 @@
</style>
<style name="MwmTheme.Night.Downloader">
<item name="colorAccent">@color/downloader_accent_night</item>
<item name="countrySeparator">@color/downloader_spacer_night</item>
<item name="countryDownloaded">?android:textColorPrimary</item>
<item name="countryOutdated">?android:textColorSecondary</item>
@ -88,4 +85,15 @@
<item name="android:windowBackground">@color/bg_dialog_translucent</item>
<item name="android:windowIsTranslucent">true</item>
</style>
<style name="BottomSheet.Dialog.Dark">
<item name="android:textColorPrimary">@color/text_light</item>
<item name="android:textColorSecondary">@color/text_light</item>
<item name="android:textColorHint">@color/text_light_subtitle</item>
<item name="bs_dialogBackground">?panel</item>
<item name="bs_dividerColor">@color/bs_dark_divider_color</item>
<item name="bs_listStyle">@style/BottomSheet.List.Dark</item>
<item name="bs_closeDrawable">@drawable/bs_ic_clear</item>
<item name="bs_moreDrawable">@drawable/bs_ic_more</item>
</style>
</resources>

View file

@ -475,9 +475,8 @@ abstract class BaseDownloadAdapter extends BaseAdapter
sizes = getRemoteItemSizes(position);
setHolderSizeString(holder, sizes[0], sizes[1]);
setHolderPercentText(holder, mStatusNotDownloaded);
setHolderPercentColor(holder, mFragment.getResources().getColor(R.color.downloader_accent));
setHolderPercentColor(holder, ThemeUtils.getColor(mListView.getContext(), R.attr.colorAccent));
break;
}
}

View file

@ -55,7 +55,7 @@ public class RoutingPlanController extends ToolbarController
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked)
{
buttonView.setButtonDrawable(Graphics.tint(mActivity, iconRes, isChecked ? R.attr.colorAccent
: R.attr.iconTintLight));
: R.attr.iconTint));
}
};
@ -74,14 +74,6 @@ public class RoutingPlanController extends ToolbarController
mToggle = (ImageView) mToolbar.findViewById(R.id.toggle);
mSlotFrame = (SlotFrame) root.findViewById(R.id.slots);
mSlotFrame.setOnSlotClickListener(new SlotFrame.OnSlotClickListener()
{
@Override
public void OnSlotClick(int slotId)
{
RoutingController.get().searchPoi(slotId);
}
});
View planFrame = root.findViewById(R.id.planning_frame);

View file

@ -23,7 +23,6 @@ public class SlotFrame extends LinearLayout
{
private static final int ANIM_SWAP = MwmApplication.get().getResources().getInteger(R.integer.anim_slots_swap);
private OnSlotClickListener mClickListener;
private Slot mSlotFrom;
private Slot mSlotTo;
@ -35,11 +34,6 @@ public class SlotFrame extends LinearLayout
private int mTextColor;
private int mHintColor;
public interface OnSlotClickListener
{
void OnSlotClick(int slotId);
}
private class Slot
{
private final View mFrame;
@ -79,7 +73,7 @@ public class SlotFrame extends LinearLayout
@Override
public void onClick(View v)
{
mClickListener.OnSlotClick(mOrder);
RoutingController.get().searchPoi(mOrder);
}
});
@ -221,7 +215,6 @@ public class SlotFrame extends LinearLayout
mTextColor = ThemeUtils.getColor(getContext(), android.R.attr.textColorPrimary);
mHintColor = ThemeUtils.getColor(getContext(), R.attr.secondary);
setBackgroundColor(ThemeUtils.getColor(getContext(), R.attr.routingSlotFrame));
setBaselineAligned(false);
setClipChildren(false);
@ -332,11 +325,6 @@ public class SlotFrame extends LinearLayout
super(context, attrs, defStyleAttr);
}
public void setOnSlotClickListener(OnSlotClickListener clickListener)
{
mClickListener = clickListener;
}
public void update()
{
mSlotFrom.setMapObject(RoutingController.get().getStartPoint());