公共品牌-首页
@ -138,6 +138,13 @@
|
|||||||
android:configChanges="orientation|screenSize|keyboardHidden"
|
android:configChanges="orientation|screenSize|keyboardHidden"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.brand.PublicBrandActivity"
|
||||||
|
android:configChanges="orientation|screenSize|keyboardHidden"
|
||||||
|
android:exported="false"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.photoview.PhotoViewActivty"
|
android:name=".ui.photoview.PhotoViewActivty"
|
||||||
android:configChanges="orientation|screenSize|keyboardHidden"
|
android:configChanges="orientation|screenSize|keyboardHidden"
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
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.ActivityPublicBrandBinding;
|
||||||
|
|
||||||
|
public class PublicBrandActivity extends BaseActivity<ActivityPublicBrandBinding> {
|
||||||
|
@Override
|
||||||
|
protected Class<ActivityPublicBrandBinding> getBindingClass() {
|
||||||
|
return ActivityPublicBrandBinding.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void initStatusBar() {
|
||||||
|
ImmersionBar.with(this).fitsSystemWindows(false).transparentStatusBar()
|
||||||
|
.statusBarDarkFont(true).init();
|
||||||
|
}
|
||||||
|
}
|
@ -3,10 +3,10 @@ package com.tairui.industrial_operation.ui.home.adapter;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
|
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
|
||||||
import com.chad.library.adapter.base.BaseViewHolder;
|
import com.chad.library.adapter.base.BaseViewHolder;
|
||||||
import com.tairui.industrial_operation.R;
|
import com.tairui.industrial_operation.R;
|
||||||
import com.tairui.industrial_operation.base.entity.BaseHolderEntity;
|
import com.tairui.industrial_operation.base.entity.BaseHolderEntity;
|
||||||
|
import com.tairui.industrial_operation.ui.brand.PublicBrandActivity;
|
||||||
import com.tairui.industrial_operation.ui.home.entity.HomeGoodsEntity;
|
import com.tairui.industrial_operation.ui.home.entity.HomeGoodsEntity;
|
||||||
import com.tairui.industrial_operation.ui.smart_farm.SmartFarmActivity;
|
import com.tairui.industrial_operation.ui.smart_farm.SmartFarmActivity;
|
||||||
import com.tairui.industrial_operation.util.DensityUtils;
|
import com.tairui.industrial_operation.util.DensityUtils;
|
||||||
@ -20,7 +20,6 @@ import com.zhpan.indicator.enums.IndicatorStyle;
|
|||||||
|
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
@ -82,12 +81,11 @@ public class HomeAdapter extends BaseMultiItemQuickAdapter<BaseHolderEntity, Bas
|
|||||||
HomeFuncAdapter funcAdapter = new HomeFuncAdapter();
|
HomeFuncAdapter funcAdapter = new HomeFuncAdapter();
|
||||||
funcAdapter.setNewData((List<BaseHolderEntity>) entity.getData());
|
funcAdapter.setNewData((List<BaseHolderEntity>) entity.getData());
|
||||||
funcRecycler.setAdapter(funcAdapter);
|
funcRecycler.setAdapter(funcAdapter);
|
||||||
funcAdapter.setOnItemClickListener(new OnItemClickListener() {
|
funcAdapter.setOnItemClickListener((baseQuickAdapter, view, i) -> {
|
||||||
@Override
|
if (i == 0) {
|
||||||
public void onItemClick(BaseQuickAdapter baseQuickAdapter, View view, int i) {
|
IntentUtil.startActivity(mContext, SmartFarmActivity.class);
|
||||||
if (i == 0) {
|
} else if (i == 3) {
|
||||||
IntentUtil.startActivity(mContext, SmartFarmActivity.class);
|
IntentUtil.startActivity(mContext, PublicBrandActivity.class);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
12
app/src/main/res/drawable/bg_gradient_public_brand.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:centerColor="#F5F5F5"
|
||||||
|
android:endColor="#F5F5F5"
|
||||||
|
android:startColor="#94FFD5"
|
||||||
|
android:type="linear" />
|
||||||
|
|
||||||
|
</shape>
|
274
app/src/main/res/layout/activity_public_brand.xml
Normal file
@ -0,0 +1,274 @@
|
|||||||
|
<?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">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="400dp"
|
||||||
|
android:background="@drawable/bg_gradient_public_brand"
|
||||||
|
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" />
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:id="@+id/refreshRecycler"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/toolbar">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/qwrz"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:src="@mipmap/pic_public_brand_1"
|
||||||
|
app:layout_constraintDimensionRatio="358:140"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/dt"
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:src="@mipmap/pic_public_brand_2"
|
||||||
|
app:layout_constraintDimensionRatio="200:140"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/qwrz" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/wdcp"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:src="@mipmap/pic_public_brand_3"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/ph1"
|
||||||
|
app:layout_constraintDimensionRatio="150:64"
|
||||||
|
app:layout_constraintLeft_toRightOf="@id/dt"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/dt" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/ph1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="12dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/lqpp"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/wdcp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/lqpp"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginLeft="2dp"
|
||||||
|
android:src="@mipmap/pic_public_brand_4"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/dt"
|
||||||
|
app:layout_constraintDimensionRatio="156:64"
|
||||||
|
app:layout_constraintLeft_toRightOf="@id/dt"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/ph1" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:src="@mipmap/ic_ppdj" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:text="品牌登记"
|
||||||
|
android:textColor="@color/color_txt_black"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:src="@mipmap/ic_cpdj" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:text="产品登记"
|
||||||
|
android:textColor="@color/color_txt_black"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:src="@mipmap/ic_sqjl" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:text="申请记录"
|
||||||
|
android:textColor="@color/color_txt_black"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:src="@mipmap/ic_sqsq" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:text="授权申请"
|
||||||
|
android:textColor="@color/color_txt_black"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/bg_container_white_raduis_10"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="12dp">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="left|center_vertical"
|
||||||
|
android:text="品牌服务"
|
||||||
|
android:textColor="@color/color_txt_black"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="right|center_vertical"
|
||||||
|
android:drawableRight="@mipmap/ic_arrow_right_gray"
|
||||||
|
android:text="查看更多"
|
||||||
|
android:textColor="@color/color_txt_label"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:src="@mipmap/pic_public_brand_5" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:src="@mipmap/pic_public_brand_6" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
BIN
app/src/main/res/mipmap-xxhdpi/ic_arrow_right_gray.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_cpdj.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_ppdj.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_sqjl.png
Normal file
After Width: | Height: | Size: 9.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_sqsq.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_public_brand_1.png
Normal file
After Width: | Height: | Size: 468 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_public_brand_2.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_public_brand_3.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_public_brand_4.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_public_brand_5.png
Normal file
After Width: | Height: | Size: 310 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/pic_public_brand_6.png
Normal file
After Width: | Height: | Size: 713 KiB |