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

修改首页热门景点和地图样式跳转逻辑;

修改个人中心,开通会员,返回弹窗icon;
修改手机号登录界面UI
parent 660e040b
......@@ -21,7 +21,7 @@ import java.text.DecimalFormat
class ItemHotViewAdapter(val context: Context, val dialog: BottomSheetDialog?, var list: List<HotViewBean.Dataslist>?,
val viewModel: HomeViewModel, val mCurrentLat: Double,
val mCurrentLon: Double, val onHotItemClick: HotViewDialog.OnHotItemClick?=null) :
val mCurrentLon: Double, val onHotItemClick: HotViewDialog.OnHotItemClick? = null) :
AbstractVLayoutBaseAdapter<ItemHotViewAdapterBinding, List<HotViewBean.Dataslist>?>(
context, list, 1
) {
......@@ -36,21 +36,17 @@ class ItemHotViewAdapter(val context: Context, val dialog: BottomSheetDialog?, v
//设置名称
holder.binding.viewname.text = name
//设置距离
var distance:Double=getDistance(LatLng(lat!!.toDouble(), lng!!.toDouble()),LatLng(mCurrentLat, mCurrentLon))
holder.binding.tvDistance.text = "距离${DecimalFormat("0.00").format(distance/1000).toString()}km"
var distance: Double = getDistance(LatLng(lat!!.toDouble(), lng!!.toDouble()), LatLng(mCurrentLat, mCurrentLon))
holder.binding.tvDistance.text = "距离${DecimalFormat("0.00").format(distance / 1000).toString()}km"
//设置景点简介
holder.binding.tvDescribe.text = desc
//设置点击事件
RxUtils.onMultiClick(holder.itemView) {
//判断是否当前是否是会员,
if (!UserManager.INSTANCE.userIsLogin()&&!UserManager.INSTANCE.getVipFlag()) {
dialog?.dismiss()
//否-跳转到开通vip界面
startActivity(OpenvipActivity::class.java)
} else {
dialog?.dismiss()
//是会员都是登陆状态则继续正确跳转,否则跳转开通vip
if (UserManager.INSTANCE.getVipFlag())
onHotItemClick?.onItemClick(position, list?.get(position))
}
else startActivity(OpenvipActivity::class.java)
dialog?.dismiss()
}
}
......
......@@ -128,19 +128,16 @@ class HomeFragment() : BaseFragment<FragmentHomeBinding, HomeViewModel>(), Senso
false
)
}
//地图样式
//点击地图样式
RxUtils.onMultiClick(binding.imageMapChangeIcon) {
if (!com.mints.street.manager.UserManager.INSTANCE.userIsLogin()&&!com.mints.street.manager.UserManager.INSTANCE.getVipFlag()){
startActivity(OpenvipActivity::class.java)
}
//非会员跳vip
if (com.mints.street.manager.UserManager.INSTANCE.getVipFlag()){
}else startActivity(OpenvipActivity::class.java)
}
//点击热门景点
RxUtils.onMultiClick(binding.lyHotview) {
// if ((!UserManager.INSTANCE.userIsLogin() || !UserManager.INSTANCE.getVipFlag())) {
// startActivity(OpenvipActivity::class.java)
// return@onMultiClick
// }
HotViewDialog(requireActivity(), viewModel, currentLat, currentLon,
this).init().show()
......
......@@ -22,7 +22,6 @@ import kotlinx.android.synthetic.main.fragment_my.*
import me.goldze.mvvmhabit.base.AppManager
import me.goldze.mvvmhabit.utils.RxUtils
import me.goldze.mvvmhabit.utils.systembar.StatusBarUtil
import java.util.*
/**
......@@ -174,22 +173,22 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList
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 = "国内外街景"
ic_theme.findViewById<TextView>(R.id.tv_me3).text = "VR全景"
ic_theme.findViewById<TextView>(R.id.tv_me4).text = "3D地图"
ic_theme.findViewById<TextView>(R.id.tv_me5).text = "高清地图"
ic_theme.findViewById<TextView>(R.id.tv_me3).text = "专属地图"
ic_theme.findViewById<TextView>(R.id.tv_me4).text = "VR全景"
ic_theme.findViewById<TextView>(R.id.tv_me5).text = "高清街景"
ic_theme.findViewById<TextView>(R.id.tv_me6).text = "全球景象"
ic_theme.findViewById<TextView>(R.id.tv_me7).text = "国内外搜索"
ic_theme.findViewById<TextView>(R.id.tv_me8).text = "景点推荐"
ic_theme.findViewById<ImageView>(R.id.iv_decorate1).setImageResource(R.mipmap.icon_me_tiao)
ic_theme.findViewById<ImageView>(R.id.iv_decorate2).setImageResource(R.mipmap.icon_me_tiao)
ic_theme.findViewById<ImageView>(R.id.iv_me1).setImageResource(R.mipmap.icon_privilege5)
ic_theme.findViewById<ImageView>(R.id.iv_me2).setImageResource(R.mipmap.icon_privilege2)
ic_theme.findViewById<ImageView>(R.id.iv_me3).setImageResource(R.mipmap.icon_privilege4)
ic_theme.findViewById<ImageView>(R.id.iv_me4).setImageResource(R.mipmap.icon_privilege3)
ic_theme.findViewById<ImageView>(R.id.iv_me5).setImageResource(R.mipmap.icon_privilege1)
ic_theme.findViewById<ImageView>(R.id.iv_me6).setImageResource(R.mipmap.icon_privilege6)
ic_theme.findViewById<ImageView>(R.id.iv_me7).setImageResource(R.mipmap.icon_privilege7)
ic_theme.findViewById<ImageView>(R.id.iv_me8).setImageResource(R.mipmap.icon_privilege8)
ic_theme.findViewById<ImageView>(R.id.iv_me1).setImageResource(R.mipmap.icon_privilege_my1)
ic_theme.findViewById<ImageView>(R.id.iv_me2).setImageResource(R.mipmap.icon_privilege_my2)
ic_theme.findViewById<ImageView>(R.id.iv_me3).setImageResource(R.mipmap.icon_privilege_my4)
ic_theme.findViewById<ImageView>(R.id.iv_me4).setImageResource(R.mipmap.icon_privilege_my3)
ic_theme.findViewById<ImageView>(R.id.iv_me5).setImageResource(R.mipmap.icon_privilege_my5)
ic_theme.findViewById<ImageView>(R.id.iv_me6).setImageResource(R.mipmap.icon_privilege_my6)
ic_theme.findViewById<ImageView>(R.id.iv_me7).setImageResource(R.mipmap.icon_privilege_my7)
ic_theme.findViewById<ImageView>(R.id.iv_me8).setImageResource(R.mipmap.icon_privilege_my8)
}
}
......@@ -121,9 +121,9 @@ class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>()
privilege.findViewById<TextView>(R.id.tv_theme_name).text = "享8大特权"
privilege.findViewById<TextView>(R.id.tv_me1).text = "无限缩放"
privilege.findViewById<TextView>(R.id.tv_me2).text = "国内外街景"
privilege.findViewById<TextView>(R.id.tv_me3).text = "VR全景"
privilege.findViewById<TextView>(R.id.tv_me4).text = "3D地图"
privilege.findViewById<TextView>(R.id.tv_me5).text = "高清地图"
privilege.findViewById<TextView>(R.id.tv_me3).text = "专属地图"
privilege.findViewById<TextView>(R.id.tv_me4).text = "VR全景"
privilege.findViewById<TextView>(R.id.tv_me5).text = "高清街景"
privilege.findViewById<TextView>(R.id.tv_me6).text = "全球景象"
privilege.findViewById<TextView>(R.id.tv_me7).text = "国内外搜索"
privilege.findViewById<TextView>(R.id.tv_me8).text = "景点推荐"
......@@ -137,8 +137,8 @@ class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>()
privilege.findViewById<ImageView>(R.id.iv_decorate2).setPadding(AppUtils.dp2Px(this, 50F), 0, 0, 0)
privilege.findViewById<ImageView>(R.id.iv_me1).setImageResource(R.mipmap.icon_privilege5)
privilege.findViewById<ImageView>(R.id.iv_me2).setImageResource(R.mipmap.icon_privilege2)
privilege.findViewById<ImageView>(R.id.iv_me3).setImageResource(R.mipmap.icon_privilege4)
privilege.findViewById<ImageView>(R.id.iv_me4).setImageResource(R.mipmap.icon_privilege3)
privilege.findViewById<ImageView>(R.id.iv_me3).setImageResource(R.mipmap.icon_privilege3)
privilege.findViewById<ImageView>(R.id.iv_me4).setImageResource(R.mipmap.icon_privilege4)
privilege.findViewById<ImageView>(R.id.iv_me5).setImageResource(R.mipmap.icon_privilege1)
privilege.findViewById<ImageView>(R.id.iv_me6).setImageResource(R.mipmap.icon_privilege6)
privilege.findViewById<ImageView>(R.id.iv_me7).setImageResource(R.mipmap.icon_privilege7)
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FFE8A4" />
<solid android:color="#F0D59D" />
<corners android:radius="100dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="@color/color_A7BCFE" />
<gradient
android:startColor="#3A98F7"
android:endColor="#76BAFF"
android:angle="90"/>
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="30dip" />
......
......@@ -2,6 +2,7 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="viewModel"
type="com.mints.street.login.LoginViewModel" />
......@@ -9,13 +10,13 @@
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:background="@mipmap/iv_bg_login"
android:orientation="vertical">
<include
android:id="@+id/ic_q"
layout="@layout/include_header"/>
layout="@layout/include_header" />
<androidx.appcompat.widget.LinearLayoutCompat
......@@ -39,13 +40,13 @@
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginStart="10dp"
android:paddingRight="20dp"
android:background="@null"
android:gravity="center_vertical"
android:hint="@string/str_input_phone"
android:inputType="number"
android:maxLength="13"
android:maxLines="1"
android:paddingRight="20dp"
android:textColor="@color/white"
android:textColorHint="@color/white"
android:textSize="14sp" />
......@@ -102,10 +103,16 @@
</androidx.appcompat.widget.LinearLayoutCompat>
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@android:color/transparent"
android:layout_weight="1"/>
<Button
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginStart="40dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="40dp"
......@@ -114,17 +121,14 @@
android:textColor="@color/white"
android:textSize="16sp" />
<View
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"/>
<TextView
android:paddingBottom="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginLeft="30dp"
android:layout_marginTop="20dp"
android:layout_marginRight="30dp"
android:paddingBottom="10dp"
android:text="@string/str_login_tint" />
</androidx.appcompat.widget.LinearLayoutCompat>
......
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