Commit d76f7ddd authored by jyx's avatar jyx

更换协议地址

parent 74579543
......@@ -73,9 +73,9 @@ object Constant {
const val FRAGMENT_TAG_FOUR = "FRAGMENT_TAG_FOUR"
// 协议地址
var REGISTER_URL = BuildConfig.MainIp + "yy/register.html"//服务协议
var PRIVACY_URL = BuildConfig.MainIp + "yy/privacy.html"//隐私协议
var STRATEGY_URL = BuildConfig.MainIp + "yy/strategy.html"//团长攻略
var REGISTER_URL = BuildConfig.MainIp + "fb/register.html"//服务协议
var PRIVACY_URL = BuildConfig.MainIp + "fb/privacy.html"//隐私协议
var STRATEGY_URL = BuildConfig.MainIp + "fb/strategy.html"//团长攻略
/**
* 奖励标识
......
......@@ -10,7 +10,6 @@ import com.mints.flowbox.ui.adapter.BonusTaskAdapter
import com.mints.flowbox.ui.adapter.GvSignAdapter
import com.mints.flowbox.ui.adapter.listener.OnItemChildClickListener
import com.mints.flowbox.ui.fragment.base.BaseFragment
import com.mints.flowbox.ui.widgets.dialog.BonusDialog
import com.mints.flowbox.ui.widgets.dialog.BonusTintDialog
import com.mints.flowbox.ui.widgets.dialog.DialogListener
import com.mints.flowbox.ui.widgets.seekbar.BubbleUtils
......@@ -67,7 +66,7 @@ class BonusFragment : BaseFragment(), OnItemChildClickListener {
tv_1.text = SpanUtils()
.append("新人红包:")
.append("200元")
.setForegroundColor(ContextCompat.getColor(mContext, R.color.color_FFF5E8))
.setForegroundColor(ContextCompat.getColor(mContext, R.color.color_FFF7CB))
.setBold().setFontSize(BubbleUtils.dp2px(30))
.create()
......
......@@ -101,6 +101,9 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
private fun initView() {
wifi_view.setCount(4)
if (wifiManager.isWifiEnable) {
wifi_view.resumeAnim()
}
}
private fun initListener() {
......@@ -146,10 +149,12 @@ class HomeFragment : BaseFragment(), WifiStateManager.WifiStateCallback,
override fun onWifiOpen() {
wifi_view.setTitle("Wifi已连接")
wifi_view.resumeAnim()
}
override fun onWifiClose() {
wifi_view.setTitle("Wifi已关闭")
wifi_view.pauseAnim()
}
override fun onClick(v: View?) {
......
......@@ -9,14 +9,9 @@ import android.content.IntentFilter
import android.os.Bundle
import android.text.TextUtils
import android.view.Gravity
import android.view.LayoutInflater
import android.view.View
import android.widget.AdapterView
import android.widget.GridView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.viewpager.widget.ViewPager
import com.rd.animation.type.AnimationType
import com.scwang.smartrefresh.layout.api.RefreshLayout
import com.scwang.smartrefresh.layout.listener.OnRefreshListener
import com.mints.library.net.netstatus.NetUtils
......@@ -870,12 +865,7 @@ class MyFragment : BaseFragment(),
}
}
R.id.iv_right_icon -> {
// readyGo(SettingsActivity::class.java)
(requireActivity() as MainActivity).changeBonusFragment(
WzFragment(),
Constant.FRAGMENT_TAG_THREE
)
readyGo(SettingsActivity::class.java)
}
R.id.btn_withdraw -> {
if (userConfig == null) {
......
package com.mints.flowbox.ui.widgets;
import android.animation.ValueAnimator;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.LinearGradient;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PathMeasure;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.RectF;
import android.graphics.Shader;
import android.util.AttributeSet;
import android.view.View;
import com.mints.flowbox.ui.widgets.seekbar.BubbleUtils;
import com.mints.flowbox.utils.LogUtil;
@SuppressLint("DrawAllocation")
public class CycleProgress extends View {
private static final long DURATION = 800;
private int mViewWidth;
private int mViewHeight;
private final int mStrokeWidth;
private int mProgressWidth;
private final Paint mBgPaint;
private final Paint mProgressPaint;
private ValueAnimator mAnimator;
// 动画数值(用于控制动画状态,因为同一时间内只允许有一种状态出现,具体数值处理取决于当前状态)
private float mAnimatorValue;
public CycleProgress(Context context) {
this(context, null);
}
public CycleProgress(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
private final int mHeight;
public CycleProgress(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
mHeight = BubbleUtils.dp2px(15);
mStrokeWidth = BubbleUtils.dp2px(1);
mBgPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mBgPaint.setStyle(Paint.Style.FILL);
mBgPaint.setStrokeWidth(mHeight);
mBgPaint.setColor(Color.WHITE);
Paint mStrokePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mStrokePaint.setStyle(Paint.Style.STROKE);
mStrokePaint.setStrokeWidth(mStrokeWidth);
int mStrokeColor = Color.parseColor("#FB918A");
mStrokePaint.setColor(mStrokeColor);
mProgressPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mProgressPaint.setStrokeWidth(mHeight);
mProgressPaint.setStyle(Paint.Style.FILL);
Paint mMackTickPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mMackTickPaint.setStyle(Paint.Style.STROKE);
mMackTickPaint.setStrokeWidth(mStrokeWidth);
mMackTickPaint.setColor(mStrokeColor);
setLayerType(LAYER_TYPE_HARDWARE, null);
}
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
mViewHeight = h;
mViewWidth = w;
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
setMeasuredDimension(widthMeasureSpec, mHeight);
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
RectF rectF2 = new RectF(mStrokeWidth, mStrokeWidth, mViewWidth - mStrokeWidth, mHeight - mStrokeWidth);
canvas.drawRoundRect(rectF2, mHeight / 2, mHeight / 2, mBgPaint);
RectF rectF1 = new RectF(mStrokeWidth / 2, mStrokeWidth / 2, mProgressWidth - mStrokeWidth / 2, mViewHeight - mStrokeWidth / 2);
Path path = new Path();
Path dstPath = new Path();
PathMeasure pathMeasure = new PathMeasure();
path.moveTo(0, 0);
path.lineTo(mViewWidth, 0);
pathMeasure.setPath(path, false);
pathMeasure.getSegment(0, pathMeasure.getLength() * mAnimatorValue, dstPath, true);
//渐变
Shader mShader = new LinearGradient(mStrokeWidth / 2, mStrokeWidth / 2, mProgressWidth, mHeight - mStrokeWidth / 2, Color.parseColor("#DEAEC5"), Color.parseColor("#FB918A"), Shader.TileMode.REPEAT);
//遮罩
mProgressPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
mProgressPaint.setShader(mShader);
canvas.drawRoundRect(rectF1, mHeight / 2, mHeight / 2, mProgressPaint);
mProgressPaint.setXfermode(null);
}
/**
* 0--1
*/
public void startAnim() {
int progress = 1;
int delta = (int) (progress / 0.1);
LogUtil.d("delta:" + delta);
delta = delta == 0 ? 1 : delta;
mProgressWidth = (int) (progress * mViewWidth);
mAnimator = ValueAnimator.ofFloat(0, progress).setDuration(delta * DURATION);
mAnimator.setRepeatCount(ValueAnimator.INFINITE);
ValueAnimator.AnimatorUpdateListener mUpdateListener = animation -> {
mAnimatorValue = (float) animation.getAnimatedValue();
mProgressWidth = (int) (mAnimatorValue * mViewWidth);
invalidate();
};
mAnimator.addUpdateListener(mUpdateListener);
mAnimator.start();
}
public void resumeAnim() {
if (mAnimator != null) {
mAnimator.resume();
} else {
startAnim();
}
}
public void pauseAnim() {
if (mAnimator != null) {
mAnimator.pause();
}
}
}
\ No newline at end of file
......@@ -29,6 +29,8 @@ public class WifiView extends FrameLayout implements View.OnClickListener {
private ImageView llThreeWater;
private ImageView llFourWater;
private CycleProgress progress_bar;
private TextView tvTitle;
// 浮云金币动画
......@@ -106,6 +108,7 @@ public class WifiView extends FrameLayout implements View.OnClickListener {
llTwoWater = view.findViewById(R.id.ll_bubble_two);
llThreeWater = view.findViewById(R.id.ll_bubble_three);
llFourWater = view.findViewById(R.id.ll_bubble_four);
progress_bar = view.findViewById(R.id.progress_bar);
tvTitle = view.findViewById(R.id.tv_title);
......@@ -121,6 +124,14 @@ public class WifiView extends FrameLayout implements View.OnClickListener {
fourAnimator = startOne(llFourWater, 17f, 2500);
}
public void resumeAnim() {
progress_bar.resumeAnim();
}
public void pauseAnim() {
progress_bar.pauseAnim();
}
/**
* 设置浮云金币样式
*/
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/color_E72C2B" />
<solid android:color="@color/color_F43B17" />
<corners android:radius="5dip" />
</shape>
\ No newline at end of file
......@@ -16,7 +16,7 @@
<clip>
<shape>
<corners android:radius="20dip" />
<solid android:color="@color/color_F23009" />
<solid android:color="@color/color_F43B17" />
</shape>
</clip>
</item>
......
......@@ -37,7 +37,7 @@
android:layout_marginBottom="20dp"
android:background="@drawable/shape_btn_friends"
android:gravity="center"
android:textColor="@color/color_F23009"
android:textColor="@color/color_F43B17"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
......
......@@ -105,7 +105,8 @@
android:layout_marginStart="10dp"
android:text="完成任务后即可领取今日奖励"
android:textColor="@color/black"
android:textSize="16sp" />
android:textSize="16sp"
android:textStyle="bold" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recy_task"
......
......@@ -20,12 +20,21 @@
android:orientation="vertical">
<TextView
android:id="@+id/tv_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"
android:layout_marginTop="140dp"
android:layout_marginTop="40dp"
android:text="新人红包"
android:textColor="@color/white"
android:textSize="18sp" />
<TextView
android:id="@+id/tv_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="70dp"
android:background="@drawable/shape_yellow"
android:paddingStart="20dp"
android:paddingTop="4dp"
......@@ -83,7 +92,7 @@
<Button
android:id="@+id/btn_speed_test"
android:layout_width="0dp"
android:layout_height="100dp"
android:layout_height="90dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="10dp"
android:background="@mipmap/bg_packet_video"
......@@ -97,7 +106,7 @@
<Button
android:id="@+id/btn_clean"
android:layout_width="0dp"
android:layout_height="100dp"
android:layout_height="90dp"
android:layout_marginStart="10dp"
android:layout_marginTop="20dp"
android:background="@mipmap/bg_packet_invite"
......
......@@ -8,8 +8,8 @@
<ImageView
android:id="@+id/item_title_img"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_width="36dp"
android:layout_height="36dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
......@@ -20,9 +20,11 @@
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="10dp"
android:layout_marginBottom="8dp"
android:text="1.观看5个激励视频"
android:textColor="@color/black"
android:textSize="15sp"
android:textSize="12sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/item_task_pb"
app:layout_constraintStart_toEndOf="@+id/item_title_img"
app:layout_constraintTop_toTopOf="parent" />
......@@ -30,20 +32,21 @@
<ProgressBar
android:id="@+id/item_task_pb"
style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_width="120dp"
android:layout_width="160dp"
android:layout_height="12dp"
android:layout_marginStart="10dp"
android:progress="20"
android:progressDrawable="@drawable/progressbar_versus_changevedio_bg_bouns"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/item_title_img" />
app:layout_constraintStart_toEndOf="@+id/item_title_img"
app:layout_constraintTop_toBottomOf="@id/item_task_title" />
<TextView
android:id="@+id/item_task_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:textColor="@color/color_F23009"
android:textColor="@color/color_F28335"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="@id/item_task_pb"
app:layout_constraintStart_toEndOf="@id/item_task_pb"
......
......@@ -36,25 +36,23 @@
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
<ProgressBar
<com.mints.flowbox.ui.widgets.CycleProgress
android:id="@+id/progress_bar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@null"
android:max="100"
android:progress="60" />
android:layout_marginTop="20dp" />
<TextView
android:id="@+id/tv_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="每5分钟可领取一次补贴金币" />
android:layout_marginTop="5dp"
android:text="每5分钟可领取一次补贴金币"
android:textColor="@color/white" />
</androidx.appcompat.widget.LinearLayoutCompat>
......
......@@ -33,6 +33,7 @@
<color name="color_4BB93F">#4BB93F</color>
<color name="color_FEB63D">#FEB63D</color>
<color name="color_FFF5E8">#FFF5E8</color>
<color name="color_FFF7CB">#FFF7CB</color>
<color name="color_FF5E5E">#FF5E5E</color>
<color name="color_172B54">#172B54</color>
<color name="color_707A8D">#707A8D</color>
......@@ -73,5 +74,5 @@
<color name="color_FCCCAC">#FCCCAC</color>
<color name="color_994B23">#994B23</color>
<color name="color_F28335">#F28335</color>
<color name="color_F23009">#F23009</color>
<color name="color_F43B17">#F43B17</color>
</resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment