Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_freeworld
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_freeworld
Commits
bf188896
Commit
bf188896
authored
Aug 06, 2021
by
张释方
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成热门景点功能
parent
c0c3b24c
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
16 additions
and
11 deletions
+16
-11
HomeFragment.kt
app/src/main/java/com/mints/street/main/home/HomeFragment.kt
+7
-0
HotViewDialog.kt
...main/java/com/mints/street/widget/dialog/HotViewDialog.kt
+1
-1
WxLoginDialog.kt
...main/java/com/mints/street/widget/dialog/WxLoginDialog.kt
+2
-1
shape_upgrade_bg.xml
app/src/main/res/drawable/shape_upgrade_bg.xml
+1
-1
fragment_home.xml
app/src/main/res/layout/fragment_home.xml
+2
-5
item_hot_view_adapter.xml
app/src/main/res/layout/item_hot_view_adapter.xml
+1
-1
layout_hotview.xml
app/src/main/res/layout/layout_hotview.xml
+2
-2
icon_hot_view_close.png
app/src/main/res/mipmap-xhdpi/icon_hot_view_close.png
+0
-0
iv_upgrade.png
app/src/main/res/mipmap-xhdpi/iv_upgrade.png
+0
-0
No files found.
app/src/main/java/com/mints/street/main/home/HomeFragment.kt
View file @
bf188896
...
@@ -30,6 +30,7 @@ import com.mints.street.manager.UmengManager
...
@@ -30,6 +30,7 @@ import com.mints.street.manager.UmengManager
import
com.mints.street.widget.ScrollLayout
import
com.mints.street.widget.ScrollLayout
import
com.mints.street.widget.dialog.DialogUtils
import
com.mints.street.widget.dialog.DialogUtils
import
com.mints.street.widget.dialog.DialogUtils.showupgradevipDialog
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.base.AppManager
import
me.goldze.mvvmhabit.utils.KLog
import
me.goldze.mvvmhabit.utils.KLog
import
me.goldze.mvvmhabit.utils.RxUtils
import
me.goldze.mvvmhabit.utils.RxUtils
...
@@ -41,6 +42,8 @@ import me.goldze.mvvmhabit.utils.ToastUtils
...
@@ -41,6 +42,8 @@ import me.goldze.mvvmhabit.utils.ToastUtils
* 首页页面
* 首页页面
*/
*/
class
HomeFragment
()
:
BaseFragment
<
FragmentHomeBinding
,
HomeViewModel
>(),
SensorEventListener
{
class
HomeFragment
()
:
BaseFragment
<
FragmentHomeBinding
,
HomeViewModel
>(),
SensorEventListener
{
private
val
hotViewDialog
by
lazy
{
HotViewDialog
(
requireActivity
(),
viewModel
,
this
).
init
()
}
companion
object
{
companion
object
{
val
IS_FIRST_OPEN
:
String
=
"isFirstOpen"
val
IS_FIRST_OPEN
:
String
=
"isFirstOpen"
}
}
...
@@ -119,6 +122,10 @@ class HomeFragment() : BaseFragment<FragmentHomeBinding, HomeViewModel>(), Senso
...
@@ -119,6 +122,10 @@ class HomeFragment() : BaseFragment<FragmentHomeBinding, HomeViewModel>(), Senso
RxUtils
.
onMultiClick
(
binding
.
ivClick
)
{
RxUtils
.
onMultiClick
(
binding
.
ivClick
)
{
viewModel
.
authorized
(
""
,
currentLat
.
toString
(),
currentLon
.
toString
(),
false
)
viewModel
.
authorized
(
""
,
currentLat
.
toString
(),
currentLon
.
toString
(),
false
)
}
}
RxUtils
.
onMultiClick
(
binding
.
lyHotview
)
{
KLog
.
e
(
"zsf__"
,
"热门景点点击事件响应了-----------------"
)
hotViewDialog
.
show
()
}
viewModel
.
getMapBean
()
viewModel
.
getMapBean
()
}
}
...
...
app/src/main/java/com/mints/street/widget/dialog/HotViewDialog.kt
View file @
bf188896
...
@@ -73,7 +73,7 @@ class HotViewDialog(context: FragmentActivity, viewModel: HomeViewModel, homeFra
...
@@ -73,7 +73,7 @@ class HotViewDialog(context: FragmentActivity, viewModel: HomeViewModel, homeFra
* 展示
* 展示
*/
*/
fun
show
()
{
fun
show
()
{
mBottomSheetDialog
?
.
show
()
mBottomSheetDialog
!!
.
show
()
}
}
fun
onDestroy
()
{
fun
onDestroy
()
{
...
...
app/src/main/java/com/mints/street/widget/dialog/WxLoginDialog.kt
View file @
bf188896
...
@@ -14,6 +14,7 @@ import cn.sharesdk.framework.ShareSDK
...
@@ -14,6 +14,7 @@ import cn.sharesdk.framework.ShareSDK
import
cn.sharesdk.wechat.friends.Wechat
import
cn.sharesdk.wechat.friends.Wechat
import
com.google.android.material.bottomsheet.BottomSheetDialog
import
com.google.android.material.bottomsheet.BottomSheetDialog
import
com.mints.street.R
import
com.mints.street.R
import
com.mints.street.R.id.design_bottom_sheet
import
com.mints.street.bean.WXInfo
import
com.mints.street.bean.WXInfo
import
com.mints.street.common.Constant
import
com.mints.street.common.Constant
import
com.mints.street.login.LoginActivity
import
com.mints.street.login.LoginActivity
...
@@ -53,7 +54,7 @@ class WxLoginDialog(context: FragmentActivity) : OnLoginListener {
...
@@ -53,7 +54,7 @@ class WxLoginDialog(context: FragmentActivity) : OnLoginListener {
mBottomSheetDialog
=
BottomSheetDialog
(
context
)
mBottomSheetDialog
=
BottomSheetDialog
(
context
)
val
view1
:
View
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
layout_popupwindow
,
null
)
val
view1
:
View
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
layout_popupwindow
,
null
)
mBottomSheetDialog
!!
.
setContentView
(
view1
)
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
iv_weixin
:
ImageView
=
view1
.
findViewById
(
R
.
id
.
iv_weixin
)
val
ly_phone
:
LinearLayoutCompat
=
view1
.
findViewById
(
R
.
id
.
ly_phone
)
val
ly_phone
:
LinearLayoutCompat
=
view1
.
findViewById
(
R
.
id
.
ly_phone
)
...
...
app/src/main/res/drawable/shape_upgrade_bg.xml
View file @
bf188896
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
<corners
android:radius=
"20dp"
/>
android:radius=
"20dp"
/>
<solid
android:color=
"@color/white"
/>
<solid
android:color=
"@color/white"
/>
</shape>
</shape>
\ No newline at end of file
app/src/main/res/layout/fragment_home.xml
View file @
bf188896
...
@@ -41,7 +41,6 @@
...
@@ -41,7 +41,6 @@
<ImageView
<ImageView
android:id=
"@+id/image_map_history"
android:id=
"@+id/image_map_history"
android:layout_width=
"35dp"
android:layout_width=
"35dp"
android:layout_height=
"35dp"
android:layout_height=
"35dp"
android:layout_marginTop=
"15dp"
android:layout_marginTop=
"15dp"
...
@@ -54,7 +53,7 @@
...
@@ -54,7 +53,7 @@
android:id=
"@+id/ly_hotview"
android:id=
"@+id/ly_hotview"
android:layout_width=
"35dp"
android:layout_width=
"35dp"
android:layout_height=
"35dp"
android:layout_height=
"35dp"
android:layout_margin
=
"20
dp"
android:layout_margin
Top=
"15
dp"
android:src=
"@mipmap/icon_hotview"
android:src=
"@mipmap/icon_hotview"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/image_map_history"
/>
app:layout_constraintTop_toBottomOf=
"@id/image_map_history"
/>
...
@@ -78,9 +77,7 @@
...
@@ -78,9 +77,7 @@
android:background=
"@drawable/shape_gold_card"
android:background=
"@drawable/shape_gold_card"
android:orientation=
"vertical"
android:orientation=
"vertical"
app:layout_constraintBottom_toTopOf=
"@id/image_location_icon"
app:layout_constraintBottom_toTopOf=
"@id/image_location_icon"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
>
>
<ImageView
<ImageView
android:id=
"@+id/image_in"
android:id=
"@+id/image_in"
...
...
app/src/main/res/layout/item_hot_view_adapter.xml
View file @
bf188896
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
android:background=
"@drawable/shape_btn_friends_unenabled"
android:background=
"@drawable/shape_btn_friends_unenabled"
tools:text=
"看街景"
tools:text=
"看街景"
android:id=
"@+id/textView5"
android:id=
"@+id/textView5"
android:layout_width=
"70dp"
d
android:layout_width=
"70dp"
android:gravity=
"center"
android:gravity=
"center"
android:layout_height=
"20dp"
android:layout_height=
"20dp"
android:textSize=
"12sp"
android:textSize=
"12sp"
...
...
app/src/main/res/layout/layout_hotview.xml
View file @
bf188896
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
android:background=
"@drawable/shape_dialog_bg"
>
android:background=
"@drawable/shape_dialog_bg"
>
<ImageView
<ImageView
android:id=
"@+id/iv_close"
android:id=
"@+id/iv_close"
android:layout_width=
"
2
0dp"
android:layout_width=
"
3
0dp"
android:layout_height=
"
2
0dp"
android:layout_height=
"
3
0dp"
android:layout_margin=
"10dp"
android:layout_margin=
"10dp"
android:src=
"@mipmap/icon_hot_view_close"
android:src=
"@mipmap/icon_hot_view_close"
android:layout_gravity=
"end"
/>
android:layout_gravity=
"end"
/>
...
...
app/src/main/res/mipmap-xhdpi/icon_hot_view_close.png
0 → 100644
View file @
bf188896
261 Bytes
app/src/main/res/mipmap-xhdpi/iv_upgrade.png
View replaced file @
c0c3b24c
View file @
bf188896
17.4 KB
|
W:
|
H:
50.7 KB
|
W:
|
H:
2-up
Swipe
Onion skin
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment