diff --git a/.idea/gradle.xml b/.idea/gradle.xml index b569ae3318..904f2b0e0d 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -91,6 +91,7 @@ diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/adapter/OchBusStationAdapter.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/adapter/OchBusStationAdapter.java index 9c1d54a25f..f46502e624 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/adapter/OchBusStationAdapter.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/adapter/OchBusStationAdapter.java @@ -59,18 +59,18 @@ public class OchBusStationAdapter extends RecyclerView.Adapter @@ -12,16 +12,16 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right" - android:layout_marginTop="16px" - android:layout_marginRight="16px" + android:layout_marginTop="@dimen/module_mogo_och_autopilot_order_tag_m_t" + android:layout_marginRight="@dimen/module_mogo_och_autopilot_order_tag_m_r" android:background="@drawable/module_och_bus_panel_anchor_bkg" - android:paddingLeft="8px" - android:paddingTop="1px" - android:paddingRight="8px" - android:paddingBottom="1px" + android:paddingLeft="@dimen/module_mogo_och_autopilot_order_tag_p_r" + android:paddingTop="2px" + android:paddingRight="@dimen/module_mogo_och_autopilot_order_tag_p_r" + android:paddingBottom="2px" android:text="小巴车" android:textColor="#FFF" - android:textSize="16px" + android:textSize="@dimen/module_mogo_och_autopilot_order_tag_height" android:textStyle="bold" /> @@ -50,8 +50,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="6px" + android:text="--" android:textColor="#FFF" - android:textSize="26px" + android:textSize="@dimen/module_mogo_och_bus_station_name_text_size" android:textStyle="bold" app:layout_constraintLeft_toLeftOf="@+id/module_och_bus_current_station_anchor" app:layout_constraintTop_toBottomOf="@+id/module_och_bus_current_station_anchor" @@ -63,7 +64,7 @@ android:layout_height="wrap_content" android:text="始" android:textColor="#8E9DD4" - android:textSize="20px" + android:textSize="@dimen/module_mogo_och_bus_station_notice_text_size" android:textStyle="bold" android:visibility="invisible" app:layout_constraintBottom_toBottomOf="@+id/module_och_bus_current_station" @@ -75,10 +76,10 @@ android:id="@+id/module_och_bus_next_station_anchor" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="27px" + android:layout_marginTop="@dimen/module_och_bus_order_distance_anchor_marginTop" android:text="下一站:" android:textColor="#8E9DD4" - android:textSize="20px" + android:textSize="@dimen/module_och_bus_order_start_station_anchor_textSize" android:textStyle="bold" app:layout_constraintLeft_toLeftOf="@+id/module_och_bus_current_station" app:layout_constraintTop_toBottomOf="@+id/module_och_bus_current_station" /> @@ -87,8 +88,9 @@ android:id="@+id/module_och_bus_order_end_station" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:text="--" android:textColor="#FFF" - android:textSize="@dimen/module_och_bus_order_start_station_textSize" + android:textSize="@dimen/module_mogo_och_bus_station_name_text_size" android:textStyle="bold" app:layout_constraintLeft_toLeftOf="@+id/module_och_bus_next_station_anchor" app:layout_constraintTop_toBottomOf="@+id/module_och_bus_next_station_anchor" @@ -100,7 +102,7 @@ android:layout_height="wrap_content" android:text="终" android:textColor="#8E9DD4" - android:textSize="20px" + android:textSize="@dimen/module_mogo_och_bus_station_notice_text_size" android:textStyle="bold" android:visibility="invisible" app:layout_constraintBottom_toBottomOf="@+id/module_och_bus_order_end_station" @@ -113,7 +115,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="14px" - android:src="@drawable/module_mogo_och_bus_icon_arrived_station" + android:src="@drawable/module_mogo_och_icon_arrived_station" app:layout_constraintBottom_toBottomOf="@+id/module_och_bus_current_station" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toTopOf="@+id/module_och_bus_current_station" /> @@ -121,23 +123,23 @@ - - \ No newline at end of file diff --git a/OCH/mogo-och-bus/src/main/res/layout/item_och_bus_station.xml b/OCH/mogo-och-bus/src/main/res/layout/item_och_bus_station.xml index d777f2d0d6..25ac60ead5 100644 --- a/OCH/mogo-och-bus/src/main/res/layout/item_och_bus_station.xml +++ b/OCH/mogo-och-bus/src/main/res/layout/item_och_bus_station.xml @@ -26,7 +26,7 @@ android:layout_width="20px" android:layout_height="20px" android:scaleType="center" - android:src="@drawable/module_mogo_och_bus_icon_arrived_station" + android:src="@drawable/module_mogo_och_icon_arrived_station" app:layout_constraintBottom_toBottomOf="@id/module_mogo_och_bus_station_name" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintVertical_bias="0.4" diff --git a/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1600/dimens.xml b/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1600/dimens.xml new file mode 100644 index 0000000000..81c5fe7e4e --- /dev/null +++ b/OCH/mogo-och-bus/src/main/res/values-xhdpi-2560x1600/dimens.xml @@ -0,0 +1,63 @@ + + + + 300px + 348px + 211px + 276px + + + 220px + 98px + 159px + + 32px + 20px + 42px + 32px + + 15px + + 20px + 36px + 28px + 36px + + 3px + 3px + 17px + 17px + + + 300px + 270px + 30px + 24px + 24px + 1px + 30px + 23px + 30px + 146px + 20px + 23px + 30px + 23px + 26px + 32px + 20px + 80px + 3px + 44.5px + 20px + 28px + 27px + + + 25.6px + 20px + 20px + 16px + 16px + + \ No newline at end of file diff --git a/OCH/mogo-och-bus/src/main/res/values/dimens.xml b/OCH/mogo-och-bus/src/main/res/values/dimens.xml index db034e5867..38414718d2 100644 --- a/OCH/mogo-och-bus/src/main/res/values/dimens.xml +++ b/OCH/mogo-och-bus/src/main/res/values/dimens.xml @@ -48,10 +48,16 @@ 20px 80px 3px - 27px + 27px 20px 28px 27px + 16px + 16px + 16px + 16px + 16px + \ No newline at end of file diff --git a/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/module_och_taxi_blue_dot.png b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/module_och_taxi_blue_dot.png deleted file mode 100644 index e1fd463963..0000000000 Binary files a/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/module_och_taxi_blue_dot.png and /dev/null differ diff --git a/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/module_och_taxi_dot_line.png b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/module_och_taxi_dot_line.png deleted file mode 100644 index 186001352c..0000000000 Binary files a/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/module_och_taxi_dot_line.png and /dev/null differ diff --git a/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/module_och_taxi_green_dot.png b/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/module_och_taxi_green_dot.png deleted file mode 100644 index a676a789c3..0000000000 Binary files a/OCH/mogo-och-taxi/src/main/res/drawable-xhdpi/module_och_taxi_green_dot.png and /dev/null differ diff --git a/OCH/mogo-och-taxi/src/main/res/layout/module_och_taxi_panel.xml b/OCH/mogo-och-taxi/src/main/res/layout/module_och_taxi_panel.xml index 0f357cd739..888fec075e 100644 --- a/OCH/mogo-och-taxi/src/main/res/layout/module_och_taxi_panel.xml +++ b/OCH/mogo-och-taxi/src/main/res/layout/module_och_taxi_panel.xml @@ -1,45 +1,55 @@ - + android:textStyle="bold" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + android:background="@color/module_och_taxi_order_status_divider_bkgColor" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/module_och_taxi_order_status" /> + android:paddingBottom="@dimen/module_och_taxi_order_status_stationInfo_paddingBottom" + app:layout_constraintBottom_toTopOf="@+id/module_och_taxi_order_distance_container" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/module_och_taxi_order_status_divider"> @@ -48,7 +58,7 @@ android:id="@+id/module_och_taxi_order_start_station" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="5px" + android:layout_marginLeft="@dimen/module_och_taxi_order_start_station_marginLeft" android:textColor="@color/module_och_order_status_textColor" android:textSize="@dimen/module_och_taxi_order_start_station_textSize" android:textStyle="bold" @@ -72,17 +82,18 @@ android:id="@+id/dotLine" android:layout_width="wrap_content" android:layout_height="0dp" - android:src="@drawable/module_och_taxi_dot_line" + android:scaleType="fitXY" + android:src="@drawable/module_och_dot_line" + app:layout_constraintBottom_toTopOf="@+id/blueDot" app:layout_constraintLeft_toLeftOf="@+id/greenDot" app:layout_constraintRight_toRightOf="@+id/greenDot" - app:layout_constraintBottom_toTopOf="@+id/blueDot" app:layout_constraintTop_toBottomOf="@+id/greenDot" /> @@ -118,7 +129,10 @@ android:id="@+id/module_och_taxi_order_distance_container" android:layout_width="match_parent" android:layout_height="@dimen/module_och_taxi_order_distance_container_height" - android:background="@drawable/module_och_taxi_panel_distance_bkg"> + android:background="@drawable/module_och_taxi_panel_distance_bkg" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent"> - \ No newline at end of file + \ No newline at end of file diff --git a/OCH/mogo-och-taxi/src/main/res/values-xhdpi/dimens.xml b/OCH/mogo-och-taxi/src/main/res/values-xhdpi-2560x1600/dimens.xml similarity index 76% rename from OCH/mogo-och-taxi/src/main/res/values-xhdpi/dimens.xml rename to OCH/mogo-och-taxi/src/main/res/values-xhdpi-2560x1600/dimens.xml index 2ca27f9ddf..95796c9ef6 100644 --- a/OCH/mogo-och-taxi/src/main/res/values-xhdpi/dimens.xml +++ b/OCH/mogo-och-taxi/src/main/res/values-xhdpi-2560x1600/dimens.xml @@ -2,8 +2,9 @@ 464px 310px - 20px - 20px + 15px + 25px + 25px 20px 1px 20px @@ -11,16 +12,16 @@ 20px 140px 20px - 20px + 41px 17px - 20px - 26px - 20px - 20px - 64px + 41px + 42px + 32px + 32px + 84px 3px 20px - 20px - 24px + 32px + 36px 17px \ No newline at end of file diff --git a/OCH/mogo-och-taxi/src/main/res/values/dimens.xml b/OCH/mogo-och-taxi/src/main/res/values/dimens.xml index 2ca27f9ddf..954782677b 100644 --- a/OCH/mogo-och-taxi/src/main/res/values/dimens.xml +++ b/OCH/mogo-och-taxi/src/main/res/values/dimens.xml @@ -2,6 +2,7 @@ 464px 310px + 5px 20px 20px 20px diff --git a/OCH/mogo-och/src/main/java/com/mogo/och/view/SlidePanelView.java b/OCH/mogo-och/src/main/java/com/mogo/och/view/SlidePanelView.java index db76a5e9f3..ee4785e198 100644 --- a/OCH/mogo-och/src/main/java/com/mogo/och/view/SlidePanelView.java +++ b/OCH/mogo-och/src/main/java/com/mogo/och/view/SlidePanelView.java @@ -3,6 +3,7 @@ package com.mogo.och.view; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.content.Context; +import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; @@ -41,6 +42,14 @@ public class SlidePanelView extends View { public SlidePanelView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); + TypedArray mTypedArray = context.obtainStyledAttributes(attrs, R.styleable.SlidePanelView); + textSize = (int) mTypedArray.getDimension(R.styleable.SlidePanelView_textSize, textSize); + BLOCK_START_X = (int) mTypedArray.getDimension(R.styleable.SlidePanelView_BLOCK_START_X, BLOCK_START_X); + BLOCK_START_Y = (int) mTypedArray.getDimension(R.styleable.SlidePanelView_BLOCK_START_Y, BLOCK_START_Y); + NORMAL_TEXT_MARGIN_LEFT = (int) mTypedArray.getDimension(R.styleable.SlidePanelView_NORMAL_TEXT_MARGIN_LEFT, NORMAL_TEXT_MARGIN_LEFT); + NORMAL_TEXT_MARGIN_RIGHT = (int) mTypedArray.getDimension(R.styleable.SlidePanelView_NORMAL_TEXT_MARGIN_RIGHT, NORMAL_TEXT_MARGIN_RIGHT); + SHORT_TEXT_MARGIN_LEFT = (int) mTypedArray.getDimension(R.styleable.SlidePanelView_SHORT_TEXT_MARGIN_LEFT, SHORT_TEXT_MARGIN_LEFT); + SHORT_TEXT_MARGIN_RIGHT = (int) mTypedArray.getDimension(R.styleable.SlidePanelView_SHORT_TEXT_MARGIN_RIGHT, SHORT_TEXT_MARGIN_RIGHT); init(); } @@ -48,12 +57,13 @@ public class SlidePanelView extends View { private final Paint blockPaint = new Paint(Paint.ANTI_ALIAS_FLAG); private final Paint textPaint = new Paint(Paint.ANTI_ALIAS_FLAG); - private static final int BLOCK_START_X = 15; - private static final int BLOCK_START_Y = 15; - private static final int NORMAL_TEXT_MARGIN_LEFT = 40; - private static final int NORMAL_TEXT_MARGIN_RIGHT = 50; - private static final int SHORT_TEXT_MARGIN_LEFT = 60; - private static final int SHORT_TEXT_MARGIN_RIGHT = 70; + private static int textSize = 40; + private static int BLOCK_START_X = 15; + private static int BLOCK_START_Y = 15; + private static int NORMAL_TEXT_MARGIN_LEFT = 40; + private static int NORMAL_TEXT_MARGIN_RIGHT = 60; + private static int SHORT_TEXT_MARGIN_LEFT = 60; + private static int SHORT_TEXT_MARGIN_RIGHT = 70; private int textMarginLeft = NORMAL_TEXT_MARGIN_LEFT; private int textMarginRight = NORMAL_TEXT_MARGIN_RIGHT; @@ -107,7 +117,7 @@ public class SlidePanelView extends View { bgPaint.setStyle(Paint.Style.FILL); textPaint.setStyle(Paint.Style.FILL); - textPaint.setTextSize(40); + textPaint.setTextSize(textSize); textPaint.setTextAlign(Paint.Align.LEFT); textGradient = new LinearGradient(-GRADIENT_OFFSET, 0, 0, 0, new int[]{0x33ffffff, 0xffffffff, 0x33ffffff}, null, Shader.TileMode.CLAMP); textGradient.setLocalMatrix(gradientMatrix); diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1600/module_mogo_och_base_icon_not_in_autopilot.png b/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1600/module_mogo_och_base_icon_not_in_autopilot.png new file mode 100644 index 0000000000..927296d690 Binary files /dev/null and b/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1600/module_mogo_och_base_icon_not_in_autopilot.png differ diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1600/module_mogo_och_icon_arrived_station.png b/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1600/module_mogo_och_icon_arrived_station.png new file mode 100644 index 0000000000..8a065b66dd Binary files /dev/null and b/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1600/module_mogo_och_icon_arrived_station.png differ diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1600/module_mogo_och_icon_arriving_station.png b/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1600/module_mogo_och_icon_arriving_station.png new file mode 100644 index 0000000000..4ed57a0e30 Binary files /dev/null and b/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1600/module_mogo_och_icon_arriving_station.png differ diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1600/module_och_base_slide_block.png b/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1600/module_och_base_slide_block.png new file mode 100644 index 0000000000..ed7b293b90 Binary files /dev/null and b/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1600/module_och_base_slide_block.png differ diff --git a/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1600/module_och_dot_line.png b/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1600/module_och_dot_line.png new file mode 100644 index 0000000000..a720a532ea Binary files /dev/null and b/OCH/mogo-och/src/main/res/drawable-xhdpi-2560x1600/module_och_dot_line.png differ diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/module_mogo_och_bus_icon_arrived_station.png b/OCH/mogo-och/src/main/res/drawable-xhdpi/module_mogo_och_icon_arrived_station.png similarity index 100% rename from OCH/mogo-och-bus/src/main/res/drawable-xhdpi/module_mogo_och_bus_icon_arrived_station.png rename to OCH/mogo-och/src/main/res/drawable-xhdpi/module_mogo_och_icon_arrived_station.png diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/module_mogo_och_bus_icon_arriving_station.png b/OCH/mogo-och/src/main/res/drawable-xhdpi/module_mogo_och_icon_arriving_station.png similarity index 100% rename from OCH/mogo-och-bus/src/main/res/drawable-xhdpi/module_mogo_och_bus_icon_arriving_station.png rename to OCH/mogo-och/src/main/res/drawable-xhdpi/module_mogo_och_icon_arriving_station.png diff --git a/OCH/mogo-och-bus/src/main/res/drawable-xhdpi/module_och_bus_dot_line.png b/OCH/mogo-och/src/main/res/drawable-xhdpi/module_och_dot_line.png similarity index 100% rename from OCH/mogo-och-bus/src/main/res/drawable-xhdpi/module_och_bus_dot_line.png rename to OCH/mogo-och/src/main/res/drawable-xhdpi/module_och_dot_line.png diff --git a/OCH/mogo-och/src/main/res/layout/module_mogo_och_base_fragment.xml b/OCH/mogo-och/src/main/res/layout/module_mogo_och_base_fragment.xml index 3757a8f629..890e9ab8d8 100644 --- a/OCH/mogo-och/src/main/res/layout/module_mogo_och_base_fragment.xml +++ b/OCH/mogo-och/src/main/res/layout/module_mogo_och_base_fragment.xml @@ -14,11 +14,11 @@ android:layout_marginTop="@dimen/module_mogo_och_station_panel_container_margin_top_no_call" android:background="@drawable/module_mogo_och_autopilot_status_bg" android:drawableLeft="@drawable/module_och_bus_ic_autopilot" + android:drawablePadding="@dimen/dp_30" android:elevation="@dimen/dp_10" - android:gravity="center" - android:paddingLeft="35px" + android:gravity="center_vertical" + android:paddingLeft="@dimen/module_mogo_och_operation_status_padding" android:text="自动驾驶" - android:textAlignment="center" android:textColor="@color/module_mogo_och_autopilot_text_color_normal" android:textSize="@dimen/module_mogo_och_autopilot_status_text_size" android:textStyle="bold" @@ -28,9 +28,9 @@ + app:layout_constraintLeft_toLeftOf="parent" /> + app:layout_constraintRight_toRightOf="parent" + app:textSize="@dimen/module_mogo_och_slide_panel_textSize" + tools:visibility="visible" />