rc
@@ -64,6 +64,8 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.modulechatting
|
||||
|
||||
|
||||
implementation rootProject.ext.dependencies.moduleonlinecar
|
||||
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
api rootProject.ext.dependencies.modulemain
|
||||
api rootProject.ext.dependencies.mogocommons
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.carchatting.CallChatConstant;
|
||||
import com.mogo.module.common.MogoModule;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.onlinecar.OnLineCarConstants;
|
||||
import com.mogo.tanlu.constant.TanluConstants;
|
||||
|
||||
/**
|
||||
@@ -27,6 +28,7 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
DebugConfig.setNetMode( DebugConfig.NET_MODE_QA );
|
||||
MogoModulePaths.addModule( new MogoModule( TanluConstants.TAG, "CARD_TYPE_ROAD_CODITION" ) );
|
||||
MogoModulePaths.addModule(new MogoModule( CallChatConstant.PROVIDER, CallChatConstant.MODULE_NAME));
|
||||
MogoModulePaths.addModule(new MogoModule(OnLineCarConstants.TAG, "CARD_TYPE_ROAD_ONLINECAR"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -95,6 +95,7 @@ ext {
|
||||
mogoconnection : "com.mogo.connection:mogo-connection:${MOGO_CONNECTION_VERSION}",
|
||||
moduleextensions : "com.mogo.module:module-extensions:${MOGO_MODULE_EXTENSIONS_VERSION}",
|
||||
modulechatting : "com.mogo.module.carchatting:module-carchatting:${CARCHATTING_VERSION}",
|
||||
moduleonlinecar : "com.mogo.module:module-onlinecar:${MOGO_MODULE_ONLINECAR_VERSION}",
|
||||
|
||||
// 长链
|
||||
socketsdk : 'com.zhidao.socketsdk:socketsdk:2.1.0',
|
||||
|
||||
@@ -45,4 +45,5 @@ MOGO_MODULE_NAVI_VERSION=1.0.0-SNAPSHOT
|
||||
MOGO_MODULE_SERVICE_VERSION=1.0.0-SNAPSHOT
|
||||
MOGO_MODULE_EXTENSIONS_VERSION=1.0.0-SNAPSHOT
|
||||
CARCHATTING_VERSION=1.0.0-SNAPSHOT
|
||||
MOGO_MODULE_ONLINECAR_VERSION=1.0.0-SNAPSHOT
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.module.map;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.module.navi.ui
|
||||
|
||||
import android.app.Activity
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
@@ -7,9 +8,11 @@ import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.module.common.MogoModulePaths
|
||||
import com.mogo.module.navi.R
|
||||
import com.mogo.module.navi.ui.base.BaseActivity
|
||||
|
||||
@Route(path = MogoModulePaths.PATH_MODULE_NAV_ACTIVITY)
|
||||
class NaviActivity : AppCompatActivity() {
|
||||
class NaviActivity : BaseActivity() {
|
||||
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
@@ -18,6 +21,5 @@ class NaviActivity : AppCompatActivity() {
|
||||
.build("/navi/search")
|
||||
.navigation() as Fragment
|
||||
supportFragmentManager.beginTransaction().replace(R.id.fl_container,fragment).commitNow()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,9 +21,6 @@ public class SearchPoiAdapter extends RecycleBaseAdapter<MogoTip> {
|
||||
public SearchPoiAdapter(Context context, List<MogoTip> list) {
|
||||
super(context, list, R.layout.item_search_poi);
|
||||
}
|
||||
private OnItemClickedListener< MogoTip > mOnItemClickedListener;
|
||||
private OnItemClickedListener< MogoTip > mOnDeleteAllClickedListener;
|
||||
private OnItemClickedListener< MogoTip > mOnActionButtonClickedListener;
|
||||
private boolean mShowDelete = false;
|
||||
|
||||
private View.OnClickListener onClickListener;
|
||||
@@ -42,17 +39,7 @@ public class SearchPoiAdapter extends RecycleBaseAdapter<MogoTip> {
|
||||
public void setOnClickListener(View.OnClickListener onClickListener) {
|
||||
this.onClickListener = onClickListener;
|
||||
}
|
||||
public void setOnItemClickedListener( OnItemClickedListener< MogoTip > onItemClickedListener ) {
|
||||
this.mOnItemClickedListener = onItemClickedListener;
|
||||
}
|
||||
|
||||
public void setOnDeleteAllClickedListener( OnItemClickedListener< MogoTip > onDeleteAllClickedListener ) {
|
||||
this.mOnDeleteAllClickedListener = onDeleteAllClickedListener;
|
||||
}
|
||||
|
||||
public void setOnActionButtonClickedListener( OnItemClickedListener< MogoTip > onActionButtonClickedListener ) {
|
||||
this.mOnActionButtonClickedListener = onActionButtonClickedListener;
|
||||
}
|
||||
public void setShowDelete( boolean showDelete ) {
|
||||
this.mShowDelete = showDelete;
|
||||
}
|
||||
@@ -62,9 +49,5 @@ public class SearchPoiAdapter extends RecycleBaseAdapter<MogoTip> {
|
||||
setDatas(datums);
|
||||
//notifyDataSetChanged();
|
||||
}
|
||||
public void clear(){
|
||||
mOnItemClickedListener = null;
|
||||
mOnDeleteAllClickedListener = null;
|
||||
mOnActionButtonClickedListener = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,11 +20,14 @@ import com.mogo.map.search.inputtips.MogoTip;
|
||||
import com.mogo.module.navi.R;
|
||||
import com.mogo.module.navi.bean.EntityConvertUtils;
|
||||
import com.mogo.module.navi.bean.SearchPoi;
|
||||
import com.mogo.module.navi.database.AppDataBase;
|
||||
import com.mogo.module.navi.ui.adapter.HistoryPoiAdapter;
|
||||
import com.mogo.module.navi.ui.adapter.SearchPoiAdapter;
|
||||
import com.mogo.module.navi.ui.base.BaseFragment;
|
||||
import com.mogo.module.navi.ui.base.UiController;
|
||||
import com.mogo.utils.WindowUtils;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -50,23 +53,22 @@ public class SearchFragment extends BaseFragment implements SearchView {
|
||||
private EditText mSearchBox;
|
||||
|
||||
private RecyclerView mSearchResult;
|
||||
private RecyclerView rvHistory;
|
||||
private SearchPoiAdapter mPoiAdapter;
|
||||
private HistoryPoiAdapter mHistoryAdapter;
|
||||
|
||||
private View mMyLocation;
|
||||
private View mChoicePoint;
|
||||
private View mCurrentLocation;
|
||||
|
||||
/**
|
||||
* 设置常用地址(我的位置、选点)时的设置按钮
|
||||
*/
|
||||
private TextView mActionButton;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 地址设置是否完成
|
||||
*/
|
||||
private boolean mActionSuccess = false;
|
||||
private View rlHistory;
|
||||
private TextView tvEmpty;
|
||||
|
||||
@Override
|
||||
public void onAttach(Context context) {
|
||||
@@ -88,8 +90,54 @@ public class SearchFragment extends BaseFragment implements SearchView {
|
||||
|
||||
@Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
mSearchBox=view.findViewById(R.id.et_navi_search);
|
||||
mSearchResult=view.findViewById(R.id.rv_navi_search);
|
||||
mSearchBox = view.findViewById(R.id.et_navi_search);
|
||||
mSearchResult = view.findViewById(R.id.rv_navi_search);
|
||||
rvHistory = view.findViewById(R.id.rv_navi_history);
|
||||
rlHistory = view.findViewById(R.id.rl_navi_history);
|
||||
LinearLayoutManager linearManager =
|
||||
new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false);
|
||||
|
||||
rvHistory.setLayoutManager(linearManager);
|
||||
LinearLayoutManager linearLayoutManager =
|
||||
new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false);
|
||||
mSearchResult.setLayoutManager(linearLayoutManager);
|
||||
|
||||
mPoiAdapter= new SearchPoiAdapter(getActivity(),new ArrayList<>());
|
||||
mSearchResult.setAdapter(mPoiAdapter);
|
||||
|
||||
mHistoryAdapter= new HistoryPoiAdapter(getActivity(),new ArrayList<>());
|
||||
rvHistory.setAdapter(mHistoryAdapter);
|
||||
|
||||
tvEmpty = findViewById(R.id.tv_navi_list_empty);
|
||||
|
||||
|
||||
findViewById(R.id.iv_navi_back).setOnClickListener(new View.OnClickListener() {
|
||||
@Override public void onClick(View v) {
|
||||
getActivity().finish();
|
||||
}
|
||||
});
|
||||
|
||||
mHistoryAdapter.setOnClickListener(new View.OnClickListener() {
|
||||
@Override public void onClick(View v) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
mPoiAdapter.setOnClickListener(new View.OnClickListener() {
|
||||
@Override public void onClick(View v) {
|
||||
MogoTip tag = (MogoTip) v.getTag(R.id.tag_position);
|
||||
SearchPoi searchPoi = EntityConvertUtils.tipToPoi(tag);
|
||||
mSearchPresenter.insert(searchPoi);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
findViewById(R.id.tv_navi_history_clear).setOnClickListener(new View.OnClickListener() {
|
||||
@Override public void onClick(View v) {
|
||||
mSearchPresenter.deleteAllCachedPoi();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -179,42 +227,22 @@ public class SearchFragment extends BaseFragment implements SearchView {
|
||||
|
||||
@Override
|
||||
public void renderSearchPoiResult(List<MogoTip> datums, boolean showDelete) {
|
||||
|
||||
if (datums == null || datums.isEmpty()) {
|
||||
mSearchResult.setVisibility(View.GONE);
|
||||
} else {
|
||||
mSearchResult.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
if (mPoiAdapter == null) {
|
||||
mPoiAdapter = new SearchPoiAdapter(getContext(), datums);
|
||||
mPoiAdapter.setOnItemClickedListener(item -> {
|
||||
if (mSearchType == SearchConstants.SEARCH_TYPE_COMMON) {
|
||||
final Disposable disposable =
|
||||
mSearchPresenter.cacheSelectPoiItem(item).subscribe(output -> {
|
||||
navi2Location(EntityConvertUtils.tipToPoi(item));
|
||||
});
|
||||
mSearchPresenter.addDisposable(disposable);
|
||||
} else {
|
||||
// do nothing.
|
||||
}
|
||||
});
|
||||
mPoiAdapter.setOnDeleteAllClickedListener(NULL -> {
|
||||
mSearchPresenter.deleteAllCachedPoi();
|
||||
});
|
||||
|
||||
mPoiAdapter.setShowDelete(showDelete);
|
||||
mSearchResult.setAdapter(mPoiAdapter);
|
||||
} else {
|
||||
if (datums != null && !datums.isEmpty()) {
|
||||
mSearchResult.scrollToPosition(0);
|
||||
}
|
||||
mPoiAdapter.refresh(datums, showDelete);
|
||||
if (datums==null||datums.isEmpty()) {
|
||||
showEmpty(getString(R.string.search_empty));
|
||||
return;
|
||||
}
|
||||
showResult();
|
||||
mPoiAdapter.setDatas(datums);
|
||||
}
|
||||
|
||||
@Override public void showHistory(List<SearchPoi> datums) {
|
||||
|
||||
if (datums==null||datums.isEmpty()) {
|
||||
showEmpty(getString(R.string.history_empty));
|
||||
return;
|
||||
}
|
||||
showHistory();
|
||||
mHistoryAdapter.setDatas(datums);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -287,17 +315,10 @@ public class SearchFragment extends BaseFragment implements SearchView {
|
||||
// }
|
||||
//}
|
||||
|
||||
/**
|
||||
* @param searchPoi 导航目的地
|
||||
*/
|
||||
|
||||
private void navi2Location(SearchPoi searchPoi) {
|
||||
|
||||
if (searchPoi == null || searchPoi == SearchPoi.NULL) {
|
||||
Toast.makeText(mContext, "未设置", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
//SearchPoiLiveData.getInstance().postValue( searchPoi );
|
||||
exitSearch();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -327,11 +348,26 @@ public class SearchFragment extends BaseFragment implements SearchView {
|
||||
}
|
||||
mSearchBox.setTag(null);
|
||||
|
||||
if (mPoiAdapter != null) {
|
||||
mPoiAdapter.clear();
|
||||
}
|
||||
mPoiAdapter = null;
|
||||
//removeChoicePointMarker();
|
||||
}
|
||||
|
||||
private void showResult() {
|
||||
rlHistory.setVisibility(View.GONE);
|
||||
mSearchResult.setVisibility(View.VISIBLE);
|
||||
tvEmpty.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private void showHistory() {
|
||||
rlHistory.setVisibility(View.VISIBLE);
|
||||
mSearchResult.setVisibility(View.GONE);
|
||||
tvEmpty.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private void showEmpty(String str){
|
||||
rlHistory.setVisibility(View.GONE);
|
||||
tvEmpty.setText(str);
|
||||
mSearchResult.setVisibility(View.GONE);
|
||||
tvEmpty.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,11 @@ import com.mogo.module.navi.constants.DataConstants;
|
||||
import com.mogo.module.navi.database.AppDataBase;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.map.IMogoMapService;
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.ObservableEmitter;
|
||||
import io.reactivex.ObservableOnSubscribe;
|
||||
import io.reactivex.Observer;
|
||||
import io.reactivex.Scheduler;
|
||||
import io.reactivex.Single;
|
||||
import io.reactivex.SingleEmitter;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
@@ -97,6 +102,8 @@ public class SearchPresenter extends Presenter< SearchView >
|
||||
mView.renderSearchPoiResult(result,false);
|
||||
}
|
||||
});
|
||||
inputtipsSearch.requestInputtipsAsyn();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -145,7 +152,7 @@ public class SearchPresenter extends Presenter< SearchView >
|
||||
.subscribeOn( Schedulers.io() )
|
||||
.observeOn( AndroidSchedulers.mainThread() )
|
||||
.subscribe( count -> {
|
||||
mView.renderSearchPoiResult( null, false );
|
||||
mView.showHistory( null );
|
||||
} );
|
||||
mCompositeDisposable.add( disposable );
|
||||
}
|
||||
@@ -217,6 +224,27 @@ public class SearchPresenter extends Presenter< SearchView >
|
||||
}
|
||||
|
||||
|
||||
public void navi2Positon(){
|
||||
//mMapService.getNavi(getContext()).naviTo();
|
||||
}
|
||||
|
||||
public void insert(SearchPoi searchPoi){
|
||||
Observable.create(new ObservableOnSubscribe<String>() {
|
||||
@Override public void subscribe(ObservableEmitter<String> emitter) throws Exception {
|
||||
AppDataBase.getDatabase(getContext()).poiDao().insert(searchPoi);
|
||||
}
|
||||
}).subscribeOn(Schedulers.io()).subscribe();
|
||||
}
|
||||
|
||||
public void clearHistory(List<SearchPoi> list){
|
||||
Observable.create(new ObservableOnSubscribe<String>() {
|
||||
@Override public void subscribe(ObservableEmitter<String> emitter) throws Exception {
|
||||
AppDataBase.getDatabase(getContext()).poiDao().deleteAll(list);
|
||||
}
|
||||
}).subscribeOn(Schedulers.io()).subscribe();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onDestroy( @NonNull LifecycleOwner owner ) {
|
||||
|
||||
@@ -22,10 +22,18 @@
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:id="@+id/iv_navi_back"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:layout_marginLeft="@dimen/dp_24"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:src="@mipmap/icon_back"
|
||||
/>
|
||||
<EditText
|
||||
android:layout_width="0dp"
|
||||
android:id="@+id/et_navi_search"
|
||||
android:background="@null"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:imeOptions="actionDone"
|
||||
@@ -34,13 +42,7 @@
|
||||
android:textColorHint="@color/white_60"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:layout_marginLeft="@dimen/dp_24"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:src="@mipmap/icon_back"
|
||||
/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -116,7 +118,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="@string/history_search"
|
||||
android:text="@string/history_clear"
|
||||
android:textColor="@color/txt_blue"
|
||||
android:textSize="@dimen/txt_normal"
|
||||
/>
|
||||
@@ -125,28 +127,42 @@
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/rv_navi_history"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_120"
|
||||
android:layout_marginTop="@dimen/dp_60"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="600dp"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
android:layout_width="600dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_navi_wash"
|
||||
android:background="@drawable/shape_round_gray"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_navi_search"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:id="@+id/rv_navi_search"
|
||||
android:layout_height="match_parent"/>
|
||||
android:id="@+id/rv_navi_search"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
android:layout_width="600dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_navi_wash"
|
||||
android:background="@drawable/shape_round_gray"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_navi_search"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:id="@+id/tv_navi_list_empty"/>
|
||||
|
||||
<TextView
|
||||
android:drawableTop="@mipmap/icon_navi_restrant"
|
||||
app:layout_constraintTop_toTopOf="@id/rl_navi_history"
|
||||
app:layout_constraintLeft_toRightOf="@id/rl_navi_history"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_navi_home"
|
||||
app:layout_constraintLeft_toLeftOf="@id/ll_navi_home"
|
||||
android:text="@string/navi_restrant"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
android:id="@+id/tv_navi_restaurant"
|
||||
android:layout_marginLeft="@dimen/dp_32"
|
||||
style="@style/txt_navi_style"
|
||||
/>
|
||||
|
||||
@@ -155,7 +171,7 @@
|
||||
android:id="@+id/tv_navi_gas"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_navi_restaurant"
|
||||
app:layout_constraintLeft_toRightOf="@id/tv_navi_restaurant"
|
||||
android:text="@string/navi_restrant"
|
||||
android:text="@string/navi_gas"
|
||||
android:layout_marginLeft="@dimen/dp_32"
|
||||
style="@style/txt_navi_style"
|
||||
/>
|
||||
@@ -166,7 +182,7 @@
|
||||
android:id="@+id/tv_navi_toilet"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_navi_restaurant"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_navi_restaurant"
|
||||
android:text="@string/navi_restrant"
|
||||
android:text="@string/navi_toilet"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
style="@style/txt_navi_style"
|
||||
/>
|
||||
@@ -177,7 +193,7 @@
|
||||
android:id="@+id/tv_navi_wash"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_navi_toilet"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_navi_restaurant"
|
||||
android:text="@string/navi_restrant"
|
||||
android:text="@string/navi_park"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
|
||||
style="@style/txt_navi_style"
|
||||
@@ -188,7 +204,7 @@
|
||||
android:id="@+id/tv_navi_park"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_navi_gas"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_navi_gas"
|
||||
android:text="@string/navi_restrant"
|
||||
android:text="@string/navi_wash"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
|
||||
style="@style/txt_navi_style"
|
||||
@@ -199,12 +215,9 @@
|
||||
android:id="@+id/tv_navi_setting"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_navi_park"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_navi_gas"
|
||||
android:text="@string/navi_restrant"
|
||||
android:text="@string/navi_setting"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
|
||||
style="@style/txt_navi_style"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -3,13 +3,14 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:layout_height="@dimen/dp_180"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_position"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:src="@mipmap/icon_navi_position"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@@ -18,12 +19,12 @@
|
||||
<TextView
|
||||
android:id="@+id/tv_position"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_35"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_height="@dimen/dp_70"
|
||||
android:layout_marginLeft="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_25"
|
||||
android:textSize="25sp"
|
||||
app:layout_constraintLeft_toRightOf="@id/iv_position"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@@ -33,12 +34,12 @@
|
||||
<TextView
|
||||
android:id="@+id/tv_position_des"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_21"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white_60"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textSize="@dimen/sp_30"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_position"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_position"
|
||||
@@ -46,8 +47,8 @@
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_marginLeft="@dimen/dp_55"
|
||||
android:layout_height="@dimen/dp_2"
|
||||
android:layout_marginLeft="@dimen/dp_110"
|
||||
android:background="@color/white_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
|
||||
BIN
modules/mogo-module-navi/src/main/res/mipmap-xhdpi/icon_navi_position.png
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
@@ -5,4 +5,12 @@
|
||||
<string name="navi_home">回家</string>
|
||||
<string name="navi_company">去公司</string>
|
||||
<string name="navi_restrant">餐馆</string>
|
||||
<string name="navi_gas">加油站</string>
|
||||
<string name="navi_toilet">卫生间</string>
|
||||
<string name="navi_park">停车场</string>
|
||||
<string name="navi_wash">洗车</string>
|
||||
<string name="navi_setting">更多设置</string>
|
||||
<string name="history_clear">清空历史</string>
|
||||
<string name="history_empty">暂无历史结果</string>
|
||||
<string name="search_empty">暂无搜索结果</string>
|
||||
</resources>
|
||||
|
||||
@@ -9,7 +9,7 @@ public class MarkerActivitiesScope {
|
||||
@SerializedName("content")
|
||||
private String mContent;
|
||||
@SerializedName("isCheck")
|
||||
private Long mIsCheck;
|
||||
private int mIsCheck;
|
||||
|
||||
public String getContent() {
|
||||
return mContent;
|
||||
@@ -19,11 +19,11 @@ public class MarkerActivitiesScope {
|
||||
mContent = content;
|
||||
}
|
||||
|
||||
public Long getIsCheck() {
|
||||
public int getIsCheck() {
|
||||
return mIsCheck;
|
||||
}
|
||||
|
||||
public void setIsCheck(Long isCheck) {
|
||||
public void setIsCheck(int isCheck) {
|
||||
mIsCheck = isCheck;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ public class MarkerDynamicData {
|
||||
@SerializedName("name")
|
||||
private String mName;
|
||||
@SerializedName("type")
|
||||
private Long mType;
|
||||
private int mType;
|
||||
|
||||
public String getId() {
|
||||
return mId;
|
||||
@@ -29,11 +29,11 @@ public class MarkerDynamicData {
|
||||
mName = name;
|
||||
}
|
||||
|
||||
public Long getType() {
|
||||
public int getType() {
|
||||
return mType;
|
||||
}
|
||||
|
||||
public void setType(Long type) {
|
||||
public void setType(int type) {
|
||||
mType = type;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ public class MarkerHobbyDatum {
|
||||
@SerializedName("content")
|
||||
private String mContent;
|
||||
@SerializedName("isCheck")
|
||||
private Long mIsCheck;
|
||||
private int mIsCheck;
|
||||
|
||||
public String getContent() {
|
||||
return mContent;
|
||||
@@ -19,11 +19,11 @@ public class MarkerHobbyDatum {
|
||||
mContent = content;
|
||||
}
|
||||
|
||||
public Long getIsCheck() {
|
||||
public int getIsCheck() {
|
||||
return mIsCheck;
|
||||
}
|
||||
|
||||
public void setIsCheck(Long isCheck) {
|
||||
public void setIsCheck(int isCheck) {
|
||||
mIsCheck = isCheck;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,13 +12,13 @@ public class MarkerOnlineCar {
|
||||
@SerializedName("carInfo")
|
||||
private MarkerCarInfo mCarInfo;
|
||||
@SerializedName("compatibility")
|
||||
private Long mCompatibility;
|
||||
private int mCompatibility;
|
||||
@SerializedName("dynamicData")
|
||||
private MarkerDynamicData mDynamicData;
|
||||
@SerializedName("hobbyData")
|
||||
private List<MarkerHobbyDatum> mHobbyData;
|
||||
@SerializedName("isFocus")
|
||||
private Long mIsFocus;
|
||||
private int mIsFocus;
|
||||
@SerializedName("location")
|
||||
private MarkerLocation mLocation;
|
||||
@SerializedName("type")
|
||||
@@ -42,11 +42,11 @@ public class MarkerOnlineCar {
|
||||
mCarInfo = carInfo;
|
||||
}
|
||||
|
||||
public Long getCompatibility() {
|
||||
public int getCompatibility() {
|
||||
return mCompatibility;
|
||||
}
|
||||
|
||||
public void setCompatibility(Long compatibility) {
|
||||
public void setCompatibility(int compatibility) {
|
||||
mCompatibility = compatibility;
|
||||
}
|
||||
|
||||
@@ -66,11 +66,11 @@ public class MarkerOnlineCar {
|
||||
mHobbyData = hobbyData;
|
||||
}
|
||||
|
||||
public Long getIsFocus() {
|
||||
public int getIsFocus() {
|
||||
return mIsFocus;
|
||||
}
|
||||
|
||||
public void setIsFocus(Long isFocus) {
|
||||
public void setIsFocus(int isFocus) {
|
||||
mIsFocus = isFocus;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.google.gson.annotations.SerializedName;
|
||||
public class MarkerResponse {
|
||||
|
||||
@SerializedName("code")
|
||||
private Long mCode;
|
||||
private int mCode;
|
||||
@SerializedName("msg")
|
||||
private String mMsg;
|
||||
@SerializedName("result")
|
||||
@@ -15,11 +15,11 @@ public class MarkerResponse {
|
||||
@SerializedName("sign")
|
||||
private String mSign;
|
||||
|
||||
public Long getCode() {
|
||||
public int getCode() {
|
||||
return mCode;
|
||||
}
|
||||
|
||||
public void setCode(Long code) {
|
||||
public void setCode(int code) {
|
||||
mCode = code;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ public class MarkerShareMusic {
|
||||
@SerializedName("id")
|
||||
private String mId;
|
||||
@SerializedName("likeNumber")
|
||||
private Long mLikeNumber;
|
||||
private int mLikeNumber;
|
||||
@SerializedName("location")
|
||||
private MarkerLocation mLocation;
|
||||
@SerializedName("musicName")
|
||||
@@ -29,11 +29,11 @@ public class MarkerShareMusic {
|
||||
mId = id;
|
||||
}
|
||||
|
||||
public Long getLikeNumber() {
|
||||
public int getLikeNumber() {
|
||||
return mLikeNumber;
|
||||
}
|
||||
|
||||
public void setLikeNumber(Long likeNumber) {
|
||||
public void setLikeNumber(int likeNumber) {
|
||||
mLikeNumber = likeNumber;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,31 +7,31 @@ import com.google.gson.annotations.SerializedName;
|
||||
public class MarkerUserInfo {
|
||||
|
||||
@SerializedName("age")
|
||||
private Long mAge;
|
||||
private String mAge;
|
||||
@SerializedName("gender")
|
||||
private Long mGender;
|
||||
private int mGender;
|
||||
@SerializedName("sn")
|
||||
private String mSn;
|
||||
@SerializedName("userHead")
|
||||
private String mUserHead;
|
||||
@SerializedName("userId")
|
||||
private Long mUserId;
|
||||
private int mUserId;
|
||||
@SerializedName("userName")
|
||||
private String mUserName;
|
||||
|
||||
public Long getAge() {
|
||||
public String getAge() {
|
||||
return mAge;
|
||||
}
|
||||
|
||||
public void setAge(Long age) {
|
||||
public void setAge(String age) {
|
||||
mAge = age;
|
||||
}
|
||||
|
||||
public Long getGender() {
|
||||
public int getGender() {
|
||||
return mGender;
|
||||
}
|
||||
|
||||
public void setGender(Long gender) {
|
||||
public void setGender(int gender) {
|
||||
mGender = gender;
|
||||
}
|
||||
|
||||
@@ -51,11 +51,11 @@ public class MarkerUserInfo {
|
||||
mUserHead = userHead;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
public int getUserId() {
|
||||
return mUserId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
public void setUserId(int userId) {
|
||||
mUserId = userId;
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:endColor="#256BFF"
|
||||
android:startColor="#5CC1FF" />
|
||||
<corners android:radius="360dp" />
|
||||
|
||||
<padding
|
||||
android:bottom="@dimen/dp_6"
|
||||
android:left="@dimen/dp_6"
|
||||
android:right="@dimen/dp_40"
|
||||
android:top="@dimen/dp_6" />
|
||||
|
||||
</shape >
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:endColor="#36B565"
|
||||
android:startColor="#5ADFB2" />
|
||||
<corners android:radius="360dp" />
|
||||
|
||||
<padding
|
||||
android:bottom="@dimen/dp_6"
|
||||
android:left="@dimen/dp_6"
|
||||
android:right="@dimen/dp_40"
|
||||
android:top="@dimen/dp_6" />
|
||||
|
||||
</shape >
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:endColor="#6828E8"
|
||||
android:startColor="#C843FF" />
|
||||
<corners android:radius="360dp" />
|
||||
|
||||
<padding
|
||||
android:bottom="@dimen/dp_6"
|
||||
android:left="@dimen/dp_6"
|
||||
android:right="@dimen/dp_40"
|
||||
android:top="@dimen/dp_6" />
|
||||
|
||||
</shape >
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item android:id="@+id/shape_id" >
|
||||
<!-- 倒三角 -->
|
||||
<rotate
|
||||
android:fromDegrees="45"
|
||||
android:pivotX="135%"
|
||||
android:pivotY="15%"
|
||||
android:toDegrees="45" >
|
||||
<shape android:shape="rectangle" >
|
||||
<solid android:color="#256BFF" />
|
||||
</shape >
|
||||
</rotate >
|
||||
</item >
|
||||
|
||||
|
||||
</layer-list >
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item android:id="@+id/shape_id" >
|
||||
<!-- 倒三角 -->
|
||||
<rotate
|
||||
android:fromDegrees="45"
|
||||
android:pivotX="135%"
|
||||
android:pivotY="15%"
|
||||
android:toDegrees="45" >
|
||||
<shape android:shape="rectangle" >
|
||||
<solid android:color="#36B565" />
|
||||
</shape >
|
||||
</rotate >
|
||||
</item >
|
||||
|
||||
|
||||
</layer-list >
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item android:id="@+id/shape_id" >
|
||||
<!-- 倒三角 -->
|
||||
<rotate
|
||||
android:fromDegrees="45"
|
||||
android:pivotX="135%"
|
||||
android:pivotY="15%"
|
||||
android:toDegrees="45" >
|
||||
<shape android:shape="rectangle" >
|
||||
<solid android:color="#C843FF" />
|
||||
</shape >
|
||||
</rotate >
|
||||
</item >
|
||||
|
||||
|
||||
</layer-list >
|
||||
@@ -1,15 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="@dimen/dp_140"
|
||||
android:layout_height="@dimen/dp_155"
|
||||
android:background="@drawable/bg_map_marker_green"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBg"
|
||||
android:layout_width="@dimen/dp_88"
|
||||
android:layout_height="@dimen/dp_105"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/bg_map_marker_blue"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="@dimen/dp_76"
|
||||
android:layout_height="@dimen/dp_76"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/icon_default" />
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:src="@drawable/icon_default"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</LinearLayout >
|
||||
</androidx.constraintlayout.widget.ConstraintLayout >
|
||||
@@ -1,23 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_map_marker_green_info"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:src="@drawable/icon_default" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMarkerContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_map_marker_blue_info"
|
||||
android:drawableLeft="@drawable/icon_default"
|
||||
android:drawablePadding="@dimen/dp_20"
|
||||
android:gravity="center"
|
||||
android:text="诗一样的女子"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="@dimen/sp_32" />
|
||||
android:textSize="@dimen/sp_32"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</LinearLayout >
|
||||
<ImageView
|
||||
android:id="@+id/ivReverseTriangle"
|
||||
android:layout_width="27dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@drawable/bg_shape_reverse_triangle_blue"
|
||||
app:layout_constraintEnd_toEndOf="@+id/tvMarkerContent"
|
||||
app:layout_constraintStart_toStartOf="@+id/tvMarkerContent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvMarkerContent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout >
|
||||
@@ -46,12 +46,14 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.mogoserviceapi
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
implementation rootProject.ext.dependencies.moduleservice
|
||||
} else {
|
||||
implementation project(":libraries:mogo-map")
|
||||
implementation project(":foudations:mogo-utils")
|
||||
api project(":foudations:mogo-commons")
|
||||
implementation project(':services:mogo-service-api')
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(':modules:mogo-module-service')
|
||||
}
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.mogo.map.search.geo.MogoPoiItem;
|
||||
import com.mogo.map.search.poisearch.IMogoPoiSearchListener;
|
||||
import com.mogo.map.search.poisearch.MogoPoiResult;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.module.service.entity.MarkerExploreWay;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.imageloader.IMogoImageLoaderListener;
|
||||
import com.mogo.service.imageloader.IMogoImageloader;
|
||||
@@ -60,13 +61,12 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
|
||||
//map
|
||||
private IMogoMarker mPoiMarker;
|
||||
// private int position = -1;
|
||||
// private int position = -1;
|
||||
private IMogoMarkerManager mMarkerManager;
|
||||
private IMogoMapService mMogoMapService;
|
||||
|
||||
//media
|
||||
private GSYVideoOptionBuilder gsyVideoOptionBuilder = new GSYVideoOptionBuilder();
|
||||
// private String videoUrl = "";
|
||||
private String videoUrl = "http://ivi.bupt.edu.cn/hls/cctv1hd.m3u8";
|
||||
private String imageUrl = "https://oimagec4.ydstatic.com/image?id=-5397300958976572132&product=adpublish&w=520&h=347";
|
||||
SimpleCoverVideoPlayer simpleCoverVideoPlayer;
|
||||
@@ -75,6 +75,7 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
private TextView mPreviousTv;
|
||||
private TextView mNextTv;
|
||||
|
||||
private List<MarkerExploreWay> markerExploreWayList;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@@ -189,11 +190,26 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
*/
|
||||
@Override
|
||||
public boolean onMarkerClicked(IMogoMarker marker) {
|
||||
marker.getObject();
|
||||
//点击marker以后,确认他的位置?然后点击下一个操作
|
||||
MarkerExploreWay exploreWay = (MarkerExploreWay) marker.getObject();
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新单个数据,更新位置positon TODO
|
||||
*/
|
||||
// private void refreshSingleData() {
|
||||
// markerExploreWayList
|
||||
// }
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
// private void
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="6dp" />
|
||||
<solid android:color="@color/color_A2A2A2"/>
|
||||
<corners android:radius="5dp" />
|
||||
<solid android:color="@color/color_DADAE2"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="10dp" />
|
||||
<solid android:color="@color/color_F8F8F8"/>
|
||||
</shape>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:topLeftRadius="6dp"
|
||||
android:topRightRadius="6dp"
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="0dp"/>
|
||||
<solid android:color="@color/color_222533"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="10dp" />
|
||||
<solid android:color="@color/color_222533"/>
|
||||
</shape>
|
||||
@@ -15,21 +15,20 @@
|
||||
android:clickable="true"
|
||||
android:longClickable="true" />
|
||||
|
||||
|
||||
<!--顶部区域-->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout_media"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="84dp"
|
||||
android:background="@color/color_323131"
|
||||
android:layout_height="66dp"
|
||||
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="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="22dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:clickable="true"
|
||||
android:src="@drawable/public_arrow_back_iv"
|
||||
@@ -40,13 +39,13 @@
|
||||
android:id="@+id/tv_media_title_content"
|
||||
android:layout_width="560dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="28dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxWidth="560dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20dp"
|
||||
android:textSize="19dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -54,12 +53,12 @@
|
||||
<TextView
|
||||
android:id="@+id/tv_media_title_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="21dp"
|
||||
android:layout_marginTop="28dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="21dp"
|
||||
android:layout_marginRight="50dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18dp"
|
||||
android:textSize="13dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -1,46 +1,63 @@
|
||||
<?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">
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="330dp"
|
||||
android:background="@drawable/shape_bg_222533_10px">
|
||||
|
||||
<!--顶部view-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_top_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="94dp"
|
||||
android:background="@drawable/shape_bg_222533_6px_top">
|
||||
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/tv_information_media_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:text="@string/main_empty_location"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="22dp" />
|
||||
android:textColor="@color/color_3"
|
||||
android:textStyle="bold"
|
||||
android:textSize="18dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_distance_video"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tv_information_media_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginBottom="18dp"
|
||||
android:textSize="20dp" />
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:text="666KM"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textStyle="bold"
|
||||
android:textSize="13dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_information_media_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_below="@+id/tv_information_media_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="2019-10-10"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="13dp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<!--视频播放器和图片播放器-->
|
||||
<RelativeLayout
|
||||
android:id="@+id/media_layout"
|
||||
android:layout_width="400dp"
|
||||
android:layout_height="225dp"
|
||||
android:layout_width="298dp"
|
||||
android:layout_height="177dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:background="@drawable/shape_bg_222533_9px"
|
||||
android:layout_below="@+id/layout_top_view">
|
||||
|
||||
<com.mogo.tanlu.video.SimpleCoverVideoPlayer
|
||||
@@ -53,77 +70,43 @@
|
||||
android:id="@+id/tanlu_photo_imageView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<!--底部view-->
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:layout_below="@+id/media_layout"
|
||||
android:background="@drawable/shape_bg_222533_6px_bottom">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/username_image_video"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:src="@mipmap/ic_launcher"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_username_video"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_toRightOf="@+id/username_image_video"
|
||||
android:text="你好小智"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_information_media_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingLeft="15dp"
|
||||
android:paddingRight="17dp"
|
||||
android:text="2019-10-10"
|
||||
android:textColor="@color/color_9A9A9A"
|
||||
android:textSize="16dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="21dp"
|
||||
android:layout_below="@+id/media_layout">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_previous_res"
|
||||
android:layout_width="110dp"
|
||||
android:layout_width="142dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="35dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:background="@drawable/shape_bg_222533"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:text="上一个"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18dp" />
|
||||
|
||||
android:drawableLeft="@drawable/default_image"
|
||||
android:text="@string/tanlu_previous"
|
||||
android:textColor="@color/color_545362"
|
||||
android:textSize="13dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_next_res"
|
||||
android:layout_width="110dp"
|
||||
android:layout_width="142dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="35dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:background="@drawable/shape_bg_222533"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:text="下一个"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18dp" />
|
||||
|
||||
android:drawableRight="@drawable/default_image"
|
||||
android:text="@string/tanlu_next"
|
||||
android:paddingRight="10dp"
|
||||
android:textColor="@color/color_545362"
|
||||
android:textSize="13dp" />
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -25,8 +25,16 @@
|
||||
<color name="color_213142">#213142</color>
|
||||
<color name="white_alpha20">#33FFFFFF</color>
|
||||
<color name="color_B3000000">#B3000000</color>
|
||||
<color name="color_3">#333333</color>
|
||||
<color name="color_0091FF">#0091FF</color>
|
||||
<color name="color_d9000000">#d9000000</color>
|
||||
<color name="red_tips">#FF1B1B</color>
|
||||
|
||||
<color name="color_F8F8F8">#F8F8F8</color>
|
||||
<color name="color_3">#333333</color>
|
||||
<color name="color_DADAE2">#DADAE2</color>
|
||||
<color name="color_545362">#545362</color>
|
||||
<color name="color_191C25">#99191C25</color>
|
||||
<color name="color_666666">#666666</color>
|
||||
<color name="color_999999">#999999</color>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
<string name="voice_get_informations_tts">为您找到%s条路况信息</string>
|
||||
<string name="start_mogo_car_connect">开启小智车联</string>
|
||||
<string name="start_mogo_share">共享计划</string>
|
||||
<string name="tanlu_previous">上一条</string>
|
||||
<string name="tanlu_next">下一条</string>
|
||||
|
||||
|
||||
<array name="searching_voice_string_array">
|
||||
<item >正在为您搜索路况</item>
|
||||
|
||||