Commit c281a217 authored by 张释方's avatar 张释方

添加沉浸式状态栏

parent 19dfec14
...@@ -35,7 +35,9 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() { ...@@ -35,7 +35,9 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() {
override fun initVariableId() = BR.viewModel override fun initVariableId() = BR.viewModel
override fun getStatusBarHeightView(): View? {
return null
}
override fun initData() { override fun initData() {
super.initData() super.initData()
//初始化viewpager2 //初始化viewpager2
......
...@@ -67,7 +67,7 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList ...@@ -67,7 +67,7 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList
override fun initVariableId() = BR.viewModel override fun initVariableId() = BR.viewModel
override fun initData() { override fun initData() {
super.initData() super.initData()
// StatusBarUtil.setHeightAndPadding(AppManager.getAppManager().currentActivity, binding.llMyRoot) StatusBarUtil.setHeightAndPadding(AppManager.getAppManager().currentActivity, binding.llMyRoot)
srl_my.setOnRefreshListener(this) srl_my.setOnRefreshListener(this)
//隐藏立即领取 //隐藏立即领取
// bt_try.visibility = View.GONE // bt_try.visibility = View.GONE
...@@ -93,7 +93,7 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList ...@@ -93,7 +93,7 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList
private fun initListener() { private fun initListener() {
//设置登录点击事件 //设置登录点击事件
RxUtils.onMultiClick(binding.llMyLogin){ RxUtils.onMultiClick(binding.llMyLogin) {
// binding.llMyLogin.setOnClickListener { // binding.llMyLogin.setOnClickListener {
if (!userManager.userIsLogin()) { if (!userManager.userIsLogin()) {
...@@ -114,7 +114,7 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList ...@@ -114,7 +114,7 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList
tv_private?.setOnClickListener(this) tv_private?.setOnClickListener(this)
iv_weixin?.setOnClickListener(this) iv_weixin?.setOnClickListener(this)
// ly_phone?.setOnClickListener(this) // ly_phone?.setOnClickListener(this)
RxUtils.onMultiClick(ly_phone){ RxUtils.onMultiClick(ly_phone) {
if (cb_checked!!.isChecked) { if (cb_checked!!.isChecked) {
startActivity(LoginActivity::class.java) startActivity(LoginActivity::class.java)
mBottomSheetDialog!!.dismiss() mBottomSheetDialog!!.dismiss()
...@@ -137,10 +137,10 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList ...@@ -137,10 +137,10 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList
} }
RxUtils.onMultiClick(aboutus){ RxUtils.onMultiClick(aboutus) {
startActivity(AboutusActivity::class.java) startActivity(AboutusActivity::class.java)
} }
RxUtils.onMultiClick(moresettings){ RxUtils.onMultiClick(moresettings) {
startActivity(MoresettingsActivity::class.java) startActivity(MoresettingsActivity::class.java)
} }
} }
...@@ -197,10 +197,10 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList ...@@ -197,10 +197,10 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList
// } // }
// } // }
R.id.tv_regist -> { R.id.tv_regist -> {
MintsWebViewActivity.startWebView(name = "用户协议",url = "http://test.mints-id.com/map-api/map/register.html") MintsWebViewActivity.startWebView(name = "用户协议", url = "http://test.mints-id.com/map-api/map/register.html")
} }
R.id.tv_private -> { R.id.tv_private -> {
MintsWebViewActivity.startWebView(name = "隐私协议",url = "http://test.mints-id.com/map-api/map/privacy.html") MintsWebViewActivity.startWebView(name = "隐私协议", url = "http://test.mints-id.com/map-api/map/privacy.html")
} }
} }
...@@ -235,9 +235,9 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList ...@@ -235,9 +235,9 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList
} }
override fun onRefresh(refreshLayout: RefreshLayout) { override fun onRefresh(refreshLayout: RefreshLayout) {
viewModel.getmyInfo() viewModel.getmyInfo()
setUserLoginStatus() setUserLoginStatus()
srl_my.finishRefresh(true) srl_my.finishRefresh(true)
} }
override fun onDestroy() { override fun onDestroy() {
......
...@@ -22,8 +22,10 @@ import com.mints.street.widget.dialog.DialogListener ...@@ -22,8 +22,10 @@ import com.mints.street.widget.dialog.DialogListener
import com.mints.street.widget.dialog.DialogUtils import com.mints.street.widget.dialog.DialogUtils
import kotlinx.android.synthetic.main.activity_openvip.* import kotlinx.android.synthetic.main.activity_openvip.*
import kotlinx.android.synthetic.main.include_header.* import kotlinx.android.synthetic.main.include_header.*
import me.goldze.mvvmhabit.base.AppManager
import me.goldze.mvvmhabit.utils.AppUtils import me.goldze.mvvmhabit.utils.AppUtils
import me.goldze.mvvmhabit.utils.ToastUtils import me.goldze.mvvmhabit.utils.ToastUtils
import me.goldze.mvvmhabit.utils.systembar.StatusBarUtil
class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>(), View.OnClickListener { class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>(), View.OnClickListener {
...@@ -41,7 +43,7 @@ class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>() ...@@ -41,7 +43,7 @@ class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>()
} }
override fun initData() { override fun initData() {
super.initData() super.initData()
StatusBarUtil.setHeightAndPadding(this, binding.viewBg)
//获取vip福利信息 //获取vip福利信息
viewModel.openvipInfo() viewModel.openvipInfo()
//获取支付方式 //获取支付方式
......
...@@ -18,7 +18,9 @@ import com.mints.street.BR ...@@ -18,7 +18,9 @@ import com.mints.street.BR
import com.mints.street.R import com.mints.street.R
import com.mints.street.databinding.FragmentVrBinding import com.mints.street.databinding.FragmentVrBinding
import com.mints.street.main.my.MyFragment import com.mints.street.main.my.MyFragment
import me.goldze.mvvmhabit.base.AppManager
import me.goldze.mvvmhabit.utils.Utils import me.goldze.mvvmhabit.utils.Utils
import me.goldze.mvvmhabit.utils.systembar.StatusBarUtil
import net.lucode.hackware.magicindicator.MagicIndicator import net.lucode.hackware.magicindicator.MagicIndicator
import net.lucode.hackware.magicindicator.buildins.UIUtil import net.lucode.hackware.magicindicator.buildins.UIUtil
import net.lucode.hackware.magicindicator.buildins.commonnavigator.CommonNavigator import net.lucode.hackware.magicindicator.buildins.commonnavigator.CommonNavigator
...@@ -41,6 +43,7 @@ class VRFragment : BaseFragment<FragmentVrBinding, VRViewModel>() { ...@@ -41,6 +43,7 @@ class VRFragment : BaseFragment<FragmentVrBinding, VRViewModel>() {
override fun initData() { override fun initData() {
super.initData() super.initData()
StatusBarUtil.setHeightAndPadding(AppManager.getAppManager().currentActivity, binding.magicIndicator)
initTabFragment() initTabFragment()
} }
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<View <View
android:id="@+id/view_bg"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="200dp" android:layout_height="200dp"
android:background="@color/black" /> android:background="@color/black" />
......
...@@ -8,8 +8,7 @@ ...@@ -8,8 +8,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical">
>
<net.lucode.hackware.magicindicator.MagicIndicator <net.lucode.hackware.magicindicator.MagicIndicator
android:id="@+id/magic_indicator" android:id="@+id/magic_indicator"
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
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