Browse Source

调整菜谱展示

燃气自翻炒锅
fyf 1 year ago
parent
commit
0a7ada67f3
19 changed files with 762 additions and 131 deletions
  1. +4
    -0
      app/src/main/java/com/bonait/bnframework/business/ConfigData.java
  2. +14
    -0
      app/src/main/java/com/bonait/bnframework/common/db/QueryDB.java
  3. +18
    -0
      app/src/main/java/com/bonait/bnframework/common/linktab/LinkMode.java
  4. +107
    -0
      app/src/main/java/com/bonait/bnframework/common/linktab/TopItemDecoration.java
  5. +73
    -0
      app/src/main/java/com/bonait/bnframework/common/linktab/makegood/MakeGoodLeftAdapter.java
  6. +46
    -0
      app/src/main/java/com/bonait/bnframework/common/linktab/makegood/MakeGoodRightAdapter.java
  7. +2
    -2
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/good_adapter.java
  8. +173
    -19
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/HomeFragmentPR.java
  9. +4
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/newhuoli_control.java
  10. +18
    -16
      app/src/main/res/layout/activity_cooking.xml
  11. +16
    -14
      app/src/main/res/layout/activity_cookingsimulated.xml
  12. +1
    -1
      app/src/main/res/layout/activity_dishtest.xml
  13. +47
    -10
      app/src/main/res/layout/fragment_home_pr.xml
  14. +2
    -2
      app/src/main/res/layout/fragment_home_sbkz.xml
  15. +5
    -5
      app/src/main/res/layout/item/layout/good_show.xml
  16. +181
    -62
      app/src/main/res/layout/item/layout/item_huolikongzhi1.xml
  17. +32
    -0
      app/src/main/res/layout/item/layout/item_left_makegood.xml
  18. +16
    -0
      app/src/main/res/layout/item/layout/item_right_lc.xml
  19. +3
    -0
      app/src/main/res/values/colors.xml

+ 4
- 0
app/src/main/java/com/bonait/bnframework/business/ConfigData.java View File

@@ -626,6 +626,8 @@ public class ConfigData {
{
good.gyid =allDataResAPI.data.bomInfo.get(0).id;
}

good.userID=cloudGood.goods_TypeID==null?"":cloudGood.goods_TypeID;
QueryDB.AddGoods(good);
//2.增加配方
// if (allDataResAPI.data.bomTechnologyActionInfo != null && allDataResAPI.data.bomTechnologyActionInfo.size() > 0) {
@@ -881,6 +883,8 @@ public class ConfigData {
id = java.util.UUID.randomUUID().toString();
QueryDB.UpdateGoodsGY(good.id, id);
}
QueryDB.UpdateGoodsTypeId(good.id,xl);

UpdateBomInfo bom = new UpdateBomInfo();
bom.id = id;
bom.bomType = fl;


+ 14
- 0
app/src/main/java/com/bonait/bnframework/common/db/QueryDB.java View File

@@ -705,6 +705,20 @@ public class QueryDB {
}
}

/**
* 修改商品小类信息
*
* @param id
* @param xlid
*/
public static void UpdateGoodsTypeId(String id, String xlid) {
BPA_GOODS goods = GetGoodsId(id);
if (goods != null) {
goods.userID = xlid;
Update(BPA_GOODS.class, goods);
}
}

