1
This commit is contained in:
@@ -4,6 +4,7 @@ import android.app.Activity;
|
||||
import android.app.Application;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.example.ninefourone.nutritionmaster.bean.FoodMenu;
|
||||
import com.example.ninefourone.nutritionmaster.bean.MyUser;
|
||||
|
||||
import com.example.ninefourone.nutritionmaster.bean.Occupation;
|
||||
@@ -88,7 +89,6 @@ public class NutritionMaster extends Application {
|
||||
});
|
||||
initOccupations();
|
||||
initUser();
|
||||
// getAccessToken();
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
@@ -27,7 +27,6 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
unbinder = ButterKnife.bind(this);
|
||||
initViews(savedInstanceState);
|
||||
initToolBar();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -211,11 +211,11 @@ public class CardItemTouchCallBack extends ItemTouchHelper.Callback {
|
||||
*/
|
||||
@Override
|
||||
public float getSwipeEscapeVelocity(float defaultValue) {
|
||||
Log.d(TAG, "getSwipeEscapeVelocity: " + defaultValue);
|
||||
View topView = mRecyclerView.getChildAt(mRecyclerView.getChildCount() - 1);
|
||||
if (isUpOrDown(topView)) { //如果是向上或者向下滑动
|
||||
return Float.MAX_VALUE; //就返回阈值为很大
|
||||
}
|
||||
// Log.d(TAG, "getSwipeEscapeVelocity: " + defaultValue);
|
||||
// View topView = mRecyclerView.getChildAt(mRecyclerView.getChildCount() - 1);
|
||||
// if (isUpOrDown(topView)) { //如果是向上或者向下滑动
|
||||
// return Float.MAX_VALUE; //就返回阈值为很大
|
||||
// }
|
||||
return super.getSwipeEscapeVelocity(defaultValue);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +1,32 @@
|
||||
package com.example.ninefourone.nutritionmaster.modules.information;
|
||||
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.example.ninefourone.nutritionmaster.R;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
|
||||
public class InformationActivity extends AppCompatActivity {
|
||||
|
||||
@BindView(R.id.back_button)
|
||||
ImageView backButton;
|
||||
@BindView(R.id.title_text)
|
||||
TextView titleText;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_information);
|
||||
ButterKnife.bind(this);
|
||||
}
|
||||
|
||||
@OnClick(R.id.back_button)
|
||||
public void onViewClicked() {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,13 +6,19 @@ import android.widget.TextView;
|
||||
|
||||
import com.example.ninefourone.nutritionmaster.R;
|
||||
import com.example.ninefourone.nutritionmaster.base.BaseActivity;
|
||||
import com.example.ninefourone.nutritionmaster.bean.FoodMenu;
|
||||
import com.orhanobut.logger.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
public class CustomizationActivity extends BaseActivity {
|
||||
|
||||
private ArrayList<FoodMenu> breakfastList = new ArrayList<>();
|
||||
private ArrayList<FoodMenu> lunchList = new ArrayList<>();
|
||||
private ArrayList<FoodMenu> dinnerList = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -27,6 +33,7 @@ public class CustomizationActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void initViews(Bundle savedInstanceState) {
|
||||
loadData();
|
||||
String text = getIntent().getStringExtra("SEND_CODE");
|
||||
Logger.d(text);
|
||||
}
|
||||
@@ -40,4 +47,10 @@ public class CustomizationActivity extends BaseActivity {
|
||||
public void onPointerCaptureChanged(boolean hasCapture) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadData() {
|
||||
super.loadData();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,13 +91,11 @@ public class RecommendFragment extends BaseFragment {
|
||||
adapter.getData().add(recommendFood);
|
||||
}
|
||||
adapter.loadMoreComplete();
|
||||
// Logger.d("开始加载");
|
||||
}
|
||||
|
||||
}, 1000);
|
||||
}
|
||||
}, recyclerView);
|
||||
// adapter.disableLoadMoreIfNotFullPage();
|
||||
adapter.setEnableLoadMore(true);
|
||||
adapter.setHeaderView(LayoutInflater.from(getContext()).
|
||||
inflate(R.layout.recommend_head, (ViewGroup) recyclerView.getParent(), false));
|
||||
|
||||
@@ -39,7 +39,7 @@ public class WebUtil {
|
||||
private static WebUtil instance = new WebUtil();
|
||||
private OkHttpClient mClient = new OkHttpClient();
|
||||
|
||||
private WebUtil() {
|
||||
public WebUtil() {
|
||||
}
|
||||
|
||||
public static WebUtil getInstance() {
|
||||
|
||||
6
app/src/main/res/drawable/ic_calorie.xml
Normal file
6
app/src/main/res/drawable/ic_calorie.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<vector android:height="24dp" android:viewportHeight="1024.0"
|
||||
android:viewportWidth="1024.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#8b37c1" android:pathData="M504.3,998.4h-11.8c-150.5,0 -258,-43 -319.5,-128 -41.5,-57.3 -61.4,-132.6 -61.4,-230.4 0,-160.3 112.1,-411.1 427.5,-588.8l45.1,-25.6 -23,46.6c-28.2,56.8 -8.7,142.8 10.8,180.7C614.4,224.3 655.4,204.8 675.8,195.1c5.1,-2.6 9.2,-4.1 11.8,-5.6l58.9,-31.2 -37.9,54.8c-47.1,68.1 -43.5,154.1 -37.4,192 101.9,-49.7 185.9,-52.2 189.4,-52.2l60.9,-1.5 -52.2,31.2c-5.6,3.1 -125.4,79.4 -63,289.8 33.3,102.4 -22.5,214 -75.3,255 -42.5,34.8 -102.9,71.2 -226.8,71.2zM518.7,100.4C242.7,269.3 143.4,494.1 143.4,640c0,91.1 17.9,160.3 55.3,211.5 55.3,75.8 154.1,114.7 293.9,114.7 121.9,2 178.7,-31.2 218.1,-64 44.5,-34.8 93.2,-133.1 65,-220.7 -46.1,-154.6 -1.5,-245.2 36.9,-290.3 -36.4,7.2 -88.6,21.5 -144.9,51.7l-12.3,6.7 -8.2,-11.3c-6.7,-9.2 -27.6,-107 10.2,-197.6 -23,11.8 -51.7,28.2 -80.4,49.2l-12.3,9.2 -9.7,-11.8c-24.1,-30.7 -49.7,-115.7 -36.4,-186.9z"/>
|
||||
<path android:fillColor="#B83EFF" android:pathData="M702,841.7c-24.1,40.4 -139.8,90.6 -237.6,88.6 -108.5,9.2 -195.6,-40.4 -222.2,-92.7 -74.2,-144.9 32.8,-239.1 26.6,-228.4 -5.6,10.8 -7.2,133.1 111.6,181.2C307.2,702 415.2,517.1 510.5,477.7c-48.6,179.2 87,263.7 87,263.7s27.6,18.9 66.6,-171c74.8,91.1 77.8,230.4 37.9,271.4z"/>
|
||||
<path android:fillColor="#3c3043" android:pathData="M438.3,947.2c-103.9,0 -182.8,-49.2 -209.9,-102.4 -67.6,-132.6 5.6,-229.4 29.2,-247.8 11.8,-9.2 21,-2.6 22.5,-1l10.2,8.7 -6.1,11.3c-2.6,12.3 -1,87 60.9,135.7 -5.6,-25.1 -5.1,-54.3 3.1,-86 21.5,-86 90.6,-175.1 157.7,-202.8l30.2,-12.3 -8.7,31.2c-38.9,143.4 48.1,222.2 73.2,241.2 7.2,-9.2 25.6,-43 49.2,-156.2l6.7,-33.3 21.5,26.6c76.3,94.7 84.5,240.1 37.4,291.3 -28.7,44.5 -146.9,97.3 -249.9,95.2 -9.2,0.5 -18.4,0.5 -27.1,0.5zM253.4,653.8c-19.5,34.8 -37.9,96.3 3.1,176.6 24.1,47.1 104.4,92.2 206.8,84h2c95.7,2 203.8,-47.6 223.2,-80.9l2.6,-3.1c30.2,-30.7 30.2,-137.7 -17.9,-220.2 -27.1,118.8 -49.2,140.8 -63.5,146.4 -7.2,3.1 -14.8,2 -20.5,-1.5 -0.5,-0.5 -126.5,-80.9 -100.9,-245.8 -47.6,34.3 -93.7,100.9 -109.6,164.4 -7.7,31.2 -11.8,75.3 14.3,107l39.9,48.6 -58.4,-23.6c-68.6,-27.6 -99.3,-78.3 -112.1,-115.7 -4.1,-12.3 -7.2,-24.6 -9.2,-36.4zM606.2,727.6c0.5,0 0.5,0.5 0.5,0.5 0,-0.5 -0.5,-0.5 -0.5,-0.5zM283.6,616.4c-0.5,0.5 0,0.5 0,0zM284.2,615.4z"/>
|
||||
</vector>
|
||||
@@ -1,6 +1,6 @@
|
||||
<vector android:height="24dp" android:viewportHeight="1024.0"
|
||||
android:viewportWidth="1024.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#f0311e" android:pathData="M896,64h-576v64h576v640h64V64z"/>
|
||||
<path android:fillColor="#f0311e" android:pathData="M512,384h192v64h-192zM256,576h448v64h-448zM256,768h448v64h-448z"/>
|
||||
<path android:fillColor="#f0311e" android:pathData="M320,192l-192,192v576h704L832,192h-512zM320,281.6L320,384h-102.4l102.4,-102.4zM768,896h-576v-448h192v-192h384v640z"/>
|
||||
<path android:fillColor="#363534" android:pathData="M896,64h-576v64h576v640h64V64z"/>
|
||||
<path android:fillColor="#363534" android:pathData="M512,384h192v64h-192zM256,576h448v64h-448zM256,768h448v64h-448z"/>
|
||||
<path android:fillColor="#363534" android:pathData="M320,192l-192,192v576h704L832,192h-512zM320,281.6L320,384h-102.4l102.4,-102.4zM768,896h-576v-448h192v-192h384v640z"/>
|
||||
</vector>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<vector android:height="24dp" android:viewportHeight="1024.0"
|
||||
android:viewportWidth="1024.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#f0311e" android:pathData="M574.6,807.8H381.2c-68.3,0 -125.2,-56.9 -125.2,-125.2V193.4c0,-34.1 -28.4,-62.6 -62.6,-62.6 -34.1,0 -62.6,28.4 -62.6,62.6v534.8c0,119.5 96.7,210.5 210.5,210.5h233.2c34.1,0 62.6,-28.4 62.6,-62.6s-28.4,-68.3 -62.6,-68.3z"/>
|
||||
<path android:fillColor="#f0311e" android:pathData="M682.7,85.3H449.4c-34.1,0 -68.3,28.4 -68.3,62.6s28.4,62.6 62.6,62.6h193.4c68.3,0 125.2,56.9 125.2,125.2v489.2c0,34.1 28.4,62.6 62.6,62.6 34.1,0 62.6,-28.4 62.6,-62.6V295.8c5.7,-113.8 -85.3,-210.5 -204.8,-210.5z"/>
|
||||
<path android:fillColor="#f0311e" android:pathData="M1001.2,659.9c-28.4,-28.4 -68.3,-28.4 -91,0l-125.2,125.2c-28.4,28.4 -28.4,68.3 0,91 28.4,28.4 68.3,28.4 91,0l125.2,-125.2c28.4,-22.8 28.4,-68.3 0,-91z"/>
|
||||
<path android:fillColor="#f0311e" android:pathData="M233.2,147.9c-22.8,-28.4 -62.6,-28.4 -91,0L17.1,273.1c-28.4,28.4 -28.4,68.3 0,91 28.4,28.4 68.3,28.4 91,0l125.2,-125.2c28.4,-22.8 28.4,-68.3 0,-91z"/>
|
||||
<path android:fillColor="#363534" android:pathData="M574.6,807.8H381.2c-68.3,0 -125.2,-56.9 -125.2,-125.2V193.4c0,-34.1 -28.4,-62.6 -62.6,-62.6 -34.1,0 -62.6,28.4 -62.6,62.6v534.8c0,119.5 96.7,210.5 210.5,210.5h233.2c34.1,0 62.6,-28.4 62.6,-62.6s-28.4,-68.3 -62.6,-68.3z"/>
|
||||
<path android:fillColor="#363534" android:pathData="M682.7,85.3H449.4c-34.1,0 -68.3,28.4 -68.3,62.6s28.4,62.6 62.6,62.6h193.4c68.3,0 125.2,56.9 125.2,125.2v489.2c0,34.1 28.4,62.6 62.6,62.6 34.1,0 62.6,-28.4 62.6,-62.6V295.8c5.7,-113.8 -85.3,-210.5 -204.8,-210.5z"/>
|
||||
<path android:fillColor="#363534" android:pathData="M1001.2,659.9c-28.4,-28.4 -68.3,-28.4 -91,0l-125.2,125.2c-28.4,28.4 -28.4,68.3 0,91 28.4,28.4 68.3,28.4 91,0l125.2,-125.2c28.4,-22.8 28.4,-68.3 0,-91z"/>
|
||||
<path android:fillColor="#363534" android:pathData="M233.2,147.9c-22.8,-28.4 -62.6,-28.4 -91,0L17.1,273.1c-28.4,28.4 -28.4,68.3 0,91 28.4,28.4 68.3,28.4 91,0l125.2,-125.2c28.4,-22.8 28.4,-68.3 0,-91z"/>
|
||||
</vector>
|
||||
|
||||
6
app/src/main/res/drawable/ic_fat.xml
Normal file
6
app/src/main/res/drawable/ic_fat.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<vector android:height="24dp" android:viewportHeight="1024.0"
|
||||
android:viewportWidth="1024.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#DCFFFF" android:pathData="M512,512m-512,0a512,512 0,1 0,1024 0,512 512,0 1,0 -1024,0Z"/>
|
||||
<path android:fillColor="#2EDEDC" android:pathData="M331.4,757.8c-11.2,0 -22.3,-1.9 -33.5,-5.6 -24.2,-7.4 -44.7,-26.1 -57.7,-54 -20.5,-42.8 -22.3,-85.6 -3.7,-128.5 5.6,-11.2 13,-26.1 22.3,-41 22.3,-41 55.9,-95 41,-124.7 -5.6,-11.2 -14.9,-20.5 -24.2,-29.8 -16.8,-16.8 -35.4,-48.4 -31.7,-67 1.9,-11.2 7.4,-13 11.2,-16.8 3.7,-3.7 7.4,-7.4 16.8,-9.3 7.4,-1.9 26.1,0 26.1,0 63.3,7.4 122.9,31.7 169.4,68.9 48.4,39.1 83.8,91.2 98.7,152.7 16.8,59.6 1.9,115.4 -42.8,162 -35.4,37.2 -87.5,67 -147.1,83.8 -14.9,5.6 -31.7,9.3 -44.7,9.3zM714.9,763.3c-14.9,0 -31.7,-3.7 -48.4,-13 -20.5,-11.2 -37.2,-27.9 -50.3,-46.5 -14.9,-20.5 -20.5,-42.8 -18.6,-61.4 3.7,-27.9 16.8,-54 27.9,-78.2 13,-27.9 26.1,-54 26.1,-81.9 0,0 5.6,-16.8 11.2,-18.6 5.6,-3.7 16.8,9.3 16.8,9.3 9.3,14.9 24.2,33.5 41,50.3 39.1,46.5 83.8,98.7 78.2,150.8 -1.9,26.1 -16.8,52.1 -44.7,72.6 -9.3,13 -24.2,16.8 -39.1,16.8z"/>
|
||||
<path android:fillColor="#DCFFFF" android:pathData="M443.1,670.3l-14.9,-24.2 3.7,-3.7c33.5,-37.2 55.9,-67 46.5,-111.7l22.3,-9.3c7.4,29.8 3.7,59.6 -9.3,87.5 -11.2,22.3 -27.9,41 -42.8,57.7 -3.7,1.9 -5.6,1.9 -5.6,3.7z"/>
|
||||
</vector>
|
||||
5
app/src/main/res/drawable/ic_protein.xml
Normal file
5
app/src/main/res/drawable/ic_protein.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:viewportHeight="1024.0"
|
||||
android:viewportWidth="1024.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#DCFFFF" android:pathData="M512,512m-512,0a512,512 0,1 0,1024 0,512 512,0 1,0 -1024,0Z"/>
|
||||
<path android:fillColor="#2EDEDC" android:pathData="M679.6,376.1s9.3,5.6 16.8,20.5c9.3,14.9 18.6,39.1 20.5,81.9 0,5.6 3.7,9.3 9.3,11.2h3.7c5.6,0 11.2,-5.6 11.2,-11.2 -3.7,-95 -50.3,-121 -50.3,-122.9 0,0 -1.9,0 -1.9,-1.9 -5.6,-1.9 -11.2,1.9 -14.9,7.4 0,7.4 1.9,13 5.6,14.9zM620,538.1c-5.6,-70.7 -37.2,-145.2 -83.8,-195.5 42.8,-35.4 91.2,-52.1 137.8,-39.1 91.2,27.9 130.3,176.9 96.8,292.3 -33.5,115.4 -128.5,163.8 -219.7,137.8 -3.7,0 -3.7,-1.9 -7.4,-3.7 52.1,-37.2 85.6,-104.3 76.3,-191.8zM426.4,363.1s9.3,3.7 24.2,13c13,9.3 31.7,29.8 48.4,68.9 1.9,3.7 7.4,7.4 11.2,7.4 1.9,0 3.7,0 3.7,-1.9 5.6,-3.7 9.3,-9.3 5.6,-16.8 -37.2,-87.5 -89.4,-95 -89.4,-95h-1.9c-5.6,0 -9.3,5.6 -9.3,13 -1.9,5.6 3.7,11.2 7.4,11.2zM394.7,297.9c95,-9.3 184.3,117.3 193.6,238.3s-61.4,199.2 -156.4,208.5c-95,9.3 -178.7,-57.7 -189.9,-176.9 -7.4,-122.9 57.7,-262.5 152.7,-270z"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_sugar.xml
Normal file
10
app/src/main/res/drawable/ic_sugar.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector android:height="24dp" android:viewportHeight="1024.0"
|
||||
android:viewportWidth="1024.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF694B" android:pathData="M894.9,375.3c-12.9,-40.1 77.6,-66.8 38.8,-109.3 -46.7,-51.2 -105.7,10.5 -108.9,-20.6s-33,-97 -77.4,-50.4c-48.3,50.7 -41.1,108.5 -41.1,108.5l5.9,12.9c-72.8,-47 -192.4,-41.8 -300.9,20.8 -108.6,62.7 -173,164 -168.4,250.6l-4.8,-7.6s-44.6,-37.5 -113.4,-24.6c-63.3,11.8 -24.3,72.7 0.1,92.3s-59.5,35.5 -42,102.5c14.5,55.7 86.1,-5.6 112.7,27 19.9,24.4 -5.8,74.4 37.8,66.8 71.4,-12.5 98.5,-116 98.5,-116l-12.6,-19.9c73.5,40.3 187.3,32.7 290.8,-27.1 97,-56 158.7,-142.8 167.6,-222.5l1.8,3.9s101.5,33.6 151,-19.4c30.1,-32.2 -25.8,-37.9 -35.5,-67.9z"/>
|
||||
<path android:fillColor="#E5391C" android:pathData="M707.8,285.3l-6.4,52.4s39.5,50.5 37.8,87.7c-3.5,76 -63.9,146.7 -153.7,198.6 -97.5,56.3 -205.2,71.3 -272.1,26.8 -23.1,-15.4 -59.1,-73.7 -57.4,-73.7l-25.8,-4.2 -14.8,-6.2c-7.1,167.2 93.2,187.6 99.9,187.3l6.6,-44c73.5,38.8 186,30.8 288.4,-28.3 99.9,-57.7 161,-136.7 166.9,-218.2 0,0 22.9,5 30.6,6.4 7.1,1.3 16,2.1 16,2.1 9.3,-150.3 -109.3,-186.7 -116,-186.7z"/>
|
||||
<path android:fillColor="#FFFFFF" android:pathData="M845.5,281.7c3,28.6 52.9,-20.8 97.2,10.5 1.5,-8.2 -0.5,-16.8 -9.1,-26.2 -34.1,-37.3 -74.6,-14.7 -95.3,-11.8 4,9.9 6.4,19.8 7.2,27.5zM726.9,338.2c-0.7,-8.5 -2.9,-60.4 41.3,-106.8 21.2,-22.2 39,-18.8 52.2,-5.8 -10.3,-31.8 -36.8,-68.6 -73,-30.5 -48.3,50.7 -41.1,108.5 -41.1,108.5l19.7,43 0.9,-8.4zM254.5,606.1l-15.7,-27.3s-45.2,-36 -114,-23.1c-43.9,8.2 -38.5,40 -23,65.3 3.3,-10.7 13,-19.3 33,-23 68.8,-12.8 113.4,24.6 113.4,24.6l3,4.8 3.3,-21.3zM91.1,766.7c6.5,-45.5 64.5,-59.6 43.7,-76.4 -5.5,-4.5 -11.7,-11.1 -17.4,-18.7 -17.1,15.3 -45.5,37.2 -34.6,78.9 1.8,7.3 4.7,12.5 8.3,16.2z"/>
|
||||
<path android:fillColor="#FFE200" android:pathData="M336.1,389.3c-1.5,6 21,337.5 21,337.5s108,12 111,6 -18,-418.5 -18,-418.5 -112.5,69 -114,75z"/>
|
||||
<path android:fillColor="#FFFFFF" android:pathData="M759.8,365.1c-54.9,-95 -210.9,-107.7 -348.5,-28.2 -127.8,73.8 -194.5,200.9 -159.5,294.8 -2.1,-85.6 61.9,-184.4 168.6,-246C558,306.3 714,318.9 768.8,414c3.9,6.8 7.1,13.9 9.7,21.1 -0.5,-24.9 -6.4,-48.6 -18.7,-70z"/>
|
||||
<path android:fillColor="#FFE200" android:pathData="M556.6,293.3c-1.5,6 25.5,406.5 25.5,406.5s99,-63 102,-69 -21,-336 -21,-336 -105,-7.5 -106.5,-1.5z"/>
|
||||
<path android:fillColor="#662F0A" android:pathData="M930.4,388c-8,-5.9 -16.3,-12 -18.3,-18.2 -2.3,-7 6.7,-16.9 19.5,-30.1 18.1,-18.6 48.3,-49.7 15.4,-85.8 -34.9,-38.2 -76.7,-26.6 -99.2,-20.3 -2,0.6 -4.2,1.2 -6.4,1.7 -4.7,-23.5 -20.1,-62 -49.6,-72.1 -13.5,-4.5 -34.3,-4.9 -57.5,19.4 -34.8,36.5 -43.9,76.4 -45.9,100.6 -78.2,-31.3 -186.6,-20.5 -284.7,36.2 -8.6,5 -11.5,16 -6.6,24.6 5,8.6 16,11.6 24.6,6.6 2.3,-1.3 4.6,-2.4 6.8,-3.6l20.6,369c-26.7,1.9 -52.1,0.2 -75.1,-5.4L356.6,398c3.7,-3.3 7.4,-6.7 11.3,-9.9 7.7,-6.4 8.7,-17.7 2.4,-25.3 -6.4,-7.7 -17.7,-8.7 -25.3,-2.4 -109,90.4 -148.6,215.3 -96.4,303.8 15.5,26.3 38.2,46.6 65.4,61.2 -3.5,11.9 -28.8,91.6 -83.8,101.3 -3.2,0.5 -5.1,0.5 -5.6,0.8 -1,-3 -1.5,-10.3 -1.7,-15.3 -0.8,-14.2 -1.8,-31.8 -13.3,-45.9 -18.7,-22.9 -47.6,-17.3 -70.9,-12.6 -33.1,6.6 -35.5,3.7 -38.4,-7.6 -6.9,-26.6 6.4,-40.9 26,-58.2 11,-9.7 21.4,-18.9 21.1,-32.9 -0.1,-5.6 -2.2,-13.7 -11.2,-21 -14.9,-12 -30.4,-37.3 -27.3,-49.6 1.6,-6.5 11.4,-9.6 19.2,-11.1 16.6,-3.1 33.2,-3.2 49.2,-0.2 9.8,1.8 19.2,-4.6 21,-14.4s-4.6,-19.2 -14.4,-21c-20.5,-3.8 -41.5,-3.8 -62.4,0.2 -33,6.1 -44.1,23.9 -47.5,37.6 -7.6,30.2 16.2,64.1 33.4,80.8 -1.6,1.5 -3.4,3.1 -4.9,4.4 -17.5,15.4 -50,44.2 -37,94.2 12.3,47.2 54.8,38.9 80.3,33.8 18.1,-3.6 31.3,-5.6 35.9,0 4.1,5.1 4.7,15.3 5.3,25.2 0.8,14.6 1.8,31.1 15,41.5 6.3,5 13.9,7.4 23.3,7.4 3.5,0 7.3,-0.4 11.3,-1.1 71,-12.5 102.8,-96.9 110.8,-122.1 25.2,8.3 53.2,12.5 82.6,12.5 61.3,0 129,-18.2 192.4,-55.6 40,-23.6 74.7,-52.5 103.2,-85.8 6.4,-7.5 5.6,-18.9 -2,-25.4 -7.5,-6.4 -18.9,-5.6 -25.4,2 -0.1,0.1 -0.1,0.2 -0.2,0.2l-14.9,-268.3c25.5,11.9 46.5,29.4 60.2,52.7 25.3,42.9 23.5,98.1 -5,155.4 -4.4,8.9 -0.8,19.7 8.1,24.1 2.6,1.3 5.3,1.9 8,1.9 6.6,0 13,-3.7 16.1,-10 33.6,-67.6 35,-136.7 3.7,-189.7 -12.5,-21.1 -29.6,-38.3 -50,-52 0,-0.2 0.1,-0.4 0.1,-0.6 -0.2,-2 -5.1,-50.5 36.3,-94 5.5,-5.8 13.4,-12.2 19.8,-10.1 12,4.1 24.7,30.9 26.7,49.9 1.2,11.5 6.9,17.6 11.5,20.8 11.6,7.9 25,4.2 39.1,0.3 25.2,-7 44.5,-10.4 63,9.9 7.8,8.6 9,12.1 -14.6,36.4 -16.5,17 -37.1,38.1 -28,66.3 5.6,17.3 19.8,27.8 31.3,36.2 4.5,3.3 11.2,8.2 12.2,8.5 0,0 -0.5,1.9 -4.1,5.6 -20.8,22.3 -55.1,25.3 -79.9,23.9 -9.4,-0.7 -18.4,7 -19,17 -0.6,9.9 7,18.4 17,19 4.2,0.2 8.3,0.4 12.3,0.4 41.1,0 74.1,-12.2 95.9,-35.7 10.1,-10.9 14.5,-21.5 13.5,-32.5 -1.9,-16.5 -15.2,-26.3 -26.9,-34.9zM279.5,645.8c-34.6,-58.7 -16,-141.8 43,-212.6l14.6,264.3c-24.2,-11.9 -44.2,-29.1 -57.6,-51.7zM463.7,329.7c25.3,-10.8 50.7,-18.6 75.6,-23.2l21.1,381.3c-25.3,11 -50.7,18.9 -75.5,23.6l-21.2,-381.7zM663.6,622.2c-18.1,16.1 -38,30.8 -59.7,43.7 -2.8,1.6 -5.6,3 -8.3,4.5l-20.4,-368.2c25.1,-1.6 49.1,0 71,5l17.4,315z"/>
|
||||
</vector>
|
||||
@@ -12,6 +12,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="11"
|
||||
android:background="#eae8e8"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
@@ -22,6 +23,7 @@
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="#08d966"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
@@ -29,8 +31,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textSize="17sp"
|
||||
tools:text="早餐" />
|
||||
android:text="早餐"
|
||||
android:textColor="#fff"
|
||||
android:textSize="17sp" />
|
||||
|
||||
|
||||
<TextView
|
||||
@@ -48,22 +51,25 @@
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/breakfast_recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#eae8e8">
|
||||
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="#08d966"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textSize="17sp"
|
||||
tools:text="午餐" />
|
||||
android:text="午餐"
|
||||
android:textColor="#fff"
|
||||
android:textSize="17sp" />
|
||||
|
||||
|
||||
<TextView
|
||||
@@ -81,22 +87,25 @@
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/lunch_recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#eae8e8">
|
||||
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="#08d966"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textSize="17sp"
|
||||
tools:text="晚餐" />
|
||||
android:text="晚餐"
|
||||
android:textColor="#fff"
|
||||
android:textSize="17sp" />
|
||||
|
||||
|
||||
<TextView
|
||||
@@ -114,11 +123,123 @@
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/dinner_recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#eae8e8">
|
||||
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="300dp"
|
||||
android:padding="15dp"
|
||||
app:cardCornerRadius="20dp">
|
||||
|
||||
<LinearLayout
|
||||
android:background="#eae8e8"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@drawable/ic_calorie" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="卡路里:500千卡" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@drawable/ic_fat" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="脂肪:500克" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@drawable/ic_sugar" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="糖分:500克" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@drawable/ic_protein" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="蛋白质:500克" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<LinearLayout
|
||||
@@ -152,7 +273,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="换一批"
|
||||
android:textColor="#f0311e"
|
||||
android:textColor="#363534"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -174,8 +295,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="根据已吃卡路里刷新"
|
||||
android:textColor="#f0311e"
|
||||
android:text="复制到饮食记录"
|
||||
android:textColor="#363534"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -1,69 +1,76 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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="match_parent"
|
||||
android:layout_height="60dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/customization_item_image"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:scaleType="centerCrop"
|
||||
tools:src="@drawable/food_test" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_toRightOf="@id/customization_item_image"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/food_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp"
|
||||
tools:text="馒头" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/food_quantity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#504e4e"
|
||||
android:textSize="11sp"
|
||||
tools:text="1个(大)" />
|
||||
</LinearLayout>
|
||||
|
||||
android:layout_height="70dp"
|
||||
android:layout_margin="5dp"
|
||||
app:cardCornerRadius="15dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center_vertical">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/arch"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@drawable/ic_right_arch" />
|
||||
android:id="@+id/customization_item_image"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:scaleType="centerCrop"
|
||||
tools:src="@drawable/food_test" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/food_energy"
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_toLeftOf="@id/arch"
|
||||
android:textSize="11sp"
|
||||
tools:text="365千卡" />
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_toRightOf="@id/customization_item_image"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/food_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#000000"
|
||||
android:textSize="14sp"
|
||||
tools:text="馒头" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/food_quantity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#504e4e"
|
||||
android:textSize="11sp"
|
||||
tools:text="1个(大)" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/arch"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@drawable/ic_right_arch" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/food_energy"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_toLeftOf="@id/arch"
|
||||
android:textSize="11sp"
|
||||
tools:text="365千卡" />
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
@@ -10,7 +10,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#40b985"
|
||||
android:background="#fff"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="15dp"
|
||||
android:textColor="#fff"
|
||||
android:textColor="#535252"
|
||||
tools:text="麻婆豆腐" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="0"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -2,12 +2,14 @@
|
||||
<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="160dp"
|
||||
android:layout_width="165dp"
|
||||
android:layout_height="@dimen/recommend_item_default_hight"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="@dimen/recommend_margin"
|
||||
android:layout_weight="1"
|
||||
app:cardElevation="0dp"
|
||||
app:cardCornerRadius="20dp">
|
||||
app:cardCornerRadius="20dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/whole_layout"
|
||||
android:layout_width="match_parent"
|
||||
@@ -25,7 +27,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="0"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@@ -42,5 +44,4 @@
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
@@ -2,12 +2,6 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/id_action_exchange"
|
||||
android:icon="@drawable/ic_exchange"
|
||||
android:title="切换"
|
||||
app:showAsAction="always"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/id_action_record"
|
||||
android:icon="@drawable/ic_record"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<dimen name="icon_size">20dp</dimen>
|
||||
|
||||
<dimen name="recommend_item_default_hight">100dp</dimen>
|
||||
<dimen name="recommend_item_big_height">180dp</dimen>
|
||||
<dimen name="recommend_item_big_height">150dp</dimen>
|
||||
<dimen name="recommend_margin">5dp</dimen>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user