商品详情

This commit is contained in:
tongchao 2025-07-08 17:26:44 +08:00
parent b5d046a269
commit 2ee1bbf43a
33 changed files with 1771 additions and 5 deletions

View File

@ -178,6 +178,11 @@
android:configChanges="orientation|screenSize|keyboardHidden"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.mall.GoodsDetailActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:exported="false"
android:screenOrientation="portrait" />
<activity

View File

@ -4,6 +4,8 @@ public class Constant {
public static String TOKEN = "token";
public static String ID = "id";
public static String LOGIN_USER_NAME = "login_user_name";
}

View File

@ -3,6 +3,7 @@ package com.tairui.industrial_operation.ui.account;
import com.google.gson.JsonObject;
import com.orhanobut.hawk.Hawk;
import com.rxjava.rxlife.RxLife;
import com.tairui.industrial_operation.BuildConfig;
import com.tairui.industrial_operation.base.BaseActivity;
import com.tairui.industrial_operation.databinding.ActivityLoginBinding;
import com.tairui.industrial_operation.entity.Api;
@ -26,10 +27,10 @@ public class LoginActivity extends BaseActivity<ActivityLoginBinding> {
@Override
protected void onFindView(Bundle savedInstanceState) {
// if (BuildConfig.DEBUG) {
// setText(binding.inputUserName, "admin");
// setText(binding.inputUserPass, "admin123");
// }
if (BuildConfig.DEBUG) {
setText(binding.inputUserName, "admin");
setText(binding.inputUserPass, "admin123");
}
}
@Override

View File

@ -8,6 +8,7 @@ import com.tairui.industrial_operation.R;
import com.tairui.industrial_operation.base.entity.BaseHolderEntity;
import com.tairui.industrial_operation.ui.brand.PublicBrandActivity;
import com.tairui.industrial_operation.ui.home.entity.HomeGoodsEntity;
import com.tairui.industrial_operation.ui.mall.GoodsDetailActivity;
import com.tairui.industrial_operation.ui.smart_farm.SmartFarmActivity;
import com.tairui.industrial_operation.util.DensityUtils;
import com.tairui.industrial_operation.util.IntentUtil;
@ -100,6 +101,8 @@ public class HomeAdapter extends BaseMultiItemQuickAdapter<BaseHolderEntity, Bas
goodsAdapter = new HomeGoodsAdapter();
goodsAdapter.setNewData((List<HomeGoodsEntity.RecordsEntity>) entity.getData());
goodsRecycler.setAdapter(goodsAdapter);
goodsAdapter.setOnItemClickListener(
(baseQuickAdapter, view, i) -> IntentUtil.startActivity(mContext, GoodsDetailActivity.class));
break;
default:
break;

View File

@ -0,0 +1,75 @@
package com.tairui.industrial_operation.ui.mall;
import com.gyf.immersionbar.ImmersionBar;
import com.kongzue.dialogx.dialogs.BottomDialog;
import com.kongzue.dialogx.interfaces.OnBindView;
import com.tairui.industrial_operation.R;
import com.tairui.industrial_operation.base.BaseActivity;
import com.tairui.industrial_operation.databinding.ActivityGoodsDetailBinding;
import com.tairui.industrial_operation.util.SingleClickListener;
import android.os.Bundle;
import android.view.View;
public class GoodsDetailActivity extends BaseActivity<ActivityGoodsDetailBinding> {
@Override
protected Class<ActivityGoodsDetailBinding> getBindingClass() {
return ActivityGoodsDetailBinding.class;
}
@Override
protected void initStatusBar() {
ImmersionBar.with(this).fitsSystemWindows(false).transparentStatusBar()
.statusBarDarkFont(true).init();
}
@Override
protected void onQueryArguments() {
}
@Override
protected void onFindView(Bundle savedInstanceState) {
}
@Override
protected void onBindListener() {
binding.btnBack.setOnClickListener(new SingleClickListener() {
@Override
protected void onSingleClick(View v) {
finish();
}
});
binding.baozhang.setOnClickListener(new SingleClickListener() {
@Override
protected void onSingleClick(View v) {
new BottomDialog("null", "", new OnBindView<BottomDialog>(
R.layout.layout_dialog_baozhang) {
@Override
public void onBind(BottomDialog dialog, View v) {
v.setOnClickListener(v1 -> dialog.dismiss());
}
}).setBackgroundColor(getResColor(R.color.white)).show();
}
});
binding.canshu.setOnClickListener(new SingleClickListener() {
@Override
protected void onSingleClick(View v) {
new BottomDialog("null", "", new OnBindView<BottomDialog>(
R.layout.layout_dialog_canshu) {
@Override
public void onBind(BottomDialog dialog, View v) {
v.setOnClickListener(v1 -> dialog.dismiss());
}
}).setBackgroundColor(getResColor(R.color.white)).show();
}
});
}
@Override
protected void onApplyData() {
}
private void requestGoodsDetailInfo(String goodsId) {
}
}

View File

@ -13,6 +13,7 @@ import com.tairui.industrial_operation.http.OnError;
import com.tairui.industrial_operation.ui.home.entity.HomeGoodsEntity;
import com.tairui.industrial_operation.ui.mall.adapter.MallAdapter;
import com.tairui.industrial_operation.util.ArrayUtil;
import com.tairui.industrial_operation.util.IntentUtil;
import com.tairui.industrial_operation.widget.RefreshRecyclerView;
import android.view.View;
@ -60,7 +61,6 @@ public class MallFragment extends BaseFragment<FragmentMallBinding> {
adapter.setOnItemClickListener((baseQuickAdapter, view, i) -> {
// Bundle bundle = new Bundle();
// bundle.putSerializable("data", (Serializable) adapter.getItem(i));
// IntentUtil.startActivity(mContext, LandInfoDetailActivity.class, bundle);
});
}

View File

@ -8,7 +8,9 @@ import com.tairui.industrial_operation.R;
import com.tairui.industrial_operation.base.entity.BaseHolderEntity;
import com.tairui.industrial_operation.ui.home.adapter.HomeGoodsAdapter;
import com.tairui.industrial_operation.ui.home.entity.HomeGoodsEntity;
import com.tairui.industrial_operation.ui.mall.GoodsDetailActivity;
import com.tairui.industrial_operation.util.DensityUtils;
import com.tairui.industrial_operation.util.IntentUtil;
import com.tairui.industrial_operation.widget.GridSpacingItemDecoration;
import androidx.annotation.NonNull;
@ -55,6 +57,8 @@ public class MallAdapter extends BaseMultiItemQuickAdapter<BaseHolderEntity, Bas
goodsAdapter = new HomeGoodsAdapter();
goodsAdapter.setNewData((List<HomeGoodsEntity.RecordsEntity>) entity.getData());
goodsRecycler.setAdapter(goodsAdapter);
goodsAdapter.setOnItemClickListener(
(baseQuickAdapter, view, i) -> IntentUtil.startActivity(mContext, GoodsDetailActivity.class));
break;
default:
break;

View File

@ -0,0 +1,485 @@
package com.tairui.industrial_operation.widget;
import com.tairui.industrial_operation.R;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.RectF;
import android.text.TextPaint;
import android.util.AttributeSet;
import android.widget.ImageView;
@SuppressLint("AppCompatCustomView")
public class CustomRoundImageView extends ImageView {
private static final int LEFT_TOP = 0;
private static final int LEFT_BOTTOM = 1;
private static final int RIGHT_TOP = 2;
private static final int RIGHT_BOTTOM = 3;
private static final int SANS = 1;
private static final int SERIF = 2;
private static final int MONOSPACE = 3;
/**
* My paint.
*/
private Paint mPaint = null;
/**
* The Border width.
*/
private float borderWidth = 2;
/**
* The Border color.
*/
private int borderColor = Color.parseColor("#8A2BE2");
/**
* The Display border.
*/
private boolean displayBorder;
/**
* The Left top radius.
*/
private float leftTopRadius,
/**
* The Right top radius.
*/
rightTopRadius,
/**
* The Left bottom radius.
*/
leftBottomRadius,
/**
* The Right bottom radius.
*/
rightBottomRadius;
/**
* The Display type.
*/
private DisplayType displayType;
/**
* The text paint
*/
private TextPaint mTextPaint = null;
/**
* Text displayed on the label
*/
private String text;
/**
* The enum Display type.
*/
public enum DisplayType {
/**
* Normal display type.
*/
NORMAL(0),
/**
* Circle display type.
*/
CIRCLE(1),
/**
* Round rect display type.
*/
ROUND_RECT(2);
DisplayType(int type) {
this.type = type;
}
/**
* The Type.
*/
final int type;
}
/**
* The Display type array.
*/
private static final DisplayType[] displayTypeArray = {
DisplayType.NORMAL,
DisplayType.CIRCLE,
DisplayType.ROUND_RECT
};
/**
* Instantiates a new Round image view.
*
* @param context the Context
*/
public CustomRoundImageView(Context context) {
this(context, null);
}
/**
* Instantiates a new Round image view.
*
* @param context the Context
* @param attrs the AttributeSet
*/
public CustomRoundImageView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
/**
* Instantiates a new Round image view.
*
* @param context the Context
* @param attrs the AttributeSet
* @param defStyleAttr the default style Attribute
*/
public CustomRoundImageView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(context, attrs);
}
/**
* Init.
*
* @param ctx the Context
* @param attrs the AttributeSet
*/
private void init(Context ctx, AttributeSet attrs) {
setLayerType(LAYER_TYPE_HARDWARE, null);
mPaint = new Paint();
mTextPaint = new TextPaint();
if (attrs != null) {
TypedArray a = ctx.obtainStyledAttributes(attrs, R.styleable.RoundImageView);
borderWidth = a.getDimension(R.styleable.RoundImageView_borderWidth, borderWidth);
borderColor = a.getColor(R.styleable.RoundImageView_borderColor, borderColor);
displayBorder = a.getBoolean(R.styleable.RoundImageView_displayBorder, displayBorder);
leftTopRadius = a.getDimension(R.styleable.RoundImageView_leftTopRadius, leftTopRadius);
rightTopRadius = a.getDimension(R.styleable.RoundImageView_rightTopRadius, rightTopRadius);
leftBottomRadius = a.getDimension(R.styleable.RoundImageView_leftBottomRadius, leftBottomRadius);
rightBottomRadius = a.getDimension(R.styleable.RoundImageView_rightBottomRadius, rightBottomRadius);
float radius = a.getDimension(R.styleable.RoundImageView_radiusSize, 0);
if (radius > 0) {
leftTopRadius = leftBottomRadius = rightTopRadius = rightBottomRadius = radius;
}
int index = a.getInt(R.styleable.RoundImageView_displayType, -1);
if (index >= 0) {
displayType = displayTypeArray[index];
} else {
displayType = DisplayType.NORMAL;
}
setScaleType(ScaleType.CENTER_CROP);
a.recycle();
}
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int widthSize = MeasureSpec.getSize(widthMeasureSpec);
int heightSize = MeasureSpec.getSize(heightMeasureSpec);
if (displayType == DisplayType.CIRCLE) {
int measureSpec;
if (widthSize < heightSize) {
measureSpec = widthMeasureSpec;
} else {
measureSpec = heightMeasureSpec;
}
if (widthSize <= 0) {
measureSpec = heightMeasureSpec;
}
super.onMeasure(measureSpec, measureSpec);
} else {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
}
@SuppressLint("DrawAllocation")
@Override
protected void onDraw(Canvas canvas) {
if (getDrawable() != null) {
resetSize(Math.min(getWidth(), getHeight()) / 2f);
Bitmap bm = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_4444);
Canvas mCanvas = new Canvas(bm);
super.onDraw(mCanvas);
mPaint.reset();
mPaint.setAntiAlias(true);
mPaint.setDither(true);
drawMyContent(mCanvas);
canvas.drawBitmap(bm, 0, 0, mPaint);
bm.recycle();
} else {
super.onDraw(canvas);
}
}
/**
* Reset Size.
*
* @param size the size
*/
private void resetSize(float size) {
leftTopRadius = Math.min(leftTopRadius, size);
rightTopRadius = Math.min(rightTopRadius, size);
leftBottomRadius = Math.min(leftBottomRadius, size);
rightBottomRadius = Math.min(rightBottomRadius, size);
borderWidth = Math.min(borderWidth, size / 2);
}
/**
* Draw my content.
*
* @param mCanvas my canvas
*/
private void drawMyContent(Canvas mCanvas) {
if (displayType != DisplayType.NORMAL) {
mPaint.setStyle(Paint.Style.FILL);
mPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_OUT));
Path path = createPath();
path.setFillType(Path.FillType.INVERSE_EVEN_ODD);
mCanvas.drawPath(path, mPaint);
mPaint.setXfermode(null);
}
if (displayBorder) {
drawBorders(mCanvas);
}
}
/**
* Draw borders.
*
* @param mCanvas my canvas
*/
private void drawBorders(Canvas mCanvas) {
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setColor(borderColor);
mPaint.setStrokeWidth(borderWidth);
Path path = createPath();
mCanvas.drawPath(path, mPaint);
}
/**
* Create path.
*
* @return the path
*/
private Path createPath() {
Path mPath = new Path();
float size = borderWidth / 2;
switch (displayType) {
case CIRCLE:
mPath.addCircle(getWidth() / 2f, getHeight() / 2f, getWidth() / 2f - size, Path.Direction.CW);
break;
case ROUND_RECT:
RectF rectF = new RectF(0, 0, getWidth(), getHeight());
rectF.inset(size, size);
mPath.addRoundRect(rectF,
new float[]{
leftTopRadius, leftTopRadius,
rightTopRadius, rightTopRadius,
rightBottomRadius, rightBottomRadius,
leftBottomRadius, leftBottomRadius},
Path.Direction.CW);
break;
default:
RectF rect = new RectF(0, 0, getWidth(), getHeight());
rect.inset(size, size);
mPath.addRect(rect, Path.Direction.CW);
break;
}
return mPath;
}
/**
* Sets border color.
*
* @param borderColor the border color
*/
public void setBorderColor(int borderColor) {
if (this.borderColor != borderColor) {
this.borderColor = borderColor;
if (displayBorder) {
postInvalidate();
}
}
}
/**
* Is display border boolean.
*
* @return the boolean
*/
public boolean isDisplayBorder() {
return displayBorder;
}
/**
* Sets display border.
*
* @param displayBorder the display border
*/
public void setDisplayBorder(boolean displayBorder) {
if (this.displayBorder != displayBorder) {
this.displayBorder = displayBorder;
postInvalidate();
}
}
/**
* Gets left top radius.
*
* @return the left top radius
*/
public float getLeftTopRadius() {
return leftTopRadius;
}
/**
* Sets left top radius.
*
* @param leftTopRadius the left top radius
*/
public void setLeftTopRadius(float leftTopRadius) {
if (this.leftTopRadius != leftTopRadius) {
this.leftTopRadius = leftTopRadius;
if (displayType != DisplayType.NORMAL) {
postInvalidate();
}
}
}
/**
* Gets right top radius.
*
* @return the right top radius
*/
public float getRightTopRadius() {
return rightTopRadius;
}
/**
* Sets right top radius.
*
* @param rightTopRadius the right top radius
*/
public void setRightTopRadius(float rightTopRadius) {
if (this.rightTopRadius != rightTopRadius) {
this.rightTopRadius = rightTopRadius;
if (displayType != DisplayType.NORMAL) {
postInvalidate();
}
}
}
/**
* Gets left bottom radius.
*
* @return the left bottom radius
*/
public float getLeftBottomRadius() {
return leftBottomRadius;
}
/**
* Sets left bottom radius.
*
* @param leftBottomRadius the left bottom radius
*/
public void setLeftBottomRadius(float leftBottomRadius) {
if (this.leftBottomRadius != leftBottomRadius) {
this.leftBottomRadius = leftBottomRadius;
if (displayType != DisplayType.NORMAL) {
postInvalidate();
}
}
}
/**
* Gets right bottom radius.
*
* @return the right bottom radius
*/
public float getRightBottomRadius() {
return rightBottomRadius;
}
/**
* Sets right bottom radius.
*
* @param rightBottomRadius the right bottom radius
*/
public void setRightBottomRadius(float rightBottomRadius) {
if (this.rightBottomRadius != rightBottomRadius) {
this.rightBottomRadius = rightBottomRadius;
if (displayType != DisplayType.NORMAL) {
postInvalidate();
}
}
}
/**
* Sets radius.
*
* @param leftTopRadius the left top radius
* @param rightTopRadius the right top radius
* @param leftBottomRadius the left bottom radius
* @param rightBottomRadius the right bottom radius
*/
public void setRadius(float leftTopRadius, float rightTopRadius, float leftBottomRadius, float rightBottomRadius) {
if (this.leftTopRadius == leftTopRadius
&& this.rightTopRadius == rightTopRadius
&& this.leftBottomRadius == leftBottomRadius
&& this.rightBottomRadius == rightBottomRadius) {
return;
}
this.leftTopRadius = leftTopRadius;
this.rightTopRadius = rightTopRadius;
this.leftBottomRadius = leftBottomRadius;
this.rightBottomRadius = rightBottomRadius;
if (displayType != DisplayType.NORMAL) {
postInvalidate();
}
}
/**
* Sets radius.
*
* @param radius the radius
*/
public void setRadius(float radius) {
setRadius(radius, radius, radius, radius);
}
/**
* Gets display type.
*
* @return the display type
*/
public DisplayType getDisplayType() {
return displayType;
}
/**
* Sets display type.
*
* @return the display type
*/
public void setDisplayType(DisplayType _displayType) {
displayType = _displayType;
if (displayType != DisplayType.NORMAL) {
postInvalidate();
}
}
}

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:bottomLeftRadius="5dp"
android:bottomRightRadius="5dp"
android:topLeftRadius="5dp"
android:topRightRadius="5dp" />
<stroke
android:width="1dp"
android:color="@color/color_txt_label" />
</shape>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/color_txt_green" />
<corners
android:bottomLeftRadius="0dp"
android:bottomRightRadius="30dp"
android:topLeftRadius="0dp"
android:topRightRadius="30dp" />
</shape>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#F8F8F8" />
<corners
android:bottomLeftRadius="30dp"
android:bottomRightRadius="30dp"
android:topLeftRadius="30dp"
android:topRightRadius="30dp" />
</shape>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#E8F9F2" />
<corners
android:bottomLeftRadius="30dp"
android:bottomRightRadius="0dp"
android:topLeftRadius="30dp"
android:topRightRadius="0dp" />
</shape>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:bottomLeftRadius="30dp"
android:bottomRightRadius="30dp"
android:topLeftRadius="30dp"
android:topRightRadius="30dp" />
<solid android:color="@color/color_txt_red" />
</shape>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:bottomLeftRadius="30dp"
android:bottomRightRadius="30dp"
android:topLeftRadius="30dp"
android:topRightRadius="30dp" />
<solid android:color="#ECC04F" />
</shape>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/color_txt_red" />
<size
android:width="@dimen/marin_small"
android:height="@dimen/marin_small" />
</shape>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/half_transparent" />
<size
android:width="24dp"
android:height="24dp" />
</shape>

