version:4.0
fix: update:修改主页,更换图片资源
@@ -18,6 +18,7 @@ import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
@@ -160,8 +161,35 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
||||
if (mFragments.size() > 1) {
|
||||
mViewPager.setCurrentItem(defaultCurrent);
|
||||
}
|
||||
|
||||
View decorView = getWindow().getDecorView();
|
||||
decorView.setOnSystemUiVisibilityChangeListener(mOnSystemUiVisibilityChangeListener);
|
||||
|
||||
// 隐藏导航栏
|
||||
hideNavigationBar();
|
||||
}
|
||||
|
||||
private View.OnSystemUiVisibilityChangeListener mOnSystemUiVisibilityChangeListener =
|
||||
new View.OnSystemUiVisibilityChangeListener() {
|
||||
@Override
|
||||
public void onSystemUiVisibilityChange(int visibility) {
|
||||
if ((visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0) {
|
||||
// 导航栏显示中,重新隐藏导航栏
|
||||
hideNavigationBar();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 隐藏导航栏
|
||||
private void hideNavigationBar() {
|
||||
View decorView = getWindow().getDecorView();
|
||||
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
||||
| View.SYSTEM_UI_FLAG_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
|
||||
decorView.setSystemUiVisibility(uiOptions);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
registmNewAppReceiver();
|
||||
|
||||
@@ -57,6 +57,18 @@ public class NotificationAdapter extends RecyclerView.Adapter<NotificationAdapte
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull Holder holder, int position) {
|
||||
switch (position%3){
|
||||
case 1:
|
||||
holder.root.setBackground(mContext.getDrawable(R.drawable.home_alarm_blue));
|
||||
break;
|
||||
case 2:
|
||||
holder.root.setBackground(mContext.getDrawable(R.drawable.home_alarm_green));
|
||||
break;
|
||||
case 0:
|
||||
holder.root.setBackground(mContext.getDrawable(R.drawable.home_alarm_red));
|
||||
break;
|
||||
default:
|
||||
}
|
||||
AlarmClockData alarmClockData = dataList.get(position);
|
||||
// holder.tv_title.setText("提醒事件:" + alarmClockData.getTitle());
|
||||
String time = alarmClockData.getTime();
|
||||
@@ -75,7 +87,7 @@ public class NotificationAdapter extends RecyclerView.Adapter<NotificationAdapte
|
||||
}
|
||||
String file = alarmClockData.getFile();
|
||||
if (TextUtils.isEmpty(file)) {
|
||||
Glide.with(holder.iv_cover).load(R.drawable.home_reminder_icon).into(holder.iv_cover);
|
||||
// Glide.with(holder.iv_cover).load(R.drawable.home_reminder_icon).into(holder.iv_cover);
|
||||
} else {
|
||||
FFmpegUtils.loadVideoScreenshot(file, new Observer<Bitmap>() {
|
||||
@Override
|
||||
@@ -85,7 +97,7 @@ public class NotificationAdapter extends RecyclerView.Adapter<NotificationAdapte
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull Bitmap bitmap) {
|
||||
Glide.with(holder.iv_cover).load(bitmap).into(holder.iv_cover);
|
||||
// Glide.with(holder.iv_cover).load(bitmap).into(holder.iv_cover);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.uiuios.aios.bean.DesktopIcon;
|
||||
import com.uiuios.aios.config.CommonConfig;
|
||||
import com.uiuios.aios.dialog.CustomDialog;
|
||||
import com.uiuios.aios.dialog.DailyAppDialog;
|
||||
import com.uiuios.aios.manager.AppManager;
|
||||
import com.uiuios.aios.manager.AppStatusManager;
|
||||
import com.uiuios.aios.manager.RemoteManager;
|
||||
import com.uiuios.aios.network.NetInterfaceManager;
|
||||
@@ -273,6 +274,7 @@ public class AppListFragment extends BaseFragment {
|
||||
}
|
||||
|
||||
private void updateAppDisableStatus(String pkg, String label) {
|
||||
AppManager.getInstance().addAddPakcage(pkg);
|
||||
NetInterfaceManager.getInstance().getUpdateAppIconObservable(pkg, label, 0)
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycleSubject, FragmentEvent.DESTROY))
|
||||
.subscribe(new Observer<BaseResponse>() {
|
||||
|
||||
@@ -63,6 +63,10 @@ import butterknife.ButterKnife;
|
||||
public class ControlFragment extends BaseFragment {
|
||||
private static final String TAG = ControlFragment.class.getSimpleName();
|
||||
|
||||
@BindView(R.id.tv_wifi)
|
||||
TextView tv_wifi;
|
||||
@BindView(R.id.tv_battery)
|
||||
TextView tv_battery;
|
||||
|
||||
@BindView(R.id.seekBar)
|
||||
RulerSeekBar seekBar;
|
||||
@@ -105,7 +109,7 @@ public class ControlFragment extends BaseFragment {
|
||||
|
||||
public ControlFragment() {
|
||||
// Required empty public constructor
|
||||
Log.e(TAG, "ControlFragment: constructor" );
|
||||
Log.e(TAG, "ControlFragment: constructor");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -215,17 +219,17 @@ public class ControlFragment extends BaseFragment {
|
||||
// startActivity(new Intent(ControlActivity.this, WiFiManagerActivity.class));
|
||||
}
|
||||
});
|
||||
// if (isWifiEnabled()) {
|
||||
//// tv_wifi_ssid.setText(getConnectWifiSsid());
|
||||
if (isWifiEnabled()) {
|
||||
// tv_wifi.setText(getConnectWifiSsid());
|
||||
// cl_wifi.setBackground(mContext.getDrawable(R.drawable.control_background_item));
|
||||
// } else {
|
||||
//// tv_wifi_ssid.setText("未连接");
|
||||
} else {
|
||||
// tv_wifi.setText("未连接");
|
||||
// cl_wifi.setBackground(mContext.getDrawable(R.drawable.control_background_item_dis));
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isWifiEnabled() {
|
||||
WifiManager wifiMgr = (WifiManager)mContext. getSystemService(Context.WIFI_SERVICE);
|
||||
WifiManager wifiMgr = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
|
||||
if (wifiMgr.getWifiState() == WifiManager.WIFI_STATE_ENABLED) {
|
||||
ConnectivityManager connManager = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
NetworkInfo wifiInfo = connManager
|
||||
@@ -254,7 +258,7 @@ public class ControlFragment extends BaseFragment {
|
||||
filter.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION);
|
||||
filter.addAction(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION);
|
||||
filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
|
||||
mContext. registerReceiver(mWifiReceiver, filter);
|
||||
mContext.registerReceiver(mWifiReceiver, filter);
|
||||
}
|
||||
|
||||
public class WifiReceiver extends BroadcastReceiver {
|
||||
@@ -271,14 +275,14 @@ public class ControlFragment extends BaseFragment {
|
||||
NetworkInfo info = intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO);
|
||||
if (info.getState().equals(NetworkInfo.State.DISCONNECTED)) {
|
||||
Log.e(TAG, "wifi断开");
|
||||
// tv_wifi_ssid.setText("未连接");
|
||||
// tv_wifi.setText("未连接");
|
||||
// cl_wifi.setBackground(mContext.getDrawable(R.drawable.control_background_item_dis));
|
||||
} else if (info.getState().equals(NetworkInfo.State.CONNECTED)) {
|
||||
WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
|
||||
WifiInfo wifiInfo = wifiManager.getConnectionInfo();
|
||||
//获取当前wifi名称
|
||||
String newSSID = wifiInfo.getSSID();
|
||||
// tv_wifi_ssid.setText(getConnectWifiSsid());
|
||||
// tv_wifi.setText(getConnectWifiSsid());
|
||||
// cl_wifi.setBackground(mContext.getDrawable(R.drawable.control_background_item));
|
||||
}
|
||||
break;
|
||||
@@ -287,7 +291,7 @@ public class ControlFragment extends BaseFragment {
|
||||
int wifistate = intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE, WifiManager.WIFI_STATE_DISABLED);
|
||||
if (wifistate == WifiManager.WIFI_STATE_DISABLED) {
|
||||
Log.e(TAG, "系统关闭wifi");
|
||||
// tv_wifi_ssid.setText("关");
|
||||
// tv_wifi.setText("关");
|
||||
// cl_wifi.setBackground(mContext.getDrawable(R.drawable.control_background_item_dis));
|
||||
} else if (wifistate == WifiManager.WIFI_STATE_ENABLED) {
|
||||
Log.e(TAG, "系统开启wifi");
|
||||
@@ -302,7 +306,7 @@ public class ControlFragment extends BaseFragment {
|
||||
* 获取当前连接WIFI的SSID
|
||||
*/
|
||||
public String getSSID() {
|
||||
WifiManager wm = (WifiManager)mContext. getSystemService(Context.WIFI_SERVICE);
|
||||
WifiManager wm = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
|
||||
if (wm != null) {
|
||||
WifiInfo winfo = wm.getConnectionInfo();
|
||||
if (winfo != null) {
|
||||
@@ -468,7 +472,7 @@ public class ControlFragment extends BaseFragment {
|
||||
intentFilter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED);
|
||||
intentFilter.addAction(BluetoothDevice.ACTION_ACL_CONNECTED);
|
||||
// 注册广播
|
||||
mContext. registerReceiver(this.bleListenerReceiver, intentFilter);
|
||||
mContext.registerReceiver(this.bleListenerReceiver, intentFilter);
|
||||
}
|
||||
|
||||
public class BluetoothMonitorReceiver extends BroadcastReceiver {
|
||||
@@ -516,7 +520,15 @@ public class ControlFragment extends BaseFragment {
|
||||
}
|
||||
|
||||
private void getBattery() {
|
||||
// tv_electricity.setText(getBatteryCapacity() + "%");
|
||||
int level = getBatteryCapacity();
|
||||
Log.e(TAG, "getBattery: " + level);
|
||||
if (level <= 20) {
|
||||
tv_battery.setTextColor(mContext.getColor(R.color.red));
|
||||
} else {
|
||||
tv_battery.setTextColor(mContext.getColor(R.color.control_text_color));
|
||||
}
|
||||
tv_battery.setText(level + "%");
|
||||
|
||||
if (isBatteryCharging()) {
|
||||
// cl_battery.setBackground(mContext.getDrawable(R.drawable.control_background_item));
|
||||
} else {
|
||||
@@ -551,7 +563,7 @@ public class ControlFragment extends BaseFragment {
|
||||
|
||||
public int getBatteryCapacity() {
|
||||
try {
|
||||
BatteryManager batteryManager = (BatteryManager)mContext. getSystemService(Context.BATTERY_SERVICE);
|
||||
BatteryManager batteryManager = (BatteryManager) mContext.getSystemService(Context.BATTERY_SERVICE);
|
||||
return batteryManager.getIntProperty(BatteryManager.BATTERY_PROPERTY_CAPACITY);
|
||||
} catch (Exception e) {
|
||||
Log.e("getBattery", "getBattery" + e.getMessage());
|
||||
@@ -569,9 +581,10 @@ public class ControlFragment extends BaseFragment {
|
||||
filter.addAction(Intent.ACTION_POWER_DISCONNECTED);
|
||||
filter.addAction(Intent.ACTION_BATTERY_CHANGED);
|
||||
// filter.addAction(Intent.ACTION_BATTERY_LEVEL_CHANGED);
|
||||
filter.addAction("android.intent.action.BATTERY_LEVEL_CHANGED");
|
||||
filter.addAction(Intent.ACTION_BATTERY_LOW);
|
||||
filter.addAction(Intent.ACTION_BATTERY_OKAY);
|
||||
mContext. registerReceiver(mBatteryReceiver, filter);
|
||||
mContext.registerReceiver(mBatteryReceiver, filter);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -587,13 +600,15 @@ public class ControlFragment extends BaseFragment {
|
||||
switch (action) {
|
||||
case Intent.ACTION_POWER_CONNECTED:
|
||||
// cl_battery.setBackground(mContext.getDrawable(R.drawable.control_background_item));
|
||||
break;
|
||||
// break;
|
||||
case Intent.ACTION_POWER_DISCONNECTED:
|
||||
// cl_battery.setBackground(mContext.getDrawable(R.drawable.control_background_item_dis));
|
||||
break;
|
||||
// case Intent.ACTION_BATTERY_LEVEL_CHANGED:
|
||||
// tv_electricity.setText(getBatteryCapacity() + "%");
|
||||
// break;
|
||||
case Intent.ACTION_BATTERY_CHANGED:
|
||||
// case Intent.ACTION_BATTERY_LEVEL_CHANGED:
|
||||
case "android.intent.action.BATTERY_LEVEL_CHANGED":
|
||||
getBattery();
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
@@ -685,7 +700,7 @@ public class ControlFragment extends BaseFragment {
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.addAction(Intent.ACTION_TIME_TICK);
|
||||
filter.addAction(Intent.ACTION_TIME_CHANGED);
|
||||
mContext. registerReceiver(mTimeUpdateReceiver, filter);
|
||||
mContext.registerReceiver(mTimeUpdateReceiver, filter);
|
||||
updateTimeUi();
|
||||
// if (isFlashlightAvailable()) {
|
||||
// tv_flashlight_switch.setText("关");
|
||||
@@ -843,7 +858,7 @@ public class ControlFragment extends BaseFragment {
|
||||
private AudioManager mAudioManager;
|
||||
|
||||
private void getSound() {
|
||||
mAudioManager = (AudioManager)mContext. getSystemService(Context.AUDIO_SERVICE);
|
||||
mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
|
||||
//最大音量
|
||||
int maxVolume = mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
|
||||
seekbar_sound.setMax(maxVolume);
|
||||
@@ -878,7 +893,7 @@ public class ControlFragment extends BaseFragment {
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
if (mWifiReceiver != null)mContext. unregisterReceiver(mWifiReceiver);
|
||||
if (mWifiReceiver != null) mContext.unregisterReceiver(mWifiReceiver);
|
||||
if (mTimeUpdateReceiver != null) mContext.unregisterReceiver(mTimeUpdateReceiver);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,22 @@
|
||||
package com.uiuios.aios.fragment.home;
|
||||
|
||||
import com.uiuios.aios.alarm.AlarmClockData;
|
||||
import com.uiuios.aios.base.BasePresenter;
|
||||
import com.uiuios.aios.base.BaseView;
|
||||
import com.uiuios.aios.bean.DesktopIcon;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class HomeContact {
|
||||
public interface Presenter extends BasePresenter<PrecisionView> {
|
||||
void getInstalledApp();
|
||||
void getInstalledApp();
|
||||
void getAlarmClock();
|
||||
}
|
||||
|
||||
public interface PrecisionView extends BaseView {
|
||||
void setInstalledApp( ArrayList<DesktopIcon> desktopIcons);
|
||||
void setInstalledApp(ArrayList<DesktopIcon> desktopIcons);
|
||||
void setAlarmClock(List<AlarmClockData> alarmClockList);
|
||||
void setAlarmClockEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ public class HomeFragment extends BaseFragment implements HomeContact.PrecisionV
|
||||
|
||||
@Override
|
||||
public void fetchData() {
|
||||
getAlarmClock();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -199,7 +199,7 @@ public class HomeFragment extends BaseFragment implements HomeContact.PrecisionV
|
||||
|
||||
private void initView() {
|
||||
initAmap();
|
||||
setTiem();
|
||||
setTime();
|
||||
refreshMemory();
|
||||
|
||||
registerTimeReceiver();
|
||||
@@ -287,11 +287,9 @@ public class HomeFragment extends BaseFragment implements HomeContact.PrecisionV
|
||||
cl_appstore.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
ApkUtils.openPackage(mContext, "com.uiui.videoplayer", "com.uiui.videoplayer.activity.main.MainActivity");
|
||||
ApkUtils.openPackage(mContext, "com.uiuios.appstore");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -301,6 +299,42 @@ public class HomeFragment extends BaseFragment implements HomeContact.PrecisionV
|
||||
mHomePresenter.getInstalledApp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInstalledApp(ArrayList<DesktopIcon> desktopIcons) {
|
||||
Log.e(TAG, "setInstalledApp: " + desktopIcons);
|
||||
if (desktopIcons == null || desktopIcons.size() == 0) {
|
||||
iv_nodata.setVisibility(View.VISIBLE);
|
||||
rv_app.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
iv_nodata.setVisibility(View.GONE);
|
||||
rv_app.setVisibility(View.VISIBLE);
|
||||
mHomeAppAdapter.setDesktopIcons(desktopIcons);
|
||||
}
|
||||
mHomePresenter.getAlarmClock();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAlarmClock(List<AlarmClockData> alarmClockList) {
|
||||
// AlarmClockData alarmClockData = AlarmUtils.getInstance().getRecentAlarmClock();
|
||||
// List<AlarmClockData> data = new ArrayList<>();
|
||||
// if (alarmClockData != null) {
|
||||
// data.add(alarmClockData);
|
||||
if (alarmClockList != null) {
|
||||
notificationAdapter.setDataList(alarmClockList);
|
||||
rv_noti.setVisibility(View.VISIBLE);
|
||||
iv_note_nodata.setVisibility(View.GONE);
|
||||
} else {
|
||||
rv_noti.setVisibility(View.GONE);
|
||||
iv_note_nodata.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAlarmClockEmpty() {
|
||||
rv_noti.setVisibility(View.GONE);
|
||||
iv_note_nodata.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
//监听时间和日期变化
|
||||
public void registerTimeReceiver() {
|
||||
mTimeChangedReceiver = new TimeChangedReceiver();
|
||||
@@ -315,19 +349,6 @@ public class HomeFragment extends BaseFragment implements HomeContact.PrecisionV
|
||||
|
||||
private TimeChangedReceiver mTimeChangedReceiver;
|
||||
|
||||
@Override
|
||||
public void setInstalledApp(ArrayList<DesktopIcon> desktopIcons) {
|
||||
Log.e(TAG, "setInstalledApp: " + desktopIcons);
|
||||
if (desktopIcons == null || desktopIcons.size() == 0) {
|
||||
iv_nodata.setVisibility(View.VISIBLE);
|
||||
rv_app.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
iv_nodata.setVisibility(View.GONE);
|
||||
rv_app.setVisibility(View.VISIBLE);
|
||||
mHomeAppAdapter.setDesktopIcons(desktopIcons);
|
||||
}
|
||||
}
|
||||
|
||||
private class TimeChangedReceiver extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
@@ -341,7 +362,7 @@ public class HomeFragment extends BaseFragment implements HomeContact.PrecisionV
|
||||
} else if (Intent.ACTION_TIME_TICK.equals(intent.getAction())) {
|
||||
Log.e(TAG, "TimeChangedReceiver:" + "time tick");
|
||||
}
|
||||
setTiem();
|
||||
setTime();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -366,7 +387,7 @@ public class HomeFragment extends BaseFragment implements HomeContact.PrecisionV
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
getAlarmClock();
|
||||
mHomePresenter.getAlarmClock();
|
||||
}
|
||||
}, 3456);
|
||||
}
|
||||
@@ -448,7 +469,7 @@ public class HomeFragment extends BaseFragment implements HomeContact.PrecisionV
|
||||
float x2 = (((total - avail) / (float) total));
|
||||
}
|
||||
|
||||
private void setTiem() {
|
||||
private void setTime() {
|
||||
long time = System.currentTimeMillis();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm");
|
||||
Date date = new Date(time);
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
package com.uiuios.aios.fragment.home;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
|
||||
import com.trello.rxlifecycle4.android.FragmentEvent;
|
||||
import com.uiuios.aios.R;
|
||||
import com.uiuios.aios.alarm.AlarmClockData;
|
||||
import com.uiuios.aios.alarm.AlarmUtils;
|
||||
import com.uiuios.aios.bean.DesktopIcon;
|
||||
import com.uiuios.aios.manager.AppManager;
|
||||
import com.uiuios.aios.network.NetInterfaceManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.subjects.BehaviorSubject;
|
||||
@@ -59,4 +64,24 @@ public class HomePresenter implements HomeContact.Presenter {
|
||||
|
||||
mView.setInstalledApp(desktopIcons);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAlarmClock() {
|
||||
NetInterfaceManager.getInstance().getAlarmClockFragment(lifecycle, new NetInterfaceManager.AlarmClockCallback() {
|
||||
@Override
|
||||
public void setAlarmClock(List<AlarmClockData> alarmClockList) {
|
||||
mView.setAlarmClock(alarmClockList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAlarmClockEmpty() {
|
||||
mView.setAlarmClockEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -759,6 +759,12 @@ public class NetInterfaceManager {
|
||||
// }
|
||||
// }
|
||||
|
||||
public void getAlarmClockFragment(BehaviorSubject<FragmentEvent> lifecycle, AlarmClockCallback callback) {
|
||||
getAlarmClockObservable()
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycle, FragmentEvent.DESTROY))
|
||||
.subscribe(getAlarmClockObserver(callback));
|
||||
}
|
||||
|
||||
public void getAlarmClock(BehaviorSubject<ActivityEvent> lifecycle, AlarmClockCallback callback) {
|
||||
getAlarmClockObservable()
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycle, ActivityEvent.DESTROY))
|
||||
@@ -790,7 +796,6 @@ public class NetInterfaceManager {
|
||||
if (alarmClockData != null && alarmClockData.size() != 0) {
|
||||
AlarmUtils.getInstance().setAlarmClockData(alarmClockData);
|
||||
mMMKV.encode(UrlAddress.GET_ALARM_CLOCK, GsonUtils.toJSONString(alarmClockData));
|
||||
|
||||
// if (callback != null) {
|
||||
// callback.setAlarmClock(alarmClockData);
|
||||
// }
|
||||
@@ -798,7 +803,6 @@ public class NetInterfaceManager {
|
||||
AlarmUtils.getInstance().deleteAllAlarmClock();
|
||||
AlarmUtils.getInstance().setAlarmClockData(null);
|
||||
mMMKV.encode(UrlAddress.GET_ALARM_CLOCK, "");
|
||||
|
||||
// if (callback != null) {
|
||||
// callback.setAlarmClockEmpty();
|
||||
// }
|
||||
@@ -807,7 +811,6 @@ public class NetInterfaceManager {
|
||||
AlarmUtils.getInstance().deleteAllAlarmClock();
|
||||
AlarmUtils.getInstance().setAlarmClockData(null);
|
||||
mMMKV.encode(UrlAddress.GET_ALARM_CLOCK, "");
|
||||
|
||||
// if (callback != null) {
|
||||
// callback.setAlarmClockEmpty();
|
||||
// }
|
||||
|
||||
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 403 KiB After Width: | Height: | Size: 2.5 MiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
BIN
app/src/main/res/drawable-hdpi/home_alarm_icon.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
BIN
app/src/main/res/drawable-hdpi/icon_add_alarm.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 3.0 KiB |
@@ -2,7 +2,7 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/actions_item_bg_s" android:state_focused="true" />
|
||||
<item android:drawable="@color/actions_item_pressed" android:state_pressed="true" />
|
||||
<item android:drawable="@drawable/control_bg" android:state_pressed="true" />
|
||||
<item>
|
||||
<shape>
|
||||
<solid android:color="@color/transparent" />
|
||||
|
||||
9
app/src/main/res/drawable/control_bg.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 内部颜色 -->
|
||||
<solid android:color="@color/control_bg_color" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners android:radius="16dp" />
|
||||
|
||||
|
||||
</shape>
|
||||
15
app/src/main/res/drawable/home_alarm_blue.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 内部颜色 -->
|
||||
<solid android:color="#0480FF" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/dp_4"
|
||||
android:bottomRightRadius="@dimen/dp_4"
|
||||
android:topLeftRadius="@dimen/dp_4"
|
||||
android:topRightRadius="@dimen/dp_4" />
|
||||
|
||||
<!-- <padding-->
|
||||
<!-- android:left="@dimen/dp_10"-->
|
||||
<!-- android:right="@dimen/dp_10" />-->
|
||||
</shape>
|
||||
15
app/src/main/res/drawable/home_alarm_green.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 内部颜色 -->
|
||||
<solid android:color="#00D56B" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/dp_4"
|
||||
android:bottomRightRadius="@dimen/dp_4"
|
||||
android:topLeftRadius="@dimen/dp_4"
|
||||
android:topRightRadius="@dimen/dp_4" />
|
||||
|
||||
<!-- <padding-->
|
||||
<!-- android:left="@dimen/dp_10"-->
|
||||
<!-- android:right="@dimen/dp_10" />-->
|
||||
</shape>
|
||||
15
app/src/main/res/drawable/home_alarm_red.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 内部颜色 -->
|
||||
<solid android:color="@color/red" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/dp_4"
|
||||
android:bottomRightRadius="@dimen/dp_4"
|
||||
android:topLeftRadius="@dimen/dp_4"
|
||||
android:topRightRadius="@dimen/dp_4" />
|
||||
|
||||
<!-- <padding-->
|
||||
<!-- android:left="@dimen/dp_10"-->
|
||||
<!-- android:right="@dimen/dp_10" />-->
|
||||
</shape>
|
||||
@@ -12,7 +12,7 @@
|
||||
<!-- android:width="1dp"-->
|
||||
<!-- android:color="#fff" />-->
|
||||
<corners android:radius="@dimen/dp_8" />
|
||||
<solid android:color="@color/settings_color_bg" />
|
||||
<solid android:color="@color/control_bg_color" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<!-- android:width="1dp"-->
|
||||
<!-- android:color="#fff" />-->
|
||||
<corners android:radius="@dimen/dp_8" />
|
||||
<solid android:color="@color/settings_color" />
|
||||
<solid android:color="@color/control_text_color" />
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@android:id/background">
|
||||
<shape>
|
||||
<solid android:color="#FFFFFF" />
|
||||
<solid android:color="#ffe6d4" />
|
||||
<size android:height="@dimen/dp_14" />
|
||||
<corners android:radius="@dimen/dp_14" />
|
||||
</shape>
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
android:height="@dimen/dp_14" />
|
||||
<stroke
|
||||
android:width="@dimen/dp_2"
|
||||
android:color="#FFFFFF" />
|
||||
<solid android:color="@color/settings_color" />
|
||||
android:color="#ffe6d4" />
|
||||
<solid android:color="@color/control_text_color" />
|
||||
</shape>
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/control_background"
|
||||
android:background="@drawable/control_bg"
|
||||
tools:context=".activity.contact.ContactActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/control_background"
|
||||
android:background="@drawable/control_bg"
|
||||
tools:context=".activity.ControlActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/control_background"
|
||||
android:background="@drawable/control_bg"
|
||||
tools:context=".activity.DailyAppActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/control_background"
|
||||
android:background="@drawable/control_bg"
|
||||
tools:context=".activity.dialer.DialerActivity">
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/control_background"
|
||||
android:background="@drawable/control_bg"
|
||||
tools:context=".activity.contact.ContactActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/control_background"
|
||||
android:background="@drawable/control_bg"
|
||||
tools:context=".activity.ControlActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/control_background"
|
||||
android:background="@drawable/control_bg"
|
||||
tools:context=".activity.DailyAppActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/control_background"
|
||||
android:background="@drawable/control_bg"
|
||||
tools:context=".activity.dialer.DialerActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/wallpaper1"
|
||||
android:background="@drawable/control_background"
|
||||
tools:context=".activity.main.MainActivity">
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/control_background">
|
||||
android:background="@drawable/control_bg">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
|
||||
@@ -33,35 +33,36 @@
|
||||
android:id="@+id/cl_wifi"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="@dimen/dp_8"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/settings_network">
|
||||
android:background="@drawable/control_bg">
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_wifi"-->
|
||||
<!-- android:layout_width="@dimen/dp_50"-->
|
||||
<!-- android:layout_height="@dimen/dp_50"-->
|
||||
<!-- android:adjustViewBounds="true"-->
|
||||
<!-- android:scaleType="centerCrop"-->
|
||||
<!-- android:src="@drawable/wifi1"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintHorizontal_bias="0.5"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:layout_constraintVertical_bias="0.18" />-->
|
||||
<ImageView
|
||||
android:id="@+id/iv_wifi"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/settings_network"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.18" />
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_wifi"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="网络设置"-->
|
||||
<!-- android:textColor="@color/white"-->
|
||||
<!-- android:textSize="@dimen/sp_13"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/iv_wifi" />-->
|
||||
<TextView
|
||||
android:id="@+id/tv_wifi"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="网络设置"
|
||||
android:textColor="@color/control_text_color"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_wifi" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -69,35 +70,36 @@
|
||||
android:id="@+id/cl_bt"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="@dimen/dp_8"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/settings_bluetooth">
|
||||
android:background="@drawable/control_bg">
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_bt"-->
|
||||
<!-- android:layout_width="@dimen/dp_50"-->
|
||||
<!-- android:layout_height="@dimen/dp_50"-->
|
||||
<!-- android:adjustViewBounds="true"-->
|
||||
<!-- android:scaleType="centerCrop"-->
|
||||
<!-- android:src="@drawable/bluetooth1"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintHorizontal_bias="0.5"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:layout_constraintVertical_bias="0.18" />-->
|
||||
<ImageView
|
||||
android:id="@+id/iv_bt"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/settings_bluetooth"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.18" />
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_bt"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="蓝牙设置"-->
|
||||
<!-- android:textColor="@color/white"-->
|
||||
<!-- android:textSize="@dimen/sp_13"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/iv_bt" />-->
|
||||
<TextView
|
||||
android:id="@+id/tv_bt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="蓝牙设置"
|
||||
android:textColor="@color/control_text_color"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_bt" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -143,7 +145,7 @@
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="100%"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/control_text_color2"
|
||||
android:textSize="@dimen/sp_24"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_sound"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_sound"
|
||||
@@ -155,7 +157,7 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="@dimen/dp_8"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/settings_bg">
|
||||
android:background="@drawable/control_bg">
|
||||
|
||||
<com.uiuios.aios.view.RulerSeekBar
|
||||
android:id="@+id/seekBar"
|
||||
@@ -200,7 +202,7 @@
|
||||
android:gravity="start"
|
||||
android:paddingStart="@dimen/dp_8"
|
||||
android:text="标准"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/control_text_color"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -213,7 +215,7 @@
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="大"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/control_text_color"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -227,7 +229,7 @@
|
||||
android:gravity="end"
|
||||
android:paddingEnd="@dimen/dp_8"
|
||||
android:text="最大"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/control_text_color"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -267,35 +269,36 @@
|
||||
android:id="@+id/cl_battery"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="@dimen/dp_8"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/settings_battery">
|
||||
android:background="@drawable/control_bg">
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_battery"-->
|
||||
<!-- android:layout_width="@dimen/dp_50"-->
|
||||
<!-- android:layout_height="@dimen/dp_50"-->
|
||||
<!-- android:adjustViewBounds="true"-->
|
||||
<!-- android:scaleType="centerCrop"-->
|
||||
<!-- android:src="@drawable/battery1"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintHorizontal_bias="0.5"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:layout_constraintVertical_bias="0.18" />-->
|
||||
<ImageView
|
||||
android:id="@+id/iv_battery"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/settings_battery"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.18" />
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_battery"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="电池设置"-->
|
||||
<!-- android:textColor="@color/white"-->
|
||||
<!-- android:textSize="@dimen/sp_13"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/iv_battery" />-->
|
||||
<TextView
|
||||
android:id="@+id/tv_battery"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="电池设置"
|
||||
android:textColor="@color/control_text_color"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_battery" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -303,35 +306,36 @@
|
||||
android:id="@+id/cl_flashlight"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="@dimen/dp_8"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/settings_system">
|
||||
android:background="@drawable/control_bg">
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_flashlight"-->
|
||||
<!-- android:layout_width="@dimen/dp_50"-->
|
||||
<!-- android:layout_height="@dimen/dp_50"-->
|
||||
<!-- android:adjustViewBounds="true"-->
|
||||
<!-- android:scaleType="centerCrop"-->
|
||||
<!-- android:src="@drawable/settings1"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintHorizontal_bias="0.5"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:layout_constraintVertical_bias="0.18" />-->
|
||||
<ImageView
|
||||
android:id="@+id/iv_flashlight"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/settings_system"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.18" />
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_flashlight"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="系统设置"-->
|
||||
<!-- android:textColor="@color/white"-->
|
||||
<!-- android:textSize="@dimen/sp_13"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/iv_flashlight" />-->
|
||||
<TextView
|
||||
android:id="@+id/tv_flashlight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="系统设置"
|
||||
android:textColor="@color/control_text_color"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_flashlight" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -377,7 +381,7 @@
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="亮度"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/control_text_color2"
|
||||
android:textSize="@dimen/sp_20"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_brightness"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_brightness"
|
||||
@@ -390,7 +394,7 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="@dimen/dp_8"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/settings_bg">
|
||||
android:background="@drawable/control_bg">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_location"
|
||||
@@ -412,7 +416,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:maxLines="2"
|
||||
android:text="未知"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/control_text_color"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_2"
|
||||
android:layout_height="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_2"
|
||||
android:src="@drawable/home_icon_location"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_location"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_location"
|
||||
@@ -216,7 +216,9 @@
|
||||
android:id="@+id/rv_noti"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:overScrollMode="never"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -225,11 +227,11 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_note_nodata"
|
||||
android:layout_width="@dimen/dp_68"
|
||||
android:layout_height="@dimen/dp_68"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/home_reminder_icon"
|
||||
android:src="@drawable/icon_add_alarm"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -284,10 +286,9 @@
|
||||
android:id="@+id/cl_contact"
|
||||
android:layout_width="@dimen/dp_109"
|
||||
android:layout_height="@dimen/dp_71"
|
||||
android:layout_marginTop="@dimen/dp_13"
|
||||
android:background="@drawable/home_dialer"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cl_clear">
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
android:id="@+id/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:background="@drawable/bt_activation_normnl"
|
||||
android:layout_marginBottom="@dimen/dp_16"
|
||||
android:background="@drawable/home_alarm_blue"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -20,11 +21,11 @@
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_alarm"
|
||||
android:src="@drawable/home_alarm_icon"
|
||||
app:corner_radius="@dimen/dp_8"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_time"
|
||||
app:layout_constraintHorizontal_bias="0.1"
|
||||
app:layout_constraintHorizontal_bias="0.2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.5" />
|
||||
|
||||
@@ -19,8 +19,9 @@
|
||||
<color name="radio_botton_gray">#bbbbbb</color>
|
||||
<color name="ok_button">#4D4B50</color>
|
||||
<color name="red">#FF0000</color>
|
||||
<color name="green">#FF008000</color>
|
||||
<color name="progress_bg">#F1B3B3</color>
|
||||
<color name="actions_item_pressed">#17233b</color>
|
||||
<color name="actions_item_pressed">#2a2b35</color>
|
||||
<color name="default_background_color">#8e6afb</color>
|
||||
|
||||
<color name="voice_color">#00D56B</color>
|
||||
@@ -56,4 +57,8 @@
|
||||
|
||||
<color name="check_update_color">#4880ff</color>
|
||||
<color name="check_update_color_pressed">#3e76f6</color>
|
||||
|
||||
<color name="control_text_color">#F19149</color>
|
||||
<color name="control_text_color2">#7a4014</color>
|
||||
<color name="control_bg_color">#65000000</color>
|
||||
</resources>
|
||||
|
||||