商城二级列表;我的首页
@ -183,6 +183,16 @@
|
||||
android:configChanges="orientation|screenSize|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.mall.ShopCartActivity"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.mall.SubGoodsListActivity"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
|
||||
<activity
|
||||
|
@ -86,14 +86,11 @@ public class MainActivity extends BaseActivity<ActivityMainBinding> {
|
||||
@Override
|
||||
public void onTabSelect(int position) {
|
||||
binding.vpContent.setCurrentItem(position);
|
||||
if (position == 0 || position == 4) {
|
||||
if (position == 0 || position == 1) {
|
||||
ImmersionBar.with(MainActivity.this).fitsSystemWindows(false).transparentStatusBar()
|
||||
.statusBarDarkFont(false).init();
|
||||
} else if (position == 1) {
|
||||
ImmersionBar.with(MainActivity.this).fitsSystemWindows(false).transparentStatusBar()
|
||||
.statusBarDarkFont(true).init();
|
||||
} else {
|
||||
ImmersionBar.with(MainActivity.this).fitsSystemWindows(true).statusBarColor(getStatusBarColor())
|
||||
ImmersionBar.with(MainActivity.this).fitsSystemWindows(false).transparentStatusBar()
|
||||
.statusBarDarkFont(true).init();
|
||||
}
|
||||
}
|
||||
@ -112,14 +109,11 @@ public class MainActivity extends BaseActivity<ActivityMainBinding> {
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
binding.mainTab.setCurrentTab(position);
|
||||
if (position == 0 || position == 4) {
|
||||
if (position == 0 || position == 1) {
|
||||
ImmersionBar.with(MainActivity.this).fitsSystemWindows(false).transparentStatusBar()
|
||||
.statusBarDarkFont(false).init();
|
||||
} else if (position == 1) {
|
||||
ImmersionBar.with(MainActivity.this).fitsSystemWindows(false).transparentStatusBar()
|
||||
.statusBarDarkFont(true).init();
|
||||
} else {
|
||||
ImmersionBar.with(MainActivity.this).fitsSystemWindows(true).statusBarColor(getStatusBarColor())
|
||||
ImmersionBar.with(MainActivity.this).fitsSystemWindows(false).transparentStatusBar()
|
||||
.statusBarDarkFont(true).init();
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ 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.IntentUtil;
|
||||
import com.tairui.industrial_operation.util.SingleClickListener;
|
||||
|
||||
import android.os.Bundle;
|
||||
@ -90,6 +91,24 @@ public class GoodsDetailActivity extends BaseActivity<ActivityGoodsDetailBinding
|
||||
}).setBackgroundColor(getResColor(R.color.white)).show();
|
||||
}
|
||||
});
|
||||
binding.pingjia.setOnClickListener(new SingleClickListener() {
|
||||
@Override
|
||||
protected void onSingleClick(View v) {
|
||||
new BottomDialog("", "", new OnBindView<BottomDialog>(
|
||||
R.layout.layout_dialog_pingjia) {
|
||||
@Override
|
||||
public void onBind(BottomDialog dialog, View v) {
|
||||
v.setOnClickListener(v1 -> dialog.dismiss());
|
||||
}
|
||||
}).setBackgroundColor(getResColor(R.color.white)).show();
|
||||
}
|
||||
});
|
||||
binding.btnShopCart.setOnClickListener(new SingleClickListener() {
|
||||
@Override
|
||||
protected void onSingleClick(View v) {
|
||||
IntentUtil.startActivity(mContext, ShopCartActivity.class);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -14,6 +14,7 @@ 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.util.SingleClickListener;
|
||||
import com.tairui.industrial_operation.widget.RefreshRecyclerView;
|
||||
|
||||
import android.view.View;
|
||||
@ -58,6 +59,12 @@ public class MallFragment extends BaseFragment<FragmentMallBinding> {
|
||||
requestData(false);
|
||||
}
|
||||
});
|
||||
binding.btnShopCart.setOnClickListener(new SingleClickListener() {
|
||||
@Override
|
||||
protected void onSingleClick(View v) {
|
||||
IntentUtil.startActivity(mContext, ShopCartActivity.class);
|
||||
}
|
||||
});
|
||||
adapter.setOnItemClickListener((baseQuickAdapter, view, i) -> {
|
||||
// Bundle bundle = new Bundle();
|
||||
// bundle.putSerializable("data", (Serializable) adapter.getItem(i));
|
||||
|
@ -0,0 +1,94 @@
|
||||
package com.tairui.industrial_operation.ui.mall;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
import com.tairui.industrial_operation.R;
|
||||
import com.tairui.industrial_operation.base.BaseActivity;
|
||||
import com.tairui.industrial_operation.databinding.ActivityShopCartBinding;
|
||||
import com.tairui.industrial_operation.ui.mall.entity.ShopCartEntity;
|
||||
import com.tairui.industrial_operation.util.AppUtil;
|
||||
import com.tairui.industrial_operation.util.SingleClickListener;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
public class ShopCartActivity extends BaseActivity<ActivityShopCartBinding> {
|
||||
|
||||
private ShopCartAdapter adapter;
|
||||
|
||||
@Override
|
||||
protected Class<ActivityShopCartBinding> getBindingClass() {
|
||||
return ActivityShopCartBinding.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initStatusBar() {
|
||||
ImmersionBar.with(this).fitsSystemWindows(false).transparentStatusBar()
|
||||
.statusBarDarkFont(true).init();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onQueryArguments() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onBindListener() {
|
||||
binding.btnBack.setOnClickListener(new SingleClickListener() {
|
||||
@Override
|
||||
protected void onSingleClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFindView(Bundle savedInstanceState) {
|
||||
binding.refreshRecycler.setLayoutManager(new LinearLayoutManager(mContext));
|
||||
adapter = new ShopCartAdapter();
|
||||
binding.refreshRecycler.setAdapter(adapter);
|
||||
binding.refreshRecycler.setEnableRefresh(false);
|
||||
binding.refreshRecycler.setNoMoreData(true);
|
||||
adapter.setOnItemClickListener((baseQuickAdapter, view, i) -> {
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onApplyData() {
|
||||
requestData();
|
||||
}
|
||||
|
||||
private void requestData() {
|
||||
String dataStr = AppUtil.loadJsonFromRaw(mContext, R.raw.shop_cart);
|
||||
Gson gson = new Gson();
|
||||
List<ShopCartEntity> data = gson.fromJson(dataStr, new TypeToken<List<ShopCartEntity>>() {
|
||||
}.getType());
|
||||
adapter.setNewData(data);
|
||||
setText(binding.title, "购物车(" + data.size() + ")");
|
||||
binding.refreshRecycler.showContent();
|
||||
}
|
||||
|
||||
private class ShopCartAdapter extends BaseQuickAdapter<ShopCartEntity, BaseViewHolder> {
|
||||
|
||||
public ShopCartAdapter() {
|
||||
super(R.layout.item_shop_cart);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(@NonNull BaseViewHolder holder, ShopCartEntity entity) {
|
||||
holder.setImageResource(R.id.image, AppUtil.getDrawableId(entity.getImgRes()));
|
||||
holder.setText(R.id.name, entity.getName());
|
||||
holder.setText(R.id.price, "¥" + entity.getPrice());
|
||||
holder.setText(R.id.tvSku, "¥" + entity.getSku());
|
||||
holder.setText(R.id.count, String.valueOf(entity.getCount()));
|
||||
holder.setImageResource(R.id.checkbox, entity.isSelect() ? R.mipmap.ic_checkbox_checked : R.mipmap.ic_checkbox_uncheck);
|
||||
holder.addOnClickListener(R.id.checkbox, R.id.btnMinus, R.id.btnPlus);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,198 @@
|
||||
package com.tairui.industrial_operation.ui.mall;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
import com.tairui.industrial_operation.R;
|
||||
import com.tairui.industrial_operation.base.BaseActivity;
|
||||
import com.tairui.industrial_operation.databinding.ActivitySubGoodsListBinding;
|
||||
import com.tairui.industrial_operation.ui.mall.entity.SubGoodsEntity;
|
||||
import com.tairui.industrial_operation.util.AppUtil;
|
||||
import com.tairui.industrial_operation.util.IntentUtil;
|
||||
import com.tairui.industrial_operation.util.SingleClickListener;
|
||||
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
public class SubGoodsListActivity extends BaseActivity<ActivitySubGoodsListBinding> {
|
||||
|
||||
private TabAdapter tabAdapter;
|
||||
private SubGoodsAdapter adapter;
|
||||
private CategoryAdapter categoryAdapter;
|
||||
|
||||
private int selectTabIndex = 0;
|
||||
private int selectCategoryIndex = 0;
|
||||
|
||||
@Override
|
||||
protected Class<ActivitySubGoodsListBinding> getBindingClass() {
|
||||
return ActivitySubGoodsListBinding.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initStatusBar() {
|
||||
ImmersionBar.with(this).fitsSystemWindows(false).transparentStatusBar().statusBarDarkFont(true).init();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onQueryArguments() {
|
||||
selectTabIndex = getIntent().getIntExtra("tab_index", 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFindView(Bundle savedInstanceState) {
|
||||
binding.tabRecycler.setLayoutManager(new LinearLayoutManager(mContext, RecyclerView.HORIZONTAL, false));
|
||||
tabAdapter = new TabAdapter();
|
||||
binding.tabRecycler.setAdapter(tabAdapter);
|
||||
|
||||
binding.categoryList.setLayoutManager(new LinearLayoutManager(mContext));
|
||||
categoryAdapter = new CategoryAdapter();
|
||||
binding.categoryList.setAdapter(categoryAdapter);
|
||||
|
||||
binding.refreshRecycler.setLayoutManager(new LinearLayoutManager(mContext));
|
||||
adapter = new SubGoodsAdapter();
|
||||
binding.refreshRecycler.setAdapter(adapter);
|
||||
binding.refreshRecycler.setEnableRefresh(false);
|
||||
binding.refreshRecycler.setNoMoreData(true);
|
||||
adapter.setOnItemClickListener((baseQuickAdapter, view, i) -> {
|
||||
IntentUtil.startActivity(mContext, GoodsDetailActivity.class);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onBindListener() {
|
||||
binding.btnBack.setOnClickListener(new SingleClickListener() {
|
||||
@Override
|
||||
protected void onSingleClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
binding.btnShopCart.setOnClickListener(new SingleClickListener() {
|
||||
@Override
|
||||
protected void onSingleClick(View v) {
|
||||
IntentUtil.startActivity(mContext, ShopCartActivity.class);
|
||||
}
|
||||
});
|
||||
tabAdapter.setOnItemClickListener((baseQuickAdapter, view, i) -> {
|
||||
selectTabIndex = i;
|
||||
selectTab(selectTabIndex);
|
||||
});
|
||||
categoryAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(BaseQuickAdapter baseQuickAdapter, View view, int i) {
|
||||
selectCategoryIndex = i;
|
||||
selectCateGory(selectCategoryIndex);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onApplyData() {
|
||||
requestData();
|
||||
}
|
||||
|
||||
private void requestData() {
|
||||
String dataStr = AppUtil.loadJsonFromRaw(mContext, R.raw.sub_goods);
|
||||
Gson gson = new Gson();
|
||||
List<SubGoodsEntity> data = gson.fromJson(dataStr, new TypeToken<List<SubGoodsEntity>>() {
|
||||
}.getType());
|
||||
tabAdapter.setNewData(data);
|
||||
selectTab(selectTabIndex);
|
||||
}
|
||||
|
||||
private void selectTab(int index) {
|
||||
for (int i = 0; i < tabAdapter.getData().size(); i++) {
|
||||
if (index == i) {
|
||||
tabAdapter.getData().get(i).setSelect(true);
|
||||
categoryAdapter.setNewData(tabAdapter.getData().get(i).getCategorys());
|
||||
selectCateGory(0);
|
||||
} else {
|
||||
tabAdapter.getData().get(i).setSelect(false);
|
||||
}
|
||||
}
|
||||
tabAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
private void selectCateGory(int index) {
|
||||
selectCategoryIndex = index;
|
||||
categoryAdapter.notifyDataSetChanged();
|
||||
if (selectCategoryIndex == 0) {
|
||||
adapter.setNewData(tabAdapter.getData().get(selectTabIndex).getGoods());
|
||||
binding.refreshRecycler.showContent();
|
||||
} else {
|
||||
List<SubGoodsEntity.GoodsEntity> filterGoods = new ArrayList<>();
|
||||
String category = tabAdapter.getData().get(selectTabIndex).getCategorys().get(selectCategoryIndex);
|
||||
for (SubGoodsEntity.GoodsEntity item : tabAdapter.getData().get(selectTabIndex).getGoods()) {
|
||||
if (category.equals(item.getCategory())) {
|
||||
filterGoods.add(item);
|
||||
}
|
||||
}
|
||||
adapter.setNewData(filterGoods);
|
||||
if (filterGoods.size() > 0) {
|
||||
binding.refreshRecycler.showContent();
|
||||
} else {
|
||||
binding.refreshRecycler.showError();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class TabAdapter extends BaseQuickAdapter<SubGoodsEntity, BaseViewHolder> {
|
||||
|
||||
public TabAdapter() {
|
||||
super(R.layout.item_sub_goods_tab);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(@NonNull BaseViewHolder holder, SubGoodsEntity entity) {
|
||||
holder.setImageResource(R.id.img, AppUtil.getDrawableId(entity.getImgRes()));
|
||||
holder.setText(R.id.title, entity.getName());
|
||||
TextView tvTitle = holder.getView(R.id.title);
|
||||
tvTitle.setTypeface(null, entity.isSelect() ? Typeface.BOLD : Typeface.NORMAL);
|
||||
holder.setGone(R.id.titleBg, entity.isSelect() ? true : false);
|
||||
}
|
||||
}
|
||||
|
||||
private class CategoryAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
|
||||
|
||||
public CategoryAdapter() {
|
||||
super(R.layout.item_sub_goods_category);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(@NonNull BaseViewHolder holder, String entity) {
|
||||
holder.setText(R.id.name, entity);
|
||||
holder.setTextColor(R.id.name,
|
||||
getResColor(selectCategoryIndex == holder.getLayoutPosition() ? R.color.color_txt_green : R.color.color_txt_black));
|
||||
holder.setBackgroundColor(R.id.name,
|
||||
getResColor(selectCategoryIndex == holder.getLayoutPosition() ? R.color.white : R.color.color_f5f5f5));
|
||||
TextView tvTitle = holder.getView(R.id.name);
|
||||
tvTitle.setTypeface(null, selectCategoryIndex == holder.getLayoutPosition() ? Typeface.BOLD : Typeface.NORMAL);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private class SubGoodsAdapter extends BaseQuickAdapter<SubGoodsEntity.GoodsEntity, BaseViewHolder> {
|
||||
|
||||
public SubGoodsAdapter() {
|
||||
super(R.layout.item_sub_goods);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(@NonNull BaseViewHolder holder, SubGoodsEntity.GoodsEntity entity) {
|
||||
holder.setImageResource(R.id.image, AppUtil.getDrawableId(entity.getImgRes()));
|
||||
holder.setText(R.id.name, entity.getName());
|
||||
holder.setText(R.id.price, "¥" + entity.getPrice());
|
||||
holder.setText(R.id.tvSku, "¥" + entity.getSku());
|
||||
holder.addOnClickListener(R.id.checkbox, R.id.btnMinus, R.id.btnPlus);
|
||||
}
|
||||
}
|
||||
}
|
@ -9,10 +9,12 @@ 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.ui.mall.SubGoodsListActivity;
|
||||
import com.tairui.industrial_operation.util.DensityUtils;
|
||||
import com.tairui.industrial_operation.util.IntentUtil;
|
||||
import com.tairui.industrial_operation.widget.GridSpacingItemDecoration;
|
||||
|
||||
import android.os.Bundle;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@ -48,6 +50,9 @@ public class MallAdapter extends BaseMultiItemQuickAdapter<BaseHolderEntity, Bas
|
||||
funcAdapter.setNewData((List<BaseHolderEntity>) entity.getData());
|
||||
funcRecycler.setAdapter(funcAdapter);
|
||||
funcAdapter.setOnItemClickListener((baseQuickAdapter, view, i) -> {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt("tab_index", i);
|
||||
IntentUtil.startActivity(mContext, SubGoodsListActivity.class, bundle);
|
||||
});
|
||||
break;
|
||||
case TYPE_GOODS:
|
||||
|
@ -0,0 +1,66 @@
|
||||
package com.tairui.industrial_operation.ui.mall.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ShopCartEntity implements Serializable {
|
||||
|
||||
private String imgRes;
|
||||
|
||||
private String name;
|
||||
|
||||
private String price;
|
||||
|
||||
private String sku;
|
||||
|
||||
private int count = 1;
|
||||
|
||||
private boolean select = false;
|
||||
|
||||
public String getImgRes() {
|
||||
return imgRes;
|
||||
}
|
||||
|
||||
public void setImgRes(String imgRes) {
|
||||
this.imgRes = imgRes;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(String price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getSku() {
|
||||
return sku;
|
||||
}
|
||||
|
||||
public void setSku(String sku) {
|
||||
this.sku = sku;
|
||||
}
|
||||
|
||||
public int getCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
public void setCount(int count) {
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
public boolean isSelect() {
|
||||
return select;
|
||||
}
|
||||
|
||||
public void setSelect(boolean select) {
|
||||
this.select = select;
|
||||
}
|
||||
}
|
@ -0,0 +1,112 @@
|
||||
package com.tairui.industrial_operation.ui.mall.entity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class SubGoodsEntity {
|
||||
|
||||
@SerializedName("name")
|
||||
private String name;
|
||||
@SerializedName("imgRes")
|
||||
private String imgRes;
|
||||
@SerializedName("categorys")
|
||||
private List<String> categorys;
|
||||
@SerializedName("goods")
|
||||
private List<GoodsEntity> goods;
|
||||
@SerializedName("select")
|
||||
private boolean select = false;
|
||||
|
||||
public boolean isSelect() {
|
||||
return select;
|
||||
}
|
||||
|
||||
public void setSelect(boolean select) {
|
||||
this.select = select;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getImgRes() {
|
||||
return imgRes;
|
||||
}
|
||||
|
||||
public void setImgRes(String imgRes) {
|
||||
this.imgRes = imgRes;
|
||||
}
|
||||
|
||||
public List<String> getCategorys() {
|
||||
return categorys;
|
||||
}
|
||||
|
||||
public void setCategorys(List<String> categorys) {
|
||||
this.categorys = categorys;
|
||||
}
|
||||
|
||||
public List<GoodsEntity> getGoods() {
|
||||
return goods;
|
||||
}
|
||||
|
||||
public void setGoods(List<GoodsEntity> goods) {
|
||||
this.goods = goods;
|
||||
}
|
||||
|
||||
public static class GoodsEntity {
|
||||
@SerializedName("name")
|
||||
private String name;
|
||||
@SerializedName("imgRes")
|
||||
private String imgRes;
|
||||
@SerializedName("price")
|
||||
private String price;
|
||||
@SerializedName("category")
|
||||
private String category;
|
||||
@SerializedName("sku")
|
||||
private String sku;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getImgRes() {
|
||||
return imgRes;
|
||||
}
|
||||
|
||||
public void setImgRes(String imgRes) {
|
||||
this.imgRes = imgRes;
|
||||
}
|
||||
|
||||
public String getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(String price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public String getSku() {
|
||||
return sku;
|
||||
}
|
||||
|
||||
public void setSku(String sku) {
|
||||
this.sku = sku;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,24 +1,12 @@
|
||||
package com.tairui.industrial_operation.ui.my;
|
||||
|
||||
import com.tairui.industrial_operation.base.BaseFragment;
|
||||
import com.tairui.industrial_operation.databinding.FragmentHomeBinding;
|
||||
import com.tairui.industrial_operation.databinding.FragmentMyBinding;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public class MyFragment extends BaseFragment<FragmentMyBinding> {
|
||||
|
||||
@Override
|
||||
protected Class<FragmentMyBinding> getBindingClass() {
|
||||
return FragmentMyBinding.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.tairui.industrial_operation.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import androidx.appcompat.widget.AppCompatImageView
|
||||
|
||||
/**
|
||||
* create by libo
|
||||
* create on 2020/5/21
|
||||
* description 高等于宽的imageview
|
||||
*/
|
||||
class SquareWidthImageView : AppCompatImageView {
|
||||
constructor(context: Context?) : super(context!!) {}
|
||||
constructor(context: Context?, attrs: AttributeSet?) : super(context!!, attrs) {}
|
||||
|
||||
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
||||
super.onMeasure(widthMeasureSpec, widthMeasureSpec) //设置高度始终等于宽度,即为正方形
|
||||
}
|
||||
}
|
@ -0,0 +1,165 @@
|
||||
package com.tairui.industrial_operation.widget.ratingbar;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.tairui.industrial_operation.R;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
public class MyRatingBar extends LinearLayout {
|
||||
private RatingStatus mRatingStatus;
|
||||
private Drawable mStarFullDrawable;
|
||||
private Drawable mStarEmptyDrawable;
|
||||
private Drawable mStarHalfDrawable;
|
||||
private float mStarWidth;
|
||||
private float mStarHeight;
|
||||
private float mStarPadding;
|
||||
private int mStarTotal;
|
||||
private float mRating;
|
||||
private OnRatingChangedListener mOnRatingChangedListener;
|
||||
private List<Integer> mBoundaryList = new ArrayList<>(5);
|
||||
|
||||
public MyRatingBar(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public MyRatingBar(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, -1);
|
||||
}
|
||||
|
||||
public MyRatingBar(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
if (attrs == null) {
|
||||
throw new RuntimeException("NiceRatingBar Error: You must use NiceRatingBar in layout file!");
|
||||
}
|
||||
init(attrs);
|
||||
}
|
||||
|
||||
private void init(AttributeSet attrs) {
|
||||
setOrientation(HORIZONTAL);
|
||||
|
||||
TypedArray mTypedArray = getContext().obtainStyledAttributes(attrs, R.styleable.MyRatingBar);
|
||||
mRatingStatus =
|
||||
RatingStatus.getStatus(mTypedArray.getInt(R.styleable.MyRatingBar_nrb_ratingStatus, RatingStatus.Disable.mStatus));
|
||||
mStarFullDrawable = mTypedArray.getDrawable(R.styleable.MyRatingBar_nrb_starFullResource);
|
||||
mStarEmptyDrawable = mTypedArray.getDrawable(R.styleable.MyRatingBar_nrb_starEmptyResource);
|
||||
mStarHalfDrawable = mTypedArray.getDrawable(R.styleable.MyRatingBar_nrb_starHalfResource);
|
||||
if (mStarFullDrawable == null || mStarEmptyDrawable == null) {
|
||||
throw new IllegalArgumentException("NiceRatingBar Error: You must declare starFullResource and starEmptyResource!");
|
||||
}
|
||||
mStarWidth = mTypedArray.getDimension(R.styleable.MyRatingBar_nrb_starImageWidth, 24f);
|
||||
mStarHeight = mTypedArray.getDimension(R.styleable.MyRatingBar_nrb_starImageHeight, 24f);
|
||||
mStarPadding = mTypedArray.getDimension(R.styleable.MyRatingBar_nrb_starImagePadding, 4f);
|
||||
mStarTotal = mTypedArray.getInt(R.styleable.MyRatingBar_nrb_starTotal, 5);
|
||||
if (mStarTotal <= 0) {
|
||||
throw new IllegalArgumentException("NiceRatingBar Error: starTotal must be positive!");
|
||||
}
|
||||
mRating = mTypedArray.getFloat(R.styleable.MyRatingBar_nrb_rating, 5f);
|
||||
mTypedArray.recycle();
|
||||
|
||||
for (int i = 0; i < mStarTotal; i++) {
|
||||
addView(createStarImageView(i == mStarTotal - 1));
|
||||
}
|
||||
|
||||
setRating(mRating);
|
||||
}
|
||||
|
||||
private ImageView createStarImageView(boolean isLast) {
|
||||
ImageView imageView = new ImageView(getContext());
|
||||
LayoutParams layoutParams = new LayoutParams(Math.round(mStarWidth), Math.round(mStarHeight));
|
||||
layoutParams.setMargins(0, 0, isLast ? 0 : Math.round(mStarPadding), 0);
|
||||
imageView.setLayoutParams(layoutParams);
|
||||
return imageView;
|
||||
}
|
||||
|
||||
public void setRating(float rating) {
|
||||
if (rating > mStarTotal) {
|
||||
rating = mStarTotal;
|
||||
}
|
||||
this.mRating = rating;
|
||||
if (mOnRatingChangedListener != null) {
|
||||
mOnRatingChangedListener.onRatingChanged(rating);
|
||||
}
|
||||
|
||||
int partInteger = (int) Math.floor(rating);
|
||||
float partDecimal = new BigDecimal(String.valueOf(rating))
|
||||
.subtract(new BigDecimal(String.valueOf(partInteger)))
|
||||
.floatValue();
|
||||
|
||||
for (int i = 0; i < partInteger; i++) {
|
||||
((ImageView) getChildAt(i)).setImageDrawable(mStarFullDrawable);
|
||||
}
|
||||
|
||||
for (int i = partInteger; i < mStarTotal; i++) {
|
||||
((ImageView) getChildAt(i)).setImageDrawable(mStarEmptyDrawable);
|
||||
}
|
||||
|
||||
if (partDecimal >= 0.25) {
|
||||
if (partDecimal < 0.75 && mStarHalfDrawable != null) {
|
||||
((ImageView) getChildAt(partInteger)).setImageDrawable(mStarHalfDrawable);
|
||||
} else if (partDecimal >= 0.75) {
|
||||
((ImageView) getChildAt(partInteger)).setImageDrawable(mStarFullDrawable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private float calculateRating(float touchX) {
|
||||
float result = 0;
|
||||
for (int i = 0; i < mStarTotal - 1; i++) {
|
||||
if (touchX >= mBoundaryList.get(i) && touchX <= mBoundaryList.get(i + 1)) {
|
||||
if (mStarHalfDrawable != null && touchX < (mBoundaryList.get(i) + mBoundaryList.get(i + 1)) / 2) {
|
||||
result = i + 0.5f;
|
||||
} else {
|
||||
result = i + 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (result == 0f && touchX >= mBoundaryList.get(mBoundaryList.size() - 1)) {
|
||||
result = touchX < mBoundaryList.get(mBoundaryList.size() - 1) + mStarWidth / 2 ? mStarTotal - 0.5f : mStarTotal;
|
||||
}
|
||||
if (result == 0f) {
|
||||
result = mStarHalfDrawable != null ? 0.5f : 1;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if (mRatingStatus == RatingStatus.Enable && !mBoundaryList.isEmpty()) {
|
||||
setRating(calculateRating(event.getX()));
|
||||
if (event.getAction() == MotionEvent.ACTION_DOWN) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return super.onTouchEvent(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onLayout(boolean changed, int l, int t, int r, int b) {
|
||||
super.onLayout(changed, l, t, r, b);
|
||||
if (mBoundaryList.isEmpty()) {
|
||||
for (int index = 0; index < mStarTotal; index++) {
|
||||
mBoundaryList.add(index == 0 ? 0 : mBoundaryList.get(index - 1) + Math.round(mStarWidth) + Math.round(mStarPadding));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setOnRatingChangedListener(OnRatingChangedListener listener) {
|
||||
this.mOnRatingChangedListener = listener;
|
||||
}
|
||||
|
||||
public void setRatingStatus(RatingStatus status) {
|
||||
this.mRatingStatus = status;
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.tairui.industrial_operation.widget.ratingbar;
|
||||
|
||||
public interface OnRatingChangedListener {
|
||||
void onRatingChanged(float rating);
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.tairui.industrial_operation.widget.ratingbar;
|
||||
|
||||
public enum RatingStatus {
|
||||
|
||||
Disable(0),
|
||||
|
||||
Enable(1);
|
||||
|
||||
int mStatus;
|
||||
|
||||
RatingStatus(int statusValue) {
|
||||
this.mStatus = statusValue;
|
||||
}
|
||||
|
||||
public static RatingStatus getStatus(int status) {
|
||||
return status == Disable.mStatus ? Disable : Enable;
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="@color/transparent" />
|
||||
<corners
|
||||
android:bottomLeftRadius="30dp"
|
||||
android:bottomRightRadius="30dp"
|
||||
android:topLeftRadius="30dp"
|
||||
android:topRightRadius="30dp" />
|
||||
|
||||
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@color/color_green" />
|
||||
</shape>
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="#F5F5F5" />
|
||||
<corners
|
||||
android:bottomLeftRadius="2dp"
|
||||
android:bottomRightRadius="2dp"
|
||||
android:topLeftRadius="2dp"
|
||||
android:topRightRadius="2dp" />
|
||||
|
||||
</shape>
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="#DEF6EC" />
|
||||
<corners
|
||||
android:bottomLeftRadius="2dp"
|
||||
android:bottomRightRadius="2dp"
|
||||
android:topLeftRadius="2dp"
|
||||
android:topRightRadius="2dp" />
|
||||
|
||||
</shape>
|
11
app/src/main/res/drawable/bg_gradient_sub_goods.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
|
||||
<gradient
|
||||
android:angle="315"
|
||||
android:endColor="#FFFFFF"
|
||||
android:startColor="#E8FFF7"
|
||||
android:type="linear" />
|
||||
|
||||
</shape>
|
@ -69,6 +69,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/btnShopCart"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="12dp"
|
||||
@ -347,6 +348,7 @@
|
||||
android:layout_marginRight="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pingjia"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/pic_goods_detail_4"
|
||||
|
156
app/src/main/res/layout/activity_shop_cart.xml
Normal file
@ -0,0 +1,156 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
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" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:layout_constraintTop_toBottomOf="@id/statusbar">
|
||||
|
||||
|
||||
<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_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:text="购物车"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/btnBack"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="16dp"
|
||||
android:text="管理"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.tairui.industrial_operation.widget.RefreshRecyclerView
|
||||
android:id="@+id/refreshRecycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottomLayout"
|
||||
app:layout_constraintTop_toBottomOf="@id/toolbar" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/bottomLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingBottom="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkAll"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@mipmap/ic_checkbox_uncheck"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<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="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/checkAll"
|
||||
app:layout_constraintLeft_toRightOf="@id/checkAll"
|
||||
app:layout_constraintTop_toTopOf="@id/checkAll" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnCheckOut"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_container_green_raduis_30"
|
||||
android:gravity="center"
|
||||
android:minWidth="120dp"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingTop="9dp"
|
||||
android:paddingRight="24dp"
|
||||
android:paddingBottom="9dp"
|
||||
android:text="去结算"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPrice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="12dp"
|
||||
android:text="¥2.90"
|
||||
android:textColor="@color/color_txt_green"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintRight_toLeftOf="@id/btnCheckOut"
|
||||
app:layout_constraintTop_toTopOf="@id/btnCheckOut" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:text="合计:"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPrice"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPrice"
|
||||
app:layout_constraintTop_toTopOf="@id/tvPrice" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="不含运费"
|
||||
android:textColor="@color/color_txt_label"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPrice"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPrice" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
120
app/src/main/res/layout/activity_sub_goods_list.xml
Normal file
@ -0,0 +1,120 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f8f8f8">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/topLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_gradient_sub_goods"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<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" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:layout_constraintTop_toBottomOf="@id/statusbar">
|
||||
|
||||
|
||||
<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_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:background="@drawable/bg_container_green_border_raduis_30"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingRight="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/btnBack"
|
||||
app:layout_constraintRight_toLeftOf="@id/btnShopCart"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:src="@mipmap/ic_search" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:text="西红柿"
|
||||
android:textColor="@color/color_txt_label"
|
||||
android:textSize="16sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnShopCart"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:src="@mipmap/ic_shopcart_black"
|
||||
app:layout_constraintBottom_toBottomOf="@id/btnBack"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/btnBack" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/tabRecycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/topLayout">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/categoryList"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="11" />
|
||||
|
||||
<com.tairui.industrial_operation.widget.RefreshRecyclerView
|
||||
android:id="@+id/refreshRecycler"
|
||||
android:background="@color/white"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="28" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -46,9 +46,9 @@
|
||||
android:background="@drawable/bg_container_white_raduis_30"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintRight_toLeftOf="@id/btnShopCart"
|
||||
app:layout_constraintBottom_toBottomOf="@id/icLogo"
|
||||
app:layout_constraintLeft_toRightOf="@id/icLogo"
|
||||
app:layout_constraintRight_toLeftOf="@id/btnMessage"
|
||||
app:layout_constraintTop_toTopOf="@id/icLogo">
|
||||
|
||||
<ImageView
|
||||
@ -81,7 +81,7 @@
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnMessage"
|
||||
android:id="@+id/btnShopCart"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginRight="16dp"
|
||||
|
@ -1,8 +1,240 @@
|
||||
<?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="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:background="@mipmap/bg_my"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp">
|
||||
|
||||
|
||||
<com.tairui.industrial_operation.widget.statusbar.StatusBarHeightView
|
||||
android:id="@+id/statusbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnSetting"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@mipmap/ic_setting"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
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_marginTop="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/userHeadIv"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:src="@mipmap/ic_default_head"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUserName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:text="180****4878"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvUserId"
|
||||
app:layout_constraintLeft_toRightOf="@id/userHeadIv"
|
||||
app:layout_constraintTop_toTopOf="@id/userHeadIv" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUserId"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:text="ID:78151517 |"
|
||||
android:textColor="@color/color_txt_label"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/userHeadIv"
|
||||
app:layout_constraintLeft_toRightOf="@id/userHeadIv"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvUserName" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:background="@drawable/bg_container_green_raduis_10"
|
||||
android:drawableLeft="@mipmap/ic_identify"
|
||||
android:drawablePadding="2dp"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingTop="1dp"
|
||||
android:paddingRight="4dp"
|
||||
android:paddingBottom="1dp"
|
||||
android:text="已实名"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvUserId"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvUserId"
|
||||
app:layout_constraintTop_toTopOf="@id/tvUserId" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="51"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="购物车"
|
||||
android:textColor="@color/color_txt_label"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="27"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="优惠券"
|
||||
android:textColor="@color/color_txt_label"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="银行卡"
|
||||
android:textColor="@color/color_txt_label"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="461"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="商品收藏"
|
||||
android:textColor="@color/color_txt_label"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/pic_my_1"
|
||||
app:layout_constraintDimensionRatio="358:118"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:src="@mipmap/pic_my_2"
|
||||
app:layout_constraintDimensionRatio="358:120"
|
||||
app:layout_constraintTop_toBottomOf="@id/img1" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:src="@mipmap/pic_my_3"
|
||||
app:layout_constraintDimensionRatio="358:202"
|
||||
app:layout_constraintTop_toBottomOf="@id/img2" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
103
app/src/main/res/layout/item_shop_cart.xml
Normal file
@ -0,0 +1,103 @@
|
||||
<?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="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:background="@drawable/bg_container_white_raduis_10"
|
||||
android:padding="12dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkbox"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@mipmap/ic_checkbox_uncheck"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:src="@mipmap/pic_my_product_1"
|
||||
app:layout_constraintLeft_toRightOf="@id/checkbox"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="耿马普罗旺斯西红柿沙瓤番茄甄选番茄苗"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintLeft_toRightOf="@id/image"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/image" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSku"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="【1000g*件】"
|
||||
android:textColor="@color/color_txt_label"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintLeft_toRightOf="@id/image"
|
||||
app:layout_constraintTop_toBottomOf="@id/name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:text="¥4.50"
|
||||
android:textColor="@color/color_txt_green"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@id/image"
|
||||
app:layout_constraintLeft_toRightOf="@id/image" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="@id/image"
|
||||
app:layout_constraintRight_toRightOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnMinus"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:src="@mipmap/ic_minuse_round" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingRight="12dp"
|
||||
android:text="1"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnPlus"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:src="@mipmap/ic_plus_round" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
59
app/src/main/res/layout/item_sub_goods.xml
Normal file
@ -0,0 +1,59 @@
|
||||
<?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="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:background="@drawable/bg_container_white_raduis_10"
|
||||
android:padding="12dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:src="@mipmap/pic_my_product_1"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="耿马普罗旺斯西红柿沙瓤番茄甄选番茄苗"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintLeft_toRightOf="@id/image"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/image" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSku"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="【1000g*件】"
|
||||
android:textColor="@color/color_txt_label"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintLeft_toRightOf="@id/image"
|
||||
app:layout_constraintTop_toBottomOf="@id/name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:text="¥4.50"
|
||||
android:textColor="@color/color_txt_green"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@id/image"
|
||||
app:layout_constraintLeft_toRightOf="@id/image" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
13
app/src/main/res/layout/item_sub_goods_category.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:gravity="center"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:text="全部"
|
||||
android:textColor="@color/color_txt_green"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
43
app/src/main/res/layout/item_sub_goods_tab.xml
Normal file
@ -0,0 +1,43 @@
|
||||
<?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="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:src="@mipmap/pic_sub_goods_1" />
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/titleBg"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_gravity="bottom|left"
|
||||
android:src="@mipmap/bg_sub_goods_tab_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="种子种苗"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
348
app/src/main/res/layout/layout_dialog_pingjia.xml
Normal file
@ -0,0 +1,348 @@
|
||||
<?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:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="用户评价(200+)"
|
||||
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="24dp"
|
||||
android:gravity="left|top"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_container_light_green_raduis_2"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:text="全部"
|
||||
android:textColor="@color/color_txt_green"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:background="@drawable/bg_container_light_gray_raduis_2"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:text="成活率高"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:background="@drawable/bg_container_light_gray_raduis_2"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:text="抗病率高"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:background="@drawable/bg_container_light_gray_raduis_2"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingBottom="4dp"
|
||||
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="8dp"
|
||||
android:gravity="left|top"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingBottom="12dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_container_light_gray_raduis_2"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:text="坐果率高"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:background="@drawable/bg_container_light_gray_raduis_2"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:text="果肉饱满"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="450dp"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="12dp"
|
||||
android:background="@color/color_f8f8f8" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/headPic"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:src="@mipmap/ic_default_head"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/userName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:text="l***e"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toRightOf="@id/headPic"
|
||||
app:layout_constraintTop_toTopOf="@id/headPic" />
|
||||
|
||||
<com.tairui.industrial_operation.widget.ratingbar.MyRatingBar
|
||||
android:id="@+id/rating_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/userName"
|
||||
app:layout_constraintTop_toBottomOf="@id/userName"
|
||||
app:nrb_rating="4"
|
||||
app:nrb_ratingStatus="Disable"
|
||||
app:nrb_starEmptyResource="@mipmap/rating_normal"
|
||||
app:nrb_starFullResource="@mipmap/rating_select"
|
||||
app:nrb_starImageHeight="12dp"
|
||||
app:nrb_starImageWidth="12dp"
|
||||
app:nrb_starTotal="5" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="1个月前"
|
||||
android:textColor="@color/color_txt_label"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/rating_bar"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/rating_bar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="这是第二次在你家购买了,西红柿很新鲜,个大,物流超极快,前天晚上下单,今天下午就到了。普罗旺斯西红柿个大,味浓,小时候味道,绿色食品,健康安全.值得购买.客服物流服务到位,建议大家关注"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/userName"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/rating_bar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintLeft_toLeftOf="@id/content"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/content">
|
||||
|
||||
<com.tairui.industrial_operation.widget.SquareWidthImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/pic_goods_detail_8" />
|
||||
|
||||
<com.tairui.industrial_operation.widget.SquareWidthImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/pic_goods_detail_9" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="12dp"
|
||||
android:background="@color/color_f8f8f8" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/headPic2"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:src="@mipmap/ic_default_head"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/userName2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:text="l***e"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toRightOf="@id/headPic2"
|
||||
app:layout_constraintTop_toTopOf="@id/headPic2" />
|
||||
|
||||
<com.tairui.industrial_operation.widget.ratingbar.MyRatingBar
|
||||
android:id="@+id/rating_bar2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/userName2"
|
||||
app:layout_constraintTop_toBottomOf="@id/userName2"
|
||||
app:nrb_rating="4"
|
||||
app:nrb_ratingStatus="Disable"
|
||||
app:nrb_starEmptyResource="@mipmap/rating_normal"
|
||||
app:nrb_starFullResource="@mipmap/rating_select"
|
||||
app:nrb_starImageHeight="12dp"
|
||||
app:nrb_starImageWidth="12dp"
|
||||
app:nrb_starTotal="5" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="1个月前"
|
||||
android:textColor="@color/color_txt_label"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/rating_bar2"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/rating_bar2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="这是第二次在你家购买了,西红柿很新鲜,个大,物流超极快,前天晚上下单,今天下午就到了。普罗旺斯西红柿个大,味浓,小时候味道,绿色食品,健康安全.值得购买.客服物流服务到位,建议大家关注"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/userName2"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/rating_bar2" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintLeft_toLeftOf="@id/content2"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/content2">
|
||||
|
||||
<com.tairui.industrial_operation.widget.SquareWidthImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/pic_goods_detail_10" />
|
||||
|
||||
<com.tairui.industrial_operation.widget.SquareWidthImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/pic_goods_detail_11" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
|
||||
</LinearLayout>
|
BIN
app/src/main/res/mipmap-xxhdpi/bg_my.png
Normal file
After Width: | Height: | Size: 194 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/bg_sub_goods_tab_title.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_checkbox_checked.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_checkbox_uncheck.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_default_head.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_identify.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_minuse_round.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_plus_round.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_setting.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_goods_detail_10.png
Normal file
After Width: | Height: | Size: 69 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_goods_detail_11.png
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_goods_detail_8.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_goods_detail_9.png
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_my_1.png
Normal file
After Width: | Height: | Size: 48 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_my_2.png
Normal file
After Width: | Height: | Size: 729 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_my_3.png
Normal file
After Width: | Height: | Size: 85 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_my_product_3.png
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_sub_goods_1.png
Normal file
After Width: | Height: | Size: 7.4 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_sub_goods_10.png
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_sub_goods_11.png
Normal file
After Width: | Height: | Size: 98 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_sub_goods_12.png
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_sub_goods_13.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_sub_goods_14.png
Normal file
After Width: | Height: | Size: 52 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_sub_goods_15.png
Normal file
After Width: | Height: | Size: 150 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_sub_goods_16.png
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_sub_goods_2.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_sub_goods_3.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_sub_goods_4.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_sub_goods_5.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_sub_goods_6.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_sub_goods_7.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_sub_goods_8.png
Normal file
After Width: | Height: | Size: 9.5 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_sub_goods_9.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/rating_normal.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/rating_select.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
20
app/src/main/res/raw/shop_cart.json
Normal file
@ -0,0 +1,20 @@
|
||||
[
|
||||
{
|
||||
"name": "耿马普罗旺斯西红柿沙瓤番茄甄选番茄苗",
|
||||
"imgRes": "pic_my_product_1",
|
||||
"price": "4.50",
|
||||
"sku": "【1000g*件】"
|
||||
},
|
||||
{
|
||||
"name": "紫皮长茄子新鲜蔬菜细茄子长条茄子杭茄",
|
||||
"imgRes": "pic_my_product_2",
|
||||
"price": "4.50",
|
||||
"sku": "【1000g*件】"
|
||||
},
|
||||
{
|
||||
"name": "正宗黄心土豆黄皮大个粉心土豆红皮土豆",
|
||||
"imgRes": "pic_my_product_3",
|
||||
"price": "4.50",
|
||||
"sku": "【1000g*件】"
|
||||
}
|
||||
]
|
231
app/src/main/res/raw/sub_goods.json
Normal file
@ -0,0 +1,231 @@
|
||||
[
|
||||
{
|
||||
"name": "种子种苗",
|
||||
"imgRes": "pic_sub_goods_1",
|
||||
"categorys": [
|
||||
"全部",
|
||||
"蔬菜种子",
|
||||
"中药材种子",
|
||||
"水果种子"
|
||||
],
|
||||
"goods": [
|
||||
{
|
||||
"name": "耿马普罗旺斯西红柿沙瓤番茄甄选番茄苗",
|
||||
"imgRes": "pic_my_product_1",
|
||||
"price": "4.50",
|
||||
"category": "蔬菜种子",
|
||||
"sku": "1000g*件"
|
||||
},
|
||||
{
|
||||
"name": "紫皮长茄子新鲜蔬菜细茄子长条茄子杭茄",
|
||||
"imgRes": "pic_my_product_2",
|
||||
"price": "4.50",
|
||||
"category": "蔬菜种子",
|
||||
"sku": "1000g*件"
|
||||
},
|
||||
{
|
||||
"name": "正宗黄心土豆黄皮大个粉心土豆红皮土豆",
|
||||
"imgRes": "pic_my_product_3",
|
||||
"price": "4.50",
|
||||
"category": "蔬菜种子",
|
||||
"sku": "1000g*件"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "化肥",
|
||||
"imgRes": "pic_sub_goods_2",
|
||||
"categorys": [
|
||||
"全部",
|
||||
"复合肥",
|
||||
"氮肥",
|
||||
"磷肥",
|
||||
"钾肥"
|
||||
],
|
||||
"goods": [
|
||||
{
|
||||
"name": "喷施宝叶面肥正品有机水溶肥料植物果树蔬菜玉...",
|
||||
"imgRes": "pic_sub_goods_10",
|
||||
"price": "72.50",
|
||||
"category": "复合肥",
|
||||
"sku": "1000ml*件"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "农药",
|
||||
"imgRes": "pic_sub_goods_3",
|
||||
"categorys": [
|
||||
"全部",
|
||||
"杀螨剂",
|
||||
"除草剂",
|
||||
"杀菌剂",
|
||||
"杀虫剂"
|
||||
],
|
||||
"goods": [
|
||||
{
|
||||
"name": "南通江山90%敌百虫白菜甘蓝花菜菜青虫十字花...",
|
||||
"imgRes": "pic_sub_goods_11",
|
||||
"price": "2.65",
|
||||
"category": "杀虫剂",
|
||||
"sku": "70g*件"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "泡沫",
|
||||
"imgRes": "pic_sub_goods_4",
|
||||
"categorys": [
|
||||
"全部",
|
||||
"EPS",
|
||||
"EPE",
|
||||
"EPP",
|
||||
"可降解泡沫"
|
||||
],
|
||||
"goods": [
|
||||
{
|
||||
"name": "epe 珍珠棉泡沫板材防震撞缓冲打包插花加厚垫...",
|
||||
"imgRes": "pic_sub_goods_12",
|
||||
"price": "9.50",
|
||||
"category": "可降解泡沫",
|
||||
"sku": "1m*2m*5mm"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "地膜",
|
||||
"imgRes": "pic_sub_goods_5",
|
||||
"categorys": [
|
||||
"全部",
|
||||
"聚乙烯",
|
||||
"聚丙烯",
|
||||
"聚氯乙烯",
|
||||
"聚酯",
|
||||
"聚酰胺",
|
||||
"EVOH",
|
||||
"PVDC"
|
||||
],
|
||||
"goods": [
|
||||
{
|
||||
"name": "聚乙烯PE黑色地膜塑料薄膜除草保温加厚果树抗...",
|
||||
"imgRes": "pic_sub_goods_13",
|
||||
"price": "54.90",
|
||||
"category": "聚乙烯",
|
||||
"sku": "1mm*60cm*800m"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "包装箱",
|
||||
"imgRes": "pic_sub_goods_6",
|
||||
"categorys": [
|
||||
"全部",
|
||||
"瓦楞纸箱",
|
||||
"塑料周转箱",
|
||||
"木箱/木托盘",
|
||||
"金属箱/筐",
|
||||
"网袋/编织袋",
|
||||
"大袋/吨袋"
|
||||
],
|
||||
"goods": [
|
||||
{
|
||||
"name": "塑料筐长方形加厚大号蔬菜水果框子快递筐子周...",
|
||||
"imgRes": "pic_sub_goods_14",
|
||||
"price": "10.89",
|
||||
"category": "塑料周转箱",
|
||||
"sku": "380*300*90mm"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "蔬菜",
|
||||
"imgRes": "pic_sub_goods_7",
|
||||
"categorys": [
|
||||
"全部",
|
||||
"瓜类",
|
||||
"茄果类",
|
||||
"豆类",
|
||||
"椒类",
|
||||
"叶菜类",
|
||||
"根茎类",
|
||||
"花菜类",
|
||||
"葱蒜类",
|
||||
"其他类"
|
||||
],
|
||||
"goods": [
|
||||
{
|
||||
"name": "耿马普罗旺斯西红柿沙瓤番茄甄选番茄苗",
|
||||
"imgRes": "pic_my_product_1",
|
||||
"price": "4.50",
|
||||
"category": "茄果类",
|
||||
"sku": "1000g*件"
|
||||
},
|
||||
{
|
||||
"name": "紫皮长茄子新鲜蔬菜细茄子长条茄子杭茄",
|
||||
"imgRes": "pic_my_product_2",
|
||||
"price": "4.50",
|
||||
"category": "茄果类",
|
||||
"sku": "1000g*件"
|
||||
},
|
||||
{
|
||||
"name": "正宗黄心土豆黄皮大个粉心土豆红皮土豆",
|
||||
"imgRes": "pic_my_product_3",
|
||||
"price": "4.50",
|
||||
"category": "根茎类",
|
||||
"sku": "1000g*件"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "中药材",
|
||||
"imgRes": "pic_sub_goods_8",
|
||||
"categorys": [
|
||||
"全部",
|
||||
"铁皮石斛",
|
||||
"滇重楼",
|
||||
"滇鸡血藤",
|
||||
"滇黄精",
|
||||
"滇龙胆草",
|
||||
"白及",
|
||||
"砂仁",
|
||||
"草果",
|
||||
"猴耳环",
|
||||
"其他类"
|
||||
],
|
||||
"goods": [
|
||||
{
|
||||
"name": "正宗新鲜霍山铁皮石斛原浆养胃调理肠胃粉...",
|
||||
"imgRes": "pic_sub_goods_15",
|
||||
"price": "128.00",
|
||||
"category": "铁皮石斛",
|
||||
"sku": "500g*盒"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "水果",
|
||||
"imgRes": "pic_sub_goods_8",
|
||||
"categorys": [
|
||||
"全部",
|
||||
"沃柑",
|
||||
"香蕉",
|
||||
"金丝凤梨",
|
||||
"榴莲",
|
||||
"脐橙",
|
||||
"黄晶果",
|
||||
"血橙/冰糖橙",
|
||||
"草莓/百香果",
|
||||
"杨梅",
|
||||
"橘子"
|
||||
],
|
||||
"goods": [
|
||||
{
|
||||
"name": "现摘海南金钻凤梨新鲜水果生鲜手撕菠萝当...",
|
||||
"imgRes": "pic_sub_goods_16",
|
||||
"price": "12.90",
|
||||
"category": "金丝凤梨",
|
||||
"sku": "3kg*件"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
@ -56,4 +56,19 @@
|
||||
<enum name="round_rect" value="2" />
|
||||
</attr>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="MyRatingBar">
|
||||
<attr name="nrb_ratingStatus">
|
||||
<enum name="Disable" value="0" />
|
||||
<enum name="Enable" value="1" />
|
||||
</attr>
|
||||
<attr name="nrb_starFullResource" format="reference" />
|
||||
<attr name="nrb_starEmptyResource" format="reference" />
|
||||
<attr name="nrb_starHalfResource" format="reference" />
|
||||
<attr name="nrb_starImageWidth" format="dimension" />
|
||||
<attr name="nrb_starImageHeight" format="dimension" />
|
||||
<attr name="nrb_starImagePadding" format="dimension" />
|
||||
<attr name="nrb_starTotal" format="integer" />
|
||||
<attr name="nrb_rating" format="float" />
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
|