diff --git a/app/build.gradle b/app/build.gradle index aac9c21..1515613 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -16,8 +16,8 @@ android { applicationId "com.uiui.aios" minSdkVersion 24 targetSdkVersion 29 - versionCode 38 - versionName "4.7" + versionCode 40 + versionName "4.9" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/app/src/main/java/com/uiui/aios/fragment/CustomFragment.java b/app/src/main/java/com/uiui/aios/fragment/CustomFragment.java index d9753f1..b04f28a 100644 --- a/app/src/main/java/com/uiui/aios/fragment/CustomFragment.java +++ b/app/src/main/java/com/uiui/aios/fragment/CustomFragment.java @@ -94,7 +94,7 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt @BindView(R.id.cl_weather) ConstraintLayout cl_weather; - @BindView(R.id.cl_shared_space) + @BindView(R.id.cl_clean) ConstraintLayout cl_shared_space; @BindView(R.id.cl_sos) ConstraintLayout cl_soso; @@ -117,6 +117,8 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt // TextView tv_battery; @BindView(R.id.tv_location) TextView tv_location; + @BindView(R.id.tv_weather) + TextView tv_weather; @BindView(R.id.iv_pic) ImageView iv_pic; @BindView(R.id.tv_temp) @@ -139,12 +141,12 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt ImageView iv_note_nodata; // @BindView(R.id.iv_head) // ImageView iv_head; - @BindView(R.id.tv_name) - TextView tv_name; +// @BindView(R.id.tv_name) +// TextView tv_name; private String TAG = CustomFragment.class.getSimpleName(); // private int[] mShaderColors = new int[]{0xFFfa3db5, 0xFFF8867E, 0xFFF79F6B, 0xFFF79F6B, 0xFFF79F6B, 0xFFF8867E, 0xFFfa3db5}; - private int[] mShaderColors = new int[]{0xFF3984f6, 0xFF3984f6, 0xFF3984f6, 0xFF3984f6, 0xFF3984f6, 0xFF3984f6, 0xFF3984f6}; + private int[] mShaderColors = new int[]{0xFF27602f, 0xFF27602f, 0xFF27602f, 0xFF27602f, 0xFF27602f, 0xFF27602f, 0xFF27602f}; private int[] mShaderColorsRed = new int[]{0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000}; private View rootView; private List alarmItemList; @@ -776,6 +778,7 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt // int resId = getResources().getIdentifier(imageName, "drawable", mContext.getPackageName()); // iv_pic.setImageDrawable(mContext.getDrawable(resId)); tv_temp.setText(now.getTemp() + "℃"); + tv_weather.setText(now.getText()); } else { //在此查看返回数据失败的原因 Code code = weatherBean.getCode(); diff --git a/app/src/main/res/drawable-hdpi/appstore_icon.png b/app/src/main/res/drawable-hdpi/appstore_icon.png deleted file mode 100644 index b761f60..0000000 Binary files a/app/src/main/res/drawable-hdpi/appstore_icon.png and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/contact_icon.png b/app/src/main/res/drawable-hdpi/contact_icon.png deleted file mode 100644 index 759569e..0000000 Binary files a/app/src/main/res/drawable-hdpi/contact_icon.png and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/health_code.png b/app/src/main/res/drawable-hdpi/health_code.png deleted file mode 100644 index f27a8bd..0000000 Binary files a/app/src/main/res/drawable-hdpi/health_code.png and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/home_appstore_icon.png b/app/src/main/res/drawable-hdpi/home_appstore_icon.png new file mode 100644 index 0000000..69cc9c8 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/home_appstore_icon.png differ diff --git a/app/src/main/res/drawable-hdpi/home_clean_icon.png b/app/src/main/res/drawable-hdpi/home_clean_icon.png new file mode 100644 index 0000000..8d6e541 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/home_clean_icon.png differ diff --git a/app/src/main/res/drawable-hdpi/home_contact_icon.png b/app/src/main/res/drawable-hdpi/home_contact_icon.png new file mode 100644 index 0000000..784bc19 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/home_contact_icon.png differ diff --git a/app/src/main/res/drawable-hdpi/home_health_code.png b/app/src/main/res/drawable-hdpi/home_health_code.png new file mode 100644 index 0000000..df8ba69 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/home_health_code.png differ diff --git a/app/src/main/res/drawable-hdpi/home_reminder_icon.png b/app/src/main/res/drawable-hdpi/home_reminder_icon.png new file mode 100644 index 0000000..d7ef6f0 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/home_reminder_icon.png differ diff --git a/app/src/main/res/drawable-hdpi/home_sos_icon.png b/app/src/main/res/drawable-hdpi/home_sos_icon.png new file mode 100644 index 0000000..4d0f991 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/home_sos_icon.png differ diff --git a/app/src/main/res/drawable-hdpi/sos_icon.png b/app/src/main/res/drawable-hdpi/sos_icon.png deleted file mode 100644 index e44e6c2..0000000 Binary files a/app/src/main/res/drawable-hdpi/sos_icon.png and /dev/null differ diff --git a/app/src/main/res/drawable/custom_background.xml b/app/src/main/res/drawable/custom_bg.xml similarity index 100% rename from app/src/main/res/drawable/custom_background.xml rename to app/src/main/res/drawable/custom_bg.xml diff --git a/app/src/main/res/drawable/custom_bg_ai.xml b/app/src/main/res/drawable/custom_bg_ai.xml new file mode 100644 index 0000000..7e885b0 --- /dev/null +++ b/app/src/main/res/drawable/custom_bg_ai.xml @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/custom_bg_clean.xml b/app/src/main/res/drawable/custom_bg_clean.xml new file mode 100644 index 0000000..8fd9491 --- /dev/null +++ b/app/src/main/res/drawable/custom_bg_clean.xml @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/custom_bg_contact.xml b/app/src/main/res/drawable/custom_bg_contact.xml new file mode 100644 index 0000000..4983222 --- /dev/null +++ b/app/src/main/res/drawable/custom_bg_contact.xml @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/custom_bg_guard.xml b/app/src/main/res/drawable/custom_bg_guard.xml new file mode 100644 index 0000000..cb53167 --- /dev/null +++ b/app/src/main/res/drawable/custom_bg_guard.xml @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/custom_bg_health.xml b/app/src/main/res/drawable/custom_bg_health.xml new file mode 100644 index 0000000..0bfd56f --- /dev/null +++ b/app/src/main/res/drawable/custom_bg_health.xml @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/custom_bg_sos.xml b/app/src/main/res/drawable/custom_bg_sos.xml new file mode 100644 index 0000000..d9a8d07 --- /dev/null +++ b/app/src/main/res/drawable/custom_bg_sos.xml @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/custom_bg_weather.xml b/app/src/main/res/drawable/custom_bg_weather.xml new file mode 100644 index 0000000..217e796 --- /dev/null +++ b/app/src/main/res/drawable/custom_bg_weather.xml @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/tv_bg_noti.xml b/app/src/main/res/drawable/tv_bg_noti.xml new file mode 100644 index 0000000..755f4dd --- /dev/null +++ b/app/src/main/res/drawable/tv_bg_noti.xml @@ -0,0 +1,18 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout-land/fragment_custom.xml b/app/src/main/res/layout-land/fragment_custom.xml index 6ce2ae4..6bf77c8 100644 --- a/app/src/main/res/layout-land/fragment_custom.xml +++ b/app/src/main/res/layout-land/fragment_custom.xml @@ -25,7 +25,7 @@ android:layout_marginEnd="4dp" android:layout_marginBottom="4dp" android:layout_weight="3" - android:background="@drawable/custom_background"> + android:background="@drawable/custom_bg_weather"> @@ -58,8 +58,8 @@ android:layout_marginStart="16dp" android:gravity="center_vertical" android:text="10℃" - android:textColor="@color/black" - android:textSize="40sp" + android:textColor="@color/white" + android:textSize="@dimen/sp_30" android:textStyle="bold" app:layout_constraintBottom_toBottomOf="@+id/iv_pic" app:layout_constraintStart_toEndOf="@+id/iv_pic" @@ -72,14 +72,28 @@ android:layout_height="wrap_content" android:layout_marginTop="4dp" android:text="位置" - android:textColor="@color/black" + android:textSize="@dimen/sp_16" + android:textColor="@color/white" android:textStyle="bold" app:layout_constraintStart_toStartOf="@+id/tv_temp" app:layout_constraintTop_toBottomOf="@+id/tv_temp" /> + + - - - - - - - - - - - + + + + + + + + + + + + android:background="@drawable/custom_bg_sos"> - + @@ -201,8 +217,8 @@ - - + + @@ -242,7 +258,7 @@ android:layout_marginBottom="8dp" android:layout_weight="1" - android:background="@drawable/custom_background"> + android:background="@drawable/custom_bg_guard"> @@ -263,7 +279,7 @@ android:layout_height="150dp" android:adjustViewBounds="true" android:scaleType="centerInside" - android:src="@drawable/note_nodata" + android:src="@drawable/home_reminder_icon" android:visibility="gone" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" @@ -289,7 +305,7 @@ android:layout_marginEnd="4dp" android:layout_marginBottom="8dp" android:layout_weight="1" - android:background="@drawable/custom_background"> + android:background="@drawable/custom_bg_health"> + android:background="@drawable/custom_bg_contact"> + android:background="@drawable/custom_bg_ai"> + android:background="@drawable/custom_bg"> + android:background="@drawable/custom_bg"> + android:background="@drawable/custom_bg"> - + @@ -220,12 +220,12 @@ + android:background="@drawable/custom_bg"> + android:background="@drawable/custom_bg"> + android:background="@drawable/custom_bg"> + android:background="@drawable/custom_bg"> + android:background="@drawable/custom_bg"> + android:background="@drawable/custom_bg"> @@ -20,33 +20,34 @@ android:id="@+id/cl_weather" android:layout_width="0dp" android:layout_height="match_parent" - android:layout_marginStart="8dp" - android:layout_marginTop="8dp" - android:layout_marginEnd="8dp" - android:layout_marginBottom="4dp" + android:layout_marginStart="@dimen/dp_4" + android:layout_marginTop="@dimen/dp_4" + android:layout_marginEnd="@dimen/dp_4" + android:layout_marginBottom="@dimen/dp_2" android:layout_weight="3" - android:background="@drawable/custom_background"> + android:background="@drawable/custom_bg_weather"> @@ -55,221 +56,320 @@ android:id="@+id/tv_temp" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="16dp" + android:layout_marginEnd="88dp" android:gravity="center_vertical" android:text="10℃" - android:textColor="@color/black" - android:textSize="40sp" + android:textColor="@color/white" + android:textSize="@dimen/sp_38" android:textStyle="bold" - app:layout_constraintBottom_toBottomOf="@+id/iv_pic" - app:layout_constraintStart_toEndOf="@+id/iv_pic" - app:layout_constraintTop_toTopOf="@+id/iv_pic" - app:layout_constraintVertical_bias="0.296" /> + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + + + android:background="@drawable/custom_bg_health"> - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + - - + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + android:background="@drawable/custom_bg_guard"> - - - - - - - - - - + app:layout_constraintStart_toStartOf="parent" /> - - - + android:background="@drawable/custom_bg_contact"> + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" /> + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" /> - + android:background="@drawable/custom_bg_ai"> + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" /> + android:background="@drawable/custom_bg"> + android:background="@drawable/custom_bg"> + android:background="@drawable/custom_bg"> #8e6afb #00D56B + #3b6ab9 + #2a886c + #b25353 + #3f8f4b + #e08c61 + #536fae + #2c77ba + + #f4bea3 +