Browse Source

菜谱信息修改

tags/old_version_1
fyf 1 year ago
parent
commit
c55f521062
8 changed files with 710 additions and 11 deletions
  1. +3
    -0
      app/src/main/AndroidManifest.xml
  2. +2
    -0
      app/src/main/java/com/bonait/bnframework/common/constant/MessageName.java
  3. +37
    -1
      app/src/main/java/com/bonait/bnframework/common/db/QueryDB.java
  4. +20
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/CpActivity.java
  5. +413
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyUpdateActivity.java
  6. +10
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/QDListSectionAdapter.java
  7. +0
    -10
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/ResBPA_PROCESSModel.java
  8. +225
    -0
      app/src/main/res/layout/activity_diy_update.xml

+ 3
- 0
app/src/main/AndroidManifest.xml View File

@@ -28,6 +28,9 @@
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning"
tools:node="merge">
<activity
android:name=".modules.home.fragment.from.DiyUpdateActivity"
android:exported="false" />
<activity
android:name=".modules.home.fragment.mode.fragment_gx"
android:exported="false" />


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

@@ -17,4 +17,6 @@ public interface MessageName {
String DeleteGood="DeleteGood";//删除菜品
String ScGood="ScGood";//收藏菜品

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

}

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

@@ -737,6 +737,25 @@ public class QueryDB {
return data.size() > 0;
}

/**
* 判断商品数据是否存在
*
* @param name
* @return
*/
public static boolean GetGoodsIs(String name,String id) {
boolean isSucess = false;
String orderby = Desc_Time_Up;//出料顺序
String where = "isDelete=? and name=? and id!=?";
String[] args = new String[]{"0", name,id};
ArrayList<BPA_GOODS> data = new ArrayList<>();
ArrayList<Object> obj = Get(BPA_GOODS.class, where, args, orderby);
for (Object k : obj) {
data.add((BPA_GOODS) k);
}
return data.size() > 0;
}

/**
* 判断商品数据是否存在
*
@@ -856,7 +875,24 @@ public class QueryDB {
}
return data;
}

/**
* 根据商品id查询配方信息
*
* @param id
* @return
*/
public static ArrayList<BPA_GOODSRECIPE> GetGoodsSrecipeID(String id) {
String orderby = Desc_Sort_Up + ',' + Desc_Time_Up;//先按排序 创建时间倒序
String where = "isDelete=? and goodsID=?";
String[] args = new String[]{"0", id};
ArrayList<BPA_GOODSRECIPE> data = new ArrayList<>();
ArrayList<Object> obj = Get(BPA_GOODSRECIPE.class, where, args, orderby);
for (Object item : obj) {
BPA_GOODSRECIPE k = (BPA_GOODSRECIPE) item;
data.add(k);
}
return data;
}
/**
* 根据商品id查询配方信息
*


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

@@ -3,6 +3,8 @@ package com.bonait.bnframework.modules.home.fragment.from;
import static com.bonait.bnframework.MainApplication.getContext;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
@@ -117,6 +119,24 @@ public class CpActivity extends BaseActivity {
}
}
});

/**
* 点击菜品
*/
MessageManager.getInstance().registerMessageReceiver(this, MessageName.ClickGood, new MessageLooper.OnMessageListener() {
@Override
public void onMessage(Object msg) {
if (msg != null) {
SectionItem item=(SectionItem)msg;
String goodid=item.getAccount();//商品id
// 跳转到登录页面
Intent intent = new Intent(getContext(), DiyUpdateActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.putExtra("id",goodid);
startActivity(intent);
}
}
});
}

