Compare commits
	
		
			17 Commits
		
	
	
		
			powerbell-
			...
			cdfbb082d2
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					cdfbb082d2 | ||
| 
						 | 
					7e476894a7 | ||
| 
						 | 
					80201e8370 | ||
| 
						 | 
					ea0473606a | ||
| 
						 | 
					eb61eb7306 | ||
| 
						 | 
					31ad66685c | ||
| 
						 | 
					beb561ad6a | ||
| 
						 | 
					8869265d60 | ||
| 
						 | 
					07b5e66875 | ||
| 
						 | 
					91f5cf9051 | ||
| 
						 | 
					f8944490f8 | ||
| 
						 | 
					733af004f6 | ||
| 
						 | 
					c03568e1f5 | ||
| 
						 | 
					a0575a5e8b | ||
| 
						 | 
					0e57ce679e | ||
| 
						 | 
					f9211a8eb4 | ||
| 
						 | 
					4c31ff9b54 | 
@@ -45,9 +45,9 @@ android {
 | 
			
		||||
 | 
			
		||||
dependencies {
 | 
			
		||||
    api fileTree(dir: 'libs', include: ['*.jar'])
 | 
			
		||||
    api 'cc.winboll.studio:libaes:15.9.1'
 | 
			
		||||
    api 'cc.winboll.studio:libapputils:15.8.4'
 | 
			
		||||
    api 'cc.winboll.studio:libappbase:15.8.4'
 | 
			
		||||
    api 'cc.winboll.studio:libaes:15.9.3'
 | 
			
		||||
    api 'cc.winboll.studio:libapputils:15.8.5'
 | 
			
		||||
    api 'cc.winboll.studio:libappbase:15.9.5'
 | 
			
		||||
    
 | 
			
		||||
    // 吐司提示库
 | 
			
		||||
    api 'com.github.getActivity:ToastUtils:10.5'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
#Created by .winboll/winboll_app_build.gradle
 | 
			
		||||
#Sun Jun 22 16:21:12 HKT 2025
 | 
			
		||||
stageCount=5
 | 
			
		||||
#Wed Sep 03 20:59:53 HKT 2025
 | 
			
		||||
stageCount=13
 | 
			
		||||
libraryProject=
 | 
			
		||||
baseVersion=15.4
 | 
			
		||||
publishVersion=15.4.4
 | 
			
		||||
publishVersion=15.4.12
 | 
			
		||||
buildCount=0
 | 
			
		||||
baseBetaVersion=15.4.5
 | 
			
		||||
baseBetaVersion=15.4.13
 | 
			
		||||
 
 | 
			
		||||
@@ -53,11 +53,11 @@ public class AboutActivity extends Activity {
 | 
			
		||||
        appInfo.setAppName(getString(R.string.app_name));
 | 
			
		||||
        appInfo.setAppIcon(R.drawable.ic_launcher);
 | 
			
		||||
        appInfo.setAppDescription(getString(R.string.app_description));
 | 
			
		||||
        appInfo.setAppGitName("APP");
 | 
			
		||||
        appInfo.setAppGitName("APPBase");
 | 
			
		||||
        appInfo.setAppGitOwner("Studio");
 | 
			
		||||
        appInfo.setAppGitAPPBranch(szBranchName);
 | 
			
		||||
        appInfo.setAppGitAPPSubProjectFolder(szBranchName);
 | 
			
		||||
        appInfo.setAppHomePage("https://www.winboll.cc/studio/details.php?app=PowerBell");
 | 
			
		||||
        appInfo.setAppHomePage("https://discuz.winboll.cc/forum.php?mod=viewthread&tid=1");
 | 
			
		||||
        appInfo.setAppAPKName("PowerBell");
 | 
			
		||||
        appInfo.setAppAPKFolderName("PowerBell");
 | 
			
		||||
        return new AboutView(mContext, appInfo);
 | 
			
		||||
 
 | 
			
		||||
@@ -14,6 +14,7 @@ import android.os.Bundle;
 | 
			
		||||
import android.provider.MediaStore;
 | 
			
		||||
import android.view.View;
 | 
			
		||||
import android.widget.ImageView;
 | 
			
		||||
import android.widget.RelativeLayout;
 | 
			
		||||
import androidx.core.app.ActivityCompat;
 | 
			
		||||
import androidx.core.content.ContextCompat;
 | 
			
		||||
import cc.winboll.studio.libaes.views.AToolbar;
 | 
			
		||||
@@ -32,10 +33,8 @@ import java.io.FileNotFoundException;
 | 
			
		||||
import java.io.FileOutputStream;
 | 
			
		||||
import java.io.IOException;
 | 
			
		||||
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 BackgroundPictureUtils mBackgroundPictureUtils;
 | 
			
		||||
@@ -60,6 +59,16 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic
 | 
			
		||||
    private int mnPictureCompress = 100;
 | 
			
		||||
    private static String _RecivedPictureFileName;
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	public Activity getActivity() {
 | 
			
		||||
		return this;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	public String getTag() {
 | 
			
		||||
		return TAG;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    protected void onCreate(Bundle savedInstanceState) {
 | 
			
		||||
        super.onCreate(savedInstanceState);
 | 
			
		||||
@@ -106,7 +115,7 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic
 | 
			
		||||
        findViewById(R.id.activitybackgroundpictureAButton6).setOnClickListener(onCropFreePictureClickListener);
 | 
			
		||||
		findViewById(R.id.activitybackgroundpictureAButton7).setOnClickListener(onPixelPickerClickListener);
 | 
			
		||||
		findViewById(R.id.activitybackgroundpictureAButton8).setOnClickListener(onCleanPixelClickListener);
 | 
			
		||||
		
 | 
			
		||||
 | 
			
		||||
        updatePreviewBackground();
 | 
			
		||||
 | 
			
		||||
        // 处理分享的图片
 | 
			
		||||
@@ -161,7 +170,7 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic
 | 
			
		||||
                    //drawable.setAlpha(120);
 | 
			
		||||
                    ivPreviewBackground.setImageDrawable(drawable);
 | 
			
		||||
                }
 | 
			
		||||
                ToastUtils.show("背景图片已更新");
 | 
			
		||||
                //ToastUtils.show("背景图片已更新");
 | 
			
		||||
            } catch (IOException e) {
 | 
			
		||||
                LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
 | 
			
		||||
                ToastUtils.show("背景图片加载失败");
 | 
			
		||||
@@ -255,7 +264,7 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic
 | 
			
		||||
            updatePreviewBackground();
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
	private View.OnClickListener onPixelPickerClickListener = new View.OnClickListener() {
 | 
			
		||||
        @Override
 | 
			
		||||
        public void onClick(View v) {
 | 
			
		||||
@@ -264,11 +273,11 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic
 | 
			
		||||
			String imagePath = mfRecivedCropPicture.toString();
 | 
			
		||||
			Intent intent = new Intent(getApplicationContext(), PixelPickerActivity.class);
 | 
			
		||||
			intent.putExtra("imagePath", imagePath);
 | 
			
		||||
			//startActivity(intent);
 | 
			
		||||
            App.getWinBoLLActivityManager().startWinBoLLActivity(getApplicationContext(), intent, PixelPickerActivity.class);
 | 
			
		||||
			startActivity(intent);
 | 
			
		||||
            //App.getWinBoLLActivityManager().startWinBoLLActivity(getActivity(), intent, PixelPickerActivity.class);
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
	private View.OnClickListener onCleanPixelClickListener = new View.OnClickListener() {
 | 
			
		||||
        @Override
 | 
			
		||||
        public void onClick(View v) {
 | 
			
		||||
@@ -520,11 +529,11 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic
 | 
			
		||||
                LogUtils.e(TAG, "剪裁保存异常" + e);
 | 
			
		||||
                ToastUtils.show("保存失败:" + e.getMessage());
 | 
			
		||||
            }/* finally {
 | 
			
		||||
                // 安全删除临时文件
 | 
			
		||||
                if (mfTempCropPicture.exists()) {
 | 
			
		||||
                    mfTempCropPicture.delete();
 | 
			
		||||
                }
 | 
			
		||||
            }*/
 | 
			
		||||
			 // 安全删除临时文件
 | 
			
		||||
			 if (mfTempCropPicture.exists()) {
 | 
			
		||||
			 mfTempCropPicture.delete();
 | 
			
		||||
			 }
 | 
			
		||||
			 }*/
 | 
			
		||||
        } else if (resultCode != RESULT_OK) {
 | 
			
		||||
            LogUtils.d(TAG, "操作取消或失败,requestCode: " + requestCode);
 | 
			
		||||
            ToastUtils.show("操作已取消");
 | 
			
		||||
@@ -566,7 +575,7 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
	void setBackgroundColor() {
 | 
			
		||||
		BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(BackgroundPictureActivity.this);
 | 
			
		||||
		BackgroundPictureBean bean = utils.getBackgroundPictureBean();
 | 
			
		||||
 
 | 
			
		||||
@@ -16,6 +16,7 @@ import cc.winboll.studio.powerbell.receivers.ControlCenterServiceReceiver;
 | 
			
		||||
import cc.winboll.studio.powerbell.utils.AppCacheUtils;
 | 
			
		||||
import cc.winboll.studio.powerbell.utils.StringUtils;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import android.widget.Switch;
 | 
			
		||||
 | 
			
		||||
public class ClearRecordActivity extends Activity {
 | 
			
		||||
 | 
			
		||||
@@ -24,6 +25,7 @@ public class ClearRecordActivity extends Activity {
 | 
			
		||||
    AToolbar mAToolbar;
 | 
			
		||||
    TextView mtvRecordText;
 | 
			
		||||
    App mApplication;
 | 
			
		||||
	boolean mIsShowRecordWithEnter = false;
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    protected void onCreate(Bundle savedInstanceState) {
 | 
			
		||||
@@ -47,7 +49,7 @@ public class ClearRecordActivity extends Activity {
 | 
			
		||||
                    finish();
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
        // 设置滑动清理控件
 | 
			
		||||
        //
 | 
			
		||||
        // 初始化发送拉动控件
 | 
			
		||||
@@ -79,7 +81,18 @@ public class ClearRecordActivity extends Activity {
 | 
			
		||||
 | 
			
		||||
    void initRecordText() {
 | 
			
		||||
        ArrayList<BatteryInfoBean> listBatteryInfo = AppCacheUtils.getInstance(this).getArrayListBatteryInfo();
 | 
			
		||||
        String szRecordText = StringUtils.formatPCMListString(listBatteryInfo);
 | 
			
		||||
        mtvRecordText.setText(szRecordText);
 | 
			
		||||
		if (mIsShowRecordWithEnter) {
 | 
			
		||||
			String szRecordText = StringUtils.formatPCMListStringWithEnter(listBatteryInfo);
 | 
			
		||||
			mtvRecordText.setText(szRecordText);
 | 
			
		||||
		} else {
 | 
			
		||||
			String szRecordText = StringUtils.formatPCMListString(listBatteryInfo);
 | 
			
		||||
			mtvRecordText.setText(szRecordText);
 | 
			
		||||
		}
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
	public void onShowRecordWithEnter(View view) {
 | 
			
		||||
		Switch swShowRecordWithEnter = (Switch)view;
 | 
			
		||||
		mIsShowRecordWithEnter = swShowRecordWithEnter.isChecked();
 | 
			
		||||
		initRecordText();
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -10,16 +10,20 @@ import android.graphics.Bitmap;
 | 
			
		||||
import android.graphics.BitmapFactory;
 | 
			
		||||
import android.graphics.Color;
 | 
			
		||||
import android.os.Bundle;
 | 
			
		||||
import android.view.MenuItem;
 | 
			
		||||
import android.view.MotionEvent;
 | 
			
		||||
import android.view.View;
 | 
			
		||||
import android.view.ViewGroup;
 | 
			
		||||
import android.widget.Button;
 | 
			
		||||
import android.widget.ImageView;
 | 
			
		||||
import android.widget.RelativeLayout;
 | 
			
		||||
import android.widget.TextView;
 | 
			
		||||
import android.widget.Toast;
 | 
			
		||||
import cc.winboll.studio.libaes.views.AToolbar;
 | 
			
		||||
import cc.winboll.studio.libappbase.GlobalApplication;
 | 
			
		||||
import cc.winboll.studio.libappbase.winboll.IWinBoLLActivity;
 | 
			
		||||
import cc.winboll.studio.powerbell.MainActivity;
 | 
			
		||||
import cc.winboll.studio.powerbell.R;
 | 
			
		||||
import cc.winboll.studio.powerbell.activities.BackgroundPictureActivity;
 | 
			
		||||
import cc.winboll.studio.powerbell.activities.PixelPickerActivity;
 | 
			
		||||
import cc.winboll.studio.powerbell.beans.BackgroundPictureBean;
 | 
			
		||||
import cc.winboll.studio.powerbell.utils.BackgroundPictureUtils;
 | 
			
		||||
@@ -41,9 +45,7 @@ public class PixelPickerActivity extends WinBoLLActivity implements IWinBoLLActi
 | 
			
		||||
		return TAG;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	private AToolbar mAToolbar;
 | 
			
		||||
	private ImageView imageView;
 | 
			
		||||
	private Bitmap originalBitmap;
 | 
			
		||||
	private TextView infoText;
 | 
			
		||||
@@ -54,6 +56,19 @@ public class PixelPickerActivity extends WinBoLLActivity implements IWinBoLLActi
 | 
			
		||||
		super.onCreate(savedInstanceState);
 | 
			
		||||
		setContentView(R.layout.activity_pixelpicker);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        // 初始化工具栏
 | 
			
		||||
        mAToolbar = (AToolbar) findViewById(R.id.toolbar);
 | 
			
		||||
        setActionBar(mAToolbar);
 | 
			
		||||
        mAToolbar.setSubtitle(R.string.subtitle_activity_pixelpicker);
 | 
			
		||||
        getActionBar().setDisplayHomeAsUpEnabled(true);
 | 
			
		||||
        mAToolbar.setNavigationOnClickListener(new View.OnClickListener() {
 | 
			
		||||
                @Override
 | 
			
		||||
                public void onClick(View v) {
 | 
			
		||||
                    finish();
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
		imageView = findViewById(R.id.imageView);
 | 
			
		||||
		infoText = findViewById(R.id.infoText);
 | 
			
		||||
		imageContainer = findViewById(R.id.imageContainer);
 | 
			
		||||
@@ -149,7 +164,7 @@ public class PixelPickerActivity extends WinBoLLActivity implements IWinBoLLActi
 | 
			
		||||
	 * 显示像素对话框
 | 
			
		||||
	 */
 | 
			
		||||
	private void showPixelDialog(final int pixelColor, int x, int y) {
 | 
			
		||||
		Dialog dialog = new Dialog(this);
 | 
			
		||||
		final Dialog dialog = new Dialog(this);
 | 
			
		||||
		dialog.setContentView(R.layout.dialog_pixel);
 | 
			
		||||
		dialog.setCancelable(true);
 | 
			
		||||
 | 
			
		||||
@@ -182,6 +197,7 @@ public class PixelPickerActivity extends WinBoLLActivity implements IWinBoLLActi
 | 
			
		||||
					bean.setPixelColor(pixelColor);
 | 
			
		||||
					utils.saveData();
 | 
			
		||||
					Toast.makeText(PixelPickerActivity.this, "已记录像素值", Toast.LENGTH_SHORT).show();
 | 
			
		||||
					setBackgroundColor();
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
 | 
			
		||||
@@ -197,6 +213,38 @@ public class PixelPickerActivity extends WinBoLLActivity implements IWinBoLLActi
 | 
			
		||||
			originalBitmap = null;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	void setBackgroundColor() {
 | 
			
		||||
		BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(PixelPickerActivity.this);
 | 
			
		||||
		BackgroundPictureBean bean = utils.getBackgroundPictureBean();
 | 
			
		||||
		int nPixelColor = bean.getPixelColor();
 | 
			
		||||
		RelativeLayout mainLayout = findViewById(R.id.activitypixelpickerRelativeLayout1);
 | 
			
		||||
		mainLayout.setBackgroundColor(nPixelColor);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	protected void onResume() {
 | 
			
		||||
		super.onResume();
 | 
			
		||||
		setBackgroundColor();
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public boolean onOptionsItemSelected(MenuItem item) {
 | 
			
		||||
        if (item.getItemId() == android.R.id.home) {
 | 
			
		||||
            GlobalApplication.getWinBoLLActivityManager().startWinBoLLActivity(getApplicationContext(), BackgroundPictureActivity.class);
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
        // 在switch语句中处理每个ID,并在处理完后返回true,未处理的情况返回false。
 | 
			
		||||
        return super.onOptionsItemSelected(item);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	public void onBackPressed() {
 | 
			
		||||
		super.onBackPressed();
 | 
			
		||||
		GlobalApplication.getWinBoLLActivityManager().startWinBoLLActivity(getApplicationContext(), BackgroundPictureActivity.class);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,14 +1,19 @@
 | 
			
		||||
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>
 | 
			
		||||
 * @Date 2025/06/19 20:35
 | 
			
		||||
 * @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 static final String TAG = "WinBoLLActivity";
 | 
			
		||||
@@ -17,4 +22,32 @@ public abstract class WinBoLLActivity extends Activity implements IWinBoLLActivi
 | 
			
		||||
    protected void onCreate(Bundle savedInstanceState) {
 | 
			
		||||
        super.onCreate(savedInstanceState);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    protected void onPostCreate(Bundle savedInstanceState) {
 | 
			
		||||
        super.onPostCreate(savedInstanceState);
 | 
			
		||||
        GlobalApplication.getWinBoLLActivityManager().add(this);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    protected void onDestroy() {
 | 
			
		||||
        super.onDestroy();
 | 
			
		||||
        GlobalApplication.getWinBoLLActivityManager().registeRemove(this);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public boolean onOptionsItemSelected(MenuItem item) {
 | 
			
		||||
        if (item.getItemId() == android.R.id.home) {
 | 
			
		||||
            GlobalApplication.getWinBoLLActivityManager().startWinBoLLActivity(getApplicationContext(), MainActivity.class);
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
        // 在switch语句中处理每个ID,并在处理完后返回true,未处理的情况返回false。
 | 
			
		||||
        return super.onOptionsItemSelected(item);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	public void onBackPressed() {
 | 
			
		||||
		super.onBackPressed();
 | 
			
		||||
		GlobalApplication.getWinBoLLActivityManager().startWinBoLLActivity(getApplicationContext(), MainActivity.class);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -37,6 +37,15 @@ public class StringUtils {
 | 
			
		||||
        }
 | 
			
		||||
        return sz;
 | 
			
		||||
    }
 | 
			
		||||
	
 | 
			
		||||
	public static String formatPCMListStringWithEnter(ArrayList<BatteryInfoBean> arrayListBatteryInfo) {
 | 
			
		||||
        String sz = "";
 | 
			
		||||
        for (int i = 0; i < arrayListBatteryInfo.size() - 1; i++) {
 | 
			
		||||
            //LogUtils.d(TAG, "arrayListBatteryInfo.get(i).getBattetyValue() is "+ Integer.toString(arrayListBatteryInfo.get(i).getBattetyValue()));
 | 
			
		||||
            sz = "\n" + arrayListBatteryInfo.get(i).getBattetyValue() + "%\n        " + getTimespanDifference(arrayListBatteryInfo.get(i).getTimeStamp(), arrayListBatteryInfo.get(i + 1).getTimeStamp()) + " " + sz;
 | 
			
		||||
        }
 | 
			
		||||
        return sz;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // 获取时间之间的时间跨度字符串。
 | 
			
		||||
    // Get timespan string between times.
 | 
			
		||||
 
 | 
			
		||||
@@ -25,12 +25,19 @@
 | 
			
		||||
 | 
			
		||||
	</LinearLayout>
 | 
			
		||||
 | 
			
		||||
	<TextView
 | 
			
		||||
		android:layout_width="wrap_content"
 | 
			
		||||
	<LinearLayout
 | 
			
		||||
		android:orientation="horizontal"
 | 
			
		||||
		android:layout_width="match_parent"
 | 
			
		||||
		android:layout_height="wrap_content"
 | 
			
		||||
		android:id="@+id/activityclearrecordTextView1"
 | 
			
		||||
		android:gravity="center_horizontal"
 | 
			
		||||
		android:layout_gravity="center_horizontal"/>
 | 
			
		||||
		android:gravity="center_horizontal">
 | 
			
		||||
 | 
			
		||||
		<TextView
 | 
			
		||||
			android:layout_width="wrap_content"
 | 
			
		||||
			android:layout_height="wrap_content"
 | 
			
		||||
			android:id="@+id/activityclearrecordTextView1"
 | 
			
		||||
			android:textAppearance="?android:attr/textAppearanceSmall"/>
 | 
			
		||||
 | 
			
		||||
	</LinearLayout>
 | 
			
		||||
 | 
			
		||||
	<LinearLayout
 | 
			
		||||
		android:orientation="vertical"
 | 
			
		||||
@@ -40,12 +47,32 @@
 | 
			
		||||
		android:layout_weight="1.0"
 | 
			
		||||
		android:background="@drawable/bg_frame">
 | 
			
		||||
 | 
			
		||||
		<TextView
 | 
			
		||||
		<LinearLayout
 | 
			
		||||
			android:orientation="horizontal"
 | 
			
		||||
			android:layout_width="match_parent"
 | 
			
		||||
			android:layout_height="wrap_content"
 | 
			
		||||
			android:text="Record Text"
 | 
			
		||||
			android:textStyle="bold"
 | 
			
		||||
			android:gravity="center_horizontal"/>
 | 
			
		||||
			android:gravity="center_horizontal">
 | 
			
		||||
 | 
			
		||||
			<TextView
 | 
			
		||||
				android:layout_width="0dp"
 | 
			
		||||
				android:layout_height="wrap_content"
 | 
			
		||||
				android:text="Record Text"
 | 
			
		||||
				android:textStyle="bold"
 | 
			
		||||
				android:gravity="center_horizontal"
 | 
			
		||||
				android:layout_weight="1.0"
 | 
			
		||||
				android:layout_marginLeft="10dp"
 | 
			
		||||
				android:background="#FFD5D5D5"/>
 | 
			
		||||
 | 
			
		||||
			<Switch
 | 
			
		||||
				android:layout_width="wrap_content"
 | 
			
		||||
				android:layout_height="wrap_content"
 | 
			
		||||
				android:text="<↲>"
 | 
			
		||||
				android:id="@+id/activityclearrecordSwitch1"
 | 
			
		||||
				android:onClick="onShowRecordWithEnter"
 | 
			
		||||
				android:layout_marginLeft="10dp"
 | 
			
		||||
				android:layout_marginRight="10dp"/>
 | 
			
		||||
 | 
			
		||||
		</LinearLayout>
 | 
			
		||||
 | 
			
		||||
		<ScrollView
 | 
			
		||||
			android:layout_width="match_parent"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,31 +1,54 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
 | 
			
		||||
    android:layout_width="match_parent"
 | 
			
		||||
    android:layout_height="match_parent">
 | 
			
		||||
<LinearLayout
 | 
			
		||||
	xmlns:android="http://schemas.android.com/apk/res/android"
 | 
			
		||||
	xmlns:app="http://schemas.android.com/apk/res-auto"
 | 
			
		||||
	android:layout_width="match_parent"
 | 
			
		||||
	android:layout_height="match_parent"
 | 
			
		||||
	android:orientation="vertical">
 | 
			
		||||
 | 
			
		||||
    <FrameLayout
 | 
			
		||||
        android:id="@+id/imageContainer"
 | 
			
		||||
        android:layout_width="match_parent"
 | 
			
		||||
        android:layout_height="match_parent">
 | 
			
		||||
	<cc.winboll.studio.libaes.views.AToolbar
 | 
			
		||||
		android:layout_width="match_parent"
 | 
			
		||||
		android:layout_height="@dimen/toolbar_height"
 | 
			
		||||
		android:id="@+id/toolbar"
 | 
			
		||||
		android:gravity="center_vertical"
 | 
			
		||||
		style="@style/DefaultAToolbar"/>
 | 
			
		||||
 | 
			
		||||
        <ImageView
 | 
			
		||||
            android:id="@+id/imageView"
 | 
			
		||||
            android:layout_width="match_parent"
 | 
			
		||||
            android:layout_height="match_parent"
 | 
			
		||||
            android:layout_gravity="center"
 | 
			
		||||
            android:scaleType="centerCrop"
 | 
			
		||||
            android:src="@drawable/ic_launcher" />
 | 
			
		||||
    </FrameLayout>
 | 
			
		||||
	<RelativeLayout
 | 
			
		||||
		android:layout_width="match_parent"
 | 
			
		||||
		android:layout_height="0dp"
 | 
			
		||||
		android:layout_weight="1.0">
 | 
			
		||||
 | 
			
		||||
    <TextView
 | 
			
		||||
        android:id="@+id/infoText"
 | 
			
		||||
        android:layout_width="wrap_content"
 | 
			
		||||
        android:layout_height="wrap_content"
 | 
			
		||||
        android:layout_alignParentBottom="true"
 | 
			
		||||
        android:layout_centerHorizontal="true"
 | 
			
		||||
        android:padding="10dp"
 | 
			
		||||
        android:background="#80000000"
 | 
			
		||||
        android:textColor="#FFFFFF"
 | 
			
		||||
        android:text="点击图片获取像素值" />
 | 
			
		||||
</RelativeLayout>
 | 
			
		||||
		<RelativeLayout
 | 
			
		||||
			android:layout_width="match_parent"
 | 
			
		||||
			android:layout_height="match_parent"
 | 
			
		||||
			android:background="#FFEE2121"
 | 
			
		||||
			android:id="@+id/activitypixelpickerRelativeLayout1"/>
 | 
			
		||||
 | 
			
		||||
		<FrameLayout
 | 
			
		||||
			android:id="@+id/imageContainer"
 | 
			
		||||
			android:layout_width="match_parent"
 | 
			
		||||
			android:layout_height="match_parent">
 | 
			
		||||
 | 
			
		||||
			<ImageView
 | 
			
		||||
				android:id="@+id/imageView"
 | 
			
		||||
				android:layout_width="match_parent"
 | 
			
		||||
				android:layout_height="match_parent"
 | 
			
		||||
				android:src="@drawable/ic_launcher"/>
 | 
			
		||||
 | 
			
		||||
		</FrameLayout>
 | 
			
		||||
 | 
			
		||||
		<TextView
 | 
			
		||||
			android:id="@+id/infoText"
 | 
			
		||||
			android:layout_width="wrap_content"
 | 
			
		||||
			android:layout_height="wrap_content"
 | 
			
		||||
			android:layout_alignParentBottom="true"
 | 
			
		||||
			android:layout_centerHorizontal="true"
 | 
			
		||||
			android:padding="10dp"
 | 
			
		||||
			android:background="#80000000"
 | 
			
		||||
			android:textColor="#FFFFFF"
 | 
			
		||||
			android:text="点击图片获取像素值"/>
 | 
			
		||||
 | 
			
		||||
	</RelativeLayout>
 | 
			
		||||
 | 
			
		||||
</LinearLayout>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -15,6 +15,7 @@
 | 
			
		||||
    <string name="texthint_CustomSlideToCleanRecord">Slide Right To Clean Up APP Record.</string>
 | 
			
		||||
    <string name="subtitle_activity_clearrecord">清理记录</string>
 | 
			
		||||
    <string name="subtitle_activity_backgroundpicture">更换背景图片</string>
 | 
			
		||||
    <string name="subtitle_activity_pixelpicker">背景像素拾取</string>
 | 
			
		||||
    <string name="subtitle_activity_about">关于应用</string>
 | 
			
		||||
    <string name="msg_AOHPCTCSeekBar_ClearRecord">>>>Seek 100% To Clear Battery Record.>>></string>
 | 
			
		||||
	<string name="msg_AOHPCTCSeekBar_ClearRecord">>>>向右滑动100%可以清理电量记录。>>></string>
 | 
			
		||||
</resources>
 | 
			
		||||
 
 | 
			
		||||
@@ -18,6 +18,7 @@
 | 
			
		||||
    <string name="texthint_CustomSlideToCleanRecord">Slide Right To Clean Up APP Record.</string>
 | 
			
		||||
    <string name="subtitle_activity_clearrecord">Clean Record</string>
 | 
			
		||||
    <string name="subtitle_activity_backgroundpicture">Background Picture</string>
 | 
			
		||||
    <string name="subtitle_activity_pixelpicker">Pixel Picker</string>
 | 
			
		||||
    <string name="subtitle_activity_about">About The APP</string>
 | 
			
		||||
    <string name="msg_AOHPCTCSeekBar_ClearRecord">>>>Seek 100% To Clear Battery Record.>>></string>
 | 
			
		||||
    <string name="msg_AOHPCTCSeekBar_ClearRecord">>>>Seek 100% Right Is Clean Record.>>></string>
 | 
			
		||||
</resources>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user