Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
L
LuckyFarm
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
LuckyFarm
Commits
3fb320ed
Commit
3fb320ed
authored
Oct 16, 2020
by
maxiaoliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改任务领取
parent
2bedaf94
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
49 additions
and
38 deletions
+49
-38
WateringTaskAdpater.kt
app/src/main/java/com/ym/game/adapter/WateringTaskAdpater.kt
+25
-23
IGameApi.kt
app/src/main/java/com/ym/game/net/IGameApi.kt
+9
-0
MainDialog.kt
app/src/main/java/com/ym/game/view/MainDialog.kt
+13
-14
TurntableDialog.kt
app/src/main/java/com/ym/game/view/TurntableDialog.kt
+1
-1
icon_main_popup_receive.png
app/src/main/res/drawable-xhdpi/icon_main_popup_receive.png
+0
-0
icon_main_popup_receiveed.png
...src/main/res/drawable-xhdpi/icon_main_popup_receiveed.png
+0
-0
icon_mian_popup_complete.png
app/src/main/res/drawable-xhdpi/icon_mian_popup_complete.png
+0
-0
icon_main_popup_receive.png
app/src/main/res/mipmap-xhdpi/icon_main_popup_receive.png
+0
-0
icon_main_popup_receiveed.png
app/src/main/res/mipmap-xhdpi/icon_main_popup_receiveed.png
+0
-0
icon_mian_popup_complete.png
app/src/main/res/mipmap-xhdpi/icon_mian_popup_complete.png
+0
-0
NetConfig.java
library/src/main/java/com/ym/library/net/NetConfig.java
+1
-0
No files found.
app/src/main/java/com/ym/game/adapter/WateringTaskAdpater.kt
View file @
3fb320ed
...
@@ -10,6 +10,7 @@ import android.widget.RelativeLayout
...
@@ -10,6 +10,7 @@ import android.widget.RelativeLayout
import
android.widget.TextView
import
android.widget.TextView
import
androidx.recyclerview.widget.RecyclerView
import
androidx.recyclerview.widget.RecyclerView
import
com.ym.game.module.WateringTaskEntity
import
com.ym.game.module.WateringTaskEntity
import
com.ym.game.net.GameApiClient
import
com.ym.game.view.MainDialog
import
com.ym.game.view.MainDialog
import
com.ym.library.base.BaseRecyclerAdapter
import
com.ym.library.base.BaseRecyclerAdapter
import
com.ym.library.net.BaseObserver
import
com.ym.library.net.BaseObserver
...
@@ -102,6 +103,7 @@ class WateringTaskAdpater :
...
@@ -102,6 +103,7 @@ class WateringTaskAdpater :
inner
class
WateringTaskHolder
(
itemView
:
View
)
:
RecyclerView
.
ViewHolder
(
itemView
)
{
inner
class
WateringTaskHolder
(
itemView
:
View
)
:
RecyclerView
.
ViewHolder
(
itemView
)
{
val
tvTitle
:
TextView
=
itemView
.
findViewById
(
R
.
id
.
tv_watering_item_title
)
val
tvTitle
:
TextView
=
itemView
.
findViewById
(
R
.
id
.
tv_watering_item_title
)
// val btnProgess: ProgressButton = itemView.findViewById(R.id.progess_watering_item)
// val btnProgess: ProgressButton = itemView.findViewById(R.id.progess_watering_item)
val
btnProgess
:
ProgressBar
=
itemView
.
findViewById
(
R
.
id
.
progess_watering_item
)
val
btnProgess
:
ProgressBar
=
itemView
.
findViewById
(
R
.
id
.
progess_watering_item
)
val
tvProgess
:
TextView
=
itemView
.
findViewById
(
R
.
id
.
tv_watering_item_progess
)
val
tvProgess
:
TextView
=
itemView
.
findViewById
(
R
.
id
.
tv_watering_item_progess
)
...
@@ -112,28 +114,28 @@ class WateringTaskAdpater :
...
@@ -112,28 +114,28 @@ class WateringTaskAdpater :
// 领取水滴 type:1每日领水 2高额领水
// 领取水滴 type:1每日领水 2高额领水
private
fun
getDripTaskReceive
(
type
:
Int
,
data
:
WateringTaskEntity
)
{
private
fun
getDripTaskReceive
(
type
:
Int
,
data
:
WateringTaskEntity
)
{
// OrchardApiClient.orchard.getDrip
TaskReceive(data.id, type).compose(
GameApiClient
.
gameApi
.
get
TaskReceive
(
data
.
id
,
type
).
compose
(
//
RxSchedulers.observableIO2Main()
RxSchedulers
.
observableIO2Main
()
//
).subscribe(object : BaseObserver<Any>() {
).
subscribe
(
object
:
BaseObserver
<
Any
>()
{
//
override fun onSuccess(result: Any?) {
override
fun
onSuccess
(
result
:
Any
?)
{
//
if (result != null) {
if
(
result
!=
null
)
{
//
LogUtils.i("WateringTaskAdpater", "水滴领取" + result)
LogUtils
.
i
(
"WateringTaskAdpater"
,
"水滴领取"
+
result
)
//
var adType = ""
var
adType
=
""
////
if (type == 1) {
if
(
type
==
1
)
{
////
RxBusUtil.getDefault()
RxBusUtil
.
getDefault
()
////
.send(RxBusConstant.RX_MAIN_WATER_DROP_UPDATE)
.
send
(
RxBusConstant
.
RX_MAIN_WATER_DROP_UPDATE
)
////
adType = "每日"
adType
=
"每日"
////
} else if (type == 2) {
}
else
if
(
type
==
2
)
{
////
RxBusUtil.getDefault()
RxBusUtil
.
getDefault
()
////
.send(RxBusConstant.RX_MAIN_HIGH_WATER_DROP_UPDATE)
.
send
(
RxBusConstant
.
RX_MAIN_HIGH_WATER_DROP_UPDATE
)
////
adType = "高额"
adType
=
"高额"
////
}
}
// // MainDialog.showgetWaterDrop(mContext, 1,adType, data.awardNum
)
MainDialog
.
showgetWaterDrop
(
mContext
,
4
,
adType
,
data
.
awardNum
,
null
)
//
RxBusUtil.getDefault().send(RxBusConstant.RX_MAIN_UPDATE_HOME_INFO)
RxBusUtil
.
getDefault
().
send
(
RxBusConstant
.
RX_MAIN_UPDATE_HOME_INFO
)
//
}
}
//
}
}
//
//
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {}
override
fun
onFailure
(
e
:
Throwable
?,
code
:
String
?,
errorMsg
:
String
?)
{}
//
})
})
}
}
}
}
\ No newline at end of file
app/src/main/java/com/ym/game/net/IGameApi.kt
View file @
3fb320ed
...
@@ -143,4 +143,13 @@ interface IGameApi {
...
@@ -143,4 +143,13 @@ interface IGameApi {
*/
*/
@POST
(
NetConfig
.
Game
.
URL_GAME_OPEN_BOX
)
@POST
(
NetConfig
.
Game
.
URL_GAME_OPEN_BOX
)
fun
getopenBox
():
Observable
<
Response
<
FlyBoxEntity
>>
fun
getopenBox
():
Observable
<
Response
<
FlyBoxEntity
>>
/**
* 任务领取奖励
* @param
* @paramq
* @return
*/
@POST
(
NetConfig
.
Game
.
URL_GAME_DAILY_TASK_RECEIVE
)
fun
getTaskReceive
(
@Query
(
"id"
)
id
:
Int
,
@Query
(
"type"
)
type
:
Int
):
Observable
<
Response
<
Any
>>
}
}
\ No newline at end of file
app/src/main/java/com/ym/game/view/MainDialog.kt
View file @
3fb320ed
...
@@ -69,7 +69,6 @@ object MainDialog {
...
@@ -69,7 +69,6 @@ object MainDialog {
)
)
val
ivGetDropBg
=
mDialogView
?.
findViewById
<
ImageView
>(
R
.
id
.
iv_get_drop_bg
)
val
ivGetDropBg
=
mDialogView
?.
findViewById
<
ImageView
>(
R
.
id
.
iv_get_drop_bg
)
val
tvGetDropCount
=
mDialogView
?.
findViewById
<
TextView
>(
R
.
id
.
tv_get_drop_count
)
val
tvGetDropCount
=
mDialogView
?.
findViewById
<
TextView
>(
R
.
id
.
tv_get_drop_count
)
val
layoutAd
=
mDialogView
?.
findViewById
<
FrameLayout
>(
R
.
id
.
layout_get_drop_ad
)
val
layoutAd
=
mDialogView
?.
findViewById
<
FrameLayout
>(
R
.
id
.
layout_get_drop_ad
)
val
llcontent2
=
mDialogView
?.
findViewById
<
LinearLayout
>(
R
.
id
.
id_ll_content_2
)
val
llcontent2
=
mDialogView
?.
findViewById
<
LinearLayout
>(
R
.
id
.
id_ll_content_2
)
...
@@ -88,19 +87,19 @@ object MainDialog {
...
@@ -88,19 +87,19 @@ object MainDialog {
tvGetDropCount
.
text
=
"x${list?.seedList[0].num}"
tvGetDropCount
.
text
=
"x${list?.seedList[0].num}"
}
else
if
(
list
?.
seedList
?.
size
==
2
)
{
}
else
if
(
list
?.
seedList
?.
size
==
2
)
{
llcontent2
.
visibility
=
View
.
VISIBLE
llcontent2
.
visibility
=
View
.
VISIBLE
setImage
(
ivGetDropBg
,
list
?.
seedList
[
1
].
id
)
setImage
(
ivGetDropBg
,
list
?.
seedList
[
0
].
id
)
tvGetDropCount
.
text
=
"x${list?.seedList[0].num}"
setImage
(
ivGetDropBg2
,
list
?.
seedList
[
1
].
id
)
setImage
(
ivGetDropBg2
,
list
?.
seedList
[
1
].
id
)
tvGetDropCount
.
text
=
"x${list?.seedList[1].num}"
tvGetDropCount2
.
text
=
"x${list?.seedList[1].num}"
tvGetDropCount2
.
text
=
"x${list?.seedList[1].num}"
}
else
if
(
list
?.
seedList
?.
size
==
3
)
{
}
else
if
(
list
?.
seedList
?.
size
==
3
)
{
llcontent2
.
visibility
=
View
.
VISIBLE
llcontent2
.
visibility
=
View
.
VISIBLE
llcontent3
.
visibility
=
View
.
VISIBLE
llcontent3
.
visibility
=
View
.
VISIBLE
setImage
(
ivGetDropBg
,
list
?.
seedList
[
2
].
id
)
setImage
(
ivGetDropBg
,
list
?.
seedList
[
0
].
id
)
setImage
(
ivGetDropBg2
,
list
?.
seedList
[
2
].
id
)
setImage
(
ivGetDropBg2
,
list
?.
seedList
[
1
].
id
)
setImage
(
ivGetDropBg3
,
list
?.
seedList
[
2
].
id
)
setImage
(
ivGetDropBg3
,
list
?.
seedList
[
2
].
id
)
tvGetDropCount
.
text
=
"x${list?.seedList[
2
].num}"
tvGetDropCount
.
text
=
"x${list?.seedList[
0
].num}"
tvGetDropCount2
.
text
=
"x${list?.seedList[
2
].num}"
tvGetDropCount2
.
text
=
"x${list?.seedList[
1
].num}"
tvGetDropCount3
.
text
=
"x${list?.seedList[2].num}"
tvGetDropCount3
.
text
=
"x${list?.seedList[2].num}"
}
}
...
@@ -188,7 +187,7 @@ object MainDialog {
...
@@ -188,7 +187,7 @@ object MainDialog {
)
)
val
tvmoneycount
=
mDialogView
?.
findViewById
<
TextView
>(
R
.
id
.
id_tv_moeny_count
)
val
tvmoneycount
=
mDialogView
?.
findViewById
<
TextView
>(
R
.
id
.
id_tv_moeny_count
)
tvmoneycount
.
text
=
"${rewardCount}"
tvmoneycount
.
text
=
"${rewardCount
/ 100
}"
mDialogView
.
findViewById
<
TextView
>(
R
.
id
.
id_tv_get
).
setOnClickListener
{
mDialogView
.
findViewById
<
TextView
>(
R
.
id
.
id_tv_get
).
setOnClickListener
{
...
@@ -239,19 +238,19 @@ object MainDialog {
...
@@ -239,19 +238,19 @@ object MainDialog {
tvGetDropCount
.
text
=
"x${result.seedList[0].num}"
tvGetDropCount
.
text
=
"x${result.seedList[0].num}"
}
else
if
(
result
.
seedList
?.
size
==
2
)
{
}
else
if
(
result
.
seedList
?.
size
==
2
)
{
llcontent2
.
visibility
=
View
.
VISIBLE
llcontent2
.
visibility
=
View
.
VISIBLE
setImage
(
ivGetDropBg
,
result
.
seedList
[
1
].
id
)
setImage
(
ivGetDropBg
,
result
.
seedList
[
0
].
id
)
setImage
(
ivGetDropBg2
,
result
.
seedList
[
1
].
id
)
setImage
(
ivGetDropBg2
,
result
.
seedList
[
1
].
id
)
tvGetDropCount
.
text
=
"x${result.seedList[
1
].num}"
tvGetDropCount
.
text
=
"x${result.seedList[
0
].num}"
tvGetDropCount2
.
text
=
"x${result.seedList[1].num}"
tvGetDropCount2
.
text
=
"x${result.seedList[1].num}"
}
else
if
(
result
.
seedList
?.
size
==
3
)
{
}
else
if
(
result
.
seedList
?.
size
==
3
)
{
llcontent2
.
visibility
=
View
.
VISIBLE
llcontent2
.
visibility
=
View
.
VISIBLE
llcontent3
.
visibility
=
View
.
VISIBLE
llcontent3
.
visibility
=
View
.
VISIBLE
setImage
(
ivGetDropBg
,
result
.
seedList
[
2
].
id
)
setImage
(
ivGetDropBg
,
result
.
seedList
[
0
].
id
)
setImage
(
ivGetDropBg2
,
result
.
seedList
[
2
].
id
)
setImage
(
ivGetDropBg2
,
result
.
seedList
[
1
].
id
)
setImage
(
ivGetDropBg3
,
result
.
seedList
[
2
].
id
)
setImage
(
ivGetDropBg3
,
result
.
seedList
[
2
].
id
)
tvGetDropCount
.
text
=
"x${result.seedList[
2
].num}"
tvGetDropCount
.
text
=
"x${result.seedList[
0
].num}"
tvGetDropCount2
.
text
=
"x${result.seedList[
2
].num}"
tvGetDropCount2
.
text
=
"x${result.seedList[
1
].num}"
tvGetDropCount3
.
text
=
"x${result.seedList[2].num}"
tvGetDropCount3
.
text
=
"x${result.seedList[2].num}"
}
}
...
...
app/src/main/java/com/ym/game/view/TurntableDialog.kt
View file @
3fb320ed
...
@@ -214,7 +214,7 @@ object TurntableDialog : TurntableUtils(), TurntableContract.View {
...
@@ -214,7 +214,7 @@ object TurntableDialog : TurntableUtils(), TurntableContract.View {
tvTime
?.
visibility
=
View
.
GONE
tvTime
?.
visibility
=
View
.
GONE
btnCountdown
?.
visibility
=
View
.
GONE
btnCountdown
?.
visibility
=
View
.
GONE
btnTurntableLottery
?.
visibility
=
View
.
VISIBLE
btnTurntableLottery
?.
visibility
=
View
.
VISIBLE
// btnTurntableLottery?.setImageResource(R.drawable.icon_main_turntable_free_draw_ad)
// btnTurntableLottery?.setImageResource(R.drawable.icon_main_turntable_free_draw_ad)
}
else
if
(
data
.
countDownSecond
!=
null
&&
data
.
countDownSecond
!!
>
0
)
{
}
else
if
(
data
.
countDownSecond
!=
null
&&
data
.
countDownSecond
!!
>
0
)
{
//倒计时
//倒计时
tvTime
?.
visibility
=
View
.
VISIBLE
tvTime
?.
visibility
=
View
.
VISIBLE
...
...
app/src/main/res/drawable-xhdpi/icon_main_popup_receive.png
deleted
100644 → 0
View file @
2bedaf94
13.7 KB
app/src/main/res/drawable-xhdpi/icon_main_popup_receiveed.png
deleted
100644 → 0
View file @
2bedaf94
6.23 KB
app/src/main/res/drawable-xhdpi/icon_mian_popup_complete.png
deleted
100644 → 0
View file @
2bedaf94
12 KB
app/src/main/res/mipmap-xhdpi/icon_main_popup_receive.png
0 → 100644
View file @
3fb320ed
12.8 KB
app/src/main/res/mipmap-xhdpi/icon_main_popup_receiveed.png
0 → 100644
View file @
3fb320ed
10.9 KB
app/src/main/res/mipmap-xhdpi/icon_mian_popup_complete.png
0 → 100644
View file @
3fb320ed
11.4 KB
library/src/main/java/com/ym/library/net/NetConfig.java
View file @
3fb320ed
...
@@ -253,6 +253,7 @@ public class NetConfig {
...
@@ -253,6 +253,7 @@ public class NetConfig {
public
static
final
String
URL_GAME_INCR_SEED
=
"app/v1/game/farm/incr_seed"
;
//看视频获得种子
public
static
final
String
URL_GAME_INCR_SEED
=
"app/v1/game/farm/incr_seed"
;
//看视频获得种子
public
static
final
String
URL_GAME_INCR_ACCELERATORS
=
"app/v1/game/farm/incr_accelerators"
;
//看视频获得加速剂
public
static
final
String
URL_GAME_INCR_ACCELERATORS
=
"app/v1/game/farm/incr_accelerators"
;
//看视频获得加速剂
public
static
final
String
URL_GAME_DAILY_TASK_RECEIVE
=
"app/v1/game/farm/daily_task_receive"
;
//看视频获得加速剂
}
}
...
...
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