优化快捷控制
@@ -22,6 +22,7 @@ import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -34,9 +35,12 @@ import com.baidu.location.LocationClient;
|
||||
import com.uiuios.aios.R;
|
||||
import com.uiuios.aios.manager.AmapManager;
|
||||
import com.uiuios.aios.utils.BrightnessUtils;
|
||||
import com.uiuios.aios.view.CustomSeekbar;
|
||||
import com.uiuios.aios.view.RulerSeekBar;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@@ -46,10 +50,14 @@ import java.util.stream.Collectors;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
|
||||
public class ControlActivity extends AppCompatActivity {
|
||||
private static final String TAG = ControlActivity.class.getSimpleName();
|
||||
|
||||
@BindView(R.id.iv_back)
|
||||
ImageView iv_back;
|
||||
|
||||
@BindView(R.id.tv_wifi)
|
||||
TextView tv_wifi;
|
||||
@BindView(R.id.tv_wifi_ssid)
|
||||
@@ -62,7 +70,7 @@ public class ControlActivity extends AppCompatActivity {
|
||||
@BindView(R.id.tv_font_size)
|
||||
TextView tv_font_size;
|
||||
@BindView(R.id.seekBar)
|
||||
SeekBar seekBar;
|
||||
RulerSeekBar seekBar;
|
||||
@BindView(R.id.seekbar_brightness)
|
||||
SeekBar seekbar_brightness;
|
||||
@BindView(R.id.seekbar_sound)
|
||||
@@ -97,6 +105,17 @@ public class ControlActivity extends AppCompatActivity {
|
||||
ConstraintLayout cl_location;
|
||||
|
||||
|
||||
@OnClick({R.id.iv_back})
|
||||
void OnClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_back:
|
||||
finish();
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private ContentResolver crv;
|
||||
private static final String ACTION_FLASHLIGHT_CHANGED =
|
||||
"com.android.settings.flashlight.action.FLASHLIGHT_CHANGED";
|
||||
@@ -581,6 +600,7 @@ public class ControlActivity extends AppCompatActivity {
|
||||
Log.e(TAG, "getHardware: fontScale = " + fontScale);
|
||||
List<String> mEntries = Arrays.asList(getResources().getStringArray(R.array.entries_font_size));
|
||||
List<String> strEntryValues = Arrays.asList(getResources().getStringArray(R.array.entryvalues_font_size));
|
||||
seekBar.setMax(mEntries.size()-1);
|
||||
String font_size;
|
||||
int index = strEntryValues.indexOf(String.valueOf(fontScale));
|
||||
if (index == -1) {
|
||||
|
||||
@@ -32,8 +32,8 @@ import com.uiuios.aios.base.BaseActivity;
|
||||
import com.uiuios.aios.bean.AlarmItem;
|
||||
import com.uiuios.aios.bean.DesktopIcon;
|
||||
import com.uiuios.aios.fragment.AppListFragment;
|
||||
import com.uiuios.aios.fragment.BaseFragmentPagerAdapter;
|
||||
import com.uiuios.aios.fragment.CustomFragment;
|
||||
import com.uiuios.aios.base.BaseFragmentPagerAdapter;
|
||||
import com.uiuios.aios.fragment.custom.CustomFragment;
|
||||
import com.uiuios.aios.fragment.SecondFragment;
|
||||
import com.uiuios.aios.service.NotificationService;
|
||||
import com.uiuios.aios.utils.ApkUtils;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.uiuios.aios.fragment;
|
||||
package com.uiuios.aios.base;
|
||||
|
||||
import android.util.SparseArray;
|
||||
|
||||
251
app/src/main/java/com/uiuios/aios/dialog/CustomDialog.java
Normal file
@@ -0,0 +1,251 @@
|
||||
package com.uiuios.aios.dialog;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
||||
import com.uiuios.aios.R;
|
||||
|
||||
|
||||
/**
|
||||
* description:自定义dialog
|
||||
*/
|
||||
|
||||
public class CustomDialog extends AlertDialog {
|
||||
/**
|
||||
* 显示的图片
|
||||
*/
|
||||
private ImageView imageIv;
|
||||
|
||||
/**
|
||||
* 显示的标题
|
||||
*/
|
||||
private TextView titleTv;
|
||||
|
||||
/**
|
||||
* 显示的消息
|
||||
*/
|
||||
private TextView messageTv;
|
||||
|
||||
/**
|
||||
* 确认和取消按钮
|
||||
*/
|
||||
private TextView positiveBn;
|
||||
private TextView negtiveBn;
|
||||
|
||||
/**
|
||||
* 按钮之间的分割线
|
||||
*/
|
||||
// private View columnLineView;
|
||||
|
||||
private Context mContext;
|
||||
|
||||
public CustomDialog(Context context) {
|
||||
super(context, R.style.CustomDialog);
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
/**
|
||||
* 都是内容数据
|
||||
*/
|
||||
private String message;
|
||||
private String title;
|
||||
private String positive, negtive;
|
||||
private int imageResId = -1;
|
||||
|
||||
/**
|
||||
* 底部是否只有一个按钮
|
||||
*/
|
||||
private boolean isSingle = false;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.custom_dialog);
|
||||
//按空白处不能取消动画
|
||||
setCanceledOnTouchOutside(false);
|
||||
//初始化界面控件
|
||||
initView();
|
||||
//初始化界面数据
|
||||
refreshView();
|
||||
//初始化界面控件的事件
|
||||
initEvent();
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化界面的确定和取消监听器
|
||||
*/
|
||||
private void initEvent() {
|
||||
//设置确定按钮被点击后,向外界提供监听
|
||||
positiveBn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (onClickBottomListener != null) {
|
||||
onClickBottomListener.onPositiveClick();
|
||||
}
|
||||
}
|
||||
});
|
||||
//设置取消按钮被点击后,向外界提供监听
|
||||
negtiveBn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (onClickBottomListener != null) {
|
||||
onClickBottomListener.onNegtiveClick();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化界面控件的显示数据
|
||||
*/
|
||||
private void refreshView() {
|
||||
//如果用户自定了title和message
|
||||
if (!TextUtils.isEmpty(title)) {
|
||||
titleTv.setText(title);
|
||||
titleTv.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
titleTv.setVisibility(View.GONE);
|
||||
}
|
||||
if (!TextUtils.isEmpty(message)) {
|
||||
messageTv.setText(message);
|
||||
}
|
||||
//如果设置按钮的文字
|
||||
if (!TextUtils.isEmpty(positive)) {
|
||||
positiveBn.setText(positive);
|
||||
} else {
|
||||
positiveBn.setText("确定");
|
||||
}
|
||||
if (!TextUtils.isEmpty(negtive)) {
|
||||
negtiveBn.setText(negtive);
|
||||
} else {
|
||||
negtiveBn.setText("取消");
|
||||
}
|
||||
|
||||
if (imageResId != -1) {
|
||||
imageIv.setImageResource(imageResId);
|
||||
imageIv.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
imageIv.setVisibility(View.GONE);
|
||||
}
|
||||
/**
|
||||
* 只显示一个按钮的时候隐藏取消按钮,回掉只执行确定的事件
|
||||
*/
|
||||
// if (isSingle) {
|
||||
//// columnLineView.setVisibility(View.GONE);
|
||||
// negtiveBn.setVisibility(View.GONE);
|
||||
// } else {
|
||||
// negtiveBn.setVisibility(View.VISIBLE);
|
||||
//// columnLineView.setVisibility(View.VISIBLE);
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public void show() {
|
||||
super.show();
|
||||
refreshView();
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化界面控件
|
||||
*/
|
||||
private void initView() {
|
||||
negtiveBn = findViewById(R.id.negtive);
|
||||
positiveBn = findViewById(R.id.positive);
|
||||
titleTv = findViewById(R.id.title);
|
||||
messageTv = findViewById(R.id.message);
|
||||
imageIv = findViewById(R.id.image);
|
||||
// columnLineView = findViewById(R.id.column_line);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置确定取消按钮的回调
|
||||
*/
|
||||
private OnClickBottomListener onClickBottomListener;
|
||||
|
||||
public void setOnClickBottomListener(OnClickBottomListener onClickBottomListener) {
|
||||
this.onClickBottomListener = onClickBottomListener;
|
||||
}
|
||||
|
||||
public interface OnClickBottomListener {
|
||||
/**
|
||||
* 点击确定按钮事件
|
||||
*/
|
||||
void onPositiveClick();
|
||||
|
||||
/**
|
||||
* 点击取消按钮事件
|
||||
*/
|
||||
void onNegtiveClick();
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public CustomDialog setMessage(String message) {
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public CustomDialog setTitle(String title) {
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPositive() {
|
||||
return positive;
|
||||
}
|
||||
|
||||
public CustomDialog setPositive(String positive) {
|
||||
this.positive = positive;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNegtive() {
|
||||
return negtive;
|
||||
}
|
||||
|
||||
public CustomDialog setNegtive(String negtive) {
|
||||
this.negtive = negtive;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustomDialog setNegtiveText(String negtive) {
|
||||
negtiveBn.setText(negtive);
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getImageResId() {
|
||||
return imageResId;
|
||||
}
|
||||
|
||||
public boolean isSingle() {
|
||||
return isSingle;
|
||||
}
|
||||
|
||||
public CustomDialog setSingle(boolean single) {
|
||||
isSingle = single;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustomDialog setImageResId(int imageResId) {
|
||||
this.imageResId = imageResId;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dismiss() {
|
||||
super.dismiss();
|
||||
}
|
||||
}
|
||||
@@ -17,15 +17,20 @@ import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.trello.rxlifecycle4.RxLifecycle;
|
||||
import com.trello.rxlifecycle4.android.FragmentEvent;
|
||||
import com.uiuios.aios.R;
|
||||
import com.uiuios.aios.base.BaseFragment;
|
||||
import com.uiuios.aios.bean.BaseResponse;
|
||||
import com.uiuios.aios.bean.DesktopIcon;
|
||||
import com.uiuios.aios.dialog.CustomDialog;
|
||||
import com.uiuios.aios.network.NetInterfaceManager;
|
||||
import com.uiuios.aios.service.NotificationService;
|
||||
import com.uiuios.aios.utils.ApkUtils;
|
||||
import com.uiuios.aios.utils.BitmapUtils;
|
||||
import com.uiuios.aios.utils.IconUtils;
|
||||
import com.uiuios.aios.utils.AppUsedTimeUtils;
|
||||
import com.uiuios.aios.utils.ToastUtil;
|
||||
import com.uiuios.aios.view.MyGridLayout;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -39,7 +44,7 @@ import io.reactivex.rxjava3.disposables.Disposable;
|
||||
* Use the {@link AppListFragment#newInstance} factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
public class AppListFragment extends Fragment {
|
||||
public class AppListFragment extends BaseFragment {
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private static final String ARG_PARAM1 = "param1";
|
||||
@@ -49,6 +54,7 @@ public class AppListFragment extends Fragment {
|
||||
private String mParam1;
|
||||
private String mParam2;
|
||||
|
||||
private Context mContext;
|
||||
private ArrayList<DesktopIcon> mDesktopIcons;
|
||||
private MyGridLayout gridLayout;
|
||||
private String TAG = AppListFragment.class.getSimpleName();
|
||||
@@ -93,6 +99,7 @@ public class AppListFragment extends Fragment {
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
rootView = inflater.inflate(R.layout.fragment_applist, container, false);
|
||||
mContext = rootView.getContext();
|
||||
initView();
|
||||
return rootView;
|
||||
}
|
||||
@@ -172,9 +179,74 @@ public class AppListFragment extends Fragment {
|
||||
SendRunningApp(getActivity());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLongClick(View v, int index) {
|
||||
DesktopIcon desktopIcon = mDesktopIcons.get(index);
|
||||
String pkg = desktopIcon.getPackageName();
|
||||
Log.e(TAG, "onLongClick: " + pkg);
|
||||
switch (pkg) {
|
||||
case "aios.exit":
|
||||
case "com.uiuios.sn":
|
||||
break;
|
||||
default:
|
||||
showHinDialog(pkg, desktopIcon.getLable());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void updateAppDisableStatus(String pkg, String label) {
|
||||
NetInterfaceManager.getInstance().getUpdateAppIconObservable(pkg, label, 0)
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycleSubject, FragmentEvent.DESTROY))
|
||||
.subscribe(new Observer<BaseResponse>() {
|
||||
@Override
|
||||
public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) {
|
||||
Log.e("updateAppDisableStatus", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@io.reactivex.rxjava3.annotations.NonNull BaseResponse baseResponse) {
|
||||
Log.e("updateAppDisableStatus", "onNext: " + baseResponse);
|
||||
if (baseResponse.code == 200) {
|
||||
ApkUtils.disableApp(mContext, pkg);
|
||||
} else {
|
||||
ToastUtil.show("隐藏失败,检查网络连接");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) {
|
||||
Log.e("updateAppDisableStatus", "onError: ");
|
||||
onComplete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("updateAppDisableStatus", "onComplete: ");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void showHinDialog(String pkg, String label) {
|
||||
CustomDialog customDialog = new CustomDialog(mContext);
|
||||
customDialog.setTitle("隐藏应用");
|
||||
customDialog.setMessage("是否要隐藏:" + label);
|
||||
customDialog.setOnClickBottomListener(new CustomDialog.OnClickBottomListener() {
|
||||
@Override
|
||||
public void onPositiveClick() {
|
||||
updateAppDisableStatus(pkg, label);
|
||||
customDialog.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNegtiveClick() {
|
||||
customDialog.dismiss();
|
||||
}
|
||||
});
|
||||
customDialog.show();
|
||||
}
|
||||
|
||||
private void SendRunningApp(Context context) {
|
||||
String packageName = AppUsedTimeUtils.getInstance().getAppPackageName();
|
||||
long time = AppUsedTimeUtils.getInstance().getStartTime();
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.uiuios.aios.fragment.custom;
|
||||
|
||||
import com.uiuios.aios.base.BasePresenter;
|
||||
import com.uiuios.aios.base.BaseView;
|
||||
import com.uiuios.aios.bean.SnInfo;
|
||||
|
||||
public class CustomContact {
|
||||
public interface Presenter extends BasePresenter<CustomView> {
|
||||
void getSnInfo();
|
||||
}
|
||||
|
||||
public interface CustomView extends BaseView {
|
||||
void setSnInfo(SnInfo snInfo);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.uiuios.aios.fragment;
|
||||
package com.uiuios.aios.fragment.custom;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
||||
@@ -56,6 +56,7 @@ import com.uiuios.aios.activity.weather.WeatherActivity;
|
||||
import com.uiuios.aios.adapter.NotificationAdapter;
|
||||
import com.uiuios.aios.adapter.SOSNnmberAdapter;
|
||||
import com.uiuios.aios.alarm.AlarmUtils;
|
||||
import com.uiuios.aios.base.BaseFragment;
|
||||
import com.uiuios.aios.bean.AlarmClockData;
|
||||
import com.uiuios.aios.bean.AlarmItem;
|
||||
import com.uiuios.aios.bean.BaseResponse;
|
||||
@@ -94,7 +95,7 @@ import io.reactivex.rxjava3.disposables.Disposable;
|
||||
* Use the {@link CustomFragment#newInstance} factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkStatusChangedListener {
|
||||
public class CustomFragment extends BaseFragment implements CustomContact.CustomView, NetworkUtils.OnNetworkStatusChangedListener {
|
||||
// @BindView(R.id.cl_alarm)
|
||||
// ConstraintLayout cl_alarm;
|
||||
|
||||
@@ -118,7 +119,6 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
// ConstraintLayout cl_exit;
|
||||
@BindView(R.id.cl_control)
|
||||
ConstraintLayout cl_control;
|
||||
|
||||
// @BindView(R.id.cl_battery)
|
||||
// ConstraintLayout cl_battery;
|
||||
// @BindView(R.id.tv_add)
|
||||
@@ -167,6 +167,7 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
private Activity mContext;
|
||||
private ContentResolver mCRv;
|
||||
private CacheHelper mCacheHelper;
|
||||
private CustomPresenter mCustomPresenter;
|
||||
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
@@ -342,6 +343,9 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
// Inflate the layout for this fragment
|
||||
rootView = inflater.inflate(R.layout.fragment_custom, container, false);
|
||||
mContext = (Activity) rootView.getContext();
|
||||
mCustomPresenter = new CustomPresenter(mContext);
|
||||
mCustomPresenter.attachView(this);
|
||||
mCustomPresenter.setLifecycle(lifecycleSubject);
|
||||
mCacheHelper = new CacheHelper(mContext);
|
||||
mCRv = mContext.getContentResolver();
|
||||
ButterKnife.bind(this, rootView);
|
||||
@@ -476,6 +480,20 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
refreshMemory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSnInfo(SnInfo snInfo) {
|
||||
if (snInfo != null) {
|
||||
if (TextUtils.isEmpty(snInfo.getSn_name())) {
|
||||
// tv_name.setText("未设置");
|
||||
} else {
|
||||
// tv_name.setText(snInfo.getSn_name());
|
||||
}
|
||||
} else {
|
||||
// tv_name.setText("未设置");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void showPassword() {
|
||||
PasswordDialog passwordDialog = new PasswordDialog(mContext);
|
||||
passwordDialog.setTitle("请输入密码退出关怀系统");
|
||||
@@ -561,20 +579,7 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
NetInterfaceManager.getInstance().getSnInfo(new NetInterfaceManager.SnInfoCallback() {
|
||||
@Override
|
||||
public void setSnInfo(SnInfo snInfo) {
|
||||
if (snInfo != null) {
|
||||
if (TextUtils.isEmpty(snInfo.getSn_name())) {
|
||||
// tv_name.setText("未设置");
|
||||
} else {
|
||||
// tv_name.setText(snInfo.getSn_name());
|
||||
}
|
||||
} else {
|
||||
// tv_name.setText("未设置");
|
||||
}
|
||||
}
|
||||
});
|
||||
mCustomPresenter.getSnInfo();
|
||||
NetInterfaceManager.getInstance().getUserAvatarInfoControl()
|
||||
.subscribe(new Observer<BaseResponse<UserAvatarInfo>>() {
|
||||
@Override
|
||||
@@ -636,7 +641,6 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
.setPositive("确定")
|
||||
// .setNegtive("拒绝")
|
||||
// .setSingle(true)
|
||||
|
||||
.setOnClickBottomListener(new SingleDialog.OnClickBottomListener() {
|
||||
@Override
|
||||
public void onPositiveClick() {
|
||||
@@ -933,10 +937,10 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
float x2 = (((total - avail) / (float) total));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
mCustomPresenter.detachView();
|
||||
NetworkUtils.unregisterNetworkStatusChangedListener(this);
|
||||
if (batteryReceiver != null) {
|
||||
mContext.unregisterReceiver(batteryReceiver);
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.uiuios.aios.fragment;
|
||||
package com.uiuios.aios.fragment.custom;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.uiuios.aios.fragment.custom;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.trello.rxlifecycle4.android.ActivityEvent;
|
||||
import com.trello.rxlifecycle4.android.FragmentEvent;
|
||||
import com.uiuios.aios.bean.SnInfo;
|
||||
import com.uiuios.aios.network.NetInterfaceManager;
|
||||
|
||||
import io.reactivex.rxjava3.subjects.BehaviorSubject;
|
||||
|
||||
public class CustomPresenter implements CustomContact.Presenter {
|
||||
private static final String TAG = CustomPresenter.class.getSimpleName();
|
||||
private Context mContext;
|
||||
private CustomContact.CustomView mView;
|
||||
|
||||
public CustomPresenter(Context context) {
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
private BehaviorSubject<FragmentEvent> lifecycle;
|
||||
|
||||
void setLifecycle(BehaviorSubject<FragmentEvent> lifecycle) {
|
||||
this.lifecycle = lifecycle;
|
||||
}
|
||||
|
||||
public BehaviorSubject<FragmentEvent> getLifecycle() {
|
||||
return lifecycle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attachView(@NonNull CustomContact.CustomView view) {
|
||||
this.mView = view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detachView() {
|
||||
this.mView = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSnInfo() {
|
||||
NetInterfaceManager.getInstance().getSnInfo(new NetInterfaceManager.SnInfoCallback() {
|
||||
@Override
|
||||
public void setSnInfo(SnInfo snInfo) {
|
||||
mView.setSnInfo(snInfo);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -44,6 +44,7 @@ import com.uiuios.aios.network.api.SOSRecordApi;
|
||||
import com.uiuios.aios.network.api.SendScreenshotApi;
|
||||
import com.uiuios.aios.network.api.Setting;
|
||||
import com.uiuios.aios.network.api.UpdateAlarmClockApi;
|
||||
import com.uiuios.aios.network.api.UpdateAppIconApi;
|
||||
import com.uiuios.aios.network.api.UpdateDesktopApi;
|
||||
import com.uiuios.aios.network.api.UserInfoControl;
|
||||
import com.uiuios.aios.network.interceptor.RepeatRequestInterceptor;
|
||||
@@ -255,6 +256,13 @@ public class NetInterfaceManager {
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse> getUpdateAppIconObservable(String pkg, String label, int type) {
|
||||
return mRetrofit.create(UpdateAppIconApi.class)
|
||||
.appIconUpdate(Utils.getSerial(), pkg, type, label)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
|
||||
public interface onCompleteCallback {
|
||||
void onComplete();
|
||||
|
||||
@@ -42,7 +42,8 @@ public class URLAddress {
|
||||
public static final String GET_MAIL_LIST = "Control/getMailList";
|
||||
/*获取负二屏开关*/
|
||||
public static final String GET_ADMIN_SN_SETTING = "getAdminSnSetting";
|
||||
|
||||
/*更新app隐藏或者显示状态*/
|
||||
public static final String APP_ICON_UPDATE = "Control/appIconUpdate";
|
||||
|
||||
|
||||
public static final String GET_USER_ID = "getUserId";
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.uiuios.aios.network.api;
|
||||
|
||||
import com.uiuios.aios.bean.BaseResponse;
|
||||
import com.uiuios.aios.network.URLAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface UpdateAppIconApi {
|
||||
@FormUrlEncoded
|
||||
@POST(URLAddress.APP_ICON_UPDATE)
|
||||
Observable<BaseResponse> appIconUpdate(
|
||||
@Field("sn") String sn,
|
||||
@Field("app_package") String app_package,
|
||||
@Field("type") int type,//类型 1显示 0隐藏
|
||||
@Field("app_name") String app_name
|
||||
);
|
||||
}
|
||||
@@ -226,6 +226,15 @@ public class ApkUtils {
|
||||
return pm.getApplicationEnabledSetting(pkg) == PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
|
||||
}
|
||||
|
||||
public static boolean disableApp(Context context, String pkg) {
|
||||
PackageManager pm = context.getPackageManager();
|
||||
try {
|
||||
pm.setApplicationEnabledSetting(pkg, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取第三方应用
|
||||
|
||||
212
app/src/main/java/com/uiuios/aios/view/CustomSeekbar.java
Normal file
@@ -0,0 +1,212 @@
|
||||
package com.uiuios.aios.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.TypedValue;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
import com.uiuios.aios.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class CustomSeekbar extends View {
|
||||
private final String TAG = "CustomSeekbar";
|
||||
private int width;
|
||||
private int height;
|
||||
private int downX = 0;
|
||||
private int downY = 0;
|
||||
private int upX = 0;
|
||||
private int upY = 0;
|
||||
private int moveX = 0;
|
||||
private int moveY = 0;
|
||||
private float scale = 0;
|
||||
private int perWidth = 0;
|
||||
private Paint mPaint;
|
||||
private Paint mTextPaint;
|
||||
private Paint buttonPaint;
|
||||
private Canvas canvas;
|
||||
private Bitmap bitmap;
|
||||
private Bitmap thumb;
|
||||
private Bitmap spot;
|
||||
private Bitmap spot_on;
|
||||
private int hotarea = 100;//点击的热区
|
||||
private int cur_sections = 2;
|
||||
private ResponseOnTouch responseOnTouch;
|
||||
private int bitMapHeight = 38;//第一个点的起始位置起始,图片的长宽是76,所以取一半的距离
|
||||
private int textMove = 60;//字与下方点的距离,因为字体字体是40px,再加上10的间隔
|
||||
private int[] colors = new int[]{0xffdf5600, 0x33000000};//进度条的橙色,进度条的灰色,字体的灰色
|
||||
private int textSize;
|
||||
private int circleRadius;
|
||||
private ArrayList<String> section_title;
|
||||
|
||||
public interface ResponseOnTouch {
|
||||
public void onTouchResponse(int volume);
|
||||
}
|
||||
|
||||
public CustomSeekbar(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public CustomSeekbar(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public CustomSeekbar(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
cur_sections = 0;
|
||||
bitmap = Bitmap.createBitmap(900, 900, Bitmap.Config.ARGB_8888);
|
||||
canvas = new Canvas();
|
||||
canvas.setBitmap(bitmap);
|
||||
thumb = BitmapFactory.decodeResource(getResources(), R.drawable.set_button_0);
|
||||
spot = BitmapFactory.decodeResource(getResources(), R.drawable.spot);
|
||||
spot_on = BitmapFactory.decodeResource(getResources(), R.drawable.spot_on);
|
||||
bitMapHeight = thumb.getHeight() / 2;
|
||||
textMove = bitMapHeight + 22;
|
||||
textSize = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 12, getResources().getDisplayMetrics());
|
||||
circleRadius = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 3, getResources().getDisplayMetrics());
|
||||
mPaint = new Paint(Paint.DITHER_FLAG);
|
||||
mPaint.setAntiAlias(true);//锯齿不显示
|
||||
mPaint.setStrokeWidth(3);
|
||||
mTextPaint = new Paint(Paint.DITHER_FLAG);
|
||||
mTextPaint.setAntiAlias(true);
|
||||
mTextPaint.setTextSize(textSize);
|
||||
mTextPaint.setColor(0xffb5b5b4);
|
||||
buttonPaint = new Paint(Paint.DITHER_FLAG);
|
||||
buttonPaint.setAntiAlias(true);
|
||||
//initData(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 实例化后调用,设置bar的段数和文字
|
||||
*/
|
||||
public void initData(ArrayList<String> section) {
|
||||
if (section != null) {
|
||||
section_title = section;
|
||||
} else {
|
||||
String[] str = new String[]{"低", "中", "高"};
|
||||
section_title = new ArrayList<String>();
|
||||
for (int i = 0; i < str.length; i++) {
|
||||
section_title.add(str[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
|
||||
int widthMode = MeasureSpec.getMode(widthMeasureSpec);
|
||||
int widthSize = MeasureSpec.getSize(widthMeasureSpec);
|
||||
int heightMode = MeasureSpec.getMode(heightMeasureSpec);
|
||||
int heightSize = MeasureSpec.getSize(heightMeasureSpec);
|
||||
|
||||
width = widthSize;
|
||||
float scaleX = widthSize / 1080;
|
||||
float scaleY = heightSize / 1920;
|
||||
scale = Math.max(scaleX, scaleY);
|
||||
//控件的高度
|
||||
// height = 185;
|
||||
height = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 62, getResources().getDisplayMetrics());
|
||||
setMeasuredDimension(width, height);
|
||||
width = width - bitMapHeight / 2;
|
||||
perWidth = (width - section_title.size() * spot.getWidth() - thumb.getWidth() / 2) / (section_title.size() - 1);
|
||||
hotarea = perWidth / 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
mPaint.setColor(Color.WHITE);
|
||||
mPaint.setStyle(Paint.Style.FILL);
|
||||
mPaint.setAlpha(0);
|
||||
canvas.drawRect(0, 0, getMeasuredWidth(), getMeasuredHeight(), mPaint);
|
||||
canvas.drawBitmap(bitmap, 0, 0, null);
|
||||
mPaint.setAlpha(255);
|
||||
mPaint.setColor(colors[1]);
|
||||
canvas.drawLine(bitMapHeight, height * 2 / 3, width - bitMapHeight - spot_on.getWidth() / 2, height * 2 / 3, mPaint);
|
||||
int section = 0;
|
||||
while (section < section_title.size()) {
|
||||
if (section < cur_sections) {
|
||||
mPaint.setColor(colors[0]);
|
||||
canvas.drawLine(thumb.getWidth() / 2 + section * perWidth + (section + 1) * spot_on.getWidth(), height * 2 / 3,
|
||||
thumb.getWidth() / 2 + section * perWidth + (section + 1) * spot_on.getWidth() + perWidth, height * 2 / 3, mPaint);
|
||||
canvas.drawBitmap(spot_on, thumb.getWidth() / 2 + section * perWidth + section * spot_on.getWidth(), height * 2 / 3 - spot_on.getHeight() / 2, mPaint);
|
||||
} else {
|
||||
mPaint.setAlpha(255);
|
||||
if (section == section_title.size() - 1) {
|
||||
canvas.drawBitmap(spot, width - spot_on.getWidth() - bitMapHeight / 2, height * 2 / 3 - spot.getHeight() / 2, mPaint);
|
||||
} else {
|
||||
canvas.drawBitmap(spot, thumb.getWidth() / 2 + section * perWidth + section * spot_on.getWidth(), height * 2 / 3 - spot.getHeight() / 2, mPaint);
|
||||
}
|
||||
}
|
||||
|
||||
if (section == section_title.size() - 1) {
|
||||
canvas.drawText(section_title.get(section), width - spot_on.getWidth() - bitMapHeight / 4 - textSize / 2, height * 2 / 3 - textMove, mTextPaint);
|
||||
} else {
|
||||
canvas.drawText(section_title.get(section), thumb.getWidth() / 2 + section * perWidth + section * spot_on.getWidth(), height * 2 / 3 - textMove, mTextPaint);
|
||||
}
|
||||
section++;
|
||||
}
|
||||
if (cur_sections == section_title.size() - 1) {
|
||||
canvas.drawBitmap(thumb, width - spot_on.getWidth() - bitMapHeight / 2 - thumb.getWidth() / 2,
|
||||
height * 2 / 3 - bitMapHeight, buttonPaint);
|
||||
} else {
|
||||
canvas.drawBitmap(thumb, thumb.getWidth() / 2 + cur_sections * perWidth + cur_sections * spot_on.getWidth() - thumb.getWidth() / 4,
|
||||
height * 2 / 3 - bitMapHeight, buttonPaint);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
super.onTouchEvent(event);
|
||||
switch (event.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
thumb = BitmapFactory.decodeResource(getResources(), R.drawable.set_button_1);
|
||||
downX = (int) event.getX();
|
||||
downY = (int) event.getY();
|
||||
responseTouch(downX, downY);
|
||||
break;
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
thumb = BitmapFactory.decodeResource(getResources(), R.drawable.set_button_1);
|
||||
moveX = (int) event.getX();
|
||||
moveY = (int) event.getY();
|
||||
responseTouch(moveX, moveY);
|
||||
break;
|
||||
case MotionEvent.ACTION_UP:
|
||||
thumb = BitmapFactory.decodeResource(getResources(), R.drawable.set_button_0);
|
||||
upX = (int) event.getX();
|
||||
upY = (int) event.getY();
|
||||
responseTouch(upX, upY);
|
||||
responseOnTouch.onTouchResponse(cur_sections);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private void responseTouch(int x, int y) {
|
||||
if (x <= width - bitMapHeight / 2) {
|
||||
cur_sections = (x + perWidth / 3) / perWidth;
|
||||
} else {
|
||||
cur_sections = section_title.size() - 1;
|
||||
}
|
||||
invalidate();
|
||||
}
|
||||
|
||||
//设置监听
|
||||
public void setResponseOnTouch(ResponseOnTouch response) {
|
||||
responseOnTouch = response;
|
||||
}
|
||||
|
||||
//设置进度
|
||||
public void setProgress(int progress) {
|
||||
cur_sections = progress;
|
||||
invalidate();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -143,6 +143,8 @@ public class MyGridLayout extends ViewGroup {
|
||||
|
||||
public interface OnItemClickListener {
|
||||
void onItemClick(View v, int index);
|
||||
|
||||
void onLongClick(View v, int index);
|
||||
}
|
||||
|
||||
private ArrayList<DesktopIcon> applicationInfos;
|
||||
@@ -163,13 +165,19 @@ public class MyGridLayout extends ViewGroup {
|
||||
for (int i = 0; i < adapter.getCount(); i++) {
|
||||
final int index = i;
|
||||
View view = getChildAt(i);
|
||||
view.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
view.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
click.onItemClick(v, index);
|
||||
}
|
||||
});
|
||||
view.setOnLongClickListener(new OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View view) {
|
||||
click.onLongClick(view, index);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
if (applicationInfos.get(index) == null) {
|
||||
view.setClickable(false);
|
||||
} else {
|
||||
|
||||
155
app/src/main/java/com/uiuios/aios/view/RulerSeekBar.java
Normal file
@@ -0,0 +1,155 @@
|
||||
package com.uiuios.aios.view;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Build;
|
||||
|
||||
import android.util.AttributeSet;
|
||||
|
||||
public class RulerSeekBar extends androidx.appcompat.widget.AppCompatSeekBar {
|
||||
|
||||
/**
|
||||
* 刻度线画笔
|
||||
*/
|
||||
private Paint mRulerPaint;
|
||||
|
||||
/**
|
||||
* 刻度线的个数,等分数等于刻度线的个数加1
|
||||
*/
|
||||
private int mRulerCount = 1;
|
||||
|
||||
/**
|
||||
* 每条刻度线的宽度
|
||||
*/
|
||||
private int mRulerWidth = 2;
|
||||
|
||||
/**
|
||||
* 刻度线的颜色
|
||||
*/
|
||||
private int mRulerColor = Color.WHITE;
|
||||
|
||||
/**
|
||||
* 滑块上面是否要显示刻度线
|
||||
*/
|
||||
private boolean isShowTopOfThumb = false;
|
||||
|
||||
public RulerSeekBar(Context context) {
|
||||
super(context);
|
||||
init();
|
||||
}
|
||||
|
||||
public RulerSeekBar(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init();
|
||||
}
|
||||
|
||||
public RulerSeekBar(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init();
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
private void init() {
|
||||
//创建绘制刻度线的画笔
|
||||
mRulerPaint = new Paint();
|
||||
mRulerPaint.setColor(mRulerColor);
|
||||
mRulerPaint.setAntiAlias(true);
|
||||
|
||||
//Api21及以上调用,去掉滑块后面的背景
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
setSplitTrack(false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 重写onDraw方法绘制刻度线
|
||||
*
|
||||
* @param canvas
|
||||
*/
|
||||
@Override
|
||||
protected synchronized void onDraw(Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
|
||||
//极限条件校验
|
||||
if (getWidth() <= 0 || mRulerCount <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
//获取每一份的长度
|
||||
int length = (getWidth() - getPaddingLeft() - getPaddingRight() - mRulerCount * mRulerWidth) / (mRulerCount + 1);
|
||||
|
||||
//计算刻度线的顶部坐标和底部坐标
|
||||
int rulerTop = getHeight() / 2 - getMinimumHeight() / 2;
|
||||
int rulerBottom = rulerTop + getMinimumHeight();
|
||||
|
||||
//获取滑块的位置信息
|
||||
Rect thumbRect = null;
|
||||
if (getThumb() != null) {
|
||||
thumbRect = getThumb().getBounds();
|
||||
}
|
||||
|
||||
//绘制刻度线
|
||||
for (int i = 1; i <= mRulerCount; i++) {
|
||||
//计算刻度线的左边坐标和右边坐标
|
||||
int rulerLeft = i * length + getPaddingLeft();
|
||||
int rulerRight = rulerLeft + mRulerWidth;
|
||||
|
||||
//判断是否需要绘制刻度线
|
||||
if (!isShowTopOfThumb && thumbRect != null && rulerLeft - getPaddingLeft() > thumbRect.left && rulerRight - getPaddingLeft() < thumbRect.right) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//进行绘制
|
||||
canvas.drawRect(rulerLeft, rulerTop, rulerRight, rulerBottom, mRulerPaint);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置刻度线的个数
|
||||
*
|
||||
* @param mRulerCount
|
||||
*/
|
||||
public void setRulerCount(int mRulerCount) {
|
||||
this.mRulerCount = mRulerCount;
|
||||
requestLayout();
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置刻度线的宽度,单位(px)
|
||||
*
|
||||
* @param mRulerWidth
|
||||
*/
|
||||
public void setRulerWidth(int mRulerWidth) {
|
||||
this.mRulerWidth = mRulerWidth;
|
||||
requestLayout();
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置刻度线的颜色
|
||||
*
|
||||
* @param mRulerColor
|
||||
*/
|
||||
public void setRulerColor(int mRulerColor) {
|
||||
this.mRulerColor = mRulerColor;
|
||||
if (mRulerPaint != null) {
|
||||
mRulerPaint.setColor(mRulerColor);
|
||||
requestLayout();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 滑块上面是否需要显示刻度线
|
||||
*
|
||||
* @param isShowTopOfThumb
|
||||
*/
|
||||
public void setShowTopOfThumb(boolean isShowTopOfThumb) {
|
||||
this.isShowTopOfThumb = isShowTopOfThumb;
|
||||
requestLayout();
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 5.0 KiB |
BIN
app/src/main/res/drawable-hdpi/control_back.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/drawable-hdpi/home_settings_icon.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/drawable-hdpi/set_button_0.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
app/src/main/res/drawable-hdpi/set_button_1.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 2.6 KiB |
BIN
app/src/main/res/drawable-hdpi/spot.png
Normal file
|
After Width: | Height: | Size: 406 B |
BIN
app/src/main/res/drawable-hdpi/spot_on.png
Normal file
|
After Width: | Height: | Size: 402 B |
|
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -2,7 +2,7 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<!-- 内部颜色 -->
|
||||
<solid android:color="#800480FF" />
|
||||
<solid android:color="#0480ff" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/dp_8"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<!-- 内部颜色 -->
|
||||
<solid android:color="#80535353" />
|
||||
<solid android:color="#162136" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/dp_8"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<!-- android:width="1dp"-->
|
||||
<!-- android:color="#fff" />-->
|
||||
<corners android:radius="@dimen/dp_8" />
|
||||
<solid android:color="#80535353" />
|
||||
<solid android:color="#162136" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<!-- android:width="1dp"-->
|
||||
<!-- android:color="#fff" />-->
|
||||
<corners android:radius="@dimen/dp_8" />
|
||||
<solid android:color="#800480FF" />
|
||||
<solid android:color="#0480ff" />
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
|
||||
23
app/src/main/res/drawable/shape_progress_drawable.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@android:id/background">
|
||||
<shape>
|
||||
<solid android:color="#e1e8f0" />
|
||||
<size android:height="8dp" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item android:id="@android:id/progress">
|
||||
<clip>
|
||||
<shape>
|
||||
<gradient
|
||||
android:centerColor="#e1e8f0"
|
||||
android:endColor="#e1e8f0"
|
||||
android:startColor="#e1e8f0" />
|
||||
<size android:height="8dp" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
</layer-list>
|
||||
10
app/src/main/res/drawable/shape_thumb_icon.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
|
||||
<size
|
||||
android:width="30dp"
|
||||
android:height="30dp" />
|
||||
|
||||
<solid android:color="@android:color/holo_blue_light" />
|
||||
</shape>
|
||||
@@ -7,16 +7,49 @@
|
||||
android:background="@drawable/control_background"
|
||||
tools:context=".activity.ControlActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:src="@drawable/control_back"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="快捷控制"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_back"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_48"
|
||||
android:layout_marginBottom="@dimen/dp_48"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_36"
|
||||
android:layout_marginEnd="@dimen/dp_36"
|
||||
android:layout_marginBottom="@dimen/dp_36"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
app:layout_constraintTop_toBottomOf="@+id/constraintLayout5">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
@@ -27,7 +60,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="2"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -55,7 +88,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:text="WIFI"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
@@ -100,7 +133,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:text="蓝牙"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
@@ -127,6 +160,23 @@
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/control_background_item">
|
||||
|
||||
|
||||
<com.uiuios.aios.view.RulerSeekBar
|
||||
android:id="@+id/seekBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:max="3"
|
||||
android:maxHeight="16dp"
|
||||
android:minHeight="16dp"
|
||||
android:progress="0"
|
||||
android:progressDrawable="@drawable/shape_progress_drawable"
|
||||
android:thumb="@drawable/shape_thumb_icon"
|
||||
android:thumbOffset="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_font_size" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView21"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -152,15 +202,16 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_32"
|
||||
android:layout_marginEnd="@dimen/dp_32"
|
||||
android:max="3"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_font_size" />
|
||||
<!-- <SeekBar-->
|
||||
<!-- android:id="@+id/seekBar"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_32"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_32"-->
|
||||
<!-- android:max="3"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/tv_font_size" />-->
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -221,7 +272,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="2"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -249,7 +300,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:text="电量"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
@@ -294,7 +345,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:text="手电筒"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
@@ -390,7 +441,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="未知"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_location"
|
||||
|
||||
@@ -7,21 +7,52 @@
|
||||
android:background="@drawable/control_background"
|
||||
tools:context=".activity.ControlActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:src="@drawable/control_back"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="快捷控制"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_back"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_48"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="@dimen/dp_48"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
app:layout_constraintTop_toBottomOf="@+id/constraintLayout5">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="4"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -49,7 +80,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:text="WIFI"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
@@ -94,7 +125,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:text="蓝牙"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
@@ -117,7 +148,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="4"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -145,7 +176,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:text="电量"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
@@ -190,7 +221,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:text="手电筒"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
@@ -214,9 +245,25 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="@dimen/dp_8"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="2"
|
||||
android:background="@drawable/control_background_item">
|
||||
|
||||
<com.uiuios.aios.view.RulerSeekBar
|
||||
android:id="@+id/seekBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:max="2"
|
||||
android:maxHeight="16dp"
|
||||
android:minHeight="16dp"
|
||||
android:progress="0"
|
||||
android:progressDrawable="@drawable/shape_progress_drawable"
|
||||
android:thumb="@drawable/shape_thumb_icon"
|
||||
android:thumbOffset="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_font_size" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView21"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -225,7 +272,7 @@
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="字体大小"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -233,31 +280,32 @@
|
||||
android:id="@+id/tv_font_size"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="标准"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textSize="@dimen/sp_9"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_32"
|
||||
android:layout_marginEnd="@dimen/dp_32"
|
||||
android:max="3"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_font_size" />
|
||||
<!-- <SeekBar-->
|
||||
<!-- android:id="@+id/seekBar"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_32"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_32"-->
|
||||
<!-- android:max="3"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/tv_font_size" />-->
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="@dimen/dp_8"
|
||||
android:layout_weight="1">
|
||||
android:layout_weight="2">
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekbar_sound"
|
||||
@@ -305,7 +353,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="@dimen/dp_8"
|
||||
android:layout_weight="1">
|
||||
android:layout_weight="2">
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekbar_brightness"
|
||||
@@ -354,7 +402,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="@dimen/dp_8"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="2"
|
||||
android:background="@drawable/control_background_item">
|
||||
|
||||
<ImageView
|
||||
@@ -377,7 +425,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="未知"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_location"
|
||||
|
||||
120
app/src/main/res/layout/custom_dialog.xml
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="@dimen/dp_300"
|
||||
android:layout_height="@dimen/dp_200"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/bg_dialog"
|
||||
android:minWidth="@dimen/dp_240"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/dp_8"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxWidth="@dimen/dp_80"
|
||||
android:maxHeight="@dimen/dp_80"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:textStyle="bold"
|
||||
android:visibility="visible"
|
||||
tools:text="消息提示" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/message"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:gravity="center"
|
||||
android:lineSpacingExtra="@dimen/dp_3"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:minHeight="@dimen/dp_50"
|
||||
android:textColor="#999999"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="提示消息提示消息提示消息提示消息提示消息" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/linearLayout3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_56"
|
||||
android:layout_marginEnd="@dimen/dp_56"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/positive"
|
||||
android:layout_width="@dimen/dp_64"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/join_background"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="确定" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/negtive"
|
||||
android:layout_width="@dimen/dp_64"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/joined_background"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="取消" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 5.5 KiB |
@@ -17,13 +17,13 @@
|
||||
</declare-styleable>
|
||||
|
||||
<string-array name="entryvalues_font_size" translatable="false">
|
||||
<item>0.85</item>
|
||||
<!-- <item>0.85</item>-->
|
||||
<item>1.0</item>
|
||||
<item>1.15</item>
|
||||
<item>1.30</item>
|
||||
</string-array>
|
||||
<string-array name="entries_font_size">
|
||||
<item msgid="4649244712522775149">"小"</item>
|
||||
<!-- <item msgid="4649244712522775149">"小"</item>-->
|
||||
<item msgid="4350318459725129464">"默认"</item>
|
||||
<item msgid="722959474722634030">"大"</item>
|
||||
<item msgid="5468692832610514379">"最大"</item>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<color name="notice_blue">#0480FF</color>
|
||||
<color name="ok_button">#4D4B50</color>
|
||||
<color name="red">#FF0000</color>
|
||||
<color name="actions_item_pressed">#2a306b</color>
|
||||
<color name="actions_item_pressed">#17233b</color>
|
||||
<color name="default_background_color">#8e6afb</color>
|
||||
|
||||
<color name="voice_color">#00D56B</color>
|
||||
@@ -29,6 +29,6 @@
|
||||
|
||||
<color name="noti_color">#eae8e8</color>
|
||||
<color name="noti_font_color">#bbbaba</color>
|
||||
<color name="line_color">#2a306b</color>
|
||||
<color name="line_color">#182237</color>
|
||||
|
||||
</resources>
|
||||
|
||||