Commit b18f4a30 authored by fengruiyu's avatar fengruiyu

1.js加载问题已处理

2.接口加载机制已处理
parent eea467fc
var initZsMap = function (data) {
console.log(data)
}
// var initZsMap = function (data) {
// console.log(data)
// }
var isWindowLoad=false;
var BridgeIsLoad=false;
function tryAllIsOk(){
console.log("tryAllIsOk","isWindowLoad",isWindowLoad,"BridgeIsLoad",BridgeIsLoad)
if(isWindowLoad){
try {
doAppFun("allIsOk");
} catch (e) {
console.log('allisOk',e)
// alert("app未接受开始自动跳转" + e)
setTimeout(function(){
doAppFun("allIsOk");
},1500);
}
}
function toVurl(a, data) {
}
function toVurl(a, innerData) {
var data=JSON.stringify(innerData);
if (a == 'b') {
try {
doAppFun("toBVr", {
d: data
});
doAppFun("toBVr", data);
} catch (e) {
alert("app未接受开始自动跳转"+e)
window.open("./m.html?d=" + data + "&bk=" + getParam("bk"));
console.log('tobvr', data)
// alert("app未接受开始自动跳转" + e)
}
}
if (a == 'g') {
try {
doAppFun("toVr", {
lat: data.lat(),
lat: data.lng(),
});
doAppFun("toVr", data);
} catch (e) {
alert("app未接受开始自动跳转"+e)
window.open("./streets.html?a=" + data.lat() + "&b=" + data.lng()
+ "&u=" + getParam("u") + "&gk=" + getParam("gk"));
console.log('toVr', data)
//alert("app未接受开始自动跳转" + e)
}
}
}
function allIsOk(a, data) {
console.log("innerAllIsOk")
isWindowLoad=true;
tryAllIsOk();
// setTimeout(function(){
//
// },1000);
}
function doAppFun(funstr, params) {
//参数一:调用java中的方法 submitFromWeb是方法名,必须和Android中注册时候的方法名称保持一致
//参数二:返回给Android端的数据,可以为字符串,json等信息
......@@ -48,7 +76,8 @@ function tips(msg) {
try {
doAppFun("tips", msg);
} catch (e) {
alert("app未弹框==>"+msg+e)
console.log("tips",msg)
//alert("app未弹框==>" + msg + e)
}
}
......@@ -61,6 +90,8 @@ function connectWebViewJavascriptBridge(callback) {
'WebViewJavascriptBridgeReady'
, function () {
callback(WebViewJavascriptBridge)
BridgeIsLoad=true;
tryAllIsOk()
},
false
);
......@@ -76,6 +107,7 @@ connectWebViewJavascriptBridge(function (bridge) {
'Javascript Responds': 'Wee!'
};
responseCallback(data);
});
......
......@@ -65,10 +65,9 @@ function toBLatLng(point, f) {
var addComp = rs.addressComponents;
console.log(addComp.province + ", " + addComp.city + ", " + addComp.district + ", " +
addComp.street + ", " + addComp.streetNumber);
console.log(CheckChinese(addComp.province))
// console.log( CheckChinese(addComp.province),typeof(addComp.province),addComp.province.indexOf("台湾")!=-1,CheckChinese(addComp.province)&&addComp.province!="台湾省")
var res = data;
res.c = CheckChinese(addComp.province);
res.c = CheckChinese(addComp.province)&&addComp.province!="台湾省";
f && f(res)
})
......@@ -90,10 +89,13 @@ function bvr(point) {
panoramaInfo += '<br/>坐标为:' + data.position.lng + ':' + data.position.lat + '\n';
console.log(panoramaInfo);
tips("准备跳转国内" + data.description)
// tips("准备跳转国内" + data.description)
toVurl('b', data.id);
var params = {
"d": data.id,
"title": data.description
}
toVurl('b',params)
});
}
......
This diff is collapsed.
......@@ -5,13 +5,11 @@ function getZsKey() {
}
function toApp(lat, lng, msg) {
alert(msg + "" + lat + "," + lng)
}
function getRequestUrl(a) {
return "http://maps.mints-id.com/" + getParam("u") + ""
return "http://maps."+getParam("base")+".com/" + getParam("u") + ""
}
......@@ -20,10 +18,10 @@ function getVrUrls() {
return [
"http://lh3.ggpht.mints-id.com/" + getParam("u") + "/",
"http://lh4.ggpht.mints-id.com/" + getParam("u") + "/",
"http://lh5.ggpht.mints-id.com/" + getParam("u") + "/",
"http://lh6.ggpht.mints-id.com/" + getParam("u") + "/"
"http://lh3.ggpht."+getParam("base")+".com/" + getParam("u") + "/",
"http://lh4.ggpht."+getParam("base")+".com/" + getParam("u") + "/",
"http://lh5.ggpht."+getParam("base")+".com/" + getParam("u") + "/",
"http://lh6.ggpht."+getParam("base")+".com/" + getParam("u") + "/"
]
};
......@@ -33,10 +31,10 @@ function getVrUrls0(a) {
if ( getParam("ut") =='uz')
return [
"http://geo0.ggpht.mints-id.com/" + getParam("u") + "/cbk",
"http://geo1.ggpht.mints-id.com/" + getParam("u") + "/cbk",
"http://geo2.ggpht.mints-id.com/" + getParam("u") + "/cbk",
"http://geo3.ggpht.mints-id.com/" + getParam("u") + "/cbk"
"http://geo0.ggpht."+getParam("base")+".com/" + getParam("u") + "/cbk",
"http://geo1.ggpht."+getParam("base")+".com/" + getParam("u") + "/cbk",
"http://geo2.ggpht."+getParam("base")+".com/" + getParam("u") + "/cbk",
"http://geo3.ggpht."+getParam("base")+".com/" + getParam("u") + "/cbk"
]
......@@ -50,16 +48,16 @@ function getVrUrls0(a) {
function getMb1U() {
return [
"http://khms0.mints-id.com/" + getParam("u") + "/kh?v=904\u0026hl=zh-CN\u0026",
"http://khms1.mints-id.com/" + getParam("u") + "/kh?v=904\u0026hl=zh-CN\u0026"
"http://khms0."+getParam("base")+".com/" + getParam("u") + "/kh?v=904\u0026hl=zh-CN\u0026",
"http://khms1."+getParam("base")+".com/" + getParam("u") + "/kh?v=904\u0026hl=zh-CN\u0026"
]
}
function getMb2U() {
return [
"http://khms0.mints-id.com/" + getParam("u") + "/kh?v=130\u0026hl=zh-CN\u0026",
"http://khms1.mints-id.com/" + getParam("u") + "/kh?v=130\u0026hl=zh-CN\u0026"
"http://khms0."+getParam("base")+".com/" + getParam("u") + "/kh?v=130\u0026hl=zh-CN\u0026",
"http://khms1."+getParam("base")+".com/" + getParam("u") + "/kh?v=130\u0026hl=zh-CN\u0026"
]
}
......
......@@ -40,14 +40,8 @@
<script type="text/javascript">
var c = getParam("c")==undefined?200:getParam("c")
// window.location.href= window.location.href;
var a = getParam("a");//其中116.404表示经度,
var b = getParam("b");//39.915表示纬度
var c = getParam("c");//39.915表示纬度
var c = 1;//getParam("c");//39.915表示纬度
var d = getParam("d");//39.915表示纬度
var panorama = new BMap.Panorama('panorama', {
......
......@@ -2,7 +2,10 @@
<!-- saved from url=(0077)file:///Users/wmh/workspace1/worldMap/zs-api/src/main/resources/h5/map/g.html -->
<html jstcache="0">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">-->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
.gm-compass-turn {
cursor: pointer;
......@@ -679,12 +682,12 @@
<script src="./streets_files/js" async=""></script>
<script src="./vconsole.min.js">
<!-- <script src="./vconsole.min.js">-->
</script>
<script>
var vConsole = new VConsole();
</script>
<!-- </script>-->
<!-- <script>-->
<!-- var vConsole = new VConsole();-->
<!-- </script>-->
......
......@@ -3,98 +3,14 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
.gm-control-active > img {
box-sizing: content-box;
display: none;
left: 50%;
pointer-events: none;
position: absolute;
top: 50%;
transform: translate(-50%, -50%)
}
.gm-control-active > img:nth-child(1) {
display: block
}
.gm-control-active:hover > img:nth-child(1),
.gm-control-active:active > img:nth-child(1) {
display: none
}
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1; ">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
.gm-control-active:hover > img:nth-child(2),
.gm-control-active:active > img:nth-child(3) {
display: block
}
</style>
<link type="text/css" rel="stylesheet" href="./zsmap_files/css">
<link type="text/css" rel="stylesheet" href="./zsmap_files/css(1)">
<style>
.gm-ui-hover-effect {
opacity: .6
}
.gm-ui-hover-effect:hover {
opacity: 1
}
</style>
<style>
.gm-style .gm-style-cc a,
.gm-style .gm-style-cc button,
.gm-style .gm-style-cc span,
.gm-style .gm-style-mtc div {
font-size: 10px;
box-sizing: border-box
}
</style>
<style>
@media print {
.gm-style .gmnoprint,
.gmnoprint {
display: none
}
}
@media screen {
.gm-style .gmnoscreen,
.gmnoscreen {
display: none
}
}
</style>
<style>
.gm-style-pbc {
transition: opacity ease-in-out;
background-color: rgba(0, 0, 0, 0.45);
text-align: center
}
.gm-style-pbt {
font-size: 22px;
color: white;
font-family: Roboto, Arial, sans-serif;
position: relative;
margin: 0;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%)
}
</style>
<style>
.gm-style img {
max-width: none;
}
.gm-style {
font: 400 11px Roboto, Arial, sans-serif;
text-decoration: none;
}
</style>
<title>Street View split-map-panes</title>
<title></title>
<script src="./zsmap_files/polyfill.min.js"></script>
<style>
html,
......@@ -109,15 +25,18 @@
}
.d1 {
width: 300px;
height: 200px;
background: #00e5ff4a;
width: 70px;
height: 90px;
/*background: #00e5ffff;*/
position: fixed;
top: 50%;
margin-top: -100px;
margin-top: -90px;
left: 50%;
margin-left: -150px;
margin-left: -35px;
}
/*.gmnoprint{*/
/* display: none !important;*/
/*}*/
</style>
<script type="text/javascript" charset="UTF-8" src="./common/latlng.js"></script>
<script type="text/javascript" charset="UTF-8" src="./common/url.js"></script>
......@@ -148,8 +67,8 @@
<div id="map" style="position: relative; overflow: hidden;">
</div>
<div onclick="al()" class="d1" id="im">
</div>
<img src="./common/icon.jpg" onclick="al()" class="d1" id="im">
</img>
<script src="./zsmap_files/js" async=""></script>
</body>
</html>
window.google = window.google || {};
google.maps = google.maps || {};
function initZsMap() {
let map;//fun
var canclick = true;
var ZSYDa;//gmapinitneed
var mapInited = false;
//强行阻断地图加载
//获取加载参数
function loadGoogleMap(Yda) {
//window.google.maps.Load&&window.google.maps.Load(Yda);
ZSYDa = Yda;
}
(function () {
......@@ -55,7 +63,7 @@ function initZsMap() {
],
[
"zh-CN",
"US",
"CN",
null,
0,
null,
......@@ -174,94 +182,165 @@ function initZsMap() {
})();
let map;
var al;
var tosh;
var arr = [39.90960456049752, 116.3972282409668]//北京
//var arr =[120.31, 31.58]
function initMap() {
myLatLng = {
lat: arr[0],
lng: arr[1]
function al() {
if (canclick) {
canclick = false;
setTimeout(function () {
canclick = true;
}, 1200);
} else {
return;
}
var center = map.getCenter();
console.log(center)
const geocoder = new google.maps.Geocoder();
const latlng = {
lat: parseFloat(center.lat()),
lng: parseFloat(center.lng()),
};
toBLatLng(latlng, function (res) {
console.log(res)
if (res.c) {
// tips("猜测为国内,准备使用百度")
bvr(res)
} else {
// tips("猜测为国外,准备使用谷歌")
tosh(center)
}
});
}
function tosh(center) {
console.log("查询国外或中国台湾街景")
var ser = new google.maps.StreetViewService();
const request = {
location: {
lat: center.lat(),
lng: center.lng()
},
radius: 10000,
preference: 'nearest', //google.maps.StreetViewPreference.NEAREST,
};
ser.getPanorama(request, function (a) {
if (a == null || a.location == null) {
tips("暂无街景")
return;
}
console.log(a.location.description)
console.log(a.location.latLng.lat() + ',' + a.location.latLng.lng())
// console.log("准备模拟app跳转至外国街景:" + a.location.description + "==>./streets.html?a=" + a.location.latLng
// .lat() + "&b=" + a.location.latLng.lng())
var params = {
"lng": a.location.latLng.lng(),
"lat": a.location.latLng.lat(),
"title": a.location.description
}
toVurl('g', params)
})
}
//var arr =[120.31, 31.58]
var initMap=function () {
console.log("initMap>>first")
map = new google.maps.Map(document.getElementById("map"), {
zoom: 6,
center: myLatLng,
zoom: 14,
// RotateControlOptions :RIGHT_CENTER,
center: {
lat: 39.90960456049752,
lng: 116.3972282409668
},
mapTypeId: "hybrid",
zoomControl: false,
zoomControl: true,
mapTypeControl: false,
scaleControl: false,
streetViewControl: false,
rotateControl: false,
fullscreenControl: false
fullscreenControl: false,
clickableIcons: false,
zoomControlOptions: {
position: google.maps.ControlPosition.RIGHT_CENTER,
},
// scaleControlOptions:true,
});
/**
* HYBRID 此地图类型在卫星图像上显示主要街道的透明图层。
ROADMAP 此地图类型显示普通街道地图。
SATELLITE 此地图类型显示卫星图像。
TERRAIN 此地图类型显示具有地形和植被等物理特征的地图。
*/
}
tosh = function (center) {
console.log("查询国外或中国台湾街景")
var ser = new google.maps.StreetViewService();
const request = {
location: {
lat: center.lat(),
lng: center.lng()
},
radius: 10000,
preference: 'nearest', //google.maps.StreetViewPreference.NEAREST,
};
window.onload = function () {
console.log("window.load_+++++++++++=")
allIsOk();
// initZsMap('{"lat":35.69,"lng":139.69}')
}
function initZsMap(pointStr) {
console.log(">>", pointStr)
var point = JSON.parse(pointStr)
if (mapInited == false) {//第一次初始化
ser.getPanorama(request, function (a) {
if (a == null || a.location == null) {
tips("暂无街景")
return;
}
console.log(a.location.description)
mapInited=true;
console.log(a.location.latLng.lat() + ',' + a.location.latLng.lng())
initMap=function () {
console.log("准备模拟app跳转至外国街景:" + a.location.description + "==>./streets.html?a=" + a.location.latLng
.lat() + "&b=" + a.location.latLng.lng())
console.log("initMap>>second")
map = new google.maps.Map(document.getElementById("map"), {
zoom: 14,
// RotateControlOptions :RIGHT_CENTER,
center:point,
mapTypeId: "hybrid",
zoomControl: true,
mapTypeControl: false,
scaleControl: false,
streetViewControl: false,
rotateControl: false,
fullscreenControl: false,
clickableIcons: false,
zoomControlOptions: {
position: google.maps.ControlPosition.RIGHT_CENTER,
},
// scaleControlOptions:true,
});
/**
* HYBRID 此地图类型在卫星图像上显示主要街道的透明图层。
ROADMAP 此地图类型显示普通街道地图。
SATELLITE 此地图类型显示卫星图像。
TERRAIN 此地图类型显示具有地形和植被等物理特征的地图。
*/
}
toVurl('g', a.location.latLng)
window.google.maps.Load && window.google.maps.Load(ZSYDa);
})
}
al = function () {
var center = map.getCenter();
console.log(center)
const geocoder = new google.maps.Geocoder();
const latlng = {
lat: parseFloat(center.lat()),
lng: parseFloat(center.lng()),
};
toBLatLng(latlng, function (res) {
console.log(res)
if (res.c) {
tips("猜测为国内,准备使用百度")
bvr(res)
} else {
tips("猜测为国外,准备使用谷歌")
tosh(center)
}
});
} else {
map.panTo(point)//第二次初始化
}
initZsMap=function (pointStr) {
console.log(">>",pointStr)
var point =JSON.parse(pointStr)
}
// window.onload = function() {
// allIsOk();
// }
map.setCenter(point)
}
initZsMap();
}
......@@ -280,5 +280,9 @@ Copyright (c) 2010 Robert Kieffer
Dual licensed under the MIT and GPL licenses.
*/
var Rda="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");_.yj.prototype.constructor=_.yj.prototype.constructor;_.vk=new _.z.WeakMap;_.Vea=Aj("Element","attributes")||Aj("Node","attributes");_.Wea=Bj("Element","hasAttribute");_.Xea=Bj("Element","getAttribute");_.Yea=Bj("Element","setAttribute");_.Zea=Bj("Element","removeAttribute");_.$ea=Bj("Element","getElementsByTagName");_.afa=Bj("Element","matches")||Bj("Element","msMatchesSelector");_.bfa=Aj("Node","nodeName");_.cfa=Aj("Node","nodeType");_.dfa=Aj("Node","parentNode");_.efa=Aj("HTMLElement","style")||Aj("Element","style");_.ffa=Aj("HTMLStyleElement","sheet");
_.gfa=Bj("CSSStyleDeclaration","getPropertyValue");_.hfa=Bj("CSSStyleDeclaration","setProperty");_.ifa=_.Jj&&10>document.documentMode?null:/\s*([^\s'",]+[^'",]*(('([^'\r\n\f\\]|\\[^])*')|("([^"\r\n\f\\]|\\[^])*")|[^'",])*)/g;_.jfa="undefined"!=typeof _.z.WeakMap&&-1!=_.z.WeakMap.toString().indexOf("[native code]");_.kfa=!_.Jj||10<=Number(Qj);_.lfa=!_.Jj||null==document.documentMode;var Pda=arguments[0];window.google.maps.Load&&window.google.maps.Load(Yda);}).call(this,{});
_.gfa=Bj("CSSStyleDeclaration","getPropertyValue");_.hfa=Bj("CSSStyleDeclaration","setProperty");_.ifa=_.Jj&&10>document.documentMode?null:/\s*([^\s'",]+[^'",]*(('([^'\r\n\f\\]|\\[^])*')|("([^"\r\n\f\\]|\\[^])*")|[^'",])*)/g;_.jfa="undefined"!=typeof _.z.WeakMap&&-1!=_.z.WeakMap.toString().indexOf("[native code]");_.kfa=!_.Jj||10<=Number(Qj);_.lfa=!_.Jj||null==document.documentMode;var Pda=arguments[0];
//window.google.maps.Load&&window.google.maps.Load(Yda);
console.log("loadBefore")
loadGoogleMap(Yda)
}).call(this,{});
......@@ -56,7 +56,7 @@ google.maps = google.maps || {};
],
[
"zh-CN",
"US",
"CN",
null,
0,
null,
......@@ -89,9 +89,10 @@ google.maps = google.maps || {};
null,
null,
"initialize",
[
"localContext"
],
// [
// "localContext"
// ],
null,
null,
1,
"http://khms.googleapis.com/mz?v=904\u0026",
......@@ -176,28 +177,32 @@ google.maps = google.maps || {};
let panorama;
var a = parseFloat(getParam("a")); //其中116.404表示经度,
var b = parseFloat(getParam("b")); //39.915表示纬度
var lat = parseFloat(getParam("lat")); //其中116.404表示经度,
var lng = parseFloat(getParam("lng")); //39.915表示纬度
var c = getParam("c"); //39.915表示纬度
var arr = [parseFloat(a), parseFloat(b)]
console.log(a, b)
function initialize() {
panorama = new google.maps.StreetViewPanorama(
document.getElementById("street-view"), {
position: { lat:a, lng: b },
position: { lat:lat, lng: lng },
addressControl:false,
//{ lat: arr[0] , lng: arr[1]},
addressControlOptions: {
position: google.maps.ControlPosition.BOTTOM_CENTER,
},
linksControl: true, //指示器
panControl: true, //旋转
panControlOptions: {
position: google.maps.ControlPosition.RIGHT_CENTER,
},
enableCloseButton: false,
zoomControl: false,
fullscreenControl: false,
fullscreenControlOptions: {
position: google.maps.ControlPosition.BOTTOM_CENTER,
}, //全屏
......
......@@ -32,9 +32,7 @@ class PopularSceneAdapter(val context: Context, var list: List<Places>? = null)
position: Int
) {
RxUtils.onMultiClick(holder.binding.bg){
MintsWebViewActivity.startWebView(list?.get(position)?.name
,latitude = list?.get(position)?.latitude.toString()
,longitude = list?.get(position)?.longitude.toString())
MintsWebViewActivity.startWebView(list?.get(position)?.name)
}
holder.binding.tvName.text = list?.get(position)?.name
......
......@@ -10,4 +10,5 @@ class AuthorizedBean {
var ut :String?=null
var appInKey :String?=null
var appOutKey :String?=null
var base :String?=null
}
\ No newline at end of file
package com.mints.street.bean;
import org.jetbrains.annotations.NotNull;
import androidx.annotation.Nullable;
/**
* Created by 冯瑞雨 on 2021/7/30.
* 坐标对象,由经纬度构成
* Created by xfkang on 2018/3/28.
*/
public class GPS {
private @Nullable double lat;
private @Nullable double lng;
public GPS() {
}
public GPS(double lat, double lng) {
this.lat = lat;
this.lng = lng;
}
public double getLat() {
return lat;
}
@Nullable
public void setLat(double lat) {
this.lat = lat;
}
public double getLng() {
return lng;
}
@Nullable
public void setLng(double lng) {
this.lng = lng;
}
public String toString() {
return "lat:" + lat + "," + "lng:" + lng;
}
}
\ No newline at end of file
package com.mints.street.bean
/**
* Created by 冯瑞雨 on 2021/7/30.
*/
class MutualBean {
var title:String?=null
var d:String?=null
var lat:String?=null
var lng:String?=null
}
\ No newline at end of file
......@@ -20,6 +20,7 @@ import com.mints.street.main.googlemap.GoogleMapFragment
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.UserManager
import com.mints.street.manager.oaid.OaidManager
import com.tbruyelle.rxpermissions2.RxPermissions
import me.goldze.mvvmhabit.base.AppManager
......@@ -45,16 +46,16 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() {
binding.mainBottom.init {
when (it) {
R.id.menu_home -> {
// if(){
binding.mainViewpager.setCurrentItem(0, false)
// }else{
if(UserManager.INSTANCE.userIsLogin()&&UserManager.INSTANCE.getVipFlag()){
binding.mainViewpager.setCurrentItem(3, false)
// }
}else{
binding.mainViewpager.setCurrentItem(0, false)
}
}
R.id.menu_square -> binding.mainViewpager.setCurrentItem(1, false)
R.id.menu_my -> {
binding.mainViewpager.setCurrentItem(2, false)
// stopAnim()
}
}
}
......@@ -119,7 +120,6 @@ private fun ViewPager2.initMain(activity: FragmentActivity): ViewPager2 {
this.isUserInputEnabled = false
//预加载
this.offscreenPageLimit = 4
//设置适配器
adapter = object : FragmentStateAdapter(activity) {
override fun createFragment(position: Int): Fragment {
......@@ -148,7 +148,12 @@ private fun ViewPager2.initMain(activity: FragmentActivity): ViewPager2 {
}
override fun getItemCount() = 4
}
if(UserManager.INSTANCE.userIsLogin()&&UserManager.INSTANCE.getVipFlag()){
this.setCurrentItem(3, false)
}else{
this.setCurrentItem(0, false)
}
return this
}
......
......@@ -2,39 +2,76 @@ package com.mints.street.main.googlemap
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.webkit.WebChromeClient
import android.webkit.WebView
import android.webkit.WebViewClient
import androidx.lifecycle.Observer
import com.baidu.location.BDLocation
import com.baidu.location.BDLocationListener
import com.baidu.location.LocationClient
import com.baidu.location.LocationClientOption
import com.fry.base.base.BaseFragment
import com.github.lzyzsd.jsbridge.CallBackFunction
import com.github.lzyzsd.jsbridge.DefaultHandler
import com.google.gson.Gson
import com.lxj.xpopup.interfaces.OnConfirmListener
import com.mints.street.BR
import com.mints.street.R
import com.mints.street.bean.GPS
import com.mints.street.bean.MutualBean
import com.mints.street.databinding.ActivityGoogleMapBinding
import com.mints.street.main.home.HomeViewModel
import com.mints.street.main.home.SearchMapActivity
import com.mints.street.utils.GPSConverterUtils
import com.mints.street.webview.MintsWebViewActivity
import me.goldze.mvvmhabit.base.AppManager
import me.goldze.mvvmhabit.utils.CommonDialogUtils
import me.goldze.mvvmhabit.utils.KLog
import me.goldze.mvvmhabit.utils.RxUtils
import me.goldze.mvvmhabit.utils.ToastUtils
/**
* Created by 冯瑞雨 on 2021/7/29.
*/
class GoogleMapFragment() :BaseFragment<ActivityGoogleMapBinding,GoogleMapViewModel>(){
class GoogleMapFragment() : BaseFragment<ActivityGoogleMapBinding, HomeViewModel>() {
var mLocationClient: LocationClient? = null
private val myListener: MyLocationListener = MyLocationListener()
private var gps = GPS()
inner class MyLocationListener : BDLocationListener {
override fun onReceiveLocation(location: BDLocation?) {
gps.lat = location?.latitude?:0.0
gps.lng = location?.longitude?:0.0
}
}
override fun initContentView(
inflater: LayoutInflater?,
container: ViewGroup?,
savedInstanceState: Bundle?
) = R.layout.activity_google_map
) = R.layout.activity_google_map
override fun initVariableId() = BR.viewModel
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
return super.onCreateView(inflater, container, savedInstanceState)
}
override fun onResume() {
viewModel.authorized()
super.onResume()
}
override fun initData() {
super.initData()
binding.webview.setDefaultHandler(DefaultHandler())
binding.webview.webChromeClient = WebChromeClient()
binding.webview.setOnLongClickListener { true }
......@@ -53,42 +90,142 @@ class GoogleMapFragment() :BaseFragment<ActivityGoogleMapBinding,GoogleMapViewMo
ToastUtils.showLong(data)
}
//跳转国外google街景
binding.webview.registerHandler("toVr") { data, _ ->
ToastUtils.showLong(data)
KLog.a("js - > android toVr", data)
var mutualBean: MutualBean? = null
try {
mutualBean = Gson().fromJson(data, MutualBean::class.java)
} catch (e: Exception) {
KLog.e("实体类转换错误")
}
MintsWebViewActivity.startWebView(
mutualBean?.title,
MintsWebViewActivity.toGoogleVR(
viewModel.authorizedBean.value?.u,
viewModel.authorizedBean.value?.gk,
viewModel.authorizedBean.value?.base,
mutualBean?.lat,
mutualBean?.lng,
viewModel.authorizedBean.value?.ut
)
)
}
//跳转国内百度街景
binding.webview.registerHandler("toBVr") { data, _ ->
KLog.a("js - > android toVr", data)
var mutualBean: MutualBean? = null
try {
mutualBean = Gson().fromJson(data, MutualBean::class.java)
} catch (e: Exception) {
KLog.e("实体类转换错误")
}
MintsWebViewActivity.startWebView(
mutualBean?.title, MintsWebViewActivity.toBaduVR(
mutualBean?.d,
viewModel.authorizedBean.value?.bk
)
)
}
//加载完成
binding.webview.registerHandler("allIsOk") { _, _ ->
KLog.e("Sfsadfa","allIsOk")
initZsMap()
}
viewModel.getMapBean()
//定位
initPosition()
ToastUtils.showLong(data)
}
viewModel.authorized()
binding.click.setOnClickListener {
initZsMap()
}
RxUtils.onMultiClick(binding.stbBgSearch) {
SearchMapActivity.startSearchMapActivity(this)
}
}
/**
* 调用JS
*/
private fun initZsMap() {
KLog.e("initZsMap","调用JS")
val data = HashMap<String,String>()
data["lat"] = "23.171725"
data["lng"] = "113.242808"
binding.webview.callHandler("initZsMap","{\"lat\":38.913611,\"lng\":-77.013222}" ) {
binding.webview.callHandler("initZsMap"
,Gson().toJson(GPSConverterUtils.bd09_To_Gcj02(gps.lat,gps.lng)) ) {
}
}
private fun initPosition() {
//定位
mLocationClient = LocationClient(context)
//声明LocationClient类
mLocationClient?.registerLocationListener(myListener);
val option = LocationClientOption()
option.locationMode = LocationClientOption.LocationMode.Hight_Accuracy
//可选,设置定位模式,默认高精度
//LocationMode.Hight_Accuracy:高精度;
//LocationMode. Battery_Saving:低功耗;
//LocationMode. Device_Sensors:仅使用设备;
option.setCoorType("bd09ll")
//可选,设置返回经纬度坐标类型,默认GCJ02
//GCJ02:国测局坐标;
//BD09ll:百度经纬度坐标;
//BD09:百度墨卡托坐标;
//海外地区定位,无需设置坐标类型,统一返回WGS84类型坐标
option.setScanSpan(1000)
//可选,设置发起定位请求的间隔,int类型,单位ms
//如果设置为0,则代表单次定位,即仅定位一次,默认为0
//如果设置非0,需设置1000ms以上才有效
option.isOpenGps = true
//可选,设置是否使用gps,默认false
//使用高精度和仅用设备两种定位模式的,参数必须设置为true
option.isLocationNotify = true
//可选,设置是否当GPS有效时按照1S/1次频率输出GPS结果,默认false
option.setIgnoreKillProcess(false)
//可选,定位SDK内部是一个service,并放到了独立进程。
//设置是否在stop的时候杀死这个进程,默认(建议)不杀死,即setIgnoreKillProcess(true)
option.SetIgnoreCacheException(false)
//可选,设置是否收集Crash信息,默认收集,即参数为false
option.setWifiCacheTimeOut(5 * 60 * 1000)
//可选,V7.2版本新增能力
//如果设置了该接口,首次启动定位时,会先判断当前Wi-Fi是否超出有效期,若超出有效期,会先重新扫描Wi-Fi,然后定位
option.setEnableSimulateGps(false)
//可选,设置是否需要过滤GPS仿真结果,默认需要,即参数为false
option.setNeedNewVersionRgc(true)
//可选,设置是否需要最新版本的地址信息。默认需要,即参数为true
mLocationClient?.locOption = option
//mLocationClient为第二步初始化过的LocationClient对象
//需将配置好的LocationClientOption对象,通过setLocOption方法传递给LocationClient对象使用
//更多LocationClientOption的配置,请参照类参考中LocationClientOption类的详细说明
mLocationClient?.start();
//mLocationClient为第二步初始化过的LocationClient对象
//调用LocationClient的start()方法,便可发起定位请求
}
override fun initViewObservable() {
super.initViewObservable()
viewModel.authorizedBean.observe(this, Observer{
viewModel.authorizedBean.observe(this, Observer {
it?.apply {
binding.webview.loadUrl("file:///android_asset/web/zsmap.html?u=${u}&gk=${gk}&bk=${bk}")
binding.webview.loadUrl("file:///android_asset/web/zsmap.html?u=${u
}&gk=${gk}&bk=${bk}&base=${base}&ut=${ut}")
KLog.e("file:///android_asset/w")
}
})
}
override fun onDestroy() {
super.onDestroy()
binding.webview.let {
it.destroyDrawingCache()
val parent = it.parent as ViewGroup
parent.removeView(it)
it.removeAllViews()
it.destroy()
}
}
}
package com.mints.street.main.googlemap
import android.app.Application
import androidx.lifecycle.MutableLiveData
import com.mints.street.bean.AuthorizedBean
import com.mints.street.bean.BaseResponse
import com.mints.street.model.ApiModel
import com.mints.street.netwrok.base.HttpSubscribeImpl
import me.goldze.mvvmhabit.base.BaseViewModel
/**
* Created by 冯瑞雨 on 2021/7/29.
*/
class GoogleMapViewModel(application: Application) : BaseViewModel(application) {
val authorizedBean = MutableLiveData<AuthorizedBean>()
fun authorized() {
ApiModel.authorized().safeSubscribe(object
: HttpSubscribeImpl<BaseResponse<AuthorizedBean>>(
this@GoogleMapViewModel
) {
override fun onBusinessSuccess(response: BaseResponse<AuthorizedBean>) {
authorizedBean.value = response.result
}
})
}
}
\ No newline at end of file
......@@ -14,7 +14,7 @@ class HomeButtonItemVM(viewModel: HomeViewModel,val name:String?,val image1:Stri
val onItemClick = BindingCommand<Any?>(BindingAction {
//SearchMapActivity.startSearchMapActivity()
MintsWebViewActivity.startWebView(name,latitude = latitude,longitude = longitude)
MintsWebViewActivity.startWebView(name)
})
}
\ No newline at end of file
......@@ -105,8 +105,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>(), SensorE
SearchMapActivity.startSearchMapActivity(this)
}
RxUtils.onMultiClick(binding.ivClick){
MintsWebViewActivity.startWebView(""
,latitude = currentLat.toString(),longitude = currentLon.toString())
MintsWebViewActivity.startWebView("")
}
viewModel.getMapBean()
}
......
......@@ -7,6 +7,7 @@ import androidx.lifecycle.MutableLiveData
import com.google.gson.Gson
import com.mints.street.BR
import com.mints.street.R
import com.mints.street.bean.AuthorizedBean
import com.mints.street.bean.BaseResponse
import com.mints.street.bean.MapBean
import com.mints.street.bean.VipBean
......@@ -34,7 +35,24 @@ class HomeViewModel(application: Application):BaseViewModel(application) {
var addressItemBinding = ItemBinding.of<HomeButtonItemVM>(BR.viewModel, R.layout.item_home_button)
var pt = MutableLiveData<Map<String,Double>>()
val authorizedBean = MutableLiveData<AuthorizedBean>()
fun authorized() {
ApiModel.authorized().safeSubscribe(object
: HttpSubscribeImpl<BaseResponse<AuthorizedBean>>(
null,false
) {
override fun onBusinessSuccess(response: BaseResponse<AuthorizedBean>) {
if(Gson().toJson(response.result).equals(Gson().toJson(authorizedBean.value))){
return
}
authorizedBean.value = response.result
}
})
}
fun getMapBean(){
val assets = AppManager.getAppManager().currentActivity.assets
val stringBuilder = StringBuilder()
......
......@@ -5,6 +5,7 @@ import android.os.Bundle
import android.text.Editable
import android.text.TextUtils
import android.text.TextWatcher
import androidx.fragment.app.Fragment
import androidx.lifecycle.Observer
import com.alibaba.android.vlayout.DelegateAdapter
import com.alibaba.android.vlayout.VirtualLayoutManager
......@@ -27,7 +28,7 @@ class SearchMapActivity : BaseActivity<ActivitySearchMapBinding, SearchMapViewMo
companion object {
const val HISTORY_NAME = "history_name"
const val REQUEST_CODE = 201
fun startSearchMapActivity(fragment: HomeFragment) {
fun startSearchMapActivity(fragment: Fragment) {
fragment.startActivityForResult(
Intent(fragment.context, SearchMapActivity::class.java),
200
......
......@@ -12,7 +12,7 @@ class FreeButtonItemVM(viewModel: HomeViewModel, val name:String?, val image1:St
val onItemClick = BindingCommand<Any?>(BindingAction {
//SearchMapActivity.startSearchMapActivity()
MintsWebViewActivity.startWebView(name,latitude = latitude,longitude = longitude)
MintsWebViewActivity.startWebView(name)
})
}
\ No newline at end of file
package com.mints.street.utils;
import com.mints.street.bean.GPS;
/**
* Created by 冯瑞雨 on 2021/7/30.
* 坐标转换工具类
* WGS84: Google Earth采用,Google Map中国范围外使用
* GCJ02: 火星坐标系,中国国家测绘局制定的坐标系统,由WGS84机密后的坐标。Google Map中国和搜搜地图使用,高德
* BD09:百度坐标,GCJ02机密后的坐标系
* 搜狗坐标系,图吧坐标等,估计也是在GCJ02基础上加密而成的
* Created by xfkang on 2018/3/28.
*/
public class GPSConverterUtils {
public static final String BAIDU_LBS_TYPE = "bd09ll";
public static double pi = 3.1415926535897932384626;
public static double a = 6378245.0;
public static double ee = 0.00669342162296594323;
/**
* 84 to 火星坐标系 (GCJ-02) World Geodetic System ==> Mars Geodetic System
* @param lat
* @param lon
*/
public static GPS gps84_To_Gcj02(double lat, double lon) {
if (outOfChina(lat, lon)) {
return null;
}
double dLat = transformLat(lon - 105.0, lat - 35.0);
double dLon = transformLon(lon - 105.0, lat - 35.0);
double radLat = lat / 180.0 * pi;
double magic = Math.sin(radLat);
magic = 1 - ee * magic * magic;
double sqrtMagic = Math.sqrt(magic);
dLat = (dLat * 180.0) / ((a * (1 - ee)) / (magic * sqrtMagic) * pi);
dLon = (dLon * 180.0) / (a / sqrtMagic * Math.cos(radLat) * pi);
double mgLat = lat + dLat;
double mgLon = lon + dLon;
return new GPS(mgLat, mgLon);
}
/**
* * 火星坐标系 (GCJ-02) to 84 * * @param lon * @param lat * @return
*/
public static GPS gcj_To_Gps84(double lat, double lon) {
GPS gps = transform(lat, lon);
double lontitude = lon * 2 - gps.getLng();
double latitude = lat * 2 - gps.getLat();
return new GPS(latitude, lontitude);
}
/**
* 火星坐标系 (GCJ-02) 与百度坐标系 (BD-09) 的转换算法 将 GCJ-02 坐标转换成 BD-09 坐标
*
* @param gg_lat
* @param gg_lon
*/
public static GPS gcj02_To_Bd09(double gg_lat, double gg_lon) {
double x = gg_lon, y = gg_lat;
double z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * pi);
double theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * pi);
double bd_lon = z * Math.cos(theta) + 0.0065;
double bd_lat = z * Math.sin(theta) + 0.006;
return new GPS(bd_lat, bd_lon);
}
/**
* * 火星坐标系 (GCJ-02) 与百度坐标系 (BD-09) 的转换算法 * * 将 BD-09 坐标转换成GCJ-02 坐标 * * @param
* bd_lat * @param bd_lon * @return
*/
public static GPS bd09_To_Gcj02(double bd_lat, double bd_lon) {
double x = bd_lon - 0.0065, y = bd_lat - 0.006;
double z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * pi);
double theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * pi);
double gg_lon = z * Math.cos(theta);
double gg_lat = z * Math.sin(theta);
return new GPS(gg_lat, gg_lon);
}
/**
* (BD-09)-->84
* @param bd_lat
* @param bd_lon
* @return
*/
public static GPS bd09_To_Gps84(double bd_lat, double bd_lon) {
GPS gcj02 = bd09_To_Gcj02(bd_lat, bd_lon);
GPS map84 = gcj_To_Gps84(gcj02.getLat(),
gcj02.getLng());
return map84;
}
/**
* is or not outOfChina
* @param lat
* @param lon
* @return
*/
public static boolean outOfChina(double lat, double lon) {
if (lon < 72.004 || lon > 137.8347)
return true;
if (lat < 0.8293 || lat > 55.8271)
return true;
return false;
}
public static GPS transform(double lat, double lon) {
if (outOfChina(lat, lon)) {
return new GPS(lat, lon);
}
double dLat = transformLat(lon - 105.0, lat - 35.0);
double dLon = transformLon(lon - 105.0, lat - 35.0);
double radLat = lat / 180.0 * pi;
double magic = Math.sin(radLat);
magic = 1 - ee * magic * magic;
double sqrtMagic = Math.sqrt(magic);
dLat = (dLat * 180.0) / ((a * (1 - ee)) / (magic * sqrtMagic) * pi);
dLon = (dLon * 180.0) / (a / sqrtMagic * Math.cos(radLat) * pi);
double mgLat = lat + dLat;
double mgLon = lon + dLon;
return new GPS(mgLat, mgLon);
}
public static double transformLat(double x, double y) {
double ret = -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y
+ 0.2 * Math.sqrt(Math.abs(x));
ret += (20.0 * Math.sin(6.0 * x * pi) + 20.0 * Math.sin(2.0 * x * pi)) * 2.0 / 3.0;
ret += (20.0 * Math.sin(y * pi) + 40.0 * Math.sin(y / 3.0 * pi)) * 2.0 / 3.0;
ret += (160.0 * Math.sin(y / 12.0 * pi) + 320 * Math.sin(y * pi / 30.0)) * 2.0 / 3.0;
return ret;
}
public static double transformLon(double x, double y) {
double ret = 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1
* Math.sqrt(Math.abs(x));
ret += (20.0 * Math.sin(6.0 * x * pi) + 20.0 * Math.sin(2.0 * x * pi)) * 2.0 / 3.0;
ret += (20.0 * Math.sin(x * pi) + 40.0 * Math.sin(x / 3.0 * pi)) * 2.0 / 3.0;
ret += (150.0 * Math.sin(x / 12.0 * pi) + 300.0 * Math.sin(x / 30.0
* pi)) * 2.0 / 3.0;
return ret;
}
}
\ No newline at end of file
......@@ -23,16 +23,21 @@ import me.goldze.mvvmhabit.utils.KLog
class MintsWebViewActivity : BaseActivity<ActivityMintsWebViewBinding, MintsWebViewModel>() {
companion object{
fun startWebView(name:String?=null,latitude:String?=null,longitude:String?=null,url:String?=null){
fun startWebView(name:String?=null,url:String?=null){
AppManager.getAppManager().currentActivity?.apply {
val intent = Intent(this,MintsWebViewActivity::class.java)
intent.putExtra("name",name)
intent.putExtra("latitude",latitude)
intent.putExtra("longitude",longitude)
intent.putExtra("url",url)
this.startActivity(intent)
}
}
fun toGoogleVR(u:String?,gk:String?,base:String?,lat:String?,lng:String?,ut:String?):String{
return "file:///android_asset/web/streets.html?u=${u
}&gk=${gk}&base=${base}&lat=${lat}&lng=${lng}&ut=${ut}"
}
fun toBaduVR(d:String?,bk:String?):String{
return "file:///android_asset/web/m.html?d=${d}&bk=${bk}"
}
}
override fun initContentView(savedInstanceState: Bundle?) = R.layout.activity_mints_web_view
......@@ -43,9 +48,6 @@ class MintsWebViewActivity : BaseActivity<ActivityMintsWebViewBinding, MintsWebV
binding.ctbTitle.setTitle(intent.getStringExtra("name"))
if(intent.getStringExtra("url")!=null && "" != intent.getStringExtra("url")){
binding.webview.loadUrl(intent.getStringExtra("url")?:"")
}else{
binding.webview.loadUrl("file:///android_asset/web/m.html?a=${intent.getStringExtra("longitude")}" +
"&b=${intent.getStringExtra("latitude")}&c=1")//加载asset文件夹下html
}
binding.webview.webViewClient = object : WebViewClient() {
......
<?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"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<com.github.lzyzsd.jsbridge.BridgeWebView
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:paddingBottom="40dp"
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="400dp"
android:layout_height="0dp"
/>
<Button
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:id="@+id/click"
android:layout_width="wrap_content"
android:layout_height="100dp"
android:text="点击"
/>
</LinearLayout>
<com.mints.street.widget.ScrollLayout
android:id="@+id/scroll_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#00000000"
android:fillViewport="true"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="0dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/cursor_bg"
android:gravity="center_horizontal"
android:paddingBottom="10dp"
android:orientation="vertical">
<ImageView
android:id="@+id/image_under"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp"
android:src="@mipmap/icon_content_back"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.coorchice.library.SuperTextView
android:id="@+id/stb_bg_search"
android:layout_width="match_parent"
android:layout_height="37dp"
android:layout_marginEnd="10dp"
android:layout_marginStart="10dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/image_under"
app:stv_corner="20dp"
app:stv_solid="#F5F9FA"
app:stv_stroke_color="#ffe1e1e1"
app:stv_stroke_width="1dp"
/>
<ImageView
android:layout_marginStart="16dp"
android:id="@+id/im_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/search_icon"
app:layout_constraintBottom_toBottomOf="@id/stb_bg_search"
app:layout_constraintStart_toStartOf="@id/stb_bg_search"
app:layout_constraintTop_toTopOf="@id/stb_bg_search" />
<View
android:background="#A1A3AF"
android:layout_width="0.5dp"
android:layout_height="14dp"
android:layout_marginStart="16dp"
app:layout_constraintBottom_toBottomOf="@id/stb_bg_search"
app:layout_constraintStart_toEndOf="@id/im_search"
app:layout_constraintTop_toTopOf="@id/stb_bg_search" />
<TextView
android:layout_marginStart="27dp"
app:layout_constraintBottom_toBottomOf="@id/stb_bg_search"
app:layout_constraintStart_toEndOf="@id/im_search"
app:layout_constraintTop_toTopOf="@id/stb_bg_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="搜索境内、境外地址"
android:textColor="#A2A4B1"
android:textSize="14sp" />
</androidx.constraintlayout.widget.ConstraintLayout>
<com.mints.street.widget.ScrollRecyclerView
android:background="@color/white"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:itemBinding="@{viewModel.addressItemBinding}"
app:items="@{viewModel.addressList}"
tools:listitem="@layout/item_home_button">
</com.mints.street.widget.ScrollRecyclerView>
</com.mints.street.widget.ScrollLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<data>
<variable
name="viewModel"
type="com.mints.street.main.googlemap.GoogleMapViewModel" />
type="com.mints.street.main.home.HomeViewModel" />
</data>
</layout>
\ No newline at end of file
......@@ -33,13 +33,13 @@
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>
<com.mints.street.widget.RatingStar
android:layout_marginStart="10dp"
android:layout_width="60dp"
android:layout_height="10dp"
app:starNormal="@mipmap/star_icon"
app:starNumber="5"
/>
</LinearLayout>
</layout>
\ No newline at end of file
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