添加网约车小巴初步实现
This commit is contained in:
6
.idea/gradle.xml
generated
6
.idea/gradle.xml
generated
@@ -12,6 +12,11 @@
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/OCH" />
|
||||
<option value="$PROJECT_DIR$/OCH/mogo-och" />
|
||||
<option value="$PROJECT_DIR$/OCH/mogo-och-bus" />
|
||||
<option value="$PROJECT_DIR$/OCH/mogo-och-noop" />
|
||||
<option value="$PROJECT_DIR$/OCH/mogo-och-taxi" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
<option value="$PROJECT_DIR$/app2" />
|
||||
<option value="$PROJECT_DIR$/foudations" />
|
||||
@@ -84,6 +89,7 @@
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
<option name="useQualifiedModuleNames" value="true" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
@@ -39,15 +39,21 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
|
||||
implementation rootProject.ext.dependencies.rxjava
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
implementation rootProject.ext.dependencies.mogooch
|
||||
implementation rootProject.ext.dependencies.mogoutils
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
} else {
|
||||
implementation project(":OCH:mogo-och")
|
||||
implementation project(":foudations:mogo-utils")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(":modules:mogo-module-common")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.mogo.och.bus;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.och.IMogoOCH;
|
||||
import com.mogo.och.OCHConstants;
|
||||
import com.mogo.och.bus.bean.OchBusStation;
|
||||
import com.mogo.och.bus.fragment.OchBusFragment;
|
||||
import com.mogo.service.connection.IMogoOnMessageListener;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网约车小巴业务实现入口
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
@Route(path = OCHConstants.PATH)
|
||||
public class OchBusProvider implements IMogoOCH {
|
||||
private static final String TAG = "OchBusProvider";
|
||||
private OchBusFragment busFragment;
|
||||
private int containerId;
|
||||
private FragmentActivity activity;
|
||||
|
||||
@Override
|
||||
public void init(FragmentActivity activity, int containerId) {
|
||||
this.containerId = containerId;
|
||||
this.activity = activity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi().registerStatusChangedListener("OchBus", StatusDescriptor.VR_MODE, statusChangedListener);
|
||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi().registerStatusChangedListener("OchBus", StatusDescriptor.TOP_VIEW, statusChangedListener);
|
||||
MogoApisHandler.getInstance().getApis().getSocketManagerApi(context).registerOnMessageListener(401017,messageListener);
|
||||
}
|
||||
|
||||
private void showFragment() {
|
||||
if (busFragment == null) {
|
||||
Logger.d(TAG,"准备add fragment======");
|
||||
busFragment = new OchBusFragment();
|
||||
activity.getSupportFragmentManager().beginTransaction().add(containerId, busFragment).commit();
|
||||
return;
|
||||
}
|
||||
Logger.d(TAG,"准备show fragment");
|
||||
activity.getSupportFragmentManager().beginTransaction().show(busFragment).commit();
|
||||
}
|
||||
|
||||
private void hideFragment() {
|
||||
if (busFragment != null) {
|
||||
Logger.d(TAG,"准备hide fragment");
|
||||
activity.getSupportFragmentManager().beginTransaction().hide(busFragment).commit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private final IMogoStatusChangedListener statusChangedListener = (descriptor, isTrue) -> {
|
||||
if (descriptor == StatusDescriptor.VR_MODE) {
|
||||
// 进入vr模式默认显示网约车小巴fragment
|
||||
if (isTrue) {
|
||||
showFragment();
|
||||
} else {
|
||||
hideFragment();
|
||||
}
|
||||
} else if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() && descriptor == StatusDescriptor.TOP_VIEW) {
|
||||
// topView进行展示时推出网约车界面,但是不隐藏整个fragment
|
||||
if (busFragment != null && isTrue) {
|
||||
busFragment.hideOchBus();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private final IMogoOnMessageListener<List<OchBusStation>> messageListener = new IMogoOnMessageListener<List<OchBusStation>>() {
|
||||
@Override
|
||||
public Class<List<OchBusStation>> target() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMsgReceived(List<OchBusStation> obj) {
|
||||
// todo 刷新界面
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.mogo.och.bus.bean;
|
||||
|
||||
/**
|
||||
* 网约车小巴路线请求参数封装
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class OchBusRoutesRequest {
|
||||
double lat;
|
||||
double lon;
|
||||
|
||||
public OchBusRoutesRequest(double lat, double lon) {
|
||||
this.lat = lat;
|
||||
this.lon = lon;
|
||||
}
|
||||
|
||||
public double getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public void setLat(double lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public double getLon() {
|
||||
return lon;
|
||||
}
|
||||
|
||||
public void setLon(double lon) {
|
||||
this.lon = lon;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.mogo.och.bus.bean;
|
||||
|
||||
import com.mogo.commons.data.BaseData;
|
||||
|
||||
/**
|
||||
* 网约车小巴路线接口请求响应结果
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class OchBusRoutesResponse extends BaseData {
|
||||
private OchBusRoutesResult result;
|
||||
|
||||
public OchBusRoutesResult getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(OchBusRoutesResult result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.mogo.och.bus.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网约车小巴路线接口返回接口数据封装
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class OchBusRoutesResult {
|
||||
private List<OchBusStation> siteData;
|
||||
|
||||
public List<OchBusStation> getSiteData() {
|
||||
return siteData;
|
||||
}
|
||||
|
||||
public void setSiteData(List<OchBusStation> siteData) {
|
||||
this.siteData = siteData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OchBusRoutesResult{" +
|
||||
"siteData=" + siteData +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.mogo.och.bus.bean;
|
||||
|
||||
/**
|
||||
* 单个网约车小巴车站信息
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class OchBusStation {
|
||||
private double distance;
|
||||
private String _id;
|
||||
private int lineId;
|
||||
private int siteId;
|
||||
private String siteName;
|
||||
private String cityCode;
|
||||
private String areaCode;
|
||||
private String areaName;
|
||||
private double lat;
|
||||
private double lon;
|
||||
private String siteDesc;
|
||||
private int siteState;
|
||||
|
||||
public double getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance(double distance) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
public String get_id() {
|
||||
return _id;
|
||||
}
|
||||
|
||||
public void set_id(String _id) {
|
||||
this._id = _id;
|
||||
}
|
||||
|
||||
public int getLineId() {
|
||||
return lineId;
|
||||
}
|
||||
|
||||
public void setLineId(int lineId) {
|
||||
this.lineId = lineId;
|
||||
}
|
||||
|
||||
public int getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public void setSiteId(int siteId) {
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public String getSiteName() {
|
||||
return siteName;
|
||||
}
|
||||
|
||||
public void setSiteName(String siteName) {
|
||||
this.siteName = siteName;
|
||||
}
|
||||
|
||||
public String getCityCode() {
|
||||
return cityCode;
|
||||
}
|
||||
|
||||
public void setCityCode(String cityCode) {
|
||||
this.cityCode = cityCode;
|
||||
}
|
||||
|
||||
public String getAreaCode() {
|
||||
return areaCode;
|
||||
}
|
||||
|
||||
public void setAreaCode(String areaCode) {
|
||||
this.areaCode = areaCode;
|
||||
}
|
||||
|
||||
public String getAreaName() {
|
||||
return areaName;
|
||||
}
|
||||
|
||||
public void setAreaName(String areaName) {
|
||||
this.areaName = areaName;
|
||||
}
|
||||
|
||||
public double getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public void setLat(double lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public double getLon() {
|
||||
return lon;
|
||||
}
|
||||
|
||||
public void setLon(double lon) {
|
||||
this.lon = lon;
|
||||
}
|
||||
|
||||
public String getSiteDesc() {
|
||||
return siteDesc;
|
||||
}
|
||||
|
||||
public void setSiteDesc(String siteDesc) {
|
||||
this.siteDesc = siteDesc;
|
||||
}
|
||||
|
||||
public int getSiteState() {
|
||||
return siteState;
|
||||
}
|
||||
|
||||
public void setSiteState(int siteState) {
|
||||
this.siteState = siteState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OchBusStation{" +
|
||||
"distance=" + distance +
|
||||
", _id='" + _id + '\'' +
|
||||
", lineId=" + lineId +
|
||||
", siteId=" + siteId +
|
||||
", siteName='" + siteName + '\'' +
|
||||
", cityCode='" + cityCode + '\'' +
|
||||
", areaCode='" + areaCode + '\'' +
|
||||
", areaName='" + areaName + '\'' +
|
||||
", lat=" + lat +
|
||||
", lon=" + lon +
|
||||
", siteDesc='" + siteDesc + '\'' +
|
||||
", siteState=" + siteState +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.mogo.och.bus.fragment;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.view.OnPreventFastClickListener;
|
||||
import com.mogo.och.bus.bean.OchBusStation;
|
||||
import com.mogo.och.bus.presenter.OchBusPresenter;
|
||||
import com.mogo.och.bus.R;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 网约车小巴界面
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class OchBusFragment extends MvpFragment<OchBusFragment, OchBusPresenter> {
|
||||
private static final String TAG = "OchBusFragment";
|
||||
private Group groupOchBus;
|
||||
private List<OchBusStation> stationList;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.fragment_och_bus;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews() {
|
||||
groupOchBus = findViewById(R.id.groupOchBus);
|
||||
findViewById(R.id.btnEnterOchBus).setOnClickListener(new OnPreventFastClickListener() {
|
||||
@Override
|
||||
public void onClickImpl(View v) {
|
||||
showOchBus();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected OchBusPresenter createPresenter() {
|
||||
return new OchBusPresenter(this);
|
||||
}
|
||||
|
||||
public void showOchBus() {
|
||||
MogoApisHandler.getInstance().getApis().getTopViewManager().removeAllViewInVrMode();
|
||||
groupOchBus.setVisibility(View.VISIBLE);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
queryStationListIfNecessary();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHiddenChanged(boolean hidden) {
|
||||
super.onHiddenChanged(hidden);
|
||||
Logger.d(TAG, "onHiddenChanged: " + hidden);
|
||||
if (!hidden) {
|
||||
// 判断是否需要请求接口
|
||||
queryStationListIfNecessary();
|
||||
}
|
||||
}
|
||||
|
||||
public void refreshBusStations(List<OchBusStation> busStationList) {
|
||||
if (busStationList == null) {
|
||||
// todo 获取小巴数据失败
|
||||
}else{
|
||||
// todo 渲染小巴路线数据
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void hideOchBus() {
|
||||
groupOchBus.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private void queryStationListIfNecessary(){
|
||||
if (stationList == null || stationList.isEmpty()) {
|
||||
mPresenter.queryBusRoutes();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.mogo.och.bus.net;
|
||||
|
||||
import com.mogo.och.bus.bean.OchBusRoutesResponse;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
import okhttp3.RequestBody;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.Headers;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
/**
|
||||
* 小巴车相关接口
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public interface IOchBusApiService {
|
||||
|
||||
/**
|
||||
* 根据车机坐标获取所在区域全部站点信息
|
||||
* <p>
|
||||
* wiki: http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=48970072
|
||||
*
|
||||
* @param requestBody 请求参数
|
||||
* @return 接口返回数据
|
||||
*/
|
||||
@Headers({"Content-Type:application/json;charset=UTF-8"})
|
||||
@POST("/yycp-onlinecar-hailing/onlineCarHailing/site/querySiteByCoordinate/v1")
|
||||
Observable<OchBusRoutesResponse> querySiteByCoordinate(@Body RequestBody requestBody);
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.mogo.och.bus.presenter;
|
||||
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.commons.network.SubscribeImpl;
|
||||
import com.mogo.map.location.MogoLocation;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.constants.HostConst;
|
||||
import com.mogo.och.bus.bean.OchBusRoutesRequest;
|
||||
import com.mogo.och.bus.bean.OchBusRoutesResponse;
|
||||
import com.mogo.och.bus.fragment.OchBusFragment;
|
||||
import com.mogo.och.bus.net.IOchBusApiService;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.RequestOptions;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
/**
|
||||
* 网约车小巴
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class OchBusPresenter extends Presenter<OchBusFragment> {
|
||||
private static final String TAG = "OchBusPresenter";
|
||||
public OchBusPresenter(OchBusFragment view) {
|
||||
super(view);
|
||||
}
|
||||
|
||||
public void queryBusRoutes() {
|
||||
double lat = 0;
|
||||
double lon = 0;
|
||||
MogoLocation lastLocation = MogoApisHandler.getInstance().getApis().getMapServiceApi().getSingletonLocationClient(getContext()).getLastKnowLocation();
|
||||
if (lastLocation != null) {
|
||||
lat = lastLocation.getLatitude();
|
||||
lon = lastLocation.getLongitude();
|
||||
}
|
||||
OchBusRoutesRequest request = new OchBusRoutesRequest(lat,lon);
|
||||
RequestBody requestBody = RequestBody.create(MediaType.get("application/json"), GsonUtil.jsonFromObject(request));
|
||||
MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(IOchBusApiService.class, HostConst.HAILING_HOST)
|
||||
.querySiteByCoordinate(requestBody)
|
||||
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SubscribeImpl<OchBusRoutesResponse>(RequestOptions.create(getContext())) {
|
||||
|
||||
@Override
|
||||
public void onSuccess(OchBusRoutesResponse o) {
|
||||
super.onSuccess(o);
|
||||
Logger.d(TAG, "获取到小巴路线数据: " + o);
|
||||
if (mView != null) {
|
||||
mView.refreshBusStations(o.getResult().getSiteData());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
super.onError(e);
|
||||
Logger.e(TAG,e,"获取小巴路线图失败");
|
||||
if (mView != null) {
|
||||
mView.refreshBusStations(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String message, int code) {
|
||||
super.onError(message, code);
|
||||
Logger.e(TAG, "获取小巴路线失败 code: " + code + " msg: " + message);
|
||||
if (mView != null) {
|
||||
mView.refreshBusStations(null);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
30
OCH/mogo-och-bus/src/main/res/layout/fragment_och_bus.xml
Normal file
30
OCH/mogo-och-bus/src/main/res/layout/fragment_och_bus.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/btnEnterOchBus"
|
||||
android:text="进入网约车小巴"
|
||||
android:textSize="40sp"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="600px"
|
||||
android:layout_height="300px"
|
||||
android:background="#0f0"
|
||||
android:id="@+id/vBusRoute"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"/>
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/groupOchBus"
|
||||
app:constraint_referenced_ids="vBusRoute" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -96,7 +96,7 @@ public class MogoHttpDns implements IMogoHttpDns, HttpDns, OnAddressChangedListe
|
||||
public HttpDnsSimpleLocation getCurrentLocation() {
|
||||
HttpSimpleLocation simpleLocation = locationChanged.getLocation();
|
||||
if (simpleLocation != null) {
|
||||
return new HttpDnsSimpleLocation("0734", simpleLocation.getLat(), simpleLocation.getLon());
|
||||
return new HttpDnsSimpleLocation(simpleLocation.getCityCode(), simpleLocation.getLat(), simpleLocation.getLon());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ public class HostConst {
|
||||
public static final String STRATEGY_PUSH_HOST = "http://dzt-strategyPush.zhidaozhixing.com";
|
||||
public static final String TRAVEL_CONDITION_HOST = "http://dzt-travelCondition.zhidaozhixing.com";
|
||||
public static final String TMC_HOST = "http://dzt-tmcServer.zhidaozhixing.com";
|
||||
public static final String HAILING_HOST = "http://dzt-hailing.zhidaozhixing.com";
|
||||
|
||||
public static final String IM_SOCKET_DOMAIN = "dzt-im.zhidaozhixing.com";
|
||||
public static final String WEBSOCKET_DOMAIN = "dzt-Instant.zhidaozhixing.com";
|
||||
|
||||
@@ -467,6 +467,8 @@ public class TopViewAnimHelper {
|
||||
|
||||
/**
|
||||
* 用于和{@link TopViewNoLinkageAnimHelper}互斥显示
|
||||
*
|
||||
* 网约车新增与网约车界面互斥
|
||||
*/
|
||||
public void removeAllViewExceptVrNav() {
|
||||
Logger.d(TAG, "remove all view except vr nav");
|
||||
|
||||
@@ -141,4 +141,14 @@ public class TopViewManager implements IMogoTopViewManager {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeAllViewInVrMode() {
|
||||
try {
|
||||
TopViewAnimHelper.getInstance().removeAllViewExceptVrNav();
|
||||
TopViewNoLinkageAnimHelper.getInstance().removeAllView();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -315,7 +315,7 @@
|
||||
android:id="@+id/groupTopViewDebug"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:visibility="visible"
|
||||
app:constraint_referenced_ids="btnShowDrawableTipNoSize,btnShowDrawableTip,btnShowTextTip,btnDebugCtrlNaviView,btnDebugCtrlSubView,btnDebugCtrlTopView,btnDebugAddBottomLayerView" />
|
||||
|
||||
<include
|
||||
|
||||
@@ -124,4 +124,9 @@ public interface IMogoTopViewManager extends IProvider {
|
||||
* @return true-已经添加 false-未添加
|
||||
*/
|
||||
boolean isViewNoLinkageAdded(View view);
|
||||
|
||||
/**
|
||||
* 在vr模式下,隐藏所有topview,除了vr模式下的导航信息
|
||||
*/
|
||||
void removeAllViewInVrMode();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user