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 0000000000..4939b986fe Binary files /dev/null and b/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/icon_right_down_arrow.png differ diff --git a/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/sweeper_icon_arrived_station.png b/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/sweeper_icon_current_subtask.png similarity index 100% rename from OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/sweeper_icon_arrived_station.png rename to OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/sweeper_icon_current_subtask.png diff --git a/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/sweeper_icon_not_arrive_station.png b/OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/sweeper_icon_not_current_subtask.png similarity index 100% rename from OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/sweeper_icon_not_arrive_station.png rename to OCH/mogo-och-sweeper/src/main/res/drawable-xhdpi/sweeper_icon_not_current_subtask.png diff --git a/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_subtask_view.xml b/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_subtask_view.xml new file mode 100644 index 0000000000..813bdcd38e --- /dev/null +++ b/OCH/mogo-och-sweeper/src/main/res/layout/sweeper_subtask_view.xml @@ -0,0 +1,51 @@ + + + + + + + \ 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" />