Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
X
xxsq
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
王雪伟
xxsq
Commits
72d4efcb
Commit
72d4efcb
authored
Jun 22, 2022
by
王雪伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[提交人]:王雪伟
[提交简述] :1.1.3 [实现方案] :加入现金签到
parent
7db9294e
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
104 additions
and
2 deletions
+104
-2
MainActivity.java
app/src/main/java/com/zxhl/shop/activity/MainActivity.java
+6
-1
PhoneUtils.kt
cms/src/main/java/com/zxhl/cms/utils/PhoneUtils.kt
+1
-1
strings.xml
cms/src/main/res/values/strings.xml
+1
-0
CashCheckFragment.kt
...in/java/com/zxbw/modulemain/fragment/CashCheckFragment.kt
+19
-0
NavigationBottomView.kt
...ain/java/com/zxbw/modulemain/view/NavigationBottomView.kt
+56
-0
icon_bottom_cash_click.png
...in/src/main/res/drawable-xhdpi/icon_bottom_cash_click.png
+0
-0
icon_bottom_cash_default.png
.../src/main/res/drawable-xhdpi/icon_bottom_cash_default.png
+0
-0
fragment_layout_cash_check.xml
...leMain/src/main/res/layout/fragment_layout_cash_check.xml
+8
-0
view_navigation_bottom.xml
moduleMain/src/main/res/layout/view_navigation_bottom.xml
+13
-0
No files found.
app/src/main/java/com/zxhl/shop/activity/MainActivity.java
View file @
72d4efcb
...
@@ -13,6 +13,7 @@ import androidx.fragment.app.FragmentTransaction;
...
@@ -13,6 +13,7 @@ import androidx.fragment.app.FragmentTransaction;
import
com.umeng.analytics.MobclickAgent
;
import
com.umeng.analytics.MobclickAgent
;
import
com.umeng.socialize.UMShareAPI
;
import
com.umeng.socialize.UMShareAPI
;
import
com.zxbw.modulemain.fragment.CashCheckFragment
;
import
com.zxbw.modulemain.fragment.HomeFragment
;
import
com.zxbw.modulemain.fragment.HomeFragment
;
import
com.zxbw.modulemain.fragment.UserCenterFragment
;
import
com.zxbw.modulemain.fragment.UserCenterFragment
;
import
com.zxbw.modulemain.view.NavigationBottomView
;
import
com.zxbw.modulemain.view.NavigationBottomView
;
...
@@ -124,6 +125,7 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
...
@@ -124,6 +125,7 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
private
void
initFragment
()
{
private
void
initFragment
()
{
fragments
.
add
(
new
HomeFragment
());
fragments
.
add
(
new
HomeFragment
());
fragments
.
add
(
new
CashCheckFragment
());
fragments
.
add
(
new
UserCenterFragment
());
fragments
.
add
(
new
UserCenterFragment
());
FragmentTransaction
transaction
=
getSupportFragmentManager
().
beginTransaction
();
FragmentTransaction
transaction
=
getSupportFragmentManager
().
beginTransaction
();
for
(
Fragment
fragment
:
fragments
)
{
for
(
Fragment
fragment
:
fragments
)
{
...
@@ -163,8 +165,11 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
...
@@ -163,8 +165,11 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
if
(
vId
==
com
.
zxbw
.
modulemain
.
R
.
id
.
id_view_navigation_bottom_box
)
{
if
(
vId
==
com
.
zxbw
.
modulemain
.
R
.
id
.
id_view_navigation_bottom_box
)
{
switchFragment
(
0
);
switchFragment
(
0
);
EventUtils
.
INSTANCE
.
onEvent
(
"tab_imp"
,
"home"
);
EventUtils
.
INSTANCE
.
onEvent
(
"tab_imp"
,
"home"
);
}
else
if
(
vId
==
com
.
zxbw
.
modulemain
.
R
.
id
.
id_view_navigation_bottom_
user
)
{
}
else
if
(
vId
==
com
.
zxbw
.
modulemain
.
R
.
id
.
id_view_navigation_bottom_
cash
)
{
switchFragment
(
1
);
switchFragment
(
1
);
EventUtils
.
INSTANCE
.
onEvent
(
"tab_imp"
,
"cash_check"
);
}
if
(
vId
==
com
.
zxbw
.
modulemain
.
R
.
id
.
id_view_navigation_bottom_user
)
{
switchFragment
(
2
);
EventUtils
.
INSTANCE
.
onEvent
(
"tab_imp"
,
"user"
);
EventUtils
.
INSTANCE
.
onEvent
(
"tab_imp"
,
"user"
);
}
}
}
}
...
...
cms/src/main/java/com/zxhl/cms/utils/PhoneUtils.kt
View file @
72d4efcb
...
@@ -839,7 +839,7 @@ object PhoneUtils {
...
@@ -839,7 +839,7 @@ object PhoneUtils {
params
.
put
(
Constant
.
Device
.
carrier
,
SettingPreference
.
getCarrier
())
params
.
put
(
Constant
.
Device
.
carrier
,
SettingPreference
.
getCarrier
())
// params.put(Constant.Device.ip, SettingPreference.getIp())
// params.put(Constant.Device.ip, SettingPreference.getIp())
// params.put("uid", "266
3507
5")
// params.put("uid", "266
5221
5")
// params.put("zygt", "hzwz")
// params.put("zygt", "hzwz")
// params.put("tgtk", "1")
// params.put("tgtk", "1")
return
params
return
params
...
...
cms/src/main/res/values/strings.xml
View file @
72d4efcb
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
<string
name=
"bottom_vip"
>
会员权益
</string>
<string
name=
"bottom_vip"
>
会员权益
</string>
<string
name=
"recycle_center"
>
回收中心
</string>
<string
name=
"recycle_center"
>
回收中心
</string>
<string
name=
"mine"
>
我的
</string>
<string
name=
"mine"
>
我的
</string>
<string
name=
"cash_check"
>
现金签到
</string>
<string
name=
"ware_house"
>
仓库
</string>
<string
name=
"ware_house"
>
仓库
</string>
<!--魔盒商品详情-->
<!--魔盒商品详情-->
<string
name=
"box_detail_open_box_money_unit"
>
¥
</string>
<string
name=
"box_detail_open_box_money_unit"
>
¥
</string>
...
...
moduleMain/src/main/java/com/zxbw/modulemain/fragment/CashCheckFragment.kt
0 → 100644
View file @
72d4efcb
package
com.zxbw.modulemain.fragment
import
android.view.View
import
com.zxbw.modulemain.R
import
com.zxhl.cms.common.base.BaseFragment
/**
* @author (wangXuewei)
* @datetime 2022-06-22 14:00 GMT+8
* @detail :现金签到
*/
class
CashCheckFragment
:
BaseFragment
()
{
override
fun
layoutID
():
Int
=
R
.
layout
.
fragment_layout_cash_check
override
fun
init
(
view
:
View
?)
{
}
}
\ No newline at end of file
moduleMain/src/main/java/com/zxbw/modulemain/view/NavigationBottomView.kt
View file @
72d4efcb
...
@@ -28,15 +28,18 @@ class NavigationBottomView : RelativeLayout {
...
@@ -28,15 +28,18 @@ class NavigationBottomView : RelativeLayout {
}
}
private
var
mUserText
:
TextView
?
=
null
private
var
mUserText
:
TextView
?
=
null
private
var
mCashCheckText
:
TextView
?
=
null
private
var
mShopText
:
TextView
?
=
null
private
var
mShopText
:
TextView
?
=
null
private
var
navifationCallback
:
NavifationCallback
?
=
null
private
var
navifationCallback
:
NavifationCallback
?
=
null
private
fun
init
()
{
private
fun
init
()
{
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
view_navigation_bottom
,
this
)
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
view_navigation_bottom
,
this
)
mShopText
=
findViewById
(
R
.
id
.
id_view_navigation_bottom_box
)
mShopText
=
findViewById
(
R
.
id
.
id_view_navigation_bottom_box
)
mCashCheckText
=
findViewById
(
R
.
id
.
id_view_navigation_bottom_cash
)
mUserText
=
findViewById
(
R
.
id
.
id_view_navigation_bottom_user
)
mUserText
=
findViewById
(
R
.
id
.
id_view_navigation_bottom_user
)
mShopText
?.
setOnClickListener
{
mShopText
?.
setOnClickListener
{
mUserText
?.
setTextColor
(
resources
.
getColor
(
R
.
color
.
color_999999
))
mUserText
?.
setTextColor
(
resources
.
getColor
(
R
.
color
.
color_999999
))
mCashCheckText
?.
setTextColor
(
resources
.
getColor
(
R
.
color
.
color_999999
))
mShopText
?.
setTextColor
(
resources
.
getColor
(
R
.
color
.
color_333333
))
mShopText
?.
setTextColor
(
resources
.
getColor
(
R
.
color
.
color_333333
))
val
userDrawable
=
getResources
().
getDrawable
(
R
.
drawable
.
icon_bottom_my_default
)
val
userDrawable
=
getResources
().
getDrawable
(
R
.
drawable
.
icon_bottom_my_default
)
userDrawable
.
setBounds
(
userDrawable
.
setBounds
(
...
@@ -46,6 +49,14 @@ class NavigationBottomView : RelativeLayout {
...
@@ -46,6 +49,14 @@ class NavigationBottomView : RelativeLayout {
userDrawable
.
getMinimumHeight
()
userDrawable
.
getMinimumHeight
()
);
);
val
cashDrawable
=
getResources
().
getDrawable
(
R
.
drawable
.
icon_bottom_cash_default
)
cashDrawable
.
setBounds
(
0
,
0
,
cashDrawable
.
getMinimumWidth
(),
cashDrawable
.
getMinimumHeight
()
);
val
shopDrawable
=
getResources
().
getDrawable
(
R
.
drawable
.
icon_bottom_shop_click
)
val
shopDrawable
=
getResources
().
getDrawable
(
R
.
drawable
.
icon_bottom_shop_click
)
shopDrawable
.
setBounds
(
shopDrawable
.
setBounds
(
0
,
0
,
...
@@ -55,11 +66,46 @@ class NavigationBottomView : RelativeLayout {
...
@@ -55,11 +66,46 @@ class NavigationBottomView : RelativeLayout {
)
)
mUserText
?.
setCompoundDrawables
(
null
,
userDrawable
,
null
,
null
)
mUserText
?.
setCompoundDrawables
(
null
,
userDrawable
,
null
,
null
)
mCashCheckText
?.
setCompoundDrawables
(
null
,
cashDrawable
,
null
,
null
)
mShopText
?.
setCompoundDrawables
(
null
,
shopDrawable
,
null
,
null
)
navifationCallback
?.
onNavigationClick
(
it
.
id
)
}
mCashCheckText
?.
setOnClickListener
{
mShopText
?.
setTextColor
(
resources
.
getColor
(
R
.
color
.
color_999999
))
mUserText
?.
setTextColor
(
resources
.
getColor
(
R
.
color
.
color_333333
))
mCashCheckText
?.
setTextColor
(
resources
.
getColor
(
R
.
color
.
color_333333
))
val
userDrawable
=
getResources
().
getDrawable
(
R
.
drawable
.
icon_bottom_my_default
)
userDrawable
.
setBounds
(
0
,
0
,
userDrawable
.
getMinimumWidth
(),
userDrawable
.
getMinimumHeight
()
);
val
cashDrawable
=
getResources
().
getDrawable
(
R
.
drawable
.
icon_bottom_cash_click
)
cashDrawable
.
setBounds
(
0
,
0
,
cashDrawable
.
getMinimumWidth
(),
cashDrawable
.
getMinimumHeight
()
);
val
shopDrawable
=
getResources
().
getDrawable
(
R
.
drawable
.
icon_bottom_shop_default
)
shopDrawable
.
setBounds
(
0
,
0
,
shopDrawable
.
getMinimumWidth
(),
shopDrawable
.
getMinimumHeight
()
)
mUserText
?.
setCompoundDrawables
(
null
,
userDrawable
,
null
,
null
)
mCashCheckText
?.
setCompoundDrawables
(
null
,
cashDrawable
,
null
,
null
)
mShopText
?.
setCompoundDrawables
(
null
,
shopDrawable
,
null
,
null
)
mShopText
?.
setCompoundDrawables
(
null
,
shopDrawable
,
null
,
null
)
navifationCallback
?.
onNavigationClick
(
it
.
id
)
navifationCallback
?.
onNavigationClick
(
it
.
id
)
}
}
mUserText
?.
setOnClickListener
{
mUserText
?.
setOnClickListener
{
mShopText
?.
setTextColor
(
resources
.
getColor
(
R
.
color
.
color_999999
))
mShopText
?.
setTextColor
(
resources
.
getColor
(
R
.
color
.
color_999999
))
mCashCheckText
?.
setTextColor
(
resources
.
getColor
(
R
.
color
.
color_999999
))
mUserText
?.
setTextColor
(
resources
.
getColor
(
R
.
color
.
color_333333
))
mUserText
?.
setTextColor
(
resources
.
getColor
(
R
.
color
.
color_333333
))
val
userDrawable
=
getResources
().
getDrawable
(
R
.
drawable
.
icon_bottom_my_click
)
val
userDrawable
=
getResources
().
getDrawable
(
R
.
drawable
.
icon_bottom_my_click
)
userDrawable
.
setBounds
(
userDrawable
.
setBounds
(
...
@@ -68,6 +114,15 @@ class NavigationBottomView : RelativeLayout {
...
@@ -68,6 +114,15 @@ class NavigationBottomView : RelativeLayout {
userDrawable
.
getMinimumWidth
(),
userDrawable
.
getMinimumWidth
(),
userDrawable
.
getMinimumHeight
()
userDrawable
.
getMinimumHeight
()
);
);
val
cashDrawable
=
getResources
().
getDrawable
(
R
.
drawable
.
icon_bottom_cash_default
)
cashDrawable
.
setBounds
(
0
,
0
,
cashDrawable
.
getMinimumWidth
(),
cashDrawable
.
getMinimumHeight
()
);
val
shopDrawable
=
getResources
().
getDrawable
(
R
.
drawable
.
icon_bottom_shop_default
)
val
shopDrawable
=
getResources
().
getDrawable
(
R
.
drawable
.
icon_bottom_shop_default
)
shopDrawable
.
setBounds
(
shopDrawable
.
setBounds
(
0
,
0
,
...
@@ -77,6 +132,7 @@ class NavigationBottomView : RelativeLayout {
...
@@ -77,6 +132,7 @@ class NavigationBottomView : RelativeLayout {
)
)
mUserText
?.
setCompoundDrawables
(
null
,
userDrawable
,
null
,
null
)
mUserText
?.
setCompoundDrawables
(
null
,
userDrawable
,
null
,
null
)
mCashCheckText
?.
setCompoundDrawables
(
null
,
cashDrawable
,
null
,
null
)
mShopText
?.
setCompoundDrawables
(
null
,
shopDrawable
,
null
,
null
)
mShopText
?.
setCompoundDrawables
(
null
,
shopDrawable
,
null
,
null
)
navifationCallback
?.
onNavigationClick
(
it
.
id
)
navifationCallback
?.
onNavigationClick
(
it
.
id
)
}
}
...
...
moduleMain/src/main/res/drawable-xhdpi/icon_bottom_cash_click.png
0 → 100644
View file @
72d4efcb
1.63 KB
moduleMain/src/main/res/drawable-xhdpi/icon_bottom_cash_default.png
0 → 100644
View file @
72d4efcb
1001 Bytes
moduleMain/src/main/res/layout/fragment_layout_cash_check.xml
0 → 100644
View file @
72d4efcb
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#F3F4F5"
android:orientation=
"vertical"
>
</LinearLayout>
\ No newline at end of file
moduleMain/src/main/res/layout/view_navigation_bottom.xml
View file @
72d4efcb
...
@@ -27,6 +27,19 @@
...
@@ -27,6 +27,19 @@
android:textColor=
"@color/color_333333"
android:textColor=
"@color/color_333333"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
<TextView
android:id=
"@+id/id_view_navigation_bottom_cash"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_weight=
"1"
android:drawableTop=
"@drawable/icon_bottom_cash_default"
android:drawablePadding=
"2dp"
android:textStyle=
"bold"
android:gravity=
"center"
android:text=
"@string/cash_check"
android:textColor=
"@color/color_999999"
android:textSize=
"14sp"
/>
<TextView
<TextView
android:id=
"@+id/id_view_navigation_bottom_user"
android:id=
"@+id/id_view_navigation_bottom_user"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
...
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