Merge branch 'wangtianrui'

This commit is contained in:
ScorpioMiku
2018-08-30 12:44:26 +08:00
3 changed files with 63 additions and 7 deletions

View File

@@ -50,6 +50,7 @@ dependencies {
//个人信息的那个条条
compile 'com.akexorcist:RoundCornerProgressBar:2.0.3'
//wave
compile 'com.gelitenight.waveview:waveview:1.0.0'
implementation 'me.itangqi.waveloadingview:library:0.3.5'
//计步
implementation project(':todaystepcounterlib')
}

View File

@@ -10,10 +10,10 @@ import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.os.RemoteException;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import com.akexorcist.roundcornerprogressbar.IconRoundCornerProgressBar;
@@ -26,7 +26,9 @@ import com.today.step.lib.TodayStepService;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
import me.itangqi.waveloadingview.WaveLoadingView;
/**
* Created by ScorpioMiku on 2018/8/26.
@@ -41,6 +43,12 @@ public class BodyInformationFragment extends BaseFragment {
Unbinder unbinder;
@BindView(R.id.step_text_view)
TextView stepTextView;
@BindView(R.id.waveLoadingView)
WaveLoadingView waveLoadingView;
@BindView(R.id.button_10)
Button button10;
@BindView(R.id.button_80)
Button button80;
private int stepCount = 0;
private static final int REFRESH_STEP_WHAT = 0;
@@ -131,6 +139,18 @@ public class BodyInformationFragment extends BaseFragment {
stepTextView.setText(stepCount + "");
}
@OnClick({R.id.button_10, R.id.button_80})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.button_10:
waveLoadingView.setProgressValue(10);
break;
case R.id.button_80:
waveLoadingView.setProgressValue(80);
break;
}
}
/**
* 定时器修改UI

View File

@@ -3,7 +3,6 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/cardview_dark_background"
android:gravity="center"
android:orientation="vertical">
@@ -15,7 +14,7 @@
<TextView
android:layout_width="match_parent"
android:layout_height="100dp" />
android:layout_height="50dp" />
<com.akexorcist.roundcornerprogressbar.IconRoundCornerProgressBar
android:id="@+id/progress_2"
@@ -29,13 +28,49 @@
<TextView
android:layout_width="match_parent"
android:layout_height="100dp" />
android:layout_height="30dp" />
<me.itangqi.waveloadingview.WaveLoadingView
android:id="@+id/waveLoadingView"
android:layout_width="200dp"
android:layout_height="200dp"
app:wlv_borderColor="@color/colorAccent"
app:wlv_borderWidth="3dp"
app:wlv_progressValue="40"
app:wlv_round_rectangle="true"
app:wlv_shapeType="circle"
app:wlv_titleCenter="卡路里值"
app:wlv_titleCenterColor="@android:color/white"
app:wlv_titleCenterSize="24sp"
app:wlv_titleCenterStrokeColor="@android:color/holo_blue_dark"
app:wlv_titleCenterStrokeWidth="3dp"
app:wlv_triangle_direction="north"
app:wlv_waveAmplitude="70"
app:wlv_waveColor="@color/colorAccent" />
<TextView
android:id="@+id/step_text_view"
android:textColor="#FFF"
android:layout_width="200dp"
android:layout_height="50dp" />
android:layout_height="30dp"
android:textColor="#4d4a4a" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:orientation="horizontal">
<Button
android:id="@+id/button_10"
android:layout_width="80dp"
android:text="10"
android:layout_height="match_parent" />
<Button
android:id="@+id/button_80"
android:layout_width="80dp"
android:text="80"
android:layout_height="match_parent" />
</LinearLayout>
</LinearLayout>