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
160a85c1
Commit
160a85c1
authored
Jul 23, 2021
by
张释方
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交精选体验经典详细信息界面
parent
1d39ed0e
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
263 additions
and
29 deletions
+263
-29
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+9
-14
GridMapAdapter.kt
app/src/main/java/com/mints/street/adapter/GridMapAdapter.kt
+4
-4
GridVrMapAdapter.kt
...rc/main/java/com/mints/street/adapter/GridVrMapAdapter.kt
+46
-0
ItemEnterDestinationAdapter.kt
...a/com/mints/street/adapter/ItemEnterDestinationAdapter.kt
+10
-5
DetailedActivity.kt
...rc/main/java/com/mints/street/main/vr/DetailedActivity.kt
+63
-0
DetailedViewModel.kt
...c/main/java/com/mints/street/main/vr/DetailedViewModel.kt
+8
-0
FreeZoneFragment.kt
...rc/main/java/com/mints/street/main/vr/FreeZoneFragment.kt
+1
-1
cursor_bg.xml
app/src/main/res/drawable/cursor_bg.xml
+2
-2
shape_bg_vrdata.xml
app/src/main/res/drawable/shape_bg_vrdata.xml
+1
-1
vr_item_bg.xml
app/src/main/res/drawable/vr_item_bg.xml
+7
-0
activity_detailed.xml
app/src/main/res/layout/activity_detailed.xml
+65
-0
item_grid_map_adapter.xml
app/src/main/res/layout/item_grid_map_adapter.xml
+1
-1
item_grid_vrmap_adapter.xml
app/src/main/res/layout/item_grid_vrmap_adapter.xml
+45
-0
ic_arrow_back_white.png
app/src/main/res/mipmap-xhdpi/ic_arrow_back_white.png
+0
-0
CommonTitleBar.java
.../src/main/java/com/fry/base/ui/widget/CommonTitleBar.java
+1
-1
No files found.
app/src/main/AndroidManifest.xml
View file @
160a85c1
...
...
@@ -11,8 +11,7 @@
<uses-permission
android:name=
"android.permission.READ_EXTERNAL_STORAGE"
/>
<!-- 访问网络,进行地图相关业务数据请求,包括地图数据,路线规划,POI检索等 -->
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<!-- 调用相机,用于实现扫描二维码,预览个性化地图编辑器生成的个性化地图样式(开发者实际开发中地图SDK不需要该权限) -->
<uses-permission
android:name=
"android.permission.CAMERA"
/>
<!-- 获取手机状态信息 -->
<uses-permission
android:name=
"android.permission.READ_PHONE_STATE"
/>
<!-- android10以后 后台运行位置 -->
<uses-permission
android:name=
"android.permission.READ_PHONE_STATE"
/>
<!-- android10以后 后台运行位置 -->
<uses-permission
android:name=
"android.permission.ACCESS_BACKGROUND_LOCATION"
/>
<application
...
...
@@ -26,6 +25,7 @@
android:supportsRtl=
"true"
android:theme=
"@style/AppTheme"
android:usesCleartextTraffic=
"true"
>
<activity
android:name=
".main.vr.DetailedActivity"
></activity>
<uses-library
android:name=
"org.apache.http.legacy"
...
...
@@ -51,12 +51,10 @@
android:value=
"${SHARE_KEY}"
/>
<meta-data
android:name=
"Mob-AppSecret"
android:value=
"${SHARE_SECRET}"
/>
<!--百度地图开放平台 -->
android:value=
"${SHARE_SECRET}"
/>
<!-- 百度地图开放平台 -->
<meta-data
android:name=
"com.baidu.lbsapi.API_KEY"
android:value=
"SD6luBGzUFSVEZ3n9Xjk3xTsvDFmuRCi"
/>
<!-- 百度地图开放平台 service -->
android:value=
"SD6luBGzUFSVEZ3n9Xjk3xTsvDFmuRCi"
/>
<!-- 百度地图开放平台 service -->
<service
android:name=
"com.baidu.location.f"
android:enabled=
"true"
...
...
@@ -71,21 +69,20 @@
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
<activity
android:name=
".login.LoginActivity"
></activity
>
<activity
android:name=
".login.LoginActivity"
/
>
<activity
android:name=
".main.MainActivity"
android:configChanges=
"orientation|keyboardHidden|screenSize"
android:launchMode=
"singleTask"
android:theme=
"@style/AppTheme.NoneTranslucent"
></activity
>
android:theme=
"@style/AppTheme.NoneTranslucent"
/
>
<activity
android:name=
".main.my.MoresettingsActivity"
/>
<activity
android:name=
".main.my.AboutusActivity"
/>
<activity
android:name=
".main.my.PermissionsActivity"
/>
<activity
android:name=
".main.my.OpenvipActivity"
/>
<activity
android:name=
".main.home.HistoricalimageActivity"
/>
<activity
android:name=
".main.my.BindMobileActivity"
/>
<activity
android:name=
".splash.GuideActivity"
/>
<activity
android:name=
".main.home.SearchMapActivity"
/>
<!-- ShareSDK start -->
<activity
android:name=
".splash.GuideActivity"
/>
<activity
android:name=
".main.home.SearchMapActivity"
/>
<!-- ShareSDK start -->
<activity
android:name=
"com.mob.tools.MobUIShell"
android:configChanges=
"keyboardHidden|orientation|screenSize"
...
...
@@ -165,9 +162,7 @@
android:screenOrientation=
"behind"
android:windowSoftInputMode=
"adjustResize|stateHidden"
/>
<activity
android:name=
".main.vr.PanoramicActivity"
/>
<activity
android:name=
".webview.MintsWebViewActivity"
>
</activity>
<activity
android:name=
".webview.MintsWebViewActivity"
></activity>
</application>
</manifest>
\ No newline at end of file
app/src/main/java/com/mints/street/adapter/GridMapAdapter.kt
View file @
160a85c1
...
...
@@ -27,9 +27,9 @@ class GridMapAdapter(val context: Context, var list: List<VrmapBean.Internal>?)
var
a
=
holder
.
binding
.
bg
.
layoutParams
if
(
position
%
2
==
0
)
{
holder
.
binding
.
bg
.
setMargin
(
AppUtils
.
dp2Px
(
context
,
10F
),
AppUtils
.
dp2Px
(
context
,
10F
),
AppUtils
.
dp2Px
(
context
,
10
F
),
0
,
null
,
null
,
null
)
AppUtils
.
dp2Px
(
context
,
5
F
),
0
,
null
,
null
,
null
)
}
else
{
holder
.
binding
.
bg
.
setMargin
(
0
,
AppUtils
.
dp2Px
(
context
,
10F
),
AppUtils
.
dp2Px
(
context
,
10F
),
holder
.
binding
.
bg
.
setMargin
(
AppUtils
.
dp2Px
(
context
,
5F
)
,
AppUtils
.
dp2Px
(
context
,
10F
),
AppUtils
.
dp2Px
(
context
,
10F
),
0
,
null
,
null
,
null
)
}
...
...
@@ -61,9 +61,9 @@ class GridMapAdapter(val context: Context, var list: List<VrmapBean.Internal>?)
override
fun
getItemCount
()
=
list
!!
.
size
override
fun
onCreateLayoutHelper
():
LayoutHelper
{
val
hp
:
GridLayoutHelper
=
GridLayoutHelper
(
2
)
val
hp
:
GridLayoutHelper
=
GridLayoutHelper
(
2
)
hp
.
setAutoExpand
(
false
)
return
hp
return
hp
}
...
...
app/src/main/java/com/mints/street/adapter/GridVrMapAdapter.kt
0 → 100644
View file @
160a85c1
package
com.mints.street.adapter
import
android.content.Context
import
android.content.pm.ActivityInfo
import
android.view.Window
import
android.view.WindowManager
import
androidx.recyclerview.widget.RecyclerView
import
com.alibaba.android.vlayout.LayoutHelper
import
com.alibaba.android.vlayout.LayoutView
import
com.alibaba.android.vlayout.layout.GridLayoutHelper
import
com.fry.base.adapter.AbstractVLayoutBaseAdapter
import
com.fry.base.adapter.BindingViewHolder
import
com.fry.base.binding.setMargin
import
com.mints.street.R
import
com.mints.street.databinding.ItemGridVrmapAdapterBinding
import
me.goldze.mvvmhabit.utils.AppUtils
class
GridVrMapAdapter
(
val
context
:
Context
,
var
list
:
List
<
String
>?)
:
AbstractVLayoutBaseAdapter
<
ItemGridVrmapAdapterBinding
,
List
<
String
>>(
context
,
list
,
2
)
{
override
fun
onBindViewHolder
(
holder
:
BindingViewHolder
<
ItemGridVrmapAdapterBinding
>,
position
:
Int
)
{
var
a
=
context
.
resources
.
displayMetrics
;
val
bgLayoutParams
=
holder
.
binding
.
bg
.
layoutParams
bgLayoutParams
.
height
=
(
a
.
widthPixels
*
0.5
).
toInt
()
if
(
position
%
2
==
0
)
{
holder
.
binding
.
bg
.
setMargin
(
AppUtils
.
dp2Px
(
context
,
10F
),
AppUtils
.
dp2Px
(
context
,
10F
),
AppUtils
.
dp2Px
(
context
,
6F
),
0
,
null
,
null
,
null
)
}
else
{
holder
.
binding
.
bg
.
setMargin
(
AppUtils
.
dp2Px
(
context
,
6F
),
AppUtils
.
dp2Px
(
context
,
10F
),
AppUtils
.
dp2Px
(
context
,
10F
),
0
,
null
,
null
,
null
)
}
}
override
fun
getItemCount
()
=
list
!!
.
size
override
fun
onCreateLayoutHelper
():
LayoutHelper
{
val
hp
:
GridLayoutHelper
=
GridLayoutHelper
(
2
)
hp
.
setAutoExpand
(
false
)
return
hp
}
override
fun
getLayoutId
(
viewType
:
Int
)
=
R
.
layout
.
item_grid_vrmap_adapter
}
\ No newline at end of file
app/src/main/java/com/mints/street/adapter/ItemEnterDestinationAdapter.kt
View file @
160a85c1
package
com.mints.street.adapter
import
android.content.Context
import
android.graphics.Point
import
android.util.DisplayMetrics
import
android.view.Display
import
android.content.Intent
import
com.alibaba.android.vlayout.layout.LinearLayoutHelper
import
com.fry.base.adapter.AbstractVLayoutBaseAdapter
import
com.fry.base.adapter.BindingViewHolder
import
com.mints.street.R
import
com.mints.street.databinding.ItemEnterDestinationAdapterBinding
import
me.goldze.mvvmhabit.base.AppManager
import
me.goldze.mvvmhabit.utils.KLog
import
com.mints.street.main.my.MoresettingsActivity
import
com.mints.street.main.vr.DetailedActivity
import
com.mints.street.webview.MintsWebViewActivity
/**
...
...
@@ -30,6 +29,12 @@ class ItemEnterDestinationAdapter(val context: Context,val isMultipleLayout:Bool
}
else
{
bgLayoutParams
.
width
=
a
.
widthPixels
}
holder
.
itemView
.
setOnClickListener
(){
//点击跳转
val
intent
=
Intent
(
context
,
DetailedActivity
::
class
.
java
)
context
.
startActivity
(
intent
)
}
}
override
fun
getItemCount
()
=
2
...
...
app/src/main/java/com/mints/street/main/vr/DetailedActivity.kt
0 → 100644
View file @
160a85c1
package
com.mints.street.main.vr
import
androidx.appcompat.app.AppCompatActivity
import
android.os.Bundle
import
android.view.View
import
android.widget.TextView
import
com.alibaba.android.vlayout.DelegateAdapter
import
com.alibaba.android.vlayout.VirtualLayoutManager
import
com.fry.base.base.BaseActivity
import
com.mints.street.BR
import
com.mints.street.R
import
com.mints.street.adapter.GridMapAdapter
import
com.mints.street.adapter.GridVrMapAdapter
import
com.mints.street.databinding.ActivityDetailedBinding
import
com.mints.street.databinding.ActivityMoresettingsBinding
import
com.mints.street.main.my.MoresettingsViewModel
import
kotlinx.android.synthetic.main.activity_detailed.*
import
me.goldze.mvvmhabit.utils.KLog
import
me.goldze.mvvmhabit.utils.systembar.StatusBarUtil
class
DetailedActivity
:
BaseActivity
<
ActivityDetailedBinding
,
DetailedViewModel
>(),
View
.
OnClickListener
{
override
fun
initVariableId
()
=
BR
.
viewModel
override
fun
initContentView
(
savedInstanceState
:
Bundle
?)
=
R
.
layout
.
activity_detailed
private
var
vLayout
:
VirtualLayoutManager
?
=
null
private
var
mAdapter
:
DelegateAdapter
?
=
null
private
var
gridVrMapAdapter
:
GridVrMapAdapter
?
=
null
override
fun
initData
()
{
super
.
initData
()
initView
()
initListener
()
}
private
fun
initListener
()
{
}
private
fun
initView
()
{
//初始化布局管理器
// if (this == null) return
vLayout
=
VirtualLayoutManager
(
this
!!
);
mAdapter
=
DelegateAdapter
(
vLayout
,
false
)
binding
.
listview
.
layoutManager
=
vLayout
binding
.
listview
.
adapter
=
mAdapter
if
(
gridVrMapAdapter
==
null
)
{
gridVrMapAdapter
=
GridVrMapAdapter
(
this
,
listOf
(
"1"
,
"2"
,
"3"
,
"1"
,
"2"
,
"3"
,
"1"
,
"2"
,
"3"
,
"1"
,
"2"
,
"3"
,
"1"
,
"2"
,
"3"
))
KLog
.
e
(
"aaa"
,
"${this.window.decorView.width.toFloat()}"
)
mAdapter
?.
addAdapter
(
gridVrMapAdapter
)
mAdapter
?.
notifyDataSetChanged
()
}
}
override
fun
onClick
(
v
:
View
?)
{
}
}
\ No newline at end of file
app/src/main/java/com/mints/street/main/vr/DetailedViewModel.kt
0 → 100644
View file @
160a85c1
package
com.mints.street.main.vr
import
android.app.Application
import
me.goldze.mvvmhabit.base.BaseViewModel
class
DetailedViewModel
(
application
:
Application
)
:
BaseViewModel
(
application
)
{
}
app/src/main/java/com/mints/street/main/vr/FreeZoneFragment.kt
View file @
160a85c1
...
...
@@ -48,7 +48,7 @@ class FreeZoneFragment : BaseFragment<FragmentFreeZoneBinding, FreeZoneViewModel
binding
.
listView
.
layoutManager
=
vLayout
binding
.
listView
.
adapter
=
mAdapter
mAdapter
?.
addAdapter
(
EnterDestinationAdapter
(
context
!!
))
mAdapter
?.
addAdapter
(
EnterDestinationAdapter
(
context
!!
))
}
...
...
app/src/main/res/drawable/cursor_bg.xml
View file @
160a85c1
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:topLeftRadius=
"
15
dp"
android:topRightRadius=
"
2
0dp"
/>
android:topLeftRadius=
"
30
dp"
android:topRightRadius=
"
3
0dp"
/>
<solid
android:color=
"@color/white"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/shape_bg_vrdata.xml
View file @
160a85c1
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"#80FFFFFF"
/>
<corners
android:radius=
"5dp"
/>
<corners
android:radius=
"
1
5dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/vr_item_bg.xml
0 → 100644
View file @
160a85c1
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:topLeftRadius=
"15dp"
android:topRightRadius=
"20dp"
/>
<solid
android:color=
"@color/white"
/>
</shape>
\ No newline at end of file
app/src/main/res/layout/activity_detailed.xml
0 → 100644
View file @
160a85c1
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
tools:context=
".main.vr.DetailedActivity"
>
<data>
<variable
name=
"viewModel"
type=
"com.mints.street.main.vr.DetailedViewModel"
/>
</data>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<View
android:id=
"@+id/view_bg"
android:layout_width=
"match_parent"
android:layout_height=
"220dp"
android:background=
"#668BFF"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<com.fry.base.ui.widget.CommonTitleBar
android:id=
"@+id/ctb_title"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:ctb_theme=
"light"
app:ctb_title=
"街景"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingTop=
"20dp"
android:paddingLeft=
"15dp"
android:text=
"巴黎嫩亮点"
android:textColor=
"@color/white"
android:textSize=
"16sp"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingLeft=
"15dp"
android:paddingTop=
"5dp"
android:textSize=
"12sp"
android:text=
"巴黎嫩作为文化十字路口的历史可以追溯到数千年前。探索其古老的以及和自然奇观。"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/listview"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"20dp"
android:paddingLeft=
"6dp"
android:paddingRight=
"6dp"
android:background=
"@drawable/vr_item_bg"
/>
</LinearLayout>
</FrameLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/item_grid_map_adapter.xml
View file @
160a85c1
...
...
@@ -13,7 +13,7 @@
<LinearLayout
android:layout_margin=
"15dp"
android:id=
"@+id/bg"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
100dp
"
android:layout_height=
"230dp"
android:background=
"@drawable/shape_bg_vrdata"
android:elevation=
"5dp"
...
...
app/src/main/res/layout/item_grid_vrmap_adapter.xml
0 → 100644
View file @
160a85c1
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<data>
<variable
name=
"viewModel"
type=
"com.mints.street.adapter.GridVrMapAdapter"
/>
</data>
<LinearLayout
android:id=
"@+id/bg"
android:layout_width=
"100dp"
android:layout_height=
"100dp"
android:layout_margin=
"15dp"
android:background=
"@drawable/shape_bg_vrdata"
android:elevation=
"5dp"
android:orientation=
"vertical"
>
<com.mints.street.widget.XCRoundRectImageView
android:id=
"@+id/image"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:src=
"@mipmap/icon_card1"
/>
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"10dp"
android:text=
"测试"
android:textColor=
"@color/black"
android:textSize=
"12sp"
/>
<LinearLayout
android:id=
"@+id/ly_star"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
app/src/main/res/mipmap-xhdpi/ic_arrow_back_white.png
View replaced file @
1d39ed0e
View file @
160a85c1
193 Bytes
|
W:
|
H:
864 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
library_base/src/main/java/com/fry/base/ui/widget/CommonTitleBar.java
View file @
160a85c1
...
...
@@ -103,7 +103,7 @@ public class CommonTitleBar extends FrameLayout implements View.OnClickListener
int
color
=
typedArray
.
getColor
(
R
.
styleable
.
CommonTitleBar_ctb_title_color
,
-
1
);
setTitle
(
title
);
setTitleSize
(
size
);
if
(
color
>
0
)
{
if
(
color
!=
-
1
)
{
setTitleColor
(
color
);
}
...
...
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