Quellcode durchsuchen

diy功能22

tags/old_version_1
fyf vor 1 Jahr
Ursprung
Commit
b1778e4f77
3 geänderte Dateien mit 98 neuen und 44 gelöschten Zeilen
  1. +43
    -4
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyActivity.java
  2. +1
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/fragment_gx.java
  3. +54
    -40
      app/src/main/res/layout/activity_diy.xml

+ 43
- 4
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyActivity.java Datei anzeigen

@@ -18,11 +18,14 @@ import android.widget.Spinner;

import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseActivity;
import com.bonait.bnframework.common.constant.MessageName;
import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_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.MyImage;
import com.bonait.bnframework.common.message.MessageManager;
import com.bonait.bnframework.common.utils.ToastUtils;
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;
@@ -40,6 +43,7 @@ import java.util.Map;

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

public class DiyActivity extends BaseActivity {
@BindView(R.id.topbar)
@@ -55,7 +59,6 @@ public class DiyActivity extends BaseActivity {

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

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -90,7 +93,6 @@ public class DiyActivity extends BaseActivity {
});
//3.
}

/**
* 根据选中工序id显示集合
* @param id
@@ -132,7 +134,6 @@ public class DiyActivity extends BaseActivity {

}
}

private void initTopBar() {
mTopBar.setTitle("DIY模式");
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() {
@@ -161,11 +162,49 @@ public class DiyActivity extends BaseActivity {
//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.caozuomoshi,R.id.shengchengcaipu})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.add_hrgx://添加工序

ToastUtils.info("添加工序");
break;
case R.id.update_gx://修改工序

ToastUtils.info("修改工序");
break;
case R.id.delete_gx://删除工序

ToastUtils.info("删除工序");
break;
case R.id.shangyi://上移

ToastUtils.info("上移");
break;
case R.id.xiayi://下移

ToastUtils.info("下移");
break;
case R.id.caozuomoshi://操作模式

ToastUtils.info("操作模式");
break;
case R.id.shengchengcaipu://生成菜谱

ToastUtils.info("生成菜谱");
break;
}
}

@Override
public void onDestroy() {
super.onDestroy();
}

@Override
protected boolean canDragBack() {
return false;


+ 1
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/fragment_gx.java Datei anzeigen

@@ -56,6 +56,7 @@ public class fragment_gx extends LinearLayout {
{
check.setVisibility(View.GONE);
}
check.setChecked(false);
switch (model.datatype)
{
case 0://数字


+ 54
- 40
app/src/main/res/layout/activity_diy.xml Datei anzeigen

@@ -121,6 +121,7 @@
android:layout_height="wrap_content"
android:text="步骤:"/>
<Button
android:id="@+id/shangyi"
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button"
@@ -128,6 +129,7 @@
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"
@@ -139,6 +141,7 @@
</LinearLayout>

<Button
android:id="@+id/caozuomoshi"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_width="wrap_content"
@@ -186,43 +189,53 @@
/>
</LinearLayout>

<LinearLayout
android:id="@+id/gxchid"
android:layout_marginTop="20dp"
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
<LinearLayout
android:layout_marginTop="@dimen/dp_10"
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_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:layout_width="50dp"
android:layout_height="26dp"
android:background="@drawable/button1"
android:text="添加"
android:textColor="@color/black"
android:textSize="14dp"/>
<Button
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: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>
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>

@@ -231,17 +244,18 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<Button
android:layout_centerInParent="true"
android:layout_marginTop="20dp"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:id="@+id/shengchengcaipu"
android:layout_width="180dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:layout_marginTop="20dp"
android:background="@drawable/button1"
android:text="生成菜谱"
android:textColor="@color/black"
android:textSize="19dp"/>
android:textSize="19dp" />
</RelativeLayout>
</LinearLayout>



Laden…
Abbrechen
Speichern