adjust ui.
authorTrillGates <williamtrillgates@gmail.com>
Tue, 1 Jun 2021 10:10:29 +0000 (18:10 +0800)
committerTrillGates <williamtrillgates@gmail.com>
Tue, 1 Jun 2021 10:10:29 +0000 (18:10 +0800)
26 files changed:
app/src/main/java/com/ic/sport/adapter/PedRecordAdapter.java
app/src/main/java/com/ic/sport/adapter/PedSetupAdapter.java
app/src/main/java/com/ic/sport/fragment/pedometer/PedMainFragment.java
app/src/main/java/com/ic/sport/fragment/pedometer/PedRecordFragment.java
app/src/main/java/com/ic/sport/fragment/pedometer/PedSetupDialogFragment.java
app/src/main/java/com/ic/sport/fragment/pedometer/PedSetupFragment.java
app/src/main/java/com/ic/sport/presenter/PedometerPresenter.java
app/src/main/java/com/ic/sport/widget/picker/WheelView.java
app/src/main/res/layout/activity_pedometer.xml
app/src/main/res/layout/dialog_ped_setup_layout.xml
app/src/main/res/layout/fragment_ped_main.xml
app/src/main/res/layout/fragment_ped_record.xml
app/src/main/res/layout/fragment_ped_setup.xml
app/src/main/res/layout/item_indicator_layout.xml
app/src/main/res/layout/item_ped_record.xml
app/src/main/res/layout/item_ped_setup.xml
app/src/main/res/layout/widget_image_text_layout.xml
app/src/main/res/mipmap-mdpi/calorie.png [new file with mode: 0644]
app/src/main/res/mipmap-mdpi/flag.png [new file with mode: 0644]
app/src/main/res/mipmap-mdpi/ic_cancel.png
app/src/main/res/mipmap-mdpi/ic_ok.png
app/src/main/res/mipmap-mdpi/map.png [new file with mode: 0644]
app/src/main/res/mipmap-mdpi/step.png [new file with mode: 0644]
app/src/main/res/mipmap-mdpi/tall.png [new file with mode: 0644]
app/src/main/res/mipmap-mdpi/weight.png [new file with mode: 0644]
app/src/main/res/values/colors.xml

index 985b879..c48ce5b 100644 (file)
@@ -60,15 +60,15 @@ public class PedRecordAdapter extends RecyclerView.Adapter<PedRecordAdapter.Reco
                 return;
             }
 
-            binding.setTakingIcon(R.drawable.ic_ped_taking);
+            binding.setTakingIcon(R.mipmap.step);
             binding.setTakingColor(Color.parseColor("#FFA500"));
             binding.setTakingUnit(context.getString(R.string.tips_target_unit));
 
-            binding.setCaloriesIcon(R.drawable.ic_ped_calories);
+            binding.setCaloriesIcon(R.mipmap.calorie);
             binding.setCaloriesColor(Color.WHITE);
             binding.setCaloriesUnit(context.getString(R.string.tips_calories_unit));
 
-            binding.setDistanceIcon(R.drawable.ic_ped_distance);
+            binding.setDistanceIcon(R.mipmap.map);
             binding.setDistanceColor(Color.WHITE);
             binding.setDistanceUnit(context.getString(R.string.tips_distance_unit));
 
index e45cc28..067d2e6 100644 (file)
@@ -32,14 +32,14 @@ public class PedSetupAdapter extends RecyclerView.Adapter<PedSetupAdapter.SetUpH
     };
 
     private static final int[] ICON_RES = new int[]{
-            R.drawable.ic_ped_height,
-            R.drawable.ic_ped_weight,
-            R.drawable.ic_ped_task,
+            R.mipmap.tall,
+            R.mipmap.weight,
+            R.mipmap.flag,
     };
 
     private PedSetupFragment.OnPedSetupItemClickListener mListener;
 
