Commit 275bd337 by Wyh

8.13

Signed-off-by: Wyh <1239658231>
parent cca5a5c7
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="@dimen/dp_10"
android:paddingRight="@dimen/dp_10"
android:paddingBottom="@dimen/dp_20">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/shape_white_eight_corners_bg"
android:orientation="vertical">
<FrameLayout
android:id="@+id/layout_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dp_10">
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="指派送貨員"
android:textColor="@color/black"
android:textSize="@dimen/dp_17" />
<TextView
android:id="@+id/tv_delivery_cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|center_vertical"
android:text="取消"
android:textColor="@color/color_c8"
android:textSize="@dimen/dp_17" />
</FrameLayout>
<TextView
android:id="@+id/tv_delivery_confirm"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginLeft="@dimen/dp_16"
android:layout_marginRight="@dimen/dp_16"
android:layout_marginBottom="@dimen/dp_10"
android:background="@drawable/shape_fifty_tran_green_btn"
android:gravity="center"
android:paddingTop="@dimen/dp_12"
android:paddingBottom="@dimen/dp_12"
android:text="確定"
android:textColor="@color/white"
android:textSize="@dimen/dp_16" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_delivery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/tv_delivery_confirm"
android:layout_below="@id/layout_title"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10" />
</RelativeLayout>
</LinearLayout>
\ No newline at end of file
package com.gingersoft.gsa.other_order_mode.data.model.bean
data class TransportationBean(
val `data`: DataX?,
val success: Boolean,
val sysTime: Long
) {
data class DataX(
val count: Int,
val list: List<Transportation>?
) {
data class Transportation(
val amountOn: Double,//金額上限
val amountUnder: Double,//金額下限
val createName: String,
val createTime: Long,
val createUid: Int,
val id: Int,
val restaurantId: Int,
val restaurantName: String,
val status: Int,//狀態0:非默認,1:默認
val type: Int,//0摩托,1,麵包2卡車
val updateName: String,
val updateTime: Long,
val updateUid: Int
)
}
}
\ No newline at end of file
package com.joe.print.mvp.ui.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.joe.print.R;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
public class PrintProgressAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
private int progress = 0;
public PrintProgressAdapter(@Nullable List<String> data) {
super(R.layout.print_progress_item, data);
}
public void setProgress(int progress) {
this.progress = progress;
super.notifyDataSetChanged();
}
@Override
protected void convert(@NotNull BaseViewHolder baseViewHolder, String s) {
baseViewHolder.setText(R.id.tv_print_progressbar, s);
if (progress > baseViewHolder.getAdapterPosition()) {
baseViewHolder.setGone(R.id.pb_print_progressbar, true);
baseViewHolder.setTextColor(R.id.tv_print_progressbar, R.color.order_state0_color);
baseViewHolder.setGone(R.id.iv_checked, false);
} else if (progress == baseViewHolder.getAdapterPosition()) {
baseViewHolder.setGone(R.id.pb_print_progressbar, false);
baseViewHolder.setTextColor(R.id.tv_print_progressbar, R.color.theme_333_color);
baseViewHolder.setGone(R.id.iv_checked, true);
} else {
baseViewHolder.setGone(R.id.pb_print_progressbar, true);
baseViewHolder.setTextColor(R.id.tv_print_progressbar, R.color.color_ccc);
baseViewHolder.setGone(R.id.iv_checked, true);
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<!-- 打印進度展示-->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_print_progress"
android:layout_width="match_parent"
android:paddingTop="@dimen/dp_20"
android:background="@drawable/shape_white_eight_corners_bg"
android:layout_height="match_parent" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginBottom="@dimen/dp_20"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_print_progressbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/dp_10"
android:textColor="@color/theme_333_color"
android:textSize="@dimen/dp_16"
tools:text="狀態:" />
<ProgressBar
android:id="@+id/pb_print_progressbar"
android:layout_width="@dimen/dp_20"
android:layout_height="@dimen/dp_20" />
<ImageView
android:id="@+id/iv_checked"
android:layout_width="@dimen/dp_20"
android:layout_height="@dimen/dp_20"
android:src="@drawable/checked_green" />
</LinearLayout>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment