version:2.6
fix: update:修改主页图标,布局
@@ -104,10 +104,10 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
||||
|
||||
is_twoscreen = Settings.Global.getInt(getContentResolver(), "is_twoscreen", 1) == 1;
|
||||
if (is_twoscreen) {
|
||||
appListIndex = 2;
|
||||
defaultCurrent = 1;
|
||||
mSecondFragment = new SecondFragment();
|
||||
mFragments.add(mSecondFragment);
|
||||
// appListIndex = 2;
|
||||
// defaultCurrent = 1;
|
||||
// mSecondFragment = new SecondFragment();
|
||||
// mFragments.add(mSecondFragment);
|
||||
}
|
||||
mCustomFragment = new CustomFragment();
|
||||
mFragments.add(mCustomFragment);
|
||||
|
||||
@@ -9,6 +9,8 @@ import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkCapabilities;
|
||||
import android.net.NetworkInfo;
|
||||
@@ -72,6 +74,7 @@ import com.uiuios.aios.network.URLAddress;
|
||||
import com.uiuios.aios.tpush.MessageReceiver;
|
||||
import com.uiuios.aios.utils.ApkUtils;
|
||||
import com.uiuios.aios.utils.AppUtil;
|
||||
import com.uiuios.aios.utils.BitmapUtils;
|
||||
import com.uiuios.aios.utils.NetStateUtils;
|
||||
import com.uiuios.aios.utils.SchemeUtils;
|
||||
import com.uiuios.aios.utils.ToastUtil;
|
||||
@@ -153,18 +156,19 @@ public class CustomFragment extends BaseFragment implements CustomContact.Custom
|
||||
@BindView(R.id.rv_sos)
|
||||
RecyclerView rv_sos;
|
||||
@BindView(R.id.iv_note_nodata)
|
||||
TextView iv_note_nodata;
|
||||
ImageView iv_note_nodata;
|
||||
// @BindView(R.id.iv_head)
|
||||
// ImageView iv_head;
|
||||
@BindView(R.id.tv_name)
|
||||
TextView tv_name;
|
||||
@BindView(R.id.iv_app)
|
||||
ImageView iv_app;
|
||||
|
||||
@BindView(R.id.iv_battery)
|
||||
ImageView iv_battery;
|
||||
|
||||
private static final String TAG = CustomFragment.class.getSimpleName();
|
||||
// private int[] mShaderColors = new int[]{0xFFfa3db5, 0xFFF8867E, 0xFFF79F6B, 0xFFF79F6B, 0xFFF79F6B, 0xFFF8867E, 0xFFfa3db5};
|
||||
private int[] mShaderColors = new int[]{0xFFff9300, 0xFFff9300, 0xFFff9300, 0xFFff9300, 0xFFff9300, 0xFFff9300, 0xFFff9300};
|
||||
private int[] mShaderColors = new int[]{0xFF05d192, 0xFF05d192, 0xFF05d192, 0xFF05d192, 0xFF05d192, 0xFF05d192, 0xFF05d192};
|
||||
private int[] mShaderColorsRed = new int[]{0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000};
|
||||
private View rootView;
|
||||
private List<AlarmItem> alarmItemList;
|
||||
@@ -351,6 +355,10 @@ public class CustomFragment extends BaseFragment implements CustomContact.Custom
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
String action = intent.getAction();
|
||||
if (Intent.ACTION_BATTERY_CHANGED.equals(action)) {
|
||||
//你可以读到充电状态,如果在充电,可以读到是usb还是交流电
|
||||
int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
|
||||
boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
|
||||
status == BatteryManager.BATTERY_STATUS_FULL;
|
||||
// 当前电量
|
||||
int level = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, 0);
|
||||
// 最大电量
|
||||
@@ -358,6 +366,7 @@ public class CustomFragment extends BaseFragment implements CustomContact.Custom
|
||||
int elec = (level * 100) / scale;
|
||||
Log.i(TAG, "electricity:=" + elec + "%");
|
||||
tv_battery.setText(elec + "%");
|
||||
notifyBattery(level, scale, status, isCharging);
|
||||
} else if (Intent.ACTION_POWER_CONNECTED.equals(action)
|
||||
|| Intent.ACTION_POWER_DISCONNECTED.equals(action)
|
||||
|| Intent.ACTION_BATTERY_LOW.equals(action)
|
||||
@@ -368,6 +377,11 @@ public class CustomFragment extends BaseFragment implements CustomContact.Custom
|
||||
}
|
||||
}
|
||||
|
||||
public void notifyBattery(int level, int scale, int status, boolean isCharging) {
|
||||
Bitmap bitmap = BitmapUtils.getbatteryIcon(mContext, BitmapFactory.decodeResource(getResources(), R.drawable.battery_icon), level, isCharging);
|
||||
iv_battery.setImageBitmap(bitmap);
|
||||
}
|
||||
|
||||
private BroadcastReceiver mbatteryReceiver = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
@@ -828,19 +842,19 @@ public class CustomFragment extends BaseFragment implements CustomContact.Custom
|
||||
});
|
||||
}
|
||||
|
||||
private void getAlarmCache(){
|
||||
private void getAlarmCache() {
|
||||
String jsonString = mCacheHelper.getAsString(URLAddress.GET_ALARM_CLOCK);
|
||||
Gson gson = new Gson();
|
||||
Type type = new TypeToken<List<AlarmClockData>>() {
|
||||
}.getType();
|
||||
List<AlarmClockData> list = gson.fromJson(jsonString, type);
|
||||
if (list == null || list.size() == 0) {
|
||||
rv_noti.setVisibility(View.GONE);
|
||||
iv_note_nodata.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
notificationAdapter.setDataList(list);
|
||||
rv_noti.setVisibility(View.VISIBLE);
|
||||
iv_note_nodata.setVisibility(View.GONE);
|
||||
} else {
|
||||
rv_noti.setVisibility(View.GONE);
|
||||
iv_note_nodata.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,9 +77,9 @@ public class ApkUtils {
|
||||
this.add("com.uiui.city");
|
||||
this.add("com.uiui.health");
|
||||
// this.add("com.alldocube.store");
|
||||
this.add("com.android.fmradio");
|
||||
this.add("com.android.documentsui");
|
||||
this.add("com.android.calculator2");
|
||||
// this.add("com.android.fmradio");
|
||||
// this.add("com.android.documentsui");
|
||||
// this.add("com.android.calculator2");
|
||||
}};
|
||||
private static HashSet<String> allHintPackage = new HashSet<String>() {{
|
||||
this.add("com.android.uiuios");
|
||||
|
||||
@@ -4,12 +4,19 @@ 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.graphics.PixelFormat;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.AdaptiveIconDrawable;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
|
||||
import com.uiuios.aios.R;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
||||
public class BitmapUtils {
|
||||
@@ -69,4 +76,54 @@ public class BitmapUtils {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static Bitmap getbatteryIcon(Context context, Bitmap bitmap, int level, boolean charging) {
|
||||
String st_level = String.valueOf(level);
|
||||
int paddingLeft = 6;
|
||||
int paddingRight = 8;
|
||||
int paddingTop = 6;
|
||||
int paddingBottom = 6;
|
||||
int width = bitmap.getWidth();
|
||||
int height = bitmap.getHeight();
|
||||
Bitmap background = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
|
||||
Bitmap bitmapScale = Bitmap.createScaledBitmap(bitmap, width, height, true);
|
||||
Canvas canvas = new Canvas();
|
||||
canvas.setBitmap(background);
|
||||
Paint paint = new Paint();
|
||||
if (charging) {
|
||||
paint.setColor(context.getColor(R.color.charging_color));
|
||||
} else {
|
||||
if (level <= 20) {
|
||||
paint.setColor(Color.RED);
|
||||
} else {
|
||||
paint.setColor(context.getColor(R.color.no_charging_color));
|
||||
}
|
||||
}
|
||||
//设置画笔类型
|
||||
paint.setStyle(Paint.Style.FILL);
|
||||
//使用画笔在画布上画矩形
|
||||
paint.setAntiAlias(true);
|
||||
Rect mSrcRect = new Rect(0, 0, width, height);
|
||||
canvas.drawBitmap(bitmapScale, mSrcRect, mSrcRect, null);
|
||||
RectF rectF = new RectF(paddingLeft, paddingTop, (bitmap.getWidth() - paddingRight) * level / 100, bitmap.getHeight() - paddingBottom);// 设置个新的长方形
|
||||
canvas.drawRoundRect(rectF, 3, 3, paint);
|
||||
|
||||
final float mDensity = context.getResources().getDisplayMetrics().density;
|
||||
Rect rect = new Rect();
|
||||
Paint mDatePaint = new Paint();
|
||||
mDatePaint.setTypeface(Typeface.SANS_SERIF);
|
||||
mDatePaint.setTextSize((int) 9F * mDensity);//文字大小
|
||||
mDatePaint.setColor(Color.BLACK);
|
||||
mDatePaint.setAntiAlias(true);
|
||||
|
||||
mDatePaint.getTextBounds(st_level, 0, st_level.length(), rect);
|
||||
//通过文字获取矩形的面积
|
||||
int width1 = rect.right - rect.left;
|
||||
int height1 = rect.bottom - rect.top;
|
||||
int width2 = background.getWidth();
|
||||
int height2 = background.getHeight();
|
||||
canvas.drawText(st_level, (width2 - width1) / 2 - rect.left, (height2 - height1) / 2 - rect.top, mDatePaint);
|
||||
return background;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BIN
app/src/main/res/drawable-hdpi/battery_bg.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
@@ -3,7 +3,7 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 内部颜色 -->
|
||||
<solid
|
||||
android:color="#00b7ee" />
|
||||
android:color="#bad9f9" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners
|
||||
android:topLeftRadius="16dp"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 内部颜色 -->
|
||||
<solid
|
||||
android:color="#fbc23b" />
|
||||
android:color="#fcebc3" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners
|
||||
android:topLeftRadius="16dp"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 内部颜色 -->
|
||||
<solid
|
||||
android:color="#acd598" />
|
||||
android:color="#90a1b7" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners
|
||||
android:topLeftRadius="16dp"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 内部颜色 -->
|
||||
<solid
|
||||
android:color="@color/white" />
|
||||
android:color="@color/alarm_bg_color" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners
|
||||
android:topLeftRadius="10dp"
|
||||
13
app/src/main/res/drawable/custom_bg_appstore.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 内部颜色 -->
|
||||
<solid
|
||||
android:color="@color/appstore_bg_color" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners
|
||||
android:topLeftRadius="10dp"
|
||||
android:topRightRadius="10dp"
|
||||
android:bottomLeftRadius="10dp"
|
||||
android:bottomRightRadius="10dp" />
|
||||
</shape>
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 内部颜色 -->
|
||||
<solid
|
||||
android:color="@color/white" />
|
||||
android:color="@color/health_bg_color" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners
|
||||
android:topLeftRadius="10dp"
|
||||
|
||||
@@ -102,11 +102,9 @@
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView6"
|
||||
android:layout_width="@dimen/dp_28"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:id="@+id/iv_battery"
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_8"
|
||||
android:src="@drawable/battery_icon"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -124,7 +122,7 @@
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView6"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_battery"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -216,7 +214,7 @@
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="天气预报"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/default_text_color"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -229,7 +227,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_36"
|
||||
android:gravity="center_vertical"
|
||||
android:text="10℃"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/default_text_color"
|
||||
android:textSize="@dimen/sp_30"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -243,7 +241,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:text="位置"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/default_text_color"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_temp"
|
||||
@@ -255,7 +253,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:text="天气"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/default_text_color"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_location"
|
||||
@@ -272,7 +270,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_2"
|
||||
android:layout_marginBottom="@dimen/dp_2"
|
||||
android:layout_weight="3"
|
||||
android:background="@drawable/custom_bg_white">
|
||||
android:background="@drawable/custom_bg_alarm">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
@@ -281,14 +279,14 @@
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="爱心闹钟"
|
||||
android:textColor="@color/title_gray"
|
||||
android:textColor="@color/default_text_color"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/iv_note_nodata"
|
||||
android:id="@+id/tv_note_nodata"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/noti_background"
|
||||
@@ -299,10 +297,23 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_note_nodata"
|
||||
android:layout_width="@dimen/dp_68"
|
||||
android:layout_height="@dimen/dp_68"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="visible"
|
||||
android:src="@drawable/home_reminder_icon"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_noti"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:overScrollMode="never"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView4" />
|
||||
@@ -317,7 +328,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_4"
|
||||
android:layout_marginBottom="@dimen/dp_2"
|
||||
android:layout_weight="2"
|
||||
android:background="@drawable/custom_bg_white">
|
||||
android:background="@drawable/custom_bg_sos">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView7"
|
||||
@@ -326,7 +337,7 @@
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="紧急呼叫"
|
||||
android:textColor="@color/title_gray"
|
||||
android:textColor="@color/default_text_color"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -337,7 +348,7 @@
|
||||
android:layout_width="@dimen/dp_68"
|
||||
android:layout_height="@dimen/dp_68"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/home_sos_icon"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -418,7 +429,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_2"
|
||||
android:layout_marginBottom="@dimen/dp_4"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/custom_bg_white"
|
||||
android:background="@drawable/custom_bg_clean"
|
||||
tools:ignore="NestedWeights">
|
||||
|
||||
<TextView
|
||||
@@ -440,6 +451,7 @@
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/home_icon_clean"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -463,8 +475,8 @@
|
||||
app:cpvDuration="1000"
|
||||
app:cpvLabelTextColor="@color/black"
|
||||
app:cpvLabelTextSize="26sp"
|
||||
app:cpvNormalColor="#FFD3D3D3"
|
||||
app:cpvProgressColor="#ff9300"
|
||||
app:cpvNormalColor="#bae2d6"
|
||||
app:cpvProgressColor="#05d192"
|
||||
app:cpvShowTick="false"
|
||||
app:cpvStrokeWidth="@dimen/dp_16"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -530,7 +542,7 @@
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="快捷应用"
|
||||
android:textColor="@color/title_gray"
|
||||
android:textColor="@color/default_text_color"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -541,7 +553,7 @@
|
||||
android:layout_width="@dimen/dp_68"
|
||||
android:layout_height="@dimen/dp_68"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/home_quick_app"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -559,7 +571,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_2"
|
||||
android:layout_marginBottom="@dimen/dp_4"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/custom_bg_white">
|
||||
android:background="@drawable/custom_bg_contact">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
@@ -568,7 +580,7 @@
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="通讯录"
|
||||
android:textColor="@color/title_gray"
|
||||
android:textColor="@color/default_text_color"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -578,7 +590,7 @@
|
||||
android:layout_width="@dimen/dp_68"
|
||||
android:layout_height="@dimen/dp_68"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/home_contact_icon"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -595,7 +607,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_4"
|
||||
android:layout_marginBottom="@dimen/dp_4"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/custom_bg_ai"
|
||||
android:background="@drawable/custom_bg_appstore"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
@@ -604,7 +616,7 @@
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="应用市场"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/default_text_color"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -614,7 +626,7 @@
|
||||
android:layout_width="@dimen/dp_68"
|
||||
android:layout_height="@dimen/dp_68"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/systemapp_icon"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -639,7 +651,7 @@
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="AI问诊"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/default_text_color"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -649,7 +661,7 @@
|
||||
android:layout_width="@dimen/dp_68"
|
||||
android:layout_height="@dimen/dp_68"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/home_clinical_hand"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -328,7 +328,6 @@
|
||||
android:layout_marginStart="32dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/wifi_icon"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView6"
|
||||
android:id="@+id/iv_battery"
|
||||
android:layout_width="@dimen/dp_28"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:adjustViewBounds="true"
|
||||
@@ -123,7 +123,7 @@
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView6"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_battery"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_2"
|
||||
android:layout_marginBottom="@dimen/dp_2"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/custom_bg_white">
|
||||
android:background="@drawable/custom_bg_alarm">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
@@ -297,7 +297,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/iv_note_nodata"
|
||||
android:id="@+id/tv_note_nodata"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/noti_background"
|
||||
@@ -308,6 +308,19 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_note_nodata"
|
||||
android:layout_width="@dimen/dp_68"
|
||||
android:layout_height="@dimen/dp_68"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="visible"
|
||||
android:src="@drawable/home_reminder_icon"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_noti"
|
||||
android:layout_width="match_parent"
|
||||
@@ -334,7 +347,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_4"
|
||||
android:layout_marginBottom="@dimen/dp_2"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/custom_bg_white">
|
||||
android:background="@drawable/custom_bg_alarm">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView7"
|
||||
@@ -394,7 +407,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_4"
|
||||
android:layout_marginBottom="@dimen/dp_2"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/custom_bg_white"
|
||||
android:background="@drawable/custom_bg_alarm"
|
||||
tools:ignore="NestedWeights">
|
||||
|
||||
<ImageView
|
||||
@@ -650,7 +663,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_2"
|
||||
android:layout_marginBottom="@dimen/dp_4"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/custom_bg_white">
|
||||
android:background="@drawable/custom_bg_alarm">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/wallpaper"
|
||||
android:background="@color/main_bg_color"
|
||||
tools:context=".activity.main.MainActivity">
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
|
||||
@@ -21,12 +21,13 @@
|
||||
|
||||
<color name="voice_color">#00D56B</color>
|
||||
<color name="weathet_bg_color">#3b6ab9</color>
|
||||
<color name="health_bg_color">#00d56b</color>
|
||||
<color name="sos_bg_color">#b25353</color>
|
||||
<color name="clean_bg_color">#3f8f4b</color>
|
||||
<color name="health_bg_color">#ecfafd</color>
|
||||
<color name="alarm_bg_color">#e1e5fa</color>
|
||||
<color name="sos_bg_color">#fadfdf</color>
|
||||
<color name="clean_bg_color">#e0fbf3</color>
|
||||
<color name="guard_bg_color">#e08c61</color>
|
||||
<color name="contact_bg_color">#536fae</color>
|
||||
<color name="appstore_bg_color">#00d56b</color>
|
||||
<color name="contact_bg_color">#e8eafc</color>
|
||||
<color name="appstore_bg_color">#fcf3e7</color>
|
||||
|
||||
<color name="noti_color">#eae8e8</color>
|
||||
<color name="noti_font_color">#bbbaba</color>
|
||||
@@ -34,4 +35,10 @@
|
||||
<color name="title_gray">#858585</color>
|
||||
<color name="title_red">#F44250</color>
|
||||
<color name="title_red2">#F5AAA7</color>
|
||||
|
||||
<color name="default_text_color">#323a4c</color>
|
||||
<color name="main_bg_color">#323a4c</color>
|
||||
|
||||
<color name="charging_color">#00d56b</color>
|
||||
<color name="no_charging_color">#a0a0a0</color>
|
||||
</resources>
|
||||
|
||||