申请记录;商城首页
3
.gitignore
vendored
@ -13,4 +13,5 @@
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
.cxx
|
||||
/app/release
|
@ -1,20 +0,0 @@
|
||||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "com.tairui.industrial_operation",
|
||||
"variantName": "release",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 1,
|
||||
"versionName": "1.0",
|
||||
"outputFile": "IndustrialOperation_app_v1.0_20250627155600.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
@ -173,6 +173,11 @@
|
||||
android:configChanges="orientation|screenSize|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".ui.brand.ApplyRecordsActivity"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
|
||||
<activity
|
||||
|
@ -17,9 +17,9 @@ import com.tairui.industrial_operation.entity.Api;
|
||||
import com.tairui.industrial_operation.entity.TabEntity;
|
||||
import com.tairui.industrial_operation.http.OnError;
|
||||
import com.tairui.industrial_operation.ui.home.HomeFragment;
|
||||
import com.tairui.industrial_operation.ui.mall.MallFragment;
|
||||
import com.tairui.industrial_operation.ui.my.MyFragment;
|
||||
import com.tairui.industrial_operation.ui.service.ServiceFragment;
|
||||
import com.tairui.industrial_operation.ui.shopping.ShoppingFragment;
|
||||
import com.tairui.industrial_operation.util.DownloadUtil;
|
||||
import com.tairui.industrial_operation.util.LogUtil;
|
||||
import com.tairui.industrial_operation.util.NetUtil;
|
||||
@ -66,7 +66,7 @@ public class MainActivity extends BaseActivity<ActivityMainBinding> {
|
||||
mFragments.add(new HomeFragment());
|
||||
mTabEntities.add(new TabEntity("商城", R.mipmap.tabar_shopping_sel, R.mipmap.tabar_shopping_nor));
|
||||
mTitles.add("商城");
|
||||
mFragments.add(new ShoppingFragment());
|
||||
mFragments.add(new MallFragment());
|
||||
mTabEntities.add(new TabEntity("服务", R.mipmap.tabar_service_sel, R.mipmap.tabar_service_nor));
|
||||
mTitles.add("服务");
|
||||
mFragments.add(new ServiceFragment());
|
||||
|
@ -40,12 +40,9 @@ public class SplashActivity extends BaseActivity<ActivitySplashBinding> {
|
||||
}
|
||||
|
||||
private void goMain() {
|
||||
// KpLog.getInstance().doSaveEventLog(mContext, true);
|
||||
//KpLog.getInstance().onAppStart(mContext);
|
||||
|
||||
if (null != binding.txtTimerSplash) {
|
||||
setGone(binding.txtTimerSplash, true);
|
||||
countTimer = new CountTimer(3 * 1000, INTERVAL);
|
||||
countTimer = new CountTimer(1 * 1000, INTERVAL);
|
||||
WeakReference<CountTimer> weakTimerCountDowner = new WeakReference<>(countTimer);
|
||||
if (null != weakTimerCountDowner.get()) {
|
||||
weakTimerCountDowner.get().start();
|
||||
|
@ -3,7 +3,6 @@ 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;
|
||||
@ -27,10 +26,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
|
||||
|
@ -0,0 +1,36 @@
|
||||
package com.tairui.industrial_operation.ui.brand;
|
||||
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
import com.tairui.industrial_operation.base.BaseActivity;
|
||||
import com.tairui.industrial_operation.databinding.ActivityApplyRecordsBinding;
|
||||
import com.tairui.industrial_operation.util.SingleClickListener;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public class ApplyRecordsActivity extends BaseActivity<ActivityApplyRecordsBinding> {
|
||||
|
||||
@Override
|
||||
protected Class<ActivityApplyRecordsBinding> getBindingClass() {
|
||||
return ActivityApplyRecordsBinding.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();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -22,6 +22,12 @@ public class PublicBrandActivity extends BaseActivity<ActivityPublicBrandBinding
|
||||
|
||||
@Override
|
||||
protected void onBindListener() {
|
||||
binding.btnBack.setOnClickListener(new SingleClickListener() {
|
||||
@Override
|
||||
protected void onSingleClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
binding.dt.setOnClickListener(new SingleClickListener() {
|
||||
@Override
|
||||
protected void onSingleClick(View v) {
|
||||
@ -52,5 +58,11 @@ public class PublicBrandActivity extends BaseActivity<ActivityPublicBrandBinding
|
||||
IntentUtil.startActivity(mContext, ApplyBrandActivity.class);
|
||||
}
|
||||
});
|
||||
binding.sqjl.setOnClickListener(new SingleClickListener() {
|
||||
@Override
|
||||
protected void onSingleClick(View v) {
|
||||
IntentUtil.startActivity(mContext, ApplyRecordsActivity.class);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,161 @@
|
||||
package com.tairui.industrial_operation.ui.mall;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.rxjava.rxlife.RxLife;
|
||||
import com.tairui.industrial_operation.R;
|
||||
import com.tairui.industrial_operation.base.BaseFragment;
|
||||
import com.tairui.industrial_operation.base.entity.BaseHolderEntity;
|
||||
import com.tairui.industrial_operation.databinding.FragmentMallBinding;
|
||||
import com.tairui.industrial_operation.entity.Api;
|
||||
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.widget.RefreshRecyclerView;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import rxhttp.RxHttp;
|
||||
|
||||
public class MallFragment extends BaseFragment<FragmentMallBinding> {
|
||||
|
||||
private MallAdapter adapter;
|
||||
private int currentPageIndex = 1;
|
||||
|
||||
@Override
|
||||
protected Class<FragmentMallBinding> getBindingClass() {
|
||||
return FragmentMallBinding.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFindView(View rootView) {
|
||||
binding.refreshRecycler.setLayoutManager(new LinearLayoutManager(mContext));
|
||||
adapter = new MallAdapter(new ArrayList<>());
|
||||
binding.refreshRecycler.setAdapter(adapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onBindListener() {
|
||||
binding.refreshRecycler.setRefreshRecyclerListener(new RefreshRecyclerView.RefreshRecyclerListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
currentPageIndex = 1;
|
||||
requestData(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadmore() {
|
||||
requestData(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlankClick() {
|
||||
binding.refreshRecycler.showLoading();
|
||||
currentPageIndex = 1;
|
||||
requestData(false);
|
||||
}
|
||||
});
|
||||
adapter.setOnItemClickListener((baseQuickAdapter, view, i) -> {
|
||||
// Bundle bundle = new Bundle();
|
||||
// bundle.putSerializable("data", (Serializable) adapter.getItem(i));
|
||||
// IntentUtil.startActivity(mContext, LandInfoDetailActivity.class, bundle);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onApplyData() {
|
||||
binding.refreshRecycler.showLoading();
|
||||
currentPageIndex = 1;
|
||||
requestData(false);
|
||||
|
||||
}
|
||||
|
||||
private void requestData(boolean loadmore) {
|
||||
RxHttp.get(Api.HOME_GOODS_LIST).add("type", 1).add("current", currentPageIndex).add("size", Api.SIZE_PAGE)
|
||||
.asResponse(HomeGoodsEntity.class).as(RxLife.asOnMain(this)).subscribe(data -> {
|
||||
if (loadmore) {
|
||||
binding.refreshRecycler.finishLoadMore();
|
||||
}
|
||||
if (!ArrayUtil.isEmpty(data.getRecords())) {
|
||||
if (loadmore) {
|
||||
adapter.addGoodsData(data.getRecords());
|
||||
} else {
|
||||
initData(data.getRecords());
|
||||
}
|
||||
currentPageIndex += 1;
|
||||
if (ArrayUtil.size(data.getRecords()) < Api.SIZE_PAGE) {
|
||||
binding.refreshRecycler.setNoMoreData(true);
|
||||
} else {
|
||||
binding.refreshRecycler.setNoMoreData(false);
|
||||
}
|
||||
binding.refreshRecycler.showContent();
|
||||
} else {
|
||||
binding.refreshRecycler.showError();
|
||||
binding.refreshRecycler.setNoMoreData(true);
|
||||
}
|
||||
}, (OnError) error -> {
|
||||
binding.refreshRecycler.showError();
|
||||
binding.refreshRecycler.setNoMoreData(true);
|
||||
showError(error.getErrorMsg());
|
||||
});
|
||||
}
|
||||
|
||||
private void initData(List<HomeGoodsEntity.RecordsEntity> goodsList) {
|
||||
List<BaseHolderEntity> list = new ArrayList<>();
|
||||
BaseHolderEntity bannerItem = new BaseHolderEntity();
|
||||
bannerItem.setType(MallAdapter.TYPE_BANNER);
|
||||
list.add(bannerItem);
|
||||
|
||||
BaseHolderEntity funcItem = new BaseHolderEntity();
|
||||
funcItem.setType(MallAdapter.TYPE_FUNC);
|
||||
List<BaseHolderEntity> funcList = new ArrayList<>();
|
||||
BaseHolderEntity itemFunc = new BaseHolderEntity();
|
||||
itemFunc.setData("种子种苗");
|
||||
itemFunc.setSubData(R.mipmap.pic_mall_2);
|
||||
funcList.add(itemFunc);
|
||||
itemFunc = new BaseHolderEntity();
|
||||
itemFunc.setData("化肥");
|
||||
itemFunc.setSubData(R.mipmap.pic_mall_3);
|
||||
funcList.add(itemFunc);
|
||||
itemFunc = new BaseHolderEntity();
|
||||
itemFunc.setData("农药");
|
||||
itemFunc.setSubData(R.mipmap.pic_mall_4);
|
||||
funcList.add(itemFunc);
|
||||
itemFunc = new BaseHolderEntity();
|
||||
itemFunc.setData("泡沫");
|
||||
itemFunc.setSubData(R.mipmap.pic_mall_5);
|
||||
funcList.add(itemFunc);
|
||||
itemFunc = new BaseHolderEntity();
|
||||
itemFunc.setData("地膜");
|
||||
itemFunc.setSubData(R.mipmap.pic_mall_6);
|
||||
funcList.add(itemFunc);
|
||||
itemFunc = new BaseHolderEntity();
|
||||
itemFunc.setData("包装箱");
|
||||
itemFunc.setSubData(R.mipmap.pic_mall_7);
|
||||
funcList.add(itemFunc);
|
||||
itemFunc = new BaseHolderEntity();
|
||||
itemFunc.setData("蔬菜");
|
||||
itemFunc.setSubData(R.mipmap.pic_mall_8);
|
||||
funcList.add(itemFunc);
|
||||
itemFunc = new BaseHolderEntity();
|
||||
itemFunc.setData("中药材");
|
||||
itemFunc.setSubData(R.mipmap.pic_mall_9);
|
||||
funcList.add(itemFunc);
|
||||
itemFunc = new BaseHolderEntity();
|
||||
itemFunc.setData("水果");
|
||||
itemFunc.setSubData(R.mipmap.pic_mall_10);
|
||||
funcList.add(itemFunc);
|
||||
funcItem.setData(funcList);
|
||||
list.add(funcItem);
|
||||
|
||||
BaseHolderEntity goodsItem = new BaseHolderEntity();
|
||||
goodsItem.setType(MallAdapter.TYPE_GOODS);
|
||||
goodsItem.setData(goodsList);
|
||||
list.add(goodsItem);
|
||||
|
||||
adapter.setNewData(list);
|
||||
binding.refreshRecycler.showContent();
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.tairui.industrial_operation.ui.mall.adapter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
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.util.DensityUtils;
|
||||
import com.tairui.industrial_operation.widget.GridSpacingItemDecoration;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
public class MallAdapter extends BaseMultiItemQuickAdapter<BaseHolderEntity, BaseViewHolder> {
|
||||
|
||||
public static final int TYPE_BANNER = 1;
|
||||
public static final int TYPE_FUNC = 2;
|
||||
public static final int TYPE_GOODS = 3;
|
||||
|
||||
private HomeGoodsAdapter goodsAdapter;
|
||||
|
||||
public MallAdapter(List<BaseHolderEntity> list) {
|
||||
super(list);
|
||||
addItemType(TYPE_BANNER, R.layout.item_mall_banner);
|
||||
addItemType(TYPE_FUNC, R.layout.item_home_func);
|
||||
addItemType(TYPE_GOODS, R.layout.item_home_goods);
|
||||
}
|
||||
|
||||
public void addGoodsData(List<HomeGoodsEntity.RecordsEntity> goods) {
|
||||
if (goodsAdapter != null) {
|
||||
goodsAdapter.addData(goods);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(@NonNull BaseViewHolder holder, BaseHolderEntity entity) {
|
||||
switch (holder.getItemViewType()) {
|
||||
case TYPE_FUNC:
|
||||
RecyclerView funcRecycler = holder.getView(R.id.recycle_view);
|
||||
funcRecycler.setLayoutManager(new GridLayoutManager(mContext, 5));
|
||||
MallFuncAdapter funcAdapter = new MallFuncAdapter();
|
||||
funcAdapter.setNewData((List<BaseHolderEntity>) entity.getData());
|
||||
funcRecycler.setAdapter(funcAdapter);
|
||||
funcAdapter.setOnItemClickListener((baseQuickAdapter, view, i) -> {
|
||||
});
|
||||
break;
|
||||
case TYPE_GOODS:
|
||||
RecyclerView goodsRecycler = holder.getView(R.id.recycle_view);
|
||||
goodsRecycler.setLayoutManager(new GridLayoutManager(mContext, 2));
|
||||
goodsRecycler.addItemDecoration(new GridSpacingItemDecoration(2, DensityUtils.dp2px(mContext, 12), true));
|
||||
goodsAdapter = new HomeGoodsAdapter();
|
||||
goodsAdapter.setNewData((List<HomeGoodsEntity.RecordsEntity>) entity.getData());
|
||||
goodsRecycler.setAdapter(goodsAdapter);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,21 @@
|
||||
package com.tairui.industrial_operation.ui.mall.adapter;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.tairui.industrial_operation.R;
|
||||
import com.tairui.industrial_operation.base.entity.BaseHolderEntity;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
public class MallFuncAdapter extends BaseQuickAdapter<BaseHolderEntity, BaseViewHolder> {
|
||||
|
||||
public MallFuncAdapter() {
|
||||
super(R.layout.item_func);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(@NonNull BaseViewHolder holder, BaseHolderEntity entity) {
|
||||
holder.setText(R.id.title, (String) entity.getData());
|
||||
holder.setImageResource(R.id.img, (int) entity.getSubData());
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
package com.tairui.industrial_operation.ui.shopping;
|
||||
|
||||
import com.tairui.industrial_operation.base.BaseFragment;
|
||||
import com.tairui.industrial_operation.databinding.FragmentShoppingBinding;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public class ShoppingFragment extends BaseFragment<FragmentShoppingBinding> {
|
||||
|
||||
@Override
|
||||
protected Class<FragmentShoppingBinding> getBindingClass() {
|
||||
return FragmentShoppingBinding.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
}
|
||||
}
|
12
app/src/main/res/drawable/bg_gradient_mall.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
|
||||
<gradient
|
||||
android:angle="315"
|
||||
android:endColor="#ECFDE1"
|
||||
android:centerColor="#B8ECB2"
|
||||
android:startColor="#5AC976"
|
||||
android:type="linear" />
|
||||
|
||||
</shape>
|
211
app/src/main/res/layout/activity_apply_records.xml
Normal file
@ -0,0 +1,211 @@
|
||||
<?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:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="申请记录"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tabBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toBottomOf="@id/toolbar">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="全部"
|
||||
android:textColor="@color/color_txt_green"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:text="审批中"
|
||||
android:textColorHint="@color/color_txt_black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:text="已授权"
|
||||
android:textColorHint="@color/color_txt_black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:text="已失效"
|
||||
android:textColorHint="@color/color_txt_black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:background="@drawable/bg_container_white_raduis_10"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/tabBar">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icLogo"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:src="@mipmap/pic_product_3"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:text="云南省有机食品"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toRightOf="@id/icLogo"
|
||||
app:layout_constraintTop_toTopOf="@id/icLogo" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="审批中"
|
||||
android:textColor="@color/color_txt_orange"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDeadLineLabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="申请期限:"
|
||||
android:textColor="@color/color_txt_label"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvName"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDeadLine"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="1年"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvDeadLineLabel"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDateLabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="申请时间:"
|
||||
android:textColor="@color/color_txt_label"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvName"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDeadLineLabel" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="2025.01.01"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvDateLabel"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDeadLineLabel" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/goodsLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/bg_container_light_gray_raduis_10"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/icLogo">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="申请商品:"
|
||||
android:textColor="@color/color_txt_label"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/pic_my_product_1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:text="耿马普罗旺斯西红柿沙瓤番茄甄选番茄苗"
|
||||
android:textColor="@color/color_txt_black"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -177,6 +177,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/sqjl"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
|
108
app/src/main/res/layout/fragment_mall.xml
Normal file
@ -0,0 +1,108 @@
|
||||
<?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">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/topLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_gradient_mall"
|
||||
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" />
|
||||
|
||||
|
||||
<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/icLogo"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:src="@mipmap/ic_logo_white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutSearchBar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:background="@drawable/bg_container_white_raduis_30"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
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
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:src="@mipmap/ic_search" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/btnSearch"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/transparent"
|
||||
android:text="惠农e贷"
|
||||
android:textColor="@color/color_txt_hint"
|
||||
android:textSize="16sp" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:padding="8dp"
|
||||
android:src="@mipmap/ic_scan" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnMessage"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:src="@mipmap/ic_shopcart_white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<com.tairui.industrial_operation.widget.RefreshRecyclerView
|
||||
android:id="@+id/refreshRecycler"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/white"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/topLayout" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
15
app/src/main/res/layout/item_mall_banner.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?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">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/pic_mall_1"
|
||||
app:layout_constraintDimensionRatio="390:156"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
BIN
app/src/main/res/mipmap-xxhdpi/ic_shopcart_white.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_mall_1.png
Normal file
After Width: | Height: | Size: 554 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_mall_10.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_mall_2.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_mall_3.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_mall_4.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_mall_5.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_mall_6.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_mall_7.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_mall_8.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_mall_9.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_mall_bg.png
Normal file
After Width: | Height: | Size: 668 KiB |