protected QMUIStickySectionAdapter<SectionHeader, SectionItem, QMUIStickySectionAdapter.ViewHolder> createAdapter() {


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

@@ -0,0 +1,413 @@
package com.bonait.bnframework.modules.home.fragment.from;

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

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.EditText;
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.db.QueryDB;
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_MATERIAL;
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.utils.AlertDialogUtils;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.modules.home.adapter.gongxubuzhou_adapter;
import com.bonait.bnframework.modules.home.fragment.mode.fragment_gx;
import com.bonait.bnframework.modules.home.fragment.mode.item_gx;
import com.qmuiteam.qmui.widget.QMUITopBar;
import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction;
import com.youth.banner.Banner;

import java.net.IDN;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class DiyUpdateActivity extends BaseActivity {

@BindView(R.id.topbar)
QMUITopBar mTopBar;
@BindView(R.id.edittext)
EditText edittext;//菜谱名称
@BindView(R.id.Banner_Main)
Banner Banner_Main;//轮播图
//用于存放获取的图片
List<Drawable> Banner_list = new ArrayList<>();

@BindView(R.id.hrgx)
Spinner hrgx;//工序
Map<String,String> hrgx_map = new LinkedHashMap<>();

@BindView(R.id.gxchid)
LinearLayout gxchid;//工序子集

@BindView(R.id.datatab_gxbz)
ListView datatab_gxbz;//工序步骤
public gongxubuzhou_adapter gxbz_adapter=null;
/**
* 工序步骤
*/
public ArrayList<BPA_GOODSRECIPE> bpa_goodsrecipes=new ArrayList<>();

/**
* 当前商品
*/
public BPA_GOODS good=null;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_diy_update);
ButterKnife.bind(this);
initTopBar();
initData();
SetGood();
}
private void initData()
{
//1.初始化轮播图
Drawable_Get(Banner_list);
//2.初始化工序
ArrayList<BPA_PROCESS> data= QueryDB.GetProcessALL();
for (BPA_PROCESS item:data)
{
hrgx_map.put(item.name,item.id);
}
ArrayAdapter<String> adapter_kk = new ArrayAdapter<>(getContext(), R.layout.spinner_text_item, new ArrayList<>(hrgx_map.keySet()));
adapter_kk.setDropDownViewResource(R.layout.spinner_dropdown_item);
hrgx.setAdapter(adapter_kk);
hrgx.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
String id= hrgx_map.get(hrgx.getSelectedItem().toString());
SelectItemFrom(id);
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
//3.工序步骤
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
public void onItemClick(AdapterView<?> parent, View view, int position, long l) {
// TODO Auto-generated method stub
gxbz_adapter.setSelectedPosition(position);
gxbz_adapter.notifyDataSetInvalidated();
}
});
}

/**
* 设置当前商品
* @param
*/
public void SetGood()
{
try
{
Intent intent = getIntent();
String id = intent.getStringExtra("id");
if(!id.isEmpty())
{
good=QueryDB.GetGoodsId(id);
if(good!=null)
{
bpa_goodsrecipes.clear();
ArrayList<BPA_GOODSRECIPE> goodsrecipes=QueryDB.GetGoodsSrecipeID(good.id);
for (BPA_GOODSRECIPE item :goodsrecipes)
{
bpa_goodsrecipes.add(item);
}
edittext.setText(good.name);
gxbz_adapter.notifyDataSetChanged();//刷新商品配方
}
}
}catch (Exception ex)
{

}
}
/**
* 根据选中工序id显示集合
* @param id
*/
public void SelectItemFrom(String id)
{
try
{
gxchid.removeAllViews();
ArrayList<BPA_PROCESSModel> mode= QueryDB.GetProcessModelProcessID(id);
if(mode.size()>0)//工序
{
for (BPA_PROCESSModel item : mode)
{
item_gx gx=new item_gx();
gx.datatype=item.datatype;
gx.name=item.name;
gx.data=item.data;
gx.IsWL=false;
fragment_gx gongxu=new fragment_gx(this,null,gx);
gxchid.addView(gongxu);
}
}else //物料
{
ArrayList<BPA_MATERIAL> materials= QueryDB.GetMaterialALL();
for (BPA_MATERIAL item2 : materials)
{
item_gx gx=new item_gx();
gx.datatype=0;//液体料都是数字
gx.name=item2.name;
gx.IsWL=true;
fragment_gx gongxu=new fragment_gx(this,null,gx);
gxchid.addView(gongxu);
}
}
}catch (Exception ex)
{
}
}

