|
|
|
|
@@ -1,11 +1,15 @@
|
|
|
|
|
package com.mogo.module.extensions.entrance;
|
|
|
|
|
|
|
|
|
|
import android.content.Intent;
|
|
|
|
|
import android.graphics.Color;
|
|
|
|
|
import android.graphics.Rect;
|
|
|
|
|
import android.os.Bundle;
|
|
|
|
|
import android.os.Debug;
|
|
|
|
|
import android.os.Handler;
|
|
|
|
|
import android.text.SpannableString;
|
|
|
|
|
import android.text.Spanned;
|
|
|
|
|
import android.text.TextUtils;
|
|
|
|
|
import android.text.style.ForegroundColorSpan;
|
|
|
|
|
import android.util.TypedValue;
|
|
|
|
|
import android.view.LayoutInflater;
|
|
|
|
|
import android.view.MotionEvent;
|
|
|
|
|
@@ -22,6 +26,7 @@ import androidx.constraintlayout.widget.ConstraintSet;
|
|
|
|
|
import androidx.constraintlayout.widget.Group;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.android.arouter.launcher.ARouter;
|
|
|
|
|
import com.amap.api.maps.model.MyLocationStyle;
|
|
|
|
|
import com.bumptech.glide.request.RequestOptions;
|
|
|
|
|
import com.mogo.commons.AbsMogoApplication;
|
|
|
|
|
import com.mogo.commons.debug.DebugConfig;
|
|
|
|
|
@@ -43,6 +48,7 @@ import com.mogo.module.common.dialog.WMDialog;
|
|
|
|
|
import com.mogo.module.common.glide.SkinAbleBitmapTarget;
|
|
|
|
|
import com.mogo.module.common.map.CustomNaviInterrupter;
|
|
|
|
|
import com.mogo.module.common.map.MapCenterPointStrategy;
|
|
|
|
|
import com.mogo.module.common.map.MyLocationUtil;
|
|
|
|
|
import com.mogo.module.common.map.Scene;
|
|
|
|
|
import com.mogo.module.common.view.OnPreventFastClickListener;
|
|
|
|
|
import com.mogo.module.extensions.ExtensionsModuleConst;
|
|
|
|
|
@@ -190,7 +196,11 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected int getLayoutId() {
|
|
|
|
|
return R.layout.module_ext_layout_entrance;
|
|
|
|
|
if(DebugConfig.isMapBased()) {
|
|
|
|
|
return R.layout.module_ext_layout_entrance;
|
|
|
|
|
}else{
|
|
|
|
|
return R.layout.module_ext_layout_entrance_no_map;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@@ -850,15 +860,24 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
|
|
|
|
|
|
|
|
|
private void debugTopView() {
|
|
|
|
|
findViewById(R.id.btnDebugCtrlNaviView).setOnClickListener(view -> {
|
|
|
|
|
if (!toggle) {
|
|
|
|
|
TopViewAnimHelper.getInstance().showNaviView();
|
|
|
|
|
} else {
|
|
|
|
|
TopViewAnimHelper.getInstance().hideNaviView();
|
|
|
|
|
}
|
|
|
|
|
toggle = !toggle;
|
|
|
|
|
SharedPrefsMgr.getInstance(getContext()).putString("MY_LOCATION_CONFIG", "https" +
|
|
|
|
|
"://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1605705236512" +
|
|
|
|
|
"&di=50620661ded7035fb84899a408f9f27e&imgtype=0&src=http%3A%2F%2Fb-ssl" +
|
|
|
|
|
".duitang.com%2Fuploads%2Fitem%2F201409%2F11%2F20140911211243_3rT4u.jpeg");
|
|
|
|
|
MyLocationUtil.setMyLocationIconUrl(getContext(),"https" +
|
|
|
|
|
"://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1605705236512" +
|
|
|
|
|
"&di=50620661ded7035fb84899a408f9f27e&imgtype=0&src=http%3A%2F%2Fb-ssl" +
|
|
|
|
|
".duitang.com%2Fuploads%2Fitem%2F201409%2F11%2F20140911211243_3rT4u.jpeg");
|
|
|
|
|
// if (!toggle) {
|
|
|
|
|
// TopViewAnimHelper.getInstance().showNaviView();
|
|
|
|
|
// } else {
|
|
|
|
|
// TopViewAnimHelper.getInstance().hideNaviView();
|
|
|
|
|
// }
|
|
|
|
|
// toggle = !toggle;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
findViewById(R.id.btnDebugCtrlSubView).setOnClickListener(view -> {
|
|
|
|
|
// MyLocationUtil.emphasizeMyLocation();
|
|
|
|
|
View v = LayoutInflater.from(getContext()).inflate(R.layout.demo_top, null);
|
|
|
|
|
TextView tv = v.findViewById(R.id.tvIndex);
|
|
|
|
|
tv.setText("sub view height: " + currentHeight + ": " + v);
|
|
|
|
|
@@ -886,6 +905,17 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
findViewById(R.id.btnDebugCtrlTopView).setOnClickListener(view -> {
|
|
|
|
|
// SharedPrefsMgr.getInstance(getContext()).putString("MY_LOCATION_CONFIG", "https" +
|
|
|
|
|
// "://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1605705508574" +
|
|
|
|
|
// "&di=339d3259ad21f5f48c8abcd1bafff324&imgtype=0&src=http%3A%2F%2Fc-ssl" +
|
|
|
|
|
// ".duitang.com%2Fuploads%2Fitem%2F202004%2F23%2F20200423111550_4AJLr.thumb" +
|
|
|
|
|
// ".1000_0.jpeg");
|
|
|
|
|
// MyLocationUtil.setMyLocationIconUrl(getContext(),"https" +
|
|
|
|
|
// "://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1605705508574" +
|
|
|
|
|
// "&di=339d3259ad21f5f48c8abcd1bafff324&imgtype=0&src=http%3A%2F%2Fc-ssl" +
|
|
|
|
|
// ".duitang.com%2Fuploads%2Fitem%2F202004%2F23%2F20200423111550_4AJLr.thumb" +
|
|
|
|
|
// ".1000_0.jpeg");
|
|
|
|
|
// MyLocationUtil.emphasizeMyLocation();
|
|
|
|
|
View v = LayoutInflater.from(getContext()).inflate(R.layout.demo_top, null);
|
|
|
|
|
TextView tv = v.findViewById(R.id.tvIndex);
|
|
|
|
|
Random random = new Random();
|
|
|
|
|
@@ -893,29 +923,29 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
|
|
|
|
tv.setText(" height: " + currentHeight + ": " + v);
|
|
|
|
|
ViewGroup.LayoutParams params =
|
|
|
|
|
new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, currentHeight);
|
|
|
|
|
mApis.getEntranceButtonController().addLeftFeatureView(v);
|
|
|
|
|
// mApis.getEntranceButtonController().addLeftFeatureView(v);
|
|
|
|
|
|
|
|
|
|
// mApis.getTopViewManager().addView(v, params, new IMogoTopViewStatusListener() {
|
|
|
|
|
// @Override
|
|
|
|
|
// public void onViewAdded(View view) {
|
|
|
|
|
// Logger.d(TAG, "onViewAdded: " + view);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// @Override
|
|
|
|
|
// public void onViewRemoved(View view) {
|
|
|
|
|
// Logger.d(TAG, "onViewRemoved: " + view);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// @Override
|
|
|
|
|
// public void beforeViewAddAnim(View view) {
|
|
|
|
|
// Logger.d(TAG, "beforeViewAddAnim: " + view);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// @Override
|
|
|
|
|
// public void beforeViewRemoveAnim(View view) {
|
|
|
|
|
// Logger.d(TAG, "beforeViewRemoveAnim: " + view);
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
mApis.getTopViewManager().addView(v, params, new IMogoTopViewStatusListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onViewAdded(View view) {
|
|
|
|
|
Logger.d(TAG, "onViewAdded: " + view);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onViewRemoved(View view) {
|
|
|
|
|
Logger.d(TAG, "onViewRemoved: " + view);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void beforeViewAddAnim(View view) {
|
|
|
|
|
Logger.d(TAG, "beforeViewAddAnim: " + view);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void beforeViewRemoveAnim(View view) {
|
|
|
|
|
Logger.d(TAG, "beforeViewRemoveAnim: " + view);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
findViewById(R.id.btnDebugAddBottomLayerView).setOnClickListener(v -> {
|
|
|
|
|
@@ -923,7 +953,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
|
|
|
|
tv.setText("entrance add");
|
|
|
|
|
mApis.getEntranceButtonController().addBottomLayerView(tv, 50, 50);
|
|
|
|
|
});
|
|
|
|
|
findViewById(R.id.btnShowTextTip).setOnClickListener(v-> TipToast.tip("分享成功"));
|
|
|
|
|
findViewById(R.id.btnShowTextTip).setOnClickListener(v-> TipToast.tip("分享成功分享成功分享成功分享成功分享成功分享成功分享成功分享成功分享成功"));
|
|
|
|
|
|
|
|
|
|
findViewById(R.id.btnShowDrawableTip).setOnClickListener(v->{
|
|
|
|
|
mMsgContainer.setVisibility(View.VISIBLE);
|
|
|
|
|
@@ -934,9 +964,17 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
|
|
|
|
|
|
|
|
|
findViewById(R.id.btnShowDrawableTipNoSize).setOnClickListener(v->{
|
|
|
|
|
mMsgContainer.setVisibility(View.GONE);
|
|
|
|
|
TipDrawable drawable =
|
|
|
|
|
new TipDrawable(getResources().getDrawable(R.drawable.model_ext_default_user_head));
|
|
|
|
|
TipToast.tip("分享成功",drawable);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String enthusiasmIndex = "一般的字加粗的字一般的字";
|
|
|
|
|
SpannableString spannableStringUnSelectCountStr = new SpannableString(enthusiasmIndex);
|
|
|
|
|
ForegroundColorSpan foregroundColorSpanUnSelectCount = new ForegroundColorSpan(Color.RED);
|
|
|
|
|
spannableStringUnSelectCountStr.setSpan(foregroundColorSpanUnSelectCount, 4, 7, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
|
|
|
|
|
|
|
|
|
TipToast.tip(spannableStringUnSelectCountStr.toString());
|
|
|
|
|
// TipDrawable drawable =
|
|
|
|
|
// new TipDrawable(getResources().getDrawable(R.drawable.model_ext_default_user_head));
|
|
|
|
|
// TipToast.tip("分享成功",drawable);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|