View File

@ -0,0 +1,404 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_f8f8f8">
<com.tairui.industrial_operation.widget.statusbar.StatusBarHeightView
android:id="@+id/statusbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/bottomLayout"
android:layout_width="match_parent"
android:layout_height="68dp"
android:background="@color/white"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingRight="16dp"
app:layout_constraintBottom_toBottomOf="parent">
<LinearLayout
android:id="@+id/btnHome"
android:layout_width="40dp"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@mipmap/ic_home" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="首页"
android:textColor="@color/color_txt_black"
android:textSize="10sp" />
</LinearLayout>
<LinearLayout
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_marginLeft="12dp"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@mipmap/ic_service" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="客服"
android:textColor="@color/color_txt_black"
android:textSize="10sp" />
</LinearLayout>
<LinearLayout
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_marginLeft="12dp"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@mipmap/ic_shopcart_black" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="购物车"
android:textColor="@color/color_txt_black"
android:textSize="10sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="16dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/bg_container_light_green_left_raduis_30"
android:gravity="center"
android:text="加入购物车"
android:textColor="@color/color_txt_green"
android:textSize="16sp" />
<TextView
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/bg_container_green_right_raduis_30"
android:gravity="center"
android:text="立即购买"
android:textColor="@color/white"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@color/color_f8f8f8"
app:layout_constraintBottom_toTopOf="@id/bottomLayout"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/img"
android:layout_width="match_parent"
android:layout_height="0dp"
android:src="@mipmap/pic_goods_detail_1"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintTop_toTopOf="parent" />
<FrameLayout
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_margin="16dp"
android:background="@drawable/bg_gray_round"
app:layout_constraintBottom_toBottomOf="@id/img"
app:layout_constraintLeft_toLeftOf="@id/img">
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="center"
android:src="@mipmap/ic_voice" />
</FrameLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="@id/img"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="视频"
android:textColor="@color/color_txt_green"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:text="图片"
android:textColor="@color/color_txt_label"
android:textSize="16sp" />
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@mipmap/bg_goods_detail_barcode"
app:layout_constraintDimensionRatio="390:86"
app:layout_constraintTop_toBottomOf="@id/img">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="left"
android:layout_marginLeft="16dp"
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="当前价格:"
android:textColor="@color/white"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="¥2.90"
android:textColor="@color/white"
android:textSize="26sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="right"
android:layout_marginRight="16dp"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="商品溯源码"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="italic|bold" />
<ImageView
android:layout_width="46dp"
android:layout_height="46dp"
android:layout_marginTop="8dp"
android:src="@mipmap/pic_goods_detail_2" />
</LinearLayout>
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:text="耿马普罗旺斯西红柿沙瓤番茄甄选番茄西红柿"
android:textColor="@color/color_txt_black"
android:textSize="18sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_container_gray_border_raduis_5"
android:paddingLeft="4dp"
android:paddingTop="2dp"
android:paddingRight="4dp"
android:paddingBottom="2dp"
android:text="已售 5154"
android:textColor="@color/color_txt_black"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:background="@drawable/bg_container_gray_border_raduis_5"
android:paddingLeft="4dp"
android:paddingTop="2dp"
android:paddingRight="4dp"
android:paddingBottom="2dp"
android:text="地标性产品"
android:textColor="@color/color_txt_black"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:background="@drawable/bg_container_gray_border_raduis_5"
android:paddingLeft="4dp"
android:paddingTop="2dp"
android:paddingRight="4dp"
android:paddingBottom="2dp"
android:text="应季果蔬"
android:textColor="@color/color_txt_black"
android:textSize="12sp" />
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="12dp"
android:layout_marginRight="16dp">
<ImageView
android:id="@+id/baozhang"
android:layout_width="match_parent"
android:layout_height="0dp"
android:src="@mipmap/pic_goods_detail_3"
app:layout_constraintDimensionRatio="358:192"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="12dp"
android:layout_marginRight="16dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="0dp"
android:src="@mipmap/pic_goods_detail_4"
app:layout_constraintDimensionRatio="358:471"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="12dp"
android:layout_marginRight="16dp">
<ImageView
android:id="@+id/canshu"
android:layout_width="match_parent"
android:layout_height="0dp"
android:src="@mipmap/pic_goods_detail_5"
app:layout_constraintDimensionRatio="358:142"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="12dp"
android:text="图文详情"
android:textColor="@color/color_txt_black"
android:textSize="16sp"
android:textStyle="bold" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="0dp"
android:src="@mipmap/pic_goods_detail_6"
app:layout_constraintDimensionRatio="358:1678"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<ImageView
android:id="@+id/btnBack"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginLeft="16dp"
android:padding="4dp"
android:src="@mipmap/ic_back_black"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/statusbar" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,381 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/banner_detail_goods"
android:layout_width="match_parent"
android:layout_height="0dp"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:id="@+id/img_default_detail_goods"
android:layout_width="match_parent"
android:layout_height="280dp"
android:background="@color/color_f8f8f8"
android:scaleType="centerCrop"
android:visibility="gone" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:paddingLeft="15dp"
android:paddingRight="15dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true">
<TextView
android:id="@+id/price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:gravity="bottom"
android:text="¥188"
android:textColor="@color/color_txt_red"
android:textSize="21sp"
android:textStyle="bold" />
<TextView
android:id="@+id/market_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/price"
android:layout_marginLeft="10dp"
android:layout_marginBottom="3dp"
android:layout_toRightOf="@id/price"
android:gravity="bottom"
android:text="¥188"
android:textColor="@color/color_txt_label"
android:textSize="12sp" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/coupon_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/price"
android:layout_marginTop="12dp"
android:visibility="gone"
tools:visibility="visible">
<LinearLayout
android:id="@+id/more_coupon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_container_light_gray_raduis_10"
android:gravity="center"
android:orientation="horizontal"
android:paddingLeft="6dp"
android:paddingTop="1dp"
android:paddingBottom="1dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:text="优惠详情"
android:textColor="@color/color_txt_red"
android:textSize="12sp" />
<ImageView
android:layout_width="18dp"
android:layout_height="18dp"
android:src="@mipmap/ic_arrow_right_gray" />
</LinearLayout>
<com.tairui.industrial_operation.widget.flowlayout.TagFlowLayout
android:id="@+id/coupon_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/more_coupon"
app:layout_constraintTop_toTopOf="parent"
app:max_select="-1" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lineSpacingExtra="3dp"
android:maxLines="2"
android:textColor="@color/color_txt_black"
android:textSize="16sp"
android:textStyle="bold"
tools:text="123123123" />
<com.tairui.industrial_operation.widget.flowlayout.TagFlowLayout
android:id="@+id/tag_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/title"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
app:max_select="-1" />
</RelativeLayout>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="15dp"
android:background="@color/color_f8f8f8" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="40dp">
<TextView
android:id="@+id/express_label"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:text="快递"
android:textColor="@color/color_txt_black"
android:textSize="12sp" />
<TextView
android:id="@+id/express_value"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_toRightOf="@id/express_label"
android:gravity="center"
android:text="0.00"
android:textColor="@color/color_txt_black"
android:textSize="12sp" />
<TextView
android:id="@+id/sale_count"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:gravity="center"
android:text="月销20"
android:textColor="@color/color_txt_label"
android:textSize="12sp" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/color_f8f8f8" />
<RelativeLayout
android:id="@+id/attr_layout"
android:layout_width="match_parent"
android:layout_height="40dp">
<TextView
android:id="@+id/attr_label"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:text="选择"
android:textColor="@color/color_txt_black"
android:textSize="12sp" />
<TextView
android:id="@+id/attr_value"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_toRightOf="@id/attr_label"
android:ellipsize="end"
android:gravity="center"
android:hint="请选择规格"
android:maxLines="1"
android:textColor="@color/color_txt_black"
android:textColorHint="@color/color_txt_label"
android:textSize="12sp" />
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="8dp"
android:src="@mipmap/ic_arrow_right_gray" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/color_f8f8f8" />
<RelativeLayout
android:id="@+id/service_layout"
android:layout_width="match_parent"
android:layout_height="40dp">
<TextView
android:id="@+id/service_label"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:text="服务"
android:textColor="@color/color_txt_black"
android:textSize="12sp" />
<TextView
android:id="@+id/service_value"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_toRightOf="@id/service_label"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:textColor="@color/color_txt_black"
android:textSize="12sp" />
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="8dp"
android:src="@mipmap/ic_arrow_right_gray" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="10dp"
android:background="@color/color_f8f8f8" />
<RelativeLayout
android:id="@+id/shop_layout"
android:layout_width="match_parent"
android:layout_height="59dp"
android:background="@color/white">
<com.tairui.industrial_operation.widget.CustomRoundImageView
android:id="@+id/shop_logo"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:scaleType="centerCrop"
app:displayBorder="false"
app:displayType="circle" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:layout_toRightOf="@id/shop_logo"
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
android:id="@+id/shop_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/color_txt_black"
android:textSize="14sp" />
<TextView
android:id="@+id/shop_category"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:textColor="@color/color_tv_content"
android:textSize="12sp" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="15dp"
android:background="@drawable/bg_container_home_raduis"
android:paddingLeft="10dp"
android:paddingTop="2dp"
android:paddingRight="10dp"
android:paddingBottom="2dp"
android:text="进店"
android:textColor="@color/white"
android:textSize="12sp" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="10dp"
android:background="@color/color_f8f8f8" />
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/white"
android:gravity="center_vertical"
android:paddingLeft="15dp"
android:text="商品详情"
android:textColor="@color/color_txt_black"
android:textSize="15sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/color_f8f8f8" />
<WebView
android:id="@+id/goods_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:padding="15dp" />
</LinearLayout>

