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

提交zsf分支到本地

parent 8f58055b
package com.mints.street.adapter
import android.content.Context
import com.alibaba.android.vlayout.LayoutHelper
import com.alibaba.android.vlayout.layout.GridLayoutHelper
import com.bumptech.glide.Glide
import com.fry.base.adapter.AbstractVLayoutBaseAdapter
......@@ -23,37 +24,37 @@ class GridMapAdapter(val context: Context, var list: List<VrmapBean.Internal>?)
holder: BindingViewHolder<ItemGridMapAdapterBinding>,
position: Int
) {
var a = holder.binding.bg.layoutParams
if (position % 2 == 0) {
holder.binding.bg.setMargin(AppUtils.dp2Px(context, 10F), AppUtils.dp2Px(context, 10F),
AppUtils.dp2Px(context, 10F), 0, null, null, null)
} else {
holder.binding.bg.setMargin(0, AppUtils.dp2Px(context, 10F), AppUtils.dp2Px(context, 10F),
0, null, null, null)
}
datalist?.let {
var databean = it[position]
//设置图片
Glide.with(mContext).load(databean.img).into(holder.binding.image)
//设置标题
holder.binding.tvName.text = databean.name
// //设置星星数量
// var i = 0
// while (i < 5) {
// holder.binding.lyStar.addView(View.inflate(context, R.layout.include_start_show, null))
// i += 1
// var a = holder.binding.bg.layoutParams
// if (position % 2 == 0) {
// holder.binding.bg.setMargin(AppUtils.dp2Px(context, 10F), AppUtils.dp2Px(context, 10F),
// AppUtils.dp2Px(context, 10F), 0, null, null, null)
// } else {
// holder.binding.bg.setMargin(0, AppUtils.dp2Px(context, 10F), AppUtils.dp2Px(context, 10F),
// 0, null, null, null)
// }
//
// datalist?.let {
// var databean = it[position]
// //设置图片
// Glide.with(mContext).load(databean.img).into(holder.binding.image)
// //设置标题
// holder.binding.tvName.text = databean.name
//// //设置星星数量
//// var i = 0
//// while (i < 5) {
//// holder.binding.lyStar.addView(View.inflate(context, R.layout.include_start_show, null))
//// 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)
//// }
}
......@@ -61,5 +62,6 @@ class GridMapAdapter(val context: Context, var list: List<VrmapBean.Internal>?)
override fun onCreateLayoutHelper() = GridLayoutHelper(2)
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.*
import kotlinx.android.synthetic.main.include_header.*
import me.goldze.mvvmhabit.utils.AppUtils
import me.goldze.mvvmhabit.utils.ToastUtils
import me.goldze.mvvmhabit.utils.systembar.StatusBarUtil
/**
* Created by 冯瑞雨 on 2021/7/2.
......@@ -25,12 +26,16 @@ import me.goldze.mvvmhabit.utils.ToastUtils
class LoginActivity : BaseActivity<ActivityLoginBinding, LoginViewModel>(), View.OnClickListener {
private val userManager by lazy { UserManager.INSTANCE }
override fun getStatusBarHeightView(): View? {
return null
}
override fun initContentView(savedInstanceState: Bundle?) = R.layout.activity_login
override fun initVariableId() = BR.viewModel
override fun initData() {
super.initData()
StatusBarUtil.setHeightAndPadding(this, binding.tvName)
initView()
initListener()
}
......
......@@ -11,21 +11,26 @@ import com.mints.street.R
import com.mints.street.bean.UserBean
import com.mints.street.databinding.ActivityBindmobileBinding
import com.mints.street.main.MainActivity
import com.mints.street.manager.UserManager
import com.mints.street.utils.BackInputUtil
import com.tbruyelle.rxpermissions2.RxPermissions
import kotlinx.android.synthetic.main.activity_bindmobile.*
import kotlinx.android.synthetic.main.include_header.*
import me.goldze.mvvmhabit.utils.ToastUtils
import me.goldze.mvvmhabit.utils.systembar.StatusBarUtil
class BindMobileActivity : BaseActivity<ActivityBindmobileBinding, BindMobileViewModel>(), View.OnClickListener {
private var mobile: String? = null
override fun getStatusBarHeightView(): View? {
return null
}
override fun initVariableId() = BR.viewModel
override fun initContentView(savedInstanceState: Bundle?) = R.layout.activity_bindmobile
override fun initData() {
super.initData()
StatusBarUtil.setHeightAndPadding(this, binding.ivApplogo)
initView()
initListener()
}
......@@ -50,7 +55,7 @@ class BindMobileActivity : BaseActivity<ActivityBindmobileBinding, BindMobileVie
}
override fun onClick(v: View?) {
when(v?.id){
when (v?.id) {
R.id.iv_left_icon -> {
finish()
}
......@@ -84,7 +89,7 @@ class BindMobileActivity : BaseActivity<ActivityBindmobileBinding, BindMobileVie
.subscribe { granted: Boolean ->
if (granted) {
mobile = mobile.replace(" ".toRegex(), "")
viewModel.bindingMobile(mobile,code)
viewModel.bindingMobile(mobile, code)
} else {
// showMissingPermissionDialog("设备")
}
......
......@@ -31,9 +31,10 @@ class MoresettingsActivity : BaseActivity<ActivityMoresettingsBinding, Moresetti
override fun getStatusBarHeightView(): View? {
return null
}
override fun initData() {
super.initData()
StatusBarUtil.setHeightAndPadding(this, binding.lyLinear)
StatusBarUtil.setHeightAndPadding(this, binding.btnSwitch)
initView()
initListener()
......@@ -60,7 +61,7 @@ class MoresettingsActivity : BaseActivity<ActivityMoresettingsBinding, Moresetti
item_phone.findViewById<TextView>(R.id.tv_right).setTextColor(Color.BLACK)
item_phone.findViewById<TextView>(R.id.tv_right).text = "去绑定"
item_phone.setOnClickListener(this)
RxUtils.onMultiClick(item_phone){
RxUtils.onMultiClick(item_phone) {
if (userManager.userIsLogin()) {
startActivity(BindMobileActivity::class.java)
return@onMultiClick
......@@ -70,6 +71,7 @@ class MoresettingsActivity : BaseActivity<ActivityMoresettingsBinding, Moresetti
}
}
}
private fun initView() {
tv_title.text = "更多设置"
......@@ -126,10 +128,10 @@ class MoresettingsActivity : BaseActivity<ActivityMoresettingsBinding, Moresetti
KLog.e("setOnClick", "btn_switch has been clicked.")
}
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 -> {//隐私协议
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
moresettings.findViewById<TextView>(R.id.tv_right).visibility = View.GONE
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_me1).text = "无线缩放"
ic_theme.findViewById<TextView>(R.id.tv_me2).text = "国内外街景"
......
<?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>
......@@ -14,7 +15,8 @@
android:background="@color/white"
android:orientation="vertical">
<include layout="@layout/include_header" />
<include
layout="@layout/include_header" />
<com.mints.street.widget.ElasticScrollView
android:layout_width="match_parent"
......@@ -27,6 +29,7 @@
<ImageView
android:id="@+id/iv_applogo"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_gravity="center_horizontal"
......
......@@ -19,6 +19,7 @@
layout="@layout/include_header"/>
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
......
......@@ -12,15 +12,16 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/include_header" />
<com.mints.street.widget.ElasticScrollView
android:id="@+id/ly_linear"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never">
<LinearLayout
android:id="@+id/ly_linear"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="5dp"
......@@ -32,9 +33,10 @@
<View
style="@style/view_line_E6E6E6"
android:layout_alignParentBottom="true"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_alignParentBottom="true" />
android:layout_marginEnd="20dp" />
<include
android:id="@+id/item_userAgree"
......@@ -42,9 +44,9 @@
<View
style="@style/view_line_E6E6E6"
android:layout_alignParentBottom="true"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_alignParentBottom="true" />
android:layout_marginEnd="20dp" />
<include
android:id="@+id/item_privacyAgree"
......
......@@ -11,6 +11,7 @@
</data>
<LinearLayout
android:layout_margin="15dp"
android:id="@+id/bg"
android:layout_width="100dp"
android:layout_height="230dp"
......@@ -21,11 +22,7 @@
<com.mints.street.widget.XCRoundRectImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="160dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@tools:sample/avatars" />
android:layout_height="160dp" />
<TextView
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