Browse Source

增加网络图片2555

tags/old_version_1
fyf 1 year ago
parent
commit
1e6cecbea8
19 changed files with 699 additions and 451 deletions
  1. +0
    -6
      .idea/compiler.xml
  2. +0
    -20
      .idea/gradle.xml
  3. +0
    -30
      .idea/jarRepositories.xml
  4. +0
    -5
      .idea/misc.xml
  5. +0
    -6
      .idea/render.experimental.xml
  6. +0
    -6
      .idea/vcs.xml
  7. +0
    -3
      app/src/main/java/com/bonait/bnframework/business/ConfigData.java
  8. +2
    -0
      app/src/main/java/com/bonait/bnframework/common/constant/MessageName.java
  9. +8
    -3
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/sp_adapter.java
  10. +6
    -2
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CpActivity.java
  11. +43
    -18
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyActivity.java
  12. +92
    -2
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyUpdateActivity.java
  13. +3
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/ImageChooseActivity.java
  14. +5
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/QDListSectionAdapter.java
  15. +12
    -4
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/SectionItem.java
  16. +253
    -178
      app/src/main/res/layout/activity_diy.xml
  17. +266
    -162
      app/src/main/res/layout/activity_diy_update.xml
  18. +8
    -4
      app/src/main/res/layout/item/layout/item_sp.xml
  19. +1
    -0
      app/src/main/res/layout/item/layout/note_rv_tree_second.xml

+ 0
- 6
.idea/compiler.xml View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
</component>
</project>

+ 0
- 20
.idea/gradle.xml View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="JDK" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

+ 0
- 30
.idea/jarRepositories.xml View File

@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven" />
<option name="name" value="maven" />
<option name="url" value="https://jitpack.io" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
</component>
</project>

+ 0
- 5
.idea/misc.xml View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="JDK" project-jdk-type="JavaSDK" />
</project>

+ 0
- 6
.idea/render.experimental.xml View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RenderSettings">
<option name="showDecorations" value="true" />
</component>
</project>

+ 0
- 6
.idea/vcs.xml View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

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