View File

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="服务保障"
android:textColor="@color/color_txt_black"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:drawableRight="@mipmap/ic_arrow_right_black_small"
android:drawablePadding="4dp"
android:text="15天保价"
android:textColor="@color/color_txt_black"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="购买后15天内若商品降价我们将主动通知并为您补偿差价下单更安心部分特定场景除外。"
android:textColor="@color/color_txt_label"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:drawableRight="@mipmap/ic_arrow_right_black_small"
android:drawablePadding="4dp"
android:text="破损包赔"
android:textColor="@color/color_txt_black"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="签收时发现运输损坏立即拍照反馈我们24小时内闪电理赔让您买得放心"
android:textColor="@color/color_txt_label"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:drawableRight="@mipmap/ic_arrow_right_black_small"
android:drawablePadding="4dp"
android:text="7天无理由退货"
android:textColor="@color/color_txt_black"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="收到不满意包装完好、未拆封不影响销售7天内联系客服即可无忧退货退款。"
android:textColor="@color/color_txt_label"
android:textSize="14sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="52dp"
android:layout_marginTop="100dp"
android:background="@drawable/bg_container_green_raduis_30"
android:gravity="center"
android:text="确定"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>

View File

@ -0,0 +1,210 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="参数"
android:textColor="@color/color_txt_black"
android:textSize="18sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:background="@drawable/bg_container_light_gray_raduis_10"
android:orientation="vertical"
android:padding="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="蔬菜"
android:textColor="@color/color_txt_label"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="储存条件"
android:textColor="@color/color_txt_label"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="西红柿"
android:textColor="@color/color_txt_black"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="冷藏"
android:textColor="@color/color_txt_black"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="有机"
android:textColor="@color/color_txt_label"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="公共品牌"
android:textColor="@color/color_txt_label"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="否"
android:textColor="@color/color_txt_black"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="暂无"
android:textColor="@color/color_txt_black"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="产地"
android:textColor="@color/color_txt_label"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="中国大陆"
android:textColor="@color/color_txt_black"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="省份"
android:textColor="@color/color_txt_label"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="云南省"
android:textColor="@color/color_txt_black"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="包装方式"
android:textColor="@color/color_txt_label"
android:textSize="14sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="食用农产品"
android:textColor="@color/color_txt_black"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="52dp"
android:layout_marginTop="100dp"
android:background="@drawable/bg_container_green_raduis_30"
android:gravity="center"
android:text="确定"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 947 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 MiB

View File

@ -38,4 +38,22 @@
<enum name="right" value="1" />
</attr>
</declare-styleable>
<!--qrCodeScan end-->
<declare-styleable name="RoundImageView">
<attr name="borderWidth" format="dimension" />
<attr name="borderColor" format="color" />
<attr name="displayBorder" format="boolean" />
<attr name="need_cover" format="boolean" />
<attr name="radiusSize" format="dimension" />
<attr name="leftTopRadius" format="dimension" />
<attr name="rightTopRadius" format="dimension" />
<attr name="leftBottomRadius" format="dimension" />
<attr name="rightBottomRadius" format="dimension" />
<attr name="displayType" format="enum">
<enum name="normal" value="0" />
<enum name="circle" value="1" />
<enum name="round_rect" value="2" />
</attr>
</declare-styleable>
</resources>