Merge branch 'feature/v1.0.0' of gitlab.zhidaoauto.com:ecos/yycp-service/Launcher into feature/v1.0.0
This commit is contained in:
1
.idea/.name
generated
Normal file
1
.idea/.name
generated
Normal file
@@ -0,0 +1 @@
|
||||
MogoLauncher
|
||||
@@ -495,6 +495,15 @@ public class AMapNaviViewWrapper implements IMogoMapView,
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public MogoLatLng getTarget() {
|
||||
try {
|
||||
return ObjectUtils.fromAMap( mMapView.getMap().getCameraPosition().target );
|
||||
} catch ( Exception e ) {
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPointToCenter( double mapCenterX, double mapCenterY ) {
|
||||
if ( checkAMapView() ) {
|
||||
|
||||
@@ -130,6 +130,13 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public MogoLatLng getTarget() {
|
||||
if ( mClient != null ) {
|
||||
return mClient.getCameraSouthWestPosition();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPointToCenter( double mapCenterX, double mapCenterY ) {
|
||||
if ( mClient != null ) {
|
||||
|
||||
@@ -94,4 +94,5 @@ public interface IMogoNavi {
|
||||
* 清除规划的路线
|
||||
*/
|
||||
void clearCalculatePaths();
|
||||
|
||||
}
|
||||
|
||||
@@ -88,6 +88,13 @@ public interface IMogoMapUIController {
|
||||
*/
|
||||
MogoLatLng getCameraSouthWestPosition();
|
||||
|
||||
/**
|
||||
* 获取视图中心点坐标
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
MogoLatLng getTarget();
|
||||
|
||||
/**
|
||||
* 设置地图中心点
|
||||
*
|
||||
|
||||
@@ -21,9 +21,9 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
|
||||
public static MogoMapUIController getInstance() {
|
||||
if ( sInstance == null ) {
|
||||
synchronized ( MogoMapUIController.class ) {
|
||||
if ( sInstance == null ) {
|
||||
if (sInstance == null) {
|
||||
synchronized (MogoMapUIController.class) {
|
||||
if (sInstance == null) {
|
||||
sInstance = new MogoMapUIController();
|
||||
}
|
||||
}
|
||||
@@ -36,64 +36,64 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrafficEnabled( boolean visible ) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.setTrafficEnabled( visible );
|
||||
public void setTrafficEnabled(boolean visible) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.setTrafficEnabled(visible);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeZoom( boolean zoom ) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.changeZoom( zoom );
|
||||
public void changeZoom(boolean zoom) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.changeZoom(zoom);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeZoom( float zoom ) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.changeZoom( zoom );
|
||||
public void changeZoom(float zoom) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.changeZoom(zoom);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeMapMode( EnumMapUI mode ) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.changeMapMode( mode );
|
||||
public void changeMapMode(EnumMapUI mode) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.changeMapMode(mode);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void moveToCenter( MogoLatLng latLng ) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.moveToCenter( latLng );
|
||||
public void moveToCenter(MogoLatLng latLng) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.moveToCenter(latLng);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showMyLocation( boolean visible ) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.showMyLocation( visible );
|
||||
public void showMyLocation(boolean visible) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.showMyLocation(visible);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void recoverLockMode() {
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.recoverLockMode();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayOverview() {
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.displayOverview();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getScalePerPixel() {
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.getScalePerPixel();
|
||||
}
|
||||
return 0;
|
||||
@@ -101,7 +101,7 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
|
||||
@Override
|
||||
public float getZoomLevel() {
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.getZoomLevel();
|
||||
}
|
||||
return 0;
|
||||
@@ -109,7 +109,7 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
|
||||
@Override
|
||||
public MogoLatLng getCameraNorthEastPosition() {
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.getCameraNorthEastPosition();
|
||||
}
|
||||
return null;
|
||||
@@ -117,16 +117,23 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
|
||||
@Override
|
||||
public MogoLatLng getCameraSouthWestPosition() {
|
||||
if ( mDelegate != null ) {
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.getCameraSouthWestPosition();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public MogoLatLng getTarget() {
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.getTarget();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPointToCenter( double mapCenterX, double mapCenterY ) {
|
||||
if ( mDelegate != null ) {
|
||||
mDelegate.setPointToCenter( mapCenterX, mapCenterY );
|
||||
public void setPointToCenter(double mapCenterX, double mapCenterY) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.setPointToCenter(mapCenterX, mapCenterY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,34 +7,41 @@ import java.io.Serializable;
|
||||
@SuppressWarnings("unused")
|
||||
public class MarkerShareMusic implements Serializable {
|
||||
|
||||
|
||||
private Long id;
|
||||
|
||||
private Long likeNumber;
|
||||
|
||||
private String bookInfo;
|
||||
private long id;
|
||||
private int likeNumber;
|
||||
private MarkerLocation location;
|
||||
|
||||
private String musicName;
|
||||
|
||||
private String mediaId;
|
||||
private String mediaImg;
|
||||
private String mediaName;
|
||||
private String mediaSinger;
|
||||
private String mediaUrl;
|
||||
private String shareContentText;
|
||||
|
||||
private int shareType;
|
||||
private String type;
|
||||
|
||||
private MarkerUserInfo userInfo;
|
||||
|
||||
public Long getId() {
|
||||
public String getBookInfo() {
|
||||
return bookInfo;
|
||||
}
|
||||
|
||||
public void setBookInfo(String bookInfo) {
|
||||
this.bookInfo = bookInfo;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getLikeNumber() {
|
||||
public int getLikeNumber() {
|
||||
return likeNumber;
|
||||
}
|
||||
|
||||
public void setLikeNumber(Long likeNumber) {
|
||||
public void setLikeNumber(int likeNumber) {
|
||||
this.likeNumber = likeNumber;
|
||||
}
|
||||
|
||||
@@ -46,12 +53,44 @@ public class MarkerShareMusic implements Serializable {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public String getMusicName() {
|
||||
return musicName;
|
||||
public String getMediaId() {
|
||||
return mediaId;
|
||||
}
|
||||
|
||||
public void setMusicName(String musicName) {
|
||||
this.musicName = musicName;
|
||||
public void setMediaId(String mediaId) {
|
||||
this.mediaId = mediaId;
|
||||
}
|
||||
|
||||
public String getMediaImg() {
|
||||
return mediaImg;
|
||||
}
|
||||
|
||||
public void setMediaImg(String mediaImg) {
|
||||
this.mediaImg = mediaImg;
|
||||
}
|
||||
|
||||
public String getMediaName() {
|
||||
return mediaName;
|
||||
}
|
||||
|
||||
public void setMediaName(String mediaName) {
|
||||
this.mediaName = mediaName;
|
||||
}
|
||||
|
||||
public String getMediaSinger() {
|
||||
return mediaSinger;
|
||||
}
|
||||
|
||||
public void setMediaSinger(String mediaSinger) {
|
||||
this.mediaSinger = mediaSinger;
|
||||
}
|
||||
|
||||
public String getMediaUrl() {
|
||||
return mediaUrl;
|
||||
}
|
||||
|
||||
public void setMediaUrl(String mediaUrl) {
|
||||
this.mediaUrl = mediaUrl;
|
||||
}
|
||||
|
||||
public String getShareContentText() {
|
||||
@@ -62,6 +101,14 @@ public class MarkerShareMusic implements Serializable {
|
||||
this.shareContentText = shareContentText;
|
||||
}
|
||||
|
||||
public int getShareType() {
|
||||
return shareType;
|
||||
}
|
||||
|
||||
public void setShareType(int shareType) {
|
||||
this.shareType = shareType;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
@@ -81,11 +128,17 @@ public class MarkerShareMusic implements Serializable {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MarkerShareMusic{" +
|
||||
"id=" + id +
|
||||
"bookInfo='" + bookInfo + '\'' +
|
||||
", id=" + id +
|
||||
", likeNumber=" + likeNumber +
|
||||
", location=" + location +
|
||||
", musicName='" + musicName + '\'' +
|
||||
", mediaId='" + mediaId + '\'' +
|
||||
", mediaImg='" + mediaImg + '\'' +
|
||||
", mediaName='" + mediaName + '\'' +
|
||||
", mediaSinger='" + mediaSinger + '\'' +
|
||||
", mediaUrl='" + mediaUrl + '\'' +
|
||||
", shareContentText='" + shareContentText + '\'' +
|
||||
", shareType=" + shareType +
|
||||
", type='" + type + '\'' +
|
||||
", userInfo=" + userInfo +
|
||||
'}';
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<!--调试用,暂时开启LAUNCHER这个属性-->
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.LAUNCHER_APP" />
|
||||
<category android:name="android.intent.category.HOME" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<!-- <category android:name="android.intent.category.LAUNCHER_APP" />-->
|
||||
<!-- <category android:name="android.intent.category.HOME" />-->
|
||||
<!-- <category android:name="android.intent.category.DEFAULT" />-->
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
@@ -1,21 +1,29 @@
|
||||
package com.mogo.module.navi.constants
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.StatusBarManager
|
||||
import android.content.Context
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.map.marker.IMogoMarkerManager
|
||||
import com.mogo.map.navi.IMogoNavi
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController
|
||||
import com.mogo.service.MogoServicePaths
|
||||
import com.mogo.service.fragmentmanager.FragmentDescriptor
|
||||
import com.mogo.service.fragmentmanager.IMogoFragmentManager
|
||||
import com.mogo.service.map.IMogoMapService
|
||||
import com.mogo.service.module.IMogoRegisterCenter
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager
|
||||
import kotlin.isInitialized as isInitialized1
|
||||
|
||||
/**
|
||||
*@author zyz
|
||||
* 2020-01-08.
|
||||
*/
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
object SearchServiceHolder {
|
||||
|
||||
// 单例对象,要使用Application Context
|
||||
private lateinit var context: Context
|
||||
val fragmentManager:IMogoFragmentManager = ARouter.getInstance().build(
|
||||
MogoServicePaths.PATH_FRAGMENT_MANAGER
|
||||
).navigation() as IMogoFragmentManager
|
||||
@@ -25,8 +33,16 @@ object SearchServiceHolder {
|
||||
val listenerCenter:IMogoRegisterCenter = ARouter.getInstance().build(
|
||||
MogoServicePaths.PATH_REGISTER_CENTER
|
||||
).navigation() as IMogoRegisterCenter
|
||||
val statusManager:IMogoStatusManager = ARouter.getInstance().build(
|
||||
MogoServicePaths.PATH_STATUS_MANAGER
|
||||
).navigation() as IMogoStatusManager
|
||||
|
||||
|
||||
|
||||
fun init(context: Context){
|
||||
this.context=context
|
||||
}
|
||||
|
||||
fun push(
|
||||
fragment: Fragment,
|
||||
tag: String
|
||||
@@ -39,8 +55,18 @@ object SearchServiceHolder {
|
||||
}
|
||||
|
||||
|
||||
fun getNavi(context: Context):IMogoNavi{
|
||||
fun getNavi():IMogoNavi{
|
||||
return mapService.getNavi(context)
|
||||
}
|
||||
|
||||
fun getMapUIController(): IMogoMapUIController {
|
||||
return mapService.mapUIController
|
||||
}
|
||||
|
||||
|
||||
|
||||
fun getMarkerManger():IMogoMarkerManager{
|
||||
return mapService.getMarkerManager(context)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,6 +10,8 @@ import androidx.annotation.IdRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.navi.constants.SearchServiceHolder;
|
||||
import com.mogo.utils.NetworkUtils;
|
||||
|
||||
/**
|
||||
@@ -70,4 +72,13 @@ public abstract class BaseFragment extends Fragment {
|
||||
Toast.makeText( mContext, msg, Toast.LENGTH_LONG ).show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void setMarkerStatus(boolean show){
|
||||
SearchServiceHolder.INSTANCE.getStatusManager().setSearchUIShow(
|
||||
MogoModulePaths.PATH_FRAGMENT_SEARCH_CATEGORY, show
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ import com.mogo.module.navi.bean.SearchPoi
|
||||
import com.mogo.module.navi.constants.SearchServiceHolder
|
||||
import com.mogo.module.navi.ui.adapter.SearchCategoryAdapter
|
||||
import kotlinx.android.synthetic.main.fragment_search_category.cv_search_result
|
||||
import kotlinx.android.synthetic.main.fragment_search_category.rv_search_result
|
||||
import kotlinx.android.synthetic.main.fragment_search_category.tv_navi_navi
|
||||
import kotlinx.android.synthetic.main.fragment_setting_address.rv_search_result
|
||||
import kotlinx.android.synthetic.main.include_search_bar.et_navi_search
|
||||
import kotlinx.android.synthetic.main.include_search_bar.iv_navi_back
|
||||
|
||||
@@ -28,6 +28,9 @@ class CategorySearchFragment : BaseSearchFragment() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
category=arguments?.getString("category")
|
||||
SearchServiceHolder.statusManager.setSearchUIShow(
|
||||
MogoModulePaths.PATH_FRAGMENT_SEARCH_CATEGORY, false
|
||||
)
|
||||
}
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.fragment_search_category
|
||||
@@ -83,6 +86,13 @@ class CategorySearchFragment : BaseSearchFragment() {
|
||||
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
SearchServiceHolder.statusManager.setSearchUIShow(
|
||||
MogoModulePaths.PATH_FRAGMENT_SEARCH_CATEGORY, false
|
||||
)
|
||||
}
|
||||
|
||||
companion object{
|
||||
fun newInstance( category:String):Fragment{
|
||||
var bundle = Bundle()
|
||||
|
||||
@@ -40,12 +40,12 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener {
|
||||
}
|
||||
|
||||
override fun onCalculateSuccess() {
|
||||
var calculatedStrategies = SearchServiceHolder.getNavi(activity!!)
|
||||
var calculatedStrategies = SearchServiceHolder.getNavi()
|
||||
.calculatedStrategies
|
||||
|
||||
if (calculatedStrategies != null&&calculatedStrategies.size>0) {
|
||||
if (calculatedStrategies != null && calculatedStrategies.size > 0) {
|
||||
mAdapter.setDatas(calculatedStrategies)
|
||||
mAdapter.selectTag=calculatedStrategies[0].tagId
|
||||
mAdapter.selectTag = calculatedStrategies[0].tagId
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,6 +61,9 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
mogoTip = arguments?.getParcelable<MogoTip>(AMapConstants.KEY_PARCELABLE)
|
||||
SearchServiceHolder.statusManager.setSearchUIShow(
|
||||
MogoModulePaths.PATH_FRAGMENT_CHOOSE_PAHT, true
|
||||
)
|
||||
}
|
||||
|
||||
override fun onViewCreated(
|
||||
@@ -70,14 +73,15 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
iv_navi_back.setOnClickListener {
|
||||
SearchServiceHolder.fragmentManager.pop()
|
||||
SearchServiceHolder.getNavi(context!!).clearCalculatePaths()
|
||||
SearchServiceHolder.getNavi()
|
||||
.clearCalculatePaths()
|
||||
}
|
||||
|
||||
tv_navi_navi.text = getString(R.string.start_navi)
|
||||
|
||||
et_navi_search.setText(getString(R.string.choose_path))
|
||||
et_navi_search.isEnabled = false
|
||||
SearchServiceHolder.getNavi(context!!)
|
||||
SearchServiceHolder.getNavi()
|
||||
.naviTo(mogoTip?.point)
|
||||
|
||||
SearchServiceHolder.listenerCenter.registerMogoNaviListener(
|
||||
@@ -91,12 +95,11 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener {
|
||||
|
||||
rv_search_result.adapter = mAdapter
|
||||
tv_navi_navi.setOnClickListener {
|
||||
SearchServiceHolder.fragmentManager.clearAll()
|
||||
SearchServiceHolder.getNavi(activity!!)
|
||||
SearchServiceHolder.getNavi()
|
||||
.startNavi(false)
|
||||
}
|
||||
|
||||
SearchServiceHolder.getNavi(context!!)
|
||||
SearchServiceHolder.getNavi()
|
||||
.setLineClickInteraction {
|
||||
mAdapter.setSelectTag(it)
|
||||
}
|
||||
@@ -104,11 +107,21 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener {
|
||||
mAdapter.setOnClickListener {
|
||||
var item = it.getTag(R.id.tag_item) as MogoCalculatePath
|
||||
mAdapter.setSelectTag(item.tagId)
|
||||
SearchServiceHolder.getNavi(context!!)
|
||||
SearchServiceHolder.getNavi()
|
||||
.itemClickInteraction.onItemClicked(item.tagId)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
SearchServiceHolder.listenerCenter.unregisterMogoNaviListener(
|
||||
MogoModulePaths.PATH_FRAGMENT_CHOOSE_PAHT
|
||||
)
|
||||
SearchServiceHolder.statusManager.setSearchUIShow(
|
||||
MogoModulePaths.PATH_FRAGMENT_CHOOSE_PAHT, false
|
||||
)
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun newInstance(searchPoi: MogoTip): Fragment {
|
||||
var bundle = Bundle()
|
||||
|
||||
@@ -81,6 +81,7 @@ public class SearchFragment extends BaseSearchFragment implements SearchView, Vi
|
||||
@Override
|
||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
SearchServiceHolder.INSTANCE.init(getActivity().getApplicationContext());
|
||||
}
|
||||
|
||||
@Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
|
||||
@@ -1,52 +1,46 @@
|
||||
package com.mogo.module.navi.ui.setting
|
||||
|
||||
import android.graphics.BitmapFactory
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.map.search.inputtips.MogoTip
|
||||
import com.mogo.map.marker.MogoMarkerOptions
|
||||
import com.mogo.module.common.MogoModulePaths
|
||||
import com.mogo.module.navi.R
|
||||
import com.mogo.module.navi.bean.SearchPoi
|
||||
import com.mogo.module.navi.constants.AMapConstants
|
||||
import com.mogo.module.navi.constants.SearchServiceHolder
|
||||
import com.mogo.module.navi.ui.adapter.SearchPoiAdapter
|
||||
import com.mogo.module.navi.ui.base.BaseFragment
|
||||
import com.mogo.module.navi.ui.search.BaseSearchFragment
|
||||
import kotlinx.android.synthetic.main.fragment_navi_setting.iv_back
|
||||
import kotlinx.android.synthetic.main.include_search_bar.iv_navi_back
|
||||
import kotlinx.android.synthetic.main.fragment_setting_address.group_set_address
|
||||
import kotlinx.android.synthetic.main.fragment_setting_address.rv_search_result
|
||||
import kotlinx.android.synthetic.main.fragment_setting_address.tv_navi_choose_point
|
||||
import kotlinx.android.synthetic.main.fragment_setting_address.tv_navi_my_location
|
||||
import kotlinx.android.synthetic.main.fragment_setting_address.tv_set_as_home
|
||||
import kotlinx.android.synthetic.main.include_search_bar.et_navi_search
|
||||
import kotlinx.android.synthetic.main.include_search_bar.iv_navi_back
|
||||
|
||||
/**
|
||||
* @author zyz
|
||||
* 2020-01-07.
|
||||
*/
|
||||
@Route(path = MogoModulePaths.PATH_FRAGMENT_SETTING_HOME)
|
||||
class SettingAddressFragment : BaseSearchFragment() {
|
||||
override fun renderSearchPoiResult(
|
||||
datums: MutableList<MogoTip>?,
|
||||
showDelete: Boolean
|
||||
) {
|
||||
mAdapter.setDatas(datums)
|
||||
group_set_address.visibility = View.GONE
|
||||
rv_search_result.visibility = View.VISIBLE
|
||||
|
||||
}
|
||||
|
||||
override fun showHistory(datums: MutableList<SearchPoi>?) {
|
||||
}
|
||||
class SettingAddressFragment : BaseFragment() {
|
||||
// override fun renderSearchPoiResult(
|
||||
// datums: MutableList<MogoTip>?,
|
||||
// showDelete: Boolean
|
||||
// ) {
|
||||
// mAdapter.setDatas(datums)
|
||||
// group_set_address.visibility = View.GONE
|
||||
// rv_search_result.visibility = View.VISIBLE
|
||||
//
|
||||
// }
|
||||
//
|
||||
// override fun showHistory(datums: MutableList<SearchPoi>?) {
|
||||
// }
|
||||
|
||||
private val TAG:String="SettingAddressFragment"
|
||||
private var style: Int = 0
|
||||
private lateinit var mAdapter: SearchPoiAdapter
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
style = arguments?.getInt(AMapConstants.KEY_SET_HOME_COMPONY) ?: 0
|
||||
setMarkerStatus(true)
|
||||
SearchServiceHolder.getMapUIController().showMyLocation(false)
|
||||
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
@@ -61,9 +55,7 @@ class SettingAddressFragment : BaseSearchFragment() {
|
||||
return style == 1
|
||||
}
|
||||
|
||||
fun isSearch(): Boolean {
|
||||
return group_set_address.visibility == View.GONE
|
||||
}
|
||||
|
||||
|
||||
override fun onViewCreated(
|
||||
view: View,
|
||||
@@ -78,46 +70,38 @@ class SettingAddressFragment : BaseSearchFragment() {
|
||||
tv_set_as_home.text = resources.getString(R.string.set_as_compony_navi)
|
||||
}
|
||||
|
||||
mAdapter = SearchPoiAdapter(activity, ArrayList())
|
||||
|
||||
rv_search_result.layoutManager =
|
||||
LinearLayoutManager(activity, LinearLayoutManager.VERTICAL, false)
|
||||
|
||||
rv_search_result.adapter = mAdapter
|
||||
|
||||
|
||||
iv_navi_back.setOnClickListener {
|
||||
if (group_set_address.visibility == View.VISIBLE) {
|
||||
SearchServiceHolder.fragmentManager.pop()
|
||||
} else {
|
||||
reset()
|
||||
}
|
||||
SearchServiceHolder.fragmentManager.pop()
|
||||
}
|
||||
|
||||
var target = SearchServiceHolder.getMapUIController()
|
||||
.target
|
||||
|
||||
var decodeResource = BitmapFactory.decodeResource(resources, R.mipmap.icon_choose_position)
|
||||
val options = MogoMarkerOptions()
|
||||
.icon(decodeResource)
|
||||
.latitude(target.lat.toDouble())
|
||||
.owner(TAG)
|
||||
.longitude(target.lng.toDouble())
|
||||
var addMarker = SearchServiceHolder.getMarkerManger()
|
||||
.addMarker(MogoModulePaths.PATH_FRAGMENT_SETTING_HOME, options)
|
||||
|
||||
|
||||
tv_navi_choose_point.setOnClickListener {
|
||||
group_set_address.visibility = View.GONE
|
||||
tv_set_as_home.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
tv_navi_my_location.setOnClickListener {
|
||||
group_set_address.visibility = View.GONE
|
||||
tv_set_as_home.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun reset() {
|
||||
group_set_address.visibility = View.VISIBLE
|
||||
rv_search_result.visibility = View.GONE
|
||||
mAdapter.clear()
|
||||
et_navi_search.setText("")
|
||||
tv_set_as_home.visibility = View.GONE
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
setMarkerStatus(true)
|
||||
SearchServiceHolder.getMapUIController().showMyLocation(true)
|
||||
}
|
||||
|
||||
|
||||
companion object {
|
||||
fun newInstance(type: Int = 0): Fragment {
|
||||
|
||||
var settingAddressFragment = SettingAddressFragment()
|
||||
val bundle = Bundle()
|
||||
bundle.putInt(AMapConstants.KEY_SET_HOME_COMPONY, type)
|
||||
|
||||
@@ -121,6 +121,9 @@
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
android:layout_width="600dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/txt_large"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_navi_wash"
|
||||
android:background="@drawable/shape_round_gray"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_navi_search"
|
||||
|
||||
@@ -11,52 +11,6 @@
|
||||
|
||||
<include layout="@layout/include_search_bar" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="180dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
android:textSize="@dimen/sp_40"
|
||||
android:textColor="@color/white"
|
||||
android:paddingLeft="@dimen/dp_56"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@drawable/shape_round_gray"
|
||||
android:text="@string/my_location_search"
|
||||
android:drawablePadding="@dimen/dp_8"
|
||||
android:id="@+id/tv_navi_my_location"
|
||||
android:drawableLeft="@mipmap/icon_navi_location"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_navi_search"
|
||||
android:layout_height="@dimen/dp_120"/>
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="180dp"
|
||||
android:id="@+id/tv_navi_choose_point"
|
||||
android:textSize="@dimen/sp_40"
|
||||
app:layout_constraintLeft_toRightOf="@id/tv_navi_my_location"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_navi_my_location"
|
||||
android:textColor="@color/white"
|
||||
android:paddingLeft="@dimen/dp_56"
|
||||
android:drawablePadding="@dimen/dp_8"
|
||||
android:background="@drawable/shape_round_gray"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginLeft="@dimen/dp_32"
|
||||
android:text="@string/choose_location_search"
|
||||
android:drawableLeft="@mipmap/icon_navi_location"
|
||||
android:layout_height="@dimen/dp_120"/>
|
||||
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/group_set_address"
|
||||
app:constraint_referenced_ids="tv_navi_choose_point,tv_navi_my_location"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="@dimen/dp_266"
|
||||
android:text="@string/set_as_home_navi"
|
||||
@@ -73,16 +27,4 @@
|
||||
android:layout_height="@dimen/dp_104"/>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="@dimen/dp_838"
|
||||
android:id="@+id/rv_search_result"
|
||||
android:visibility="gone"
|
||||
android:paddingLeft="@dimen/dp_37"
|
||||
android:paddingRight="@dimen/dp_37"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
android:background="@drawable/shape_round_gray"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_navi_search"
|
||||
android:layout_height="@dimen/dp_778"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -3,4 +3,5 @@
|
||||
<dimen name="txt_normal">@dimen/sp_32</dimen>
|
||||
<dimen name="fragment_left_margin">@dimen/dp_60</dimen>
|
||||
<dimen name="txt_title">@dimen/sp_40</dimen>
|
||||
<dimen name="txt_large">25sp</dimen>
|
||||
</resources>
|
||||
@@ -24,6 +24,7 @@ import com.mogo.service.connection.IMogoOnMessageListener;
|
||||
import com.mogo.service.connection.IMogoSocketManager;
|
||||
import com.mogo.service.imageloader.IMogoImageloader;
|
||||
import com.mogo.service.map.IMogoMapService;
|
||||
import com.mogo.service.module.IMogoRegisterCenter;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.util.List;
|
||||
@@ -46,6 +47,7 @@ public class MarkerServiceHandler {
|
||||
private static IMogoNavi mNavi;
|
||||
private static IMogoMapUIController mMapUIController;
|
||||
|
||||
private static IMogoRegisterCenter mMogoRegisterCenter;
|
||||
private static IMogoImageloader mImageloader;
|
||||
private static IMogoSocketManager mMogoSocketManager;
|
||||
private static MarkerInfoWindowAdapter markerInfoWindowAdapter;
|
||||
@@ -56,6 +58,7 @@ public class MarkerServiceHandler {
|
||||
mContext = context;
|
||||
mMapService = (IMogoMapService) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICES_MAP).navigation(context);
|
||||
mImageloader = (IMogoImageloader) ARouter.getInstance().build(MogoServicePaths.PATH_UTILS_IMAGE_LOADER).navigation(context);
|
||||
mMogoRegisterCenter = (IMogoRegisterCenter) ARouter.getInstance().build(MogoServicePaths.PATH_REGISTER_CENTER).navigation(context);
|
||||
mMarkerManager = mMapService.getMarkerManager(context);
|
||||
mNavi = mMapService.getNavi(context);
|
||||
markerInfoWindowAdapter = new MarkerInfoWindowAdapter(context, getNavi(), getImageloader());
|
||||
|
||||
@@ -10,4 +10,5 @@ public class TanluConstants {
|
||||
|
||||
public static final String TAG = "/tanlu/ui";
|
||||
public static final String NAVI_INFO = "navi_info";
|
||||
public static final String MODEL_NAME = "mogo-module-tanlu";
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.map.marker.IMogoMarkerManager;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.map.model.MogoPoi;
|
||||
import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.map.navi.MogoNaviInfo;
|
||||
import com.mogo.map.search.geo.MogoPoiItem;
|
||||
import com.mogo.map.search.poisearch.IMogoPoiSearchListener;
|
||||
import com.mogo.map.search.poisearch.MogoPoiResult;
|
||||
@@ -36,6 +38,8 @@ import com.mogo.module.common.entity.MarkerResponse;
|
||||
import com.mogo.module.tanlu.callback.AlongTheWayCallback;
|
||||
import com.mogo.module.tanlu.callback.RoadLineCallback;
|
||||
import com.mogo.module.tanlu.callback.VoiceSearchCallback;
|
||||
import com.mogo.module.tanlu.constant.HttpConst;
|
||||
import com.mogo.module.tanlu.constant.TanluConstants;
|
||||
import com.mogo.module.tanlu.model.Information;
|
||||
import com.mogo.module.tanlu.model.InformationAndLiveCarResult;
|
||||
import com.mogo.module.tanlu.model.PathLineResult;
|
||||
@@ -54,6 +58,9 @@ import com.mogo.module.tanlu.model.event.MarkerInfo;
|
||||
import com.mogo.module.tanlu.video.FullMediaActivity;
|
||||
import com.mogo.module.tanlu.video.SimpleCoverVideoPlayer;
|
||||
import com.mogo.module.tanlu.view.AutoZoomInImageView;
|
||||
import com.mogo.service.module.IMogoRegisterCenter;
|
||||
import com.mogo.service.module.ModuleType;
|
||||
import com.mogo.service.network.IMogoNetwork;
|
||||
import com.mogo.utils.TipToast;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder;
|
||||
@@ -117,6 +124,7 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
private Bitmap mMarkerIcon;
|
||||
private TanluModelData mTanluModelData;
|
||||
private List<MogoLatLng> passedByPoints;
|
||||
private IMogoRegisterCenter mMogoRegisterCenter;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -170,14 +178,61 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
EventBus.getDefault().register(this);
|
||||
mTanluModelData = new TanluModelData(getContext());
|
||||
handleRoadLineMessage();
|
||||
initMap();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 处理路线数据信息 TODO
|
||||
* 初始化导航 TODO
|
||||
*/
|
||||
private void initMap() {
|
||||
mMogoRegisterCenter = (IMogoRegisterCenter) ARouter.getInstance().build(MogoServicePaths.PATH_REGISTER_CENTER).navigation(getContext());
|
||||
mMogoRegisterCenter.registerMogoNaviListener(TanluConstants.MODEL_NAME, new IMogoNaviListener() {
|
||||
@Override
|
||||
public void onInitNaviFailure() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInitNaviSuccess() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNaviInfoUpdate(MogoNaviInfo naviinfo) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStartNavi() {
|
||||
getNavigationLineData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStopNavi() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCalculateSuccess() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onoCalculateFailed() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 处理路线数据信息,msgType TODO
|
||||
*/
|
||||
private void handleRoadLineMessage() {
|
||||
mMogoSocketManager = (IMogoSocketManager) ARouter.getInstance().build(MogoServicePaths.PATH_SOCKET_MANAGER).navigation();
|
||||
mMogoSocketManager.registerOnMessageListener(401001, new IMogoOnMessageListener<MarkerResponse>() {
|
||||
mMogoSocketManager.registerOnMessageListener(1, new IMogoOnMessageListener<MarkerResponse>() {
|
||||
@Override
|
||||
public Class<MarkerResponse> target() {
|
||||
return MarkerResponse.class;
|
||||
@@ -254,6 +309,8 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
MarkerExploreWay exploreWay = (MarkerExploreWay) marker.getObject();
|
||||
handleData(exploreWay);
|
||||
|
||||
//TODO 更新位置currentPosition
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -463,6 +520,7 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
EventBus.getDefault().unregister(this);
|
||||
getViewLifecycleOwner().getLifecycle().removeObserver(mPresenter);
|
||||
TanluServiceHandler.getLocationClient().removeLocationListener(this);
|
||||
mMogoRegisterCenter.unregisterMogoNaviListener(TanluConstants.MODEL_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -540,7 +598,6 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
Logger.d(TAG, "passedByPoints.size() ----> " + passedByPoints.size());
|
||||
MogoLatLng startLatLng = new MogoLatLng(o.getPointList().get(0).getLat(), o.getPointList().get(0).getLon());
|
||||
MogoLatLng endLatLng = new MogoLatLng(o.getPointList().get(listSize - 1).getLat(), o.getPointList().get(listSize - 1).getLon());
|
||||
|
||||
mMarkerManager.addRouteWay(getContext(), startLatLng, endLatLng, passedByPoints);
|
||||
}
|
||||
}
|
||||
@@ -582,7 +639,6 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void speakSuccessVoice(List<Information> informations, String trafficStatus) {
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.mogo.module.tanlu.view;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mogo.module.tanlu.R;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description 通用分享dialog
|
||||
* @since 2020-01-10
|
||||
*/
|
||||
public class LaucherShareDialog extends Dialog implements View.OnClickListener {
|
||||
|
||||
private TextView txtOk;
|
||||
|
||||
|
||||
public LaucherShareDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public LaucherShareDialog(@NonNull Context context, int themeResId) {
|
||||
super(context, R.style.Theme_AppCompat_Dialog);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
initView();
|
||||
initListener();
|
||||
|
||||
txtOk.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// if (onOkListener != null) {
|
||||
// onOkListener.onClick(v);
|
||||
// }
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
setContentView(R.layout.launcher_dialog_share);
|
||||
txtOk = findViewById(R.id.btn_share_title);
|
||||
|
||||
}
|
||||
|
||||
private void initListener() {
|
||||
txtOk.setOnClickListener(this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
int id = view.getId();
|
||||
if (id == R.id.btn_share_title) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void setOnOkClickListener(View.OnClickListener onOkClickListener) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void setOnCancelListener(View.OnClickListener onCancelListener) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="10dp" />
|
||||
<corners android:radius="@dimen/dp_20" />
|
||||
<solid android:color="@color/color_F8F8F8"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_share_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:layout_marginBottom="@dimen/dp_35"
|
||||
android:clickable="true"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:text="我要分享"
|
||||
android:textColor="@color/color_1F7FFF"
|
||||
android:textSize="@dimen/dp_20" />
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_below="@+id/btn_share_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_back"
|
||||
android:layout_width="@dimen/dp_55"
|
||||
android:layout_height="@dimen/dp_55"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginLeft="@dimen/dp_50"
|
||||
android:layout_marginTop="@dimen/dp_65"
|
||||
android:src="@mipmap/share_back_image" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -19,17 +19,17 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout_media"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="66dp"
|
||||
android:layout_height="@dimen/dp_132"
|
||||
android:background="@color/color_191C25"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_media_back"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="22dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:layout_marginLeft="@dimen/dp_44"
|
||||
android:layout_marginTop="@dimen/dp_36"
|
||||
android:clickable="true"
|
||||
android:src="@drawable/public_arrow_back_iv"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
@@ -37,15 +37,15 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_media_title_content"
|
||||
android:layout_width="560dp"
|
||||
android:layout_width="@dimen/dp_660"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxWidth="560dp"
|
||||
android:maxWidth="@dimen/dp_560"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="19dp"
|
||||
android:textSize="@dimen/dp_38"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -54,11 +54,11 @@
|
||||
android:id="@+id/tv_media_title_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="21dp"
|
||||
android:layout_marginRight="50dp"
|
||||
android:layout_marginTop="@dimen/dp_42"
|
||||
android:layout_marginRight="@dimen/dp_100"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13dp"
|
||||
android:textSize="@dimen/dp_26"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="330dp"
|
||||
android:layout_width="@dimen/dp_660"
|
||||
android:layout_height="@dimen/dp_660"
|
||||
android:background="@drawable/shape_bg_222533_10px">
|
||||
|
||||
<!--正常显示数据-->
|
||||
@@ -21,15 +21,15 @@
|
||||
android:id="@+id/tv_information_media_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginLeft="@dimen/dp_32"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:layout_marginRight="@dimen/dp_32"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:text="@string/main_empty_location"
|
||||
android:textColor="@color/color_3"
|
||||
android:textSize="18dp"
|
||||
android:textSize="@dimen/dp_36"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
@@ -37,12 +37,12 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tv_information_media_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginLeft="@dimen/dp_32"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:text="666KM"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="13dp"
|
||||
android:textSize="@dimen/dp_26"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
@@ -52,20 +52,20 @@
|
||||
android:layout_below="@+id/tv_information_media_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginRight="@dimen/dp_32"
|
||||
android:text="2019-10-10"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="13dp" />
|
||||
android:textSize="@dimen/dp_26" />
|
||||
</RelativeLayout>
|
||||
|
||||
<!--视频播放器和图片播放器-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/media_layout"
|
||||
android:layout_width="298dp"
|
||||
android:layout_height="177dp"
|
||||
android:layout_width="@dimen/dp_596"
|
||||
android:layout_height="@dimen/dp_355"
|
||||
android:layout_below="@+id/layout_top_view"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginLeft="@dimen/dp_32"
|
||||
android:layout_marginRight="@dimen/dp_32"
|
||||
android:background="@drawable/shape_bg_222533_9px">
|
||||
|
||||
<com.mogo.module.tanlu.video.SimpleCoverVideoPlayer
|
||||
@@ -85,40 +85,40 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/media_layout"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginBottom="21dp">
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginLeft="@dimen/dp_32"
|
||||
android:layout_marginRight="@dimen/dp_32"
|
||||
android:layout_marginBottom="@dimen/dp_42">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_previous_res"
|
||||
android:layout_width="142dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_width="@dimen/dp_284"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingLeft="40dp"
|
||||
android:paddingLeft="@dimen/dp_40"
|
||||
android:background="@drawable/shape_bg_222533"
|
||||
android:drawableLeft="@drawable/media_previous"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="10dp"
|
||||
android:drawablePadding="@dimen/dp_40"
|
||||
android:text="@string/tanlu_previous"
|
||||
android:textColor="@color/color_545362"
|
||||
android:textSize="13dp" />
|
||||
android:textSize="@dimen/dp_26" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_next_res"
|
||||
android:layout_width="142dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_width="@dimen/dp_284"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:paddingRight="40dp"
|
||||
android:paddingLeft="35dp"
|
||||
android:paddingRight="@dimen/dp_80"
|
||||
android:paddingLeft="@dimen/dp_70"
|
||||
android:background="@drawable/shape_bg_222533"
|
||||
android:drawableRight="@drawable/media_next"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/tanlu_next"
|
||||
android:textColor="@color/color_545362"
|
||||
android:textSize="13dp" />
|
||||
android:textSize="@dimen/dp_26" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -134,9 +134,9 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_main_empty"
|
||||
android:layout_width="210dp"
|
||||
android:layout_height="210dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="@dimen/dp_420"
|
||||
android:layout_height="@dimen/dp_420"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:src="@mipmap/main_view_empty_bg" />
|
||||
|
||||
<TextView
|
||||
@@ -144,10 +144,10 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/iv_main_empty"
|
||||
android:layout_marginTop="35dp"
|
||||
android:layout_marginTop="@dimen/dp_70"
|
||||
android:text="@string/main_empty_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16dp" />
|
||||
android:textSize="@dimen/dp_32" />
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,89 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="400dp"
|
||||
android:layout_height="400dp"
|
||||
android:layout_marginTop="30dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_information_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:text="@string/main_empty_location"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="22dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_distance_photo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tv_information_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginBottom="14dp"
|
||||
android:textSize="20dp" />
|
||||
|
||||
<com.mogo.module.tanlu.view.AutoZoomInImageView
|
||||
android:id="@+id/recycle_photo_imageView"
|
||||
android:layout_width="400dp"
|
||||
android:layout_height="225dp"
|
||||
android:layout_below="@+id/tv_distance_photo" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pb_loading"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:indeterminateDrawable="@drawable/loading_bg"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_enlarge"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginRight="14dp"
|
||||
android:layout_marginBottom="95dp"
|
||||
android:background="@drawable/selector_bg_btn_enlarge" />
|
||||
|
||||
<!--bottom-->
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="81dp"
|
||||
android:layout_below="@+id/recycle_photo_imageView">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/username_image_photo"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_username_photo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_toRightOf="@+id/username_image_photo"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_information_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="20dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18dp" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
@@ -33,48 +33,48 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_bottom"
|
||||
android:layout_width="380dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_width="@dimen/dp_760"
|
||||
android:layout_height="@dimen/dp_144"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:background="@drawable/shape_bg_99191c25_4px"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/progress"
|
||||
android:layout_width="330dp"
|
||||
android:layout_width="@dimen/dp_660"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:max="100"
|
||||
android:maxHeight="4dp"
|
||||
android:minHeight="4dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:maxHeight="@dimen/dp_8"
|
||||
android:minHeight="@dimen/dp_8"
|
||||
android:paddingTop="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_16"
|
||||
android:progressDrawable="@drawable/video_seek_progress"
|
||||
android:thumb="@drawable/video_seek_thumb" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fullscreen"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:scaleType="centerInside" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/start"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/loading"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_width="@dimen/dp_96"
|
||||
android:layout_height="@dimen/dp_96"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:indeterminateDrawable="@drawable/loading_bg"
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp"
|
||||
android:layout_height="@dimen/dp_72"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
android:background="@color/color_99191C25"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
@@ -50,33 +50,33 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:max="100"
|
||||
android:maxHeight="4dp"
|
||||
android:minHeight="4dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:maxHeight="@dimen/dp_4"
|
||||
android:minHeight="@dimen/dp_4"
|
||||
android:paddingTop="@dimen/dp_8"
|
||||
android:paddingBottom="@dimen/dp_8"
|
||||
android:progressDrawable="@drawable/video_seek_progress"
|
||||
android:thumb="@drawable/video_seek_thumb" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fullscreen"
|
||||
android:visibility="gone"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:scaleType="centerInside" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/start"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/loading"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_width="@dimen/dp_48"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:indeterminateDrawable="@drawable/loading_bg"
|
||||
|
||||
Reference in New Issue
Block a user