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

提交zsf分支到本地

parent 8f58055b
package com.mints.street.adapter package com.mints.street.adapter
import android.content.Context import android.content.Context
import com.alibaba.android.vlayout.LayoutHelper
import com.alibaba.android.vlayout.layout.GridLayoutHelper import com.alibaba.android.vlayout.layout.GridLayoutHelper
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.fry.base.adapter.AbstractVLayoutBaseAdapter import com.fry.base.adapter.AbstractVLayoutBaseAdapter
...@@ -23,43 +24,44 @@ class GridMapAdapter(val context: Context, var list: List<VrmapBean.Internal>?) ...@@ -23,43 +24,44 @@ class GridMapAdapter(val context: Context, var list: List<VrmapBean.Internal>?)
holder: BindingViewHolder<ItemGridMapAdapterBinding>, holder: BindingViewHolder<ItemGridMapAdapterBinding>,
position: Int position: Int
) { ) {
var a = holder.binding.bg.layoutParams // var a = holder.binding.bg.layoutParams
if (position % 2 == 0) { // if (position % 2 == 0) {
holder.binding.bg.setMargin(AppUtils.dp2Px(context, 10F), AppUtils.dp2Px(context, 10F), // holder.binding.bg.setMargin(AppUtils.dp2Px(context, 10F), AppUtils.dp2Px(context, 10F),
AppUtils.dp2Px(context, 10F), 0, null, null, null) // AppUtils.dp2Px(context, 10F), 0, null, null, null)
} else { // } else {
holder.binding.bg.setMargin(0, AppUtils.dp2Px(context, 10F), AppUtils.dp2Px(context, 10F), // holder.binding.bg.setMargin(0, AppUtils.dp2Px(context, 10F), AppUtils.dp2Px(context, 10F),
0, null, null, null) // 0, null, null, null)
} // }
//
datalist?.let { // datalist?.let {
var databean = it[position] // var databean = it[position]
//设置图片 // //设置图片
Glide.with(mContext).load(databean.img).into(holder.binding.image) // Glide.with(mContext).load(databean.img).into(holder.binding.image)
//设置标题 // //设置标题
holder.binding.tvName.text = databean.name // holder.binding.tvName.text = databean.name
// //设置星星数量 //// //设置星星数量
// var i = 0 //// var i = 0
// while (i < 5) { //// while (i < 5) {
// holder.binding.lyStar.addView(View.inflate(context, R.layout.include_start_show, null)) //// holder.binding.lyStar.addView(View.inflate(context, R.layout.include_start_show, null))
// i += 1 //// i += 1
//// }
// //设置点击跳转
// holder.itemView.setOnClickListener {
// //页面跳转
// MintsWebViewActivity.startWebView(databean.name, url = databean.url)
// } // }
//设置点击跳转
holder.itemView.setOnClickListener {
//页面跳转
MintsWebViewActivity.startWebView(databean.name, url = databean.url)
}
}
// RxUtils.onMultiClick(holder.binding.bg) {
// PanoramicActivity.starPanoramicActivity(context, ""
// , PanoramicActivity.WGS84, lat = 39.906283536127169, lon = 116.39129554889048)
// } // }
//// RxUtils.onMultiClick(holder.binding.bg) {
//// PanoramicActivity.starPanoramicActivity(context, ""
//// , PanoramicActivity.WGS84, lat = 39.906283536127169, lon = 116.39129554889048)
//// }
} }
override fun getItemCount() = list!!.size override fun getItemCount() = list!!.size
override fun onCreateLayoutHelper() = GridLayoutHelper(2) override fun onCreateLayoutHelper() = GridLayoutHelper(2)
override fun getLayoutId(viewType: Int) = R.layout.item_grid_map_adapter override fun getLayoutId(viewType: Int) = R.layout.item_grid_map_adapter
} }
\ No newline at end of file
...@@ -18,6 +18,7 @@ import kotlinx.android.synthetic.main.activity_login.* ...@@ -18,6 +18,7 @@ import kotlinx.android.synthetic.main.activity_login.*
import kotlinx.android.synthetic.main.include_header.* import kotlinx.android.synthetic.main.include_header.*
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
/** /**
* Created by 冯瑞雨 on 2021/7/2. * Created by 冯瑞雨 on 2021/7/2.
...@@ -25,12 +26,16 @@ import me.goldze.mvvmhabit.utils.ToastUtils ...@@ -25,12 +26,16 @@ import me.goldze.mvvmhabit.utils.ToastUtils
class LoginActivity : BaseActivity<ActivityLoginBinding, LoginViewModel>(), View.OnClickListener { class LoginActivity : BaseActivity<ActivityLoginBinding, LoginViewModel>(), View.OnClickListener {
private val userManager by lazy { UserManager.INSTANCE } private val userManager by lazy { UserManager.INSTANCE }
override fun getStatusBarHeightView(): View? {
return null
}
override fun initContentView(savedInstanceState: Bundle?) = R.layout.activity_login override fun initContentView(savedInstanceState: Bundle?) = R.layout.activity_login
override fun initVariableId() = BR.viewModel override fun initVariableId() = BR.viewModel
override fun initData() { override fun initData() {
super.initData() super.initData()
StatusBarUtil.setHeightAndPadding(this, binding.tvName)
initView() initView()
initListener() initListener()
} }
......
...@@ -11,21 +11,26 @@ import com.mints.street.R ...@@ -11,21 +11,26 @@ import com.mints.street.R
import com.mints.street.bean.UserBean import com.mints.street.bean.UserBean
import com.mints.street.databinding.ActivityBindmobileBinding import com.mints.street.databinding.ActivityBindmobileBinding
import com.mints.street.main.MainActivity import com.mints.street.main.MainActivity
import com.mints.street.manager.UserManager
import com.mints.street.utils.BackInputUtil import com.mints.street.utils.BackInputUtil
import com.tbruyelle.rxpermissions2.RxPermissions import com.tbruyelle.rxpermissions2.RxPermissions
import kotlinx.android.synthetic.main.activity_bindmobile.* import kotlinx.android.synthetic.main.activity_bindmobile.*
import kotlinx.android.synthetic.main.include_header.* import kotlinx.android.synthetic.main.include_header.*
import me.goldze.mvvmhabit.utils.ToastUtils import me.goldze.mvvmhabit.utils.ToastUtils
import me.goldze.mvvmhabit.utils.systembar.StatusBarUtil
class BindMobileActivity : BaseActivity<ActivityBindmobileBinding, BindMobileViewModel>(), View.OnClickListener { class BindMobileActivity : BaseActivity<ActivityBindmobileBinding, BindMobileViewModel>(), View.OnClickListener {
private var mobile: String? = null private var mobile: String? = null
override fun getStatusBarHeightView(): View? {
return null
}
override fun initVariableId() = BR.viewModel override fun initVariableId() = BR.viewModel
override fun initContentView(savedInstanceState: Bundle?) = R.layout.activity_bindmobile override fun initContentView(savedInstanceState: Bundle?) = R.layout.activity_bindmobile
override fun initData() { override fun initData() {
super.initData() super.initData()
StatusBarUtil.setHeightAndPadding(this, binding.ivApplogo)
initView() initView()
initListener() initListener()
} }
...@@ -50,7 +55,7 @@ class BindMobileActivity : BaseActivity<ActivityBindmobileBinding, BindMobileVie ...@@ -50,7 +55,7 @@ class BindMobileActivity : BaseActivity<ActivityBindmobileBinding, BindMobileVie
} }
override fun onClick(v: View?) { override fun onClick(v: View?) {
when(v?.id){ when (v?.id) {
R.id.iv_left_icon -> { R.id.iv_left_icon -> {
finish() finish()
} }
...@@ -84,7 +89,7 @@ class BindMobileActivity : BaseActivity<ActivityBindmobileBinding, BindMobileVie ...@@ -84,7 +89,7 @@ class BindMobileActivity : BaseActivity<ActivityBindmobileBinding, BindMobileVie
.subscribe { granted: Boolean -> .subscribe { granted: Boolean ->
if (granted) { if (granted) {
mobile = mobile.replace(" ".toRegex(), "") mobile = mobile.replace(" ".toRegex(), "")
viewModel.bindingMobile(mobile,code) viewModel.bindingMobile(mobile, code)
} else { } else {
// showMissingPermissionDialog("设备") // showMissingPermissionDialog("设备")
} }
......
...@@ -31,9 +31,10 @@ class MoresettingsActivity : BaseActivity<ActivityMoresettingsBinding, Moresetti ...@@ -31,9 +31,10 @@ class MoresettingsActivity : BaseActivity<ActivityMoresettingsBinding, Moresetti
override fun getStatusBarHeightView(): View? { override fun getStatusBarHeightView(): View? {
return null return null
} }
override fun initData() { override fun initData() {
super.initData() super.initData()
StatusBarUtil.setHeightAndPadding(this, binding.lyLinear) StatusBarUtil.setHeightAndPadding(this, binding.btnSwitch)
initView() initView()
initListener() initListener()
...@@ -50,63 +51,64 @@ class MoresettingsActivity : BaseActivity<ActivityMoresettingsBinding, Moresetti ...@@ -50,63 +51,64 @@ class MoresettingsActivity : BaseActivity<ActivityMoresettingsBinding, Moresetti
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
//判断当前手机号是否绑定 //判断当前手机号是否绑定
if (!userManager.getMobile().isEmpty()) { if (!userManager.getMobile().isEmpty()) {
item_phone.findViewById<TextView>(R.id.tv_right).visibility = View.VISIBLE item_phone.findViewById<TextView>(R.id.tv_right).visibility = View.VISIBLE
item_phone.findViewById<TextView>(R.id.tv_right).text = userManager.getMobile() item_phone.findViewById<TextView>(R.id.tv_right).text = userManager.getMobile()
item_phone.findViewById<TextView>(R.id.tv_right).setTextColor(Color.BLACK) item_phone.findViewById<TextView>(R.id.tv_right).setTextColor(Color.BLACK)
} else { } else {
item_phone.findViewById<TextView>(R.id.tv_right).visibility = View.VISIBLE item_phone.findViewById<TextView>(R.id.tv_right).visibility = View.VISIBLE
item_phone.findViewById<TextView>(R.id.tv_right).setTextColor(Color.BLACK) item_phone.findViewById<TextView>(R.id.tv_right).setTextColor(Color.BLACK)
item_phone.findViewById<TextView>(R.id.tv_right).text = "去绑定" item_phone.findViewById<TextView>(R.id.tv_right).text = "去绑定"
item_phone.setOnClickListener(this) item_phone.setOnClickListener(this)
RxUtils.onMultiClick(item_phone){ RxUtils.onMultiClick(item_phone) {
if (userManager.userIsLogin()) { if (userManager.userIsLogin()) {
startActivity(BindMobileActivity::class.java) startActivity(BindMobileActivity::class.java)
return@onMultiClick return@onMultiClick
} else { } else {
ToastUtils.showLong("请先使用微信登录") ToastUtils.showLong("请先使用微信登录")
}
} }
} }
} }
private fun initView() { }
tv_title.text = "更多设置" private fun initView() {
tv_title.setTextColor(Color.BLACK)
iv_left_icon.setImageResource(R.mipmap.ic_arrow_back) tv_title.text = "更多设置"
iv_left_icon.visibility = View.VISIBLE tv_title.setTextColor(Color.BLACK)
iv_left_icon.setImageResource(R.mipmap.ic_arrow_back)
item_phone.findViewById<TextView>(R.id.tv_title).text = "绑定手机号" iv_left_icon.visibility = View.VISIBLE
val phone = ContextCompat.getDrawable(this, R.mipmap.icon_settings_tel)
phone?.setBounds(0, 0, 56, 56) item_phone.findViewById<TextView>(R.id.tv_title).text = "绑定手机号"
item_phone.findViewById<TextView>(R.id.tv_title).setCompoundDrawables(phone, null, null, null) val phone = ContextCompat.getDrawable(this, R.mipmap.icon_settings_tel)
item_phone.findViewById<ImageView>(R.id.iv_right).visibility = View.GONE phone?.setBounds(0, 0, 56, 56)
item_phone.findViewById<TextView>(R.id.tv_title).setCompoundDrawables(phone, null, null, null)
item_userAgree.findViewById<TextView>(R.id.tv_title).text = "注册协议" item_phone.findViewById<ImageView>(R.id.iv_right).visibility = View.GONE
val userAgree = ContextCompat.getDrawable(this, R.mipmap.icon_settings_user)
userAgree?.setBounds(0, 0, 56, 56) item_userAgree.findViewById<TextView>(R.id.tv_title).text = "注册协议"
item_userAgree.findViewById<TextView>(R.id.tv_title).setCompoundDrawables(userAgree, null, null, null) val userAgree = ContextCompat.getDrawable(this, R.mipmap.icon_settings_user)
item_userAgree.findViewById<TextView>(R.id.tv_right).visibility = View.GONE userAgree?.setBounds(0, 0, 56, 56)
item_userAgree.findViewById<ImageView>(R.id.iv_right).visibility = View.VISIBLE item_userAgree.findViewById<TextView>(R.id.tv_title).setCompoundDrawables(userAgree, null, null, null)
item_userAgree.findViewById<TextView>(R.id.tv_right).visibility = View.GONE
item_privacyAgree.findViewById<TextView>(R.id.tv_title).text = "隐私协议" item_userAgree.findViewById<ImageView>(R.id.iv_right).visibility = View.VISIBLE
val privacyAgree = ContextCompat.getDrawable(this, R.mipmap.icon_settings_privacy)
privacyAgree?.setBounds(0, 0, 56, 56) item_privacyAgree.findViewById<TextView>(R.id.tv_title).text = "隐私协议"
item_privacyAgree.findViewById<TextView>(R.id.tv_title).setCompoundDrawables(privacyAgree, null, null, null) val privacyAgree = ContextCompat.getDrawable(this, R.mipmap.icon_settings_privacy)
item_privacyAgree.findViewById<TextView>(R.id.tv_right).visibility = View.GONE privacyAgree?.setBounds(0, 0, 56, 56)
item_privacyAgree.findViewById<ImageView>(R.id.iv_right).visibility = View.VISIBLE item_privacyAgree.findViewById<TextView>(R.id.tv_title).setCompoundDrawables(privacyAgree, null, null, null)
item_privacyAgree.findViewById<TextView>(R.id.tv_right).visibility = View.GONE
item_privacyAgree.findViewById<ImageView>(R.id.iv_right).visibility = View.VISIBLE
if (userManager.userIsLogin()) {
btn_switch.visibility = View.VISIBLE
} else { if (userManager.userIsLogin()) {
btn_switch.visibility = View.GONE btn_switch.visibility = View.VISIBLE
} else {
btn_switch.visibility = View.GONE
}
} }
}
override fun onClick(v: View?) { override fun onClick(v: View?) {
when (v?.id) { when (v?.id) {
R.id.iv_left_icon -> { R.id.iv_left_icon -> {
finish() finish()
...@@ -126,10 +128,10 @@ class MoresettingsActivity : BaseActivity<ActivityMoresettingsBinding, Moresetti ...@@ -126,10 +128,10 @@ class MoresettingsActivity : BaseActivity<ActivityMoresettingsBinding, Moresetti
KLog.e("setOnClick", "btn_switch has been clicked.") KLog.e("setOnClick", "btn_switch has been clicked.")
} }
R.id.item_userAgree -> {//用户协议 R.id.item_userAgree -> {//用户协议
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.item_privacyAgree -> {//隐私协议 R.id.item_privacyAgree -> {//隐私协议
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")
} }
} }
......
...@@ -156,6 +156,7 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList ...@@ -156,6 +156,7 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList
moresettings.findViewById<TextView>(R.id.tv_right).visibility = View.GONE moresettings.findViewById<TextView>(R.id.tv_right).visibility = View.GONE
moresettings.findViewById<ImageView>(R.id.iv_right).visibility = View.VISIBLE moresettings.findViewById<ImageView>(R.id.iv_right).visibility = View.VISIBLE
ic_theme.findViewById<TextView>(R.id.tv_theme_name).text="享8大特权" ic_theme.findViewById<TextView>(R.id.tv_theme_name).text="享8大特权"
ic_theme.findViewById<TextView>(R.id.tv_me1).text = "无线缩放" ic_theme.findViewById<TextView>(R.id.tv_me1).text = "无线缩放"
ic_theme.findViewById<TextView>(R.id.tv_me2).text = "国内外街景" ic_theme.findViewById<TextView>(R.id.tv_me2).text = "国内外街景"
......
...@@ -79,7 +79,7 @@ class OpenvipViewModel(application: Application) : BaseViewModel(application) { ...@@ -79,7 +79,7 @@ class OpenvipViewModel(application: Application) : BaseViewModel(application) {
override fun onError(e: Throwable) { override fun onError(e: Throwable) {
KLog.e("getVipPayParams", e.printStackTrace()) KLog.e("getVipPayParams", e.printStackTrace())
} }
} }
) )
} }
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"> <layout
xmlns:android="http://schemas.android.com/apk/res/android">
<data> <data>
...@@ -14,7 +15,8 @@ ...@@ -14,7 +15,8 @@
android:background="@color/white" android:background="@color/white"
android:orientation="vertical"> android:orientation="vertical">
<include layout="@layout/include_header" /> <include
layout="@layout/include_header" />
<com.mints.street.widget.ElasticScrollView <com.mints.street.widget.ElasticScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -27,6 +29,7 @@ ...@@ -27,6 +29,7 @@
<ImageView <ImageView
android:id="@+id/iv_applogo"
android:layout_width="70dp" android:layout_width="70dp"
android:layout_height="70dp" android:layout_height="70dp"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
layout="@layout/include_header"/> layout="@layout/include_header"/>
<TextView <TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
......
...@@ -12,15 +12,16 @@ ...@@ -12,15 +12,16 @@
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">
<include layout="@layout/include_header" /> <include layout="@layout/include_header" />
<com.mints.street.widget.ElasticScrollView <com.mints.street.widget.ElasticScrollView
android:id="@+id/ly_linear"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:overScrollMode="never"> android:overScrollMode="never">
<LinearLayout <LinearLayout
android:id="@+id/ly_linear"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:elevation="5dp" android:elevation="5dp"
...@@ -32,9 +33,10 @@ ...@@ -32,9 +33,10 @@
<View <View
style="@style/view_line_E6E6E6" style="@style/view_line_E6E6E6"
android:layout_alignParentBottom="true"
android:layout_marginStart="20dp" android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_alignParentBottom="true" /> android:layout_marginEnd="20dp" />
<include <include
android:id="@+id/item_userAgree" android:id="@+id/item_userAgree"
...@@ -42,9 +44,9 @@ ...@@ -42,9 +44,9 @@
<View <View
style="@style/view_line_E6E6E6" style="@style/view_line_E6E6E6"
android:layout_alignParentBottom="true"
android:layout_marginStart="20dp" android:layout_marginStart="20dp"
android:layout_marginEnd="20dp" android:layout_marginEnd="20dp" />
android:layout_alignParentBottom="true" />
<include <include
android:id="@+id/item_privacyAgree" android:id="@+id/item_privacyAgree"
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
</data> </data>
<LinearLayout <LinearLayout
android:layout_margin="15dp"
android:id="@+id/bg" android:id="@+id/bg"
android:layout_width="100dp" android:layout_width="100dp"
android:layout_height="230dp" android:layout_height="230dp"
...@@ -21,11 +22,7 @@ ...@@ -21,11 +22,7 @@
<com.mints.street.widget.XCRoundRectImageView <com.mints.street.widget.XCRoundRectImageView
android:id="@+id/image" android:id="@+id/image"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="160dp" android:layout_height="160dp" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@tools:sample/avatars" />
<TextView <TextView
android:id="@+id/tv_name" android:id="@+id/tv_name"
......
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