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

添加沉浸式状态栏

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