Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_highgold
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_highgold
Commits
6890a753
Commit
6890a753
authored
Sep 02, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加喝水界面
parent
e4634a4a
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
291 additions
and
884 deletions
+291
-884
Constant.java
...app/src/main/java/com/mints/highgold/common/Constant.java
+1
-0
NotifyManager.java
...c/main/java/com/mints/highgold/manager/NotifyManager.java
+22
-9
TTAdManagerHolder.java
...in/java/com/mints/highgold/manager/TTAdManagerHolder.java
+2
-0
TTNativeExpressManager.java
...va/com/mints/highgold/manager/TTNativeExpressManager.java
+3
-1
WalkBean.java
.../src/main/java/com/mints/highgold/mvp/model/WalkBean.java
+38
-0
LoanPresenter.java
...java/com/mints/highgold/mvp/presenters/LoanPresenter.java
+3
-2
WaterPresenter.java
...ava/com/mints/highgold/mvp/presenters/WaterPresenter.java
+0
-411
LoanView.java
.../src/main/java/com/mints/highgold/mvp/views/LoanView.java
+2
-1
WaterView.java
...src/main/java/com/mints/highgold/mvp/views/WaterView.java
+0
-19
LoanService.java
...app/src/main/java/com/mints/highgold/net/LoanService.java
+2
-1
WaterActivity.java
...n/java/com/mints/highgold/ui/activitys/WaterActivity.java
+59
-134
MainFragment.java
...ain/java/com/mints/highgold/ui/fragment/MainFragment.java
+29
-42
StepView.java
...src/main/java/com/mints/highgold/ui/widgets/StepView.java
+4
-8
BubbleSeekBar.java
.../com/mints/highgold/ui/widgets/seekbar/BubbleSeekBar.java
+2
-1
activity_water.xml
highgold/app/src/main/res/layout/activity_water.xml
+73
-231
fragment_main_first.xml
highgold/app/src/main/res/layout/fragment_main_first.xml
+2
-2
remoteview.xml
highgold/app/src/main/res/layout/remoteview.xml
+43
-18
view_dialog_main_drink.xml
highgold/app/src/main/res/layout/view_dialog_main_drink.xml
+1
-0
view_step.xml
highgold/app/src/main/res/layout/view_step.xml
+4
-4
dimens.xml
highgold/app/src/main/res/values/dimens.xml
+1
-0
No files found.
highgold/app/src/main/java/com/mints/highgold/common/Constant.java
View file @
6890a753
...
...
@@ -168,6 +168,7 @@ public interface Constant {
String
CARRIER_HOTACTIVITY
=
"HOTACTIVITY"
;
//热门活动
String
CARRIER_ROTATIONCHART
=
"ROTATIONCHART"
;
//轮播图
String
CARRIER_YILANVEIDO_REDENVELOPE
=
"YILANVEIDO_REDENVELOPE"
;
//yl视频红包
String
CARRIER_WALK_BUBBLE
=
"WALK_BUBBLE"
;
//走路第4个汽泡
String
CARRIER_CHALLENGE_FIRSTWATER
=
"CHALLENGE_FIRSTWATER"
;
//首次喝水挑战
String
CARRIER_CHALLENGE_IDCODE
=
"CHALLENGE_IDCODE"
;
//绑定邀请码挑战
...
...
highgold/app/src/main/java/com/mints/highgold/manager/NotifyManager.java
View file @
6890a753
...
...
@@ -6,13 +6,16 @@ import android.app.Notification;
import
android.app.NotificationChannel
;
import
android.app.NotificationManager
;
import
android.app.PendingIntent
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.os.Build
;
import
android.support.v4.app.NotificationCompat
;
import
android.widget.RemoteViews
;
import
com.mints.highgold.MintsApplication
;
import
com.mints.highgold.R
;
import
com.mints.highgold.ui.activitys.MainActivity
;
import
com.mints.highgold.utils.SpanUtils
;
import
static
android
.
content
.
Context
.
NOTIFICATION_SERVICE
;
...
...
@@ -21,7 +24,7 @@ import static android.content.Context.NOTIFICATION_SERVICE;
*/
public
class
NotifyManager
{
public
static
final
String
CHINALL_ID
=
"
MINTS_
GOLDSPACE"
;
public
static
final
String
CHINALL_ID
=
"GOLDSPACE"
;
public
static
final
String
CHINALL_NAME
=
"淘金高额版通知"
;
private
static
NotifyManager
_inst
;
...
...
@@ -46,13 +49,14 @@ public class NotifyManager {
/**
* 创建通知
*
* @param water
* @param step
*/
public
void
createNotifyDialog
(
int
water
,
int
step
)
{
manager
=
(
NotificationManager
)
activity
.
getSystemService
(
NOTIFICATION_SERVICE
);
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O
)
{
createNotificationChannel
(
CHINALL_ID
,
CHINALL_NAME
,
NotificationManager
.
IMPORTANCE_
DEFAULT
);
createNotificationChannel
(
CHINALL_ID
,
CHINALL_NAME
,
NotificationManager
.
IMPORTANCE_
MAX
);
}
notification
=
new
NotificationCompat
.
Builder
(
activity
,
CHINALL_ID
)
.
setOngoing
(
true
)
...
...
@@ -60,10 +64,11 @@ public class NotifyManager {
.
setContentTitle
(
""
)
.
setContentText
(
""
)
.
setWhen
(
System
.
currentTimeMillis
())
.
setOngoing
(
true
)
.
setSmallIcon
(
R
.
mipmap
.
ic_launcher
)
.
setContent
(
getRemoteViews
(
water
,
step
))
.
setVibrate
(
new
long
[]{
0
})
.
build
();
updateRemoteView
(
water
,
step
);
}
...
...
@@ -73,6 +78,8 @@ public class NotifyManager {
@TargetApi
(
Build
.
VERSION_CODES
.
O
)
private
void
createNotificationChannel
(
String
channelId
,
String
channelName
,
int
importance
)
{
NotificationChannel
channel
=
new
NotificationChannel
(
channelId
,
channelName
,
importance
);
channel
.
enableVibration
(
false
);
//震动不可用
channel
.
setSound
(
null
,
null
);
//设置没有声
NotificationManager
notificationManager
=
(
NotificationManager
)
activity
.
getSystemService
(
NOTIFICATION_SERVICE
);
notificationManager
.
createNotificationChannel
(
channel
);
...
...
@@ -89,10 +96,9 @@ public class NotifyManager {
Intent
intent
=
new
Intent
(
activity
,
MainActivity
.
class
);
PendingIntent
pendingIntent
=
PendingIntent
.
getActivity
(
activity
,
0
,
intent
,
PendingIntent
.
FLAG_UPDATE_CURRENT
);
remoteViews
=
new
RemoteViews
(
activity
.
getPackageName
(),
R
.
layout
.
remoteview
);
remoteViews
.
setTextViewText
(
R
.
id
.
tv_left
,
"开始"
+
System
.
currentTimeMillis
());
//设置textView内容
remoteViews
.
setTextViewText
(
R
.
id
.
tv_right
,
"跳转"
+
step
);
//设置textView内容
remoteViews
.
setImageViewResource
(
R
.
id
.
icon
,
R
.
mipmap
.
ic_launcher
);
//设置图片样式
remoteViews
.
setOnClickPendingIntent
(
R
.
id
.
tv_right
,
pendingIntent
);
//点击跳转事件
remoteViews
.
setTextViewText
(
R
.
id
.
notify_step
,
"今日步数 "
+
step
+
" 步"
);
remoteViews
.
setImageViewResource
(
R
.
id
.
icon
,
R
.
mipmap
.
ic_launcher
);
remoteViews
.
setOnClickPendingIntent
(
R
.
id
.
notify_root
,
pendingIntent
);
return
remoteViews
;
}
...
...
@@ -103,8 +109,15 @@ public class NotifyManager {
* @param step
*/
public
void
updateRemoteView
(
int
water
,
int
step
)
{
if
(
remoteViews
!=
null
)
{
remoteViews
.
setTextViewText
(
R
.
id
.
tv_right
,
"跳转"
+
step
);
//设置textView内容
Context
context
=
MintsApplication
.
getContext
();
if
(
remoteViews
!=
null
&&
context
!=
null
)
{
// remoteViews.setTextViewText(R.id.notify_step,
// new SpanUtils()
// .append("今日步数 ").setForegroundColor(context.getResources().getColor(R.color.black_text))
// .append(step + "").setBold().setForegroundColor(context.getResources().getColor(R.color.main_mints))
// .append(" 步").setForegroundColor(context.getResources().getColor(R.color.black_text))
// .create());//设置textView内容
remoteViews
.
setTextViewText
(
R
.
id
.
notify_step
,
"今日步数 "
+
step
+
" 步"
);
if
(
manager
!=
null
&&
notification
!=
null
)
{
manager
.
notify
(
1
,
notification
);
}
...
...
highgold/app/src/main/java/com/mints/highgold/manager/TTAdManagerHolder.java
View file @
6890a753
...
...
@@ -45,6 +45,8 @@ public class TTAdManagerHolder {
/*信息流*/
public
static
final
String
TT_AD_NATIVEEXPRESS_ID_DIALOG
=
"945131750"
;
//信息流弹窗
public
static
final
String
TT_AD_NATIVEEXPRESS_ID_WATER1
=
"945450706"
;
//喝水界面1
public
static
final
String
TT_AD_NATIVEEXPRESS_ID_WATER2
=
"945450708"
;
//喝水界面2
public
static
final
String
TT_AD_NATIVEEXPRESS_ID_LIEBAO_LISTEXIT
=
"945131730"
;
//猎豹列表和退出
/*全屏广告*/
...
...
highgold/app/src/main/java/com/mints/highgold/manager/TTNativeExpressManager.java
View file @
6890a753
...
...
@@ -14,6 +14,7 @@ import com.bytedance.sdk.openadsdk.TTAdNative;
import
com.bytedance.sdk.openadsdk.TTAppDownloadListener
;
import
com.bytedance.sdk.openadsdk.TTNativeExpressAd
;
import
com.mints.highgold.ui.widgets.DislikeDialog
;
import
com.mints.highgold.utils.LogUtil
;
import
java.util.List
;
...
...
@@ -81,7 +82,6 @@ public class TTNativeExpressManager {
* 获取穿山甲banner
*
* @param context
* @param frameLayout
* @param viewWidth
* @param viewHeight
*/
...
...
@@ -100,6 +100,8 @@ public class TTNativeExpressManager {
mTTAdNative
.
loadNativeExpressAd
(
adSlot
,
new
TTAdNative
.
NativeExpressAdListener
()
{
@Override
public
void
onError
(
int
code
,
String
message
)
{
LogUtil
.
d
(
"TTNativeExpressManager"
,
message
);
if
(
view
!=
null
)
{
view
.
removeAllViews
();
}
...
...
highgold/app/src/main/java/com/mints/highgold/mvp/model/WalkBean.java
0 → 100644
View file @
6890a753
package
com
.
mints
.
highgold
.
mvp
.
model
;
import
java.io.Serializable
;
public
class
WalkBean
implements
Serializable
{
//"walk":"步数"
// "coin":"走路气泡"
// maxWalk 步数上限
// isWalk 是否领取奖励
// walkText 下次奖励内容
private
int
walk
;
private
int
coin
;
private
int
maxWalk
;
private
boolean
isWalk
;
private
String
walkText
;
public
int
getWalk
()
{
return
walk
;
}
public
int
getCoin
()
{
return
coin
;
}
public
int
getMaxWalk
()
{
return
maxWalk
;
}
public
boolean
isWalk
()
{
return
isWalk
;
}
public
String
getWalkText
()
{
return
walkText
;
}
}
highgold/app/src/main/java/com/mints/highgold/mvp/presenters/LoanPresenter.java
View file @
6890a753
...
...
@@ -17,6 +17,7 @@ import com.mints.highgold.mvp.model.LocationBean;
import
com.mints.highgold.mvp.model.MainWaterBean
;
import
com.mints.highgold.mvp.model.UserBean
;
import
com.mints.highgold.mvp.model.UserTaskMsgBean
;
import
com.mints.highgold.mvp.model.WalkBean
;
import
com.mints.highgold.mvp.views.LoanView
;
import
com.mints.highgold.utils.DeviceUuidFactory
;
import
com.mints.highgold.utils.DevicesUtil
;
...
...
@@ -141,7 +142,7 @@ public class LoanPresenter extends BasePresenter<LoanView> {
public
void
getWalkMsg
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getWalkMsg
(),
new
BaseSubscriber
<
BaseResponse
<
MainWater
Bean
>>()
{
new
BaseSubscriber
<
BaseResponse
<
Walk
Bean
>>()
{
@Override
public
void
onCompleted
()
{
if
(
isLinkView
())
return
;
...
...
@@ -158,7 +159,7 @@ public class LoanPresenter extends BasePresenter<LoanView> {
}
@Override
public
void
onNext
(
BaseResponse
<
MainWater
Bean
>
baseResponse
)
{
public
void
onNext
(
BaseResponse
<
Walk
Bean
>
baseResponse
)
{
if
(
isLinkView
())
return
;
int
code
=
baseResponse
.
getStatus
();
...
...
highgold/app/src/main/java/com/mints/highgold/mvp/presenters/WaterPresenter.java
View file @
6890a753
This diff is collapsed.
Click to expand it.
highgold/app/src/main/java/com/mints/highgold/mvp/views/LoanView.java
View file @
6890a753
...
...
@@ -4,6 +4,7 @@ package com.mints.highgold.mvp.views;
import
com.mints.highgold.mvp.model.GameBean
;
import
com.mints.highgold.mvp.model.MainWaterBean
;
import
com.mints.highgold.mvp.model.UserTaskMsgBean
;
import
com.mints.highgold.mvp.model.WalkBean
;
public
interface
LoanView
extends
BaseView
{
...
...
@@ -34,7 +35,7 @@ public interface LoanView extends BaseView {
*
* @param data
*/
void
getWalkMsgSuc
(
MainWater
Bean
data
);
void
getWalkMsgSuc
(
Walk
Bean
data
);
/**
* 提交游戏信息
...
...
highgold/app/src/main/java/com/mints/highgold/mvp/views/WaterView.java
View file @
6890a753
...
...
@@ -36,27 +36,8 @@ public interface WaterView extends BaseView {
*/
void
getWaterMsgHomeSuc
(
MainWaterBean
data
);
/**
* 提交游戏信息
*
* @param data
*/
void
gameAddSuc
(
String
eventType
,
Object
data
);
/**
* 获取server端游戏列表
*
* @param data
*/
void
getGameListSuc
(
GameBean
data
);
/**
* 首页喝水打卡成功
*/
void
clickForWaterSuc
(
int
waterCoin
);
/**
* 获取红包状态成功
*/
void
getRedboxEnterSuc
();
}
highgold/app/src/main/java/com/mints/highgold/net/LoanService.java
View file @
6890a753
...
...
@@ -26,6 +26,7 @@ import com.mints.highgold.mvp.model.UserBean;
import
com.mints.highgold.mvp.model.UserTaskMsgBean
;
import
com.mints.highgold.mvp.model.UserVersusBean
;
import
com.mints.highgold.mvp.model.Version
;
import
com.mints.highgold.mvp.model.WalkBean
;
import
com.mints.highgold.mvp.model.WaterMsgBean
;
import
com.mints.highgold.utils.AESUtils
;
import
com.mints.highgold.utils.SPUtil
;
...
...
@@ -370,7 +371,7 @@ public interface LoanService {
* @return
*/
@POST
(
"api/hv110/getWalkMsg"
)
Observable
<
BaseResponse
<
MainWater
Bean
>>
getWalkMsg
();
Observable
<
BaseResponse
<
Walk
Bean
>>
getWalkMsg
();
/**
* 猎豹游戏 上传信息
...
...
highgold/app/src/main/java/com/mints/highgold/ui/activitys/WaterActivity.java
View file @
6890a753
This diff is collapsed.
Click to expand it.
highgold/app/src/main/java/com/mints/highgold/ui/fragment/MainFragment.java
View file @
6890a753
...
...
@@ -36,15 +36,18 @@ import com.mints.highgold.common.Constant;
import
com.mints.highgold.manager.AdMngrHolder
;
import
com.mints.highgold.manager.AmapLocationManager
;
import
com.mints.highgold.manager.LiebaoManager
;
import
com.mints.highgold.manager.NotifyManager
;
import
com.mints.highgold.manager.ShumeiManager
;
import
com.mints.highgold.manager.TTAdManagerHolder
;
import
com.mints.highgold.manager.TTBannerManager
;
import
com.mints.highgold.manager.TTNativeExpressManager
;
import
com.mints.highgold.manager.TTPreLoadExpressManager
;
import
com.mints.highgold.manager.UserManager
;
import
com.mints.highgold.mvp.model.GameBean
;
import
com.mints.highgold.mvp.model.MainWaterBean
;
import
com.mints.highgold.mvp.model.UserTaskMsgBean
;
import
com.mints.highgold.mvp.model.VedioAdingBean
;
import
com.mints.highgold.mvp.model.WalkBean
;
import
com.mints.highgold.mvp.presenters.LoanPresenter
;
import
com.mints.highgold.mvp.views.LoanView
;
import
com.mints.highgold.ui.activitys.AdWebActivity
;
...
...
@@ -115,8 +118,6 @@ public class MainFragment extends BaseFragment
StepView
wvWater
;
@Bind
(
R
.
id
.
iv_fragment_main_gift
)
ImageView
ivFragmentMainGift
;
@Bind
(
R
.
id
.
tv_fragment_main_friend_hint
)
TextView
tvFragmentMainFriendHint
;
@Bind
(
R
.
id
.
tv_fragment_main_gamehint
)
TextView
tvFragmentMainGamehint
;
@Bind
(
R
.
id
.
rl_fragment_main_redbox
)
...
...
@@ -160,8 +161,9 @@ public class MainFragment extends BaseFragment
private
boolean
isShowGiftPop
=
false
;
// true-点击过pop
private
TTBannerManager
ttUtil
;
private
MainWater
Bean
waterBean
;
private
Walk
Bean
waterBean
;
private
MintegralInscreenVedioAdManager
mintegralInscreenVedioAdManager
;
private
NotifyManager
notifyManager
;
@Override
protected
int
getContentViewLayoutID
()
{
...
...
@@ -394,7 +396,7 @@ public class MainFragment extends BaseFragment
}
break
;
case
R
.
id
.
ll_fragment_main_friend
:
// 邀请好友
readyGo
(
FriendsNew
Activity
.
class
);
readyGo
(
Water
Activity
.
class
);
// readyGo(AdWebActivity.class);
break
;
case
R
.
id
.
iv_fragment_main_banner
:
...
...
@@ -655,51 +657,36 @@ public class MainFragment extends BaseFragment
}
@Override
public
void
getWalkMsgSuc
(
MainWater
Bean
data
)
{
public
void
getWalkMsgSuc
(
Walk
Bean
data
)
{
if
(
data
==
null
)
{
waterBean
=
null
;
return
;
}
waterBean
=
data
;
// wvWater.setWaterMaxProgress(data.getNeedDrink());
wvWater
.
setWaterProgress
(
data
.
getComplete
(),
data
.
getNeedDrink
());
// 老用户未登录
if
(
spUtil
.
getBoolean
(
Constant
.
USER_DEVICE_LOGIN
,
false
)
&&
!
userManager
.
userIsLogin
())
{
wvWater
.
setTvDrinkBtnText
(
"去登录"
);
}
// 喝水按钮状态
if
(
data
.
isStatus
())
{
wvWater
.
setWaterMaxProgress
(
data
.
getMaxWalk
());
wvWater
.
setWaterProgress
(
data
.
getWalk
(),
data
.
getMaxWalk
());
// 是否可领取奖励
if
(
data
.
isWalk
())
{
wvWater
.
setTvDrinkBtnEnable
();
}
else
{
wvWater
.
setTvDrinkBtnNone
();
}
// 喝水时间
if
(
data
.
getNextGetCoinTime
()
>
0
)
{
if
(!
AppConfig
.
isMintegralInscreenFlag
)
{
if
(
mintegralInscreenVedioAdManager
!=
null
)
{
mintegralInscreenVedioAdManager
.
loadMintegralInscreen
();
}
}
wvWater
.
setTvDrinkBtnText
(
"喝水打卡"
);
// wvWater.setWaterViewTime(getActivity(), data.getNextGetCoinTime());
wvWater
.
setTvDrinkBtnText
(
data
.
getWalkText
());
if
(
data
.
getCoin
()
>
0
)
{
wvWater
.
setFourWaterViewVisible
(
data
.
getCoin
());
}
else
{
wvWater
.
setTvDrinkBtnText
(
"喝水领金币"
);
// wvWater.setWaterViewTimeGone();
}
if
(
spUtil
.
getBoolean
(
Constant
.
USER_DEVICE_LOGIN
,
false
)
&&
!
userManager
.
userIsLogin
())
{
wvWater
.
setTvDrinkBtnText
(
"去登录"
);
wvWater
.
setFourWaterViewGone
();
}
// 第4个汽泡
if
(
userManager
.
getAdShowFlag
())
{
if
(
data
.
getCoin
()
>
0
)
{
wvWater
.
setFourWaterViewVisible
(
data
.
getCoin
());
}
else
{
wvWater
.
setFourWaterViewGone
();
}
}
else
{
wvWater
.
setFourWaterViewGone
();
if
(
notifyManager
!=
null
)
{
notifyManager
.
updateRemoteView
(
0
,
data
.
getWalk
());
}
}
...
...
@@ -746,7 +733,7 @@ public class MainFragment extends BaseFragment
if
(
waterCoin
>
0
)
{
// 显示喝水金币
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
waterCoin
);
bundle
.
putString
(
Constant
.
MAIN_CARRIET_TURN
,
Constant
.
CARRIER_
HOMEWATER_BUBBLE_TIM
E
);
bundle
.
putString
(
Constant
.
MAIN_CARRIET_TURN
,
Constant
.
CARRIER_
WALK_BUBBL
E
);
}
else
{
bundle
.
putString
(
Constant
.
MAIN_CARRIET_TURN
,
Constant
.
CARRIER_HOMEWATER_HIT
);
}
...
...
@@ -892,6 +879,8 @@ public class MainFragment extends BaseFragment
userManager
=
UserManager
.
getInstance
();
liebaoManager
=
LiebaoManager
.
getInstance
();
vedioAdingManager
=
VedioAdingManager
.
getInstance
(
getActivity
());
notifyManager
=
NotifyManager
.
getInstance
(
getActivity
());
notifyManager
.
createNotifyDialog
(
0
,
0
);
mintegralInscreenVedioAdManager
=
MintegralInscreenVedioAdManager
.
getInstance
(
getActivity
());
mLocationHandler
=
new
AmapLocationManager
.
LocationHandler
(
getActivity
());
...
...
@@ -1067,11 +1056,6 @@ public class MainFragment extends BaseFragment
CmGameSdk
.
setGameExitInfoCallback
(
this
);
// 显示游戏文字
// tvFragmentMainFriendHint.setText(new SpanUtils().append("每邀一位得")
// .append("1000").setForegroundColor(getResources().getColor(R.color.main_mints))
// .create());
// 显示红包动画
initGiftAnim
(
rlFragmentMainRedbox
);
...
...
@@ -1204,6 +1188,7 @@ public class MainFragment extends BaseFragment
TextView
tvDrinkWatch
=
v_help
.
findViewById
(
R
.
id
.
tv_maindrink_watch
);
TextView
tvDrinkExit
=
v_help
.
findViewById
(
R
.
id
.
tv_maindrink_exit
);
TextView
tvDrinkCash
=
v_help
.
findViewById
(
R
.
id
.
tv_maindrink_cash
);
TextView
tvDrinkWalk
=
v_help
.
findViewById
(
R
.
id
.
tv_maindrink_walk
);
BigDecimal
allcoinBig
=
new
BigDecimal
(
String
.
valueOf
(
allCoin
));
BigDecimal
rateBig
=
new
BigDecimal
(
"10000"
);
...
...
@@ -1219,6 +1204,8 @@ public class MainFragment extends BaseFragment
.
create
()
);
tvDrinkWalk
.
setText
(
"当天累计超过2000步,需观看趣味视频兑换"
);
AlertDialog
.
Builder
builder
=
new
AlertDialog
.
Builder
(
getActivity
(),
R
.
style
.
notice_dialog
);
drinkDialog
=
builder
.
create
();
drinkDialog
.
setView
(
v_help
);
...
...
@@ -1229,7 +1216,7 @@ public class MainFragment extends BaseFragment
waterIncome
=
curCoin
;
getRandomVedioAd
(
Constant
.
CARRIER_
HOMEWATER
_BUBBLE
,
curCoin
,
""
,
userConfig
.
getConfigDownloadTaskDownloadCoin
());
getRandomVedioAd
(
Constant
.
CARRIER_
WALK
_BUBBLE
,
curCoin
,
""
,
userConfig
.
getConfigDownloadTaskDownloadCoin
());
}
});
ivDrinkExit
.
setOnClickListener
(
v
->
{
...
...
highgold/app/src/main/java/com/mints/highgold/ui/widgets/StepView.java
View file @
6890a753
...
...
@@ -50,9 +50,6 @@ public class StepView extends FrameLayout
private
BubbleSeekBar
bsStep
;
private
RelativeLayout
rlNext
;
// 喝水进度
private
CircleProgress
cpWater
;
// 浮云金币动画
private
ObjectAnimator
oneAnimator
;
private
ObjectAnimator
twoAnimator
;
...
...
@@ -145,6 +142,7 @@ public class StepView extends FrameLayout
tvTwoWater
.
setOnClickListener
(
this
);
tvThreeWater
.
setOnClickListener
(
this
);
tvFouroneWater
.
setOnClickListener
(
this
);
tvNext
.
setOnClickListener
(
this
);
}
/**
...
...
@@ -247,7 +245,6 @@ public class StepView extends FrameLayout
}
else
{
bsStep
.
setProgress
(
maxProgress
);
}
bsStep
.
setmMax
(
maxProgress
);
}
if
(
tvStep
!=
null
)
{
tvStep
.
setText
(
progress
+
""
);
...
...
@@ -260,10 +257,9 @@ public class StepView extends FrameLayout
* @param maxProgress
*/
public
void
setWaterMaxProgress
(
int
maxProgress
)
{
// if (cpWater != null && tvDrink != null) {
// cpWater.setMaxValue(maxProgress);
// tvDrink.setText("0/" + maxProgress + "ml");
// }
if
(
bsStep
!=
null
)
{
bsStep
.
setmMax
(
maxProgress
);
}
}
/**
...
...
highgold/app/src/main/java/com/mints/highgold/ui/widgets/seekbar/BubbleSeekBar.java
View file @
6890a753
...
...
@@ -517,7 +517,8 @@ public class BubbleSeekBar extends View {
// draw thumb
mPaint
.
setColor
(
mThumbColor
);
canvas
.
drawCircle
(
mThumbCenterX
,
yTop
,
isThumbOnDragging
?
mThumbRadiusOnDragging
:
mThumbRadius
,
mPaint
);
// canvas.drawCircle(mThumbCenterX, yTop, isThumbOnDragging ? mThumbRadiusOnDragging : mThumbRadius, mPaint);
canvas
.
drawCircle
(
mThumbCenterX
,
yTop
,
isThumbOnDragging
?
mThumbRadiusOnDragging
/
2
:
mThumbRadius
/
2
,
mPaint
);
}
@Override
...
...
highgold/app/src/main/res/layout/activity_water.xml
View file @
6890a753
This diff is collapsed.
Click to expand it.
highgold/app/src/main/res/layout/fragment_main_first.xml
View file @
6890a753
...
...
@@ -194,7 +194,7 @@
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"
邀请好友
"
android:text=
"
喝水打卡
"
android:textColor=
"@color/black"
android:textSize=
"18sp"
/>
...
...
@@ -203,7 +203,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"2pt"
android:text=
"邀请好友来
赚钱
"
android:text=
"邀请好友来
打卡
"
android:textColor=
"@color/graya"
android:textSize=
"12sp"
/>
</LinearLayout>
...
...
highgold/app/src/main/res/layout/remoteview.xml
View file @
6890a753
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<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/notify_root"
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"48dp"
android:background=
"#0f0"
android:orientation=
"vertical"
>
android:layout_height=
"wrap_content"
>
<LinearLayout
android:id=
"@+id/notify_title_root"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/domob_dimen18"
android:layout_marginTop=
"@dimen/domob_dimen20"
>
<ImageView
android:layout_width=
"@dimen/domob_dimen18"
android:layout_height=
"@dimen/domob_dimen18"
android:src=
"@mipmap/ic_launcher"
/>
<ImageView
android:id=
"@+id/icon"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:layout_centerInParent=
"true"
android:src=
"@mipmap/ic_launcher"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"@dimen/domob_dimen6"
android:gravity=
"center_vertical"
android:text=
"淘金空间高额版"
android:textColor=
"@color/black"
android:textSize=
"@dimen/font_size_10"
/>
</LinearLayout>
<TextView
android:id=
"@+id/
tv_left
"
android:id=
"@+id/
notity_title
"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_
alignParentStart=
"true
"
android:layout_
marginLeft=
"@dimen/domob_dimen18
"
android:gravity=
"center_vertical"
android:text=
"Left"
/>
android:text=
"淘金空间高额版"
android:layout_marginTop=
"@dimen/domob_dimen10"
android:textColor=
"@color/black"
android:textSize=
"@dimen/font_size_14"
/>
<TextView
android:id=
"@+id/
tv_right
"
android:id=
"@+id/
notify_step
"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_
alignParentEnd=
"true
"
android:layout_
marginLeft=
"@dimen/domob_dimen18
"
android:gravity=
"center_vertical"
android:text=
"Right"
/>
</RelativeLayout>
android:text=
""
android:layout_marginTop=
"4dp"
android:textColor=
"@color/black"
android:layout_marginBottom=
"20dp"
android:textSize=
"@dimen/font_size_14"
/>
</LinearLayout>
highgold/app/src/main/res/layout/view_dialog_main_drink.xml
View file @
6890a753
...
...
@@ -31,6 +31,7 @@
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/tv_maindrink_walk"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
...
...
highgold/app/src/main/res/layout/view_step.xml
View file @
6890a753
...
...
@@ -34,8 +34,8 @@
app:bsb_min=
"0"
app:bsb_progress=
"0"
app:bsb_track_size=
"4dp"
app:bsb_track_color=
"@color/
gray
"
app:bsb_second_track_color=
"@color/
tv_basic_color
"
app:bsb_track_color=
"@color/
tv_basic_color
"
app:bsb_second_track_color=
"@color/
main_mints
"
app:bsb_section_count=
"4"
app:bsb_section_text_position=
"below_section_mark"
app:bsb_show_section_mark=
"true"
...
...
@@ -49,7 +49,7 @@
<RelativeLayout
android:id=
"@+id/rl_water_next"
android:layout_width=
"2
2
0pt"
android:layout_width=
"2
5
0pt"
android:layout_height=
"70pt"
android:layout_gravity=
"bottom|center_horizontal"
android:layout_marginRight=
"4pt"
...
...
@@ -65,7 +65,7 @@
android:gravity=
"center"
android:text=
"继续努力"
android:textColor=
"@color/water_hint_btn"
android:textSize=
"1
4
sp"
/>
android:textSize=
"1
2
sp"
/>
</RelativeLayout>
...
...
highgold/app/src/main/res/values/dimens.xml
View file @
6890a753
...
...
@@ -34,4 +34,5 @@
<dimen
name=
"font_size_13"
>
13sp
</dimen>
<dimen
name=
"font_size_12"
>
12sp
</dimen>
<dimen
name=
"font_size_10"
>
10sp
</dimen>
<dimen
name=
"font_size_8"
>
8sp
</dimen>
</resources>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment