rebase
This commit is contained in:
@@ -33,12 +33,12 @@ public class BaseFloatDialog extends Dialog {
|
||||
}
|
||||
|
||||
private void addFlag() {
|
||||
// TODO 这里需要申请悬浮床权限
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
getWindow().setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY);
|
||||
} else {
|
||||
getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
|
||||
}
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
// getWindow().setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY);
|
||||
// } else {
|
||||
// getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
|
||||
// }
|
||||
getWindow().setType(WindowManager.LayoutParams.LAST_SUB_WINDOW);
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
|
||||
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION
|
||||
| WindowManager.LayoutParams.FLAG_LOCAL_FOCUS_MODE);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.module.common.dialog;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.widget.TextView;
|
||||
@@ -74,10 +75,10 @@ public class WMDialog implements DialogInterface {
|
||||
private Context mContext;
|
||||
private WMDialogParams mParams;
|
||||
|
||||
public Builder( Context context ) {
|
||||
this.mContext = context;
|
||||
public Builder( Activity activity ) {
|
||||
this.mContext = activity;
|
||||
mParams = new WMDialogParams();
|
||||
mParams.mContext = context;
|
||||
mParams.mContext = activity;
|
||||
}
|
||||
|
||||
public Builder setContent( CharSequence content ) {
|
||||
|
||||
@@ -8,8 +8,10 @@ import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
|
||||
/**
|
||||
* 采用windowManager实现接口
|
||||
* 采用windowManager实现接口(取消系统级弹窗)
|
||||
* {@link DialogImpl}
|
||||
*/
|
||||
@Deprecated
|
||||
class WindowManagerImpl implements IWindowManagerView {
|
||||
|
||||
private WindowManager mWindowManager;
|
||||
|
||||
@@ -97,6 +97,7 @@ public class WindowManagerView {
|
||||
return new WindowManagerView( mParams, new DialogImpl() );
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public WindowManagerView showInWindowManager() {
|
||||
if ( mParams.mContentView == null ) {
|
||||
throw new NullPointerException( "WMViewParams#mContentView must not be null." );
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.module.service.intent;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.BitmapFactory;
|
||||
@@ -23,6 +24,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.mogo.thread.WorkThreadHandler;
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
|
||||
import com.mogo.eagle.core.utilcode.util.AppStateManager;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
@@ -94,12 +96,15 @@ public class MockIntentHandler implements IntentHandler {
|
||||
MarkerServiceHandler.getMapUIController().changeBearing(bearing);
|
||||
break;
|
||||
case 9:// 测试弹窗
|
||||
new WMDialog.Builder(context)
|
||||
.setOkButton("确认", (dlg, which) -> dlg.dismiss())
|
||||
.setCancelButton("取消", (dlg, which) -> dlg.dismiss())
|
||||
.setContent("内容内容内容内容内容内容内容内容")
|
||||
.build()
|
||||
.show();
|
||||
Activity activity = AppStateManager.INSTANCE.currentActivity();
|
||||
if (activity != null) {
|
||||
new WMDialog.Builder(activity)
|
||||
.setOkButton("确认", (dlg, which) -> dlg.dismiss())
|
||||
.setCancelButton("取消", (dlg, which) -> dlg.dismiss())
|
||||
.setContent("内容内容内容内容内容内容内容内容")
|
||||
.build()
|
||||
.show();
|
||||
}
|
||||
break;
|
||||
case 10://测试GEO查询
|
||||
IMogoGeoSearch geoSearch = MarkerServiceHandler.getMapService().getGeoSearch(context);
|
||||
|
||||
Reference in New Issue
Block a user