1. 分享按钮适配1+16

2. topView蒙层适配
This commit is contained in:
tongchenfei
2020-11-19 21:00:34 +08:00
parent 68a8492495
commit 86eba35ebf
12 changed files with 384 additions and 69 deletions

View File

@@ -195,7 +195,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
@@ -855,75 +859,75 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
});
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);
// mApis.getTopViewManager().addSubView(v, new IMogoTopViewStatusListener() {
// @Override
// public void onViewAdded(View view) {
// Logger.d(TAG, "onSubViewAdded: " + view);
// }
//
// @Override
// public void onViewRemoved(View view) {
// Logger.d(TAG, "onSubViewRemoved: " + view);
// }
//
// @Override
// public void beforeViewAddAnim(View view) {
// Logger.d(TAG, "beforeSubViewAddAnim: " + view);
// }
//
// @Override
// public void beforeViewRemoveAnim(View view) {
// Logger.d(TAG, "beforeSubViewRemoveAnim: " + 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);
mApis.getTopViewManager().addSubView(v, new IMogoTopViewStatusListener() {
@Override
public void onViewAdded(View view) {
Logger.d(TAG, "onSubViewAdded: " + view);
}
@Override
public void onViewRemoved(View view) {
Logger.d(TAG, "onSubViewRemoved: " + view);
}
@Override
public void beforeViewAddAnim(View view) {
Logger.d(TAG, "beforeSubViewAddAnim: " + view);
}
@Override
public void beforeViewRemoveAnim(View view) {
Logger.d(TAG, "beforeSubViewRemoveAnim: " + view);
}
});
});
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();
// currentHeight = heights[random.nextInt(3)];
// tv.setText(" height: " + currentHeight + ": " + v);
// ViewGroup.LayoutParams params =
// new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, currentHeight);
// 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();
currentHeight = heights[random.nextInt(3)];
tv.setText(" height: " + currentHeight + ": " + v);
ViewGroup.LayoutParams params =
new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, currentHeight);
// 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 -> {