Browse Source

no message

master
lh 8 years ago
parent
commit
9a851fa9d2
4 changed files with 438 additions and 13 deletions
  1. +33
    -13
      app/src/main/java/com/qhclh/ytzh/work/productiondailyw/WriteDActivity.java
  2. +30
    -0
      app/src/main/java/com/qhclh/ytzh/work/productiondailyw/WriteDFragment.java
  3. +374
    -0
      app/src/main/res/layout/frag_daily.xml
  4. +1
    -0
      app/src/main/res/values/strings.xml

+ 33
- 13
app/src/main/java/com/qhclh/ytzh/work/productiondailyw/WriteDActivity.java View File

@ -6,6 +6,8 @@ import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager; import android.support.v4.view.ViewPager;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import com.qhclh.ytzh.R; import com.qhclh.ytzh.R;
@ -26,7 +28,6 @@ import butterknife.BindView;
*/ */
public class WriteDActivity extends BaseActivity { public class WriteDActivity extends BaseActivity {
@BindView(R.id.toolbar) @BindView(R.id.toolbar)
Toolbar mToolbar; Toolbar mToolbar;
@BindView(R.id.tabLayout_write) @BindView(R.id.tabLayout_write)
@ -36,6 +37,7 @@ public class WriteDActivity extends BaseActivity {
private List<Fragment> mFragmentList = new ArrayList<>(); private List<Fragment> mFragmentList = new ArrayList<>();
private List<String> mTitleList = new ArrayList<>(); private List<String> mTitleList = new ArrayList<>();
private TabViewPagerAdapter mViewPagerAdapter; private TabViewPagerAdapter mViewPagerAdapter;
@Override @Override
protected int setLayoutId() { protected int setLayoutId() {
return R.layout.act_writed; return R.layout.act_writed;
@ -64,24 +66,43 @@ public class WriteDActivity extends BaseActivity {
} }
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.save, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.save_info:
break;
case R.id.commit_info:
break;
}
return super.onOptionsItemSelected(item);
}
private void initTabLayout() { private void initTabLayout() {
mTitleList.add(getString(R.string.changle));
mTitleList.add(getString(R.string.shouguangdong));
mTitleList.add(getString(R.string.shouguangxi));
mTitleList.add(getString(R.string.anqiu));
mTitleList.add(getString(R.string.qiuping));
mTitleList.add(getString(R.string.changle));
mTitleList.add(getString(R.string.shouguangdong));
mTitleList.add(getString(R.string.shouguangxi));
mTitleList.add(getString(R.string.anqiu));
mTitleList.add(getString(R.string.qiuping));
mTabLayout.setTabMode(TabLayout.MODE_FIXED);
mTabLayout.setTabMode(TabLayout.MODE_SCROLLABLE);
} }
private void initViewPager() { private void initViewPager() {
mFragmentList.add(new ChangleFragment());
mFragmentList.add(new ShouguangdFragment());
mFragmentList.add(new ShouguangxFragment());
mFragmentList.add(new AnqiuFragment());
mFragmentList.add(new QiupingFragment());
mFragmentList.add(new WriteDFragment());
mFragmentList.add(new WriteDFragment());
mFragmentList.add(new WriteDFragment());
mFragmentList.add(new WriteDFragment());
mFragmentList.add(new WriteDFragment());
mViewPagerAdapter = new TabViewPagerAdapter(getSupportFragmentManager()); mViewPagerAdapter = new TabViewPagerAdapter(getSupportFragmentManager());
mViewPager.setAdapter(mViewPagerAdapter); mViewPager.setAdapter(mViewPagerAdapter);
@ -90,7 +111,6 @@ public class WriteDActivity extends BaseActivity {
} }
private class TabViewPagerAdapter extends FragmentPagerAdapter { private class TabViewPagerAdapter extends FragmentPagerAdapter {
public TabViewPagerAdapter(FragmentManager fm) { public TabViewPagerAdapter(FragmentManager fm) {
super(fm); super(fm);


+ 30
- 0
app/src/main/java/com/qhclh/ytzh/work/productiondailyw/WriteDFragment.java View File

@ -0,0 +1,30 @@
package com.qhclh.ytzh.work.productiondailyw;
import com.qhclh.ytzh.R;
import com.qhclh.ytzh.base.BaseFragment;
/**
* Created by 青花瓷 on 2017/12/19.
*/
public class WriteDFragment extends BaseFragment {
@Override
protected int setLayout() {
return R.layout.frag_daily;
}
@Override
protected void initView() {
}
@Override
protected void initData() {
}
@Override
protected void initOper() {
}
}

+ 374
- 0
app/src/main/res/layout/frag_daily.xml View File

@ -0,0 +1,374 @@
<?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="wrap_content"
android:background="@color/greyf4f4f4"
android:orientation="vertical">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="none">
<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:background="@color/white"
android:orientation="horizontal"
android:padding="@dimen/dp_10">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="@string/death1"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_16" />
<EditText
android:id="@+id/frag_death"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:background="@drawable/shape_bg"
android:hint="请输入只数"
android:inputType="number"
android:maxLines="1"
android:padding="@dimen/dp_5"
android:textColor="@color/black303030"
android:textColorHint="@color/greydp"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<include layout="@layout/include_line" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:padding="@dimen/dp_10">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="@string/eliminate"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_16" />
<EditText
android:id="@+id/frag_eliminate"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:background="@drawable/shape_bg"
android:hint="请输入只数"
android:inputType="number"
android:maxLines="1"
android:padding="@dimen/dp_5"
android:textColor="@color/black303030"
android:textColorHint="@color/greydp"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<include layout="@layout/include_line" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:padding="@dimen/dp_10">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="@string/water2"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_16" />
<EditText
android:id="@+id/frag_water"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:background="@drawable/shape_bg"
android:hint="立方"
android:inputType="numberDecimal"
android:maxLines="1"
android:padding="@dimen/dp_5"
android:textColor="@color/black303030"
android:textColorHint="@color/greydp"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<include layout="@layout/include_line" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:padding="@dimen/dp_10">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="@string/weight1"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_16" />
<EditText
android:id="@+id/frag_weight"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:background="@drawable/shape_bg"
android:hint="克(g)"
android:inputType="numberDecimal"
android:maxLines="1"
android:padding="@dimen/dp_5"
android:textColor="@color/black303030"
android:textColorHint="@color/greydp"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<include layout="@layout/include_line" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:padding="@dimen/dp_10">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="最低温度℃:"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_16" />
<EditText
android:id="@+id/frag_mint"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:background="@drawable/shape_bg"
android:hint="请输入数字"
android:inputType="numberDecimal"
android:maxLines="1"
android:padding="@dimen/dp_5"
android:textColor="@color/black303030"
android:textColorHint="@color/greydp"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<include layout="@layout/include_line" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:padding="@dimen/dp_10">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="最高温度℃:"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_16" />
<EditText
android:id="@+id/frag_maxt"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:background="@drawable/shape_bg"
android:hint="请输入数字"
android:inputType="numberDecimal"
android:maxLines="1"
android:padding="@dimen/dp_5"
android:textColor="@color/black303030"
android:textColorHint="@color/greydp"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<include layout="@layout/include_line" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:padding="@dimen/dp_10">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="最低湿度%:"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_16" />
<EditText
android:id="@+id/frag_minh"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:background="@drawable/shape_bg"
android:hint="请输入数字"
android:inputType="numberDecimal"
android:maxLines="1"
android:padding="@dimen/dp_5"
android:textColor="@color/black303030"
android:textColorHint="@color/greydp"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<include layout="@layout/include_line" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:padding="@dimen/dp_10">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="最高湿度%:"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_16" />
<EditText
android:id="@+id/frag_maxh"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:background="@drawable/shape_bg"
android:hint="请输入数字"
android:inputType="numberDecimal"
android:maxLines="1"
android:padding="@dimen/dp_5"
android:textColor="@color/black303030"
android:textColorHint="@color/greydp"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<include layout="@layout/include_line" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:padding="@dimen/dp_10">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="最小通风(夜):"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_16" />
<EditText
android:id="@+id/frag_minw"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:background="@drawable/shape_bg"
android:hint="1大+1大12格 60%"
android:inputType="numberDecimal"
android:maxLines="1"
android:padding="@dimen/dp_5"
android:textColor="@color/black303030"
android:textColorHint="@color/greydp"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<include layout="@layout/include_line" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:padding="@dimen/dp_10">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="最大通风(昼):"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_16" />
<EditText
android:id="@+id/frag_maxw"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:background="@drawable/shape_bg"
android:hint="1大23hz 50%"
android:inputType="numberDecimal"
android:maxLines="1"
android:padding="@dimen/dp_5"
android:textColor="@color/black303030"
android:textColorHint="@color/greydp"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<include layout="@layout/include_line" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:padding="@dimen/dp_10">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="负压:"
android:textColor="@color/grey888888"
android:textSize="@dimen/text_size_16" />
<EditText
android:id="@+id/frag_pressure"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:background="@drawable/shape_bg"
android:hint="请输入数字"
android:inputType="numberDecimal"
android:maxLines="1"
android:padding="@dimen/dp_5"
android:textColor="@color/black303030"
android:textColorHint="@color/greydp"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<include layout="@layout/include_line" />
</LinearLayout>
</ScrollView>
</LinearLayout>

+ 1
- 0
app/src/main/res/values/strings.xml View File

@ -74,6 +74,7 @@
<string name="eliminate">淘汰:</string> <string name="eliminate">淘汰:</string>
<string name="eliminatee">淘汰</string> <string name="eliminatee">淘汰</string>
<string name="water">饮水:</string> <string name="water">饮水:</string>
<string name="water2">饮水量:</string>
<string name="water1">饮水</string> <string name="water1">饮水</string>
<string name="plachose">请选择</string> <string name="plachose">请选择</string>
<string name="outtime">出厂时间:</string> <string name="outtime">出厂时间:</string>


Loading…
Cancel
Save