Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_fiveworld
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_fiveworld
Commits
a7165474
Commit
a7165474
authored
Jul 21, 2021
by
张释方
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交zsf分支到本地
parent
8f58055b
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
118 additions
and
100 deletions
+118
-100
GridMapAdapter.kt
app/src/main/java/com/mints/street/adapter/GridMapAdapter.kt
+32
-30
LoginActivity.kt
app/src/main/java/com/mints/street/login/LoginActivity.kt
+5
-0
BindMobileActivity.kt
.../main/java/com/mints/street/main/my/BindMobileActivity.kt
+8
-3
MoresettingsActivity.kt
...ain/java/com/mints/street/main/my/MoresettingsActivity.kt
+56
-54
MyFragment.kt
app/src/main/java/com/mints/street/main/my/MyFragment.kt
+1
-0
OpenvipViewModel.kt
...rc/main/java/com/mints/street/main/my/OpenvipViewModel.kt
+1
-1
activity_bindmobile.xml
app/src/main/res/layout/activity_bindmobile.xml
+5
-2
activity_login.xml
app/src/main/res/layout/activity_login.xml
+1
-0
activity_moresettings.xml
app/src/main/res/layout/activity_moresettings.xml
+7
-5
item_grid_map_adapter.xml
app/src/main/res/layout/item_grid_map_adapter.xml
+2
-5
No files found.
app/src/main/java/com/mints/street/adapter/GridMapAdapter.kt
View file @
a7165474
package
com.mints.street.adapter
package
com.mints.street.adapter
import
android.content.Context
import
android.content.Context
import
com.alibaba.android.vlayout.LayoutHelper
import
com.alibaba.android.vlayout.layout.GridLayoutHelper
import
com.alibaba.android.vlayout.layout.GridLayoutHelper
import
com.bumptech.glide.Glide
import
com.bumptech.glide.Glide
import
com.fry.base.adapter.AbstractVLayoutBaseAdapter
import
com.fry.base.adapter.AbstractVLayoutBaseAdapter
...
@@ -23,37 +24,37 @@ class GridMapAdapter(val context: Context, var list: List<VrmapBean.Internal>?)
...
@@ -23,37 +24,37 @@ class GridMapAdapter(val context: Context, var list: List<VrmapBean.Internal>?)
holder
:
BindingViewHolder
<
ItemGridMapAdapterBinding
>,
holder
:
BindingViewHolder
<
ItemGridMapAdapterBinding
>,
position
:
Int
position
:
Int
)
{
)
{
var
a
=
holder
.
binding
.
bg
.
layoutParams
// var a = holder.binding.bg.layoutParams
if
(
position
%
2
==
0
)
{
// if (position % 2 == 0) {
holder
.
binding
.
bg
.
setMargin
(
AppUtils
.
dp2Px
(
context
,
10F
),
AppUtils
.
dp2Px
(
context
,
10F
),
// holder.binding.bg.setMargin(AppUtils.dp2Px(context, 10F), AppUtils.dp2Px(context, 10F),
AppUtils
.
dp2Px
(
context
,
10F
),
0
,
null
,
null
,
null
)
// AppUtils.dp2Px(context, 10F), 0, null, null, null)
}
else
{
// } else {
holder
.
binding
.
bg
.
setMargin
(
0
,
AppUtils
.
dp2Px
(
context
,
10F
),
AppUtils
.
dp2Px
(
context
,
10F
),
// holder.binding.bg.setMargin(0, AppUtils.dp2Px(context, 10F), AppUtils.dp2Px(context, 10F),
0
,
null
,
null
,
null
)
// 0, null, null, null)
}
// }
//
datalist
?.
let
{
// datalist?.let {
var
databean
=
it
[
position
]
// var databean = it[position]
//设置图片
// //设置图片
Glide
.
with
(
mContext
).
load
(
databean
.
img
).
into
(
holder
.
binding
.
image
)
// Glide.with(mContext).load(databean.img).into(holder.binding.image)
//设置标题
// //设置标题
holder
.
binding
.
tvName
.
text
=
databean
.
name
// holder.binding.tvName.text = databean.name
// //设置星星数量
//// //设置星星数量
// var i = 0
//// var i = 0
// while (i < 5) {
//// while (i < 5) {
// holder.binding.lyStar.addView(View.inflate(context, R.layout.include_start_show, null))
//// holder.binding.lyStar.addView(View.inflate(context, R.layout.include_start_show, null))
// i += 1
//// 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>?)
...
@@ -61,5 +62,6 @@ class GridMapAdapter(val context: Context, var list: List<VrmapBean.Internal>?)
override
fun
onCreateLayoutHelper
()
=
GridLayoutHelper
(
2
)
override
fun
onCreateLayoutHelper
()
=
GridLayoutHelper
(
2
)
override
fun
getLayoutId
(
viewType
:
Int
)
=
R
.
layout
.
item_grid_map_adapter
override
fun
getLayoutId
(
viewType
:
Int
)
=
R
.
layout
.
item_grid_map_adapter
}
}
\ No newline at end of file
app/src/main/java/com/mints/street/login/LoginActivity.kt
View file @
a7165474
...
@@ -18,6 +18,7 @@ import kotlinx.android.synthetic.main.activity_login.*
...
@@ -18,6 +18,7 @@ import kotlinx.android.synthetic.main.activity_login.*
import
kotlinx.android.synthetic.main.include_header.*
import
kotlinx.android.synthetic.main.include_header.*
import
me.goldze.mvvmhabit.utils.AppUtils
import
me.goldze.mvvmhabit.utils.AppUtils
import
me.goldze.mvvmhabit.utils.ToastUtils
import
me.goldze.mvvmhabit.utils.ToastUtils
import
me.goldze.mvvmhabit.utils.systembar.StatusBarUtil
/**
/**
* Created by 冯瑞雨 on 2021/7/2.
* Created by 冯瑞雨 on 2021/7/2.
...
@@ -25,12 +26,16 @@ import me.goldze.mvvmhabit.utils.ToastUtils
...
@@ -25,12 +26,16 @@ import me.goldze.mvvmhabit.utils.ToastUtils
class
LoginActivity
:
BaseActivity
<
ActivityLoginBinding
,
LoginViewModel
>(),
View
.
OnClickListener
{
class
LoginActivity
:
BaseActivity
<
ActivityLoginBinding
,
LoginViewModel
>(),
View
.
OnClickListener
{
private
val
userManager
by
lazy
{
UserManager
.
INSTANCE
}
private
val
userManager
by
lazy
{
UserManager
.
INSTANCE
}
override
fun
getStatusBarHeightView
():
View
?
{
return
null
}
override
fun
initContentView
(
savedInstanceState
:
Bundle
?)
=
R
.
layout
.
activity_login
override
fun
initContentView
(
savedInstanceState
:
Bundle
?)
=
R
.
layout
.
activity_login
override
fun
initVariableId
()
=
BR
.
viewModel
override
fun
initVariableId
()
=
BR
.
viewModel
override
fun
initData
()
{
override
fun
initData
()
{
super
.
initData
()
super
.
initData
()
StatusBarUtil
.
setHeightAndPadding
(
this
,
binding
.
tvName
)
initView
()
initView
()
initListener
()
initListener
()
}
}
...
...
app/src/main/java/com/mints/street/main/my/BindMobileActivity.kt
View file @
a7165474
...
@@ -11,21 +11,26 @@ import com.mints.street.R
...
@@ -11,21 +11,26 @@ import com.mints.street.R
import
com.mints.street.bean.UserBean
import
com.mints.street.bean.UserBean
import
com.mints.street.databinding.ActivityBindmobileBinding
import
com.mints.street.databinding.ActivityBindmobileBinding
import
com.mints.street.main.MainActivity
import
com.mints.street.main.MainActivity
import
com.mints.street.manager.UserManager
import
com.mints.street.utils.BackInputUtil
import
com.mints.street.utils.BackInputUtil
import
com.tbruyelle.rxpermissions2.RxPermissions
import
com.tbruyelle.rxpermissions2.RxPermissions
import
kotlinx.android.synthetic.main.activity_bindmobile.*
import
kotlinx.android.synthetic.main.activity_bindmobile.*
import
kotlinx.android.synthetic.main.include_header.*
import
kotlinx.android.synthetic.main.include_header.*
import
me.goldze.mvvmhabit.utils.ToastUtils
import
me.goldze.mvvmhabit.utils.ToastUtils
import
me.goldze.mvvmhabit.utils.systembar.StatusBarUtil
class
BindMobileActivity
:
BaseActivity
<
ActivityBindmobileBinding
,
BindMobileViewModel
>(),
View
.
OnClickListener
{
class
BindMobileActivity
:
BaseActivity
<
ActivityBindmobileBinding
,
BindMobileViewModel
>(),
View
.
OnClickListener
{
private
var
mobile
:
String
?
=
null
private
var
mobile
:
String
?
=
null
override
fun
getStatusBarHeightView
():
View
?
{
return
null
}
override
fun
initVariableId
()
=
BR
.
viewModel
override
fun
initVariableId
()
=
BR
.
viewModel
override
fun
initContentView
(
savedInstanceState
:
Bundle
?)
=
R
.
layout
.
activity_bindmobile
override
fun
initContentView
(
savedInstanceState
:
Bundle
?)
=
R
.
layout
.
activity_bindmobile
override
fun
initData
()
{
override
fun
initData
()
{
super
.
initData
()
super
.
initData
()
StatusBarUtil
.
setHeightAndPadding
(
this
,
binding
.
ivApplogo
)
initView
()
initView
()
initListener
()
initListener
()
}
}
...
@@ -50,7 +55,7 @@ class BindMobileActivity : BaseActivity<ActivityBindmobileBinding, BindMobileVie
...
@@ -50,7 +55,7 @@ class BindMobileActivity : BaseActivity<ActivityBindmobileBinding, BindMobileVie
}
}
override
fun
onClick
(
v
:
View
?)
{
override
fun
onClick
(
v
:
View
?)
{
when
(
v
?.
id
)
{
when
(
v
?.
id
)
{
R
.
id
.
iv_left_icon
->
{
R
.
id
.
iv_left_icon
->
{
finish
()
finish
()
}
}
...
@@ -84,7 +89,7 @@ class BindMobileActivity : BaseActivity<ActivityBindmobileBinding, BindMobileVie
...
@@ -84,7 +89,7 @@ class BindMobileActivity : BaseActivity<ActivityBindmobileBinding, BindMobileVie
.
subscribe
{
granted
:
Boolean
->
.
subscribe
{
granted
:
Boolean
->
if
(
granted
)
{
if
(
granted
)
{
mobile
=
mobile
.
replace
(
" "
.
toRegex
(),
""
)
mobile
=
mobile
.
replace
(
" "
.
toRegex
(),
""
)
viewModel
.
bindingMobile
(
mobile
,
code
)
viewModel
.
bindingMobile
(
mobile
,
code
)
}
else
{
}
else
{
// showMissingPermissionDialog("设备")
// showMissingPermissionDialog("设备")
}
}
...
...
app/src/main/java/com/mints/street/main/my/MoresettingsActivity.kt
View file @
a7165474
...
@@ -31,9 +31,10 @@ class MoresettingsActivity : BaseActivity<ActivityMoresettingsBinding, Moresetti
...
@@ -31,9 +31,10 @@ class MoresettingsActivity : BaseActivity<ActivityMoresettingsBinding, Moresetti
override
fun
getStatusBarHeightView
():
View
?
{
override
fun
getStatusBarHeightView
():
View
?
{
return
null
return
null
}
}
override
fun
initData
()
{
override
fun
initData
()
{
super
.
initData
()
super
.
initData
()
StatusBarUtil
.
setHeightAndPadding
(
this
,
binding
.
lyLinear
)
StatusBarUtil
.
setHeightAndPadding
(
this
,
binding
.
btnSwitch
)
initView
()
initView
()
initListener
()
initListener
()
...
@@ -60,7 +61,7 @@ class MoresettingsActivity : BaseActivity<ActivityMoresettingsBinding, Moresetti
...
@@ -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
).
setTextColor
(
Color
.
BLACK
)
item_phone
.
findViewById
<
TextView
>(
R
.
id
.
tv_right
).
text
=
"去绑定"
item_phone
.
findViewById
<
TextView
>(
R
.
id
.
tv_right
).
text
=
"去绑定"
item_phone
.
setOnClickListener
(
this
)
item_phone
.
setOnClickListener
(
this
)
RxUtils
.
onMultiClick
(
item_phone
)
{
RxUtils
.
onMultiClick
(
item_phone
)
{
if
(
userManager
.
userIsLogin
())
{
if
(
userManager
.
userIsLogin
())
{
startActivity
(
BindMobileActivity
::
class
.
java
)
startActivity
(
BindMobileActivity
::
class
.
java
)
return
@onMultiClick
return
@onMultiClick
...
@@ -70,6 +71,7 @@ class MoresettingsActivity : BaseActivity<ActivityMoresettingsBinding, Moresetti
...
@@ -70,6 +71,7 @@ class MoresettingsActivity : BaseActivity<ActivityMoresettingsBinding, Moresetti
}
}
}
}
}
}
private
fun
initView
()
{
private
fun
initView
()
{
tv_title
.
text
=
"更多设置"
tv_title
.
text
=
"更多设置"
...
@@ -126,10 +128,10 @@ class MoresettingsActivity : BaseActivity<ActivityMoresettingsBinding, Moresetti
...
@@ -126,10 +128,10 @@ class MoresettingsActivity : BaseActivity<ActivityMoresettingsBinding, Moresetti
KLog
.
e
(
"setOnClick"
,
"btn_switch has been clicked."
)
KLog
.
e
(
"setOnClick"
,
"btn_switch has been clicked."
)
}
}
R
.
id
.
item_userAgree
->
{
//用户协议
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
->
{
//隐私协议
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"
)
}
}
}
}
...
...
app/src/main/java/com/mints/street/main/my/MyFragment.kt
View file @
a7165474
...
@@ -156,6 +156,7 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList
...
@@ -156,6 +156,7 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList
moresettings
.
findViewById
<
TextView
>(
R
.
id
.
tv_right
).
visibility
=
View
.
GONE
moresettings
.
findViewById
<
TextView
>(
R
.
id
.
tv_right
).
visibility
=
View
.
GONE
moresettings
.
findViewById
<
ImageView
>(
R
.
id
.
iv_right
).
visibility
=
View
.
VISIBLE
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_theme_name
).
text
=
"享8大特权"
ic_theme
.
findViewById
<
TextView
>(
R
.
id
.
tv_me1
).
text
=
"无线缩放"
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_me2
).
text
=
"国内外街景"
...
...
app/src/main/java/com/mints/street/main/my/OpenvipViewModel.kt
View file @
a7165474
app/src/main/res/layout/activity_bindmobile.xml
View file @
a7165474
<?xml version="1.0" encoding="utf-8"?>
<?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>
<data>
...
@@ -14,7 +15,8 @@
...
@@ -14,7 +15,8 @@
android:background=
"@color/white"
android:background=
"@color/white"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<include
layout=
"@layout/include_header"
/>
<include
layout=
"@layout/include_header"
/>
<com.mints.street.widget.ElasticScrollView
<com.mints.street.widget.ElasticScrollView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -27,6 +29,7 @@
...
@@ -27,6 +29,7 @@
<ImageView
<ImageView
android:id=
"@+id/iv_applogo"
android:layout_width=
"70dp"
android:layout_width=
"70dp"
android:layout_height=
"70dp"
android:layout_height=
"70dp"
android:layout_gravity=
"center_horizontal"
android:layout_gravity=
"center_horizontal"
...
...
app/src/main/res/layout/activity_login.xml
View file @
a7165474
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
layout=
"@layout/include_header"
/>
layout=
"@layout/include_header"
/>
<TextView
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_gravity=
"center"
...
...
app/src/main/res/layout/activity_moresettings.xml
View file @
a7165474
...
@@ -12,15 +12,16 @@
...
@@ -12,15 +12,16 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<include
layout=
"@layout/include_header"
/>
<include
layout=
"@layout/include_header"
/>
<com.mints.street.widget.ElasticScrollView
<com.mints.street.widget.ElasticScrollView
android:id=
"@+id/ly_linear"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:overScrollMode=
"never"
>
android:overScrollMode=
"never"
>
<LinearLayout
<LinearLayout
android:id=
"@+id/ly_linear"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:elevation=
"5dp"
android:elevation=
"5dp"
...
@@ -32,9 +33,10 @@
...
@@ -32,9 +33,10 @@
<View
<View
style=
"@style/view_line_E6E6E6"
style=
"@style/view_line_E6E6E6"
android:layout_alignParentBottom=
"true"
android:layout_marginStart=
"20dp"
android:layout_marginStart=
"20dp"
android:layout_marginEnd=
"20dp"
android:layout_
alignParentBottom=
"true
"
/>
android:layout_
marginEnd=
"20dp
"
/>
<include
<include
android:id=
"@+id/item_userAgree"
android:id=
"@+id/item_userAgree"
...
@@ -42,9 +44,9 @@
...
@@ -42,9 +44,9 @@
<View
<View
style=
"@style/view_line_E6E6E6"
style=
"@style/view_line_E6E6E6"
android:layout_alignParentBottom=
"true"
android:layout_marginStart=
"20dp"
android:layout_marginStart=
"20dp"
android:layout_marginEnd=
"20dp"
android:layout_marginEnd=
"20dp"
/>
android:layout_alignParentBottom=
"true"
/>
<include
<include
android:id=
"@+id/item_privacyAgree"
android:id=
"@+id/item_privacyAgree"
...
...
app/src/main/res/layout/item_grid_map_adapter.xml
View file @
a7165474
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
</data>
</data>
<LinearLayout
<LinearLayout
android:layout_margin=
"15dp"
android:id=
"@+id/bg"
android:id=
"@+id/bg"
android:layout_width=
"100dp"
android:layout_width=
"100dp"
android:layout_height=
"230dp"
android:layout_height=
"230dp"
...
@@ -21,11 +22,7 @@
...
@@ -21,11 +22,7 @@
<com.mints.street.widget.XCRoundRectImageView
<com.mints.street.widget.XCRoundRectImageView
android:id=
"@+id/image"
android:id=
"@+id/image"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"160dp"
android:layout_height=
"160dp"
/>
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
tools:srcCompat=
"@tools:sample/avatars"
/>
<TextView
<TextView
android:id=
"@+id/tv_name"
android:id=
"@+id/tv_name"
...
...
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