From 739fe8cfe73cd30f8801fa18fcc0a92abfdbaf64 Mon Sep 17 00:00:00 2001 From: bxb Date: Fri, 13 Jan 2023 17:41:45 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=B8=85=E6=89=AB=E8=BD=A6]=E6=B8=85=E6=89=AB?= =?UTF-8?q?=E8=BD=A6=E5=AD=90=E4=BB=BB=E5=8A=A1view=E5=B0=81=E8=A3=85?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/och/sweeper/view/SubTaskView.java | 43 +++++++++++++++ .../drawable-xhdpi/icon_right_down_arrow.png | Bin 0 -> 351 bytes ...n.png => sweeper_icon_current_subtask.png} | Bin ...g => sweeper_icon_not_current_subtask.png} | Bin .../main/res/layout/sweeper_subtask_view.xml | 51 ++++++++++++++++++ .../layout/sweeper_switch_line_list_item.xml | 2 +- 6 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SubTaskView.java create mode 100644 OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/icon_right_down_arrow.png rename OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/{sweeper_icon_arrived_station.png => sweeper_icon_current_subtask.png} (100%) rename OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/{sweeper_icon_not_arrive_station.png => sweeper_icon_not_current_subtask.png} (100%) create mode 100644 OCH/mogo-och-sweeper/src/main/res/layout/sweeper_subtask_view.xml diff --git a/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SubTaskView.java b/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SubTaskView.java new file mode 100644 index 0000000000..e5017d1118 --- /dev/null +++ b/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SubTaskView.java @@ -0,0 +1,43 @@ +package com.mogo.och.sweeper.view; + +import android.content.Context; +import android.util.AttributeSet; +import android.view.LayoutInflater; +import android.widget.ImageView; +import android.widget.TextView; + +import com.mogo.och.sweeper.R; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.constraintlayout.widget.ConstraintLayout; + +public class SubTaskView extends ConstraintLayout { + private ImageView ivSubTask; + private TextView tvSubTaskName; + private TextView tvSubTaskDesc; + private ImageView ivSubTaskRightDownArrow; + public SubTaskView(@NonNull Context context) { + super(context); + } + + public SubTaskView(@NonNull Context context, @Nullable AttributeSet attrs) { + super(context, attrs); + initView(context); + } + + public SubTaskView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + } + + public SubTaskView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) { + super(context, attrs, defStyleAttr, defStyleRes); + } + private void initView(@NonNull Context context) { + LayoutInflater.from(context).inflate(R.layout.sweeper_subtask_view, this); + ivSubTask = findViewById(R.id.ivSubTask); + tvSubTaskName = findViewById(R.id.tvSubTaskName); + tvSubTaskDesc = findViewById(R.id.tvSubTaskDesc); + ivSubTaskRightDownArrow = findViewById(R.id.ivRightDownArrow); + } +} diff --git a/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/icon_right_down_arrow.png b/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/icon_right_down_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..4939b986fe9439ec37e55631632f68a8594ad4c3 GIT binary patch literal 351 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tt!3HFwpZqoeQjEnx?oJHr&dIz4a$Hg)JkxxA z8MJ_G4hF{dOa>N^5+IfWVg?501&j>LK$;OGwtxvP%dvnN&b9$5JgAx~0;EoQx;Tbd z2qvdQeEx6G%(KC`!1#wzU2~zMiLep7bae=$N{HLxL=%|_pO0r$N%-b(f74pW zzyl{f2(P#-uTjaM#<_D#n<0zgJGW^q8yrpF-}--YhLFL;t^ZFa_~e){be`Af T-LctVImmOKu6{1-oD!M + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_switch_line_list_item.xml b/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_switch_line_list_item.xml index 2372df7638..782028c2f8 100644 --- a/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_switch_line_list_item.xml +++ b/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_switch_line_list_item.xml @@ -47,7 +47,7 @@ android:id="@+id/switch_line_start_greenDot" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:src="@drawable/sweeper_icon_arrived_station" + android:src="@drawable/sweeper_icon_current_subtask" app:layout_constraintBottom_toBottomOf="@+id/switch_line_start_station" app:layout_constraintLeft_toLeftOf="@+id/switch_line_name" app:layout_constraintTop_toTopOf="@+id/switch_line_start_station" />