固定参数属性初始化方法综合
This commit is contained in:
parent
e1dadfa41c
commit
0460613aea
@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Mon Apr 14 14:22:32 GMT 2025
|
||||
#Tue Apr 15 12:41:31 GMT 2025
|
||||
stageCount=3
|
||||
libraryProject=
|
||||
baseVersion=15.2
|
||||
publishVersion=15.2.2
|
||||
buildCount=6
|
||||
buildCount=9
|
||||
baseBetaVersion=15.2.3
|
||||
|
@ -59,11 +59,13 @@ implements BackgroundPicturePreviewDialog.IOnRecivedPictureListener {
|
||||
static String _mszCommonFileType = "jpeg";
|
||||
// 背景图片的压缩比
|
||||
int mnPictureCompress = 100;
|
||||
static String _RecivedPictureFileName;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_backgroundpicture);
|
||||
initEnv();
|
||||
|
||||
mBackgroundPictureUtils = BackgroundPictureUtils.getInstance(this);
|
||||
mfBackgroundDir = new File(mBackgroundPictureUtils.getBackgroundDir());
|
||||
@ -130,6 +132,10 @@ implements BackgroundPicturePreviewDialog.IOnRecivedPictureListener {
|
||||
dlg.show();
|
||||
}
|
||||
}
|
||||
|
||||
void initEnv() {
|
||||
_RecivedPictureFileName = "Recived.data";
|
||||
}
|
||||
|
||||
public static String getBackgroundFileName() {
|
||||
return _mszRecivedCropPicture;
|
||||
@ -331,10 +337,9 @@ implements BackgroundPicturePreviewDialog.IOnRecivedPictureListener {
|
||||
}
|
||||
|
||||
public static File getRecivedPictureFile(Context context) {
|
||||
String szRecivedPictureFileName = "Recived.data";
|
||||
BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(context);
|
||||
utils.loadBackgroundPictureBean();
|
||||
return new File(utils.getBackgroundDir(), szRecivedPictureFileName);
|
||||
return new File(utils.getBackgroundDir(), _RecivedPictureFileName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -37,6 +37,8 @@ public class BackgroundPicturePreviewDialog extends Dialog {
|
||||
public BackgroundPicturePreviewDialog(Context context) {
|
||||
super(context);
|
||||
setContentView(R.layout.dialog_backgroundpicturepreview);
|
||||
initEnv();
|
||||
|
||||
mContext = context;
|
||||
mBackgroundPictureUtils = ((BackgroundPictureActivity)context).mBackgroundPictureUtils;
|
||||
|
||||
@ -68,6 +70,10 @@ public class BackgroundPicturePreviewDialog extends Dialog {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void initEnv() {
|
||||
mszPreReceivedFileName = "PreReceived.data";
|
||||
}
|
||||
|
||||
void copyAndViewRecivePicture(ImageView imageView) {
|
||||
//AppConfigUtils appConfigUtils = AppConfigUtils.getInstance((GlobalApplication)mContext.getApplicationContext());
|
||||
@ -87,7 +93,6 @@ public class BackgroundPicturePreviewDialog extends Dialog {
|
||||
}
|
||||
|
||||
File fSrcImage = new File(szSrcImage);
|
||||
mszPreReceivedFileName = "PreReceived.data";
|
||||
//mszPreReceivedFileName = DateUtils.getDateNowString() + "-" + fSrcImage.getName();
|
||||
File mfPreReceivedPhoto = new File(activity.mBackgroundPictureUtils.getBackgroundDir(), mszPreReceivedFileName);
|
||||
// 复制源图片到剪裁文件
|
||||
@ -96,7 +101,7 @@ public class BackgroundPicturePreviewDialog extends Dialog {
|
||||
LogUtils.d(TAG, "copyFileUsingFileChannels");
|
||||
Drawable drawable = Drawable.createFromPath(mfPreReceivedPhoto.getPath());
|
||||
imageView.setBackground(drawable);
|
||||
LogUtils.d(TAG, "mszPreReceivedFileName : " + mszPreReceivedFileName);
|
||||
//LogUtils.d(TAG, "mszPreReceivedFileName : " + mszPreReceivedFileName);
|
||||
} catch (IOException e) {
|
||||
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ import java.io.File;
|
||||
|
||||
public class MainViewFragment extends Fragment {
|
||||
|
||||
public static final String TAG = MainViewFragment.class.getSimpleName();
|
||||
public static final String TAG = "MainViewFragment";
|
||||
|
||||
public static final int MSG_RELOAD_APPCONFIG = 0;
|
||||
public static final int MSG_CURRENTVALUEBATTERY = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user