From 401f46ed463f7d0ff60b46a075a77064d03517e6 Mon Sep 17 00:00:00 2001 From: zhongjh <254191389@qq.com> Date: Fri, 9 Sep 2022 15:10:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=BE=91=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E7=AC=AC=E4=BA=8C=E6=AC=A1=E5=88=9B=E5=BB=BA=E6=96=87?= =?UTF-8?q?=E5=AD=97=E6=97=A0=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/zhongjh/imageedit/BaseImageEditActivity.java | 4 +++- .../main/java/com/zhongjh/imageedit/ImageTextEditDialog.java | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/imageedit/src/main/java/com/zhongjh/imageedit/BaseImageEditActivity.java b/imageedit/src/main/java/com/zhongjh/imageedit/BaseImageEditActivity.java index 8a1218b6..3cd567c4 100644 --- a/imageedit/src/main/java/com/zhongjh/imageedit/BaseImageEditActivity.java +++ b/imageedit/src/main/java/com/zhongjh/imageedit/BaseImageEditActivity.java @@ -50,7 +50,7 @@ abstract class BaseImageEditActivity extends Activity implements View.OnClickLis @Override protected void onCreate(Bundle savedInstanceState) { // 默认竖型 - setRequestedOrientation(getIntent().getIntExtra(EXTRA_IMAGE_SCREEN_ORIENTATION,SCREEN_ORIENTATION_PORTRAIT)); + setRequestedOrientation(getIntent().getIntExtra(EXTRA_IMAGE_SCREEN_ORIENTATION, SCREEN_ORIENTATION_PORTRAIT)); StatusBarUtils.initStatusBar(BaseImageEditActivity.this); super.onCreate(savedInstanceState); Bitmap bitmap = getBitmap(); @@ -136,6 +136,8 @@ public void onTextModeClick() { mTextDialog = new ImageTextEditDialog(this, this); mTextDialog.setOnShowListener(this); mTextDialog.setOnDismissListener(this); + } else { + mTextDialog.setCallback(this); } mTextDialog.show(); } diff --git a/imageedit/src/main/java/com/zhongjh/imageedit/ImageTextEditDialog.java b/imageedit/src/main/java/com/zhongjh/imageedit/ImageTextEditDialog.java index 8d089528..b88e96e2 100644 --- a/imageedit/src/main/java/com/zhongjh/imageedit/ImageTextEditDialog.java +++ b/imageedit/src/main/java/com/zhongjh/imageedit/ImageTextEditDialog.java @@ -113,4 +113,8 @@ public interface Callback { */ void onText(ImageText text); } + + public void setCallback(Callback callback) { + this.mCallback = callback; + } }