Commit 72d4efcb authored by 王雪伟's avatar 王雪伟

[提交人]:王雪伟

[提交简述] :1.1.3
[实现方案] :加入现金签到
parent 7db9294e
......@@ -13,6 +13,7 @@ import androidx.fragment.app.FragmentTransaction;
import com.umeng.analytics.MobclickAgent;
import com.umeng.socialize.UMShareAPI;
import com.zxbw.modulemain.fragment.CashCheckFragment;
import com.zxbw.modulemain.fragment.HomeFragment;
import com.zxbw.modulemain.fragment.UserCenterFragment;
import com.zxbw.modulemain.view.NavigationBottomView;
......@@ -124,6 +125,7 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
private void initFragment() {
fragments.add(new HomeFragment());
fragments.add(new CashCheckFragment());
fragments.add(new UserCenterFragment());
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
for (Fragment fragment : fragments) {
......@@ -163,8 +165,11 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
if (vId == com.zxbw.modulemain.R.id.id_view_navigation_bottom_box) {
switchFragment(0);
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);
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");
}
}
......
......@@ -839,7 +839,7 @@ object PhoneUtils {
params.put(Constant.Device.carrier, SettingPreference.getCarrier())
// params.put(Constant.Device.ip, SettingPreference.getIp())
// params.put("uid", "26635075")
// params.put("uid", "26652215")
// params.put("zygt", "hzwz")
// params.put("tgtk", "1")
return params
......
......@@ -44,6 +44,7 @@
<string name="bottom_vip">会员权益</string>
<string name="recycle_center">回收中心</string>
<string name="mine">我的</string>
<string name="cash_check">现金签到</string>
<string name="ware_house">仓库</string>
<!--魔盒商品详情-->
<string name="box_detail_open_box_money_unit">¥</string>
......
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
......@@ -28,15 +28,18 @@ class NavigationBottomView : RelativeLayout {
}
private var mUserText: TextView? = null
private var mCashCheckText: TextView? = null
private var mShopText: TextView? = null
private var navifationCallback: NavifationCallback? = null
private fun init() {
LayoutInflater.from(context).inflate(R.layout.view_navigation_bottom, this)
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)
mShopText?.setOnClickListener {
mUserText?.setTextColor(resources.getColor(R.color.color_999999))
mCashCheckText?.setTextColor(resources.getColor(R.color.color_999999))
mShopText?.setTextColor(resources.getColor(R.color.color_333333))
val userDrawable = getResources().getDrawable(R.drawable.icon_bottom_my_default)
userDrawable.setBounds(
......@@ -46,6 +49,14 @@ class NavigationBottomView : RelativeLayout {
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)
shopDrawable.setBounds(
0,
......@@ -55,11 +66,46 @@ class NavigationBottomView : RelativeLayout {
)
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)
navifationCallback?.onNavigationClick(it.id)
}
mUserText?.setOnClickListener {
mShopText?.setTextColor(resources.getColor(R.color.color_999999))
mCashCheckText?.setTextColor(resources.getColor(R.color.color_999999))
mUserText?.setTextColor(resources.getColor(R.color.color_333333))
val userDrawable = getResources().getDrawable(R.drawable.icon_bottom_my_click)
userDrawable.setBounds(
......@@ -68,6 +114,15 @@ class NavigationBottomView : RelativeLayout {
userDrawable.getMinimumWidth(),
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)
shopDrawable.setBounds(
0,
......@@ -77,6 +132,7 @@ class NavigationBottomView : RelativeLayout {
)
mUserText?.setCompoundDrawables(null, userDrawable, null, null)
mCashCheckText?.setCompoundDrawables(null, cashDrawable, null, null)
mShopText?.setCompoundDrawables(null, shopDrawable, null, null)
navifationCallback?.onNavigationClick(it.id)
}
......
<?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
......@@ -27,6 +27,19 @@
android:textColor="@color/color_333333"
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
android:id="@+id/id_view_navigation_bottom_user"
android:layout_width="match_parent"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment