1
This commit is contained in:
@@ -4,6 +4,9 @@ import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
import com.example.ninefourone.nutritionmaster.NutritionMaster;
|
||||
import com.example.ninefourone.nutritionmaster.bean.MyUser;
|
||||
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
|
||||
@@ -24,7 +27,6 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 设置布局layout
|
||||
*
|
||||
@@ -85,4 +87,8 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
super.onDestroy();
|
||||
unbinder.unbind();
|
||||
}
|
||||
|
||||
protected void upUser(MyUser user) {
|
||||
NutritionMaster.user = user;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,10 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.example.ninefourone.nutritionmaster.NutritionMaster;
|
||||
import com.example.ninefourone.nutritionmaster.bean.MyUser;
|
||||
import com.example.ninefourone.nutritionmaster.bean.User;
|
||||
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
|
||||
@@ -50,7 +54,6 @@ public abstract class BaseFragment extends Fragment {
|
||||
public abstract void initView(Bundle state);
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
@@ -150,5 +153,8 @@ public abstract class BaseFragment extends Fragment {
|
||||
protected void finishTask() {
|
||||
}
|
||||
|
||||
protected void upUser(MyUser user) {
|
||||
NutritionMaster.user = user;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -40,6 +40,25 @@ public class MyUser {
|
||||
private List<?> groups;
|
||||
private List<?> user_permissions;
|
||||
|
||||
private float weight = 0;
|
||||
private float height = 0;
|
||||
|
||||
public float getWeight() {
|
||||
return weight;
|
||||
}
|
||||
|
||||
public void setWeight(float weight) {
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
public float getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
public void setHeight(float height) {
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.example.ninefourone.nutritionmaster.modules;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Paint;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
@@ -13,11 +14,15 @@ import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.ToxicBakery.viewpager.transforms.CubeOutTransformer;
|
||||
|
||||
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
||||
import com.bigkoo.pickerview.listener.OnOptionsSelectListener;
|
||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||
import com.cb.ratingbar.CBRatingBar;
|
||||
import com.example.ninefourone.nutritionmaster.NutritionMaster;
|
||||
import com.example.ninefourone.nutritionmaster.R;
|
||||
import com.example.ninefourone.nutritionmaster.adapter.HomePagerAdapter;
|
||||
import com.example.ninefourone.nutritionmaster.base.BaseActivity;
|
||||
@@ -47,7 +52,6 @@ import com.mxn.soul.flowingdrawer_core.FlowingDrawer;
|
||||
import com.nightonke.boommenu.BoomButtons.HamButton;
|
||||
import com.nightonke.boommenu.BoomButtons.OnBMClickListener;
|
||||
import com.nightonke.boommenu.BoomMenuButton;
|
||||
import com.orhanobut.logger.Logger;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
@@ -96,6 +100,16 @@ public class MainActivity extends BaseActivity {
|
||||
TextView userNickName;
|
||||
@BindView(R.id.user_occupation_text)
|
||||
TextView userOccupationText;
|
||||
@BindView(R.id.container)
|
||||
RelativeLayout container;
|
||||
@BindView(R.id.adder_infor)
|
||||
TextView adderInfor;
|
||||
@BindView(R.id.add_infor_ll)
|
||||
LinearLayout addInforLl;
|
||||
@BindView(R.id.show_information)
|
||||
LinearLayout showInformation;
|
||||
|
||||
private OptionsPickerView pickerView;
|
||||
|
||||
@Override
|
||||
public int getLayoutId() {
|
||||
@@ -123,11 +137,14 @@ public class MainActivity extends BaseActivity {
|
||||
// Logger.i("openRatio=" + openRatio + " ,offsetPixels=" + offsetPixels);
|
||||
}
|
||||
});
|
||||
initInforView();
|
||||
initPicker();
|
||||
initSpiderView();
|
||||
initViewPager();
|
||||
initSearchView();
|
||||
initBMB();
|
||||
initOccupations();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -288,6 +305,24 @@ public class MainActivity extends BaseActivity {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化picker
|
||||
*/
|
||||
private void initPicker() {
|
||||
pickerView = new OptionsPickerBuilder(MainActivity.this, new OnOptionsSelectListener() {
|
||||
@Override
|
||||
public void onOptionsSelect(int options1, int options2, int options3, View v) {
|
||||
final int option = options1;
|
||||
userOccupationText.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
userOccupationText.setText(ConstantUtils.occupationList.get(option));
|
||||
}
|
||||
});
|
||||
}
|
||||
}).build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化悬浮按钮
|
||||
*/
|
||||
@@ -309,6 +344,29 @@ public class MainActivity extends BaseActivity {
|
||||
boomMenuButton.addBuilder(builder2);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 初始化个人信息界面(UI)
|
||||
*/
|
||||
private void initInforView() {
|
||||
adderInfor.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG);
|
||||
if (NutritionMaster.user.getHeight() != 0) {
|
||||
showInformation.setVisibility(View.VISIBLE);
|
||||
adderInfor.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
showInformation.setVisibility(View.INVISIBLE);
|
||||
adderInfor.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
adderInfor.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求权限
|
||||
*/
|
||||
@@ -329,7 +387,7 @@ public class MainActivity extends BaseActivity {
|
||||
* @param view
|
||||
*/
|
||||
|
||||
@OnClick({R.id.navigation_layout, R.id.add_information_button, R.id.information_layout, R.id.user_occupation_text})
|
||||
@OnClick({R.id.navigation_layout, R.id.add_information_button, R.id.information_layout, R.id.user_occupation_text, R.id.adder_infor})
|
||||
public void onViewClicked(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.navigation_layout:
|
||||
@@ -342,6 +400,9 @@ public class MainActivity extends BaseActivity {
|
||||
case R.id.information_layout:
|
||||
break;
|
||||
case R.id.user_occupation_text:
|
||||
pickerView.show();
|
||||
break;
|
||||
case R.id.adder_infor:
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -364,7 +425,7 @@ public class MainActivity extends BaseActivity {
|
||||
// Logger.d(occupations[i].getOccupation_name());
|
||||
ConstantUtils.occupationList.add(occupations[i].getOccupation_name());
|
||||
}
|
||||
|
||||
pickerView.setPicker(ConstantUtils.occupationList);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -178,6 +178,6 @@ public class BodyInformationFragment extends BaseFragment {
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
// getActivity().unbindService(coon);
|
||||
getActivity().unbindService(coon);
|
||||
}
|
||||
}
|
||||
|
||||
7
app/src/main/res/drawable/ic_dialog_height.xml
Normal file
7
app/src/main/res/drawable/ic_dialog_height.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="#4C4948" android:pathData="M873.9,1024h-93.8a25.8,25.8 0,1 1,0 -51.6h68V51.6h-68a25.8,25.8 0,1 1,0 -51.6h93.8a25.8,25.8 0,0 1,25.8 25.8v972.4a25.8,25.8 0,0 1,-25.8 25.8z"/>
|
||||
<path android:fillColor="#4C4948" android:pathData="M873.9,290.8h-93.8a25.8,25.8 0,1 1,0 -51.6h93.8a25.8,25.8 0,1 1,0 51.6zM873.9,537.8h-93.8a25.8,25.8 0,1 1,0 -51.6h93.8a25.8,25.8 0,1 1,0 51.6zM873.9,784.8h-93.8a25.8,25.8 0,1 1,0 -51.6h93.8a25.8,25.8 0,1 1,0 51.6z"/>
|
||||
<path android:fillColor="#E9443D" android:pathData="M418.2,217.9m-107.2,0a107.2,107.2 0,1 0,214.4 0,107.2 107.2,0 1,0 -214.4,0Z"/>
|
||||
<path android:fillColor="#E9443D" android:pathData="M708,549.3c-27.5,-29.9 -105.2,-114.1 -137.2,-146.1 -39.2,-39.2 -71.5,-50.9 -104.9,-50.9H370.5c-33.3,0 -65.7,11.8 -104.9,51 -32,32 -109.7,116.2 -137.2,146.1 -6.2,6.8 -5.3,14.9 1.4,21.2 17.4,16.3 49.5,46.4 55.4,52.3 8.1,8.1 15.2,3.7 20.4,-1.6s96.3,-109.2 96.3,-109.2v486.2c0,12.7 7.9,20.6 17.6,20.6h63.7c10.8,0 24.5,-4.9 24.5,-24.5v-281.3h20.9v281.3c0,19.6 13.7,24.5 24.5,24.5h63.7c9.8,0 17.6,-7.8 17.6,-20.6V512s91.1,104 96.3,109.2c5.2,5.2 12.3,9.7 20.4,1.6 5.9,-5.9 38,-36 55.4,-52.3 6.7,-6.3 7.5,-14.5 1.4,-21.2z"/>
|
||||
</vector>
|
||||
6
app/src/main/res/drawable/ic_dialog_weight.xml
Normal file
6
app/src/main/res/drawable/ic_dialog_weight.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<vector android:height="24dp" android:viewportHeight="1024.0"
|
||||
android:viewportWidth="1044.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#E9443D" android:pathData="M781.6,608.9c-6.1,39.3 -27.2,60.8 -60.8,60.8h-396.8c-33.6,0 -50.9,-24.8 -60.8,-60.8 -9.9,-36.1 -65.8,-510.3 -69.9,-548.1C189,23.1 220.4,0 254,0h536.7c33.6,0 65.2,26.4 60.8,60.8 -4.3,34.6 -63.9,508.8 -70,548.1z"/>
|
||||
<path android:fillColor="#FFFFFF" android:pathData="M507.5,467h-48.1L357.2,343.4a69.5,69.5 0,0 1,-7.2 -10.2h-0.9v133.8h-35.1V195h35.1V323h0.9a118.1,118.1 0,0 1,7.2 -10l98.7,-118h43.4l-114.1,130.4 122.4,141.6zM730.8,448.4a183,183 0,0 1,-92 23.2c-39.3,0 -71,-12.4 -95.1,-37.3 -24,-24.9 -36.1,-58.1 -36.1,-99.6 0,-42 13.3,-76.6 39.9,-103.6 26.6,-27 60.6,-40.6 102.2,-40.6 29.4,0 54.2,4.7 74.6,14.1v37.9c-21.8,-13.7 -47.7,-20.6 -77.8,-20.6 -29.6,0 -54,10.1 -73.2,30.4 -19.3,20.3 -28.9,46.9 -28.9,80 0,34.1 8.8,60.6 26.5,79.6s41.6,28.4 71.7,28.4c20.7,0 38.3,-4 52.9,-12V354.8h-59V323.7h94.3v124.7z"/>
|
||||
<path android:fillColor="#E9443D" android:pathData="M925.9,1024H118.8c-65.6,0 -118.8,-53.3 -118.8,-118.8V247.5c0,-65.6 53.3,-118.8 118.8,-118.8h807c65.5,0 118.8,53.3 118.8,118.8v657.7c0.1,65.5 -53.3,118.8 -118.8,118.8zM118.8,183.3a64.3,64.3 0,0 0,-64.2 64.2v657.7c0,35.4 28.8,64.2 64.2,64.2h807a64.2,64.2 0,0 0,64.2 -64.2V247.5a64.2,64.2 0,0 0,-64.2 -64.2H118.8z"/>
|
||||
</vector>
|
||||
@@ -206,340 +206,362 @@
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
>
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:orientation="horizontal">
|
||||
android:layout_height="200dp"
|
||||
android:gravity="center"
|
||||
android:id="@+id/add_infor_ll"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:id="@+id/adder_infor"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="点击我填写信息"
|
||||
android:textSize="20sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_score" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="10dp"
|
||||
android:text="体质"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="8sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.cb.ratingbar.CBRatingBar
|
||||
android:id="@+id/cb_rating_bar"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginTop="3dp"
|
||||
app:starCanTouch="true"
|
||||
app:starCount="5"
|
||||
app:starCoverDir="left_to_right"
|
||||
app:starEndColor="#2a00ff"
|
||||
app:starFillColor="#c6c6c6"
|
||||
app:starMaxProgress="120"
|
||||
app:starPathData="@string/pig"
|
||||
app:starProgress="60"
|
||||
app:starShowStroke="false"
|
||||
app:starSize="20dp"
|
||||
app:starSpace="10dp"
|
||||
app:starStartColor="#30e2f5"
|
||||
app:starStrokeWidth="1dp"
|
||||
app:starUseGradient="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp" />
|
||||
|
||||
<FrameLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/show_information"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false">
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.github.mikephil.charting.charts.RadarChart
|
||||
android:id="@+id/spider_view"
|
||||
android:layout_width="170dp"
|
||||
android:layout_height="170dp"
|
||||
android:layout_gravity="center">
|
||||
|
||||
</com.github.mikephil.charting.charts.RadarChart>
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_bmi" />
|
||||
android:src="@drawable/ic_score" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="10dp"
|
||||
android:text="BMI值"
|
||||
android:text="体质"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="8sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
<com.cb.ratingbar.CBRatingBar
|
||||
android:id="@+id/cb_rating_bar"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginTop="3dp"
|
||||
app:starCanTouch="true"
|
||||
app:starCount="5"
|
||||
app:starCoverDir="left_to_right"
|
||||
app:starEndColor="#2a00ff"
|
||||
app:starFillColor="#c6c6c6"
|
||||
app:starMaxProgress="120"
|
||||
app:starPathData="@string/pig"
|
||||
app:starProgress="60"
|
||||
app:starShowStroke="false"
|
||||
app:starSize="20dp"
|
||||
app:starSpace="10dp"
|
||||
app:starStartColor="#30e2f5"
|
||||
app:starStrokeWidth="1dp"
|
||||
app:starUseGradient="true" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@color/color_bar_self" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="8dp"
|
||||
android:text="@string/self_information"
|
||||
android:textSize="5sp" />
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@color/color_bar_deeper" />
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="8dp"
|
||||
android:text="@string/standrad_information"
|
||||
android:textSize="5sp" />
|
||||
</LinearLayout>
|
||||
<com.github.mikephil.charting.charts.RadarChart
|
||||
android:id="@+id/spider_view"
|
||||
android:layout_width="170dp"
|
||||
android:layout_height="170dp"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.5" />
|
||||
</LinearLayout>
|
||||
</com.github.mikephil.charting.charts.RadarChart>
|
||||
</FrameLayout>
|
||||
|
||||
<com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar
|
||||
android:layout_width="145dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginTop="3dp"
|
||||
app:rcBackgroundColor="@color/color_bar_background"
|
||||
app:rcBackgroundPadding="5dp"
|
||||
app:rcMax="100"
|
||||
app:rcProgress="56.6"
|
||||
app:rcProgressColor="@color/color_bar_self"
|
||||
app:rcRadius="10dp"
|
||||
app:rcReverse="false"
|
||||
app:rcSecondaryProgress="74.1"
|
||||
app:rcSecondaryProgressColor="@color/color_bar_deeper" />
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_height" />
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_bmi" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="10dp"
|
||||
android:text="BMI值"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="8sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@color/color_bar_self" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="8dp"
|
||||
android:text="@string/self_information"
|
||||
android:textSize="5sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@color/color_bar_deeper" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="8dp"
|
||||
android:text="@string/standrad_information"
|
||||
android:textSize="5sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="10dp"
|
||||
android:text="身高"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="8sp" />
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.5" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
<com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar
|
||||
android:layout_width="145dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginTop="3dp"
|
||||
app:rcBackgroundColor="@color/color_bar_background"
|
||||
app:rcBackgroundPadding="5dp"
|
||||
app:rcMax="100"
|
||||
app:rcProgress="56.6"
|
||||
app:rcProgressColor="@color/color_bar_self"
|
||||
app:rcRadius="10dp"
|
||||
app:rcReverse="false"
|
||||
app:rcSecondaryProgress="74.1"
|
||||
app:rcSecondaryProgressColor="@color/color_bar_deeper" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@color/color_bar_self" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="8dp"
|
||||
android:text="@string/self_information"
|
||||
android:textSize="5sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@color/color_bar_deeper" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="8dp"
|
||||
android:text="@string/standrad_information"
|
||||
android:textSize="5sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.5" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar
|
||||
android:layout_width="145dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginTop="3dp"
|
||||
app:rcBackgroundColor="@color/color_bar_background"
|
||||
app:rcBackgroundPadding="5dp"
|
||||
app:rcMax="100"
|
||||
app:rcProgress="16.6"
|
||||
app:rcProgressColor="@color/color_bar_self"
|
||||
app:rcRadius="10dp"
|
||||
app:rcReverse="false"
|
||||
app:rcSecondaryProgress="32.1"
|
||||
app:rcSecondaryProgressColor="@color/color_bar_deeper" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_weight" />
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_height" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="10dp"
|
||||
android:text="身高"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="8sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@color/color_bar_self" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="8dp"
|
||||
android:text="@string/self_information"
|
||||
android:textSize="5sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@color/color_bar_deeper" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="8dp"
|
||||
android:text="@string/standrad_information"
|
||||
android:textSize="5sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="10dp"
|
||||
android:text="体重"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="8sp" />
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.5" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar
|
||||
android:layout_width="145dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginTop="3dp"
|
||||
app:rcBackgroundColor="@color/color_bar_background"
|
||||
app:rcBackgroundPadding="5dp"
|
||||
app:rcMax="100"
|
||||
app:rcProgress="16.6"
|
||||
app:rcProgressColor="@color/color_bar_self"
|
||||
app:rcRadius="10dp"
|
||||
app:rcReverse="false"
|
||||
app:rcSecondaryProgress="32.1"
|
||||
app:rcSecondaryProgressColor="@color/color_bar_deeper" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_weight" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="10dp"
|
||||
android:text="体重"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="8sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@color/color_bar_self" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="8dp"
|
||||
android:text="@string/self_information"
|
||||
android:textSize="5sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@color/color_bar_deeper" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="8dp"
|
||||
android:text="@string/standrad_information"
|
||||
android:textSize="5sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@color/color_bar_self" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="8dp"
|
||||
android:text="@string/self_information"
|
||||
android:textSize="5sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@color/color_bar_deeper" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="8dp"
|
||||
android:text="@string/standrad_information"
|
||||
android:textSize="5sp" />
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.5" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.5" />
|
||||
</LinearLayout>
|
||||
<com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar
|
||||
android:layout_width="145dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginTop="3dp"
|
||||
app:rcBackgroundColor="@color/color_bar_background"
|
||||
app:rcBackgroundPadding="5dp"
|
||||
app:rcMax="100"
|
||||
app:rcProgress="32.6"
|
||||
app:rcProgressColor="@color/color_bar_self"
|
||||
app:rcRadius="10dp"
|
||||
app:rcReverse="false"
|
||||
app:rcSecondaryProgress="56.1"
|
||||
app:rcSecondaryProgressColor="@color/color_bar_deeper" />
|
||||
|
||||
<com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar
|
||||
android:layout_width="145dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginTop="3dp"
|
||||
app:rcBackgroundColor="@color/color_bar_background"
|
||||
app:rcBackgroundPadding="5dp"
|
||||
app:rcMax="100"
|
||||
app:rcProgress="32.6"
|
||||
app:rcProgressColor="@color/color_bar_self"
|
||||
app:rcRadius="10dp"
|
||||
app:rcReverse="false"
|
||||
app:rcSecondaryProgress="56.1"
|
||||
app:rcSecondaryProgressColor="@color/color_bar_deeper" />
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
46
app/src/main/res/layout/information_dialog.xml
Normal file
46
app/src/main/res/layout/information_dialog.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="300dp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="125dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="125dp"
|
||||
android:layout_height="125dp"
|
||||
android:src="ic_dialog_height" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="125dp"
|
||||
android:layout_height="125dp"
|
||||
android:src="ic_dialog_weight" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="125dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="身高"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="125dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="体重"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user