整合应用相框框架调整,加快启动页加载速度。
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
#Created by .winboll/winboll_app_build.gradle
|
#Created by .winboll/winboll_app_build.gradle
|
||||||
#Wed Dec 10 16:20:34 HKT 2025
|
#Wed Dec 10 08:50:13 GMT 2025
|
||||||
stageCount=4
|
stageCount=4
|
||||||
libraryProject=
|
libraryProject=
|
||||||
baseVersion=15.12
|
baseVersion=15.12
|
||||||
publishVersion=15.12.3
|
publishVersion=15.12.3
|
||||||
buildCount=0
|
buildCount=3
|
||||||
baseBetaVersion=15.12.4
|
baseBetaVersion=15.12.4
|
||||||
|
|||||||
@@ -5,15 +5,25 @@ import android.app.Fragment;
|
|||||||
import android.app.FragmentTransaction;
|
import android.app.FragmentTransaction;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.Message;
|
||||||
import android.provider.MediaStore;
|
import android.provider.MediaStore;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.CheckBox;
|
||||||
|
import android.widget.CompoundButton;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
|
import android.widget.SeekBar;
|
||||||
|
import android.widget.Switch;
|
||||||
|
import android.widget.TextView;
|
||||||
import androidx.appcompat.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
|
|
||||||
import cc.winboll.studio.libaes.activitys.AboutActivity;
|
import cc.winboll.studio.libaes.activitys.AboutActivity;
|
||||||
import cc.winboll.studio.libaes.models.APPInfo;
|
import cc.winboll.studio.libaes.models.APPInfo;
|
||||||
import cc.winboll.studio.libaes.utils.AESThemeUtil;
|
import cc.winboll.studio.libaes.utils.AESThemeUtil;
|
||||||
@@ -28,9 +38,15 @@ import cc.winboll.studio.powerbell.activities.SettingsActivity;
|
|||||||
import cc.winboll.studio.powerbell.activities.WinBoLLActivity;
|
import cc.winboll.studio.powerbell.activities.WinBoLLActivity;
|
||||||
import cc.winboll.studio.powerbell.fragments.MainViewFragment;
|
import cc.winboll.studio.powerbell.fragments.MainViewFragment;
|
||||||
import cc.winboll.studio.powerbell.model.BackgroundBean;
|
import cc.winboll.studio.powerbell.model.BackgroundBean;
|
||||||
|
import cc.winboll.studio.powerbell.services.ControlCenterService;
|
||||||
import cc.winboll.studio.powerbell.unittest.MainUnitTestActivity;
|
import cc.winboll.studio.powerbell.unittest.MainUnitTestActivity;
|
||||||
|
import cc.winboll.studio.powerbell.utils.AppConfigUtils;
|
||||||
import cc.winboll.studio.powerbell.utils.BackgroundSourceUtils;
|
import cc.winboll.studio.powerbell.utils.BackgroundSourceUtils;
|
||||||
import cc.winboll.studio.powerbell.utils.PermissionUtils;
|
import cc.winboll.studio.powerbell.utils.PermissionUtils;
|
||||||
|
import cc.winboll.studio.powerbell.utils.ServiceUtils;
|
||||||
|
import cc.winboll.studio.powerbell.views.BackgroundView;
|
||||||
|
import cc.winboll.studio.powerbell.views.BatteryDrawable;
|
||||||
|
import cc.winboll.studio.powerbell.views.VerticalSeekBar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主活动类(修复小米广告SDK空Context崩溃问题)
|
* 主活动类(修复小米广告SDK空Context崩溃问题)
|
||||||
@@ -55,6 +71,47 @@ public class MainActivity extends WinBoLLActivity {
|
|||||||
private Toolbar mToolbar; // 顶部工具栏
|
private Toolbar mToolbar; // 顶部工具栏
|
||||||
private ADsBannerView mADsBannerView; // 广告Banner视图
|
private ADsBannerView mADsBannerView; // 广告Banner视图
|
||||||
|
|
||||||
|
public static final int MSG_RELOAD_APPCONFIG = 0;
|
||||||
|
public static final int MSG_CURRENTVALUEBATTERY = 1;
|
||||||
|
|
||||||
|
static MainViewFragment _mMainViewFragment;
|
||||||
|
AppConfigUtils mAppConfigUtils;
|
||||||
|
Drawable mDrawableFrame;
|
||||||
|
LinearLayout mllLeftSeekBar;
|
||||||
|
LinearLayout mllRightSeekBar;
|
||||||
|
CheckBox mcbIsEnableChargeReminder;
|
||||||
|
CheckBox mcbIsEnableUsegeReminder;
|
||||||
|
Switch mswIsEnableService;
|
||||||
|
TextView mtvTips;
|
||||||
|
|
||||||
|
private BackgroundSourceUtils mBgSourceUtils;
|
||||||
|
|
||||||
|
// 背景布局
|
||||||
|
//LinearLayout mLinearLayoutloadBackground;
|
||||||
|
|
||||||
|
// 现在电量图示
|
||||||
|
BatteryDrawable mCurrentValueBatteryDrawable;
|
||||||
|
// 现在充电提醒电量图示
|
||||||
|
BatteryDrawable mChargeReminderValueBatteryDrawable;
|
||||||
|
// 现在耗电提醒电量图示
|
||||||
|
BatteryDrawable mUsegeReminderValueBatteryDrawable;
|
||||||
|
|
||||||
|
ImageView mCurrentValueBatteryImageView;
|
||||||
|
ImageView mChargeReminderValueBatteryImageView;
|
||||||
|
ImageView mUsegeReminderValueBatteryImageView;
|
||||||
|
|
||||||
|
VerticalSeekBar mChargeReminderSeekBar;
|
||||||
|
ChargeReminderSeekBarChangeListener mChargeReminderSeekBarChangeListener;
|
||||||
|
TextView mtvChargeReminderValue;
|
||||||
|
|
||||||
|
|
||||||
|
VerticalSeekBar mUsegeReminderSeekBar;
|
||||||
|
UsegeReminderSeekBarChangeListener mUsegeReminderSeekBarChangeListener;
|
||||||
|
TextView mtvUsegeReminderValue;
|
||||||
|
CheckBox mcbUsegeReminderValue;
|
||||||
|
TextView mtvCurrentValue;
|
||||||
|
BackgroundView mBackgroundView;
|
||||||
|
|
||||||
|
|
||||||
// ======================== 重写父类抽象方法(优先排列,明确实现)========================
|
// ======================== 重写父类抽象方法(优先排列,明确实现)========================
|
||||||
@Override
|
@Override
|
||||||
@@ -76,7 +133,7 @@ public class MainActivity extends WinBoLLActivity {
|
|||||||
// 初始化视图与实例
|
// 初始化视图与实例
|
||||||
initView();
|
initView();
|
||||||
initInstance();
|
initInstance();
|
||||||
initFragment();
|
// initFragment();
|
||||||
|
|
||||||
// 权限申请
|
// 权限申请
|
||||||
PermissionUtils.getInstance().checkAndRequestStoragePermission(this);
|
PermissionUtils.getInstance().checkAndRequestStoragePermission(this);
|
||||||
@@ -211,11 +268,11 @@ public class MainActivity extends WinBoLLActivity {
|
|||||||
/**
|
/**
|
||||||
* 刷新背景(全局静态调用,带生命周期校验)
|
* 刷新背景(全局静态调用,带生命周期校验)
|
||||||
*/
|
*/
|
||||||
public static void reloadBackground() {
|
// public static void reloadBackground() {
|
||||||
if (_mMainActivity != null && !_mMainActivity.isFinishing() && !_mMainActivity.isDestroyed()) {
|
// if (_mMainActivity != null && !_mMainActivity.isFinishing() && !_mMainActivity.isDestroyed()) {
|
||||||
_mMainActivity.mMainViewFragment.reloadBackground();
|
// _mMainActivity.mMainViewFragment.reloadBackground();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置主页面背景颜色(从BackgroundBean获取颜色值)
|
* 设置主页面背景颜色(从BackgroundBean获取颜色值)
|
||||||
@@ -279,8 +336,224 @@ public class MainActivity extends WinBoLLActivity {
|
|||||||
* 初始化视图控件(findViewById)
|
* 初始化视图控件(findViewById)
|
||||||
*/
|
*/
|
||||||
private void initView() {
|
private void initView() {
|
||||||
|
mAppConfigUtils = App.getAppConfigUtils(getActivity());
|
||||||
|
mBgSourceUtils = BackgroundSourceUtils.getInstance(getActivity());
|
||||||
|
|
||||||
mADsBannerView = findViewById(R.id.adsbanner);
|
mADsBannerView = findViewById(R.id.adsbanner);
|
||||||
mToolbar = findViewById(R.id.toolbar);
|
mToolbar = findViewById(R.id.toolbar);
|
||||||
|
|
||||||
|
// 获取指定ID的View实例
|
||||||
|
mBackgroundView = findViewById(R.id.fragmentmainviewBackgroundView1);
|
||||||
|
|
||||||
|
loadBackground();
|
||||||
|
/*final View mainImageView = mView.findViewById(R.id.fragmentmainviewImageView1);
|
||||||
|
|
||||||
|
// 注册OnGlobalLayoutListener
|
||||||
|
mainImageView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||||
|
@Override
|
||||||
|
public void onGlobalLayout() {
|
||||||
|
// 获取宽度和高度
|
||||||
|
int width = mainImageView.getMeasuredWidth();
|
||||||
|
int height = mainImageView.getMeasuredHeight();
|
||||||
|
|
||||||
|
BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(getActivity());
|
||||||
|
BackgroundPictureBean bean = utils.loadBackgroundPictureBean();
|
||||||
|
bean.setBackgroundWidth(width);
|
||||||
|
bean.setBackgroundHeight(height);
|
||||||
|
utils.saveData();
|
||||||
|
// 移除监听器以避免内存泄漏
|
||||||
|
mainImageView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||||
|
}
|
||||||
|
});*/
|
||||||
|
|
||||||
|
mDrawableFrame = getActivity().getDrawable(R.drawable.bg_frame);
|
||||||
|
mllLeftSeekBar = (LinearLayout) findViewById(R.id.fragmentmainviewLinearLayout1);
|
||||||
|
mllRightSeekBar = (LinearLayout) findViewById(R.id.fragmentmainviewLinearLayout2);
|
||||||
|
|
||||||
|
// 初始化充电电量提醒设置控件
|
||||||
|
mtvChargeReminderValue = (TextView) findViewById(R.id.fragmentandroidviewTextView2);
|
||||||
|
mChargeReminderSeekBar = (VerticalSeekBar) findViewById(R.id.fragmentandroidviewVerticalSeekBar1);
|
||||||
|
mcbIsEnableChargeReminder = findViewById(R.id.fragmentmainviewCheckBox1);
|
||||||
|
|
||||||
|
// 初始化耗电电量提醒设置控件
|
||||||
|
mtvUsegeReminderValue = (TextView) findViewById(R.id.fragmentandroidviewTextView3);
|
||||||
|
mUsegeReminderSeekBar = (VerticalSeekBar) findViewById(R.id.fragmentandroidviewVerticalSeekBar2);
|
||||||
|
mcbIsEnableUsegeReminder = findViewById(R.id.fragmentmainviewCheckBox2);
|
||||||
|
|
||||||
|
// 初始化现在电量显示控件
|
||||||
|
mtvCurrentValue = (TextView) findViewById(R.id.fragmentandroidviewTextView4);
|
||||||
|
|
||||||
|
// 初始化服务总开关
|
||||||
|
mswIsEnableService = (Switch) findViewById(R.id.fragmentandroidviewSwitch1);
|
||||||
|
mtvTips = findViewById(R.id.fragmentandroidviewTextView1);
|
||||||
|
|
||||||
|
// 设置视图显示数据
|
||||||
|
setViewData();
|
||||||
|
// 设置视图控件响应
|
||||||
|
setViewListener();
|
||||||
|
|
||||||
|
// 注册一个广播接收
|
||||||
|
//mMainActivityReceiver = new MainActivityReceiver(this);
|
||||||
|
//mMainActivityReceiver.registerAction();
|
||||||
|
|
||||||
|
// 启动的时候检查一下服务
|
||||||
|
if (mAppConfigUtils.getIsEnableService()
|
||||||
|
&& ServiceUtils.isServiceAlive(getActivity(), ControlCenterService.class.getName()) == false) {
|
||||||
|
// 如果配置了服务启动,服务没有启动
|
||||||
|
// 就启动服务
|
||||||
|
Intent intent = new Intent(getActivity(), ControlCenterService.class);
|
||||||
|
getActivity().startForegroundService(intent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void loadBackground() {
|
||||||
|
BackgroundBean bean = mBgSourceUtils.getCurrentBackgroundBean();
|
||||||
|
mBackgroundView.loadBackgroundBean(bean);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setViewData() {
|
||||||
|
int nChargeReminderValue = mAppConfigUtils.getChargeReminderValue();
|
||||||
|
int nUsegeReminderValue = mAppConfigUtils.getUsegeReminderValue();
|
||||||
|
int nCurrentValue = mAppConfigUtils.getCurrentValue();
|
||||||
|
|
||||||
|
mllLeftSeekBar.setBackground(mDrawableFrame);
|
||||||
|
mllRightSeekBar.setBackground(mDrawableFrame);
|
||||||
|
|
||||||
|
// 初始化电量图
|
||||||
|
mCurrentValueBatteryDrawable = new BatteryDrawable(getActivity().getColor(R.color.colorCurrent));
|
||||||
|
mCurrentValueBatteryDrawable.setValue(mAppConfigUtils.getCurrentValue());
|
||||||
|
mCurrentValueBatteryImageView = findViewById(R.id.fragmentandroidviewImageView1);
|
||||||
|
mCurrentValueBatteryImageView.setImageDrawable(mCurrentValueBatteryDrawable);
|
||||||
|
|
||||||
|
// 初始化充电电量提醒图
|
||||||
|
mChargeReminderValueBatteryDrawable = new BatteryDrawable(getActivity().getColor(R.color.colorCharge));
|
||||||
|
mChargeReminderValueBatteryDrawable.setValue(nChargeReminderValue);
|
||||||
|
mChargeReminderValueBatteryImageView = findViewById(R.id.fragmentandroidviewImageView3);
|
||||||
|
mChargeReminderValueBatteryImageView.setImageDrawable(mChargeReminderValueBatteryDrawable);
|
||||||
|
|
||||||
|
// 初始化耗电电量提醒图
|
||||||
|
mUsegeReminderValueBatteryDrawable = new BatteryDrawable(getActivity().getColor(R.color.colorUsege));
|
||||||
|
mUsegeReminderValueBatteryDrawable.setValue(nUsegeReminderValue);
|
||||||
|
mUsegeReminderValueBatteryImageView = findViewById(R.id.fragmentandroidviewImageView2);
|
||||||
|
mUsegeReminderValueBatteryImageView.setImageDrawable(mUsegeReminderValueBatteryDrawable);
|
||||||
|
|
||||||
|
// 初始化充电电量提醒设置控件
|
||||||
|
mtvChargeReminderValue.setTextColor(getActivity().getColor(R.color.colorCharge));
|
||||||
|
//LogUtils.d(TAG, "Color.YELLOW is " + Integer.toString(mApplication.getColor(R.color.colorCharge)));
|
||||||
|
mtvChargeReminderValue.setText(Integer.toString(nChargeReminderValue) + "%");
|
||||||
|
mChargeReminderSeekBar.setProgress(nChargeReminderValue);
|
||||||
|
mcbIsEnableChargeReminder.setChecked(mAppConfigUtils.getIsEnableChargeReminder());
|
||||||
|
|
||||||
|
// 初始化耗电电量提醒设置控件
|
||||||
|
mtvUsegeReminderValue.setTextColor(getActivity().getColor(R.color.colorUsege));
|
||||||
|
mtvUsegeReminderValue.setText(Integer.toString(nUsegeReminderValue) + "%");
|
||||||
|
mUsegeReminderSeekBar.setProgress(nUsegeReminderValue);
|
||||||
|
mcbIsEnableUsegeReminder.setChecked(mAppConfigUtils.getIsEnableUsegeReminder());
|
||||||
|
|
||||||
|
// 初始化现在电量显示控件
|
||||||
|
mtvCurrentValue.setTextColor(getActivity().getColor(R.color.colorCurrent));
|
||||||
|
mtvCurrentValue.setText(Integer.toString(nCurrentValue) + "%");
|
||||||
|
|
||||||
|
// 初始化服务总开关
|
||||||
|
mswIsEnableService.setChecked(mAppConfigUtils.getIsEnableService());
|
||||||
|
if (mAppConfigUtils.getIsEnableService()) {
|
||||||
|
//LogUtils.d(TAG, "mApplication.getIsEnableService() " + Boolean.toString(mAppConfigUtils.getIsEnableService()));
|
||||||
|
ControlCenterService.startControlCenterService(getActivity());
|
||||||
|
} else {
|
||||||
|
//LogUtils.d(TAG, "mApplication.getIsEnableService() " + Boolean.toString(mAppConfigUtils.getIsEnableService()));
|
||||||
|
ControlCenterService.stopControlCenterService(getActivity());
|
||||||
|
}
|
||||||
|
mswIsEnableService.setText(getString(R.string.txt_aboveswitch));
|
||||||
|
mtvTips.setText(getString(R.string.txt_aboveswitchtips));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void setViewListener() {
|
||||||
|
// 初始化充电电量提醒设置控件
|
||||||
|
mChargeReminderSeekBarChangeListener = new ChargeReminderSeekBarChangeListener();
|
||||||
|
mChargeReminderSeekBar.setOnSeekBarChangeListener(mChargeReminderSeekBarChangeListener);
|
||||||
|
mcbIsEnableChargeReminder.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
LogUtils.d(TAG, "setIsEnableChargeReminder");
|
||||||
|
mAppConfigUtils.setIsEnableChargeReminder(mcbIsEnableChargeReminder.isChecked());
|
||||||
|
//ControlCenterService.updateIsEnableChargeReminder(mcbIsEnableChargeReminder.isChecked());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// 初始化耗电电量提醒设置控件
|
||||||
|
mUsegeReminderSeekBarChangeListener = new UsegeReminderSeekBarChangeListener();
|
||||||
|
mUsegeReminderSeekBar.setOnSeekBarChangeListener(mUsegeReminderSeekBarChangeListener);
|
||||||
|
mcbIsEnableUsegeReminder.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
LogUtils.d(TAG, "setIsEnableUsegeReminder");
|
||||||
|
mAppConfigUtils.setIsEnableUsegeReminder(mcbIsEnableUsegeReminder.isChecked());
|
||||||
|
//ControlCenterService.updateIsEnableUsegeReminder(mcbIsEnableUsegeReminder.isChecked());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 初始化服务总开关
|
||||||
|
mswIsEnableService.setOnClickListener(new CompoundButton.OnClickListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
mAppConfigUtils.setIsEnableService(getActivity(), mswIsEnableService.isChecked());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void setCurrentValueBattery(int value) {
|
||||||
|
//LogUtils.d(TAG, "setCurrentValueBattery");
|
||||||
|
mtvCurrentValue.setText(Integer.toString(value) + "%");
|
||||||
|
mCurrentValueBatteryDrawable.setValue(value);
|
||||||
|
mCurrentValueBatteryDrawable.invalidateSelf();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void reloadBackground() {
|
||||||
|
BackgroundSourceUtils utils = BackgroundSourceUtils.getInstance(getActivity());
|
||||||
|
utils.loadSettings();
|
||||||
|
BackgroundBean bean = utils.getCurrentBackgroundBean();
|
||||||
|
mBackgroundView.loadBackgroundBean(bean);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Handler _mHandler = new Handler(){
|
||||||
|
@Override
|
||||||
|
public void handleMessage(Message msg) {
|
||||||
|
switch (msg.what) {
|
||||||
|
case MSG_RELOAD_APPCONFIG : {
|
||||||
|
if (_mMainActivity != null) {
|
||||||
|
_mMainActivity.setViewData();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case MSG_CURRENTVALUEBATTERY : {
|
||||||
|
if (_mMainActivity != null) {
|
||||||
|
_mMainActivity.setCurrentValueBattery(msg.arg1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
super.handleMessage(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
public static void relaodAppConfigs() {
|
||||||
|
if (_mHandler != null) {
|
||||||
|
_mHandler.sendMessage(_mHandler.obtainMessage(MSG_RELOAD_APPCONFIG));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void sendMsgCurrentValueBattery(int value) {
|
||||||
|
if (_mHandler != null) {
|
||||||
|
Message msg = _mHandler.obtainMessage(MSG_CURRENTVALUEBATTERY);
|
||||||
|
msg.arg1 = value;
|
||||||
|
_mHandler.sendMessage(msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -297,13 +570,73 @@ public class MainActivity extends WinBoLLActivity {
|
|||||||
/**
|
/**
|
||||||
* 初始化主Fragment(添加并显示)
|
* 初始化主Fragment(添加并显示)
|
||||||
*/
|
*/
|
||||||
private void initFragment() {
|
// private void initFragment() {
|
||||||
if (mMainViewFragment == null) {
|
// if (mMainViewFragment == null) {
|
||||||
FragmentTransaction tx = getFragmentManager().beginTransaction();
|
// FragmentTransaction tx = getFragmentManager().beginTransaction();
|
||||||
mMainViewFragment = new MainViewFragment();
|
// mMainViewFragment = new MainViewFragment();
|
||||||
tx.add(R.id.activitymainFrameLayout1, mMainViewFragment, MainViewFragment.TAG);
|
// tx.add(R.id.activitymainFrameLayout1, mMainViewFragment, MainViewFragment.TAG);
|
||||||
tx.commit();
|
// tx.commit();
|
||||||
|
// }
|
||||||
|
// showFragment(mMainViewFragment);
|
||||||
|
// }
|
||||||
|
|
||||||
|
class ChargeReminderSeekBarChangeListener implements SeekBar.OnSeekBarChangeListener {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||||
|
//LogUtils.d(TAG, "call onProgressChanged");
|
||||||
|
int nChargeReminderValue = progress;
|
||||||
|
mtvChargeReminderValue.setText(Integer.toString(nChargeReminderValue) + "%");
|
||||||
|
mChargeReminderValueBatteryDrawable.setValue(nChargeReminderValue);
|
||||||
|
mChargeReminderValueBatteryDrawable.invalidateSelf();
|
||||||
}
|
}
|
||||||
showFragment(mMainViewFragment);
|
|
||||||
|
@Override
|
||||||
|
public void onStartTrackingTouch(SeekBar seekBar) {
|
||||||
|
//LogUtils.d(TAG, "call onStartTrackingTouch");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||||
|
//LogUtils.d(TAG, "call onStopTrackingTouch");
|
||||||
|
//取得当前进度条的刻度
|
||||||
|
int nChargeReminderValue = ((VerticalSeekBar)seekBar)._mnProgress;
|
||||||
|
|
||||||
|
mAppConfigUtils.setChargeReminderValue(nChargeReminderValue);
|
||||||
|
mtvChargeReminderValue.setText(Integer.toString(nChargeReminderValue) + "%");
|
||||||
|
//ControlCenterService.updateChargeReminderValue(nChargeReminderValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class UsegeReminderSeekBarChangeListener implements SeekBar.OnSeekBarChangeListener {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||||
|
//LogUtils.d(TAG, "call onProgressChanged");
|
||||||
|
int nUsegeReminderValue = progress;
|
||||||
|
mtvUsegeReminderValue.setText(Integer.toString(nUsegeReminderValue) + "%");
|
||||||
|
mUsegeReminderValueBatteryDrawable.setValue(nUsegeReminderValue);
|
||||||
|
mUsegeReminderValueBatteryDrawable.invalidateSelf();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStartTrackingTouch(SeekBar seekBar) {
|
||||||
|
//LogUtils.d(TAG, "call onStartTrackingTouch");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||||
|
//LogUtils.d(TAG, "call onStopTrackingTouch");
|
||||||
|
//取得当前进度条的刻度
|
||||||
|
int nUsegeReminderValue = ((VerticalSeekBar)seekBar)._mnProgress;
|
||||||
|
LogUtils.d(TAG, "nUsegeReminderValue is " + Integer.toString(nUsegeReminderValue));
|
||||||
|
//LogUtils.d(TAG, "mPowerReminder is " + mApplication);
|
||||||
|
mAppConfigUtils.setUsegeReminderValue(nUsegeReminderValue);
|
||||||
|
//LogUtils.d(TAG, "opopopopopopopop");
|
||||||
|
mtvUsegeReminderValue.setText(Integer.toString(nUsegeReminderValue) + "%");
|
||||||
|
//ControlCenterService.updateUsegeReminderValue(nUsegeReminderValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -33,333 +33,8 @@ public class MainViewFragment extends Fragment {
|
|||||||
|
|
||||||
public static final String TAG = "MainViewFragment";
|
public static final String TAG = "MainViewFragment";
|
||||||
|
|
||||||
public static final int MSG_RELOAD_APPCONFIG = 0;
|
|
||||||
public static final int MSG_CURRENTVALUEBATTERY = 1;
|
|
||||||
|
|
||||||
static MainViewFragment _mMainViewFragment;
|
|
||||||
AppConfigUtils mAppConfigUtils;
|
|
||||||
View mView;
|
|
||||||
Drawable mDrawableFrame;
|
|
||||||
LinearLayout mllLeftSeekBar;
|
|
||||||
LinearLayout mllRightSeekBar;
|
|
||||||
CheckBox mcbIsEnableChargeReminder;
|
|
||||||
CheckBox mcbIsEnableUsegeReminder;
|
|
||||||
Switch mswIsEnableService;
|
|
||||||
TextView mtvTips;
|
|
||||||
|
|
||||||
private BackgroundSourceUtils mBgSourceUtils;
|
|
||||||
|
|
||||||
// 背景布局
|
|
||||||
//LinearLayout mLinearLayoutloadBackground;
|
|
||||||
|
|
||||||
// 现在电量图示
|
|
||||||
BatteryDrawable mCurrentValueBatteryDrawable;
|
|
||||||
// 现在充电提醒电量图示
|
|
||||||
BatteryDrawable mChargeReminderValueBatteryDrawable;
|
|
||||||
// 现在耗电提醒电量图示
|
|
||||||
BatteryDrawable mUsegeReminderValueBatteryDrawable;
|
|
||||||
|
|
||||||
ImageView mCurrentValueBatteryImageView;
|
|
||||||
ImageView mChargeReminderValueBatteryImageView;
|
|
||||||
ImageView mUsegeReminderValueBatteryImageView;
|
|
||||||
|
|
||||||
VerticalSeekBar mChargeReminderSeekBar;
|
|
||||||
ChargeReminderSeekBarChangeListener mChargeReminderSeekBarChangeListener;
|
|
||||||
TextView mtvChargeReminderValue;
|
|
||||||
|
|
||||||
|
|
||||||
VerticalSeekBar mUsegeReminderSeekBar;
|
|
||||||
UsegeReminderSeekBarChangeListener mUsegeReminderSeekBarChangeListener;
|
|
||||||
TextView mtvUsegeReminderValue;
|
|
||||||
CheckBox mcbUsegeReminderValue;
|
|
||||||
TextView mtvCurrentValue;
|
|
||||||
BackgroundView mBackgroundView;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
|
||||||
mView = inflater.inflate(R.layout.fragment_mainview, container, false);
|
|
||||||
_mMainViewFragment = MainViewFragment.this;
|
|
||||||
mAppConfigUtils = App.getAppConfigUtils(getActivity());
|
|
||||||
mBgSourceUtils = BackgroundSourceUtils.getInstance(getActivity());
|
|
||||||
// 获取指定ID的View实例
|
|
||||||
mBackgroundView = mView.findViewById(R.id.fragmentmainviewBackgroundView1);
|
|
||||||
|
|
||||||
loadBackground();
|
|
||||||
/*final View mainImageView = mView.findViewById(R.id.fragmentmainviewImageView1);
|
|
||||||
|
|
||||||
// 注册OnGlobalLayoutListener
|
|
||||||
mainImageView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
|
||||||
@Override
|
|
||||||
public void onGlobalLayout() {
|
|
||||||
// 获取宽度和高度
|
|
||||||
int width = mainImageView.getMeasuredWidth();
|
|
||||||
int height = mainImageView.getMeasuredHeight();
|
|
||||||
|
|
||||||
BackgroundPictureUtils utils = BackgroundPictureUtils.getInstance(getActivity());
|
|
||||||
BackgroundPictureBean bean = utils.loadBackgroundPictureBean();
|
|
||||||
bean.setBackgroundWidth(width);
|
|
||||||
bean.setBackgroundHeight(height);
|
|
||||||
utils.saveData();
|
|
||||||
// 移除监听器以避免内存泄漏
|
|
||||||
mainImageView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
|
||||||
}
|
|
||||||
});*/
|
|
||||||
|
|
||||||
mDrawableFrame = getActivity().getDrawable(R.drawable.bg_frame);
|
|
||||||
mllLeftSeekBar = (LinearLayout) mView.findViewById(R.id.fragmentmainviewLinearLayout1);
|
|
||||||
mllRightSeekBar = (LinearLayout) mView.findViewById(R.id.fragmentmainviewLinearLayout2);
|
|
||||||
|
|
||||||
// 初始化充电电量提醒设置控件
|
|
||||||
mtvChargeReminderValue = (TextView) mView.findViewById(R.id.fragmentandroidviewTextView2);
|
|
||||||
mChargeReminderSeekBar = (VerticalSeekBar) mView.findViewById(R.id.fragmentandroidviewVerticalSeekBar1);
|
|
||||||
mcbIsEnableChargeReminder = mView.findViewById(R.id.fragmentmainviewCheckBox1);
|
|
||||||
|
|
||||||
// 初始化耗电电量提醒设置控件
|
|
||||||
mtvUsegeReminderValue = (TextView) mView.findViewById(R.id.fragmentandroidviewTextView3);
|
|
||||||
mUsegeReminderSeekBar = (VerticalSeekBar) mView.findViewById(R.id.fragmentandroidviewVerticalSeekBar2);
|
|
||||||
mcbIsEnableUsegeReminder = mView.findViewById(R.id.fragmentmainviewCheckBox2);
|
|
||||||
|
|
||||||
// 初始化现在电量显示控件
|
|
||||||
mtvCurrentValue = (TextView) mView.findViewById(R.id.fragmentandroidviewTextView4);
|
|
||||||
|
|
||||||
// 初始化服务总开关
|
|
||||||
mswIsEnableService = (Switch) mView.findViewById(R.id.fragmentandroidviewSwitch1);
|
|
||||||
mtvTips = mView.findViewById(R.id.fragmentandroidviewTextView1);
|
|
||||||
|
|
||||||
// 设置视图显示数据
|
|
||||||
setViewData();
|
|
||||||
// 设置视图控件响应
|
|
||||||
setViewListener();
|
|
||||||
|
|
||||||
// 注册一个广播接收
|
|
||||||
//mMainActivityReceiver = new MainActivityReceiver(this);
|
|
||||||
//mMainActivityReceiver.registerAction();
|
|
||||||
|
|
||||||
// 启动的时候检查一下服务
|
|
||||||
if (mAppConfigUtils.getIsEnableService()
|
|
||||||
&& ServiceUtils.isServiceAlive(getActivity(), ControlCenterService.class.getName()) == false) {
|
|
||||||
// 如果配置了服务启动,服务没有启动
|
|
||||||
// 就启动服务
|
|
||||||
Intent intent = new Intent(getActivity(), ControlCenterService.class);
|
|
||||||
getActivity().startForegroundService(intent);
|
|
||||||
}
|
|
||||||
|
|
||||||
return mView;
|
|
||||||
}
|
|
||||||
|
|
||||||
void loadBackground() {
|
|
||||||
BackgroundBean bean = mBgSourceUtils.getCurrentBackgroundBean();
|
|
||||||
mBackgroundView.loadBackgroundBean(bean);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onResume() {
|
|
||||||
super.onResume();
|
|
||||||
loadBackground();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void setViewData() {
|
|
||||||
int nChargeReminderValue = mAppConfigUtils.getChargeReminderValue();
|
|
||||||
int nUsegeReminderValue = mAppConfigUtils.getUsegeReminderValue();
|
|
||||||
int nCurrentValue = mAppConfigUtils.getCurrentValue();
|
|
||||||
|
|
||||||
mllLeftSeekBar.setBackground(mDrawableFrame);
|
|
||||||
mllRightSeekBar.setBackground(mDrawableFrame);
|
|
||||||
|
|
||||||
// 初始化电量图
|
|
||||||
mCurrentValueBatteryDrawable = new BatteryDrawable(getActivity().getColor(R.color.colorCurrent));
|
|
||||||
mCurrentValueBatteryDrawable.setValue(mAppConfigUtils.getCurrentValue());
|
|
||||||
mCurrentValueBatteryImageView = mView.findViewById(R.id.fragmentandroidviewImageView1);
|
|
||||||
mCurrentValueBatteryImageView.setImageDrawable(mCurrentValueBatteryDrawable);
|
|
||||||
|
|
||||||
// 初始化充电电量提醒图
|
|
||||||
mChargeReminderValueBatteryDrawable = new BatteryDrawable(getActivity().getColor(R.color.colorCharge));
|
|
||||||
mChargeReminderValueBatteryDrawable.setValue(nChargeReminderValue);
|
|
||||||
mChargeReminderValueBatteryImageView = mView.findViewById(R.id.fragmentandroidviewImageView3);
|
|
||||||
mChargeReminderValueBatteryImageView.setImageDrawable(mChargeReminderValueBatteryDrawable);
|
|
||||||
|
|
||||||
// 初始化耗电电量提醒图
|
|
||||||
mUsegeReminderValueBatteryDrawable = new BatteryDrawable(getActivity().getColor(R.color.colorUsege));
|
|
||||||
mUsegeReminderValueBatteryDrawable.setValue(nUsegeReminderValue);
|
|
||||||
mUsegeReminderValueBatteryImageView = mView.findViewById(R.id.fragmentandroidviewImageView2);
|
|
||||||
mUsegeReminderValueBatteryImageView.setImageDrawable(mUsegeReminderValueBatteryDrawable);
|
|
||||||
|
|
||||||
// 初始化充电电量提醒设置控件
|
|
||||||
mtvChargeReminderValue.setTextColor(getActivity().getColor(R.color.colorCharge));
|
|
||||||
//LogUtils.d(TAG, "Color.YELLOW is " + Integer.toString(mApplication.getColor(R.color.colorCharge)));
|
|
||||||
mtvChargeReminderValue.setText(Integer.toString(nChargeReminderValue) + "%");
|
|
||||||
mChargeReminderSeekBar.setProgress(nChargeReminderValue);
|
|
||||||
mcbIsEnableChargeReminder.setChecked(mAppConfigUtils.getIsEnableChargeReminder());
|
|
||||||
|
|
||||||
// 初始化耗电电量提醒设置控件
|
|
||||||
mtvUsegeReminderValue.setTextColor(getActivity().getColor(R.color.colorUsege));
|
|
||||||
mtvUsegeReminderValue.setText(Integer.toString(nUsegeReminderValue) + "%");
|
|
||||||
mUsegeReminderSeekBar.setProgress(nUsegeReminderValue);
|
|
||||||
mcbIsEnableUsegeReminder.setChecked(mAppConfigUtils.getIsEnableUsegeReminder());
|
|
||||||
|
|
||||||
// 初始化现在电量显示控件
|
|
||||||
mtvCurrentValue.setTextColor(getActivity().getColor(R.color.colorCurrent));
|
|
||||||
mtvCurrentValue.setText(Integer.toString(nCurrentValue) + "%");
|
|
||||||
|
|
||||||
// 初始化服务总开关
|
|
||||||
mswIsEnableService.setChecked(mAppConfigUtils.getIsEnableService());
|
|
||||||
if (mAppConfigUtils.getIsEnableService()) {
|
|
||||||
//LogUtils.d(TAG, "mApplication.getIsEnableService() " + Boolean.toString(mAppConfigUtils.getIsEnableService()));
|
|
||||||
ControlCenterService.startControlCenterService(getActivity());
|
|
||||||
} else {
|
|
||||||
//LogUtils.d(TAG, "mApplication.getIsEnableService() " + Boolean.toString(mAppConfigUtils.getIsEnableService()));
|
|
||||||
ControlCenterService.stopControlCenterService(getActivity());
|
|
||||||
}
|
|
||||||
mswIsEnableService.setText(getString(R.string.txt_aboveswitch));
|
|
||||||
mtvTips.setText(getString(R.string.txt_aboveswitchtips));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void setViewListener() {
|
|
||||||
// 初始化充电电量提醒设置控件
|
|
||||||
mChargeReminderSeekBarChangeListener = new ChargeReminderSeekBarChangeListener();
|
|
||||||
mChargeReminderSeekBar.setOnSeekBarChangeListener(mChargeReminderSeekBarChangeListener);
|
|
||||||
mcbIsEnableChargeReminder.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
LogUtils.d(TAG, "setIsEnableChargeReminder");
|
|
||||||
mAppConfigUtils.setIsEnableChargeReminder(mcbIsEnableChargeReminder.isChecked());
|
|
||||||
//ControlCenterService.updateIsEnableChargeReminder(mcbIsEnableChargeReminder.isChecked());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// 初始化耗电电量提醒设置控件
|
|
||||||
mUsegeReminderSeekBarChangeListener = new UsegeReminderSeekBarChangeListener();
|
|
||||||
mUsegeReminderSeekBar.setOnSeekBarChangeListener(mUsegeReminderSeekBarChangeListener);
|
|
||||||
mcbIsEnableUsegeReminder.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
LogUtils.d(TAG, "setIsEnableUsegeReminder");
|
|
||||||
mAppConfigUtils.setIsEnableUsegeReminder(mcbIsEnableUsegeReminder.isChecked());
|
|
||||||
//ControlCenterService.updateIsEnableUsegeReminder(mcbIsEnableUsegeReminder.isChecked());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// 初始化服务总开关
|
|
||||||
mswIsEnableService.setOnClickListener(new CompoundButton.OnClickListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(View view) {
|
|
||||||
mAppConfigUtils.setIsEnableService(getActivity(), mswIsEnableService.isChecked());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void setCurrentValueBattery(int value) {
|
|
||||||
//LogUtils.d(TAG, "setCurrentValueBattery");
|
|
||||||
mtvCurrentValue.setText(Integer.toString(value) + "%");
|
|
||||||
mCurrentValueBatteryDrawable.setValue(value);
|
|
||||||
mCurrentValueBatteryDrawable.invalidateSelf();
|
|
||||||
}
|
|
||||||
|
|
||||||
class ChargeReminderSeekBarChangeListener implements SeekBar.OnSeekBarChangeListener {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
|
||||||
//LogUtils.d(TAG, "call onProgressChanged");
|
|
||||||
int nChargeReminderValue = progress;
|
|
||||||
mtvChargeReminderValue.setText(Integer.toString(nChargeReminderValue) + "%");
|
|
||||||
mChargeReminderValueBatteryDrawable.setValue(nChargeReminderValue);
|
|
||||||
mChargeReminderValueBatteryDrawable.invalidateSelf();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStartTrackingTouch(SeekBar seekBar) {
|
|
||||||
//LogUtils.d(TAG, "call onStartTrackingTouch");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStopTrackingTouch(SeekBar seekBar) {
|
|
||||||
//LogUtils.d(TAG, "call onStopTrackingTouch");
|
|
||||||
//取得当前进度条的刻度
|
|
||||||
int nChargeReminderValue = ((VerticalSeekBar)seekBar)._mnProgress;
|
|
||||||
|
|
||||||
mAppConfigUtils.setChargeReminderValue(nChargeReminderValue);
|
|
||||||
mtvChargeReminderValue.setText(Integer.toString(nChargeReminderValue) + "%");
|
|
||||||
//ControlCenterService.updateChargeReminderValue(nChargeReminderValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class UsegeReminderSeekBarChangeListener implements SeekBar.OnSeekBarChangeListener {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
|
||||||
//LogUtils.d(TAG, "call onProgressChanged");
|
|
||||||
int nUsegeReminderValue = progress;
|
|
||||||
mtvUsegeReminderValue.setText(Integer.toString(nUsegeReminderValue) + "%");
|
|
||||||
mUsegeReminderValueBatteryDrawable.setValue(nUsegeReminderValue);
|
|
||||||
mUsegeReminderValueBatteryDrawable.invalidateSelf();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStartTrackingTouch(SeekBar seekBar) {
|
|
||||||
//LogUtils.d(TAG, "call onStartTrackingTouch");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStopTrackingTouch(SeekBar seekBar) {
|
|
||||||
//LogUtils.d(TAG, "call onStopTrackingTouch");
|
|
||||||
//取得当前进度条的刻度
|
|
||||||
int nUsegeReminderValue = ((VerticalSeekBar)seekBar)._mnProgress;
|
|
||||||
LogUtils.d(TAG, "nUsegeReminderValue is " + Integer.toString(nUsegeReminderValue));
|
|
||||||
//LogUtils.d(TAG, "mPowerReminder is " + mApplication);
|
|
||||||
mAppConfigUtils.setUsegeReminderValue(nUsegeReminderValue);
|
|
||||||
//LogUtils.d(TAG, "opopopopopopopop");
|
|
||||||
mtvUsegeReminderValue.setText(Integer.toString(nUsegeReminderValue) + "%");
|
|
||||||
//ControlCenterService.updateUsegeReminderValue(nUsegeReminderValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void reloadBackground() {
|
|
||||||
BackgroundSourceUtils utils = BackgroundSourceUtils.getInstance(getActivity());
|
|
||||||
utils.loadSettings();
|
|
||||||
BackgroundBean bean = utils.getCurrentBackgroundBean();
|
|
||||||
mBackgroundView.loadBackgroundBean(bean);
|
|
||||||
}
|
|
||||||
|
|
||||||
Handler mHandler = new Handler(){
|
|
||||||
@Override
|
|
||||||
public void handleMessage(Message msg) {
|
|
||||||
switch (msg.what) {
|
|
||||||
case MSG_RELOAD_APPCONFIG : {
|
|
||||||
setViewData();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case MSG_CURRENTVALUEBATTERY : {
|
|
||||||
setCurrentValueBattery(msg.arg1);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
super.handleMessage(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
public static void relaodAppConfigs() {
|
|
||||||
if (_mMainViewFragment != null) {
|
|
||||||
Handler handler = _mMainViewFragment.mHandler;
|
|
||||||
handler.sendMessage(handler.obtainMessage(MSG_RELOAD_APPCONFIG));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void sendMsgCurrentValueBattery(int value) {
|
|
||||||
if (_mMainViewFragment != null) {
|
|
||||||
Handler handler = _mMainViewFragment.mHandler;
|
|
||||||
Message msg = handler.obtainMessage(MSG_CURRENTVALUEBATTERY);
|
|
||||||
msg.arg1 = value;
|
|
||||||
handler.sendMessage(msg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,9 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
import cc.winboll.studio.powerbell.App;
|
import cc.winboll.studio.powerbell.App;
|
||||||
import cc.winboll.studio.powerbell.fragments.MainViewFragment;
|
import cc.winboll.studio.powerbell.MainActivity;
|
||||||
import cc.winboll.studio.powerbell.utils.AppConfigUtils;
|
import cc.winboll.studio.powerbell.utils.AppConfigUtils;
|
||||||
import cc.winboll.studio.powerbell.utils.BatteryUtils;
|
import cc.winboll.studio.powerbell.utils.BatteryUtils;
|
||||||
import cc.winboll.studio.powerbell.utils.NotificationHelper;
|
|
||||||
|
|
||||||
public class GlobalApplicationReceiver extends BroadcastReceiver {
|
public class GlobalApplicationReceiver extends BroadcastReceiver {
|
||||||
|
|
||||||
@@ -48,7 +47,7 @@ public class GlobalApplicationReceiver extends BroadcastReceiver {
|
|||||||
//NotificationHelper.cancelRemindNotification(context);
|
//NotificationHelper.cancelRemindNotification(context);
|
||||||
|
|
||||||
App.getAppCacheUtils(context).addChangingTime(nTheQuantityOfElectricity);
|
App.getAppCacheUtils(context).addChangingTime(nTheQuantityOfElectricity);
|
||||||
MainViewFragment.sendMsgCurrentValueBattery(nTheQuantityOfElectricity);
|
MainActivity.sendMsgCurrentValueBattery(nTheQuantityOfElectricity);
|
||||||
// 保存好新的电池状态标志
|
// 保存好新的电池状态标志
|
||||||
_mIsCharging = isCharging;
|
_mIsCharging = isCharging;
|
||||||
_mnTheQuantityOfElectricityOld = nTheQuantityOfElectricity;
|
_mnTheQuantityOfElectricityOld = nTheQuantityOfElectricity;
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public class AppConfigUtils {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNo() {
|
public void onNo() {
|
||||||
MainViewFragment.relaodAppConfigs();
|
MainActivity.relaodAppConfigs();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -183,7 +183,7 @@ public class AppConfigUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void onNo() {
|
public void onNo() {
|
||||||
AppConfigUtils.getInstance(activity).loadAppConfigBean();
|
AppConfigUtils.getInstance(activity).loadAppConfigBean();
|
||||||
MainViewFragment.relaodAppConfigs();
|
MainActivity.relaodAppConfigs();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -198,6 +198,6 @@ public class AppConfigUtils {
|
|||||||
AppConfigBean.saveBean(mContext, mAppConfigBean);
|
AppConfigBean.saveBean(mContext, mAppConfigBean);
|
||||||
// 通知活动窗口和服务配置已更新
|
// 通知活动窗口和服务配置已更新
|
||||||
ControlCenterService.updateStatus(mContext, mAppConfigBean);
|
ControlCenterService.updateStatus(mContext, mAppConfigBean);
|
||||||
MainViewFragment.relaodAppConfigs();
|
MainActivity.relaodAppConfigs();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,10 +23,222 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:id="@+id/activitymainRelativeLayout1"/>
|
android:id="@+id/activitymainRelativeLayout1"/>
|
||||||
|
|
||||||
<FrameLayout
|
<RelativeLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<cc.winboll.studio.powerbell.views.BackgroundView
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:id="@+id/activitymainFrameLayout1"/>
|
android:background="#FF7381FF"
|
||||||
|
android:id="@+id/fragmentmainviewBackgroundView1"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/fragmentmainviewLinearLayout3"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:layout_marginTop="10dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:background="@drawable/bg_frame">
|
||||||
|
|
||||||
|
<Switch
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/fragmentandroidviewSwitch1"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:layout_weight="1.0"
|
||||||
|
android:textSize="@dimen/text_title_size"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.0"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1.0">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_marginBottom="20dp"
|
||||||
|
android:id="@+id/fragmentmainviewLinearLayout1">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:background="@drawable/usege"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="10dp"/>
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:id="@+id/fragmentmainviewCheckBox2"/>
|
||||||
|
|
||||||
|
<cc.winboll.studio.powerbell.views.VerticalSeekBar
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/fragmentandroidviewVerticalSeekBar2"
|
||||||
|
android:progressTint="@color/colorUsege"
|
||||||
|
android:progressBackgroundTint="@color/colorUsege"
|
||||||
|
android:layout_weight="1.0"
|
||||||
|
android:layout_margin="10dp"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="80dp"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="100%"
|
||||||
|
android:textSize="@dimen/text_title_size"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:id="@+id/fragmentandroidviewTextView3"
|
||||||
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/fragmentandroidviewImageView2"
|
||||||
|
android:layout_weight="1.0"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1.0">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="100%"
|
||||||
|
android:textSize="@dimen/text_title_size"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:id="@+id/fragmentandroidviewTextView4"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/fragmentandroidviewImageView1"
|
||||||
|
android:layout_weight="1.0"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="80dp"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="100%"
|
||||||
|
android:textSize="@dimen/text_title_size"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:id="@+id/fragmentandroidviewTextView2"
|
||||||
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/fragmentandroidviewImageView3"
|
||||||
|
android:layout_weight="1.0"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginBottom="20dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:id="@+id/fragmentmainviewLinearLayout2">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:background="@drawable/charge"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="10dp"/>
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:id="@+id/fragmentmainviewCheckBox1"/>
|
||||||
|
|
||||||
|
<cc.winboll.studio.powerbell.views.VerticalSeekBar
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/fragmentandroidviewVerticalSeekBar1"
|
||||||
|
android:progressTint="@color/colorCharge"
|
||||||
|
android:progressBackgroundTint="@color/colorCharge"
|
||||||
|
android:layout_weight="1.0"
|
||||||
|
android:layout_margin="10dp"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="match_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Tips"
|
||||||
|
android:textSize="@dimen/text_content_size"
|
||||||
|
android:id="@+id/fragmentandroidviewTextView1"
|
||||||
|
android:background="@drawable/bg_frame"
|
||||||
|
android:padding="10dp"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<cc.winboll.studio.libaes.views.ADsBannerView
|
<cc.winboll.studio.libaes.views.ADsBannerView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -1,218 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<RelativeLayout
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<cc.winboll.studio.powerbell.views.BackgroundView
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="#FF7381FF"
|
|
||||||
android:id="@+id/fragmentmainviewBackgroundView1"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/fragmentmainviewLinearLayout3"
|
|
||||||
android:layout_marginLeft="10dp"
|
|
||||||
android:layout_marginRight="10dp"
|
|
||||||
android:layout_marginTop="10dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:background="@drawable/bg_frame">
|
|
||||||
|
|
||||||
<Switch
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/fragmentandroidviewSwitch1"
|
|
||||||
android:padding="10dp"
|
|
||||||
android:layout_weight="1.0"
|
|
||||||
android:textSize="@dimen/text_title_size"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1.0"
|
|
||||||
android:layout_marginLeft="10dp"
|
|
||||||
android:layout_marginRight="10dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1.0">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="50dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:layout_marginBottom="20dp"
|
|
||||||
android:id="@+id/fragmentmainviewLinearLayout1">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="36dp"
|
|
||||||
android:layout_height="36dp"
|
|
||||||
android:background="@drawable/usege"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginTop="10dp"/>
|
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:id="@+id/fragmentmainviewCheckBox2"/>
|
|
||||||
|
|
||||||
<cc.winboll.studio.powerbell.views.VerticalSeekBar
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/fragmentandroidviewVerticalSeekBar2"
|
|
||||||
android:progressTint="@color/colorUsege"
|
|
||||||
android:progressBackgroundTint="@color/colorUsege"
|
|
||||||
android:layout_weight="1.0"
|
|
||||||
android:layout_margin="10dp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="80dp"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="100%"
|
|
||||||
android:textSize="@dimen/text_title_size"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:id="@+id/fragmentandroidviewTextView3"
|
|
||||||
android:gravity="center_horizontal"/>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/fragmentandroidviewImageView2"
|
|
||||||
android:layout_weight="1.0"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1.0">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="100%"
|
|
||||||
android:textSize="@dimen/text_title_size"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:id="@+id/fragmentandroidviewTextView4"/>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/fragmentandroidviewImageView1"
|
|
||||||
android:layout_weight="1.0"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="80dp"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="100%"
|
|
||||||
android:textSize="@dimen/text_title_size"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:id="@+id/fragmentandroidviewTextView2"
|
|
||||||
android:gravity="center_horizontal"/>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/fragmentandroidviewImageView3"
|
|
||||||
android:layout_weight="1.0"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="50dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginBottom="20dp"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:id="@+id/fragmentmainviewLinearLayout2">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="36dp"
|
|
||||||
android:layout_height="36dp"
|
|
||||||
android:background="@drawable/charge"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginTop="10dp"/>
|
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:id="@+id/fragmentmainviewCheckBox1"/>
|
|
||||||
|
|
||||||
<cc.winboll.studio.powerbell.views.VerticalSeekBar
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/fragmentandroidviewVerticalSeekBar1"
|
|
||||||
android:progressTint="@color/colorCharge"
|
|
||||||
android:progressBackgroundTint="@color/colorCharge"
|
|
||||||
android:layout_weight="1.0"
|
|
||||||
android:layout_margin="10dp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_width="match_parent">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Tips"
|
|
||||||
android:textSize="@dimen/text_content_size"
|
|
||||||
android:id="@+id/fragmentandroidviewTextView1"
|
|
||||||
android:background="@drawable/bg_frame"
|
|
||||||
android:padding="10dp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user