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

完成热门景点功能

parent c0c3b24c
......@@ -30,6 +30,7 @@ import com.mints.street.manager.UmengManager
import com.mints.street.widget.ScrollLayout
import com.mints.street.widget.dialog.DialogUtils
import com.mints.street.widget.dialog.DialogUtils.showupgradevipDialog
import com.mints.street.widget.dialog.HotViewDialog
import me.goldze.mvvmhabit.base.AppManager
import me.goldze.mvvmhabit.utils.KLog
import me.goldze.mvvmhabit.utils.RxUtils
......@@ -41,6 +42,8 @@ import me.goldze.mvvmhabit.utils.ToastUtils
* 首页页面
*/
class HomeFragment() : BaseFragment<FragmentHomeBinding, HomeViewModel>(), SensorEventListener {
private val hotViewDialog by lazy { HotViewDialog(requireActivity(),viewModel,this).init() }
companion object {
val IS_FIRST_OPEN: String = "isFirstOpen"
}
......@@ -119,6 +122,10 @@ class HomeFragment() : BaseFragment<FragmentHomeBinding, HomeViewModel>(), Senso
RxUtils.onMultiClick(binding.ivClick) {
viewModel.authorized("", currentLat.toString(), currentLon.toString(), false)
}
RxUtils.onMultiClick(binding.lyHotview) {
KLog.e("zsf__","热门景点点击事件响应了-----------------")
hotViewDialog.show()
}
viewModel.getMapBean()
}
......
......@@ -73,7 +73,7 @@ class HotViewDialog(context: FragmentActivity, viewModel: HomeViewModel, homeFra
* 展示
*/
fun show() {
mBottomSheetDialog?.show()
mBottomSheetDialog!!.show()
}
fun onDestroy() {
......
......@@ -14,6 +14,7 @@ import cn.sharesdk.framework.ShareSDK
import cn.sharesdk.wechat.friends.Wechat
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.mints.street.R
import com.mints.street.R.id.design_bottom_sheet
import com.mints.street.bean.WXInfo
import com.mints.street.common.Constant
import com.mints.street.login.LoginActivity
......@@ -53,7 +54,7 @@ class WxLoginDialog(context: FragmentActivity) : OnLoginListener {
mBottomSheetDialog = BottomSheetDialog(context)
val view1: View = LayoutInflater.from(context).inflate(R.layout.layout_popupwindow, null)
mBottomSheetDialog!!.setContentView(view1)
mBottomSheetDialog!!.window!!.findViewById<View>(R.id.design_bottom_sheet).setBackgroundColor(Color.TRANSPARENT)
mBottomSheetDialog!!.window!!.findViewById<View>(design_bottom_sheet).setBackgroundColor(Color.TRANSPARENT)
val iv_weixin: ImageView = view1.findViewById(R.id.iv_weixin)
val ly_phone: LinearLayoutCompat = view1.findViewById(R.id.ly_phone)
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:radius="20dp" />
android:radius="20dp"/>
<solid android:color="@color/white"/>
</shape>
\ No newline at end of file
......@@ -41,7 +41,6 @@
<ImageView
android:id="@+id/image_map_history"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginTop="15dp"
......@@ -54,7 +53,7 @@
android:id="@+id/ly_hotview"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_margin="20dp"
android:layout_marginTop="15dp"
android:src="@mipmap/icon_hotview"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/image_map_history" />
......@@ -78,9 +77,7 @@
android:background="@drawable/shape_gold_card"
android:orientation="vertical"
app:layout_constraintBottom_toTopOf="@id/image_location_icon"
app:layout_constraintEnd_toEndOf="parent"
>
app:layout_constraintEnd_toEndOf="parent">
<ImageView
android:id="@+id/image_in"
......
......@@ -74,7 +74,7 @@
android:background="@drawable/shape_btn_friends_unenabled"
tools:text="看街景"
android:id="@+id/textView5"
android:layout_width="70dp"d
android:layout_width="70dp"
android:gravity="center"
android:layout_height="20dp"
android:textSize="12sp"
......
......@@ -6,8 +6,8 @@
android:background="@drawable/shape_dialog_bg">
<ImageView
android:id="@+id/iv_close"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_margin="10dp"
android:src="@mipmap/icon_hot_view_close"
android:layout_gravity="end"/>
......
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