/**
* 获取选中行的变量
* @return
*/
public BPA_GOODSRECIPE GetSelectItemFromValue()
{
BPA_GOODSRECIPE pf=new BPA_GOODSRECIPE();
try
{
String name= hrgx.getSelectedItem().toString();
boolean IsVerify=true;
String description="";
// 延迟,100|延迟,100|延迟,100|延迟,100|
String data="";
String desc="";
if(name.equals("液体料"))
{
pf.materialType=0;
for (int i = 0; i < gxchid.getChildCount(); i++) {
fragment_gx gongxu = (fragment_gx) gxchid.getChildAt(i);
String values= gongxu.GetValues();
if(!values.isEmpty())
{
data+=gongxu.model.name+","+values+"|";
desc+=values+",";
}
}

if(data.isEmpty())
{
IsVerify=false;
description+="物料-不能为空,请勾选一个物料\n";
}
}else
{
pf.materialType=1;
for (int i = 0; i < gxchid.getChildCount(); i++) {
fragment_gx gongxu = (fragment_gx) gxchid.getChildAt(i);
String values= gongxu.GetValues();
if(values.isEmpty())
{
IsVerify=false;
description+=gongxu.model.name +"-不能为空\n";
}else
{
data+=gongxu.model.name+","+values+"|";
desc+=values+",";
}
}
}
if(IsVerify)
{
pf.processname=name;
pf.processms= name+"("+desc.substring(0,desc.length()-1) +")";
pf.processvalue=data.substring(0,data.length()-1);
return pf;
}else
{
ToastUtils.info("数据验证失败,原因:"+description);
return null;
}
}catch (Exception ex)
{
return null;
}
}
private void initTopBar() {
mTopBar.setTitle("菜谱信息修改");
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
}
/**
* 获取图片存放到list中
* @param arrayList
*/
private void Drawable_Get(List arrayList) {
//从drawable文件夹下获取到事先准备的图片,在这里演示三张图片
Drawable drawable = getResources().getDrawable(R.mipmap.hgr);
Drawable drawable1 = getResources().getDrawable(R.mipmap.hgr);
Drawable drawable2 = getResources().getDrawable(R.mipmap.hgr);
//把他们存放到一个list集合中
arrayList.add(drawable);
arrayList.add(drawable1);
arrayList.add(drawable2);
//调用轮播图设置方法
Banner_Set(Banner_list);
}
/**
* 将图片存放到轮播图中
* @param arrayList
*/
private void Banner_Set(List arrayList) {
//这是设置轮播图的关键位置,setImages(list) 设置轮播图的图片资源
//setImageLoader(一个实体类)用于加载图片到手机页面上显示
Banner_Main.setImages(Banner_list).setImageLoader(new MyImage()).start();
}
/**
* 点击事件
* @param view
*/
@OnClick({R.id.add_hrgx,R.id.update_gx,R.id.delete_gx,R.id.shangyi,R.id.xiayi,R.id.shengchengcaipu})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.add_hrgx://添加工序
BPA_GOODSRECIPE goodsrecipe= GetSelectItemFromValue();
if(goodsrecipe!=null)
{
bpa_goodsrecipes.add(GetSelectItemFromValue());
gxbz_adapter.notifyDataSetChanged();
}
break;
case R.id.update_gx://修改工序
int index_update= gxbz_adapter.getSelectedPosition();
if(index_update>=0 && index_update<bpa_goodsrecipes.size())
{
BPA_GOODSRECIPE obj_update= (BPA_GOODSRECIPE)bpa_goodsrecipes.get(index_update);
gxbz_adapter.notifyDataSetChanged();
ToastUtils.info("修改工序"+obj_update.processname+"成功!");
}else
{
ToastUtils.info("请先选择工序!");
}
break;
case R.id.delete_gx://删除工序
int index_delete= gxbz_adapter.getSelectedPosition();
if(index_delete>=0 && index_delete<bpa_goodsrecipes.size())
{
BPA_GOODSRECIPE obj_delete= (BPA_GOODSRECIPE)bpa_goodsrecipes.get(index_delete);
bpa_goodsrecipes.remove(obj_delete);
gxbz_adapter.notifyDataSetChanged();
ToastUtils.info("删除工序"+obj_delete.processname+"成功!");
}else
{
ToastUtils.info("请先选择工序!");
}
break;
case R.id.shangyi://上移
int index_up= gxbz_adapter.getSelectedPosition();;
if(index_up>0)
{
BPA_GOODSRECIPE obj_up= (BPA_GOODSRECIPE)bpa_goodsrecipes.get(index_up);
bpa_goodsrecipes.remove(obj_up);
bpa_goodsrecipes.add(index_up-1,obj_up);
gxbz_adapter.notifyDataSetChanged();
}else
{
ToastUtils.info("已经最顶部!");
}
break;
case R.id.xiayi://下移
int index_down= gxbz_adapter.getSelectedPosition();
if(index_down<bpa_goodsrecipes.size()-1 && index_down>=0)
{
BPA_GOODSRECIPE obj_down= (BPA_GOODSRECIPE)bpa_goodsrecipes.get(index_down);
bpa_goodsrecipes.remove(obj_down);
bpa_goodsrecipes.add(index_down+1,obj_down);
gxbz_adapter.notifyDataSetChanged();
}else
{
ToastUtils.info("已经最底部!");
}
break;
case R.id.shengchengcaipu://保存菜谱
String name=edittext.getText().toString();
if(name.isEmpty())
{
ToastUtils.info("菜谱名称不能为空!");
return;
}else
{
boolean isSucess= QueryDB.GetGoodsIs(name,good.id);
if(isSucess)
{
ToastUtils.info("菜谱名称已存在!");
return;
}
//按钮点击
String title = "保存菜谱操作提示!";
String message = "请问客官确定要保存["+name+"]菜谱吗?";
AlertDialogUtils.showDialog(view.getContext(), title, message, new QMUIDialogAction.ActionListener() {
@Override
public void onClick(QMUIDialog dialog, int index) {
good.name=name;
QueryDB.UpdateGoods(good);
ArrayList<BPA_GOODSRECIPE> pe=QueryDB.GetGoodsSrecipeID(good.id);
for (BPA_GOODSRECIPE item:pe)
{
QueryDB.DeleteGoodsSrecipe(item);
}
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;
}
}

@Override
public void onDestroy() {
super.onDestroy();
}
@Override
protected boolean canDragBack() {
return false;
}

}

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

@@ -76,12 +76,14 @@ public class QDListSectionAdapter extends QMUIDefaultStickySectionAdapter {
tvNote.setText("时间:"+ ((SectionItem)section.getItemAt(itemIndex)).getNote()+"秒");
//设置图片
ImageUrl.setBackground(holder.itemView.getContext().getResources().getDrawable(R.mipmap.hgr));
//上传按钮点击
Sc_text.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ToastUtils.info("点击上传按钮,菜品:"+name);
}
});
//删除按钮点击
delete_text.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@@ -98,6 +100,7 @@ public class QDListSectionAdapter extends QMUIDefaultStickySectionAdapter {
}
});
SetImage(sc_image,IsSC);
//收藏按钮点击
sc_image.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@@ -117,6 +120,13 @@ public class QDListSectionAdapter extends QMUIDefaultStickySectionAdapter {
});
}
});
//点击查看当前商品信息
ImageUrl.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MessageManager.getInstance().sendMessage(MessageName.ClickGood, ((SectionItem)section.getItemAt(itemIndex)));
}
});
}

public void SetImage(ImageView image,boolean isxz)


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

@@ -1,10 +0,0 @@
package com.bonait.bnframework.modules.home.fragment.mode;

import com.bonait.bnframework.common.db.mode.BPA_PROCESSModel;

public class ResBPA_PROCESSModel extends BPA_PROCESSModel {
/**
* 选中变量
*/
public String val;
}

+ 225
- 0
app/src/main/res/layout/activity_diy_update.xml View File

@@ -0,0 +1,225 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".modules.home.fragment.from.DiyUpdateActivity"
android:orientation="vertical"
android:background="@color/app_color_blue"
android:fitsSystemWindows="true">
<com.qmuiteam.qmui.widget.QMUITopBar
android:id="@+id/topbar"
android:layout_width="match_parent"
android:layout_height="?attr/qmui_topbar_height"/>
<ScrollView
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"
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>
<LinearLayout
android:layout_marginTop="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_10"
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_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="match_parent"
android:layout_height="match_parent"
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:listSelector="@color/green_primary_dark"
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>

<RelativeLayout
android:layout_marginLeft="@dimen/dp_10"
android:layout_width="match_parent"
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="match_parent"
android:orientation="vertical">

<LinearLayout
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>

<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">
<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>
</LinearLayout>

Loading…
Cancel
Save