Commit a85abb1e authored by mengcuiguang2's avatar mengcuiguang2

代码合并

parents 54de132c 7f6c0391
*.iml *.iml
*.log
.gradle .gradle
/local.properties /local.properties
/.idea /.idea
<<<<<<< HEAD
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/vcs.xml
/.idea/assetWizardSettings.xml
=======
>>>>>>> 51e259dbaa1307df3b5a176164c24faf100db48c
.DS_Store .DS_Store
/build /build
/captures /captures
......
3D_Street_view
\ No newline at end of file
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JetCodeStyleSettings>
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
<value>
<package name="java.util" alias="false" withSubpackages="false" />
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
<package name="io.ktor" alias="false" withSubpackages="true" />
</value>
</option>
<option name="PACKAGES_IMPORT_LAYOUT">
<value>
<package name="" alias="false" withSubpackages="true" />
<package name="java" alias="false" withSubpackages="true" />
<package name="javax" alias="false" withSubpackages="true" />
<package name="kotlin" alias="false" withSubpackages="true" />
<package name="" alias="true" withSubpackages="true" />
</value>
</option>
</JetCodeStyleSettings>
<codeStyleSettings language="XML">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>ANDROID_ATTRIBUTE_ORDER</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
</code_scheme>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="PLATFORM" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="$PROJECT_DIR$/../../android/kfTools/Android Studio/gradle/gradle-2.4" />
<option name="gradleJvm" value="1.8" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
<option value="$PROJECT_DIR$/library_base" />
<option value="$PROJECT_DIR$/mvvmhabit" />
<option value="$PROJECT_DIR$/shareSdkLib" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven" />
<option name="name" value="maven" />
<option name="url" value="http://maven.aliyun.com/nexus/content/repositories/jcenter" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven2" />
<option name="name" value="maven2" />
<option name="url" value="https://jitpack.io" />
</remote-repository>
<remote-repository>
<option name="id" value="maven3" />
<option name="name" value="maven3" />
<option name="url" value="https://oss.jfrog.org/libs-snapshot" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
...@@ -150,6 +150,8 @@ dependencies { ...@@ -150,6 +150,8 @@ dependencies {
api project(':shareSdkLib') api project(':shareSdkLib')
// switchbutton // switchbutton
implementation 'com.github.iielse:switchbutton:1.0.4' implementation 'com.github.iielse:switchbutton:1.0.4'
// BottomDialog
implementation 'com.google.android.material:material:1.0.0'
// 三方接入 // 三方接入
...@@ -178,4 +180,8 @@ dependencies { ...@@ -178,4 +180,8 @@ dependencies {
kapt 'com.cuieney:rxpay-compiler:2.1.1' kapt 'com.cuieney:rxpay-compiler:2.1.1'
implementation 'com.romandanylyk:pageindicatorview:1.0.3' implementation 'com.romandanylyk:pageindicatorview:1.0.3'
implementation(name: 'BaiduLBS_AndroidSDK_Lib', ext: 'aar')
} }
\ No newline at end of file
...@@ -3,29 +3,23 @@ ...@@ -3,29 +3,23 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="com.mints.street"> package="com.mints.street">
<uses-permission android:name="android.permission.INTERNET" /> <!-- 这个权限用于进行网络定位 -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <!-- 这个权限用于访问GPS定位 -->
<uses-permission android:name="android.permission.READ_CONTACTS" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> <!-- 用于访问wifi网络信息,wifi信息会用于进行网络定位 -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!-- 获取网络状态,根据网络状态切换进行数据请求网络转换 -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CALL_PHONE" /> <!-- 写外置存储。如果开发者使用了离线地图,并且数据写在外置存储区域,则需要申请该权限 -->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" /> <!-- 读取外置存储。如果开发者使用了so动态加载功能并且把so文件放在了外置存储区域,则需要申请该权限,否则不需要 -->
<uses-permission android:name="android.permission.WRITE_SETTINGS" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" /> <!-- 访问网络,进行地图相关业务数据请求,包括地图数据,路线规划,POI检索等 -->
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" <uses-permission android:name="android.permission.INTERNET" />
tools:ignore="ProtectedPermissions" /> <!-- 调用相机,用于实现扫描二维码,预览个性化地图编辑器生成的个性化地图样式(开发者实际开发中地图SDK不需要该权限)-->
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" /> <uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<application <application
android:name="com.mints.street.AppApplication" android:name="com.mints.street.AppApplication"
...@@ -64,6 +58,13 @@ ...@@ -64,6 +58,13 @@
<meta-data <meta-data
android:name="Mob-AppSecret" 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-->
<service android:name="com.baidu.location.f"
android:enabled="true"
android:process=":remote"/>
<activity android:name="com.mints.street.splash.SplashActivity" <activity android:name="com.mints.street.splash.SplashActivity"
android:excludeFromRecents="true" android:excludeFromRecents="true"
......
package com.mints.street package com.mints.street
import android.content.Context
import android.os.StrictMode import android.os.StrictMode
import android.os.StrictMode.VmPolicy import android.os.StrictMode.VmPolicy
import android.util.Log import android.util.Log
import com.baidu.mapapi.CoordType
import com.baidu.mapapi.SDKInitializer
import com.cuieney.rxpay_annotation.WX import com.cuieney.rxpay_annotation.WX
import com.fry.base.base.BaseApp import com.fry.base.base.BaseApp
import com.mints.street.manager.CsjGroMoreManager import com.mints.street.manager.CsjGroMoreManager
...@@ -46,6 +47,13 @@ class AppApplication : BaseApp() { ...@@ -46,6 +47,13 @@ class AppApplication : BaseApp() {
// GroMore // GroMore
CsjGroMoreManager.init(this) CsjGroMoreManager.init(this)
//百度地图
// 在使用 SDK 各组间之前初始化 context 信息,传入 ApplicationContext
// 默认本地个性化地图初始化方法
SDKInitializer.initialize(this)
//自4.3.0起,百度地图SDK所有接口均支持百度坐标和国测局坐标,用此方法设置您使用的坐标类型.
//包括BD09LL和GCJ02两种坐标,默认是BD09LL坐标。
SDKInitializer.setCoordType(CoordType.BD09LL)
} }
companion object { companion object {
......
package com.mints.street.login package com.mints.street.login
import android.os.Bundle import android.os.Bundle
import android.view.View
import com.fry.base.base.BaseActivity import com.fry.base.base.BaseActivity
import com.mints.street.BR import com.mints.street.BR
import com.mints.street.R import com.mints.street.R
import com.mints.street.databinding.ActivityLoginBinding import com.mints.street.databinding.ActivityLoginBinding
import kotlinx.android.synthetic.main.include_header.*
/** /**
* Created by 冯瑞雨 on 2021/7/2. * Created by 冯瑞雨 on 2021/7/2.
*/ */
class LoginActivity:BaseActivity<ActivityLoginBinding,LoginViewModel>() { class LoginActivity : BaseActivity<ActivityLoginBinding, LoginViewModel>(), View.OnClickListener {
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
...@@ -17,9 +19,23 @@ class LoginActivity:BaseActivity<ActivityLoginBinding,LoginViewModel>() { ...@@ -17,9 +19,23 @@ class LoginActivity:BaseActivity<ActivityLoginBinding,LoginViewModel>() {
override fun initData() { override fun initData() {
super.initData() super.initData()
initView()
}
private fun initView() {
binding.button.setOnClickListener { binding.button.setOnClickListener {
viewModel.login() viewModel.login()
} }
iv_left_icon.setImageResource(R.mipmap.iv_return_white)
// iv_left_icon.visibility = View.VISIBLE
iv_left_icon.setOnClickListener(this)
}
override fun onClick(v: View?) {
when (v?.id) {
R.id.iv_left_icon -> {
finish()
}
}
} }
} }
\ No newline at end of file
package com.mints.street.main package com.mints.street.main
import android.media.AudioManager import android.Manifest
import android.os.Bundle import android.os.Bundle
import android.view.KeyEvent import android.view.KeyEvent
import android.view.View import android.view.View
...@@ -15,10 +15,12 @@ import com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx ...@@ -15,10 +15,12 @@ import com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx
import com.mints.street.BR import com.mints.street.BR
import com.mints.street.R import com.mints.street.R
import com.mints.street.databinding.ActivityMainBinding import com.mints.street.databinding.ActivityMainBinding
import com.mints.street.main.vr.VRFragment
import com.mints.street.main.my.MyFragment
import com.mints.street.main.home.HomeFragment import com.mints.street.main.home.HomeFragment
import com.mints.street.main.my.MyFragment
import com.mints.street.main.vr.VRFragment
import com.mints.street.manager.UmengManager import com.mints.street.manager.UmengManager
import com.tbruyelle.rxpermissions2.RxPermissions
import kotlinx.android.synthetic.main.layout_popupwindow.*
import me.goldze.mvvmhabit.base.AppManager import me.goldze.mvvmhabit.base.AppManager
import me.goldze.mvvmhabit.utils.ToastUtils import me.goldze.mvvmhabit.utils.ToastUtils
...@@ -58,6 +60,13 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() { ...@@ -58,6 +60,13 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() {
// test // test
UmengManager.initUm() UmengManager.initUm()
val rxPermissions = RxPermissions(this )
rxPermissions.request(Manifest.permission.ACCESS_COARSE_LOCATION)
.subscribe {
}
} }
var oldTime: Long = 0 var oldTime: Long = 0
......
package com.mints.street.main.home package com.mints.street.main.home
import android.graphics.Color
import android.os.Bundle import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.TextView
import com.baidu.mapapi.map.*
import com.baidu.mapapi.model.LatLng
import com.baidu.mapapi.search.core.RecommendStopInfo
import com.baidu.mapapi.search.recommendstop.OnGetRecommendStopResultListener
import com.baidu.mapapi.search.recommendstop.RecommendStopResult
import com.baidu.mapapi.search.recommendstop.RecommendStopSearch
import com.baidu.mapapi.search.recommendstop.RecommendStopSearchOption
import com.fry.base.base.BaseFragment import com.fry.base.base.BaseFragment
import com.mints.street.BR import com.mints.street.BR
import com.mints.street.R import com.mints.street.R
import com.mints.street.databinding.FragmentHomeBinding import com.mints.street.databinding.FragmentHomeBinding
import me.goldze.mvvmhabit.utils.KLog
import me.goldze.mvvmhabit.utils.RxUtils
/** /**
* Created by 冯瑞雨 on 2021/7/2. * Created by 冯瑞雨 on 2021/7/2.
* 首页页面 * 首页页面
*/ */
class HomeFragment:BaseFragment<FragmentHomeBinding,HomeViewModel>() { class HomeFragment:BaseFragment<FragmentHomeBinding,HomeViewModel>(){
private var mBaiduMap: BaiduMap? = null
private val mBitmapDescriptor = BitmapDescriptorFactory.fromResource(R.mipmap.icon_gcoding)
private var mRecommendStopSearch: RecommendStopSearch? = null
override fun initContentView(inflater: LayoutInflater?, override fun initContentView(inflater: LayoutInflater?,
container: ViewGroup?, container: ViewGroup?,
savedInstanceState: Bundle?)= R.layout.fragment_home savedInstanceState: Bundle?)= R.layout.fragment_home
...@@ -21,6 +41,112 @@ class HomeFragment:BaseFragment<FragmentHomeBinding,HomeViewModel>() { ...@@ -21,6 +41,112 @@ class HomeFragment:BaseFragment<FragmentHomeBinding,HomeViewModel>() {
override fun initData() { override fun initData() {
super.initData() super.initData()
initMap()
viewModel.add() viewModel.add()
} }
private fun initMap(){
mBaiduMap = binding.bmapView.map
mBaiduMap?.mapType = BaiduMap.MAP_TYPE_SATELLITE
binding.bmapView.showZoomControls(false)//设置是否显示缩放控件
// 构建地图状态
val builder = MapStatus.Builder()
// 默认 天安门
val center = LatLng(39.915071, 116.403907)
// 默认 11级
val zoom = 11.0f
builder.target(center).zoom(zoom)
val mapStatusUpdate = MapStatusUpdateFactory.newMapStatus(builder.build())
// 设置地图状态
mBaiduMap?.setMapStatus(mapStatusUpdate)
mBaiduMap?.setOnMapStatusChangeListener(object :BaiduMap.OnMapStatusChangeListener{
override fun onMapStatusChangeStart(status: MapStatus?) {
KLog.a("百度map","移动开始")
}
override fun onMapStatusChangeStart(status: MapStatus?, reason: Int) {
KLog.a("百度map","移动开始,两个参数")
}
override fun onMapStatusChange(status: MapStatus?) {
KLog.a("百度map","移动改变")
}
override fun onMapStatusChangeFinish(status: MapStatus?) {
KLog.a("百度map","移动结束")
val center = status?.target
mRecommendStopSearch?.requestRecommendStop(RecommendStopSearchOption().location(center))
}
})
mBaiduMap?.setOnMapLoadedCallback {
mRecommendStopSearch?.requestRecommendStop(RecommendStopSearchOption().location(center))
}
//使地图缩放级别增大一级
binding.imageIn.setOnClickListener {
mBaiduMap?.setMapStatus(MapStatusUpdateFactory.zoomIn())
}
//使地图缩放级别减小一级
binding.imageOut.setOnClickListener {
mBaiduMap?.setMapStatus(MapStatusUpdateFactory.zoomOut())
}
mRecommendStopSearch = RecommendStopSearch.newInstance()
mRecommendStopSearch?.setOnGetRecommendStopResultListener(object :OnGetRecommendStopResultListener{
override fun onGetRecommendStopResult(result: RecommendStopResult?) {
if (result != null) {
addMarkerToMap(result.recommendStopInfoList)
}
}
})
}
override fun onPause() {
super.onPause()
binding.bmapView.onPause()
}
override fun onResume() {
super.onResume()
binding.bmapView.onResume()
}
override fun onDestroy() {
super.onDestroy()
mRecommendStopSearch?.destroy()
binding.bmapView.onDestroy()
}
/**
* 推荐上车点添加到地图上
* @param stops 推荐上车点列表
*/
private fun addMarkerToMap(stops: List<RecommendStopInfo?>?) {
stops?.apply {
mBaiduMap?.clear()
for (stop in this) {
stop?.apply {
val textView = TextView(context)
textView.text = stop.name
textView.setBackgroundColor(Color.WHITE)
val infoWindow = InfoWindow(
textView,
stop.location, -47
)
val markerOptions = MarkerOptions()
markerOptions.icon(mBitmapDescriptor).position(stop.location).scaleX(0.5f).scaleY(0.5f)
.infoWindow(infoWindow)
mBaiduMap!!.addOverlay(markerOptions)
}
}
}
}
} }
\ No newline at end of file
...@@ -8,7 +8,7 @@ import com.fry.base.base.BaseActivity ...@@ -8,7 +8,7 @@ import com.fry.base.base.BaseActivity
import com.mints.street.BR import com.mints.street.BR
import com.mints.street.R import com.mints.street.R
import kotlinx.android.synthetic.main.activity_aboutus.* import kotlinx.android.synthetic.main.activity_aboutus.*
import kotlinx.android.synthetic.main.header_layout.* import kotlinx.android.synthetic.main.include_header.*
class AboutusActivity :BaseActivity<ActivityAboutusBinding, AboutusViewModel>(), View.OnClickListener { class AboutusActivity :BaseActivity<ActivityAboutusBinding, AboutusViewModel>(), View.OnClickListener {
...@@ -23,6 +23,7 @@ class AboutusActivity :BaseActivity<ActivityAboutusBinding, AboutusViewModel>(), ...@@ -23,6 +23,7 @@ class AboutusActivity :BaseActivity<ActivityAboutusBinding, AboutusViewModel>(),
tv_title.text="关于我们" tv_title.text="关于我们"
tv_title.setTextColor(Color.BLACK) tv_title.setTextColor(Color.BLACK)
iv_left_icon.setImageResource(R.mipmap.iv_return) iv_left_icon.setImageResource(R.mipmap.iv_return)
iv_left_icon.visibility=View.VISIBLE
tv_user.setOnClickListener(this) tv_user.setOnClickListener(this)
tv_privacy.setOnClickListener(this) tv_privacy.setOnClickListener(this)
} }
......
...@@ -2,11 +2,12 @@ package com.mints.street.main.my ...@@ -2,11 +2,12 @@ package com.mints.street.main.my
import android.graphics.Color import android.graphics.Color
import android.os.Bundle import android.os.Bundle
import android.view.View
import com.fry.base.base.BaseActivity import com.fry.base.base.BaseActivity
import com.mints.street.BR import com.mints.street.BR
import com.mints.street.R import com.mints.street.R
import com.mints.street.databinding.ActivityMoresettingsBinding import com.mints.street.databinding.ActivityMoresettingsBinding
import kotlinx.android.synthetic.main.header_layout.* import kotlinx.android.synthetic.main.include_header.*
class MoresettingsActivity: BaseActivity<ActivityMoresettingsBinding, MoresettingsViewModel>() { class MoresettingsActivity: BaseActivity<ActivityMoresettingsBinding, MoresettingsViewModel>() {
...@@ -21,6 +22,7 @@ class MoresettingsActivity: BaseActivity<ActivityMoresettingsBinding, Moresettin ...@@ -21,6 +22,7 @@ class MoresettingsActivity: BaseActivity<ActivityMoresettingsBinding, Moresettin
tv_title.text="更多设置" tv_title.text="更多设置"
tv_title.setTextColor(Color.BLACK) tv_title.setTextColor(Color.BLACK)
iv_left_icon.setImageResource(R.mipmap.iv_return) iv_left_icon.setImageResource(R.mipmap.iv_return)
iv_left_icon.visibility= View.VISIBLE
} }
......
package com.mints.street.main.my package com.mints.street.main.my
import android.graphics.Color import android.graphics.Color
import android.graphics.drawable.BitmapDrawable
import android.os.Bundle import android.os.Bundle
import android.util.Log import android.util.Log
import android.view.Gravity
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.PopupWindow import android.widget.CheckBox
import android.widget.ImageView
import android.widget.Toast import android.widget.Toast
import androidx.activity.OnBackPressedCallback import androidx.appcompat.widget.LinearLayoutCompat
import com.fry.base.base.BaseFragment import com.fry.base.base.BaseFragment
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.mints.street.BR import com.mints.street.BR
import com.mints.street.R import com.mints.street.R
import com.mints.street.databinding.FragmentMyBinding import com.mints.street.databinding.FragmentMyBinding
import com.mints.street.login.LoginActivity
import kotlinx.android.synthetic.main.fragment_my.* import kotlinx.android.synthetic.main.fragment_my.*
import kotlinx.android.synthetic.main.header_layout.*
/** /**
...@@ -24,8 +24,14 @@ import kotlinx.android.synthetic.main.header_layout.* ...@@ -24,8 +24,14 @@ import kotlinx.android.synthetic.main.header_layout.*
* 个人中心页面 * 个人中心页面
*/ */
class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), View.OnClickListener { class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), View.OnClickListener {
private var popupWindow: PopupWindow? = null //弹窗
private var contentView: View? = null private var mBottomSheetDialog: BottomSheetDialog? = null
private var iv_weixin: ImageView? = null
private var ly_phone: LinearLayoutCompat? = null
private var cb_checked: CheckBox? = null
//checkbox是否选中
private var ischecked = false
override fun initContentView(inflater: LayoutInflater?, override fun initContentView(inflater: LayoutInflater?,
container: ViewGroup?, container: ViewGroup?,
savedInstanceState: Bundle?) = R.layout.fragment_my savedInstanceState: Bundle?) = R.layout.fragment_my
...@@ -33,26 +39,34 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), View.OnClickL ...@@ -33,26 +39,34 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), View.OnClickL
override fun initVariableId() = BR.viewModel override fun initVariableId() = BR.viewModel
override fun initData() { override fun initData() {
super.initData() super.initData()
initView()
}
private fun initView() {
//设置登录点击事件
binding.llMyLogin.setOnClickListener { binding.llMyLogin.setOnClickListener {
// showPopwindow(); //创建弹窗
startActivity(PermissionsActivity::class.java) mBottomSheetDialog = BottomSheetDialog(context!!)
val view1: View = layoutInflater.inflate(R.layout.layout_popupwindow, null)
mBottomSheetDialog!!.setContentView(view1)
mBottomSheetDialog!!.window!!.findViewById<View>(R.id.design_bottom_sheet).setBackgroundColor(Color.TRANSPARENT)
mBottomSheetDialog!!.show()
iv_weixin = view1.findViewById(R.id.iv_weixin)
ly_phone = view1.findViewById(R.id.ly_phone)
cb_checked = view1.findViewById(R.id.cb_checked)
iv_weixin?.setOnClickListener(this)
ly_phone?.setOnClickListener(this)
} }
//设置立即领取点击事件
binding.btTry.setOnClickListener { binding.btTry.setOnClickListener {
Toast.makeText(context,"点击事件响应了",Toast.LENGTH_SHORT).show() startActivity(PermissionsActivity::class.java)
} }
ly_aboutus.setOnClickListener(this) ly_aboutus.setOnClickListener(this)
ly_moresettings.setOnClickListener(this) ly_moresettings.setOnClickListener(this)
requireActivity().onBackPressedDispatcher.addCallback(
this,
object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
//监听到后要执行的逻辑
if (popupWindow != null && popupWindow!!.isShowing()) {
popupWindow?.dismiss();
}
}
})
} }
...@@ -64,37 +78,26 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), View.OnClickL ...@@ -64,37 +78,26 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), View.OnClickL
R.id.ly_moresettings -> { R.id.ly_moresettings -> {
startActivity(MoresettingsActivity::class.java) startActivity(MoresettingsActivity::class.java)
} }
R.id.ll_my_login -> {
Log.e("aaa", "aaaaaa")
}
R.id.iv_weixin -> {
if (cb_checked!!.isChecked) {
Toast.makeText(context, "未完成微信登录对接", Toast.LENGTH_SHORT).show()
}else {
Toast.makeText(context, "请先同意用户协议与隐私政策", Toast.LENGTH_SHORT).show()
}
}
R.id.ly_phone -> {
if (cb_checked!!.isChecked) {
startActivity(LoginActivity::class.java)
mBottomSheetDialog!!.dismiss()
} else {
Toast.makeText(context, "请先同意用户协议与隐私政策", Toast.LENGTH_SHORT).show()
} }
} }
private fun showPopwindow() {
//加载弹出框的布局
contentView = LayoutInflater.from(context).inflate(
R.layout.layout_popupwindow, null);
// 设置按钮的点击事件
popupWindow = PopupWindow(contentView,
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT)
popupWindow!!.isFocusable = true // 取得焦点
//注意 要是点击外部空白处弹框消息 那么必须给弹框设置一个背景色 不然是不起作用的
//注意 要是点击外部空白处弹框消息 那么必须给弹框设置一个背景色 不然是不起作用的
popupWindow!!.setBackgroundDrawable(BitmapDrawable())
//点击外部消失
//点击外部消失
popupWindow!!.isOutsideTouchable = true
//设置可以点击
//设置可以点击
popupWindow!!.isTouchable = true
//进入退出的动画,指定刚才定义的style
//进入退出的动画,指定刚才定义的style
popupWindow!!.animationStyle = R.style.ipopwindow_anim_style
} }
fun openPopWindow(v: View?) {
//从底部显示
popupWindow!!.showAtLocation(contentView, Gravity.BOTTOM, 0, 0)
} }
} }
......
...@@ -2,10 +2,12 @@ package com.mints.street.main.my ...@@ -2,10 +2,12 @@ package com.mints.street.main.my
import android.os.Bundle import android.os.Bundle
import com.fry.base.base.BaseActivity import com.fry.base.base.BaseActivity
import com.github.iielse.switchbutton.SwitchView
import com.mints.street.BR import com.mints.street.BR
import com.mints.street.R import com.mints.street.R
import com.mints.street.databinding.ActivityMoresettingsBinding import com.mints.street.databinding.ActivityMoresettingsBinding
import com.mints.street.databinding.ActivityPermissionsBinding import com.mints.street.databinding.ActivityPermissionsBinding
import kotlinx.android.synthetic.main.activity_permissions.*
class PermissionsActivity : BaseActivity<ActivityPermissionsBinding, PermissionsViewModel>() { class PermissionsActivity : BaseActivity<ActivityPermissionsBinding, PermissionsViewModel>() {
override fun initVariableId() = BR.viewModel override fun initVariableId() = BR.viewModel
...@@ -16,6 +18,14 @@ class PermissionsActivity : BaseActivity<ActivityPermissionsBinding, Permission ...@@ -16,6 +18,14 @@ class PermissionsActivity : BaseActivity<ActivityPermissionsBinding, Permission
} }
private fun initView() { private fun initView() {
sv_positioning.setOnStateChangedListener(object : SwitchView.OnStateChangedListener {
override fun toggleToOn(view: SwitchView?) {
sv_positioning?.isOpened = true
}
override fun toggleToOff(view: SwitchView?) {
sv_positioning?.isOpened = false
}
})
} }
} }
\ 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="25dp"
android:topRightRadius="25dp" />
<solid android:color="#E6FFFFFF" />
</shape>
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<!-- 边框的颜色和粗细 --> <!-- 边框的颜色和粗细 -->
<stroke <stroke
android:width="1dp" android:width="1dp"
android:color="@color/blue" android:color="#4CAF50"
/> />
<solid android:color="#ffffffff" /> <solid android:color="#ffffffff" />
<corners android:radius="10dp" /> <corners android:radius="10dp" />
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#4DFFFFFF" />
<corners android:radius="30dip" />
</shape>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"> android:shape="rectangle">
<!-- 填充的颜色 --> <!-- 填充的颜色 -->
<solid android:color="@color/color_FF9837" /> <solid android:color="@color/color_A7BCFE" />
<!-- 设置按钮的四个角为弧形 --> <!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 --> <!-- android:radius 弧形的半径 -->
<corners android:radius="30dip" /> <corners android:radius="30dip" />
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
android:layout_height="match_parent"> android:layout_height="match_parent">
<include <include
android:id="@+id/header" android:id="@+id/header"
layout="@layout/header_layout" /> layout="@layout/include_header" />
<TextView <TextView
android:layout_below="@+id/header" android:layout_below="@+id/header"
android:paddingTop="30dp" android:paddingTop="30dp"
......
<?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>
<variable <variable
name="viewModel" name="viewModel"
type="com.mints.street.login.LoginViewModel" /> type="com.mints.street.login.LoginViewModel" />
</data> </data>
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="#CC000000"
android:orientation="vertical"> android:orientation="vertical">
<include layout="@layout/include_header" /> <include layout="@layout/include_header"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="60dp"
android:text="在国内也能用的"
android:textSize="24dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="全球街景地图"
android:textSize="32dp" />
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -18,18 +37,21 @@ ...@@ -18,18 +37,21 @@
android:layout_marginLeft="30dp" android:layout_marginLeft="30dp"
android:layout_marginTop="30dp" android:layout_marginTop="30dp"
android:layout_marginRight="30dp" android:layout_marginRight="30dp"
android:background="@drawable/shape_login_bg"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/str_phone_num_1" /> android:layout_gravity="center"
android:layout_marginStart="10dp"
android:src="@mipmap/iv_phone" />
<com.mints.street.widget.ClearEditText <com.mints.street.widget.ClearEditText
android:id="@+id/et_phone" android:id="@+id/et_phone"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_marginStart="20dp" android:layout_marginStart="10dp"
android:background="@null" android:background="@null"
android:gravity="center_vertical" android:gravity="center_vertical"
android:hint="@string/str_input_phone" android:hint="@string/str_input_phone"
...@@ -41,10 +63,6 @@ ...@@ -41,10 +63,6 @@
android:textSize="14sp" /> android:textSize="14sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
<View
style="@style/line_3"
android:layout_marginStart="30dp"
android:layout_marginEnd="30dp" />
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -52,11 +70,13 @@ ...@@ -52,11 +70,13 @@
android:layout_marginStart="30dp" android:layout_marginStart="30dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_marginEnd="30dp" android:layout_marginEnd="30dp"
android:background="@drawable/shape_login_bg"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="@string/str_sms_code_1" /> android:text="@string/str_sms_code_1" />
<RelativeLayout <RelativeLayout
...@@ -86,22 +106,18 @@ ...@@ -86,22 +106,18 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:gravity="center" android:gravity="center"
android:text="@string/str_send_sms" android:text="@string/str_send_sms"
android:textColor="@color/color_FF9837" android:textColor="@color/white"
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
<View
style="@style/line_3"
android:layout_marginStart="30dp"
android:layout_marginEnd="30dp" />
<Button <Button
android:id="@+id/button" android:id="@+id/button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="46dp" android:layout_height="wrap_content"
android:layout_marginStart="40dp" android:layout_marginStart="40dp"
android:layout_marginTop="30dp" android:layout_marginTop="30dp"
android:layout_marginEnd="40dp" android:layout_marginEnd="40dp"
...@@ -110,7 +126,12 @@ ...@@ -110,7 +126,12 @@
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="16sp" /> android:textSize="16sp" />
<View
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"/>
<TextView <TextView
android:paddingBottom="10dp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="30dp" android:layout_marginLeft="30dp"
......
...@@ -11,14 +11,10 @@ ...@@ -11,14 +11,10 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="19dp"
android:layout_marginEnd="15dp"
android:background="@drawable/shape_gold_card" android:background="@drawable/shape_gold_card"
android:elevation="5dp" android:elevation="5dp"
android:orientation="vertical"> android:orientation="vertical">
<include layout="@layout/include_header" />
<include layout="@layout/header_layout" />
<LinearLayout <LinearLayout
android:id="@+id/ly_aboutus" android:id="@+id/ly_aboutus"
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="716dp"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
android:layout_marginTop="25dp" android:layout_marginTop="25dp"
android:text="世界街景3D地图" android:text="世界街景3D地图"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="25dp"/> android:textSize="25dp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
android:textColor="#CD000000" /> android:textColor="#CD000000" />
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="110dp" android:layout_height="110dp"
android:layout_margin="10dp" android:layout_margin="10dp"
...@@ -43,28 +42,32 @@ ...@@ -43,28 +42,32 @@
android:layout_height="80dp" android:layout_height="80dp"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:background="@color/black" /> android:src="@mipmap/ic_my"/>
<TextView <TextView
android:id="@+id/tv1" android:id="@+id/tv1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignTop="@+id/iv1" android:layout_alignTop="@+id/iv1"
android:layout_marginStart="20dp"
android:layout_toRightOf="@id/iv1" android:layout_toRightOf="@id/iv1"
android:text="提供精准定位及导航服务" android:text="提供精准定位及导航服务"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="18sp"/> android:textSize="12sp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignBottom="@+id/iv1" android:layout_alignBottom="@+id/iv1"
android:layout_marginStart="20dp"
android:layout_toRightOf="@+id/iv1" android:layout_toRightOf="@+id/iv1"
android:text="基于您当前位置...." /> android:text="基于您当前位置...."
android:textColor="#A9000000" />
<com.github.iielse.switchbutton.SwitchView <com.github.iielse.switchbutton.SwitchView
android:id="@+id/sv_positioning"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="20dp"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
...@@ -83,28 +86,31 @@ ...@@ -83,28 +86,31 @@
android:layout_height="80dp" android:layout_height="80dp"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:background="@color/black" /> android:src="@mipmap/ic_my"/>
<TextView <TextView
android:id="@+id/tv2" android:id="@+id/tv2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignTop="@+id/iv2" android:layout_alignTop="@+id/iv2"
android:layout_marginStart="20dp"
android:layout_toRightOf="@id/iv2" android:layout_toRightOf="@id/iv2"
android:text="提供精准定位及导航服务" android:text="提供精准定位及导航服务"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="18sp"/> android:textSize="12sp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignBottom="@+id/iv2" android:layout_alignBottom="@+id/iv2"
android:layout_marginStart="20dp"
android:layout_toRightOf="@+id/iv2" android:layout_toRightOf="@+id/iv2"
android:text="基于您当前位置...." /> android:text="基于您当前位置...."
android:textColor="#A9000000" />
<com.github.iielse.switchbutton.SwitchView <com.github.iielse.switchbutton.SwitchView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="20dp"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
...@@ -123,28 +129,31 @@ ...@@ -123,28 +129,31 @@
android:layout_height="80dp" android:layout_height="80dp"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:background="@color/black" /> android:src="@mipmap/ic_my"/>
<TextView <TextView
android:id="@+id/tv3" android:id="@+id/tv3"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignTop="@+id/iv3" android:layout_alignTop="@+id/iv3"
android:layout_marginStart="20dp"
android:layout_toRightOf="@id/iv3" android:layout_toRightOf="@id/iv3"
android:text="提供精准定位及导航服务" android:text="提供精准定位及导航服务"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="18sp"/> android:textSize="12sp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignBottom="@+id/iv3" android:layout_alignBottom="@+id/iv3"
android:layout_marginStart="20dp"
android:layout_toRightOf="@+id/iv3" android:layout_toRightOf="@+id/iv3"
android:text="基于您当前位置...." /> android:text="基于您当前位置...."
android:textColor="#A9000000" />
<com.github.iielse.switchbutton.SwitchView <com.github.iielse.switchbutton.SwitchView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="20dp"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
...@@ -178,35 +187,38 @@ ...@@ -178,35 +187,38 @@
android:text="同意并开始授权" android:text="同意并开始授权"
android:textColor="@color/white" /> android:textColor="@color/white" />
</LinearLayout> </LinearLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1" android:layout_weight="1" />
/>
<LinearLayout <LinearLayout
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:text="链接网络后可查看并同意完整的" android:text="链接网络后可查看并同意完整的"
android:textColor="@color/black" /> android:textColor="@color/black"
android:textSize="8sp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="《隐私协议》" android:text="《隐私协议》"
android:textColor="@color/black" /> android:textColor="@color/black"
android:textSize="8sp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="《用户协议》" android:text="《用户协议》"
android:textColor="@color/black" /> android:textColor="@color/black"
android:textSize="8sp" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
......
...@@ -11,6 +11,23 @@ ...@@ -11,6 +11,23 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
> >
<com.baidu.mapapi.map.MapView
android:id="@+id/bmapView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_width="0dp"
android:layout_height="0dp" />
<ImageView
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerInParent="true"
android:src="@mipmap/water_drop"/>
<ImageView <ImageView
android:layout_marginTop="15dp" android:layout_marginTop="15dp"
...@@ -20,6 +37,7 @@ ...@@ -20,6 +37,7 @@
android:layout_width="35dp" android:layout_width="35dp"
android:layout_height="35dp" android:layout_height="35dp"
android:src="@mipmap/map_change_icon" android:src="@mipmap/map_change_icon"
android:visibility="gone"
/> />
<ImageView <ImageView
android:layout_marginTop="15dp" android:layout_marginTop="15dp"
...@@ -50,8 +68,10 @@ ...@@ -50,8 +68,10 @@
android:background="@drawable/shape_gold_card" android:background="@drawable/shape_gold_card"
android:layout_marginEnd="2dp" android:layout_marginEnd="2dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
> >
<ImageView <ImageView
android:id="@+id/image_in"
android:padding="10dp" android:padding="10dp"
android:layout_width="31dp" android:layout_width="31dp"
android:layout_height="31dp" android:layout_height="31dp"
...@@ -65,6 +85,7 @@ ...@@ -65,6 +85,7 @@
android:background="@color/color_333" android:background="@color/color_333"
/> />
<ImageView <ImageView
android:id="@+id/image_out"
android:padding="10dp" android:padding="10dp"
android:layout_width="31dp" android:layout_width="31dp"
android:layout_height="31dp" android:layout_height="31dp"
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"> xmlns:tools="http://schemas.android.com/tools">
<data> <data>
<variable <variable
name="viewModel" name="viewModel"
type="com.mints.street.main.my.MyViewModel" /> type="com.mints.street.main.my.MyViewModel" />
...@@ -21,28 +22,28 @@ ...@@ -21,28 +22,28 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:layout_marginTop="15dp" android:layout_marginTop="15dp"
android:orientation="horizontal" android:layout_marginBottom="15dp"
android:layout_marginBottom="15dp"> android:orientation="horizontal">
<com.mints.street.widget.CircleImageView <com.mints.street.widget.CircleImageView
android:id="@+id/item_title_avatar" android:id="@+id/item_title_avatar"
android:layout_width="60dp" android:layout_width="60dp"
android:layout_height="60dp" android:layout_height="60dp"
android:src="@mipmap/ic_avatar_ph"/> android:src="@mipmap/ic_avatar_ph" />
<TextView <TextView
android:id="@+id/item_title_id" android:id="@+id/item_title_id"
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_marginStart="20dp" android:layout_marginStart="20dp"
android:ellipsize="end" android:ellipsize="end"
android:maxLength="10" android:maxLength="10"
android:layout_gravity="center"
android:maxLines="1" android:maxLines="1"
android:text="未登录" android:text="未登录"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="20sp" android:textSize="20sp"
android:textStyle="bold"/> android:textStyle="bold" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
...@@ -55,12 +56,11 @@ ...@@ -55,12 +56,11 @@
android:orientation="vertical"> android:orientation="vertical">
<RelativeLayout <RelativeLayout
android:background="@drawable/shape_gold"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="50dp"
android:background="@drawable/shape_gold"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingStart="10pt" android:paddingStart="10pt">
android:paddingEnd="10dp">
<ImageView <ImageView
android:id="@+id/iv_flag" android:id="@+id/iv_flag"
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
android:layout_height="30dp" android:layout_height="30dp"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:background="@color/blue" /> android:src="@mipmap/iv_crown"/>
<TextView <TextView
android:id="@+id/tv_tips" android:id="@+id/tv_tips"
...@@ -82,13 +82,13 @@ ...@@ -82,13 +82,13 @@
<Button <Button
android:id="@+id/bt_try" android:id="@+id/bt_try"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="30dp"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_gravity="center_vertical" android:layout_centerVertical="true"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:background="@drawable/btn_friends_selectored" android:background="@drawable/shape_btn_friends_unenabled"
android:text="立即领取" android:text="立即领取"
android:textColor="@color/black" android:textColor="@color/white"
android:textSize="10sp" /> android:textSize="10sp" />
</RelativeLayout> </RelativeLayout>
...@@ -100,10 +100,9 @@ ...@@ -100,10 +100,9 @@
<ImageView <ImageView
android:id="@+id/imageView5" android:id="@+id/imageView5"
android:layout_width="20dp" android:layout_width="50dp"
android:layout_height="20dp" android:layout_height="50dp"
android:layout_marginStart="28dp" android:src="@mipmap/ic_avatar_ph"
android:background="@color/blue"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/imageView4" app:layout_constraintTop_toTopOf="@+id/imageView4"
tools:srcCompat="@tools:sample/avatars" /> tools:srcCompat="@tools:sample/avatars" />
...@@ -120,11 +119,11 @@ ...@@ -120,11 +119,11 @@
<ImageView <ImageView
android:id="@+id/imageView4" android:id="@+id/imageView4"
android:layout_width="20dp" android:layout_width="50dp"
android:layout_height="20dp" android:layout_height="50dp"
android:layout_marginStart="40dp" android:layout_marginStart="40dp"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:background="@color/blue" android:src="@mipmap/ic_avatar_ph"
app:layout_constraintStart_toEndOf="@+id/imageView5" app:layout_constraintStart_toEndOf="@+id/imageView5"
app:layout_constraintTop_toBottomOf="@+id/imageView16" app:layout_constraintTop_toBottomOf="@+id/imageView16"
tools:srcCompat="@tools:sample/avatars" /> tools:srcCompat="@tools:sample/avatars" />
...@@ -141,10 +140,10 @@ ...@@ -141,10 +140,10 @@
<ImageView <ImageView
android:id="@+id/imageView6" android:id="@+id/imageView6"
android:layout_width="20dp" android:layout_width="50dp"
android:layout_height="20dp" android:layout_height="50dp"
android:layout_marginStart="40dp" android:layout_marginStart="40dp"
android:background="@color/blue" android:src="@mipmap/ic_avatar_ph"
app:layout_constraintStart_toEndOf="@+id/imageView4" app:layout_constraintStart_toEndOf="@+id/imageView4"
app:layout_constraintTop_toTopOf="@+id/imageView4" app:layout_constraintTop_toTopOf="@+id/imageView4"
tools:srcCompat="@tools:sample/avatars" /> tools:srcCompat="@tools:sample/avatars" />
...@@ -161,10 +160,10 @@ ...@@ -161,10 +160,10 @@
<ImageView <ImageView
android:id="@+id/imageView7" android:id="@+id/imageView7"
android:layout_width="20dp" android:layout_width="50dp"
android:layout_height="20dp" android:layout_height="50dp"
android:layout_marginStart="40dp" android:layout_marginStart="40dp"
android:background="@color/blue" android:src="@mipmap/ic_avatar_ph"
app:layout_constraintStart_toEndOf="@+id/imageView6" app:layout_constraintStart_toEndOf="@+id/imageView6"
app:layout_constraintTop_toTopOf="@+id/imageView6" app:layout_constraintTop_toTopOf="@+id/imageView6"
tools:srcCompat="@tools:sample/avatars" /> tools:srcCompat="@tools:sample/avatars" />
...@@ -181,11 +180,10 @@ ...@@ -181,11 +180,10 @@
<ImageView <ImageView
android:id="@+id/imageView12" android:id="@+id/imageView12"
android:layout_width="50dp"
android:layout_width="20dp" android:layout_height="50dp"
android:layout_height="20dp"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:background="@color/blue" android:src="@mipmap/ic_avatar_ph"
app:layout_constraintEnd_toEndOf="@+id/imageView5" app:layout_constraintEnd_toEndOf="@+id/imageView5"
app:layout_constraintHorizontal_bias="1.0" app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/imageView5" app:layout_constraintStart_toStartOf="@+id/imageView5"
...@@ -206,10 +204,10 @@ ...@@ -206,10 +204,10 @@
<ImageView <ImageView
android:id="@+id/imageView13" android:id="@+id/imageView13"
android:layout_width="20dp" android:layout_width="50dp"
android:layout_height="20dp" android:layout_height="50dp"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:background="@color/blue" android:src="@mipmap/ic_avatar_ph"
app:layout_constraintEnd_toEndOf="@+id/imageView4" app:layout_constraintEnd_toEndOf="@+id/imageView4"
app:layout_constraintHorizontal_bias="0.0" app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/imageView4" app:layout_constraintStart_toStartOf="@+id/imageView4"
...@@ -219,10 +217,10 @@ ...@@ -219,10 +217,10 @@
<ImageView <ImageView
android:id="@+id/imageView14" android:id="@+id/imageView14"
android:layout_width="20dp" android:layout_width="50dp"
android:layout_height="20dp" android:layout_height="50dp"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:background="@color/blue" android:src="@mipmap/ic_avatar_ph"
app:layout_constraintEnd_toEndOf="@+id/imageView6" app:layout_constraintEnd_toEndOf="@+id/imageView6"
app:layout_constraintHorizontal_bias="0.0" app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/imageView6" app:layout_constraintStart_toStartOf="@+id/imageView6"
...@@ -253,11 +251,10 @@ ...@@ -253,11 +251,10 @@
<ImageView <ImageView
android:id="@+id/imageView15" android:id="@+id/imageView15"
android:layout_width="50dp"
android:layout_width="20dp" android:layout_height="50dp"
android:layout_height="20dp"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:background="@color/blue" android:src="@mipmap/ic_avatar_ph"
app:layout_constraintEnd_toEndOf="@+id/imageView7" app:layout_constraintEnd_toEndOf="@+id/imageView7"
app:layout_constraintHorizontal_bias="0.0" app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/imageView7" app:layout_constraintStart_toStartOf="@+id/imageView7"
...@@ -303,7 +300,8 @@ ...@@ -303,7 +300,8 @@
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:text="享受8大特权" android:text="享受8大特权"
android:textSize="10sp" android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/imageView18" app:layout_constraintBottom_toBottomOf="@+id/imageView18"
app:layout_constraintEnd_toStartOf="@+id/imageView18" app:layout_constraintEnd_toStartOf="@+id/imageView18"
app:layout_constraintStart_toEndOf="@+id/imageView16" app:layout_constraintStart_toEndOf="@+id/imageView16"
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="70dp"
android:paddingTop="20dp">
<ImageView
android:id="@+id/iv_left_icon"
android:layout_width="50dp"
android:layout_height="50dp"
android:padding="10dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_left_subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:lines="1"
android:maxLength="12"
android:padding="8dp"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:maxLength="12"
android:textColor="@color/color_121B32"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_right_icon2"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginEnd="10dp"
android:scaleType="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/iv_right_icon"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_right_icon"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginEnd="10dp"
android:scaleType="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_right_subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:textColor="@color/color_121B32"
android:textSize="16sp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
style="@style/view_line_E6E6E6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/iv_right_icon" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout 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"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:background="#553b3a3a"> android:background="@drawable/shape_dialog_bg">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/ly_phone"
android:layout_alignParentRight="true"
android:paddingTop="20dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="使用手机号登录"
android:textColor="#E6000000" />
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@mipmap/bg_right" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_below="@+id/ly_phone"
android:id="@+id/ly_constrain"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:padding="20dp">
<ImageView
android:id="@+id/iv_weixin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="20pt"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@mipmap/ic_my"
tools:ignore="MissingConstraints" />
<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="微信登录"
android:textColor="@color/black"
app:layout_constraintEnd_toEndOf="@+id/iv_weixin"
app:layout_constraintStart_toStartOf="@+id/iv_weixin"
app:layout_constraintTop_toBottomOf="@+id/iv_weixin" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout <LinearLayout
android:id="@+id/content" android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_below="@+id/ly_constrain"
android:background="@android:color/white" android:layout_centerHorizontal="true"
android:orientation="vertical"> android:orientation="horizontal"
android:padding="10dp">
<CheckBox
android:id="@+id/cb_checked"
style="@style/MyCheckBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView <TextView
android:id="@+id/open_from_camera" android:layout_width="wrap_content"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_height="40dp" android:text="同意"
android:gravity="center" android:textColor="@color/black" />
android:padding="8dp"
android:text="相机"
android:textColor="#333"
android:textSize="15sp" />
<TextView <TextView
android:id="@+id/open_album" android:layout_width="wrap_content"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_height="40dp" android:text="《隐私政策》"
android:layout_marginTop="1dp" android:textColor="@color/black" />
android:gravity="center"
android:padding="8dp"
android:text="打开图库"
android:textColor="#333"
android:textSize="15sp" />
<TextView <TextView
android:id="@+id/cancel" android:layout_width="wrap_content"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_height="40dp" android:text="与"
android:layout_marginTop="1dp" android:textColor="@color/black" />
android:gravity="center"
android:padding="8dp" <TextView
android:text="取消" android:layout_width="wrap_content"
android:textColor="#333" android:layout_height="wrap_content"
android:textSize="15sp" /> android:text="《用户协议》"
android:textColor="@color/black" />
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
\ No newline at end of file
...@@ -145,6 +145,9 @@ ...@@ -145,6 +145,9 @@
<item name="android:windowExitAnimation">@anim/pophidden</item> <item name="android:windowExitAnimation">@anim/pophidden</item>
<!-- 指定消失的动画xml --> <!-- 指定消失的动画xml -->
</style> </style>
<style name="MyCheckBox" parent="Theme.AppCompat.Light">
<item name="colorControlNormal">@color/black</item>
<item name="colorControlActivated">@color/black</item>
</style>
</resources> </resources>
\ No newline at end of file
...@@ -10,17 +10,17 @@ apply plugin: 'kotlin-allopen' ...@@ -10,17 +10,17 @@ apply plugin: 'kotlin-allopen'
def buildVersion def buildVersion
android { android {
File versionPropsFile = file('./version.properties') // File versionPropsFile = file('./version.properties')
//
Properties versionProps = new Properties() // Properties versionProps = new Properties()
versionProps.load(new FileInputStream(versionPropsFile)) // versionProps.load(new FileInputStream(versionPropsFile))
//
buildVersion = versionProps['VERSION_BUILD'].toLong() + 1 // buildVersion = versionProps['VERSION_BUILD'].toLong() + 1
versionProps['VERSION_BUILD'] = buildVersion.toString() // versionProps['VERSION_BUILD'] = buildVersion.toString()
versionProps.store(versionPropsFile.newWriter(), null) // versionProps.store(versionPropsFile.newWriter(), null)
//
defaultConfig { defaultConfig {
buildConfigField ("int","BUILD_VERSION","${buildVersion}") // buildConfigField ("int","BUILD_VERSION","${buildVersion}")
} }
noArg { noArg {
......
#Sat Jul 10 14:02:18 CST 2021 #Sat Jul 10 16:33:56 CST 2021
VERSION_BUILD=2637 VERSION_BUILD=2754
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