-    public PedSetupAdapter(Context context, PedSetupFragment.OnPedSetupItemClickListener listener){
+    public PedSetupAdapter(Context context, PedSetupFragment.OnPedSetupItemClickListener listener) {
         setupArray = new PedSetupEntity[3];
         int[] valueArray = new int[]{
                 SPUtils.getPedHeightSP(context),
@@ -47,19 +47,19 @@ public class PedSetupAdapter extends RecyclerView.Adapter<PedSetupAdapter.SetUpH
                 SPUtils.getPedTargetSP(context)
         };
 
-        for (int i=0; i<setupArray.length; i++){
+        for (int i = 0; i < setupArray.length; i++) {
             PedSetupEntity entity = new PedSetupEntity();
             entity.setTitle(context.getString(TITLE_RES[i]));
             entity.setUnit(context.getString(UNIT_RES[i]));
             entity.setValue(String.valueOf(valueArray[i]));
-            entity.setIcon(ContextCompat.getDrawable(context,ICON_RES[i]));
-            setupArray[i]=entity;
+            entity.setIcon(ContextCompat.getDrawable(context, ICON_RES[i]));
+            setupArray[i] = entity;
         }
 
-        this.mListener=listener;
+        this.mListener = listener;
     }
 
-    public void notifyUpdateValue(int type,int value){
+    public void notifyUpdateValue(int type, int value) {
         setupArray[type].setValue(String.valueOf(value));
         notifyDataSetChanged();
     }
@@ -67,12 +67,13 @@ public class PedSetupAdapter extends RecyclerView.Adapter<PedSetupAdapter.SetUpH
     @NonNull
     @Override
     public SetUpHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
-        return new SetUpHolder(ItemPedSetupBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false));
+        return new SetUpHolder(ItemPedSetupBinding.inflate(LayoutInflater.from(parent.getContext()),
+                parent, false));
     }
 
     @Override
     public void onBindViewHolder(@NonNull SetUpHolder holder, int position) {
-        holder.bindItem(setupArray[position],mListener,position);
+        holder.bindItem(setupArray[position], mListener, position);
     }
 
     @Override
@@ -88,7 +89,7 @@ public class PedSetupAdapter extends RecyclerView.Adapter<PedSetupAdapter.SetUpH
             binding = itemView;
         }
 
-        public void bindItem(PedSetupEntity entity,PedSetupFragment.OnPedSetupItemClickListener listener,int position) {
+        public void bindItem(PedSetupEntity entity, PedSetupFragment.OnPedSetupItemClickListener listener, int position) {
             if (binding != null) {
                 binding.setSetupItemIcon(entity.getIcon());
                 binding.setSetupItemTitle(entity.getTitle());
index a9e679d..496abfb 100644 (file)
@@ -102,7 +102,7 @@ public class PedMainFragment extends Fragment {
 
     private void setupRingProgress(int number) {
         RingProgress mRingProgress = pedMainBinding.ringProgress;
-        mRingProgress.setProgress(500);
+        mRingProgress.setProgress(number);
     }
 
     private void setupRingProgressNumberTv(int number) {
index 0ee521c..2d7d383 100644 (file)
@@ -29,8 +29,8 @@ public class PedRecordFragment extends Fragment {
 
     private Context mContext;
     private RecyclerView mSetupRv;
-    private PedRecordAdapter setupAdapte;
-    private QueryPedometerRecordListener queryListner;
+    private PedRecordAdapter setupAdapter;
+    private QueryPedometerRecordListener queryListener;
 
     @Override
     public void onAttach(Context context) {
@@ -38,7 +38,7 @@ public class PedRecordFragment extends Fragment {
         this.mContext = context;
 
         try {
-            queryListner = (QueryPedometerRecordListener) context;
+            queryListener = (QueryPedometerRecordListener) context;
         } catch (ClassCastException e) {
         }
     }
@@ -59,22 +59,22 @@ public class PedRecordFragment extends Fragment {
         View view = inflater.inflate(R.layout.fragment_ped_record, container, false);
         mSetupRv = view.findViewById(R.id.ped_record_rv);
         initRecyclerView();
-        queryListner.onQueryRecord();
+        queryListener.onQueryRecord();
         return view;
     }
 
     public void updatePedRecord(List<RecordParcelable> records) {
-        setupAdapte.updatePedRecordList(records);
+        setupAdapter.updatePedRecordList(records);
         //移动到第一个位置上
         mSetupRv.scrollToPosition(records.size() - 1);
     }
 
     private void initRecyclerView() {
-        setupAdapte = new PedRecordAdapter(mContext);
+        setupAdapter = new PedRecordAdapter(mContext);
         LinearLayoutManager mLayoutManager =
                 new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, true);
         mSetupRv.setLayoutManager(mLayoutManager);
-        mSetupRv.setAdapter(setupAdapte);
+        mSetupRv.setAdapter(setupAdapter);
     }
 
 }
index ea08c99..2227247 100644 (file)
@@ -9,6 +9,7 @@ import android.view.View;
 import android.view.ViewGroup;
 import android.view.Window;
 import android.widget.ImageButton;
+import android.widget.ImageView;
 
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
@@ -85,14 +86,17 @@ public class PedSetupDialogFragment extends DialogFragment {
 
         View popView = inflater.inflate(R.layout.dialog_ped_setup_layout, container);
         numberPicker = (WheelView) popView.findViewById(R.id.dialog_value_picker);
-        setNumberPicker(limil.get(mCurrType)[0], limil.get(mCurrType)[1], UNIT_RES[mCurrType], VALUE_CURR[mCurrType]);
+        setNumberPicker(limil.get(mCurrType)[0],
+                limil.get(mCurrType)[1],
+                UNIT_RES[mCurrType],
+                VALUE_CURR[mCurrType]);
 
-        ImageButton bt = (ImageButton) popView.findViewById(R.id.dialog_picker_ok);
+        ImageView bt = (ImageView) popView.findViewById(R.id.dialog_picker_ok);
         bt.setOnClickListener(v -> {
             mListener.onDialogUpdate(mCurrType,limil.get(mCurrType)[0]+numberPicker.getCurrentItem());
             dismiss();
         });
-        ImageButton cancel = (ImageButton) popView.findViewById(R.id.dialog_picker_cancel);
+        ImageView cancel = (ImageView) popView.findViewById(R.id.dialog_picker_cancel);
         cancel.setOnClickListener(v -> dismiss());
 
         return popView;
index 07ee5e3..e9f6a45 100644 (file)
@@ -1,6 +1,7 @@
 package com.ic.sport.fragment.pedometer;
 
 import android.content.Context;
+import android.graphics.Rect;
 import android.os.Bundle;
 
 import androidx.annotation.NonNull;
@@ -17,11 +18,11 @@ import com.ic.sport.R;
 import com.ic.sport.adapter.PedSetupAdapter;
 
 
-public class PedSetupFragment extends Fragment{
+public class PedSetupFragment extends Fragment {
 
     private static final String TAG = "PedSetupFragment";
 
-    public interface OnPedSetupItemClickListener{
+    public interface OnPedSetupItemClickListener {
         void onPedSetupItem(int pos);
     }
 
@@ -60,14 +61,20 @@ public class PedSetupFragment extends Fragment{
     }
 
     private void initRecyclerView() {
-        setupAdapter = new PedSetupAdapter(mContext,listener);
+        setupAdapter = new PedSetupAdapter(mContext, listener);
         LinearLayoutManager mLayoutManager = new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false);
         mSetupRv.setLayoutManager(mLayoutManager);
+        mSetupRv.addItemDecoration(new RecyclerView.ItemDecoration() {
+            @Override
+            public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
+                outRect.bottom = 5;
+            }
+        });
         mSetupRv.setAdapter(setupAdapter);
     }
 
     private OnPedSetupItemClickListener listener = pos -> {
-        if(pos == 2){
+        if (pos == 2) {
             return;
         }
         FragmentManager fm = getChildFragmentManager();
@@ -75,8 +82,8 @@ public class PedSetupFragment extends Fragment{
         alertDialog.show(fm, "PedSetupDialog");
     };
 
-    public void updateSetuUpValue(int type,int value){
-        setupAdapter.notifyUpdateValue(type,value);
+    public void updateSetuUpValue(int type, int value) {
+        setupAdapter.notifyUpdateValue(type, value);
     }
 
 }
index f7cc78f..8ad6d49 100644 (file)
@@ -25,8 +25,8 @@ public class PedometerPresenter {
     private MutableLiveData<Integer> mObsPedCount;
     private MutableLiveData<List<RecordParcelable>> mObsPedRecord;
 
-    public PedometerPresenter(Context context){
-        mContext=context;
+    public PedometerPresenter(Context context) {
+        mContext = context;
         mObsPedCount = new MutableLiveData<>();
         mObsPedRecord = new MutableLiveData<>();
     }
@@ -39,20 +39,20 @@ public class PedometerPresenter {
         return mObsPedRecord;
     }
 
-    public void bindService(){
+    public void bindService() {
         ServiceUtil.bindServiceUtil(mContext, "com.ic.action.WORK_SERVICE",
-                connection,mContext.getPackageName(), 103);
+                connection, mContext.getPackageName(), 103);
     }
 
-    public void unbindService(){
+    public void unbindService() {
         try {
             mService.unregisterCallback(pedInterface);
-            ServiceUtil.unBindServiceUtil(mContext,connection);
+            ServiceUtil.unBindServiceUtil(mContext, connection);
         } catch (Exception e) {
-            IcLog.e(TAG,"unbindService");
-        }finally {
-            mService=null;
-            pedInterface=null;
+            IcLog.e(TAG, "unbindService");
+        } finally {
+            mService = null;
+            pedInterface = null;
         }
     }
 
@@ -76,7 +76,7 @@ public class PedometerPresenter {
         }
     }
 
-    public void syncPedHeightSetting(int height){
+    public void syncPedHeightSetting(int height) {
         if (mService != null) {
             try {
                 mService.syncPedHeightSetting(height);
@@ -86,7 +86,7 @@ public class PedometerPresenter {
         }
     }
 
-    public void syncPedWeightSetting(int weight){
+    public void syncPedWeightSetting(int weight) {
         if (mService != null) {
             try {
                 mService.syncPedWeightSetting(weight);
@@ -111,17 +111,18 @@ public class PedometerPresenter {
 
         @Override
         public void onServiceDisconnected(ComponentName name) {
+
         }
     };
 
     private IPedAidlInterface.Stub pedInterface = new IPedAidlInterface.Stub() {
         @Override
-        public void updatePedCount(int count) throws RemoteException {
+        public void updatePedCount(int count) {
             mObsPedCount.postValue(count);
         }
 
         @Override
-        public void updatePedRecord(List<RecordParcelable> record) throws RemoteException {
+        public void updatePedRecord(List<RecordParcelable> record) {
             mObsPedRecord.postValue(record);
         }
     };
index a75eb11..651957a 100644 (file)
@@ -21,6 +21,7 @@ package com.ic.sport.widget.picker;
 
 import android.content.Context;
 import android.graphics.Canvas;
+import android.graphics.Color;
 import android.graphics.Paint;
 import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
@@ -65,13 +66,13 @@ public class WheelView extends View {
      * Current value & label text color
      */
 //     private static final int VALUE_TEXT_COLOR = 0xF0000000;
-    private static final int VALUE_TEXT_COLOR = 0xFFFFA70D;
+    private static final int VALUE_TEXT_COLOR = Color.parseColor("#2492F0");
 
     /**
      * Items text color
      */
 //     private static final int ITEMS_TEXT_COLOR = 0xFF000000;
-    private static final int ITEMS_TEXT_COLOR = 0xFFA9A9A9;
+    private static final int ITEMS_TEXT_COLOR = Color.parseColor("#B1B1B1");
 
     /**
      * Top and bottom shadows colors
@@ -160,8 +161,8 @@ public class WheelView extends View {
     boolean isCyclic = false;
 
     // Listeners
-    private List<OnWheelChangedListener> changingListeners = new LinkedList<OnWheelChangedListener>();
-    private List<OnWheelScrollListener> scrollingListeners = new LinkedList<OnWheelScrollListener>();
+    private List<OnWheelChangedListener> changingListeners = new LinkedList<>();
+    private List<OnWheelScrollListener> scrollingListeners = new LinkedList<>();
 
     /**
      * Constructor
@@ -716,11 +717,11 @@ public class WheelView extends View {
             height = getDesiredHeight(itemsLayout);
 
             if (heightMode == MeasureSpec.AT_MOST) {
-                height = Math.min(height, heightSize);
+                height = Math.max(height, heightSize);
             }
         }
 
-        setMeasuredDimension(width, height);
+        setMeasuredDimension(width, heightMeasureSpec);
     }
 
     @Override
@@ -771,7 +772,7 @@ public class WheelView extends View {
         valuePaint.setColor(VALUE_TEXT_COLOR);
         valuePaint.drawableState = getDrawableState();
 
-        labelPaint.setColor(ITEMS_TEXT_COLOR);
+        labelPaint.setColor(Color.parseColor("#E6E6E6"));
         labelPaint.drawableState = getDrawableState();
 
         Rect bounds = new Rect();
@@ -780,11 +781,9 @@ public class WheelView extends View {
         // draw label
         if (labelLayout != null) {
             canvas.save();
-//            canvas.translate(itemsLayout.getWidth() + LABEL_OFFSET,
-//                    bounds.top + ((bounds.height() - labelLayout.getHeight()) / 2));
             // 确保 Label 与 Value 中线对齐
-            canvas.translate(itemsLayout.getWidth() + LABEL_OFFSET,
-                    baseLine - (labelLayout.getHeight()/2));
+            canvas.translate(itemsLayout.getWidth(),
+                    baseLine - (labelLayout.getHeight()) + 8);
             labelLayout.draw(canvas);
             canvas.restore();
         }
index cfd5b7f..f3c0bbf 100644 (file)
@@ -17,5 +17,6 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_gravity="bottom|center_horizontal"
+        android:layout_marginBottom="5dp"
         android:overScrollMode="never" />
 </FrameLayout>
\ No newline at end of file
index 19cfc56..2323b15 100644 (file)
@@ -1,50 +1,50 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@mipmap/qs_background"
+    android:background="@mipmap/bg"
     android:orientation="vertical">
 
     <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_gravity="center"
-        android:layout_marginTop="10dp"
-        android:layout_weight="1">
+        android:layout_height="match_parent"
+        android:layout_gravity="center">
 
         <com.ic.sport.widget.picker.WheelView
             android:id="@+id/dialog_value_picker"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:layout_gravity="center" />
+            android:layout_height="260dp"
+            android:layout_gravity="center"
+            android:layout_marginLeft="26dp" />
     </LinearLayout>
 
 
     <RelativeLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
         android:layout_marginBottom="10dp">
 
-        <ImageButton
+        <ImageView
             android:id="@+id/dialog_picker_cancel"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
+            android:layout_width="80dp"
+            android:layout_height="80dp"
             android:layout_gravity="bottom"
-            android:background="#0000"
+            android:layout_marginStart="10dp"
+            android:background="@color/transparent"
             android:contentDescription="@null"
-            android:src="@mipmap/ic_cancel"
-            android:layout_marginStart="20dp"/>
+            android:src="@mipmap/ic_cancel" />
 
-        <ImageButton
+        <ImageView
             android:id="@+id/dialog_picker_ok"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
+            android:layout_width="80dp"
+            android:layout_height="80dp"
+            android:layout_alignParentEnd="true"
             android:layout_gravity="bottom|end"
-            android:background="#0000"
+            android:layout_marginEnd="10dp"
+            android:background="@color/transparent"
             android:contentDescription="@null"
-            android:src="@mipmap/ic_ok"
-            android:layout_alignParentEnd="true"
-            android:layout_marginEnd="20dp"/>
+            android:src="@mipmap/ic_ok" />
     </RelativeLayout>
 
-</LinearLayout>
\ No newline at end of file
+</RelativeLayout>
\ No newline at end of file
index 03fc7bb..6cf06a0 100644 (file)
@@ -28,7 +28,7 @@
             app:isClockwise="true"
             app:isDecimal="true"
             app:isShowPercentText="false"
-            app:maxProgress="1000"
+            app:maxProgress="10000"
             app:neiYuanColor="@color/transparent"
             app:progress="1000"
             app:ringColor="@color/top_color2"
index cdff5c3..0dd1d25 100644 (file)
@@ -3,7 +3,7 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@mipmap/qs_background"
+    android:background="@mipmap/bg"
     android:gravity="center_horizontal"
     android:orientation="vertical"
     tools:context=".fragment.pedometer.PedRecordFragment">
     <TextView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
+        android:layout_marginTop="10dp"
         android:text="@string/ped_record_name"
-        android:textColor="#FFFFFF"
-        android:textSize="42sp"
-        android:layout_marginTop="10dp"/>
+        android:textColor="@color/main_text_color"
+        android:textSize="42sp" />
 
     <androidx.recyclerview.widget.RecyclerView
         android:id="@+id/ped_record_rv"
         android:layout_width="match_parent"
+        android:overScrollMode="never"
         android:layout_height="match_parent"
-        android:layout_marginTop="10dp"/>
+        android:layout_marginTop="10dp" />
 </LinearLayout>
\ No newline at end of file
index 384fdfa..d21e029 100644 (file)
@@ -3,7 +3,7 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@mipmap/qs_background"
+    android:background="@mipmap/bg"
     android:gravity="center_horizontal"
     android:orientation="vertical"
     tools:context=".fragment.pedometer.PedSetupFragment">
     <TextView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
+        android:layout_marginTop="10dp"
         android:text="@string/ped_head_name"
-        android:textColor="#FFFFFF"
-        android:textSize="42sp"
-        android:layout_marginTop="10dp"/>
+        android:textColor="@color/main_text_color"
+        android:textSize="42sp" />
 
     <androidx.recyclerview.widget.RecyclerView
         android:id="@+id/ped_setup_rv"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:layout_marginTop="10dp"
-        android:overScrollMode="never"/>
+        android:overScrollMode="never" />
 </LinearLayout>
\ No newline at end of file
index 8ca6c6d..94225bf 100644 (file)
@@ -10,7 +10,9 @@
 
     <LinearLayout
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content">
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="5dp"
+        android:layout_marginRight="5dp">
 
         <ImageView
             android:layout_width="wrap_content"
index 0c1cda0..5994ba5 100644 (file)
     <com.google.android.material.card.MaterialCardView
         style="@style/Widget.MaterialComponents.CardView"
         android:layout_width="match_parent"
-        android:layout_height="100dp"
-        android:layout_marginStart="10dp"
-        android:layout_marginEnd="10dp"
-        app:cardBackgroundColor="#305C5C5C"
-        app:cardCornerRadius="25dp">
+        android:layout_height="140dp"
+        android:layout_marginStart="5dp"
+        android:layout_marginEnd="5dp"
+        app:cardBackgroundColor="#303233"
+        app:cardCornerRadius="5dp">
 
         <TextView
             android:id="@+id/item_record_date"
             style="@style/RecordTextStyle"
-            android:layout_marginStart="5dp"
-            android:layout_marginTop="5dp"
-            android:text="@{recordDate}" />
+            android:layout_marginStart="15dp"
+            android:layout_marginTop="20dp"
+            android:text="@{recordDate}"
+            android:textColor="@color/white" />
 
         <com.ic.sport.widget.WidgetImageTextLayout
             android:id="@+id/item_record_taking"
             android:layout_height="wrap_content"
             android:layout_gravity="bottom"
             android:layout_marginStart="5dp"
+            android:layout_marginBottom="10dp"
+            icApp:widgetImageColor="@{takingColor}"
             icApp:widgetImageIcon="@{takingIcon}"
             icApp:widgetImageUnit="@{takingUnit}"
-            icApp:widgetImageColor="@{takingColor}"
             icApp:widgetImageValue="@{recordTaking}" />
 
         <com.ic.sport.widget.WidgetImageTextLayout
             android:layout_height="wrap_content"
             android:layout_gravity="end"
             android:layout_marginStart="5dp"
+            android:layout_marginTop="5dp"
+            android:layout_marginEnd="5dp"
+            icApp:widgetImageColor="@{caloriesColor}"
             icApp:widgetImageIcon="@{caloriesIcon}"
             icApp:widgetImageUnit="@{caloriesUnit}"
-            icApp:widgetImageColor="@{caloriesColor}"
-            icApp:widgetImageValue="@{recordCalories}"
-            android:layout_marginTop="5dp"
-            android:layout_marginEnd="5dp"/>
+            icApp:widgetImageValue="@{recordCalories}" />
 
 
         <com.ic.sport.widget.WidgetImageTextLayout
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="end|bottom"
+            android:layout_marginEnd="5dp"
+            android:layout_marginBottom="10dp"
+            icApp:widgetImageColor="@{distanceColor}"
             icApp:widgetImageIcon="@{distanceIcon}"
             icApp:widgetImageUnit="@{distanceUnit}"
-            icApp:widgetImageColor="@{distanceColor}"
-            icApp:widgetImageValue="@{recordDistance}"
-            android:layout_marginEnd="5dp"/>
+            icApp:widgetImageValue="@{recordDistance}" />
 
     </com.google.android.material.card.MaterialCardView>
 </layout>
index 7541dde..cb1f69d 100644 (file)
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:text="@{setupItemTitle}"
-            android:textColor="#50FFFFFF"
-            android:textSize="36sp"
+            android:textColor="@color/white"
+            android:textSize="30sp"
             android:layout_marginStart="5dp"/>
 
         <TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:text="@{setupItemValue}"
-            android:textColor="#80FFFFFF"
-            android:textSize="36sp"
+            android:textColor="@color/white"
+            android:textSize="30sp"
             android:layout_marginStart="5dp"/>
 
         <TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:text="@{setupItemUnit}"
-            android:textColor="#80FFFFFF"
-            android:textSize="36sp"
+            android:textColor="@color/white"
+            android:textSize="30sp"
             android:layout_marginStart="5dp"/>
 
     </LinearLayout>
index cab81c0..8347291 100644 (file)
@@ -1,22 +1,25 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="horizontal"
     android:layout_width="wrap_content"
-    android:layout_height="wrap_content">
+    android:layout_height="wrap_content"
+    android:gravity="center_vertical"
+    android:orientation="horizontal">
 
     <ImageView
         android:id="@+id/widget_image_icon"
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content"/>
+        android:layout_height="wrap_content" />
 
     <TextView
-        style="@style/RecordTextStyle"
         android:id="@+id/widget_image_value"
-        android:layout_marginStart="5dp"/>
+        style="@style/RecordTextStyle"
+        android:layout_marginStart="2dp"
+        android:textColor="@color/white" />
 
     <TextView
-        style="@style/RecordTextStyle"
         android:id="@+id/widget_image_unit"
-        android:layout_marginStart="5dp"/>
+        style="@style/RecordTextStyle"
+        android:layout_marginStart="2dp"
+        android:textColor="@color/white" />
 
 </LinearLayout>
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-mdpi/calorie.png b/app/src/main/res/mipmap-mdpi/calorie.png
new file mode 100644 (file)
index 0000000..683af49
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/calorie.png differ
diff --git a/app/src/main/res/mipmap-mdpi/flag.png b/app/src/main/res/mipmap-mdpi/flag.png
new file mode 100644 (file)
index 0000000..17896e9
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/flag.png differ
index 29a4bc8..dfb6992 100644 (file)
Binary files a/app/src/main/res/mipmap-mdpi/ic_cancel.png and b/app/src/main/res/mipmap-mdpi/ic_cancel.png differ
index 5001e57..0e72578 100644 (file)
Binary files a/app/src/main/res/mipmap-mdpi/ic_ok.png and b/app/src/main/res/mipmap-mdpi/ic_ok.png differ
diff --git a/app/src/main/res/mipmap-mdpi/map.png b/app/src/main/res/mipmap-mdpi/map.png
new file mode 100644 (file)
index 0000000..936f823
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/map.png differ
diff --git a/app/src/main/res/mipmap-mdpi/step.png b/app/src/main/res/mipmap-mdpi/step.png
new file mode 100644 (file)
index 0000000..0b5ef64
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/step.png differ
diff --git a/app/src/main/res/mipmap-mdpi/tall.png b/app/src/main/res/mipmap-mdpi/tall.png
new file mode 100644 (file)
index 0000000..8cb64c2
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/tall.png differ
diff --git a/app/src/main/res/mipmap-mdpi/weight.png b/app/src/main/res/mipmap-mdpi/weight.png
new file mode 100644 (file)
index 0000000..716fe0c
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/weight.png differ
index 6a1975d..7ddcf69 100644 (file)
@@ -31,6 +31,7 @@
     <color name="green2">#22ddb0</color>
     <color name="green_qian">#E6F9F7</color>
     <color name="gray_ban">#50000000</color>
+    <color name="main_text_color">#2492F0</color>
 
 
     <color name="home_green">#06C1AE</color>