@@ -1,6 +0,0 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | |||||
<project version="4"> | |||||
<component name="CompilerConfiguration"> | |||||
<bytecodeTargetLevel target="11" /> | |||||
</component> | |||||
</project> |
@@ -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> |
@@ -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> |
@@ -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> |
@@ -1,6 +0,0 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | |||||
<project version="4"> | |||||
<component name="RenderSettings"> | |||||
<option name="showDecorations" value="true" /> | |||||
</component> | |||||
</project> |
@@ -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> |
@@ -203,14 +203,11 @@ public class ConfigData { | |||||
{ | { | ||||
BitmapFactory.Options options = new BitmapFactory.Options(); | BitmapFactory.Options options = new BitmapFactory.Options(); | ||||
options.inSampleSize=2;//宽高压缩为原来的1/2 | 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 bitmap1= BitmapFactory.decodeResource(context.getResources(), R.mipmap.image1,options); | ||||
Bitmap bitmap2= BitmapFactory.decodeResource(context.getResources(), R.mipmap.image2,options); | Bitmap bitmap2= BitmapFactory.decodeResource(context.getResources(), R.mipmap.image2,options); | ||||
Bitmap bitmap3= BitmapFactory.decodeResource(context.getResources(), R.mipmap.image3,options); | Bitmap bitmap3= BitmapFactory.decodeResource(context.getResources(), R.mipmap.image3,options); | ||||
Bitmap bitmap4= BitmapFactory.decodeResource(context.getResources(), R.mipmap.image4,options); | Bitmap bitmap4= BitmapFactory.decodeResource(context.getResources(), R.mipmap.image4,options); | ||||
LocalCacheUtils localCacheUtils=new LocalCacheUtils(); | LocalCacheUtils localCacheUtils=new LocalCacheUtils(); | ||||
localCacheUtils.setBitmapToLocal("image0.png",bitmap0); | |||||
localCacheUtils.setBitmapToLocal("image1.png",bitmap1); | localCacheUtils.setBitmapToLocal("image1.png",bitmap1); | ||||
localCacheUtils.setBitmapToLocal("image2.png",bitmap2); | localCacheUtils.setBitmapToLocal("image2.png",bitmap2); | ||||
localCacheUtils.setBitmapToLocal("image3.png",bitmap3); | localCacheUtils.setBitmapToLocal("image3.png",bitmap3); | ||||
@@ -19,4 +19,6 @@ public interface MessageName { | |||||
String ClickGood="ClickGood";//点击商品 | String ClickGood="ClickGood";//点击商品 | ||||
String ClickImage="ClickImage";//点击图标 | |||||
} | } |
@@ -8,12 +8,14 @@ import androidx.recyclerview.widget.RecyclerView; | |||||
import android.view.LayoutInflater; | import android.view.LayoutInflater; | ||||
import android.view.View; | import android.view.View; | ||||
import android.view.ViewGroup; | import android.view.ViewGroup; | ||||
import android.widget.ImageView; | |||||
import android.widget.RelativeLayout; | import android.widget.RelativeLayout; | ||||
import com.bonait.bnframework.R; | import com.bonait.bnframework.R; | ||||
import com.bonait.bnframework.common.constant.DataBus; | import com.bonait.bnframework.common.constant.DataBus; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODS; | import com.bonait.bnframework.common.db.mode.BPA_GOODS; | ||||
import com.bonait.bnframework.common.helper.I.MyClickListener; | import com.bonait.bnframework.common.helper.I.MyClickListener; | ||||
import com.bonait.bnframework.common.image.MyBitmapUtils; | |||||
import com.bonait.bnframework.common.utils.AlertDialogUtils; | import com.bonait.bnframework.common.utils.AlertDialogUtils; | ||||
import com.qmuiteam.qmui.widget.dialog.QMUIDialog; | import com.qmuiteam.qmui.widget.dialog.QMUIDialog; | ||||
import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction; | import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction; | ||||
@@ -52,9 +54,12 @@ public class sp_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { | |||||
try { | try { | ||||
if (holder instanceof MyLCViewHolder1) { | if (holder instanceof MyLCViewHolder1) { | ||||
MyLCViewHolder1 myViewHolder = (MyLCViewHolder1) holder; | 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.name.setText(goods.get(position).name); | ||||
myViewHolder.img.setOnClickListener(new View.OnClickListener() { | myViewHolder.img.setOnClickListener(new View.OnClickListener() { | ||||
@Override | @Override | ||||
public void onClick(View view) { | 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 { | public static class MyLCViewHolder1 extends RecyclerView.ViewHolder { | ||||
RelativeLayout img;//图片按钮 | |||||
ImageView img;//图片按钮 | |||||
QMUILinkTextView name;//名称 | QMUILinkTextView name;//名称 | ||||
public MyLCViewHolder1(View view) { | public MyLCViewHolder1(View view) { | ||||
@@ -180,10 +180,14 @@ public class CpActivity extends BaseActivity { | |||||
for (BPA_GOODS item:good) | 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) | 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)); | list.add(new QMUISection<>(header_bdcp, contents_bdcp, false)); | ||||
@@ -5,6 +5,7 @@ import static com.bonait.bnframework.MainApplication.getContext; | |||||
import androidx.appcompat.app.AppCompatActivity; | import androidx.appcompat.app.AppCompatActivity; | ||||
import android.annotation.SuppressLint; | import android.annotation.SuppressLint; | ||||
import android.content.Intent; | |||||
import android.graphics.Color; | import android.graphics.Color; | ||||
import android.graphics.drawable.Drawable; | import android.graphics.drawable.Drawable; | ||||
import android.os.Bundle; | import android.os.Bundle; | ||||
@@ -14,7 +15,9 @@ import android.view.View; | |||||
import android.widget.AdapterView; | import android.widget.AdapterView; | ||||
import android.widget.ArrayAdapter; | import android.widget.ArrayAdapter; | ||||
import android.widget.Button; | import android.widget.Button; | ||||
import android.widget.CheckBox; | |||||
import android.widget.EditText; | import android.widget.EditText; | ||||
import android.widget.ImageView; | |||||
import android.widget.LinearLayout; | import android.widget.LinearLayout; | ||||
import android.widget.ListView; | import android.widget.ListView; | ||||
import android.widget.Spinner; | 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.db.mode.BPA_PROCESSModel; | ||||
import com.bonait.bnframework.common.helper.I.MyClickListener; | import com.bonait.bnframework.common.helper.I.MyClickListener; | ||||
import com.bonait.bnframework.common.helper.MyImage; | 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.message.MessageManager; | ||||
import com.bonait.bnframework.common.utils.AlertDialogUtils; | import com.bonait.bnframework.common.utils.AlertDialogUtils; | ||||
import com.bonait.bnframework.common.utils.ToastUtils; | import com.bonait.bnframework.common.utils.ToastUtils; | ||||
@@ -56,11 +61,17 @@ import butterknife.BindView; | |||||
import butterknife.ButterKnife; | import butterknife.ButterKnife; | ||||
import butterknife.OnClick; | import butterknife.OnClick; | ||||
public class DiyActivity extends BaseActivity implements MyClickListener { | |||||
public class DiyActivity extends BaseActivity { | |||||
@BindView(R.id.topbar) | @BindView(R.id.topbar) | ||||
QMUITopBar mTopBar; | QMUITopBar mTopBar; | ||||
@BindView(R.id.edittext) | @BindView(R.id.edittext) | ||||
EditText 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) | @BindView(R.id.Banner_Main) | ||||
Banner Banner_Main;//轮播图 | Banner Banner_Main;//轮播图 | ||||
//用于存放获取的图片 | //用于存放获取的图片 | ||||
@@ -76,6 +87,7 @@ public class DiyActivity extends BaseActivity implements MyClickListener { | |||||
@BindView(R.id.datatab_gxbz) | @BindView(R.id.datatab_gxbz) | ||||
ListView datatab_gxbz;//工序步骤 | ListView datatab_gxbz;//工序步骤 | ||||
public gongxubuzhou_adapter gxbz_adapter=null; | public gongxubuzhou_adapter gxbz_adapter=null; | ||||
public String imageUrl=""; | |||||
/** | /** | ||||
* 工序步骤 | * 工序步骤 | ||||
*/ | */ | ||||
@@ -112,7 +124,7 @@ public class DiyActivity extends BaseActivity implements MyClickListener { | |||||
} | } | ||||
}); | }); | ||||
//3.工序步骤 | //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.setAdapter(gxbz_adapter); | ||||
datatab_gxbz.setOnItemClickListener(new AdapterView.OnItemClickListener() { | datatab_gxbz.setOnItemClickListener(new AdapterView.OnItemClickListener() { | ||||
@Override | @Override | ||||
@@ -122,6 +134,17 @@ public class DiyActivity extends BaseActivity implements MyClickListener { | |||||
gxbz_adapter.notifyDataSetInvalidated(); | 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显示集合 | * 根据选中工序id显示集合 | ||||
@@ -264,9 +287,15 @@ public class DiyActivity extends BaseActivity implements MyClickListener { | |||||
* 点击事件 | * 点击事件 | ||||
* @param view | * @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) { | public void onViewClicked(View view) { | ||||
switch (view.getId()) { | 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://添加工序 | case R.id.add_hrgx://添加工序 | ||||
BPA_GOODSRECIPE goodsrecipe= GetSelectItemFromValue(); | BPA_GOODSRECIPE goodsrecipe= GetSelectItemFromValue(); | ||||
if(goodsrecipe!=null) | if(goodsrecipe!=null) | ||||
@@ -339,11 +368,12 @@ public class DiyActivity extends BaseActivity implements MyClickListener { | |||||
} | } | ||||
break; | break; | ||||
case R.id.caozuomoshi://操作模式 | case R.id.caozuomoshi://操作模式 | ||||
ToastUtils.info("操作模式"); | ToastUtils.info("操作模式"); | ||||
break; | break; | ||||
case R.id.shengchengcaipu://生成菜谱 | case R.id.shengchengcaipu://生成菜谱 | ||||
String name=edittext.getText().toString(); | String name=edittext.getText().toString(); | ||||
if(name.isEmpty()) | if(name.isEmpty()) | ||||
{ | { | ||||
ToastUtils.info("菜谱名称不能为空!"); | ToastUtils.info("菜谱名称不能为空!"); | ||||
@@ -362,13 +392,20 @@ public class DiyActivity extends BaseActivity implements MyClickListener { | |||||
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { | AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { | ||||
@Override | @Override | ||||
public void onClick(QMUIDialog dialog, int index) { | 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(); | ArrayList<BPA_GOODS> goods=QueryDB.GetGoodsALL(); | ||||
BPA_GOODS good=new BPA_GOODS(); | BPA_GOODS good=new BPA_GOODS(); | ||||
good.name=name; | good.name=name; | ||||
good.status=1; | good.status=1; | ||||
good.sort=goods.size()+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); | QueryDB.AddGoods(good); | ||||
for (int k=0;k<bpa_goodsrecipes.size();k++) | for (int k=0;k<bpa_goodsrecipes.size();k++) | ||||
{ | { | ||||
@@ -401,16 +438,4 @@ public class DiyActivity extends BaseActivity implements MyClickListener { | |||||
return false; | 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) { | |||||
} | |||||
} | } |
@@ -10,13 +10,16 @@ import android.os.Bundle; | |||||
import android.view.View; | import android.view.View; | ||||
import android.widget.AdapterView; | import android.widget.AdapterView; | ||||
import android.widget.ArrayAdapter; | import android.widget.ArrayAdapter; | ||||
import android.widget.CheckBox; | |||||
import android.widget.EditText; | import android.widget.EditText; | ||||
import android.widget.ImageView; | |||||
import android.widget.LinearLayout; | import android.widget.LinearLayout; | ||||
import android.widget.ListView; | import android.widget.ListView; | ||||
import android.widget.Spinner; | import android.widget.Spinner; | ||||
import com.bonait.bnframework.R; | import com.bonait.bnframework.R; | ||||
import com.bonait.bnframework.common.base.BaseActivity; | 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.QueryDB; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODS; | import com.bonait.bnframework.common.db.mode.BPA_GOODS; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE; | 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.db.mode.BPA_PROCESSModel; | ||||
import com.bonait.bnframework.common.helper.I.MyClickListener; | import com.bonait.bnframework.common.helper.I.MyClickListener; | ||||
import com.bonait.bnframework.common.helper.MyImage; | 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.AlertDialogUtils; | ||||
import com.bonait.bnframework.common.utils.ToastUtils; | import com.bonait.bnframework.common.utils.ToastUtils; | ||||
import com.bonait.bnframework.modules.home.adapter.gongxubuzhou_adapter; | import com.bonait.bnframework.modules.home.adapter.gongxubuzhou_adapter; | ||||
@@ -51,6 +57,12 @@ public class DiyUpdateActivity extends BaseActivity { | |||||
QMUITopBar mTopBar; | QMUITopBar mTopBar; | ||||
@BindView(R.id.edittext) | @BindView(R.id.edittext) | ||||
EditText 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) | @BindView(R.id.Banner_Main) | ||||
Banner Banner_Main;//轮播图 | Banner Banner_Main;//轮播图 | ||||
//用于存放获取的图片 | //用于存放获取的图片 | ||||
@@ -118,6 +130,16 @@ public class DiyUpdateActivity extends BaseActivity { | |||||
gxbz_adapter.setSelectedPosition(position); | gxbz_adapter.setSelectedPosition(position); | ||||
gxbz_adapter.notifyDataSetInvalidated(); | 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); | edittext.setText(good.name); | ||||
gxbz_adapter.notifyDataSetChanged();//刷新商品配方 | gxbz_adapter.notifyDataSetChanged();//刷新商品配方 | ||||
new MyBitmapUtils().disPlay(cpfm,good.url); | |||||
} | } | ||||
} | } | ||||
}catch (Exception ex) | }catch (Exception ex) | ||||
@@ -271,6 +294,7 @@ public class DiyUpdateActivity extends BaseActivity { | |||||
* @param arrayList | * @param arrayList | ||||
*/ | */ | ||||
private void Drawable_Get(List arrayList) { | private void Drawable_Get(List arrayList) { | ||||
//把他们存放到一个list集合中 | |||||
arrayList.add(getResources().getDrawable(R.mipmap.image1)); | arrayList.add(getResources().getDrawable(R.mipmap.image1)); | ||||
arrayList.add(getResources().getDrawable(R.mipmap.image2)); | arrayList.add(getResources().getDrawable(R.mipmap.image2)); | ||||
arrayList.add(getResources().getDrawable(R.mipmap.image3)); | arrayList.add(getResources().getDrawable(R.mipmap.image3)); | ||||
@@ -291,9 +315,15 @@ public class DiyUpdateActivity extends BaseActivity { | |||||
* 点击事件 | * 点击事件 | ||||
* @param view | * @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) { | public void onViewClicked(View view) { | ||||
switch (view.getId()) { | 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://添加工序 | case R.id.add_hrgx://添加工序 | ||||
BPA_GOODSRECIPE goodsrecipe= GetSelectItemFromValue(); | BPA_GOODSRECIPE goodsrecipe= GetSelectItemFromValue(); | ||||
if(goodsrecipe!=null) | if(goodsrecipe!=null) | ||||
@@ -321,6 +351,7 @@ public class DiyUpdateActivity extends BaseActivity { | |||||
BPA_GOODSRECIPE obj_delete= (BPA_GOODSRECIPE)bpa_goodsrecipes.get(index_delete); | BPA_GOODSRECIPE obj_delete= (BPA_GOODSRECIPE)bpa_goodsrecipes.get(index_delete); | ||||
bpa_goodsrecipes.remove(obj_delete); | bpa_goodsrecipes.remove(obj_delete); | ||||
gxbz_adapter.notifyDataSetChanged(); | gxbz_adapter.notifyDataSetChanged(); | ||||
//移动光标 | //移动光标 | ||||
if(index_delete-1>=0) | if(index_delete-1>=0) | ||||
{ | { | ||||
@@ -364,7 +395,59 @@ public class DiyUpdateActivity extends BaseActivity { | |||||
ToastUtils.info("已经最底部!"); | ToastUtils.info("已经最底部!"); | ||||
} | } | ||||
break; | 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(); | String name=edittext.getText().toString(); | ||||
if(name.isEmpty()) | if(name.isEmpty()) | ||||
{ | { | ||||
@@ -384,6 +467,13 @@ public class DiyUpdateActivity extends BaseActivity { | |||||
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { | AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() { | ||||
@Override | @Override | ||||
public void onClick(QMUIDialog dialog, int index) { | 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; | good.name=name; | ||||
QueryDB.UpdateGoods(good); | QueryDB.UpdateGoods(good); | ||||
ArrayList<BPA_GOODSRECIPE> pe=QueryDB.GetGoodsSrecipeID(good.id); | ArrayList<BPA_GOODSRECIPE> pe=QueryDB.GetGoodsSrecipeID(good.id); | ||||
@@ -11,9 +11,11 @@ import android.view.View; | |||||
import com.bonait.bnframework.R; | import com.bonait.bnframework.R; | ||||
import com.bonait.bnframework.common.base.BaseActivity; | import com.bonait.bnframework.common.base.BaseActivity; | ||||
import com.bonait.bnframework.common.constant.DataBus; | 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.db.mode.BPA_GOODS; | ||||
import com.bonait.bnframework.common.helper.AES; | import com.bonait.bnframework.common.helper.AES; | ||||
import com.bonait.bnframework.common.helper.I.MyClickListener; | 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.utils.ToastUtils; | ||||
import com.bonait.bnframework.common.view.MyLayoutManager; | import com.bonait.bnframework.common.view.MyLayoutManager; | ||||
import com.bonait.bnframework.modules.home.adapter.image_sp_adapter; | import com.bonait.bnframework.modules.home.adapter.image_sp_adapter; | ||||
@@ -76,7 +78,7 @@ public class ImageChooseActivity extends BaseActivity { | |||||
@Override | @Override | ||||
public void clickListener(View v, Object data) { | public void clickListener(View v, Object data) { | ||||
image_sp sp=(image_sp)data; | image_sp sp=(image_sp)data; | ||||
ToastUtils.info("选择图片:"+sp.url); | |||||
MessageManager.getInstance().sendMessage(MessageName.ClickImage,sp.url); | |||||
finish(); | finish(); | ||||
} | } | ||||
@Override | @Override | ||||
@@ -75,11 +75,15 @@ public class QDListSectionAdapter extends QMUIDefaultStickySectionAdapter { | |||||
String name=((SectionItem)section.getItemAt(itemIndex)).getTag(); | String name=((SectionItem)section.getItemAt(itemIndex)).getTag(); | ||||
IsSC=((SectionItem)section.getItemAt(itemIndex)).getIsSC(); | IsSC=((SectionItem)section.getItemAt(itemIndex)).getIsSC(); | ||||
String id= ((SectionItem)section.getItemAt(itemIndex)).getAccount(); | String id= ((SectionItem)section.getItemAt(itemIndex)).getAccount(); | ||||
String url=((SectionItem)section.getItemAt(itemIndex)).getAddress(); | |||||
tvTag.setText(name); | tvTag.setText(name); | ||||
tvNote.setText("时间:"+ ((SectionItem)section.getItemAt(itemIndex)).getNote()+"秒"); | tvNote.setText("时间:"+ ((SectionItem)section.getItemAt(itemIndex)).getNote()+"秒"); | ||||
//设置图片 | //设置图片 | ||||
if(!url.equals("未知")) | |||||
{ | |||||
myBitmapUtils.disPlay(ImageUrl,url); | |||||
} | |||||
//ImageUrl.setBackground(holder.itemView.getContext().getResources().getDrawable(R.mipmap.hgr)); | //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() { | Sc_text.setOnClickListener(new View.OnClickListener() { | ||||
@Override | @Override | ||||
@@ -39,12 +39,17 @@ public class SectionItem implements QMUISection.Model<SectionItem> { | |||||
* 是否收藏 | * 是否收藏 | ||||
*/ | */ | ||||
private Boolean IsSC; | 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.tvTag = name1; | ||||
this.tvNote = name2; | this.tvNote = name2; | ||||
this.tvAccount = name3; | this.tvAccount = name3; | ||||
this.IsSC=isSC; | this.IsSC=isSC; | ||||
this.address=address; | |||||
} | } | ||||
public String getTag() { | public String getTag() { | ||||
@@ -61,6 +66,9 @@ public class SectionItem implements QMUISection.Model<SectionItem> { | |||||
public Boolean getIsSC() { | public Boolean getIsSC() { | ||||
return IsSC; | return IsSC; | ||||
} | } | ||||
public String getAddress() { | |||||
return address; | |||||
} | |||||
public void SetIsSC(boolean isSC) | public void SetIsSC(boolean isSC) | ||||
{ | { | ||||
@@ -69,14 +77,15 @@ public class SectionItem implements QMUISection.Model<SectionItem> { | |||||
@Override | @Override | ||||
public SectionItem cloneForDiff() { | public SectionItem cloneForDiff() { | ||||
return new SectionItem(getTag(), getNote(), getAccount(),getIsSC()); | |||||
return new SectionItem(getTag(), getNote(), getAccount(),getAddress(),getIsSC()); | |||||
} | } | ||||
@Override | @Override | ||||
public boolean isSameItem(SectionItem other) { | public boolean isSameItem(SectionItem other) { | ||||
return tvTag == other.tvTag || (tvTag != null && tvTag.equals(other.tvTag)) | return tvTag == other.tvTag || (tvTag != null && tvTag.equals(other.tvTag)) | ||||
&& tvNote == other.tvNote || (tvNote != null && tvNote.equals(other.tvNote)) | && 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)); | && tvAccount == other.tvAccount || (tvAccount != null && tvAccount.equals(other.tvAccount)); | ||||
} | } | ||||
@Override | @Override | ||||
@@ -84,5 +93,4 @@ public class SectionItem implements QMUISection.Model<SectionItem> { | |||||
public boolean isSameContent(SectionItem other) { | public boolean isSameContent(SectionItem other) { | ||||
return true; | return true; | ||||
} | } | ||||
} | } |
@@ -12,226 +12,301 @@ | |||||
android:id="@+id/topbar" | android:id="@+id/topbar" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="?attr/qmui_topbar_height"/> | android:layout_height="?attr/qmui_topbar_height"/> | ||||
<ScrollView | |||||
<RelativeLayout | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:background="@color/qmui_config_color_white"> | android:background="@color/qmui_config_color_white"> | ||||
<LinearLayout | |||||
android:layout_marginLeft="30dp" | |||||
android:layout_marginRight="30dp" | |||||
<ScrollView | |||||
android:layout_width="match_parent" | 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 | <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_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_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"> | 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 | <LinearLayout | ||||
android:layout_marginLeft="@dimen/dp_40" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:orientation="vertical"> | android:orientation="vertical"> | ||||
<LinearLayout | <LinearLayout | ||||
android:layout_marginTop="@dimen/dp_10" | |||||
android:layout_marginBottom="12dp" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | |||||
android:orientation="horizontal"> | |||||
android:layout_height="wrap_content"> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | <com.qmuiteam.qmui.widget.textview.QMUILinkTextView | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="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> | </LinearLayout> | ||||
<ListView | |||||
android:id="@+id/datatab_gxbz" | |||||
<LinearLayout | |||||
android:layout_marginBottom="12dp" | |||||
android:layout_width="match_parent" | 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_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 | <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 | <LinearLayout | ||||
android:layout_width="1dp" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="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> | </RelativeLayout> | ||||
<LinearLayout | |||||
<RelativeLayout | |||||
android:layout_marginLeft="@dimen/dp_10" | android:layout_marginLeft="@dimen/dp_10" | ||||
android:layout_width="match_parent" | 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 | <LinearLayout | ||||
android:layout_marginLeft="@dimen/dp_10" | |||||
android:layout_width="match_parent" | 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 | <LinearLayout | ||||
android:id="@+id/gxchid" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | 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> | </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_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> | </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_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> | </LinearLayout> |
@@ -12,213 +12,317 @@ | |||||
android:id="@+id/topbar" | android:id="@+id/topbar" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="?attr/qmui_topbar_height"/> | android:layout_height="?attr/qmui_topbar_height"/> | ||||
<ScrollView | |||||
<RelativeLayout | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:background="@color/qmui_config_color_white"> | android:background="@color/qmui_config_color_white"> | ||||
<LinearLayout | |||||
android:layout_marginLeft="30dp" | |||||
android:layout_marginRight="30dp" | |||||
<ScrollView | |||||
android:layout_width="match_parent" | 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 | <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_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_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"> | 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 | <LinearLayout | ||||
android:layout_marginLeft="@dimen/dp_40" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:orientation="vertical"> | android:orientation="vertical"> | ||||
<LinearLayout | <LinearLayout | ||||
android:layout_marginTop="@dimen/dp_10" | |||||
android:layout_marginBottom="12dp" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | |||||
android:orientation="horizontal"> | |||||
android:layout_height="wrap_content"> | |||||
<com.qmuiteam.qmui.widget.textview.QMUILinkTextView | <com.qmuiteam.qmui.widget.textview.QMUILinkTextView | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="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> | </LinearLayout> | ||||
<ListView | |||||
android:id="@+id/datatab_gxbz" | |||||
<LinearLayout | |||||
android:layout_marginBottom="12dp" | |||||
android:layout_width="match_parent" | 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_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 | <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 | <LinearLayout | ||||
android:layout_width="1dp" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="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> | </RelativeLayout> | ||||
<LinearLayout | |||||
<RelativeLayout | |||||
android:layout_marginLeft="@dimen/dp_10" | android:layout_marginLeft="@dimen/dp_10" | ||||
android:layout_width="match_parent" | 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 | <LinearLayout | ||||
android:layout_marginLeft="@dimen/dp_10" | |||||
android:layout_width="match_parent" | 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 | <LinearLayout | ||||
android:id="@+id/gxchid" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | 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> | </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 | <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 | <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 | <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> | </LinearLayout> | ||||
</RelativeLayout> | |||||
</RelativeLayout> | |||||
</LinearLayout> | </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_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> | </LinearLayout> |
@@ -10,12 +10,16 @@ | |||||
android:layout_marginLeft="5dp" | android:layout_marginLeft="5dp" | ||||
android:layout_marginBottom="5dp" | android:layout_marginBottom="5dp" | ||||
android:background="@drawable/common_bg_with_radius_and_border"> | android:background="@drawable/common_bg_with_radius_and_border"> | ||||
<RelativeLayout | |||||
<ImageView | |||||
android:id="@+id/img" | android:id="@+id/img" | ||||
android:layout_margin="3dp" | |||||
android:layout_width="match_parent" | 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 | <com.qmuiteam.qmui.widget.textview.QMUILinkTextView | ||||
android:layout_alignParentBottom="true" | android:layout_alignParentBottom="true" | ||||
@@ -18,6 +18,7 @@ | |||||
android:layout_margin="3dp" | android:layout_margin="3dp" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="130dp" | android:layout_height="130dp" | ||||
android:src="@mipmap/loading3" | |||||
/> | /> | ||||
<TextView | <TextView | ||||
android:id="@+id/Tag_text" | android:id="@+id/Tag_text" | ||||