Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_street
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_street
Commits
a35a846e
Commit
a35a846e
authored
Aug 17, 2021
by
张释方
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改首页热门景点和地图样式跳转逻辑;
修改个人中心,开通会员,返回弹窗icon; 修改手机号登录界面UI
parent
660e040b
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
45 additions
and
47 deletions
+45
-47
ItemHotViewAdapter.kt
.../main/java/com/mints/street/adapter/ItemHotViewAdapter.kt
+7
-11
HomeFragment.kt
app/src/main/java/com/mints/street/main/home/HomeFragment.kt
+5
-8
MyFragment.kt
app/src/main/java/com/mints/street/main/my/MyFragment.kt
+11
-12
OpenvipActivity.kt
...src/main/java/com/mints/street/main/my/OpenvipActivity.kt
+5
-5
shape_btn_friends_unenabled.xml
app/src/main/res/drawable/shape_btn_friends_unenabled.xml
+1
-1
shape_main.xml
app/src/main/res/drawable/shape_main.xml
+4
-2
activity_login.xml
app/src/main/res/layout/activity_login.xml
+12
-8
icon_backvip4.webp
app/src/main/res/mipmap-xhdpi/icon_backvip4.webp
+0
-0
icon_privilege3.webp
app/src/main/res/mipmap-xhdpi/icon_privilege3.webp
+0
-0
No files found.
app/src/main/java/com/mints/street/adapter/ItemHotViewAdapter.kt
View file @
a35a846e
...
...
@@ -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
()
}
}
...
...
app/src/main/java/com/mints/street/main/home/HomeFragment.kt
View file @
a35a846e
...
...
@@ -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
()
...
...
app/src/main/java/com/mints/street/main/my/MyFragment.kt
View file @
a35a846e
...
...
@@ -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_privilege
5
)
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_privilege
1
)
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
_my
2
)
ic_theme
.
findViewById
<
ImageView
>(
R
.
id
.
iv_me3
).
setImageResource
(
R
.
mipmap
.
icon_privilege
_my
4
)
ic_theme
.
findViewById
<
ImageView
>(
R
.
id
.
iv_me4
).
setImageResource
(
R
.
mipmap
.
icon_privilege
_my
3
)
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
_my
6
)
ic_theme
.
findViewById
<
ImageView
>(
R
.
id
.
iv_me7
).
setImageResource
(
R
.
mipmap
.
icon_privilege
_my
7
)
ic_theme
.
findViewById
<
ImageView
>(
R
.
id
.
iv_me8
).
setImageResource
(
R
.
mipmap
.
icon_privilege
_my
8
)
}
}
app/src/main/java/com/mints/street/main/my/OpenvipActivity.kt
View file @
a35a846e
...
...
@@ -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_privilege
4
)
privilege
.
findViewById
<
ImageView
>(
R
.
id
.
iv_me4
).
setImageResource
(
R
.
mipmap
.
icon_privilege
3
)
privilege
.
findViewById
<
ImageView
>(
R
.
id
.
iv_me3
).
setImageResource
(
R
.
mipmap
.
icon_privilege
3
)
privilege
.
findViewById
<
ImageView
>(
R
.
id
.
iv_me4
).
setImageResource
(
R
.
mipmap
.
icon_privilege
4
)
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
)
...
...
app/src/main/res/drawable/shape_btn_friends_unenabled.xml
View file @
a35a846e
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"#F
FE8A4
"
/>
<solid
android:color=
"#F
0D59D
"
/>
<corners
android:radius=
"100dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/shape_main.xml
View file @
a35a846e
<?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"
/>
...
...
app/src/main/res/layout/activity_login.xml
View file @
a35a846e
...
...
@@ -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_par
ent"
android:layout_height=
"
wrap_cont
ent"
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>
...
...
app/src/main/res/mipmap-xhdpi/icon_backvip4.webp
deleted
100644 → 0
View file @
660e040b
File deleted
app/src/main/res/mipmap-xhdpi/icon_privilege3.webp
deleted
100644 → 0
View file @
660e040b
File deleted
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