/**
* 修改烹饪时长
*


+ 18
- 0
app/src/main/java/com/bonait/bnframework/common/linktab/LinkMode.java View File

@@ -0,0 +1,18 @@
package com.bonait.bnframework.common.linktab;

import java.util.List;

public class LinkMode {
public Object type;

public List<Object> content;

public Boolean isChoose;

public LinkMode(Object _type,List<Object> _content,Boolean _isChoose)
{
type=_type;
content=_content;
isChoose=_isChoose;
}
}

+ 107
- 0
app/src/main/java/com/bonait/bnframework/common/linktab/TopItemDecoration.java View File

@@ -0,0 +1,107 @@
package com.bonait.bnframework.common.linktab;

import static java.lang.Math.min;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.util.Log;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.bonait.bnframework.R;

import java.util.ArrayList;
import java.util.List;

public class TopItemDecoration extends RecyclerView.ItemDecoration{

public Context mContext;
//间隔高度
private int mHeight = 50;
//矩形画笔
private Paint mPaint=new Paint();
//标签画笔
private Paint textPaint=new Paint(Paint.ANTI_ALIAS_FLAG);

private Rect mRound =new Rect();

public List<String> typeListener=new ArrayList<>();
public TopItemDecoration(Context _context,List<String> type)
{
mContext=_context;
mPaint.setColor(ContextCompat.getColor(mContext, R.color.transparent));
textPaint.setColor(ContextCompat.getColor(mContext, R.color.topbj1));
textPaint.setTextSize(25f);
typeListener=type;
}

@Override
public void onDraw(@NonNull Canvas c, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
super.onDraw(c, parent, state);
int left = parent.getPaddingLeft();
int right =parent.getWidth() - parent.getPaddingLeft();
int childCount = parent.getChildCount();
try
{
for(int i=0;i<childCount;i++)
{
View childView = parent.getChildAt(i);
int bottom = childView.getTop();
int top = bottom - mHeight;

//绘制矩形间隔
c.drawRect(left, top, right, bottom, mPaint);
//根据位置获取当前item的标签
int index= parent.getChildAdapterPosition(childView);
if(index<typeListener.size())
{
String tag =typeListener.get(index);
//绘制标签文本内容
textPaint.getTextBounds(tag, 0, tag.length(), mRound);
c.drawText(tag, left + textPaint.getTextSize(), bottom - mHeight / 2 + mRound.height() / 2, textPaint);
}
}
}catch (Exception ex)
{
Log.e("异常", "onDraw: "+ex.getMessage());
}

}

@Override
public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
super.getItemOffsets(outRect, view, parent, state);
//设置间隔高度
outRect.top = mHeight;
}

@Override
public void onDrawOver(@NonNull Canvas c, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
super.onDrawOver(c, parent, state);

int left = parent.getPaddingLeft();
int right =parent.getWidth() - parent.getPaddingLeft();

LinearLayoutManager manager = (LinearLayoutManager)parent.getLayoutManager();
//第一个可见item位置
// int index = manager.findFirstVisibleItemPosition();
// if (index != -1) {
// //获取指定位置item的View信息
// View childView = parent.findViewHolderForLayoutPosition(index).itemView;
// int top = parent.getPaddingTop();
// String tag = typeListener.get(index);
// int bottom = parent.getPaddingTop() + mHeight;
// //悬浮置顶判断,其实也就是一直在绘制一个矩形加文本内容(上滑时取值bottom,下滑时取值childView.bottom.toFloat())
// bottom = min(childView.getBottom(), bottom);
// c.drawRect(0f, top, right, bottom, mPaint);
// textPaint.getTextBounds(tag, 0, tag.length(), mRound);
// c.drawText(tag, left + textPaint.getTextSize(), bottom - mHeight / 2 + mRound.height() / 2, textPaint);
// }
}
}

+ 73
- 0
app/src/main/java/com/bonait/bnframework/common/linktab/makegood/MakeGoodLeftAdapter.java View File

@@ -0,0 +1,73 @@
package com.bonait.bnframework.common.linktab.makegood;

import android.content.res.Resources;
import android.view.View;

import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.linktab.LinkMode;
import com.bonait.bnframework.common.model.mode.GoodsTypeInfo;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import java.util.List;

public class MakeGoodLeftAdapter extends BaseQuickAdapter<LinkMode, BaseViewHolder> {
public List<LinkMode> Fdata;
public Resources resources;
public LinearLayoutManager Manager;

public MakeGoodLeftAdapter(@LayoutRes int layoutResId, @Nullable List<LinkMode> data, Resources _resources, LinearLayoutManager _manager) {
super(layoutResId, data);
resources = _resources;
Fdata = data;
Manager = _manager;
}

@Override
protected void convert(BaseViewHolder holder, LinkMode item) {

GoodsTypeInfo type = (GoodsTypeInfo) item.type;
holder.setText(R.id.tv_type, type.goodsType_Name);
int index_d = Fdata.indexOf(item);
if (item.isChoose) {
holder.setBackgroundColor(R.id.tv_linearlayout, resources.getColor(R.color.tab_11));
holder.setTextColor(R.id.tv_type, resources.getColor(R.color.topbj1));
holder.setVisible(R.id.tv_image, true);
} else {
holder.setBackgroundColor(R.id.tv_linearlayout, resources.getColor(R.color.transparent));
holder.setTextColor(R.id.tv_type, resources.getColor(R.color.tab_text_normal));
holder.setVisible(R.id.tv_image, false);
}

//选中行
holder.getView(R.id.tv_type_layout).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
setChoose(index_d);
Manager.scrollToPositionWithOffset(index_d, 0);
}
});
}

/**
* 设置是否选择
*
* @param position
*/
public void setChoose(Integer position) {
for (LinkMode it : Fdata) {
it.isChoose = false;
}

if(position<Fdata.size())
{
Fdata.get(position).isChoose = true;
}
notifyDataSetChanged();
}
}


+ 46
- 0
app/src/main/java/com/bonait/bnframework/common/linktab/makegood/MakeGoodRightAdapter.java View File

@@ -0,0 +1,46 @@
package com.bonait.bnframework.common.linktab.makegood;

import static com.bonait.bnframework.MainApplication.getContext;

import android.content.Context;
import android.content.res.Resources;

import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.linktab.LinkMode;
import com.bonait.bnframework.common.view.MyLayoutManager;
import com.bonait.bnframework.modules.home.adapter.good_adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

public class MakeGoodRightAdapter extends BaseQuickAdapter<LinkMode, BaseViewHolder> {

public List<LinkMode> Fdata;
public Resources resources;
public MyClickListener mListener = null;
public Context context;

public MakeGoodRightAdapter(@LayoutRes int layoutResId, @Nullable List<LinkMode> data, Resources _resources, MyClickListener _mListener,Context c) {
super(layoutResId, data);
resources=_resources;
Fdata=data;
mListener=_mListener;
context=c;
}

@Override
protected void convert(BaseViewHolder holder, LinkMode item) {
RecyclerView view= holder.getView(R.id.recycler_view);
MyLayoutManager layout = new MyLayoutManager();
layout.setAutoMeasureEnabled(true);
view.setLayoutManager(layout);
good_adapter adapter = new good_adapter(context, item.content,mListener);
view.setAdapter(adapter);
}
}

+ 2
- 2
app/src/main/java/com/bonait/bnframework/modules/home/adapter/good_adapter.java View File

@@ -40,14 +40,14 @@ public class good_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>

private Context context;

ArrayList<SectionItem> liaos = new ArrayList<>();
List<Object> liaos = new ArrayList<>();

/**
* 点击事件
*/
public MyClickListener mListener = null;

