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
dcd2fa00
Commit
dcd2fa00
authored
Aug 05, 2021
by
fengruiyu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_1.0.0' of
http://39.97.65.143:81/android/android_street
into fry_dev
parents
9b97659d
afb2b236
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
147 additions
and
26 deletions
+147
-26
HomeFragment.kt
app/src/main/java/com/mints/street/main/home/HomeFragment.kt
+2
-1
FeaturedExperienceViewModel.kt
...a/com/mints/street/main/vr/FeaturedExperienceViewModel.kt
+0
-23
FreeZoneFragment.kt
...rc/main/java/com/mints/street/main/vr/FreeZoneFragment.kt
+1
-1
DialogUtils.kt
...c/main/java/com/mints/street/widget/dialog/DialogUtils.kt
+6
-0
UpgradeVipDialog.kt
...n/java/com/mints/street/widget/dialog/UpgradeVipDialog.kt
+55
-0
checkbox_style.xml
app/src/main/res/drawable/checkbox_style.xml
+8
-0
shape_upgrade_bg.xml
app/src/main/res/drawable/shape_upgrade_bg.xml
+6
-0
shape_upgrade_btn_bg.xml
app/src/main/res/drawable/shape_upgrade_btn_bg.xml
+9
-0
layout_popupwindow.xml
app/src/main/res/layout/layout_popupwindow.xml
+2
-1
layout_upgradevip.xml
app/src/main/res/layout/layout_upgradevip.xml
+55
-0
ic_vip_enable.png
app/src/main/res/mipmap-xhdpi/ic_vip_enable.png
+0
-0
ic_vip_none.png
app/src/main/res/mipmap-xhdpi/ic_vip_none.png
+0
-0
icon_upgrade_close.png
app/src/main/res/mipmap-xhdpi/icon_upgrade_close.png
+0
-0
iv_upgrade.png
app/src/main/res/mipmap-xhdpi/iv_upgrade.png
+0
-0
styles.xml
app/src/main/res/values/styles.xml
+3
-0
No files found.
app/src/main/java/com/mints/street/main/home/HomeFragment.kt
View file @
dcd2fa00
...
...
@@ -28,6 +28,7 @@ import com.mints.street.databinding.FragmentHomeBinding
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
me.goldze.mvvmhabit.base.AppManager
import
me.goldze.mvvmhabit.utils.KLog
import
me.goldze.mvvmhabit.utils.RxUtils
...
...
@@ -39,7 +40,6 @@ import me.goldze.mvvmhabit.utils.ToastUtils
* 首页页面
*/
class
HomeFragment
:
BaseFragment
<
FragmentHomeBinding
,
HomeViewModel
>(),
SensorEventListener
{
companion
object
{
val
IS_FIRST_OPEN
:
String
=
"isFirstOpen"
}
...
...
@@ -116,6 +116,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>(), SensorE
viewModel
.
authorized
(
""
,
currentLat
.
toString
(),
currentLon
.
toString
(),
false
)
}
viewModel
.
getMapBean
()
DialogUtils
.
showupgradevipDialog
(
requireContext
())
}
override
fun
initViewObservable
()
{
...
...
app/src/main/java/com/mints/street/main/vr/FeaturedExperienceViewModel.kt
View file @
dcd2fa00
...
...
@@ -20,29 +20,6 @@ class FeaturedExperienceViewModel(application: Application):BaseViewModel(applic
val
VrmapBean
:
MutableLiveData
<
VrmapBean
>
=
MutableLiveData
()
val
VreperienceBean
:
MutableLiveData
<
VreperienceBean
>
=
MutableLiveData
()
fun
vrPlaces
(){
//无参数传递
ApiModel
.
vrPlaces
(
lifecycleProvider
).
safeSubscribe
(
object
:
HttpSubscribeImpl
<
BaseResponse
<
VrmapBean
>>(
this
@FeaturedExperienceViewModel
,
true
){
override
fun
onBusinessSuccess
(
response
:
BaseResponse
<
VrmapBean
>)
{
VrmapBean
.
value
=
response
.
result
val
a
:
MutableList
<
ScenicSpotBean
>
=
ArrayList
()
for
(
item
in
response
.
result
.
internal
!!
){
a
.
add
(
ScenicSpotBean
(
name
=
item
.
name
,
url
=
item
.
url
,
starRating
=
item
.
stars
,
images
=
item
.
img
)
)
}
}
override
fun
onError
(
e
:
Throwable
)
{
KLog
.
e
(
"vrPlaces"
,
"请求失败 : $e"
)
}
}
)
}
fun
getChooseExperienceHeadData
(){
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"pageNum"
]
=
1
...
...
app/src/main/java/com/mints/street/main/vr/FreeZoneFragment.kt
View file @
dcd2fa00
...
...
@@ -51,7 +51,7 @@ class FreeZoneFragment : BaseFragment<FragmentFreeZoneBinding, FreeZoneViewModel
//获取VR全景数据
viewModel
.
vrPlaces
()
}
viewModel
.
vrPlaces
()
//
viewModel.vrPlaces()
}
...
...
app/src/main/java/com/mints/street/widget/dialog/DialogUtils.kt
View file @
dcd2fa00
...
...
@@ -22,6 +22,12 @@ object DialogUtils {
dialogListener
.
setDialog
(
bonusDialog
)
}
fun
showupgradevipDialog
(
ctx
:
Context
){
val
weakReference
=
WeakReference
<
Context
>(
ctx
)
val
bonusDialog
=
UpgradeVipDialog
(
weakReference
.
get
()
!!
)
bonusDialog
.
show
()
}
/**
* 权限设置弹框
...
...
app/src/main/java/com/mints/street/widget/dialog/UpgradeVipDialog.kt
0 → 100644
View file @
dcd2fa00
package
com.mints.street.widget.dialog
import
android.app.Dialog
import
android.content.Context
import
android.content.Intent
import
android.view.Gravity
import
android.view.KeyEvent
import
android.view.WindowManager
import
android.widget.Button
import
android.widget.ImageView
import
androidx.fragment.app.FragmentActivity
import
com.alibaba.android.vlayout.DelegateAdapter
import
com.alibaba.android.vlayout.VirtualLayoutManager
import
com.blankj.utilcode.util.ActivityUtils.startActivity
import
com.mints.street.R
import
com.mints.street.adapter.GridBenfitAdapter
import
com.mints.street.main.my.OpenvipActivity
import
me.goldze.mvvmhabit.utils.RxUtils
class
UpgradeVipDialog
(
context
:
Context
)
:
Dialog
(
context
,
R
.
style
.
dialog
)
{
private
val
lp
:
WindowManager
.
LayoutParams
private
val
iv_close
:
ImageView
private
val
bt_upgrade
:
Button
init
{
setContentView
(
R
.
layout
.
layout_upgradevip
)
// 设置window属性
lp
=
window
!!
.
attributes
lp
.
gravity
=
Gravity
.
CENTER
lp
.
width
=
WindowManager
.
LayoutParams
.
WRAP_CONTENT
lp
.
windowAnimations
=
R
.
style
.
DialogAnimBottom
window
!!
.
attributes
=
lp
iv_close
=
findViewById
(
R
.
id
.
iv_close
)
bt_upgrade
=
findViewById
(
R
.
id
.
bt_upgrade
)
// 设置外部不可关闭
setCancelable
(
false
)
setCanceledOnTouchOutside
(
false
)
setOnKeyListener
{
_
,
i
,
_
->
i
==
KeyEvent
.
KEYCODE_BACK
}
initView
()
}
private
fun
initView
()
{
RxUtils
.
onMultiClick
(
iv_close
){
dismiss
()
}
RxUtils
.
onMultiClick
(
bt_upgrade
){
startActivity
(
Intent
(
context
,
OpenvipActivity
::
class
.
java
))
// dismiss()
}
}
}
\ No newline at end of file
app/src/main/res/drawable/checkbox_style.xml
0 → 100644
View file @
dcd2fa00
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@mipmap/ic_vip_enable"
android:state_checked=
"true"
/>
<item
android:drawable=
"@mipmap/ic_vip_none"
android:state_checked=
"false"
/>
<item
android:drawable=
"@mipmap/ic_vip_none"
/>
</selector>
\ No newline at end of file
app/src/main/res/drawable/shape_upgrade_bg.xml
0 → 100644
View file @
dcd2fa00
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"20dp"
/>
<solid
android:color=
"@color/white"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/shape_upgrade_btn_bg.xml
0 → 100644
View file @
dcd2fa00
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"50dp"
/>
<gradient
android:startColor=
"#FFC107"
android:endColor=
"#FF5722"
android:angle=
"90"
/>
</shape>
\ No newline at end of file
app/src/main/res/layout/layout_popupwindow.xml
View file @
dcd2fa00
...
...
@@ -65,8 +65,9 @@
android:padding=
"10dp"
>
<CheckBox
android:layout_marginRight=
"6dp"
android:id=
"@+id/cb_checked"
style=
"@style/
MyCheckBox
"
style=
"@style/
CustomCheckboxTheme
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
/>
...
...
app/src/main/res/layout/layout_upgradevip.xml
0 → 100644
View file @
dcd2fa00
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/shape_upgrade_bg"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"30dp"
android:orientation=
"vertical"
>
<ImageView
android:layout_width=
"80dp"
android:layout_height=
"80dp"
android:layout_gravity=
"center"
android:src=
"@mipmap/iv_upgrade"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginTop=
"30dp"
android:text=
"想要继续无限方法又不模糊?"
android:textColor=
"@color/black"
android:textSize=
"14sp"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginTop=
"30dp"
android:text=
"升级全球会员,连地面小车也能看清"
android:textColor=
"#B3000000"
android:textSize=
"12sp"
/>
<Button
android:id=
"@+id/bt_upgrade"
android:layout_width=
"200dp"
android:layout_height=
"40dp"
android:layout_gravity=
"center"
android:layout_marginTop=
"30dp"
android:background=
"@drawable/shape_upgrade_btn_bg"
android:text=
"继续升级"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
</LinearLayout>
<ImageView
android:id=
"@+id/iv_close"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"end|top"
android:src=
"@mipmap/icon_upgrade_close"
/>
</FrameLayout>
\ No newline at end of file
app/src/main/res/mipmap-xhdpi/ic_vip_enable.png
0 → 100644
View file @
dcd2fa00
2.88 KB
app/src/main/res/mipmap-xhdpi/ic_vip_none.png
0 → 100644
View file @
dcd2fa00
1.04 KB
app/src/main/res/mipmap-xhdpi/icon_upgrade_close.png
0 → 100644
View file @
dcd2fa00
799 Bytes
app/src/main/res/mipmap-xhdpi/iv_upgrade.png
0 → 100644
View file @
dcd2fa00
17.4 KB
app/src/main/res/values/styles.xml
View file @
dcd2fa00
...
...
@@ -64,4 +64,7 @@
<item
name=
"android:windowEnterAnimation"
>
@anim/dialog_bottom_in
</item>
<item
name=
"android:windowExitAnimation"
>
@anim/dialog_bottom_out
</item>
</style>
<style
name=
"CustomCheckboxTheme"
parent=
"@android:style/Widget.CompoundButton.CheckBox"
>
<item
name=
"android:button"
>
@drawable/checkbox_style
</item>
</style>
</resources>
\ No newline at end of file
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