Browse Source

抓鸡扫码

master
lh 7 years ago
parent
commit
f40fc752a8
4 changed files with 177 additions and 0 deletions
  1. +3
    -0
      app/src/main/AndroidManifest.xml
  2. +53
    -0
      app/src/main/java/com/qhclh/ytzh/work/CatchChicken/CCScanActivity.java
  3. +17
    -0
      app/src/main/java/com/qhclh/ytzh/work/WorkFragment.java
  4. +104
    -0
      app/src/main/res/layout/act_catchscan.xml

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

@ -187,6 +187,9 @@
<activity android:name=".me.XiugaiMimaActivity"
android:screenOrientation="portrait" />
<activity android:name=".work.CatchChicken.CCScanActivity"
android:screenOrientation="portrait" />
<!-- 设置竖屏扫码 -->
<activity
android:name=".work.scan.ScanActivity"


+ 53
- 0
app/src/main/java/com/qhclh/ytzh/work/CatchChicken/CCScanActivity.java View File

@ -0,0 +1,53 @@
package com.qhclh.ytzh.work.CatchChicken;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.TextView;
import com.qhclh.ytzh.R;
import com.qhclh.ytzh.base.BaseActivity;
import butterknife.BindView;
/**
* Created by 青花瓷 on 2018/5/8.
*/
public class CCScanActivity extends BaseActivity {
@BindView(R.id.toolbar)
Toolbar mToolbar;
@BindView(R.id.catchscan_name)
TextView catchscan_name;
@BindView(R.id.catchscan_factory)
TextView catchscan_factory;
@BindView(R.id.catchscan_phone)
TextView catchscan_phone;
@BindView(R.id.catchscan_time)
TextView catchscan_time;
private String scanStr = "";
@Override
protected int setLayoutId() {
return R.layout.act_catchscan;
}
@Override
protected void initView() {
initToolbar(mToolbar, "扫码结果", new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
}
@Override
protected void initData() {
}
@Override
protected void initOper() {
}
}

+ 17
- 0
app/src/main/java/com/qhclh/ytzh/work/WorkFragment.java View File

@ -15,6 +15,7 @@ import com.qhclh.ytzh.home.MainActivity;
import com.qhclh.ytzh.index.WorkEvent;
import com.qhclh.ytzh.utils.GlideImageLoader;
import com.qhclh.ytzh.utils.RecyclerViewUtil;
import com.qhclh.ytzh.work.CatchChicken.CCScanActivity;
import com.qhclh.ytzh.work.Fowl.FowlActivity;
import com.qhclh.ytzh.work.Hatchery.HatcheryActivity;
import com.qhclh.ytzh.work.Poultrydailyreport.PoultryDailyReportActivity;
@ -151,6 +152,10 @@ public class WorkFragment extends BaseFragment {
///< 上鸡出栏
startActivity(new Intent(getActivity(), FowlActivity.class));
}
if (x == 13) {
///< 抓鸡扫码
startActivity(new Intent(getActivity(), CCScanActivity.class));
}
@ -211,6 +216,11 @@ public class WorkFragment extends BaseFragment {
workBeanList.add(new WorkBean(R.drawable.shangjichulan, "上鸡出栏", 12));
}
if (MainActivity.workList.contains("013")) {
///< 抓鸡扫码
workBeanList.add(new WorkBean(R.drawable.saoyisao, "抓鸡扫码", 13));
}
if (MainActivity.workList.contains("007")) {
@ -293,6 +303,13 @@ public class WorkFragment extends BaseFragment {
///< 上鸡出栏
workBeanList.add(new WorkBean(R.drawable.shangjichulan, "上鸡出栏", 12));
}
if (event.getWorkList().contains("013")) {
///< 抓鸡扫码
workBeanList.add(new WorkBean(R.drawable.saoyisao, "抓鸡扫码", 13));
}
if (event.getWorkList().contains("007")) {
work_iv.setVisibility(View.VISIBLE);
} else {


+ 104
- 0
app/src/main/res/layout/act_catchscan.xml View File

@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/include_tool_bar"></include>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/dp_10"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_10">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="抓 鸡 队:"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_16" />
<TextView
android:id="@+id/catchscan_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/black303030"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<include layout="@layout/include_line" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/dp_10"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_10">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="养 殖 场:"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_16" />
<TextView
android:id="@+id/catchscan_factory"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/black303030"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<include layout="@layout/include_line" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/dp_10"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_10">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="手 机 号:"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_16" />
<TextView
android:id="@+id/catchscan_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/black303030"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<include layout="@layout/include_line" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/dp_10"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_10">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="开棚时间:"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_16" />
<TextView
android:id="@+id/catchscan_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/red"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<include layout="@layout/include_line" />
</LinearLayout>

Loading…
Cancel
Save