1
This commit is contained in:
@@ -41,11 +41,13 @@ public class NutritionMaster extends Application {
|
||||
public static NutritionMaster mInstance;
|
||||
private int appCount = 0;
|
||||
|
||||
public static MyUser user =null;
|
||||
public static MyUser user = null;
|
||||
public static Physique physique = null;
|
||||
public static Occupation occupation = null;
|
||||
public static Element element = null;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
@@ -101,7 +101,7 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
protected void upUser() {
|
||||
NutritionMaster.user = user;
|
||||
NutritionMaster.element = new Element(user);
|
||||
Logger.d("用户信息已改" + NutritionMaster.user.toString());
|
||||
// Logger.d("用户信息已改" + NutritionMaster.user.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,16 +9,17 @@ import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.os.Message;
|
||||
import android.os.RemoteException;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.example.ninefourone.nutritionmaster.NutritionMaster;
|
||||
import com.example.ninefourone.nutritionmaster.R;
|
||||
import com.example.ninefourone.nutritionmaster.base.BaseFragment;
|
||||
import com.example.ninefourone.nutritionmaster.bean.Element;
|
||||
import com.example.ninefourone.nutritionmaster.utils.CalculateUtils;
|
||||
import com.example.ninefourone.nutritionmaster.utils.ChartDrawer;
|
||||
import com.github.mikephil.charting.charts.LineChart;
|
||||
import com.github.mikephil.charting.data.Entry;
|
||||
@@ -31,6 +32,7 @@ import java.util.ArrayList;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
import butterknife.Unbinder;
|
||||
import me.itangqi.waveloadingview.WaveLoadingView;
|
||||
|
||||
@@ -53,6 +55,8 @@ public class BodyInformationFragment extends BaseFragment {
|
||||
TextView calorieText;
|
||||
@BindView(R.id.weight_text)
|
||||
TextView weightText;
|
||||
@BindView(R.id.see_whole_elements)
|
||||
LinearLayout seeWholeElements;
|
||||
|
||||
private int stepCount = 0;
|
||||
private static final int REFRESH_STEP_WHAT = 0;
|
||||
@@ -136,6 +140,12 @@ public class BodyInformationFragment extends BaseFragment {
|
||||
}
|
||||
}
|
||||
|
||||
@OnClick(R.id.see_whole_elements)
|
||||
public void onViewClicked() {
|
||||
AlertDialog dialog = new ElementDialog.Builder(getContext()).create();
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 定时器,修改UI
|
||||
@@ -209,10 +219,10 @@ public class BodyInformationFragment extends BaseFragment {
|
||||
Logger.d(NutritionMaster.element);
|
||||
try {
|
||||
Element elementTemp = NutritionMaster.element.calculateData(NutritionMaster.user);
|
||||
int temp = (int) (elementTemp.getCalorie());
|
||||
calorieText.setText(temp + "");
|
||||
temp = (int) (NutritionMaster.user.getEaten_elements().getCalorie() / temp * 100);
|
||||
waveLoadingView.setProgressValue(temp);
|
||||
float temp = (float) (elementTemp.getCalorie());
|
||||
calorieText.setText((int) temp + "");
|
||||
int progress = (int) (NutritionMaster.user.getEaten_elements().getCalorie() / temp * 100);
|
||||
waveLoadingView.setProgressValue(progress);
|
||||
} catch (CloneNotSupportedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
package com.example.ninefourone.nutritionmaster.modules.viewpagerfragments.bodyinformation;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.example.ninefourone.nutritionmaster.NutritionMaster;
|
||||
import com.example.ninefourone.nutritionmaster.R;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
/**
|
||||
* Created by ScorpioMiku on 2018/10/8.
|
||||
*/
|
||||
|
||||
public class ElementDialog extends AlertDialog {
|
||||
protected ElementDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
protected ElementDialog(@NonNull Context context, int themeResId) {
|
||||
super(context, themeResId);
|
||||
}
|
||||
|
||||
protected ElementDialog(@NonNull Context context, boolean cancelable, @Nullable OnCancelListener cancelListener) {
|
||||
super(context, cancelable, cancelListener);
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
@BindView(R.id.calorie_tag)
|
||||
TextView calorieTag;
|
||||
@BindView(R.id.calorie_text)
|
||||
TextView calorieText;
|
||||
@BindView(R.id.suger_tag)
|
||||
TextView sugerTag;
|
||||
@BindView(R.id.suger_text)
|
||||
TextView sugerText;
|
||||
@BindView(R.id.fat_tag)
|
||||
TextView fatTag;
|
||||
@BindView(R.id.fat_text)
|
||||
TextView fatText;
|
||||
@BindView(R.id.protein_tag)
|
||||
TextView proteinTag;
|
||||
@BindView(R.id.protein_text)
|
||||
TextView proteinText;
|
||||
@BindView(R.id.cellulose_tag)
|
||||
TextView celluloseTag;
|
||||
@BindView(R.id.cellulose_text)
|
||||
TextView celluloseText;
|
||||
@BindView(R.id.vitamin_a_tag)
|
||||
TextView vitaminATag;
|
||||
@BindView(R.id.vitamin_a_text)
|
||||
TextView vitaminAText;
|
||||
@BindView(R.id.vitamin_b_1_tag)
|
||||
TextView vitaminB1Tag;
|
||||
@BindView(R.id.vitamin_b_1_text)
|
||||
TextView vitaminB1Text;
|
||||
@BindView(R.id.vitamin_b_2_tag)
|
||||
TextView vitaminB2Tag;
|
||||
@BindView(R.id.vitamin_b_2_text)
|
||||
TextView vitaminB2Text;
|
||||
@BindView(R.id.vitamin_b_6_tag)
|
||||
TextView vitaminB6Tag;
|
||||
@BindView(R.id.vitamin_b_6_text)
|
||||
TextView vitaminB6Text;
|
||||
@BindView(R.id.vitamin_c_tag)
|
||||
TextView vitaminCTag;
|
||||
@BindView(R.id.vitamin_c_text)
|
||||
TextView vitaminCText;
|
||||
@BindView(R.id.vitamin_e_tag)
|
||||
TextView vitaminETag;
|
||||
@BindView(R.id.vitamin_e_text)
|
||||
TextView vitaminEText;
|
||||
@BindView(R.id.carotene_tag)
|
||||
TextView caroteneTag;
|
||||
@BindView(R.id.carotene_text)
|
||||
TextView caroteneText;
|
||||
@BindView(R.id.cholesterol_tag)
|
||||
TextView cholesterolTag;
|
||||
@BindView(R.id.cholesterol_text)
|
||||
TextView cholesterolText;
|
||||
@BindView(R.id.ca_tag)
|
||||
TextView caTag;
|
||||
@BindView(R.id.ca_text)
|
||||
TextView caText;
|
||||
@BindView(R.id.na_tag)
|
||||
TextView naTag;
|
||||
@BindView(R.id.na_text)
|
||||
TextView naText;
|
||||
|
||||
private AlertDialog dialog;
|
||||
|
||||
public Builder(Context context) {
|
||||
|
||||
View view = LayoutInflater.from(context).inflate(R.layout.element_dialog, null);
|
||||
dialog = new AlertDialog.Builder(context).setView(view).create();
|
||||
dialog.getWindow().setLayout(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||
ButterKnife.bind(this, view);
|
||||
calorieText.setText(NutritionMaster.user.getEaten_elements().getCalorie() + "");
|
||||
sugerText.setText(NutritionMaster.user.getEaten_elements().getCarbohydrate() + "");
|
||||
fatText.setText(NutritionMaster.user.getEaten_elements().getFat() + "");
|
||||
proteinText.setText(NutritionMaster.user.getEaten_elements().getProtein() + "");
|
||||
celluloseText.setText(NutritionMaster.user.getEaten_elements().getCellulose() + "");
|
||||
vitaminAText.setText(NutritionMaster.user.getEaten_elements().getVitaminA() + "");
|
||||
vitaminB1Text.setText(NutritionMaster.user.getEaten_elements().getVitaminB1() + "");
|
||||
vitaminB2Text.setText(NutritionMaster.user.getEaten_elements().getVitaminB2() + "");
|
||||
vitaminB6Text.setText(NutritionMaster.user.getEaten_elements().getVitaminB6() + "");
|
||||
vitaminCText.setText(NutritionMaster.user.getEaten_elements().getVitaminC() + "");
|
||||
vitaminEText.setText(NutritionMaster.user.getEaten_elements().getVitaminE() + "");
|
||||
caroteneText.setText(NutritionMaster.user.getEaten_elements().getCarotene() + "");
|
||||
cholesterolText.setText(NutritionMaster.user.getEaten_elements().getCholesterol() + "");
|
||||
caText.setText(NutritionMaster.user.getEaten_elements().getCa() + "");
|
||||
naText.setText(NutritionMaster.user.getEaten_elements().getNa() + "");
|
||||
|
||||
}
|
||||
|
||||
public AlertDialog create() {
|
||||
return dialog;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,6 +64,7 @@ public class CustomizationActivity extends BaseActivity {
|
||||
loadData();
|
||||
String text = getIntent().getStringExtra("SEND_CODE");
|
||||
Logger.d(text);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -104,13 +104,13 @@
|
||||
|
||||
<com.nightonke.boommenu.BoomMenuButton
|
||||
android:id="@+id/boom_menu_button"
|
||||
app:bmb_normalColor="#8cbc79"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
app:bmb_buttonEnum="ham"
|
||||
app:bmb_buttonPlaceEnum="buttonPlace_ham_2"
|
||||
app:bmb_normalColor="#8cbc79"
|
||||
app:bmb_piecePlaceEnum="piecePlace_ham_2" />
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -178,6 +178,19 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ill_button"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="150dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:alpha="0.3"
|
||||
android:background="@drawable/ic_ill"
|
||||
android:orientation="vertical">
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
@@ -186,6 +199,7 @@
|
||||
android:alpha="0.2"
|
||||
android:src="@drawable/icon_black" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/add_information_button"
|
||||
android:layout_width="30dp"
|
||||
@@ -206,20 +220,6 @@
|
||||
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ill_button"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_marginRight="35dp"
|
||||
android:alpha="0.3"
|
||||
android:background="@drawable/ic_ill"
|
||||
android:orientation="vertical">
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -149,6 +149,7 @@
|
||||
android:src="@drawable/ic_infor_weight" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
@@ -329,6 +330,43 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/see_whole_elements"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/infor_layout_height"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/all_elements"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@drawable/ic_add_recipe" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginLeft="50dp"
|
||||
android:layout_toRightOf="@id/all_elements"
|
||||
android:gravity="center"
|
||||
android:text="点击查看所有元素信息" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/all_elements"
|
||||
android:layout_marginTop="15dp"
|
||||
android:alpha="0.7"
|
||||
android:background="@color/place_holder" />
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
413
app/src/main/res/layout/element_dialog.xml
Normal file
413
app/src/main/res/layout/element_dialog.xml
Normal file
@@ -0,0 +1,413 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v7.widget.CardView 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="300dp"
|
||||
android:layout_height="400dp"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:cardCornerRadius="25dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#d1efc5"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="所有已吃元素信息" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="卡里路" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/calorie_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="千卡" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/calorie_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/calorie_tag"
|
||||
tools:text="123" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="糖分" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suger_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="克" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/suger_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/suger_tag"
|
||||
tools:text="123" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="脂肪" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fat_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="克" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fat_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/fat_tag"
|
||||
tools:text="123" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="蛋白质" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/protein_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="克" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/protein_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/protein_tag"
|
||||
tools:text="123" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="纤维素" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cellulose_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="克" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cellulose_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/cellulose_tag"
|
||||
tools:text="123" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="维生素A" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/vitamin_a_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="微克" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/vitamin_a_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/vitamin_a_tag"
|
||||
tools:text="123" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="维生素B1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/vitamin_b_1_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="微克" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/vitamin_b_1_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/vitamin_b_1_tag"
|
||||
tools:text="123" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="维生素B2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/vitamin_b_2_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="微克" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/vitamin_b_2_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/vitamin_b_2_tag"
|
||||
tools:text="123" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="维生素B6" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/vitamin_b_6_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="微克" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/vitamin_b_6_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/vitamin_b_6_tag"
|
||||
tools:text="123" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="维生素C" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/vitamin_c_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="微克" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/vitamin_c_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/vitamin_c_tag"
|
||||
tools:text="123" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="维生素E" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/vitamin_e_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="毫克" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/vitamin_e_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/vitamin_e_tag"
|
||||
tools:text="123" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="胡萝卜素" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/carotene_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="微克" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/carotene_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/carotene_tag"
|
||||
tools:text="123" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="胆固醇" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cholesterol_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="毫克" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cholesterol_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/cholesterol_tag"
|
||||
tools:text="123" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="钙" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ca_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="毫克" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ca_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/ca_tag"
|
||||
tools:text="123" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="钠" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/na_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="毫克" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/na_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@id/na_tag"
|
||||
tools:text="123" />
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
Reference in New Issue
Block a user