public good_adapter(Context context, ArrayList<SectionItem> data, MyClickListener _mListener) {
public good_adapter(Context context, List<Object> data, MyClickListener _mListener) {
this.context = context;
mLayoutInflater = LayoutInflater.from(context);
liaos = data;


+ 173
- 19
app/src/main/java/com/bonait/bnframework/modules/home/fragment/HomeFragmentPR.java View File

@@ -7,6 +7,7 @@ import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.SearchView;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.StaggeredGridLayoutManager;

@@ -35,9 +36,14 @@ import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_GOODS;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.helper.SoftKeyBoardListener;
import com.bonait.bnframework.common.linktab.LinkMode;
import com.bonait.bnframework.common.linktab.TopItemDecoration;
import com.bonait.bnframework.common.linktab.makegood.MakeGoodLeftAdapter;
import com.bonait.bnframework.common.linktab.makegood.MakeGoodRightAdapter;
import com.bonait.bnframework.common.message.MessageLooper;
import com.bonait.bnframework.common.message.MessageManager;
import com.bonait.bnframework.common.model.mode.CloudGood;
import com.bonait.bnframework.common.model.mode.GoodsTypeInfo;
import com.bonait.bnframework.common.utils.AlertDialogUtils;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.modules.home.adapter.good_adapter;
@@ -56,7 +62,9 @@ import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction;
import com.qmuiteam.qmui.widget.section.QMUISection;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

import butterknife.BindView;
import butterknife.ButterKnife;
@@ -66,8 +74,20 @@ public class HomeFragmentPR extends BaseFragment {
@BindView(R.id.topbar)
QMUITopBarLayout mTopBar;//顶部标题

@BindView(R.id.recycler_view)
RecyclerView recycler_view;//商品
// @BindView(R.id.recycler_view)
// RecyclerView recycler_view;//商品

/**
* 左边分类
*/
@BindView(R.id.rv_left)
RecyclerView rv_left;

/**
* 右边商品
*/
@BindView(R.id.rv_right)
RecyclerView rv_right;

@BindView(R.id.quanbucaipu)
TextView quanbucaipu;//全部菜谱
@@ -197,44 +217,178 @@ public class HomeFragmentPR extends BaseFragment {
});
}


/**
* 初始化显示数据
*/
private void initData() {
StaggeredGridLayoutManager layout = new StaggeredGridLayoutManager
(3, StaggeredGridLayoutManager.VERTICAL);
recycler_view.setLayoutManager(layout);

ArrayList<BPA_GOODS> good = new ArrayList<>();
List<CloudGood> cloudGoods = new ArrayList<>();

String name = search_view.getQuery().toString();
if (name.isEmpty()) {
good = QueryDB.GetGoodsALL();
cloudGoods=ConfigName.getInstance().cloudGoods;
} else {
good = QueryDB.GetGoodsLike(name);
for (CloudGood kk:ConfigName.getInstance().cloudGoods)
{
if(kk.goods_Name.contains(name))
{
cloudGoods.add(kk);
}
}
}

List<String> Bendi_id = new ArrayList<>();
ArrayList<SectionItem> contents_bdcp = new ArrayList<>();
ArrayList<SectionItem> contents_ydcp = new ArrayList<>();
for (BPA_GOODS item : good) {
if (item.url == null) {
item.url = "未知";
List<String> typeIds = new ArrayList<>();
List<GoodsTypeInfo> type = new ArrayList<>();
if (ConfigName.getInstance().cloudData != null && ConfigName.getInstance().cloudData.goodsTypeInfo != null) {
for (GoodsTypeInfo mm : ConfigName.getInstance().cloudData.goodsTypeInfo) {
type.add(mm);
typeIds.add(mm.id);
}
contents_bdcp.add(new SectionItem(item.name, String.valueOf(item.maketime), item.id, item.url, item.issc == 1, false, true));
Bendi_id.add(item.id);
}
GoodsTypeInfo info = new GoodsTypeInfo();
info.id = "其他";
info.goodsType_Name = "其他";
type.add(info);

for (CloudGood item : ConfigName.getInstance().cloudGoods) {
contents_ydcp.add(new SectionItem(item.goods_Name, "180", item.id, item.goods_ImgUrl, false, true, Bendi_id.contains(item.id) ? true : false));
List<String> Bendi_id = new ArrayList<>();
List<LinkMode> Bdata = new ArrayList<>();
List<LinkMode> Ydata = new ArrayList<>();

int i = 0;
for (GoodsTypeInfo itemtype : type) {
ArrayList<SectionItem> contents = new ArrayList<>();
for (BPA_GOODS item : good) {
if (item.userID != null && !item.userID.isEmpty() && item.userID.equals(itemtype.id)) {
if (item.url == null || item.url.isEmpty()) {
item.url = "未知";
}
contents.add(new SectionItem(item.name, String.valueOf(item.maketime), item.id, item.url, item.issc == 1, false, true));
Bendi_id.add(item.id);
} else {
if (itemtype.id.equals("其他") && !typeIds.contains(item.userID == null ? item.userID = "" : item.userID)) {
if (item.url == null || item.url.isEmpty()) {
item.url = "未知";
}
contents.add(new SectionItem(item.name, String.valueOf(item.maketime), item.id, item.url, item.issc == 1, false, true));
Bendi_id.add(item.id);
}
}
}
if (contents.size() > 0) {
Bdata.add(new LinkMode(itemtype, Arrays.asList(contents.toArray()), i == 0 ? true : false));
i++;
}
}

i = 0;
for (GoodsTypeInfo itemtype : type) {
ArrayList<SectionItem> contents = new ArrayList<>();
for (CloudGood item : cloudGoods) {
if (item.goods_TypeID.equals(itemtype.id)) {
contents.add(new SectionItem(item.goods_Name, "180", item.id, item.goods_ImgUrl, false, true, Bendi_id.contains(item.id) ? true : false));
} else {
if (itemtype.id.equals("其他") && !typeIds.contains(item.goods_TypeID)) {
contents.add(new SectionItem(item.goods_Name, "180", item.id, item.goods_ImgUrl, false, true, Bendi_id.contains(item.id) ? true : false));
Bendi_id.add(item.id);
}
}
}
if (contents.size() > 0) {
Ydata.add(new LinkMode(itemtype, Arrays.asList(contents.toArray()), i == 0 ? true : false));
i++;
}
}
MakeGoodLeftAdapter leftAdapter = null;
MakeGoodRightAdapter rightAdapter = null;
LinearLayoutManager manager = (LinearLayoutManager) rv_right.getLayoutManager();
if (SelectIndex == 1) {
good_adapter adapter = new good_adapter(context, contents_bdcp, myClickListener);
recycler_view.setAdapter(adapter);
leftAdapter = new MakeGoodLeftAdapter(R.layout.item_left_makegood, Bdata, getResources(), manager);
rightAdapter = new MakeGoodRightAdapter(R.layout.item_right_lc, Bdata, getResources(), myClickListener, context);
rv_left.setAdapter(leftAdapter);
rv_right.setAdapter(rightAdapter);

//添加分组悬浮效果
List<String> typeListener = new ArrayList<>();
for (LinkMode item : Bdata) {
typeListener.add(((GoodsTypeInfo) item.type).goodsType_Name);
}

if (rv_right.getItemDecorationCount() > 0) {
rv_right.removeItemDecorationAt(0);
}
TopItemDecoration top = new TopItemDecoration(context, typeListener);
rv_right.addItemDecoration(top);

} else {
good_adapter adapter = new good_adapter(context, contents_ydcp, myClickListener);
recycler_view.setAdapter(adapter);
leftAdapter = new MakeGoodLeftAdapter(R.layout.item_left_makegood, Ydata, getResources(), manager);
rightAdapter = new MakeGoodRightAdapter(R.layout.item_right_lc, Ydata, getResources(), myClickListener, context);
rv_left.setAdapter(leftAdapter);
rv_right.setAdapter(rightAdapter);

//添加分组悬浮效果
List<String> typeListener = new ArrayList<>();
for (LinkMode item : Ydata) {
typeListener.add(((GoodsTypeInfo) item.type).goodsType_Name);
}

if (rv_right.getItemDecorationCount() > 0) {
rv_right.removeItemDecorationAt(0);
}
TopItemDecoration top = new TopItemDecoration(context, typeListener);
rv_right.addItemDecoration(top);
}

//左侧联动
MakeGoodLeftAdapter finalLeftAdapter = leftAdapter;
rv_right.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
int firstItemPosition = manager.findLastVisibleItemPosition();
if (firstItemPosition != -1 && dy != 0) {
rv_left.smoothScrollToPosition(firstItemPosition);
finalLeftAdapter.setChoose(firstItemPosition);
}
}
});
// StaggeredGridLayoutManager layout = new StaggeredGridLayoutManager
// (3, StaggeredGridLayoutManager.VERTICAL);
// recycler_view.setLayoutManager(layout);
//
// ArrayList<BPA_GOODS> good = new ArrayList<>();
// String name = search_view.getQuery().toString();
// if (name.isEmpty()) {
// good = QueryDB.GetGoodsALL();
// } else {
// good = QueryDB.GetGoodsLike(name);
// }
//
// List<String> Bendi_id = new ArrayList<>();
// ArrayList<SectionItem> contents_bdcp = new ArrayList<>();
// ArrayList<SectionItem> contents_ydcp = new ArrayList<>();
// for (BPA_GOODS item : good) {
// if (item.url == null) {
// item.url = "未知";
// }
// contents_bdcp.add(new SectionItem(item.name, String.valueOf(item.maketime), item.id, item.url, item.issc == 1, false, true));
// Bendi_id.add(item.id);
// }
//
// for (CloudGood item : ConfigName.getInstance().cloudGoods) {
// contents_ydcp.add(new SectionItem(item.goods_Name, "180", item.id, item.goods_ImgUrl, false, true, Bendi_id.contains(item.id) ? true : false));
// }
//
// if (SelectIndex == 1) {
// good_adapter adapter = new good_adapter(context, contents_bdcp, myClickListener);
// recycler_view.setAdapter(adapter);
// } else {
// good_adapter adapter = new good_adapter(context, contents_ydcp, myClickListener);
// recycler_view.setAdapter(adapter);
// }
}

public MyClickListener myClickListener = new MyClickListener() {


+ 4
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/newhuoli_control.java View File

@@ -21,6 +21,8 @@ import butterknife.ButterKnife;
import butterknife.OnClick;

public class newhuoli_control extends LinearLayout {
@BindView(R.id.close_out)
LinearLayout close_out;
@BindView(R.id.colse)
ImageView colse;
@BindView(R.id.hl1)
@@ -157,6 +159,7 @@ public class newhuoli_control extends LinearLayout {
{
level=value;
colse.setVisibility(View.VISIBLE);
close_out.setVisibility(View.VISIBLE);
if(value==1)
{
Status=true;
@@ -261,6 +264,7 @@ public class newhuoli_control extends LinearLayout {
{
Status=false;
colse.setVisibility(View.INVISIBLE);
close_out.setVisibility(View.INVISIBLE);
colse.setImageResource(R.mipmap.huoli_close);
hl1.setImageResource(R.mipmap.hl2);
hl2.setImageResource(R.mipmap.hl2);


+ 18
- 16
app/src/main/res/layout/activity_cooking.xml View File

@@ -112,25 +112,14 @@

<ImageView
android:id="@+id/kancaipu"
android:layout_width="190dp"
android:layout_width="170dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="-80dp"
android:src="@mipmap/yy_h1" />

<!-- 火力 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical">
<com.bonait.bnframework.modules.home.fragment.mode.newhuoli_control
android:id="@+id/huoli"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:tag="true" />
</LinearLayout>

</RelativeLayout>

<RelativeLayout
@@ -150,7 +139,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="0dp"
android:layout_marginTop="20dp"
android:orientation="vertical">

<com.bonait.bnframework.modules.home.fragment.mode.imagebuttom3
@@ -355,12 +344,25 @@
</RelativeLayout>
</LinearLayout>

<!-- 火力 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="210dp"
android:orientation="vertical">
<com.bonait.bnframework.modules.home.fragment.mode.newhuoli_control
android:id="@+id/huoli"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:tag="true" />
</LinearLayout>

<!-- 温度 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="260dp"
android:layout_marginTop="290dp"
android:orientation="vertical">

<TextView
@@ -369,7 +371,7 @@
android:layout_height="wrap_content"
android:text="39°C"
android:textColor="#C6C6C3"
android:textSize="50dp"
android:textSize="30dp"
android:textStyle="bold" />
</LinearLayout>



+ 16
- 14
app/src/main/res/layout/activity_cookingsimulated.xml View File

@@ -76,7 +76,7 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp">
android:layout_marginTop="0dp">

<com.bonait.bnframework.modules.home.fragment.mode.jingdutiao
android:id="@+id/t_jindu"
@@ -102,18 +102,7 @@
android:layout_marginTop="5dp"
android:src="@mipmap/zhijietuichu1"/>

<!-- 火力 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical">
<com.bonait.bnframework.modules.home.fragment.mode.newhuoli_control
android:id="@+id/huoli"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:tag="true" />
</LinearLayout>

</RelativeLayout>

<RelativeLayout
@@ -133,7 +122,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="0dp"
android:layout_marginTop="20dp"
android:orientation="vertical">

<com.bonait.bnframework.modules.home.fragment.mode.imagebuttom3
@@ -339,6 +328,19 @@
</RelativeLayout>
</LinearLayout>

<!-- 火力 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="210dp"
android:orientation="vertical">
<com.bonait.bnframework.modules.home.fragment.mode.newhuoli_control
android:id="@+id/huoli"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:tag="true" />
</LinearLayout>

<RelativeLayout
android:visibility="gone"
android:id="@+id/showbuttomtop"


+ 1
- 1
app/src/main/res/layout/activity_dishtest.xml View File

@@ -123,7 +123,7 @@
android:shadowColor="#65000000"
android:text="39°C"
android:textColor="#C6C6C3"
android:textSize="35dp"
android:textSize="30dp"
android:textStyle="bold" />
</RelativeLayout>
<!-- android:shadowDx="0.0"-->


+ 47
- 10
app/src/main/res/layout/fragment_home_pr.xml View File

@@ -13,16 +13,21 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/dp_10">
android:layout_marginTop="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_10"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp">

<LinearLayout
android:layout_marginTop="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_marginTop="5dp">

<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_10">

<TextView
android:id="@+id/quanbucaipu"
android:layout_width="wrap_content"
@@ -38,6 +43,7 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_10">

<TextView
android:id="@+id/yunduancaipu"
android:layout_width="wrap_content"
@@ -52,9 +58,9 @@
<androidx.appcompat.widget.SearchView
android:id="@+id/search_view"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="40dp"
android:layout_marginLeft="@dimen/dp_10"
android:layout_weight="1"
android:background="@drawable/ssk" />

</LinearLayout>
@@ -64,21 +70,52 @@
android:layout_height="match_parent"
android:layout_marginTop="60dp"
android:layout_marginBottom="40dp">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
</androidx.recyclerview.widget.RecyclerView>
android:layout_height="match_parent"
android:orientation="horizontal">

<LinearLayout
android:layout_width="80dp"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_left"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</LinearLayout>

<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_right"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</LinearLayout>
</LinearLayout>

<!-- <androidx.recyclerview.widget.RecyclerView-->
<!-- android:id="@+id/recycler_view"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent">-->
<!-- </androidx.recyclerview.widget.RecyclerView>-->
</RelativeLayout>

<com.bonait.bnframework.modules.home.fragment.mode.add_qupenren
android:id="@+id/qupenren"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
/>
android:visibility="gone" />
</RelativeLayout>
</RelativeLayout>



+ 2
- 2
app/src/main/res/layout/fragment_home_sbkz.xml View File

@@ -55,7 +55,7 @@
android:layout_centerHorizontal="true">

<RelativeLayout
android:layout_width="110dp"
android:layout_width="90dp"
android:layout_height="match_parent">

<TextView
@@ -67,7 +67,7 @@
android:shadowColor="#65000000"
android:text="123°C"
android:textColor="#C6C6C3"
android:textSize="35dp"
android:textSize="30dp"
android:textStyle="bold" />
</RelativeLayout>
<!-- android:shadowDx="0.0"-->


+ 5
- 5
app/src/main/res/layout/item/layout/good_show.xml View File

@@ -2,8 +2,8 @@
<RelativeLayout 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="165dp"
android:layout_height="195dp">
android:layout_width="145dp"
android:layout_height="165dp">

<LinearLayout
android:layout_width="match_parent"
@@ -27,7 +27,7 @@

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="120dp">
android:layout_height="100dp">

<ImageView
android:id="@+id/ImageUrl"
@@ -61,14 +61,14 @@
android:text="三月瓜"
android:textAlignment="center"
android:textColor="#BEAA6A"
android:textSize="20dp"
android:textSize="18dp"
android:textStyle="bold"
tools:ignore="MissingConstraints" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="5dp"
android:layout_marginBottom="0dp"
android:orientation="horizontal">

<RelativeLayout


+ 181
- 62
app/src/main/res/layout/item/layout/item_huolikongzhi1.xml View File

@@ -5,74 +5,193 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:id="@+id/close_out"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="关"
android:textAlignment="center"
android:textColor="#BEAA6A"
android:textSize="18dp"
android:textStyle="bold" />
<ImageView
android:id="@+id/colse"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_centerVertical="true"
android:src="@mipmap/hlwqd" />
</LinearLayout>

<ImageView
android:id="@+id/colse"
android:layout_width="35dp"
android:layout_height="50dp"
android:layout_centerVertical="true"
android:src="@mipmap/hlwqd" />

<ImageView
android:layout_marginLeft="0dp"
android:id="@+id/hl1"
android:layout_width="35dp"
android:layout_height="50dp"
android:layout_centerVertical="true"
android:src="@mipmap/hlwqd" />
<ImageView
android:id="@+id/hl2"
android:layout_marginLeft="0dp"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="①"
android:textAlignment="center"
android:textColor="#BEAA6A"
android:textSize="18dp"
android:textStyle="bold" />
<ImageView
android:id="@+id/hl1"
android:layout_marginLeft="0dp"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_centerVertical="true"
android:src="@mipmap/hlwqd" />
</LinearLayout>

android:layout_width="35dp"
android:layout_height="50dp"
android:layout_centerVertical="true"
android:src="@mipmap/hlwqd" />
<ImageView
android:id="@+id/hl3"
android:layout_marginLeft="0dp"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="②"
android:textAlignment="center"
android:textColor="#BEAA6A"
android:textSize="18dp"
android:textStyle="bold" />
<ImageView
android:id="@+id/hl2"
android:layout_marginLeft="0dp"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_centerVertical="true"
android:src="@mipmap/hlwqd" />
</LinearLayout>

android:layout_width="35dp"
android:layout_height="50dp"
android:layout_centerVertical="true"
android:src="@mipmap/hlwqd" />
<ImageView
android:id="@+id/hl4"
android:layout_marginLeft="0dp"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="③"
android:textAlignment="center"
android:textColor="#BEAA6A"
android:textSize="18dp"
android:textStyle="bold" />
<ImageView
android:id="@+id/hl3"
android:layout_marginLeft="0dp"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_centerVertical="true"
android:src="@mipmap/hlwqd" />
</LinearLayout>

android:layout_width="35dp"
android:layout_height="50dp"
android:layout_centerVertical="true"
android:src="@mipmap/hlwqd" />
<ImageView
android:id="@+id/hl5"
android:layout_marginLeft="0dp"
android:layout_width="35dp"
android:layout_height="50dp"
android:layout_centerVertical="true"
android:src="@mipmap/hlwqd" />
<ImageView
android:id="@+id/hl6"
android:layout_marginLeft="0dp"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="④"
android:textAlignment="center"
android:textColor="#BEAA6A"
android:textSize="18dp"
android:textStyle="bold" />
<ImageView
android:id="@+id/hl4"
android:layout_marginLeft="0dp"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_centerVertical="true"
android:src="@mipmap/hlwqd" />
</LinearLayout>

android:layout_width="35dp"
android:layout_height="50dp"
android:layout_centerVertical="true"
android:src="@mipmap/hlwqd" />
<ImageView
android:id="@+id/hl7"
android:layout_marginLeft="0dp"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="⑤"
android:textAlignment="center"
android:textColor="#BEAA6A"
android:textSize="18dp"
android:textStyle="bold" />
<ImageView
android:id="@+id/hl5"
android:layout_marginLeft="0dp"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_centerVertical="true"
android:src="@mipmap/hlwqd" />
</LinearLayout>

android:layout_width="35dp"
android:layout_height="50dp"
android:layout_centerVertical="true"
android:src="@mipmap/hlwqd" />
<ImageView
android:id="@+id/hl8"
android:layout_marginLeft="0dp"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="⑥"
android:textAlignment="center"
android:textColor="#BEAA6A"
android:textSize="18dp"
android:textStyle="bold" />
<ImageView
android:id="@+id/hl6"
android:layout_marginLeft="0dp"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_centerVertical="true"
android:src="@mipmap/hlwqd" />
</LinearLayout>

android:layout_width="35dp"
android:layout_height="50dp"
android:layout_centerVertical="true"
android:src="@mipmap/hlwqd" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="⑦"
android:textAlignment="center"
android:textColor="#BEAA6A"
android:textSize="18dp"
android:textStyle="bold" />
<ImageView
android:id="@+id/hl7"
android:layout_marginLeft="0dp"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_centerVertical="true"
android:src="@mipmap/hlwqd" />
</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="⑧"
android:textAlignment="center"
android:textColor="#BEAA6A"
android:textSize="18dp"
android:textStyle="bold" />
<ImageView
android:id="@+id/hl8"
android:layout_marginLeft="0dp"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_centerVertical="true"
android:src="@mipmap/hlwqd" />
</LinearLayout>
</LinearLayout>

+ 32
- 0
app/src/main/res/layout/item/layout/item_left_makegood.xml View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/tv_linearlayout"
android:orientation="horizontal"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="50dp">

<RelativeLayout
android:id="@+id/tv_type_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<TextView
android:id="@+id/tv_type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:text="柠檬茶"
android:textSize="16dp" />

<RelativeLayout
android:layout_centerVertical="true"
android:layout_marginLeft="0dp"
android:id="@+id/tv_image"
android:layout_width="4dp"
android:layout_height="match_parent"
android:background="@color/topbj1"/>
</RelativeLayout>
</LinearLayout>

+ 16
- 0
app/src/main/res/layout/item/layout/item_right_lc.xml View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- <ScrollView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent">-->
<!-- -->
<!-- </ScrollView>-->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>

+ 3
- 0
app/src/main/res/values/colors.xml View File

@@ -14,6 +14,9 @@
<color name="selebottom">#3604BFEF</color>
<color name="topbj1">#BEAA6A</color>
<color name="dialogbj">#A5000000</color>
<color name="tab_text_normal">#99a0aa</color>
<color name="tab_11">#EFE9D2</color>



<!-- common -->


Loading…
Cancel
Save