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
57a1250e
Commit
57a1250e
authored
Dec 14, 2020
by
maxiaoliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改ui
parent
7b0a3f58
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
53 additions
and
13 deletions
+53
-13
GameActivity.kt
app/src/main/java/com/ym/msdh/game/GameActivity.kt
+2
-1
RecyclerViewSpacesItemDecoration.java
.../ym/msdh/game/utils/RecyclerViewSpacesItemDecoration.java
+32
-0
WareHouseDialog.kt
app/src/main/java/com/ym/msdh/game/view/WareHouseDialog.kt
+7
-0
dialog_layout_warehouse.xml
app/src/main/res/layout/dialog_layout_warehouse.xml
+1
-1
item_layout_warehouse.xml
app/src/main/res/layout/item_layout_warehouse.xml
+6
-6
CenterDialog.kt
library/src/main/java/com/ym/library/utils/CenterDialog.kt
+3
-3
icon_dialog_home_gold.png
...ary/src/main/res/drawable-xhdpi/icon_dialog_home_gold.png
+0
-0
dialog_home_style_1.xml
library/src/main/res/layout/dialog_home_style_1.xml
+1
-1
dialog_home_style_3.xml
library/src/main/res/layout/dialog_home_style_3.xml
+1
-1
No files found.
app/src/main/java/com/ym/msdh/game/GameActivity.kt
View file @
57a1250e
...
@@ -1290,7 +1290,8 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
...
@@ -1290,7 +1290,8 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
//大富翁美梦成真
//大富翁美梦成真
fun
onClickDreamComeTrue
()
{
fun
onClickDreamComeTrue
()
{
JumpUtils
.
h5Jump
(
"美梦成真"
,
"${Constant.Param.Confirmurl}?is_popup=${ispop}"
,
false
,
this
)
Log
.
e
(
"ispop"
,
""
+
ispop
)
JumpUtils
.
h5Jump
(
"美梦成真"
,
"${Constant.Param.Confirmurl}?is_popup1=${ispop}"
,
false
,
this
)
}
}
//展示不可拆红包弹窗
//展示不可拆红包弹窗
...
...
app/src/main/java/com/ym/msdh/game/utils/RecyclerViewSpacesItemDecoration.java
0 → 100755
View file @
57a1250e
package
com
.
ym
.
msdh
.
game
.
utils
;
import
android.graphics.Rect
;
import
android.view.View
;
import
androidx.recyclerview.widget.RecyclerView
;
import
java.util.HashMap
;
public
class
RecyclerViewSpacesItemDecoration
extends
RecyclerView
.
ItemDecoration
{
private
HashMap
<
String
,
Integer
>
mSpaceValueMap
;
public
static
final
String
TOP_DECORATION
=
"top_decoration"
;
public
static
final
String
BOTTOM_DECORATION
=
"bottom_decoration"
;
public
static
final
String
LEFT_DECORATION
=
"left_decoration"
;
public
static
final
String
RIGHT_DECORATION
=
"right_decoration"
;
public
RecyclerViewSpacesItemDecoration
(
HashMap
<
String
,
Integer
>
mSpaceValueMap
)
{
this
.
mSpaceValueMap
=
mSpaceValueMap
;
}
@Override
public
void
getItemOffsets
(
Rect
outRect
,
View
view
,
RecyclerView
parent
,
RecyclerView
.
State
state
)
{
if
(
mSpaceValueMap
.
get
(
TOP_DECORATION
)
!=
null
)
outRect
.
top
=
mSpaceValueMap
.
get
(
TOP_DECORATION
);
if
(
mSpaceValueMap
.
get
(
LEFT_DECORATION
)
!=
null
)
outRect
.
left
=
mSpaceValueMap
.
get
(
LEFT_DECORATION
);
if
(
mSpaceValueMap
.
get
(
RIGHT_DECORATION
)
!=
null
)
outRect
.
right
=
mSpaceValueMap
.
get
(
RIGHT_DECORATION
);
if
(
mSpaceValueMap
.
get
(
BOTTOM_DECORATION
)
!=
null
)
outRect
.
bottom
=
mSpaceValueMap
.
get
(
BOTTOM_DECORATION
);
}
}
app/src/main/java/com/ym/msdh/game/view/WareHouseDialog.kt
View file @
57a1250e
...
@@ -15,6 +15,7 @@ import com.ym.library.module.FlyBoxEntity
...
@@ -15,6 +15,7 @@ import com.ym.library.module.FlyBoxEntity
import
com.ym.library.rxbus.RxBusUtil
import
com.ym.library.rxbus.RxBusUtil
import
com.ym.library.utils.EventUtils
import
com.ym.library.utils.EventUtils
import
com.ym.msdh.R
import
com.ym.msdh.R
import
com.ym.msdh.game.utils.RecyclerViewSpacesItemDecoration
object
WareHouseDialog
:
WareHouseContract
.
View
{
object
WareHouseDialog
:
WareHouseContract
.
View
{
...
@@ -45,6 +46,12 @@ object WareHouseDialog : WareHouseContract.View {
...
@@ -45,6 +46,12 @@ object WareHouseDialog : WareHouseContract.View {
val
rl
=
mDialog
?.
findViewById
<
RecyclerView
>(
R
.
id
.
rl_record
)
val
rl
=
mDialog
?.
findViewById
<
RecyclerView
>(
R
.
id
.
rl_record
)
rl
?.
layoutManager
=
rl
?.
layoutManager
=
GridLayoutManager
(
context
,
3
)
GridLayoutManager
(
context
,
3
)
val
stringIntegerHashMap
:
HashMap
<
String
,
Int
>
=
HashMap
()
stringIntegerHashMap
[
RecyclerViewSpacesItemDecoration
.
TOP_DECORATION
]
=
28
//top间距
stringIntegerHashMap
[
RecyclerViewSpacesItemDecoration
.
BOTTOM_DECORATION
]
=
28
//底部间距
stringIntegerHashMap
[
RecyclerViewSpacesItemDecoration
.
LEFT_DECORATION
]
=
48
//左边间距
stringIntegerHashMap
[
RecyclerViewSpacesItemDecoration
.
RIGHT_DECORATION
]
=
48
//右边间距
rl
?.
addItemDecoration
(
RecyclerViewSpacesItemDecoration
(
stringIntegerHashMap
))
adapter
=
WareHouseAdapter
(
context
)
adapter
=
WareHouseAdapter
(
context
)
rl
?.
adapter
=
adapter
rl
?.
adapter
=
adapter
mDialogView
?.
findViewById
<
ImageView
>(
R
.
id
.
iv_warehouse_close
).
setOnClickListener
{
mDialogView
?.
findViewById
<
ImageView
>(
R
.
id
.
iv_warehouse_close
).
setOnClickListener
{
...
...
app/src/main/res/layout/dialog_layout_warehouse.xml
View file @
57a1250e
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
android:id=
"@+id/rl_record"
android:id=
"@+id/rl_record"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_
8
4"
android:layout_marginTop=
"@dimen/dp_
6
4"
android:layout_centerHorizontal=
"true"
/>
android:layout_centerHorizontal=
"true"
/>
</RelativeLayout>
</RelativeLayout>
...
...
app/src/main/res/layout/item_layout_warehouse.xml
View file @
57a1250e
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"
@dimen/dp_100
"
android:layout_width=
"
wrap_content
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:gravity=
"center"
android:orientation=
"vertical"
android:orientation=
"vertical"
>
android:layout_marginBottom=
"@dimen/dp_10"
>
<LinearLayout
<LinearLayout
android:layout_width=
"
@dimen/dp_42
"
android:layout_width=
"
wrap_content
"
android:layout_height=
"
@dimen/dp_47
"
android:layout_height=
"
wrap_content
"
android:gravity=
"center"
>
android:gravity=
"center"
>
<ImageView
<ImageView
android:id=
"@+id/id_img_item"
android:id=
"@+id/id_img_item"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
/>
android:layout_height=
"wrap_content"
android:src=
"@mipmap/icon_speed_water"
/>
</LinearLayout>
</LinearLayout>
<TextView
<TextView
...
...
library/src/main/java/com/ym/library/utils/CenterDialog.kt
View file @
57a1250e
...
@@ -621,7 +621,7 @@ object CenterDialog : BaseDialog() {
...
@@ -621,7 +621,7 @@ object CenterDialog : BaseDialog() {
3
->
{
3
->
{
id_tv_title
?.
text
=
"恭喜获得"
id_tv_title
?.
text
=
"恭喜获得"
view
?.
findViewById
<
View
>(
R
.
id
.
id_ll_congratulations
).
visibility
=
View
.
VISIBLE
view
?.
findViewById
<
View
>(
R
.
id
.
id_ll_congratulations
).
visibility
=
View
.
VISIBLE
view
?.
findViewById
<
TextView
>(
R
.
id
.
id_tv_number
)
?.
text
=
"
${int1}牛牛币
"
view
?.
findViewById
<
TextView
>(
R
.
id
.
id_tv_number
)
?.
text
=
"
+${int1}
"
val
id_iv_double
=
view
?.
findViewById
<
ImageView
>(
R
.
id
.
id_iv_double
)
val
id_iv_double
=
view
?.
findViewById
<
ImageView
>(
R
.
id
.
id_iv_double
)
if
(
string1
.
equals
(
"0"
)
||
string1
.
equals
(
"H5_Dismiss"
)
||
string1
.
equals
(
"H5_Not_Dimiss"
))
{
//奖励翻倍
if
(
string1
.
equals
(
"0"
)
||
string1
.
equals
(
"H5_Dismiss"
)
||
string1
.
equals
(
"H5_Not_Dimiss"
))
{
//奖励翻倍
id_iv_double
.
setImageResource
(
R
.
drawable
.
bg_dialog_home_double
)
id_iv_double
.
setImageResource
(
R
.
drawable
.
bg_dialog_home_double
)
...
@@ -731,7 +731,7 @@ object CenterDialog : BaseDialog() {
...
@@ -731,7 +731,7 @@ object CenterDialog : BaseDialog() {
id_ll_congratulations
.
visibility
=
View
.
VISIBLE
id_ll_congratulations
.
visibility
=
View
.
VISIBLE
iv_ok
.
visibility
=
View
.
VISIBLE
iv_ok
.
visibility
=
View
.
VISIBLE
val
id_tv_number
=
view
.
findViewById
<
TextView
>(
R
.
id
.
id_tv_number
)
val
id_tv_number
=
view
.
findViewById
<
TextView
>(
R
.
id
.
id_tv_number
)
id_tv_number
.
text
=
"
"
+
number
.
toInt
()
+
"牛牛币"
id_tv_number
.
text
=
"
+"
+
number
.
toInt
()
}
}
0
->
{
//心愿值
0
->
{
//心愿值
...
@@ -809,7 +809,7 @@ object CenterDialog : BaseDialog() {
...
@@ -809,7 +809,7 @@ object CenterDialog : BaseDialog() {
1
->
{
// 金币
1
->
{
// 金币
id_tv_title
?.
text
=
"恭喜获得"
id_tv_title
?.
text
=
"恭喜获得"
view
?.
findViewById
<
View
>(
R
.
id
.
id_ll_congratulations
).
visibility
=
View
.
VISIBLE
view
?.
findViewById
<
View
>(
R
.
id
.
id_ll_congratulations
).
visibility
=
View
.
VISIBLE
view
?.
findViewById
<
TextView
>(
R
.
id
.
id_tv_number
)
?.
text
=
"
${number}牛牛币
"
view
?.
findViewById
<
TextView
>(
R
.
id
.
id_tv_number
)
?.
text
=
"
+${number}
"
val
id_iv_double
=
view
?.
findViewById
<
ImageView
>(
R
.
id
.
id_iv_double
)
val
id_iv_double
=
view
?.
findViewById
<
ImageView
>(
R
.
id
.
id_iv_double
)
id_iv_double
.
setImageResource
(
R
.
drawable
.
bg_dialog_home_accept
)
id_iv_double
.
setImageResource
(
R
.
drawable
.
bg_dialog_home_accept
)
id_iv_double
.
setOnClickListener
(
object
:
NoDoubleClickListener
()
{
id_iv_double
.
setOnClickListener
(
object
:
NoDoubleClickListener
()
{
...
...
library/src/main/res/drawable-xhdpi/icon_dialog_home_gold.png
deleted
100644 → 0
View file @
7b0a3f58
45.3 KB
library/src/main/res/layout/dialog_home_style_1.xml
View file @
57a1250e
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<ImageView
<ImageView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/icon_dialog_
home_gold
"
android:src=
"@drawable/icon_dialog_
coin_img
"
android:layout_marginBottom=
"20dp"
android:layout_marginBottom=
"20dp"
android:layout_marginTop=
"22dp"
/>
android:layout_marginTop=
"22dp"
/>
<TextView
<TextView
...
...
library/src/main/res/layout/dialog_home_style_3.xml
View file @
57a1250e
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
<ImageView
<ImageView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/icon_dialog_
home_gold
"
android:src=
"@drawable/icon_dialog_
coin_img
"
android:layout_marginBottom=
"20dp"
android:layout_marginBottom=
"20dp"
android:layout_marginTop=
"22dp"
/>
android:layout_marginTop=
"22dp"
/>
<TextView
<TextView
...
...
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