调整窗口切换模式
This commit is contained in:
		| @@ -1,8 +1,8 @@ | |||||||
| #Created by .winboll/winboll_app_build.gradle | #Created by .winboll/winboll_app_build.gradle | ||||||
| #Sun Jun 22 16:21:12 HKT 2025 | #Mon Jun 23 06:26:53 GMT 2025 | ||||||
| stageCount=5 | stageCount=5 | ||||||
| libraryProject= | libraryProject= | ||||||
| baseVersion=15.4 | baseVersion=15.4 | ||||||
| publishVersion=15.4.4 | publishVersion=15.4.4 | ||||||
| buildCount=0 | buildCount=10 | ||||||
| baseBetaVersion=15.4.5 | baseBetaVersion=15.4.5 | ||||||
|   | |||||||
| @@ -14,6 +14,7 @@ import android.os.Bundle; | |||||||
| import android.provider.MediaStore; | import android.provider.MediaStore; | ||||||
| import android.view.View; | import android.view.View; | ||||||
| import android.widget.ImageView; | import android.widget.ImageView; | ||||||
|  | import android.widget.RelativeLayout; | ||||||
| import androidx.core.app.ActivityCompat; | import androidx.core.app.ActivityCompat; | ||||||
| import androidx.core.content.ContextCompat; | import androidx.core.content.ContextCompat; | ||||||
| import cc.winboll.studio.libaes.views.AToolbar; | import cc.winboll.studio.libaes.views.AToolbar; | ||||||
| @@ -32,10 +33,8 @@ import java.io.FileNotFoundException; | |||||||
| import java.io.FileOutputStream; | import java.io.FileOutputStream; | ||||||
| import java.io.IOException; | import java.io.IOException; | ||||||
| import java.io.OutputStream; | import java.io.OutputStream; | ||||||
| import android.service.quickaccesswallet.GetWalletCardsError; |  | ||||||
| import android.widget.RelativeLayout; |  | ||||||
|  |  | ||||||
| public class BackgroundPictureActivity extends Activity implements BackgroundPicturePreviewDialog.IOnRecivedPictureListener { | public class BackgroundPictureActivity extends WinBoLLActivity implements BackgroundPicturePreviewDialog.IOnRecivedPictureListener { | ||||||
|  |  | ||||||
|     public static final String TAG = "BackgroundPictureActivity"; |     public static final String TAG = "BackgroundPictureActivity"; | ||||||
|     public BackgroundPictureUtils mBackgroundPictureUtils; |     public BackgroundPictureUtils mBackgroundPictureUtils; | ||||||
| @@ -60,6 +59,16 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic | |||||||
|     private int mnPictureCompress = 100; |     private int mnPictureCompress = 100; | ||||||
|     private static String _RecivedPictureFileName; |     private static String _RecivedPictureFileName; | ||||||
|  |  | ||||||
|  | 	@Override | ||||||
|  | 	public Activity getActivity() { | ||||||
|  | 		return this; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	@Override | ||||||
|  | 	public String getTag() { | ||||||
|  | 		return TAG; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     protected void onCreate(Bundle savedInstanceState) { |     protected void onCreate(Bundle savedInstanceState) { | ||||||
|         super.onCreate(savedInstanceState); |         super.onCreate(savedInstanceState); | ||||||
| @@ -106,7 +115,7 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic | |||||||
|         findViewById(R.id.activitybackgroundpictureAButton6).setOnClickListener(onCropFreePictureClickListener); |         findViewById(R.id.activitybackgroundpictureAButton6).setOnClickListener(onCropFreePictureClickListener); | ||||||
| 		findViewById(R.id.activitybackgroundpictureAButton7).setOnClickListener(onPixelPickerClickListener); | 		findViewById(R.id.activitybackgroundpictureAButton7).setOnClickListener(onPixelPickerClickListener); | ||||||
| 		findViewById(R.id.activitybackgroundpictureAButton8).setOnClickListener(onCleanPixelClickListener); | 		findViewById(R.id.activitybackgroundpictureAButton8).setOnClickListener(onCleanPixelClickListener); | ||||||
| 		 |  | ||||||
|         updatePreviewBackground(); |         updatePreviewBackground(); | ||||||
|  |  | ||||||
|         // 处理分享的图片 |         // 处理分享的图片 | ||||||
| @@ -161,7 +170,7 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic | |||||||
|                     //drawable.setAlpha(120); |                     //drawable.setAlpha(120); | ||||||
|                     ivPreviewBackground.setImageDrawable(drawable); |                     ivPreviewBackground.setImageDrawable(drawable); | ||||||
|                 } |                 } | ||||||
|                 ToastUtils.show("背景图片已更新"); |                 //ToastUtils.show("背景图片已更新"); | ||||||
|             } catch (IOException e) { |             } catch (IOException e) { | ||||||
|                 LogUtils.d(TAG, e, Thread.currentThread().getStackTrace()); |                 LogUtils.d(TAG, e, Thread.currentThread().getStackTrace()); | ||||||
|                 ToastUtils.show("背景图片加载失败"); |                 ToastUtils.show("背景图片加载失败"); | ||||||
| @@ -255,7 +264,7 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic | |||||||
|             updatePreviewBackground(); |             updatePreviewBackground(); | ||||||
|         } |         } | ||||||
|     }; |     }; | ||||||
| 	 |  | ||||||
| 	private View.OnClickListener onPixelPickerClickListener = new View.OnClickListener() { | 	private View.OnClickListener onPixelPickerClickListener = new View.OnClickListener() { | ||||||
|         @Override |         @Override | ||||||
|         public void onClick(View v) { |         public void onClick(View v) { | ||||||
| @@ -264,11 +273,11 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic | |||||||
| 			String imagePath = mfRecivedCropPicture.toString(); | 			String imagePath = mfRecivedCropPicture.toString(); | ||||||
| 			Intent intent = new Intent(getApplicationContext(), PixelPickerActivity.class); | 			Intent intent = new Intent(getApplicationContext(), PixelPickerActivity.class); | ||||||
| 			intent.putExtra("imagePath", imagePath); | 			intent.putExtra("imagePath", imagePath); | ||||||
| 			//startActivity(intent); | 			startActivity(intent); | ||||||
|             App.getWinBoLLActivityManager().startWinBoLLActivity(getApplicationContext(), intent, PixelPickerActivity.class); |             //App.getWinBoLLActivityManager().startWinBoLLActivity(getActivity(), intent, PixelPickerActivity.class); | ||||||
|         } |         } | ||||||
|     }; |     }; | ||||||
| 	 |  | ||||||
| 	private View.OnClickListener onCleanPixelClickListener = new View.OnClickListener() { | 	private View.OnClickListener onCleanPixelClickListener = new View.OnClickListener() { | ||||||
|         @Override |         @Override | ||||||
|         public void onClick(View v) { |         public void onClick(View v) { | ||||||
| @@ -520,11 +529,11 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic | |||||||
|                 LogUtils.e(TAG, "剪裁保存异常" + e); |                 LogUtils.e(TAG, "剪裁保存异常" + e); | ||||||
|                 ToastUtils.show("保存失败:" + e.getMessage()); |                 ToastUtils.show("保存失败:" + e.getMessage()); | ||||||
|             }/* finally { |             }/* finally { | ||||||
|                 // 安全删除临时文件 | 			 // 安全删除临时文件 | ||||||
|                 if (mfTempCropPicture.exists()) { | 			 if (mfTempCropPicture.exists()) { | ||||||
|                     mfTempCropPicture.delete(); | 			 mfTempCropPicture.delete(); | ||||||
|                 } | 			 } | ||||||
|             }*/ | 			 }*/ | ||||||
|         } else if (resultCode != RESULT_OK) { |         } else if (resultCode != RESULT_OK) { | ||||||
|             LogUtils.d(TAG, "操作取消或失败,requestCode: " + requestCode); |             LogUtils.d(TAG, "操作取消或失败,requestCode: " + requestCode); | ||||||
|             ToastUtils.show("操作已取消"); |             ToastUtils.show("操作已取消"); | ||||||
| @@ -566,7 +575,7 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic | |||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 	 |  | ||||||
| 	void setBackgroundColor() { | 	void setBackgroundColor() { | ||||||
| 		BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(BackgroundPictureActivity.this); | 		BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(BackgroundPictureActivity.this); | ||||||
| 		BackgroundPictureBean bean = utils.getBackgroundPictureBean(); | 		BackgroundPictureBean bean = utils.getBackgroundPictureBean(); | ||||||
|   | |||||||
| @@ -26,6 +26,7 @@ import cc.winboll.studio.powerbell.utils.BackgroundPictureUtils; | |||||||
| import java.io.File; | import java.io.File; | ||||||
| import java.io.FileInputStream; | import java.io.FileInputStream; | ||||||
| import java.io.FileNotFoundException; | import java.io.FileNotFoundException; | ||||||
|  | import cc.winboll.studio.powerbell.App; | ||||||
|  |  | ||||||
| public class PixelPickerActivity extends WinBoLLActivity implements IWinBoLLActivity { | public class PixelPickerActivity extends WinBoLLActivity implements IWinBoLLActivity { | ||||||
|  |  | ||||||
| @@ -197,6 +198,7 @@ public class PixelPickerActivity extends WinBoLLActivity implements IWinBoLLActi | |||||||
| 			originalBitmap = null; | 			originalBitmap = null; | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  | 	 | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,14 +1,19 @@ | |||||||
| package cc.winboll.studio.powerbell.activities; | package cc.winboll.studio.powerbell.activities; | ||||||
|  |  | ||||||
| import android.app.Activity; |  | ||||||
| import android.os.Bundle; |  | ||||||
| import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * @Author ZhanGSKen<zhangsken@188.com> |  * @Author ZhanGSKen<zhangsken@188.com> | ||||||
|  * @Date 2025/06/19 20:35 |  * @Date 2025/06/19 20:35 | ||||||
|  * @Describe 应用窗口基类 |  * @Describe 应用窗口基类 | ||||||
|  */ |  */ | ||||||
|  | import android.app.Activity; | ||||||
|  | import android.os.Bundle; | ||||||
|  | import android.view.MenuItem; | ||||||
|  | import cc.winboll.studio.libappbase.GlobalApplication; | ||||||
|  | import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity; | ||||||
|  | import cc.winboll.studio.powerbell.App; | ||||||
|  | import cc.winboll.studio.powerbell.MainActivity; | ||||||
|  | import cc.winboll.studio.powerbell.R; | ||||||
|  |  | ||||||
| public abstract class WinBoLLActivity extends Activity implements IWinBoLLActivity { | public abstract class WinBoLLActivity extends Activity implements IWinBoLLActivity { | ||||||
|  |  | ||||||
|     public static final String TAG = "WinBoLLActivity"; |     public static final String TAG = "WinBoLLActivity"; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 ZhanGSKen
					ZhanGSKen