menu
This commit is contained in:
@@ -47,7 +47,9 @@
|
||||
android:exported="true" />
|
||||
|
||||
<activity android:name=".modules.addinformation.AddActivity" />
|
||||
<activity android:name=".modules.viewpagerfragments.customization.CustomizationActivity"></activity>
|
||||
<activity android:name=".modules.viewpagerfragments.customization.CustomizationActivity" />
|
||||
<activity android:name=".modules.information.InformationActivity" />
|
||||
<activity android:name=".modules.RecipeActivity.RecipeActivity"></activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -39,7 +39,7 @@ public class CardAdapter extends RecyclerView.Adapter<CardHolder> {
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
@Override
|
||||
public void onBindViewHolder(CardHolder holder, int position) {
|
||||
holder.bindView(mList.get(position).getPictureId(), mList.get(position).getTitle(), context);
|
||||
holder.bindView(mList.get(position).getPictureId(), mList.get(position).getTitle(), position, context);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,6 +11,7 @@ import android.widget.TextView;
|
||||
|
||||
import com.example.ninefourone.nutritionmaster.R;
|
||||
import com.example.ninefourone.nutritionmaster.modules.viewpagerfragments.customization.CustomizationActivity;
|
||||
import com.orhanobut.logger.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -30,7 +31,7 @@ public class CardHolder extends RecyclerView.ViewHolder {
|
||||
TextView tvSign;
|
||||
|
||||
private View itemView;
|
||||
|
||||
private Intent i;
|
||||
|
||||
public CardHolder(View itemView) {
|
||||
super(itemView);
|
||||
@@ -39,14 +40,15 @@ public class CardHolder extends RecyclerView.ViewHolder {
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
public void bindView(int picId, String text, final Context context) {
|
||||
public void bindView(int picId, String text, int index, final Context context) {
|
||||
tvName.setText(text);
|
||||
ivPhoto.setImageDrawable(context.getDrawable(picId));
|
||||
i = new Intent(context, CustomizationActivity.class);
|
||||
i.putExtra("SEND_CODE", text);
|
||||
// Logger.d(text);
|
||||
itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent i = new Intent(context, CustomizationActivity.class);
|
||||
i.putExtra("SEND_CODE", getAdapterPosition());
|
||||
context.startActivity(i);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package com.example.ninefourone.nutritionmaster.adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.view.View;
|
||||
|
||||
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.example.ninefourone.nutritionmaster.R;
|
||||
import com.example.ninefourone.nutritionmaster.bean.RecommendFood;
|
||||
import com.example.ninefourone.nutritionmaster.modules.RecipeActivity.RecipeActivity;
|
||||
import com.orhanobut.logger.Logger;
|
||||
|
||||
import java.util.List;
|
||||
@@ -16,6 +19,7 @@ import java.util.List;
|
||||
|
||||
public class RecommendAdapter extends BaseMultiItemQuickAdapter<RecommendFood, BaseViewHolder> {
|
||||
private int[] indexs = new int[]{0, 1, 1, 2};
|
||||
private Intent intent;
|
||||
|
||||
/**
|
||||
* Same as QuickAdapter#QuickAdapter(Context,int) but with
|
||||
@@ -47,6 +51,16 @@ public class RecommendAdapter extends BaseMultiItemQuickAdapter<RecommendFood, B
|
||||
helper.setText(R.id.recommend_item_title, "红烧");
|
||||
break;
|
||||
}
|
||||
View view = helper.getView(R.id.whole_layout);
|
||||
intent = new Intent(mContext, RecipeActivity.class);
|
||||
// Logger.d(item.getItemType());
|
||||
intent.putExtra("SEND_OBJECT", item);
|
||||
view.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mContext.startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -56,20 +70,16 @@ public class RecommendAdapter extends BaseMultiItemQuickAdapter<RecommendFood, B
|
||||
RecommendFood recommendFood = new RecommendFood(1, "烧肉", "好吃", indexs[i % 4]);
|
||||
getData().add(recommendFood);
|
||||
}
|
||||
// notifyDataSetChanged();
|
||||
// Logger.d("加载成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadMoreEnd() {
|
||||
super.loadMoreEnd();
|
||||
// Logger.d("数据没了");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadMoreFail() {
|
||||
super.loadMoreFail();
|
||||
// Logger.d("加载失败");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.example.ninefourone.nutritionmaster.bean;
|
||||
|
||||
/**
|
||||
* Created by ScorpioMiku on 2018/9/9.
|
||||
*/
|
||||
|
||||
public class Menu {
|
||||
private String menuName;
|
||||
|
||||
}
|
||||
@@ -3,11 +3,13 @@ package com.example.ninefourone.nutritionmaster.bean;
|
||||
import com.chad.library.adapter.base.entity.MultiItemEntity;
|
||||
import com.orhanobut.logger.Logger;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Created by ScorpioMiku on 2018/9/3.
|
||||
*/
|
||||
|
||||
public class RecommendFood implements MultiItemEntity {
|
||||
public class RecommendFood implements MultiItemEntity, Serializable {
|
||||
|
||||
//三种view
|
||||
public static final int TYPE_BIG = 0;
|
||||
@@ -18,6 +20,15 @@ public class RecommendFood implements MultiItemEntity {
|
||||
private String title;
|
||||
private String description;
|
||||
private int type;
|
||||
private Menu menu;
|
||||
|
||||
public Menu getMenu() {
|
||||
return menu;
|
||||
}
|
||||
|
||||
public void setMenu(Menu menu) {
|
||||
this.menu = menu;
|
||||
}
|
||||
|
||||
public RecommendFood(int picture, String title, String description, int type) {
|
||||
this.picture = picture;
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.example.ninefourone.nutritionmaster.adapter.HomePagerAdapter;
|
||||
import com.example.ninefourone.nutritionmaster.base.BaseActivity;
|
||||
import com.example.ninefourone.nutritionmaster.camera.FoodMaterialCamera;
|
||||
import com.example.ninefourone.nutritionmaster.modules.addinformation.AddActivity;
|
||||
import com.example.ninefourone.nutritionmaster.modules.information.InformationActivity;
|
||||
import com.example.ninefourone.nutritionmaster.ui.NoScrollViewPager;
|
||||
import com.example.ninefourone.nutritionmaster.utils.MessageUtils;
|
||||
import com.example.ninefourone.nutritionmaster.utils.PermissionUtils;
|
||||
@@ -85,6 +86,8 @@ public class MainActivity extends BaseActivity {
|
||||
RadarChart spiderView;
|
||||
@BindView(R.id.add_information_button)
|
||||
ImageView addInformationButton;
|
||||
@BindView(R.id.information_layout)
|
||||
LinearLayout informationLayout;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -320,4 +323,10 @@ public class MainActivity extends BaseActivity {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@OnClick(R.id.information_layout)
|
||||
public void onViewClicked() {
|
||||
Intent intent = new Intent(MainActivity.this, InformationActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.example.ninefourone.nutritionmaster.modules.RecipeActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.example.ninefourone.nutritionmaster.R;
|
||||
import com.example.ninefourone.nutritionmaster.base.BaseActivity;
|
||||
import com.example.ninefourone.nutritionmaster.bean.Menu;
|
||||
import com.example.ninefourone.nutritionmaster.bean.RecommendFood;
|
||||
import com.orhanobut.logger.Logger;
|
||||
|
||||
public class RecipeActivity extends BaseActivity {
|
||||
|
||||
private RecommendFood recommendFood;
|
||||
private Menu menu;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLayoutId() {
|
||||
return R.layout.activity_recipe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initViews(Bundle savedInstanceState) {
|
||||
Intent intent = getIntent();
|
||||
recommendFood = (RecommendFood) intent.getSerializableExtra("SEND_OBJECT");
|
||||
Logger.d(recommendFood.getItemType());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initToolBar() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPointerCaptureChanged(boolean hasCapture) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.example.ninefourone.nutritionmaster.modules.information;
|
||||
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.example.ninefourone.nutritionmaster.R;
|
||||
|
||||
public class InformationActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_information);
|
||||
}
|
||||
}
|
||||
@@ -5,21 +5,39 @@ import android.support.v7.app.AppCompatActivity;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.example.ninefourone.nutritionmaster.R;
|
||||
import com.example.ninefourone.nutritionmaster.base.BaseActivity;
|
||||
import com.orhanobut.logger.Logger;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
public class CustomizationActivity extends AppCompatActivity {
|
||||
public class CustomizationActivity extends BaseActivity {
|
||||
|
||||
@BindView(R.id.index_text)
|
||||
TextView indexText;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_customization);
|
||||
ButterKnife.bind(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLayoutId() {
|
||||
return R.layout.activity_customization;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initViews(Bundle savedInstanceState) {
|
||||
String text = getIntent().getStringExtra("SEND_CODE");
|
||||
indexText.setText(text);
|
||||
Logger.d(text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initToolBar() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPointerCaptureChanged(boolean hasCapture) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
4
app/src/main/res/drawable/ic_back_button_white.xml
Normal file
4
app/src/main/res/drawable/ic_back_button_white.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<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="#ffffff" android:pathData="M228.9,535.7l238.5,238.5a51.2,51.2 0,0 1,-72.4 72.4L69.1,520.8a51.1,51.1 0,0 1,-9.7 -13.5,51.2 51.2,0 0,1 6.8,-64.1l325.8,-325.8A51.2,51.2 0,1 1,464.4 189.8L220.9,433.3H888.8a51.2,51.2 0,0 1,0 102.4H228.9z"/>
|
||||
</vector>
|
||||
6
app/src/main/res/drawable/ic_copy.xml
Normal file
6
app/src/main/res/drawable/ic_copy.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="#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"/>
|
||||
</vector>
|
||||
7
app/src/main/res/drawable/ic_exchange_customization.xml
Normal file
7
app/src/main/res/drawable/ic_exchange_customization.xml
Normal file
@@ -0,0 +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"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/ic_right_arch.xml
Normal file
9
app/src/main/res/drawable/ic_right_arch.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#9b9b9b"
|
||||
android:pathData="M10,6L8.59,7.41 13.17,12l-4.58,4.59L10,18l6,-6z"/>
|
||||
</vector>
|
||||
@@ -7,9 +7,80 @@
|
||||
android:orientation="vertical"
|
||||
tools:context="com.example.ninefourone.nutritionmaster.modules.viewpagerfragments.customization.CustomizationActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/index_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="customization" />
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="11">
|
||||
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.03"
|
||||
android:background="@color/place_holder" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="2"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:src="@drawable/ic_exchange_customization" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="换一批"
|
||||
android:textColor="#f0311e" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_weight="0.005"
|
||||
android:background="@color/place_holder" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:src="@drawable/ic_copy" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="根据已吃卡路里刷新"
|
||||
android:textColor="#f0311e" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
409
app/src/main/res/layout/activity_information.xml
Normal file
409
app/src/main/res/layout/activity_information.xml
Normal file
@@ -0,0 +1,409 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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="match_parent"
|
||||
android:background="#efefef"
|
||||
android:orientation="vertical"
|
||||
tools:context="com.example.ninefourone.nutritionmaster.modules.information.InformationActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back_button"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_back_button_white" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="帐号资料"
|
||||
android:textColor="@color/color_bar_background"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="#FFF"
|
||||
android:paddingLeft="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="头像" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.github.siyamed.shapeimageview.CircularImageView
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:src="@drawable/test_avatar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_right_arch" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.05dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@color/place_holder" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="#FFF"
|
||||
android:paddingLeft="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="昵称" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/test_avatar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_right_arch" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.05dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@color/place_holder" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="#FFF"
|
||||
android:paddingLeft="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="ID" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/test_avatar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_right_arch" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.05dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@color/place_holder" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="#FFF"
|
||||
android:paddingLeft="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="性别" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/test_avatar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_right_arch" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.05dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@color/place_holder" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="#FFF"
|
||||
android:paddingLeft="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="年龄" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/test_avatar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_right_arch" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.05dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@color/place_holder" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="#FFF"
|
||||
android:paddingLeft="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="体重" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/test_avatar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_right_arch" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.05dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@color/place_holder" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="#FFF"
|
||||
android:paddingLeft="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="身高" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/test_avatar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_right_arch" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.05dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@color/place_holder" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="#FFF"
|
||||
android:paddingLeft="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="病史" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/test_avatar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_right_arch" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.05dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@color/place_holder" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
@@ -231,8 +231,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/add_information_button"
|
||||
android:layout_width="23dp"
|
||||
android:layout_height="23dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="25dp"
|
||||
android:layout_marginTop="15dp"
|
||||
|
||||
9
app/src/main/res/layout/activity_recipe.xml
Normal file
9
app/src/main/res/layout/activity_recipe.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout 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="match_parent"
|
||||
tools:context="com.example.ninefourone.nutritionmaster.modules.RecipeActivity.RecipeActivity">
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
@@ -8,6 +8,7 @@
|
||||
app:cardCornerRadius="20dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/whole_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<LinearLayout 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:id="@+id/whole_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/recommend_item_default_hight"
|
||||
android:layout_margin="@dimen/recommend_margin"
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
android:layout_margin="@dimen/recommend_margin"
|
||||
android:layout_weight="1"
|
||||
app:cardCornerRadius="20dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/whole_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
@@ -41,4 +41,5 @@
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
Reference in New Issue
Block a user