@@ -203,14 +203,11 @@ public class ConfigData {
{
BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize=2;//宽高压缩为原来的1/2
options.inPreferredConfig=Bitmap.Config.ARGB_4444;
Bitmap bitmap0= BitmapFactory.decodeResource(context.getResources(), R.mipmap.loading3,options);
Bitmap bitmap1= BitmapFactory.decodeResource(context.getResources(), R.mipmap.image1,options);
Bitmap bitmap2= BitmapFactory.decodeResource(context.getResources(), R.mipmap.image2,options);
Bitmap bitmap3= BitmapFactory.decodeResource(context.getResources(), R.mipmap.image3,options);
Bitmap bitmap4= BitmapFactory.decodeResource(context.getResources(), R.mipmap.image4,options);
LocalCacheUtils localCacheUtils=new LocalCacheUtils();
localCacheUtils.setBitmapToLocal("image0.png",bitmap0);
localCacheUtils.setBitmapToLocal("image1.png",bitmap1);
localCacheUtils.setBitmapToLocal("image2.png",bitmap2);
localCacheUtils.setBitmapToLocal("image3.png",bitmap3);


+ 2
- 0
app/src/main/java/com/bonait/bnframework/common/constant/MessageName.java View File

@@ -19,4 +19,6 @@ public interface MessageName {

String ClickGood="ClickGood";//点击商品

String ClickImage="ClickImage";//点击图标

}

+ 8
- 3
app/src/main/java/com/bonait/bnframework/modules/home/adapter/sp_adapter.java View File

@@ -8,12 +8,14 @@ import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.constant.DataBus;
import com.bonait.bnframework.common.db.mode.BPA_GOODS;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.image.MyBitmapUtils;
import com.bonait.bnframework.common.utils.AlertDialogUtils;
import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction;
@@ -52,9 +54,12 @@ public class sp_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
try {
if (holder instanceof MyLCViewHolder1) {
MyLCViewHolder1 myViewHolder = (MyLCViewHolder1) holder;
myViewHolder.img.setBackground(context.getResources().getDrawable(R.mipmap.hgr));
if(goods.get(position).url!=null)
{
new MyBitmapUtils().disPlay(myViewHolder.img,goods.get(position).url);
}
//myViewHolder.img.setBackground(context.getResources().getDrawable(R.mipmap.hgr));
myViewHolder.name.setText(goods.get(position).name);

myViewHolder.img.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@@ -117,7 +122,7 @@ public class sp_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
}

public static class MyLCViewHolder1 extends RecyclerView.ViewHolder {
RelativeLayout img;//图片按钮
ImageView img;//图片按钮
QMUILinkTextView name;//名称

public MyLCViewHolder1(View view) {


+ 6
- 2
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CpActivity.java View File

@@ -180,10 +180,14 @@ public class CpActivity extends BaseActivity {

for (BPA_GOODS item:good)
{
contents_bdcp.add(new SectionItem(item.name, String.valueOf(item.maketime), item.id,item.issc==1));
if(item.url==null)
{
item.url="未知";
}
contents_bdcp.add(new SectionItem(item.name, String.valueOf(item.maketime), item.id,item.url,item.issc==1));
if(item.issc==1)
{
contents_sccp.add(new SectionItem(item.name, String.valueOf(item.maketime), item.id,item.issc==1));
contents_sccp.add(new SectionItem(item.name, String.valueOf(item.maketime), item.id,item.url,item.issc==1));
}
}
list.add(new QMUISection<>(header_bdcp, contents_bdcp, false));


+ 43
- 18
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyActivity.java View File

@@ -5,6 +5,7 @@ import static com.bonait.bnframework.MainApplication.getContext;
import androidx.appcompat.app.AppCompatActivity;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
@@ -14,7 +15,9 @@ import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.Spinner;
@@ -31,6 +34,8 @@ import com.bonait.bnframework.common.db.mode.BPA_PROCESS;
import com.bonait.bnframework.common.db.mode.BPA_PROCESSModel;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.helper.MyImage;
import com.bonait.bnframework.common.image.MyBitmapUtils;
import com.bonait.bnframework.common.message.MessageLooper;
import com.bonait.bnframework.common.message.MessageManager;
import com.bonait.bnframework.common.utils.AlertDialogUtils;
import com.bonait.bnframework.common.utils.ToastUtils;
@@ -56,11 +61,17 @@ import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class DiyActivity extends BaseActivity implements MyClickListener {
public class DiyActivity extends BaseActivity {
@BindView(R.id.topbar)
QMUITopBar mTopBar;
@BindView(R.id.edittext)
EditText edittext;//菜谱名称
@BindView(R.id.cpfm)
ImageView cpfm;//菜谱封面
@BindView(R.id.zzsc)
EditText zzsc;//制作时长
@BindView(R.id.check)
CheckBox check;//默认收藏
@BindView(R.id.Banner_Main)
Banner Banner_Main;//轮播图
//用于存放获取的图片
@@ -76,6 +87,7 @@ public class DiyActivity extends BaseActivity implements MyClickListener {
@BindView(R.id.datatab_gxbz)
ListView datatab_gxbz;//工序步骤
public gongxubuzhou_adapter gxbz_adapter=null;
public String imageUrl="";
/**
* 工序步骤
*/
@@ -112,7 +124,7 @@ public class DiyActivity extends BaseActivity implements MyClickListener {
}
});
//3.工序步骤
gxbz_adapter = new gongxubuzhou_adapter(getContext(), R.layout.gx_item, (List<BPA_GOODSRECIPE>) bpa_goodsrecipes,this);
gxbz_adapter = new gongxubuzhou_adapter(getContext(), R.layout.gx_item, (List<BPA_GOODSRECIPE>) bpa_goodsrecipes,null);
datatab_gxbz.setAdapter(gxbz_adapter);
datatab_gxbz.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
@@ -122,6 +134,17 @@ public class DiyActivity extends BaseActivity implements MyClickListener {
gxbz_adapter.notifyDataSetInvalidated();
}
});

//图标选择
MessageManager.getInstance().registerMessageReceiver(this, MessageName.ClickImage, new MessageLooper.OnMessageListener() {
@Override
public void onMessage(Object msg) {
if (msg != null) {
imageUrl=(String) msg;
new MyBitmapUtils().disPlay(cpfm,imageUrl);
}
}
});
}
/**
* 根据选中工序id显示集合
@@ -264,9 +287,15 @@ public class DiyActivity extends BaseActivity implements MyClickListener {
* 点击事件
* @param view
*/
@OnClick({R.id.add_hrgx,R.id.update_gx,R.id.delete_gx,R.id.shangyi,R.id.xiayi,R.id.caozuomoshi,R.id.shengchengcaipu})
@OnClick({R.id.add_hrgx,R.id.update_gx,R.id.delete_gx,R.id.shangyi,R.id.xiayi,R.id.caozuomoshi,R.id.shengchengcaipu,R.id.cpfm})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.cpfm://菜谱封面
// 跳转到登录页面
Intent intent = new Intent(getContext(), ImageChooseActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
break;
case R.id.add_hrgx://添加工序
BPA_GOODSRECIPE goodsrecipe= GetSelectItemFromValue();
if(goodsrecipe!=null)
@@ -339,11 +368,12 @@ public class DiyActivity extends BaseActivity implements MyClickListener {
}
break;
case R.id.caozuomoshi://操作模式

ToastUtils.info("操作模式");
break;
case R.id.shengchengcaipu://生成菜谱
String name=edittext.getText().toString();


if(name.isEmpty())
{
ToastUtils.info("菜谱名称不能为空!");
@@ -362,13 +392,20 @@ public class DiyActivity extends BaseActivity implements MyClickListener {
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
int sc=60*3;
if(!zzsc.getText().toString().isEmpty() && !zzsc.getText().toString().equals("0"))
{
sc=Integer.parseInt(zzsc.getText().toString());
}

ArrayList<BPA_GOODS> goods=QueryDB.GetGoodsALL();
BPA_GOODS good=new BPA_GOODS();
good.name=name;
good.status=1;
good.sort=goods.size()+1;
good.maketime=60*3;
good.issc=0;
good.maketime=sc;
good.issc=check.isChecked()?1:0;
good.url=imageUrl;
QueryDB.AddGoods(good);
for (int k=0;k<bpa_goodsrecipes.size();k++)
{
@@ -401,16 +438,4 @@ public class DiyActivity extends BaseActivity implements MyClickListener {
return false;
}

@Override
public void clickListener(View v, Object data) {
switch (v.getId()) {
case R.id.text://步骤行点击
BPA_GOODSRECIPE pf=(BPA_GOODSRECIPE)data;
ToastUtils.info("步骤行点击,"+pf.processms);
break;
}
}
@Override
public void clickListenerNew(View v, int k, Object data) {
}
}

+ 92
- 2
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyUpdateActivity.java View File

@@ -10,13 +10,16 @@ import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.Spinner;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseActivity;
import com.bonait.bnframework.common.constant.MessageName;
import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_GOODS;
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE;
@@ -25,6 +28,9 @@ import com.bonait.bnframework.common.db.mode.BPA_PROCESS;
import com.bonait.bnframework.common.db.mode.BPA_PROCESSModel;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.helper.MyImage;
import com.bonait.bnframework.common.image.MyBitmapUtils;
import com.bonait.bnframework.common.message.MessageLooper;
import com.bonait.bnframework.common.message.MessageManager;
import com.bonait.bnframework.common.utils.AlertDialogUtils;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.modules.home.adapter.gongxubuzhou_adapter;
@@ -51,6 +57,12 @@ public class DiyUpdateActivity extends BaseActivity {
QMUITopBar mTopBar;
@BindView(R.id.edittext)
EditText edittext;//菜谱名称
@BindView(R.id.cpfm)
ImageView cpfm;//菜谱封面
@BindView(R.id.zzsc)
EditText zzsc;//制作时长
@BindView(R.id.check)
CheckBox check;//默认收藏
@BindView(R.id.Banner_Main)
Banner Banner_Main;//轮播图
//用于存放获取的图片
@@ -118,6 +130,16 @@ public class DiyUpdateActivity extends BaseActivity {
gxbz_adapter.setSelectedPosition(position);
gxbz_adapter.notifyDataSetInvalidated();
}
});
//图标选择
MessageManager.getInstance().registerMessageReceiver(this, MessageName.ClickImage, new MessageLooper.OnMessageListener() {
@Override
public void onMessage(Object msg) {
if (msg != null) {
good.url=(String) msg;
new MyBitmapUtils().disPlay(cpfm,good.url);
}
}
});
}

@@ -144,6 +166,7 @@ public class DiyUpdateActivity extends BaseActivity {
}
edittext.setText(good.name);
gxbz_adapter.notifyDataSetChanged();//刷新商品配方
new MyBitmapUtils().disPlay(cpfm,good.url);
}
}
}catch (Exception ex)
@@ -271,6 +294,7 @@ public class DiyUpdateActivity extends BaseActivity {
* @param arrayList
*/
private void Drawable_Get(List arrayList) {
//把他们存放到一个list集合中
arrayList.add(getResources().getDrawable(R.mipmap.image1));
arrayList.add(getResources().getDrawable(R.mipmap.image2));
arrayList.add(getResources().getDrawable(R.mipmap.image3));
@@ -291,9 +315,15 @@ public class DiyUpdateActivity extends BaseActivity {
* 点击事件
* @param view
*/
@OnClick({R.id.add_hrgx,R.id.update_gx,R.id.delete_gx,R.id.shangyi,R.id.xiayi,R.id.shengchengcaipu})
@OnClick({R.id.add_hrgx,R.id.update_gx,R.id.delete_gx,R.id.shangyi,R.id.xiayi,R.id.caozuomoshi,R.id.shengchengcaipu,R.id.shengchengnewcaipu,R.id.cpfm})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.cpfm://菜谱封面
// 跳转到登录页面
Intent intent = new Intent(getContext(), ImageChooseActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
break;
case R.id.add_hrgx://添加工序
BPA_GOODSRECIPE goodsrecipe= GetSelectItemFromValue();
if(goodsrecipe!=null)
@@ -321,6 +351,7 @@ public class DiyUpdateActivity extends BaseActivity {
BPA_GOODSRECIPE obj_delete= (BPA_GOODSRECIPE)bpa_goodsrecipes.get(index_delete);
bpa_goodsrecipes.remove(obj_delete);
gxbz_adapter.notifyDataSetChanged();

//移动光标
if(index_delete-1>=0)
{
@@ -364,7 +395,59 @@ public class DiyUpdateActivity extends BaseActivity {
ToastUtils.info("已经最底部!");
}
break;
case R.id.shengchengcaipu://保存菜谱
case R.id.caozuomoshi://操作模式
ToastUtils.info("操作模式");
break;
case R.id.shengchengnewcaipu:
String name1=edittext.getText().toString();
if(name1.isEmpty())
{
ToastUtils.info("菜谱名称不能为空!");
return;
}else
{
boolean isSucess= QueryDB.GetGoodsIs(name1);
if(isSucess)
{
ToastUtils.info("菜谱名称已存在!");
return;
}
//按钮点击
String title = "生成菜谱操作提示!";
String message = "请问客官确定要生成["+name1+"]菜谱吗?";
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
int sc=60*3;
if(!zzsc.getText().toString().isEmpty() && !zzsc.getText().toString().equals("0"))
{
sc=Integer.parseInt(zzsc.getText().toString());
}

ArrayList<BPA_GOODS> goods=QueryDB.GetGoodsALL();
BPA_GOODS good=new BPA_GOODS();
good.name=name1;
good.status=1;
good.sort=goods.size()+1;
good.maketime=sc;
good.issc=check.isChecked()?1:0;
good.url=good.url;
QueryDB.AddGoods(good);
for (int k=0;k<bpa_goodsrecipes.size();k++)
{
BPA_GOODSRECIPE item=bpa_goodsrecipes.get(k);
item.goodsID=good.id;
item.sort=k+1;
QueryDB.AddGoodsSrecipe(item);
}
ToastUtils.info("菜谱生成成功!");
dialog.dismiss();
}
});

}
break;
case R.id.shengchengcaipu://生成菜谱
String name=edittext.getText().toString();
if(name.isEmpty())
{
@@ -384,6 +467,13 @@ public class DiyUpdateActivity extends BaseActivity {
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
int sc=60*3;
if(!zzsc.getText().toString().isEmpty() && !zzsc.getText().toString().equals("0"))
{
sc=Integer.parseInt(zzsc.getText().toString());
}
good.maketime=sc;
good.issc=check.isChecked()?1:0;
good.name=name;
QueryDB.UpdateGoods(good);
ArrayList<BPA_GOODSRECIPE> pe=QueryDB.GetGoodsSrecipeID(good.id);


+ 3
- 1
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/ImageChooseActivity.java View File

@@ -11,9 +11,11 @@ import android.view.View;
import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseActivity;
import com.bonait.bnframework.common.constant.DataBus;
import com.bonait.bnframework.common.constant.MessageName;
import com.bonait.bnframework.common.db.mode.BPA_GOODS;
import com.bonait.bnframework.common.helper.AES;
import com.bonait.bnframework.common.helper.I.MyClickListener;
import com.bonait.bnframework.common.message.MessageManager;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.common.view.MyLayoutManager;
import com.bonait.bnframework.modules.home.adapter.image_sp_adapter;
@@ -76,7 +78,7 @@ public class ImageChooseActivity extends BaseActivity {
@Override
public void clickListener(View v, Object data) {
image_sp sp=(image_sp)data;
ToastUtils.info("选择图片:"+sp.url);
MessageManager.getInstance().sendMessage(MessageName.ClickImage,sp.url);
finish();
}
@Override


+ 5
- 1
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/QDListSectionAdapter.java View File

@@ -75,11 +75,15 @@ public class QDListSectionAdapter extends QMUIDefaultStickySectionAdapter {
String name=((SectionItem)section.getItemAt(itemIndex)).getTag();
IsSC=((SectionItem)section.getItemAt(itemIndex)).getIsSC();
String id= ((SectionItem)section.getItemAt(itemIndex)).getAccount();
String url=((SectionItem)section.getItemAt(itemIndex)).getAddress();
tvTag.setText(name);
tvNote.setText("时间:"+ ((SectionItem)section.getItemAt(itemIndex)).getNote()+"秒");
//设置图片
if(!url.equals("未知"))
{
myBitmapUtils.disPlay(ImageUrl,url);
}
//ImageUrl.setBackground(holder.itemView.getContext().getResources().getDrawable(R.mipmap.hgr));
myBitmapUtils.disPlay(ImageUrl,"https://hbl-test-1305371387.cos.ap-chengdu.myqcloud.com/Franchisee/001/goods/133329989655737022.jpg");
//上传按钮点击
Sc_text.setOnClickListener(new View.OnClickListener() {
@Override


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

@@ -39,12 +39,17 @@ public class SectionItem implements QMUISection.Model<SectionItem> {
* 是否收藏
*/
private Boolean IsSC;
/**
* Url
*/
private String address;

public SectionItem(String name1, String name2, String name3,boolean isSC) {
public SectionItem(String name1, String name2, String name3,String address,boolean isSC) {
this.tvTag = name1;
this.tvNote = name2;
this.tvAccount = name3;
this.IsSC=isSC;
this.address=address;
}

public String getTag() {
@@ -61,6 +66,9 @@ public class SectionItem implements QMUISection.Model<SectionItem> {
public Boolean getIsSC() {
return IsSC;
}
public String getAddress() {
return address;
}

public void SetIsSC(boolean isSC)
{
@@ -69,14 +77,15 @@ public class SectionItem implements QMUISection.Model<SectionItem> {

@Override
public SectionItem cloneForDiff() {
return new SectionItem(getTag(), getNote(), getAccount(),getIsSC());
return new SectionItem(getTag(), getNote(), getAccount(),getAddress(),getIsSC());
}

@Override
public boolean isSameItem(SectionItem other) {
return tvTag == other.tvTag || (tvTag != null && tvTag.equals(other.tvTag))
&& tvNote == other.tvNote || (tvNote != null && tvNote.equals(other.tvNote))
&& IsSC == other.IsSC || (IsSC != null && IsSC.equals(other.IsSC))
&& IsSC == other.IsSC || (IsSC != null && IsSC.equals(other.IsSC))
&& address == other.address || (address != null && address.equals(other.address))
&& tvAccount == other.tvAccount || (tvAccount != null && tvAccount.equals(other.tvAccount));
}
@Override
@@ -84,5 +93,4 @@ public class SectionItem implements QMUISection.Model<SectionItem> {
public boolean isSameContent(SectionItem other) {
return true;
}

}

+ 253
- 178
app/src/main/res/layout/activity_diy.xml View File

@@ -12,226 +12,301 @@
android:id="@+id/topbar"
android:layout_width="match_parent"
android:layout_height="?attr/qmui_topbar_height"/>
<ScrollView
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/qmui_config_color_white">
<LinearLayout
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:layout_marginTop="@dimen/dp_10"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.youth.banner.Banner
android:id="@+id/Banner_Main"
android:layout_width="match_parent"
android:layout_height="180dp"
android:layout_gravity="center"
app:image_scale_type="fit_xy"
app:indicator_height="10dp"
app:indicator_margin="5dp"
app:indicator_width="10dp" />
</RelativeLayout>
android:layout_height="match_parent"
android:layout_marginBottom="160dp">
<LinearLayout
android:layout_marginTop="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_10"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="菜谱名称:"/>
<!--账号输入框-->
<EditText
android:id="@+id/edittext"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_marginTop="@dimen/dp_10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:background="@drawable/input_bj"
android:hint="请输入菜谱名称"
android:inputType="text"
android:maxLines="1"
android:padding="3dp"
android:textSize="12dp" />
</LinearLayout>
<!--边框分割细线-->
<LinearLayout
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="@dimen/dp_10"
android:background="@color/color3" />

<LinearLayout android:layout_width="match_parent"
android:layout_height="400dp">
<RelativeLayout
android:layout_width="160dp"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/color1">

<ImageView
android:id="@+id/cpfm"
android:layout_width="160dp"
android:layout_height="100dp"
android:layout_marginStart="3dp"
android:layout_marginTop="3dp"
android:layout_marginEnd="3dp"
android:layout_marginBottom="3dp"
android:src="@mipmap/loading3" />
</RelativeLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="center"
android:text="菜谱封面"/>
</LinearLayout>

<LinearLayout
android:layout_marginLeft="@dimen/dp_40"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_marginTop="@dimen/dp_10"
android:layout_marginBottom="12dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:layout_height="wrap_content">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="步骤:"/>
<Button
android:id="@+id/shangyi"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button"
android:text="上移"
android:textColor="@color/black"
android:textSize="14dp"/>
<Button
android:id="@+id/xiayi"
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button"
android:text="下移"
android:textColor="@color/black"
android:textSize="14dp"/>
android:text="菜谱名称:"/>
<!--账号输入框-->
<EditText
android:id="@+id/edittext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:background="@drawable/input_bj"
android:hint="请输入菜谱名称"
android:inputType="text"
android:maxLines="1"
android:padding="3dp"
android:textSize="12dp" />
</LinearLayout>
<ListView
android:id="@+id/datatab_gxbz"
<LinearLayout
android:layout_marginBottom="12dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="#00000000"
android:layout_marginTop="10dp"
android:layout_marginBottom="@dimen/dp_40"
android:dividerHeight="3dp" />
</LinearLayout>

<Button
android:id="@+id/caozuomoshi"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_width="wrap_content"
android:layout_height="26dp"
android:background="@drawable/button1"
android:text="操作模式"
android:textColor="@color/black"
android:textSize="14dp"/>
</RelativeLayout>
android:layout_height="wrap_content">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="制作时长:"/>
<!--账号输入框-->
<EditText
android:id="@+id/zzsc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:background="@drawable/input_bj"
android:hint="请输入制作时长"
android:inputType="number"
android:maxLines="1"
android:padding="3dp"
android:textSize="12dp"
android:text="0"/>
</LinearLayout>

<RelativeLayout
android:layout_marginLeft="@dimen/dp_10"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<CheckBox
android:layout_marginLeft="70dp"
android:id="@+id/check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:buttonTint="@color/radiusImageView_selected_mask_color"
android:text="默认收藏"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!--边框分割细线-->
<LinearLayout
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!--边框分割细线-->
android:layout_height="1dp"
android:layout_marginBottom="@dimen/dp_10"
android:background="@color/color3" />
<LinearLayout android:layout_width="match_parent"
android:layout_height="400dp">
<RelativeLayout
android:layout_alignParentLeft="true"
android:layout_width="@dimen/dp_10"
android:layout_height="match_parent">
android:layout_width="160dp"
android:layout_height="wrap_content">

<LinearLayout
android:layout_width="1dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:layout_marginTop="@dimen/dp_40"
android:layout_marginBottom="@dimen/dp_40"
android:background="@color/color3" />
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="步骤:"/>
<Button
android:id="@+id/shangyi"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button"
android:text="上移"
android:textColor="@color/black"
android:textSize="14dp"/>
<Button
android:id="@+id/xiayi"
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button"
android:text="下移"
android:textColor="@color/black"
android:textSize="14dp"/>
</LinearLayout>
<ListView
android:id="@+id/datatab_gxbz"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="#00000000"
android:layout_marginTop="10dp"
android:layout_marginBottom="@dimen/dp_40"
android:dividerHeight="3dp" />
</LinearLayout>

<Button
android:id="@+id/caozuomoshi"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_width="wrap_content"
android:layout_height="26dp"
android:background="@drawable/button1"
android:text="操作模式"
android:textColor="@color/black"
android:textSize="14dp"/>
</RelativeLayout>

<LinearLayout
<RelativeLayout
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="wrap_content">
<!--边框分割细线-->
<RelativeLayout
android:layout_alignParentLeft="true"
android:layout_width="@dimen/dp_10"
android:layout_height="match_parent">

<LinearLayout
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:layout_marginTop="@dimen/dp_40"
android:layout_marginBottom="@dimen/dp_40"
android:background="@color/color3" />
</RelativeLayout>

<LinearLayout
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="烹饪工序:"/>
<Spinner
android:id="@+id/hrgx"
style="@style/commonSpinnerStyle"
android:layout_width="match_parent"
android:layout_height="24dp"
android:layout_centerVertical="true"
/>
</LinearLayout>
android:layout_height="match_parent"
android:orientation="vertical">

<ScrollView
android:layout_width="match_parent"
android:layout_marginBottom="40dp"
android:layout_marginTop="20dp"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/gxchid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="烹饪工序:"/>
<Spinner
android:id="@+id/hrgx"
style="@style/commonSpinnerStyle"
android:layout_width="match_parent"
android:layout_height="24dp"
android:layout_centerVertical="true"
/>
</LinearLayout>
</ScrollView>

</LinearLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_marginBottom="40dp"
android:layout_marginTop="20dp"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/gxchid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
</ScrollView>

<LinearLayout
android:layout_marginTop="@dimen/dp_10"
android:layout_marginLeft="@dimen/dp_10"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/add_hrgx"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button1"
android:text="添加"
android:textColor="@color/black"
android:textSize="14dp"/>
<Button
android:id="@+id/update_gx"
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button"
android:text="修改"
android:textColor="@color/black"
android:textSize="14dp"/>
<Button
android:id="@+id/delete_gx"
</LinearLayout>

<LinearLayout
android:layout_marginTop="@dimen/dp_10"
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button"
android:text="删除"
android:textColor="@color/black"
android:textSize="14dp"/>
</LinearLayout>
</RelativeLayout>
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/add_hrgx"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button1"
android:text="添加"
android:textColor="@color/black"
android:textSize="14dp"/>
<Button
android:id="@+id/update_gx"
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button"
android:text="修改"
android:textColor="@color/black"
android:textSize="14dp"/>
<Button
android:id="@+id/delete_gx"
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button"
android:text="删除"
android:textColor="@color/black"
android:textSize="14dp"/>
</LinearLayout>
</RelativeLayout>

</LinearLayout>
<RelativeLayout
android:layout_marginTop="30dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/shengchengcaipu"
android:layout_width="match_parent"
android:layout_height="45dp"
android:background="@drawable/bg_btn_login_selected"
android:text="生成菜谱"
android:textColor="@color/white"
android:textSize="18sp"/>
</RelativeLayout>
</LinearLayout>

<RelativeLayout
android:layout_marginTop="30dp"
</ScrollView>
<RelativeLayout
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp">
<com.youth.banner.Banner
android:id="@+id/Banner_Main"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/shengchengcaipu"
android:layout_width="match_parent"
android:layout_height="45dp"
android:background="@drawable/bg_btn_login_selected"
android:text="生成菜谱"
android:textColor="@color/white"
android:textSize="18sp"/>
</RelativeLayout>
</LinearLayout>

</ScrollView>
android:layout_height="160dp"
android:layout_gravity="center"
app:image_scale_type="fit_xy"
app:indicator_height="10dp"
app:indicator_margin="5dp"
app:indicator_width="10dp" />
</RelativeLayout>
</RelativeLayout>
</LinearLayout>

+ 266
- 162
app/src/main/res/layout/activity_diy_update.xml View File

@@ -12,213 +12,317 @@
android:id="@+id/topbar"
android:layout_width="match_parent"
android:layout_height="?attr/qmui_topbar_height"/>
<ScrollView
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/qmui_config_color_white">
<LinearLayout
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:layout_marginTop="@dimen/dp_10"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.youth.banner.Banner
android:id="@+id/Banner_Main"
android:layout_width="match_parent"
android:layout_height="180dp"
android:layout_gravity="center"
app:image_scale_type="fit_xy"
app:indicator_height="10dp"
app:indicator_margin="5dp"
app:indicator_width="10dp" />
</RelativeLayout>
android:layout_height="match_parent"
android:layout_marginBottom="160dp">
<LinearLayout
android:layout_marginTop="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_10"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="菜谱名称:"/>
<!--账号输入框-->
<EditText
android:id="@+id/edittext"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_marginTop="@dimen/dp_10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:background="@drawable/input_bj"
android:hint="请输入菜谱名称"
android:inputType="text"
android:maxLines="1"
android:padding="3dp"
android:textSize="12dp" />
</LinearLayout>
<!--边框分割细线-->
<LinearLayout
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="@dimen/dp_10"
android:background="@color/color3" />
<LinearLayout android:layout_width="match_parent"
android:layout_height="400dp">
<RelativeLayout
android:layout_width="160dp"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/color1">

<ImageView
android:id="@+id/cpfm"
android:layout_width="160dp"
android:layout_height="100dp"
android:layout_marginStart="3dp"
android:layout_marginTop="3dp"
android:layout_marginEnd="3dp"
android:layout_marginBottom="3dp"
android:src="@mipmap/loading3" />
</RelativeLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="center"
android:text="菜谱封面"/>
</LinearLayout>

<LinearLayout
android:layout_marginLeft="@dimen/dp_40"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_marginTop="@dimen/dp_10"
android:layout_marginBottom="12dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:layout_height="wrap_content">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="步骤:"/>
<Button
android:id="@+id/shangyi"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button"
android:text="上移"
android:textColor="@color/black"
android:textSize="14dp"/>
<Button
android:id="@+id/xiayi"
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button"
android:text="下移"
android:textColor="@color/black"
android:textSize="14dp"/>
android:text="菜谱名称:"/>
<!--账号输入框-->
<EditText
android:id="@+id/edittext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:background="@drawable/input_bj"
android:hint="请输入菜谱名称"
android:inputType="text"
android:maxLines="1"
android:padding="3dp"
android:textSize="12dp" />
</LinearLayout>
<ListView
android:id="@+id/datatab_gxbz"
<LinearLayout
android:layout_marginBottom="12dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="#00000000"
android:layout_marginTop="10dp"
android:layout_marginBottom="@dimen/dp_40"
android:dividerHeight="3dp" />
</LinearLayout>

</RelativeLayout>
android:layout_height="wrap_content">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="制作时长:"/>
<!--账号输入框-->
<EditText
android:id="@+id/zzsc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:background="@drawable/input_bj"
android:hint="请输入制作时长"
android:inputType="number"
android:maxLines="1"
android:padding="3dp"
android:textSize="12dp"
android:text="0"/>
</LinearLayout>

<RelativeLayout
android:layout_marginLeft="@dimen/dp_10"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<CheckBox
android:layout_marginLeft="70dp"
android:id="@+id/check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:buttonTint="@color/radiusImageView_selected_mask_color"
android:text="默认收藏"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!--边框分割细线-->
<LinearLayout
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!--边框分割细线-->
android:layout_height="1dp"
android:layout_marginBottom="@dimen/dp_10"
android:background="@color/color3" />
<LinearLayout android:layout_width="match_parent"
android:layout_height="400dp">
<RelativeLayout
android:layout_alignParentLeft="true"
android:layout_width="@dimen/dp_10"
android:layout_height="match_parent">
android:layout_width="160dp"
android:layout_height="wrap_content">

<LinearLayout
android:layout_width="1dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:layout_marginTop="@dimen/dp_40"
android:layout_marginBottom="@dimen/dp_40"
android:background="@color/color3" />
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="步骤:"/>
<Button
android:id="@+id/shangyi"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button"
android:text="上移"
android:textColor="@color/black"
android:textSize="14dp"/>
<Button
android:id="@+id/xiayi"
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button"
android:text="下移"
android:textColor="@color/black"
android:textSize="14dp"/>
</LinearLayout>
<ListView
android:id="@+id/datatab_gxbz"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="#00000000"
android:layout_marginTop="10dp"
android:layout_marginBottom="@dimen/dp_40"
android:dividerHeight="3dp" />
</LinearLayout>

<Button
android:id="@+id/caozuomoshi"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_width="wrap_content"
android:layout_height="26dp"
android:background="@drawable/button1"
android:text="操作模式"
android:textColor="@color/black"
android:textSize="14dp"/>
</RelativeLayout>

<LinearLayout
<RelativeLayout
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="wrap_content">
<!--边框分割细线-->
<RelativeLayout
android:layout_alignParentLeft="true"
android:layout_width="@dimen/dp_10"
android:layout_height="match_parent">

<LinearLayout
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:layout_marginTop="@dimen/dp_40"
android:layout_marginBottom="@dimen/dp_40"
android:background="@color/color3" />
</RelativeLayout>

<LinearLayout
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="烹饪工序:"/>
<Spinner
android:id="@+id/hrgx"
style="@style/commonSpinnerStyle"
android:layout_width="match_parent"
android:layout_height="24dp"
android:layout_centerVertical="true"
/>
</LinearLayout>
android:layout_height="match_parent"
android:orientation="vertical">

<ScrollView
android:layout_width="match_parent"
android:layout_marginBottom="40dp"
android:layout_marginTop="20dp"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/gxchid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="烹饪工序:"/>
<Spinner
android:id="@+id/hrgx"
style="@style/commonSpinnerStyle"
android:layout_width="match_parent"
android:layout_height="24dp"
android:layout_centerVertical="true"
/>
</LinearLayout>
</ScrollView>

</LinearLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_marginBottom="40dp"
android:layout_marginTop="20dp"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/gxchid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
</ScrollView>

</LinearLayout>

<LinearLayout
android:layout_marginTop="@dimen/dp_10"
android:layout_marginLeft="@dimen/dp_10"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/add_hrgx"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button1"
android:text="添加"
android:textColor="@color/black"
android:textSize="14dp"/>
<Button
android:id="@+id/update_gx"
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button"
android:text="修改"
android:textColor="@color/black"
android:textSize="14dp"/>
<Button
android:id="@+id/delete_gx"
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button"
android:text="删除"
android:textColor="@color/black"
android:textSize="14dp"/>
</LinearLayout>
</RelativeLayout>

</LinearLayout>
<RelativeLayout
android:layout_marginTop="30dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_marginTop="@dimen/dp_10"
android:layout_marginLeft="@dimen/dp_10"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_centerHorizontal="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/add_hrgx"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button1"
android:text="添加"
android:textColor="@color/black"
android:textSize="14dp"/>
<Button
android:id="@+id/update_gx"
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button"
android:text="修改"
android:textColor="@color/black"
android:textSize="14dp"/>
android:id="@+id/shengchengcaipu"
android:layout_width="160dp"
android:layout_height="45dp"
android:background="@drawable/bg_btn_login_selected"
android:text="修改菜谱"
android:textColor="@color/white"
android:textSize="18sp"/>
<Button
android:id="@+id/delete_gx"
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button"
android:text="删除"
android:textColor="@color/black"
android:textSize="14dp"/>
android:layout_marginLeft="@dimen/dp_40"
android:id="@+id/shengchengnewcaipu"
android:layout_width="160dp"
android:layout_height="45dp"
android:background="@drawable/bg_btn_login_selected"
android:text="生成新菜谱"
android:textColor="@color/white"
android:textSize="18sp"/>
</LinearLayout>
</RelativeLayout>

</RelativeLayout>
</LinearLayout>
<RelativeLayout
android:layout_marginTop="30dp"
</ScrollView>
<RelativeLayout
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp">
<com.youth.banner.Banner
android:id="@+id/Banner_Main"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/shengchengcaipu"
android:layout_width="match_parent"
android:layout_height="45dp"
android:background="@drawable/bg_btn_login_selected"
android:text="保存菜谱"
android:textColor="@color/white"
android:textSize="18sp"/>
</RelativeLayout>
</LinearLayout>
</ScrollView>
android:layout_height="160dp"
android:layout_gravity="center"
app:image_scale_type="fit_xy"
app:indicator_height="10dp"
app:indicator_margin="5dp"
app:indicator_width="10dp" />
</RelativeLayout>
</RelativeLayout>
</LinearLayout>

+ 8
- 4
app/src/main/res/layout/item/layout/item_sp.xml View File

@@ -10,12 +10,16 @@
android:layout_marginLeft="5dp"
android:layout_marginBottom="5dp"
android:background="@drawable/common_bg_with_radius_and_border">
<RelativeLayout

<ImageView
android:id="@+id/img"
android:layout_margin="3dp"
android:layout_width="match_parent"
android:layout_height="130dp">
</RelativeLayout>
android:layout_height="130dp"
android:layout_marginStart="3dp"
android:layout_marginTop="3dp"
android:src="@mipmap/loading3"
android:layout_marginEnd="3dp"
android:layout_marginBottom="3dp"/>

<com.qmuiteam.qmui.widget.textview.QMUILinkTextView
android:layout_alignParentBottom="true"


+ 1
- 0
app/src/main/res/layout/item/layout/note_rv_tree_second.xml View File

@@ -18,6 +18,7 @@
android:layout_margin="3dp"
android:layout_width="match_parent"
android:layout_height="130dp"
android:src="@mipmap/loading3"
/>
<TextView
android:id="@+id/Tag_text"


Loading…
Cancel
Save