Skip to content

Commit

Permalink
xianrui
Browse files Browse the repository at this point in the history
  • Loading branch information
wow121 committed Nov 17, 2013
2 parents e3603b8 + c2fdf89 commit a765022
Show file tree
Hide file tree
Showing 10 changed files with 459 additions and 7 deletions.
5 changes: 4 additions & 1 deletion baby/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@
<activity android:name=".activity.baby.FitmentActivity" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden"></activity>
<activity android:name=".activity.baby.BabyDetailActivity" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden"></activity>
<activity android:name=".activity.baby.BabyStatusActivity" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden"></activity>


<activity android:name=".activity.baby.AddVisitRecordActivity" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden"></activity>
<activity android:name=".activity.HomeActivity" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden"></activity>
<activity android:name=".activity.AddMilkActivity" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden"></activity>
<!-- push服务 -->
<service android:name=".service.PullService"></service>

Expand Down
217 changes: 217 additions & 0 deletions baby/res/layout/add_milk_activity.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
<?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/common_title_bar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/choose_milk_yard"/>
<RadioGroup
android:id="@+id/rgAddMilkYard"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rbAddMilkIn"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:checked="true"
android:text="@string/add_milk_in" />

<RadioButton
android:id="@+id/rdAddMilkOut"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:text="@string/add_milk_out" />
</RadioGroup>
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="4"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="10dp"
android:orientation="horizontal" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/choose_milk_brand"/>
<RadioGroup
android:id="@+id/rgAddMilkBrand"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">

<RadioButton
android:id="@+id/rdAddMilkBrand1"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:checked="true"
android:text="@string/add_milk_brand1" />

<RadioButton
android:id="@+id/rdAddMilkBrand2"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:text="@string/add_milk_brand2" />

<RadioButton
android:id="@+id/rdAddMilkBrand3"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:text="@string/add_milk_brand3" />

<RadioButton
android:id="@+id/rdAddMilkBrandOther"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:text="@string/add_milk_brand_other" />
</RadioGroup>
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="10dp"
android:layout_weight="5"
android:orientation="vertical" >

<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginLeft="15dp"
android:layout_marginRight="5dp"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/choose_milk_kind"/>
<EditText
android:id="@+id/etAddMilkKind"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/km"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/add_milk_energy"/>
<EditText
android:id="@+id/etAddMilkEnergy"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/gm"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/add_milk_protein"/>
<EditText
android:id="@+id/etAddMilkProtein"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/gm"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/add_milk_carbohydrate"/>
<EditText
android:id="@+id/etAddMilkCarbohydrate"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/gm"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="right"
android:text="@string/add_milk_fat"/>
<EditText
android:id="@+id/etAddMilkFat"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/gm"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
Expand Down
8 changes: 8 additions & 0 deletions baby/res/layout/home_activity.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?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/common_title_bar"/>

</LinearLayout>
17 changes: 17 additions & 0 deletions baby/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@
<string name="choice">选择</string>
<string name="change">修改</string>
<string name="must_fill">(必填)</string>
<string name="km">kcal/100ml</string>
<string name="gm">g/100ml</string>

<!-- 婴儿“修改资料”界面 -->
<string name="doctor_creat_phone">家长手机号:</string>
<string name="doctor_creat_name">婴儿名:</string>
Expand All @@ -134,12 +137,14 @@
<string name="doctor_creat_choice1">WHO</string>
<string name="doctor_creat_choice2">九城</string>
<string name="doctor_creat_choice3">上海</string>

<!-- “配方奶”界面 -->
<string name="choose_milk_yard">院内/外:</string>
<string name="choose_milk_brand">品牌:</string>
<string name="choose_milk_kind">种类:</string>
<string name="choose_milk_add_milk">新增配方奶</string>
<string name="choose_milk_check">查看营养数据</string>

<!-- 婴儿状态总结(随访记录“分析”界面) -->
<string name="baby_status_gap">营养差距></string>
<string name="baby_status_energy_gap">能量差距</string>
Expand All @@ -154,4 +159,16 @@
<string name="baby_status_in_milk_need">低出生体重儿院内专用配方奶喂养满足生长需求</string>
<string name="baby_status_out_milk_need">早产儿出院后专用配方奶喂养满足生长需求</string>
<string name="baby_status_sumup">营养总结:</string>

<!-- 新增”配方奶“界面 -->
<string name="add_milk_in">院内</string>
<string name="add_milk_out">院外</string>
<string name="add_milk_brand1">惠氏</string>
<string name="add_milk_brand2">品牌A</string>
<string name="add_milk_brand3">品牌B</string>
<string name="add_milk_brand_other">其他</string>
<string name="add_milk_energy">能量:</string>
<string name="add_milk_protein">蛋白质:</string>
<string name="add_milk_carbohydrate">碳水化合物:</string>
<string name="add_milk_fat">脂肪:</string>
</resources>
53 changes: 53 additions & 0 deletions baby/src/com/keju/baby/activity/AddMilkActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package com.keju.baby.activity;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

import com.keju.baby.R;
import com.keju.baby.R.id;
import com.keju.baby.R.layout;
import com.keju.baby.activity.base.BaseActivity;

public class AddMilkActivity extends BaseActivity implements OnClickListener{
private Button btnLeft,btnRight;
private TextView tvTitle;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.add_milk_activity);
findView();
fillData();
}
private void findView() {

btnLeft=(Button)findViewById(R.id.btnLeft);
btnRight=(Button)findViewById(R.id.btnRight);
tvTitle=(TextView)findViewById(R.id.tvTitle);
}
/**
* 数据填充
*/
private void fillData() {

btnLeft.setText("Back");
btnRight.setText("确定");
tvTitle.setText("配方奶");
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.btnLeft:
this.finish();
break;
case R.id.btnRight:

break;

default:
break;
}

}
}
Loading

0 comments on commit a765022

Please sign in to comment.