diff --git a/README.md b/README.md index d8c44ce..96840fe 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ + ## 营养大师 一款基于数据分析的智能饮食推荐APP diff --git a/app/src/main/java/com/example/ninefourone/nutritionmaster/modules/addinformation/AddActivity.java b/app/src/main/java/com/example/ninefourone/nutritionmaster/modules/addinformation/AddActivity.java index fe74afe..7dbae5c 100644 --- a/app/src/main/java/com/example/ninefourone/nutritionmaster/modules/addinformation/AddActivity.java +++ b/app/src/main/java/com/example/ninefourone/nutritionmaster/modules/addinformation/AddActivity.java @@ -3,6 +3,7 @@ package com.example.ninefourone.nutritionmaster.modules.addinformation; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; +import android.support.v7.widget.CardView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -13,15 +14,11 @@ import android.widget.Button; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; -import android.widget.Toast; import com.example.ninefourone.nutritionmaster.R; import com.example.ninefourone.nutritionmaster.utils.ConstantUtils; import com.example.ninefourone.nutritionmaster.utils.MessageUtils; import com.github.czy1121.view.TurnCardListView; -import com.orhanobut.logger.Logger; - -import java.util.ArrayList; import butterknife.BindView; import butterknife.ButterKnife; @@ -35,6 +32,8 @@ public class AddActivity extends AppCompatActivity { RelativeLayout bottomContent; @BindView(R.id.back_button) ImageView backButton; + @BindView(R.id.result_layout) + CardView resultLayout; // private int[] colors = {0xff3F51B5, 0xff673AB7, 0xff006064, 0xffC51162, 0xffFFEB3B, 0xff795548, 0xff9E9E9E}; @@ -117,7 +116,7 @@ public class AddActivity extends AppCompatActivity { firstButtons[position].setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - MessageUtils.MakeToast("结果"); + resultLayout.setVisibility(View.VISIBLE); } }); } diff --git a/app/src/main/res/drawable/result_bg.png b/app/src/main/res/drawable/result_bg.png new file mode 100644 index 0000000..cbea2ba Binary files /dev/null and b/app/src/main/res/drawable/result_bg.png differ diff --git a/app/src/main/res/layout/activity_add.xml b/app/src/main/res/layout/activity_add.xml index 9c3538f..ab0a652 100644 --- a/app/src/main/res/layout/activity_add.xml +++ b/app/src/main/res/layout/activity_add.xml @@ -5,7 +5,7 @@ android:id="@+id/bottom_content" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="#e2eced" + android:background="#b0ce93" tools:context="com.example.ninefourone.nutritionmaster.modules.addinformation.AddActivity"> @@ -25,15 +25,183 @@ android:src="@drawable/ic_back_button" /> + android:background="@drawable/result_bg" + android:orientation="vertical"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +