Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
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_goodmoney
Commits
907cc3f4
Commit
907cc3f4
authored
Mar 25, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大转盘优化 代码合并
parent
de5584d9
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
191 additions
and
215 deletions
+191
-215
build.gradle
GoodMoney/app/build.gradle
+0
-3
BannerManager.kt
.../main/java/com/mints/goodmoney/ad/banner/BannerManager.kt
+1
-1
TurnTablePresenter.kt
.../com/mints/goodmoney/mvp/presenters/TurnTablePresenter.kt
+14
-8
TurnTableView.kt
.../main/java/com/mints/goodmoney/mvp/views/TurnTableView.kt
+1
-1
LoanService.java
...pp/src/main/java/com/mints/goodmoney/net/LoanService.java
+21
-20
AdBannerAdapter.java
.../java/com/mints/goodmoney/ui/adapter/AdBannerAdapter.java
+20
-1
BannerBaseAdapter.java
...ava/com/mints/goodmoney/ui/adapter/BannerBaseAdapter.java
+5
-2
TurnTableAdapter.java
...java/com/mints/goodmoney/ui/adapter/TurnTableAdapter.java
+25
-0
TurnTableFragment.kt
...java/com/mints/goodmoney/ui/fragment/TurnTableFragment.kt
+39
-22
BannerView.java
.../main/java/com/mints/goodmoney/ui/widgets/BannerView.java
+1
-1
RotateListener.java
...odmoney/ui/widgets/wheelsruf/listener/RotateListener.java
+1
-1
WheelSurfPanView.java
...goodmoney/ui/widgets/wheelsruf/view/WheelSurfPanView.java
+3
-3
WheelSurfView.java
...ts/goodmoney/ui/widgets/wheelsruf/view/WheelSurfView.java
+7
-7
fragment_main_my.xml
GoodMoney/app/src/main/res/layout/fragment_main_my.xml
+5
-2
fragment_main_turntable.xml
...Money/app/src/main/res/layout/fragment_main_turntable.xml
+16
-8
item_banner_ad.xml
GoodMoney/app/src/main/res/layout/item_banner_ad.xml
+2
-1
bg_turn.png
GoodMoney/app/src/main/res/mipmap-xhdpi/bg_turn.png
+0
-0
bg_turn_font.png
GoodMoney/app/src/main/res/mipmap-xhdpi/bg_turn_font.png
+0
-0
node.png
GoodMoney/app/src/main/res/mipmap-xxhdpi/node.png
+0
-0
yuanhuan.png
GoodMoney/app/src/main/res/mipmap-xxhdpi/yuanhuan.png
+0
-0
attrs.xml
GoodMoney/app/src/main/res/values/attrs.xml
+28
-0
colors.xml
GoodMoney/app/src/main/res/values/colors.xml
+1
-0
settings.gradle
GoodMoney/settings.gradle
+1
-2
build.gradle
GoodMoney/wheelsruflibrary/build.gradle
+0
-34
proguard-rules.pro
GoodMoney/wheelsruflibrary/proguard-rules.pro
+0
-21
ExampleInstrumentedTest.java
.../cretin/www/wheelsruflibrary/ExampleInstrumentedTest.java
+0
-26
AndroidManifest.xml
GoodMoney/wheelsruflibrary/src/main/AndroidManifest.xml
+0
-2
attrs.xml
GoodMoney/wheelsruflibrary/src/main/res/values/attrs.xml
+0
-29
strings.xml
GoodMoney/wheelsruflibrary/src/main/res/values/strings.xml
+0
-3
ExampleUnitTest.java
...java/com/cretin/www/wheelsruflibrary/ExampleUnitTest.java
+0
-17
No files found.
GoodMoney/app/build.gradle
View file @
907cc3f4
...
...
@@ -181,8 +181,6 @@ dependencies {
implementation
'com.github.SheHuan:NiceImageView:1.0.5'
// 跑马灯
implementation
'com.sunfusheng:marqueeview:1.2.0'
// 转盘
implementation
project
(
':wheelsruflibrary'
)
// 工具类
...
...
@@ -286,7 +284,6 @@ dependencies {
// 激励视频RTA
implementation
(
name:
'taskwake1.0'
,
ext:
'aar'
)
implementation
'com.squareup.retrofit2:converter-gson:2.6.2'
// testImplementation 'junit:junit:4.13'
// androidTestImplementation 'androidx.test.ext:junit:1.1.2'
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/banner/BannerManager.kt
View file @
907cc3f4
...
...
@@ -90,7 +90,7 @@ object BannerManager {
}
override
fun
onAdShow
(
p0
:
View
?,
p1
:
Int
)
{
LogUtil
.
d
(
"BannerManager"
,
"onAdShow"
)
}
override
fun
onRenderSuccess
(
view
:
View
,
p1
:
Float
,
p2
:
Float
)
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/TurnTablePresenter.kt
View file @
907cc3f4
package
com.mints.goodmoney.mvp.presenters
import
android.text.TextUtils
import
com.google.gson.Gson
import
com.google.gson.JsonObject
import
com.google.gson.reflect.TypeToken
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.common.DeviceInfo
import
com.mints.library.net.neterror.BaseSubscriber
import
com.mints.library.net.neterror.Throwable
import
com.mints.goodmoney.manager.AppHttpManager
import
com.mints.goodmoney.manager.ShumeiManager
import
com.mints.goodmoney.manager.UserManager
...
...
@@ -12,11 +13,13 @@ import com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.model.ClickTurnBean
import
com.mints.goodmoney.mvp.model.TurnBean
import
com.mints.goodmoney.mvp.model.UserBean
import
com.mints.goodmoney.mvp.views.PanView
import
com.mints.goodmoney.mvp.views.TurnTableView
import
com.mints.goodmoney.utils.DeviceUuidFactory
import
com.mints.library.net.neterror.BaseSubscriber
import
com.mints.library.net.neterror.Throwable
import
java.util.*
class
TurnTablePresenter
:
BasePresenter
<
TurnTableView
>()
{
fun
getTurnMsg
()
{
...
...
@@ -75,22 +78,25 @@ class TurnTablePresenter : BasePresenter<TurnTableView>() {
fun
cashoutLeaders
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
cashoutLeaders
(),
object
:
BaseSubscriber
<
BaseResponse
<
Any
>>()
{
object
:
BaseSubscriber
<
BaseResponse
<
JsonObject
>>()
{
override
fun
onCompleted
()
{
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
view
.
showToast
(
e
.
message
)
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
Any
>)
{
override
fun
onNext
(
baseResponse
:
BaseResponse
<
JsonObject
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
getStatus
()
val
message
=
baseResponse
.
getMessage
()
when
(
code
)
{
200
->
{
view
.
cashoutLeadersSuc
()
val
data
=
baseResponse
.
data
if
(
data
.
get
(
"list"
)
!=
null
)
{
val
listArray
=
Gson
().
fromJson
(
data
.
get
(
"list"
),
object
:
TypeToken
<
ArrayList
<
String
>>()
{}.
type
)
as
ArrayList
<
String
>
view
.
cashoutLeadersSuc
(
listArray
)
}
}
else
->
view
.
showToast
(
message
)
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/views/TurnTableView.kt
View file @
907cc3f4
...
...
@@ -5,6 +5,6 @@ import com.mints.goodmoney.mvp.model.TurnBean
interface
TurnTableView
:
BaseView
{
fun
getTurnTableSuc
(
data
:
TurnBean
)
fun
cashoutLeadersSuc
()
fun
cashoutLeadersSuc
(
data
:
ArrayList
<
String
>
)
fun
clickForTurnSuc
(
data
:
ClickTurnBean
)
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/net/LoanService.java
View file @
907cc3f4
...
...
@@ -32,6 +32,7 @@ import com.mints.goodmoney.mvp.model.XmlyUnlockBean;
import
com.mints.goodmoney.utils.AESUtils
;
import
com.orhanobut.logger.Logger
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.TimeUnit
;
...
...
@@ -602,8 +603,8 @@ public interface LoanService {
*
* @return
*/
@POST
(
"common/cashoutLeaders"
)
Observable
<
BaseResponse
<
Object
>>
cashoutLeaders
();
@POST
(
"common/cashoutLeaders
ForApp
"
)
Observable
<
BaseResponse
<
Json
Object
>>
cashoutLeaders
();
/**
* 大转盘点击入口
...
...
@@ -635,29 +636,29 @@ public interface LoanService {
builder
.
readTimeout
(
20
,
TimeUnit
.
SECONDS
);
builder
.
writeTimeout
(
20
,
TimeUnit
.
SECONDS
);
if
(
BuildConfig
.
DEBUG
)
{
HttpLoggingInterceptor
logging
=
new
HttpLoggingInterceptor
();
logging
.
setLevel
(
HttpLoggingInterceptor
.
Level
.
BODY
);
builder
.
interceptors
().
add
(
logging
);
}
// if (BuildConfig.DEBUG) {
// HttpLoggingInterceptor logging = new HttpLoggingInterceptor(message -> {
// if (TextUtils.isEmpty(message)) return;
// String s = message.substring(0, 1);
// String request = message.substring(0, 4);
// if ("{".equals(s) || "[".equals(s)) {
// Logger.json(message);
// } else if (request.contains("-->") || request.contains("<--")) {
// Logger.d("Method" + message);
// } else {
// Logger.d("params:" + message);
// }
// });
// HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
// logging.setLevel(HttpLoggingInterceptor.Level.BODY);
// builder.interceptors().add(logging);
// }
if
(
BuildConfig
.
DEBUG
)
{
HttpLoggingInterceptor
logging
=
new
HttpLoggingInterceptor
(
message
->
{
if
(
TextUtils
.
isEmpty
(
message
))
return
;
String
s
=
message
.
substring
(
0
,
1
);
String
request
=
message
.
substring
(
0
,
4
);
if
(
"{"
.
equals
(
s
)
||
"["
.
equals
(
s
))
{
Logger
.
json
(
message
);
}
else
if
(
request
.
contains
(
"-->"
)
||
request
.
contains
(
"<--"
))
{
Logger
.
d
(
"Method"
+
message
);
}
else
{
Logger
.
d
(
"params:"
+
message
);
}
});
logging
.
setLevel
(
HttpLoggingInterceptor
.
Level
.
BODY
);
builder
.
interceptors
().
add
(
logging
);
}
OkHttpInterceptor
okHttpInterceptor
=
new
OkHttpInterceptor
(
AESUtils
.
getDefaultKey
());
// builder.interceptors().add(domainInterceptor);
builder
.
interceptors
().
add
(
okHttpInterceptor
);
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/adapter/AdBannerAdapter.java
View file @
907cc3f4
...
...
@@ -2,6 +2,8 @@ package com.mints.goodmoney.ui.adapter;
import
android.content.Context
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewParent
;
import
android.widget.FrameLayout
;
import
android.widget.ImageView
;
...
...
@@ -9,6 +11,7 @@ import com.mints.goodmoney.R;
import
com.mints.goodmoney.ad.banner.BannerManager
;
import
com.mints.goodmoney.manager.TtCsjAdManager
;
import
com.mints.goodmoney.mvp.model.RotationChartBean
;
import
com.mints.goodmoney.utils.LogUtil
;
import
com.mints.library.utils.GlideUtils
;
...
...
@@ -23,9 +26,13 @@ public class AdBannerAdapter extends BannerBaseAdapter<RotationChartBean.ListBea
private
Context
mContext
;
private
int
mCurrentPostion
=
0
;
// private FrameLayout frameLayout;
public
AdBannerAdapter
(
Context
context
)
{
super
(
context
);
this
.
mContext
=
context
;
// frameLayout = new FrameLayout(context);
}
public
void
setAdPosition
(
int
position
)
{
...
...
@@ -41,8 +48,20 @@ public class AdBannerAdapter extends BannerBaseAdapter<RotationChartBean.ListBea
protected
void
convert
(
View
convertView
,
RotationChartBean
.
ListBean
listBean
,
int
currentPostion
)
{
FrameLayout
container
=
getView
(
R
.
id
.
ad_container
);
if
(
currentPostion
==
mCurrentPostion
)
{
// mCurrentPostion = 1
// if (currentPostion == 0) {
// BannerManager.INSTANCE.getTtBanner(TtCsjAdManager.TT_AD_BANNER_MY, frameLayout);
// }
if
(
currentPostion
==
mCurrentPostion
&&
mCurrentPostion
!=
-
1
)
{
BannerManager
.
INSTANCE
.
getTtBanner
(
TtCsjAdManager
.
TT_AD_BANNER_MY
,
container
);
// final ViewParent customParent = frameLayout.getParent();
// if (customParent != this) {
// if (customParent != null) {
// ((ViewGroup) customParent).removeAllViews();
// }
// container.addView(frameLayout);
// }
}
else
{
ImageView
iv
=
getView
(
R
.
id
.
iv_banner_ad
);
iv
.
setVisibility
(
View
.
VISIBLE
);
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/adapter/BannerBaseAdapter.java
View file @
907cc3f4
...
...
@@ -27,7 +27,7 @@ import java.util.List;
public
abstract
class
BannerBaseAdapter
<
T
>
extends
PagerAdapter
{
private
Context
mContext
;
p
rivate
List
<
T
>
mDatas
=
new
ArrayList
<>();
p
ublic
List
<
T
>
mDatas
=
new
ArrayList
<>();
private
OnPageTouchListener
mListener
;
private
long
mDownTime
;
private
View
mConvertView
;
...
...
@@ -40,8 +40,11 @@ public abstract class BannerBaseAdapter<T> extends PagerAdapter {
}
@Override
// public int getCount() {
// return mDatas == null || mDatas.size() == 0 ? 0 : mDatas.size();
// }
public
int
getCount
()
{
return
mDatas
==
null
||
mDatas
.
size
()
==
0
?
0
:
mDatas
.
size
()
;
return
mDatas
==
null
||
mDatas
.
size
()
==
0
?
0
:
Integer
.
MAX_VALUE
;
}
@Override
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/adapter/TurnTableAdapter.java
View file @
907cc3f4
...
...
@@ -7,29 +7,37 @@ import android.text.TextUtils;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.animation.AccelerateDecelerateInterpolator
;
import
android.widget.BaseAdapter
;
import
android.widget.FrameLayout
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
com.daimajia.androidanimations.library.Techniques
;
import
com.daimajia.androidanimations.library.YoYo
;
import
com.mints.goodmoney.R
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.manager.BxmManager
;
import
com.mints.goodmoney.manager.UserManager
;
import
com.mints.goodmoney.mvp.model.BannerBean
;
import
com.mints.goodmoney.mvp.model.TurnBean
;
import
com.mints.goodmoney.utils.rxutil.CommonRxTask
;
import
com.mints.goodmoney.utils.rxutil.RxjavaUtil
;
import
com.mints.library.utils.GlideUtils
;
import
java.util.List
;
import
java.util.Timer
;
public
class
TurnTableAdapter
extends
BaseAdapter
{
private
List
<
TurnBean
.
BottomsBean
>
orders
;
private
Activity
activity
;
private
YoYo
.
AnimationComposer
rope
;
public
TurnTableAdapter
(
Activity
activity
,
List
<
TurnBean
.
BottomsBean
>
orders
)
{
this
.
orders
=
orders
;
this
.
activity
=
activity
;
rope
=
YoYo
.
with
(
Techniques
.
Pulse
).
duration
(
1000
).
repeat
(
0
);
}
@Override
...
...
@@ -74,6 +82,23 @@ public class TurnTableAdapter extends BaseAdapter {
viewHolder
.
tv_turn_top
.
setText
(
TextUtils
.
isEmpty
(
data
.
getRewardTitle
())
?
""
:
data
.
getRewardTitle
());
viewHolder
.
tv_turn_bottom
.
setText
(
data
.
getTitle
());
if
(!
TextUtils
.
isEmpty
(
data
.
getRewardTitle
()))
{
RxjavaUtil
.
executeRxTask
(
new
CommonRxTask
<
String
>(
""
)
{
@Override
public
void
doInIOThread
()
{
try
{
Thread
.
sleep
(
500
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
}
@Override
public
void
doInUIThread
()
{
rope
.
playOn
(
viewHolder
.
ic_turn_icon
);
}
});
}
}
return
convertView
;
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/TurnTableFragment.kt
View file @
907cc3f4
...
...
@@ -11,8 +11,6 @@ import android.view.View
import
android.widget.AdapterView
import
android.widget.ImageView
import
androidx.core.content.ContextCompat
import
com.cretin.www.wheelsruflibrary.listener.RotateListener
import
com.cretin.www.wheelsruflibrary.view.WheelSurfView
import
com.daimajia.androidanimations.library.Techniques
import
com.daimajia.androidanimations.library.YoYo
import
com.mints.goodmoney.MintsApplication
...
...
@@ -29,6 +27,9 @@ import com.mints.goodmoney.ui.activitys.*
import
com.mints.goodmoney.ui.adapter.TurnTableAdapter
import
com.mints.goodmoney.ui.fragment.base.BaseFragment
import
com.mints.goodmoney.ui.widgets.seekbar.BubbleUtils
import
com.mints.goodmoney.ui.widgets.wheelsruf.listener.RotateListener
import
com.mints.goodmoney.ui.widgets.wheelsruf.view.WheelSurfView
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.SpanUtils
import
com.mints.library.net.netstatus.NetUtils
import
com.tbruyelle.rxpermissions.RxPermissions
...
...
@@ -62,6 +63,9 @@ class TurnTableFragment : BaseFragment(), TurnTableView, AdapterView.OnItemClick
private
var
clickTurnData
:
ClickTurnBean
?
=
null
private
var
turnTableData
:
TurnBean
?
=
null
// 第一次拉取的转盘size 若size被改变 需要重置转盘
private
var
firstPanSize
=
0
// 提现列表展示
private
var
drawcashList
:
MutableList
<
String
>
=
mutableListOf
()
...
...
@@ -101,7 +105,6 @@ class TurnTableFragment : BaseFragment(), TurnTableView, AdapterView.OnItemClick
// 游客登录
turnTablePresenter
.
userLogin
()
}
marqueeView
.
startFlipping
()
}
}
...
...
@@ -126,6 +129,11 @@ class TurnTableFragment : BaseFragment(), TurnTableView, AdapterView.OnItemClick
}
override
fun
getTurnTableSuc
(
data
:
TurnBean
)
{
if
(
AppConfig
.
fragmentClickFlag
!=
Constant
.
FRAGMENT_CLICK_THREE
||
activity
==
null
||
requireActivity
().
isFinishing
)
{
return
}
if
(
drawcashList
.
size
==
0
)
{
turnTablePresenter
.
cashoutLeaders
()
}
...
...
@@ -133,12 +141,14 @@ class TurnTableFragment : BaseFragment(), TurnTableView, AdapterView.OnItemClick
initTurnView
(
data
)
}
override
fun
cashoutLeadersSuc
()
{
override
fun
cashoutLeadersSuc
(
data
:
ArrayList
<
String
>)
{
drawcashList
=
data
initMarqueeView
()
}
override
fun
clickForTurnSuc
(
data
:
ClickTurnBean
)
{
if
(
activity
==
null
||
requireActivity
().
isFinishing
)
{
if
(
AppConfig
.
fragmentClickFlag
!=
Constant
.
FRAGMENT_CLICK_THREE
||
activity
==
null
||
requireActivity
().
isFinishing
)
{
return
}
...
...
@@ -148,10 +158,13 @@ class TurnTableFragment : BaseFragment(), TurnTableView, AdapterView.OnItemClick
}
private
fun
initTurnView
(
data
:
TurnBean
)
{
if
(
activity
==
null
||
requireActivity
().
isFinishing
)
{
if
(
AppConfig
.
fragmentClickFlag
!=
Constant
.
FRAGMENT_CLICK_THREE
||
activity
==
null
||
requireActivity
().
isFinishing
)
{
return
}
LogUtil
.
d
(
"initTurnView"
,
"initTurnView"
)
turnTableData
=
data
if
(
data
.
configs
.
size
==
0
)
{
...
...
@@ -159,6 +172,15 @@ class TurnTableFragment : BaseFragment(), TurnTableView, AdapterView.OnItemClick
return
}
// 大转盘异常校验
if
(
firstPanSize
==
0
)
{
firstPanSize
=
data
.
configs
.
size
}
if
(
firstPanSize
!=
data
.
configs
.
size
)
{
showToast
(
"大转盘异常,请退出应用,重新进入"
)
return
}
colorsArray
.
clear
()
desList
.
clear
()
bitmapList
.
clear
()
...
...
@@ -195,6 +217,7 @@ class TurnTableFragment : BaseFragment(), TurnTableView, AdapterView.OnItemClick
turnTableView
.
setRotateListener
(
object
:
RotateListener
{
override
fun
rotateEnd
(
position
:
Int
,
des
:
String
)
{
isTurnTable
=
true
clickTurnData
?.
let
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
it
.
config
.
count
)
...
...
@@ -211,6 +234,10 @@ class TurnTableFragment : BaseFragment(), TurnTableView, AdapterView.OnItemClick
return
}
if
(
data
.
surplus
<=
0
)
{
showToast
(
"抽奖次数已用完"
)
return
}
if
(
isTurnTable
)
{
isTurnTable
=
false
turnTablePresenter
.
clickForTurn
()
...
...
@@ -218,7 +245,7 @@ class TurnTableFragment : BaseFragment(), TurnTableView, AdapterView.OnItemClick
}
})
tvHintTurnTable
.
text
=
data
.
titleMsg
tvHintTurnTable
.
text
=
data
.
titleMsg
tvTurnTimes
.
text
=
SpanUtils
()
.
append
(
"本轮抽奖将剩余"
).
setForegroundColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
black
))
.
append
(
data
.
surplus
.
toString
()).
setFontSize
(
BubbleUtils
.
dp2px
(
28
)).
setForegroundColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
color_E72C2B
))
...
...
@@ -234,30 +261,20 @@ class TurnTableFragment : BaseFragment(), TurnTableView, AdapterView.OnItemClick
}
private
fun
actionPageForType
(
toOtherKey
:
String
,
position
:
Int
)
{
if
(!
userManager
.
userIsLogin
())
{
readyGo
(
WxLoginActivity
::
class
.
java
)
return
}
//0-微转,1-珊瑚下载,2-分红,3-鱼丸盒子,4-每日任务
when
(
toOtherKey
)
{
"0"
->
{
if
(!
userManager
.
userIsLogin
())
{
readyGo
(
WxLoginActivity
::
class
.
java
)
return
}
shareArticle
()
}
"1"
->
{
if
(!
userManager
.
userIsLogin
())
{
readyGo
(
WxLoginActivity
::
class
.
java
)
return
}
readyGo
(
TaskCpdActivity
::
class
.
java
)
}
"2"
->
{
if
(!
userManager
.
userIsLogin
())
{
readyGo
(
WxLoginActivity
::
class
.
java
)
return
}
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
WRAPPER_TYPE
,
Constant
.
WRAPPER_TYPE_FRIENDS
)
readyGo
(
WrapperActivity
::
class
.
java
,
bundle
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/BannerView.java
View file @
907cc3f4
...
...
@@ -58,7 +58,7 @@ public class BannerView extends FrameLayout {
private
float
alphaMin
=
0.8f
;
// 自动轮播间隔时长
private
long
mScrollDuration
=
4
000
;
private
long
mScrollDuration
=
5
000
;
private
long
mAnimDuration
=
1200
;
// 是否是动画滚动
private
boolean
isAnimScroll
;
...
...
GoodMoney/
wheelsruflibrary/src/main/java/com/cretin/www/wheelsruflibrary
/listener/RotateListener.java
→
GoodMoney/
app/src/main/java/com/mints/goodmoney/ui/widgets/wheelsruf
/listener/RotateListener.java
View file @
907cc3f4
package
com
.
cretin
.
www
.
wheelsruflibrary
.
listener
;
package
com
.
mints
.
goodmoney
.
ui
.
widgets
.
wheelsruf
.
listener
;
import
android.animation.ValueAnimator
;
import
android.widget.ImageView
;
...
...
GoodMoney/
wheelsruflibrary/src/main/java/com/cretin/www/wheelsruflibrary
/view/WheelSurfPanView.java
→
GoodMoney/
app/src/main/java/com/mints/goodmoney/ui/widgets/wheelsruf
/view/WheelSurfPanView.java
View file @
907cc3f4
package
com
.
cretin
.
www
.
wheelsruflibrary
.
view
;
package
com
.
mints
.
goodmoney
.
ui
.
widgets
.
wheelsruf
.
view
;
import
android.animation.Animator
;
import
android.animation.AnimatorListenerAdapter
;
...
...
@@ -21,8 +21,8 @@ import android.util.Log;
import
android.view.View
;
import
android.widget.TextView
;
import
com.
cretin.www.wheelsruflibrar
y.R
;
import
com.
cretin.www.wheelsruflibrary
.listener.RotateListener
;
import
com.
mints.goodmone
y.R
;
import
com.
mints.goodmoney.ui.widgets.wheelsruf
.listener.RotateListener
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
GoodMoney/
wheelsruflibrary/src/main/java/com/cretin/www/wheelsruflibrary
/view/WheelSurfView.java
→
GoodMoney/
app/src/main/java/com/mints/goodmoney/ui/widgets/wheelsruf
/view/WheelSurfView.java
View file @
907cc3f4
package
com
.
cretin
.
www
.
wheelsruflibrary
.
view
;
package
com
.
mints
.
goodmoney
.
ui
.
widgets
.
wheelsruf
.
view
;
import
android.annotation.TargetApi
;
import
android.content.Context
;
...
...
@@ -13,8 +13,8 @@ import android.view.ViewTreeObserver;
import
android.widget.ImageView
;
import
android.widget.RelativeLayout
;
import
com.
cretin.www.wheelsruflibrar
y.R
;
import
com.
cretin.www.wheelsruflibrary
.listener.RotateListener
;
import
com.
mints.goodmone
y.R
;
import
com.
mints.goodmoney.ui.widgets.wheelsruf
.listener.RotateListener
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -70,8 +70,8 @@ public class WheelSurfView extends RelativeLayout {
//添加圆盘视图
mWheelSurfPanView
=
new
WheelSurfPanView
(
mContext
,
attrs
);
RelativeLayout
.
LayoutParams
layoutParams
=
new
RelativeLayout
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
MATCH_PARENT
);
LayoutParams
layoutParams
=
new
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
MATCH_PARENT
);
layoutParams
.
addRule
(
RelativeLayout
.
CENTER_IN_PARENT
);
mWheelSurfPanView
.
setLayoutParams
(
layoutParams
);
addView
(
mWheelSurfPanView
);
...
...
@@ -85,8 +85,8 @@ public class WheelSurfView extends RelativeLayout {
mStart
.
setImageResource
(
mGoImgRes
);
}
//给图片设置LayoutParams
RelativeLayout
.
LayoutParams
llStart
=
new
RelativeLayout
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
LayoutParams
llStart
=
new
LayoutParams
(
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
llStart
.
addRule
(
RelativeLayout
.
CENTER_IN_PARENT
);
mStart
.
setLayoutParams
(
llStart
);
addView
(
mStart
);
...
...
GoodMoney/app/src/main/res/layout/fragment_main_my.xml
View file @
907cc3f4
...
...
@@ -56,10 +56,13 @@
android:layout_width=
"match_parent"
android:layout_height=
"150dp"
android:visibility=
"gone"
app:bannerAnimScroll=
"false"
app:bannerAnimDuration=
"1500"
app:bannerAnimScroll=
"true"
app:bannerAutoScroll=
"true"
app:bannerPageAlpha=
"0"
app:bannerPageMargin=
"0dp"
app:bannerPagePercent=
"1"
/>
app:bannerPagePercent=
"1"
app:bannerScrollDuration=
"5000"
/>
<include
layout=
"@layout/view_title"
/>
...
...
GoodMoney/app/src/main/res/layout/fragment_main_turntable.xml
View file @
907cc3f4
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView
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"
xmlns:wheelSurfView=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
xmlns:tools=
"http://schemas.android.com/tools
"
android:background=
"@mipmap/bg_turn
"
android:overScrollMode=
"never"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@mipmap/bg_turntable"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"30dp"
android:layout_marginTop=
"30dp"
android:gravity=
"center_vertical"
>
android:layout_marginTop=
"40dp"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"wrap_content"
...
...
@@ -38,17 +39,24 @@
app:mvTextSize=
"15sp"
/>
</LinearLayout>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"10dp"
android:src=
"@mipmap/bg_turn_font"
/>
<TextView
android:id=
"@+id/tvHintTurnTable"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"120dp"
tools:text=
"每日0点重置抽奖次数"
android:layout_marginTop=
"20dp"
android:textColor=
"@color/red"
android:textSize=
"18sp"
/>
android:textSize=
"18sp"
tools:text=
"每日0点重置抽奖次数"
/>
<com.
cretin.www.wheelsruflibrary
.view.WheelSurfView
<com.
mints.goodmoney.ui.widgets.wheelsruf
.view.WheelSurfView
android:id=
"@+id/turnTableView"
android:layout_width=
"330dp"
android:layout_height=
"330dp"
...
...
GoodMoney/app/src/main/res/layout/item_banner_ad.xml
View file @
907cc3f4
...
...
@@ -2,12 +2,13 @@
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/ad_container"
android:layout_width=
"match_parent"
android:layout_height=
"1
5
0dp"
android:layout_height=
"1
4
0dp"
android:background=
"@color/color_0000"
>
<ImageView
android:visibility=
"gone"
android:id=
"@+id/iv_banner_ad"
android:scaleType=
"fitXY"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
...
...
GoodMoney/app/src/main/res/mipmap-xhdpi/bg_turn.png
0 → 100644
View file @
907cc3f4
283 KB
GoodMoney/app/src/main/res/mipmap-xhdpi/bg_turn_font.png
0 → 100644
View file @
907cc3f4
37.3 KB
GoodMoney/
wheelsruflibrary
/src/main/res/mipmap-xxhdpi/node.png
→
GoodMoney/
app
/src/main/res/mipmap-xxhdpi/node.png
100755 → 100644
View file @
907cc3f4
File moved
GoodMoney/
wheelsruflibrary
/src/main/res/mipmap-xxhdpi/yuanhuan.png
→
GoodMoney/
app
/src/main/res/mipmap-xxhdpi/yuanhuan.png
View file @
907cc3f4
File moved
GoodMoney/app/src/main/res/values/attrs.xml
View file @
907cc3f4
...
...
@@ -180,4 +180,32 @@
<attr
name=
"text"
format=
"string"
/>
<attr
name=
"radius"
format=
"integer"
/>
</declare-styleable>
<declare-styleable
name=
"wheelSurfView"
>
<!--类型 根据类型来加载资源 1 默认类型 用户需要提供文字和图片 2 暴力模式 用户只需要提供一张圆形的用来旋转的图片-->
<attr
name=
"type"
format=
"integer"
/>
<!--最低圈数 默认值3 也就是说每次旋转都会最少转3圈-->
<attr
name=
"minTimes"
format=
"integer"
/>
<!--扇形的数量 也就是奖品的份数-->
<attr
name=
"typenum"
format=
"integer"
/>
<!--每一个扇形旋转消耗的时间-->
<attr
name=
"vartime"
format=
"integer"
/>
<!--类型为1的时候 需要提供每个扇形上面的文字描述 长度必须和typenum一致-->
<attr
name=
"deses"
format=
"reference"
/>
<!--类型为1的时候 需要提供每个扇形上面的图片展示 长度必须和typenum一致-->
<attr
name=
"icons"
format=
"reference"
/>
<!--类型为1的时候 需要提供每个扇形背景颜色 长度必须和typenum一致-->
<attr
name=
"colors"
format=
"reference"
/>
<!--中间图片的引用 有默认值 不填则使用默认值-->
<attr
name=
"goImg"
format=
"reference"
/>
<!--圆环的图片引用 有默认值 不填则使用默认值-->
<attr
name=
"huanImg"
format=
"reference"
/>
<!--如果类型为2 此值必填-->
<attr
name=
"mainImg"
format=
"reference"
/>
<!--文字大小-->
<attr
name=
"textSize"
format=
"dimension"
/>
<!--文字颜色-->
<attr
name=
"textColor"
format=
"reference|color"
/>
</declare-styleable>
</resources>
\ No newline at end of file
GoodMoney/app/src/main/res/values/colors.xml
View file @
907cc3f4
...
...
@@ -19,6 +19,7 @@
<color
name=
"color_600c224b"
>
#600c224b
</color>
<color
name=
"color_fcf16e"
>
#fcf16e
</color>
<color
name=
"color_F18542"
>
#F18542
</color>
<color
name=
"color_FEEBC8"
>
#FEEBC8
</color>
<color
name=
"color_63A0B9"
>
#63A0B9
</color>
<color
name=
"color_7EE2FF"
>
#7EE2FF
</color>
<color
name=
"color_255186"
>
#255186
</color>
...
...
GoodMoney/settings.gradle
View file @
907cc3f4
include
':demo'
include
':app'
include
':shareSdkLib'
include
':wheelsruflibrary'
\ No newline at end of file
include
':shareSdkLib'
\ No newline at end of file
GoodMoney/wheelsruflibrary/build.gradle
deleted
100755 → 0
View file @
de5584d9
apply
plugin:
'com.android.library'
android
{
compileSdkVersion
26
defaultConfig
{
minSdkVersion
14
targetSdkVersion
26
versionCode
1
versionName
"1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes
{
release
{
minifyEnabled
false
proguardFiles
getDefaultProguardFile
(
'proguard-android.txt'
),
'proguard-rules.pro'
}
}
}
dependencies
{
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
implementation
'com.android.support:appcompat-v7:26.1.0'
testImplementation
'junit:junit:4.12'
androidTestImplementation
'com.android.support.test:runner:1.0.1'
androidTestImplementation
'com.android.support.test.espresso:espresso-core:3.0.1'
}
GoodMoney/wheelsruflibrary/proguard-rules.pro
deleted
100755 → 0
View file @
de5584d9
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
GoodMoney/wheelsruflibrary/src/androidTest/java/com/cretin/www/wheelsruflibrary/ExampleInstrumentedTest.java
deleted
100755 → 0
View file @
de5584d9
package
com
.
cretin
.
www
.
wheelsruflibrary
;
import
android.content.Context
;
import
android.support.test.InstrumentationRegistry
;
import
android.support.test.runner.AndroidJUnit4
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
static
org
.
junit
.
Assert
.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith
(
AndroidJUnit4
.
class
)
public
class
ExampleInstrumentedTest
{
@Test
public
void
useAppContext
()
throws
Exception
{
// Context of the app under test.
Context
appContext
=
InstrumentationRegistry
.
getTargetContext
();
assertEquals
(
"com.cretin.www.wheelsruflibrary.test"
,
appContext
.
getPackageName
());
}
}
GoodMoney/wheelsruflibrary/src/main/AndroidManifest.xml
deleted
100755 → 0
View file @
de5584d9
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.cretin.www.wheelsruflibrary"
/>
GoodMoney/wheelsruflibrary/src/main/res/values/attrs.xml
deleted
100755 → 0
View file @
de5584d9
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable
name=
"wheelSurfView"
>
<!--类型 根据类型来加载资源 1 默认类型 用户需要提供文字和图片 2 暴力模式 用户只需要提供一张圆形的用来旋转的图片-->
<attr
name=
"type"
format=
"integer"
/>
<!--最低圈数 默认值3 也就是说每次旋转都会最少转3圈-->
<attr
name=
"minTimes"
format=
"integer"
/>
<!--扇形的数量 也就是奖品的份数-->
<attr
name=
"typenum"
format=
"integer"
/>
<!--每一个扇形旋转消耗的时间-->
<attr
name=
"vartime"
format=
"integer"
/>
<!--类型为1的时候 需要提供每个扇形上面的文字描述 长度必须和typenum一致-->
<attr
name=
"deses"
format=
"reference"
/>
<!--类型为1的时候 需要提供每个扇形上面的图片展示 长度必须和typenum一致-->
<attr
name=
"icons"
format=
"reference"
/>
<!--类型为1的时候 需要提供每个扇形背景颜色 长度必须和typenum一致-->
<attr
name=
"colors"
format=
"reference"
/>
<!--中间图片的引用 有默认值 不填则使用默认值-->
<attr
name=
"goImg"
format=
"reference"
/>
<!--圆环的图片引用 有默认值 不填则使用默认值-->
<attr
name=
"huanImg"
format=
"reference"
/>
<!--如果类型为2 此值必填-->
<attr
name=
"mainImg"
format=
"reference"
/>
<!--文字大小-->
<attr
name=
"textSize"
format=
"dimension"
/>
<!--文字颜色-->
<attr
name=
"textColor"
format=
"reference|color"
/>
</declare-styleable>
</resources>
\ No newline at end of file
GoodMoney/wheelsruflibrary/src/main/res/values/strings.xml
deleted
100755 → 0
View file @
de5584d9
<resources>
<string
name=
"app_name"
>
WheelSrufLibrary
</string>
</resources>
GoodMoney/wheelsruflibrary/src/test/java/com/cretin/www/wheelsruflibrary/ExampleUnitTest.java
deleted
100755 → 0
View file @
de5584d9
package
com
.
cretin
.
www
.
wheelsruflibrary
;
import
org.junit.Test
;
import
static
org
.
junit
.
Assert
.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public
class
ExampleUnitTest
{
@Test
public
void
addition_isCorrect
()
throws
Exception
{
assertEquals
(
4
,
2
+
2
);
}
}
\ 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