Commit 160a85c1 authored by 张释方's avatar 张释方

提交精选体验经典详细信息界面

parent 1d39ed0e
...@@ -11,8 +11,7 @@ ...@@ -11,8 +11,7 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <!-- 访问网络,进行地图相关业务数据请求,包括地图数据,路线规划,POI检索等 --> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <!-- 访问网络,进行地图相关业务数据请求,包括地图数据,路线规划,POI检索等 -->
<uses-permission android:name="android.permission.INTERNET" /> <!-- 调用相机,用于实现扫描二维码,预览个性化地图编辑器生成的个性化地图样式(开发者实际开发中地图SDK不需要该权限) --> <uses-permission android:name="android.permission.INTERNET" /> <!-- 调用相机,用于实现扫描二维码,预览个性化地图编辑器生成的个性化地图样式(开发者实际开发中地图SDK不需要该权限) -->
<uses-permission android:name="android.permission.CAMERA" /> <!-- 获取手机状态信息 --> <uses-permission android:name="android.permission.CAMERA" /> <!-- 获取手机状态信息 -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <!-- android10以后 后台运行位置 -->
<!-- android10以后 后台运行位置 -->
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<application <application
...@@ -26,6 +25,7 @@ ...@@ -26,6 +25,7 @@
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"> android:usesCleartextTraffic="true">
<activity android:name=".main.vr.DetailedActivity"></activity>
<uses-library <uses-library
android:name="org.apache.http.legacy" android:name="org.apache.http.legacy"
...@@ -51,12 +51,10 @@ ...@@ -51,12 +51,10 @@
android:value="${SHARE_KEY}" /> android:value="${SHARE_KEY}" />
<meta-data <meta-data
android:name="Mob-AppSecret" android:name="Mob-AppSecret"
android:value="${SHARE_SECRET}" /> android:value="${SHARE_SECRET}" /> <!-- 百度地图开放平台 -->
<!--百度地图开放平台 -->
<meta-data <meta-data
android:name="com.baidu.lbsapi.API_KEY" android:name="com.baidu.lbsapi.API_KEY"
android:value="SD6luBGzUFSVEZ3n9Xjk3xTsvDFmuRCi" /> android:value="SD6luBGzUFSVEZ3n9Xjk3xTsvDFmuRCi" /> <!-- 百度地图开放平台 service -->
<!-- 百度地图开放平台 service -->
<service <service
android:name="com.baidu.location.f" android:name="com.baidu.location.f"
android:enabled="true" android:enabled="true"
...@@ -71,21 +69,20 @@ ...@@ -71,21 +69,20 @@
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".login.LoginActivity"></activity> <activity android:name=".login.LoginActivity" />
<activity <activity
android:name=".main.MainActivity" android:name=".main.MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize" android:configChanges="orientation|keyboardHidden|screenSize"
android:launchMode="singleTask" 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.MoresettingsActivity" />
<activity android:name=".main.my.AboutusActivity" /> <activity android:name=".main.my.AboutusActivity" />
<activity android:name=".main.my.PermissionsActivity" /> <activity android:name=".main.my.PermissionsActivity" />
<activity android:name=".main.my.OpenvipActivity" /> <activity android:name=".main.my.OpenvipActivity" />
<activity android:name=".main.home.HistoricalimageActivity" /> <activity android:name=".main.home.HistoricalimageActivity" />
<activity android:name=".main.my.BindMobileActivity" /> <activity android:name=".main.my.BindMobileActivity" />
<activity android:name=".splash.GuideActivity"/> <activity android:name=".splash.GuideActivity" />
<activity android:name=".main.home.SearchMapActivity"/> <activity android:name=".main.home.SearchMapActivity" /> <!-- ShareSDK start -->
<!-- ShareSDK start -->
<activity <activity
android:name="com.mob.tools.MobUIShell" android:name="com.mob.tools.MobUIShell"
android:configChanges="keyboardHidden|orientation|screenSize" android:configChanges="keyboardHidden|orientation|screenSize"
...@@ -165,9 +162,7 @@ ...@@ -165,9 +162,7 @@
android:screenOrientation="behind" android:screenOrientation="behind"
android:windowSoftInputMode="adjustResize|stateHidden" /> android:windowSoftInputMode="adjustResize|stateHidden" />
<activity android:name=".main.vr.PanoramicActivity" /> <activity android:name=".main.vr.PanoramicActivity" />
<activity android:name=".webview.MintsWebViewActivity"> <activity android:name=".webview.MintsWebViewActivity"></activity>
</activity>
</application> </application>
</manifest> </manifest>
\ No newline at end of file
...@@ -27,9 +27,9 @@ class GridMapAdapter(val context: Context, var list: List<VrmapBean.Internal>?) ...@@ -27,9 +27,9 @@ class GridMapAdapter(val context: Context, var list: List<VrmapBean.Internal>?)
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, 5F), 0, null, null, null)
} else { } 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) 0, null, null, null)
} }
...@@ -61,7 +61,7 @@ class GridMapAdapter(val context: Context, var list: List<VrmapBean.Internal>?) ...@@ -61,7 +61,7 @@ class GridMapAdapter(val context: Context, var list: List<VrmapBean.Internal>?)
override fun getItemCount() = list!!.size override fun getItemCount() = list!!.size
override fun onCreateLayoutHelper(): LayoutHelper { override fun onCreateLayoutHelper(): LayoutHelper {
val hp : GridLayoutHelper= GridLayoutHelper(2) val hp: GridLayoutHelper = GridLayoutHelper(2)
hp.setAutoExpand(false) hp.setAutoExpand(false)
return hp return hp
} }
......
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
package com.mints.street.adapter package com.mints.street.adapter
import android.content.Context import android.content.Context
import android.graphics.Point import android.content.Intent
import android.util.DisplayMetrics
import android.view.Display
import com.alibaba.android.vlayout.layout.LinearLayoutHelper import com.alibaba.android.vlayout.layout.LinearLayoutHelper
import com.fry.base.adapter.AbstractVLayoutBaseAdapter import com.fry.base.adapter.AbstractVLayoutBaseAdapter
import com.fry.base.adapter.BindingViewHolder import com.fry.base.adapter.BindingViewHolder
import com.mints.street.R import com.mints.street.R
import com.mints.street.databinding.ItemEnterDestinationAdapterBinding import com.mints.street.databinding.ItemEnterDestinationAdapterBinding
import me.goldze.mvvmhabit.base.AppManager import com.mints.street.main.my.MoresettingsActivity
import me.goldze.mvvmhabit.utils.KLog 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 ...@@ -30,6 +29,12 @@ class ItemEnterDestinationAdapter(val context: Context,val isMultipleLayout:Bool
}else{ }else{
bgLayoutParams.width = a.widthPixels bgLayoutParams.width = a.widthPixels
} }
holder.itemView.setOnClickListener(){
//点击跳转
val intent=Intent(context, DetailedActivity::class.java)
context.startActivity(intent)
}
} }
override fun getItemCount() = 2 override fun getItemCount() = 2
......
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
package com.mints.street.main.vr
import android.app.Application
import me.goldze.mvvmhabit.base.BaseViewModel
class DetailedViewModel(application: Application) : BaseViewModel(application) {
}
...@@ -48,7 +48,7 @@ class FreeZoneFragment : BaseFragment<FragmentFreeZoneBinding, FreeZoneViewModel ...@@ -48,7 +48,7 @@ class FreeZoneFragment : BaseFragment<FragmentFreeZoneBinding, FreeZoneViewModel
binding.listView.layoutManager = vLayout binding.listView.layoutManager = vLayout
binding.listView.adapter = mAdapter binding.listView.adapter = mAdapter
mAdapter?.addAdapter(EnterDestinationAdapter(context!! )) mAdapter?.addAdapter(EnterDestinationAdapter(context!!))
} }
......
<?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:topLeftRadius="15dp" android:topLeftRadius="30dp"
android:topRightRadius="20dp" /> android:topRightRadius="30dp" />
<solid android:color="@color/white" /> <solid android:color="@color/white" />
</shape> </shape>
\ No newline at end of file
<?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">
<solid android:color="#80FFFFFF" /> <solid android:color="#80FFFFFF" />
<corners android:radius="5dp" /> <corners android:radius="15dp" />
</shape> </shape>
\ No newline at end of file
<?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
<?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
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<LinearLayout <LinearLayout
android:layout_margin="15dp" android:layout_margin="15dp"
android:id="@+id/bg" android:id="@+id/bg"
android:layout_width="wrap_content" android:layout_width="100dp"
android:layout_height="230dp" android:layout_height="230dp"
android:background="@drawable/shape_bg_vrdata" android:background="@drawable/shape_bg_vrdata"
android:elevation="5dp" android:elevation="5dp"
......
<?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
...@@ -103,7 +103,7 @@ public class CommonTitleBar extends FrameLayout implements View.OnClickListener ...@@ -103,7 +103,7 @@ public class CommonTitleBar extends FrameLayout implements View.OnClickListener
int color = typedArray.getColor(R.styleable.CommonTitleBar_ctb_title_color, -1); int color = typedArray.getColor(R.styleable.CommonTitleBar_ctb_title_color, -1);
setTitle(title); setTitle(title);
setTitleSize(size); setTitleSize(size);
if (color > 0) { if (color != -1) {
setTitleColor(color); setTitleColor(color);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment