Commit efe97210 authored by wanglei's avatar wanglei

首页ui替换

parent 10ca7fbd
Pipeline #1128 canceled with stages
# One Clean Master
文件清理类的拆包
# vps
152.32.236.167 Administrator 9b@W@2Vg
# google-services.json
```json
{
"project_info": {
"project_number": "1066265509581",
"project_id": "one-clean-master",
"storage_bucket": "one-clean-master.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:1066265509581:android:2956bee73f44b0ee347384",
"android_client_info": {
"package_name": "com.kcleank.utility.opt"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyCtnhhhAD-jvzFFhPtlujDPD59HU_cuKpw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}
```
......@@ -25,33 +25,33 @@ class AppFunctionAdapter(val click: (name: String) -> Unit) :
RecyclerView.Adapter<AppFunctionAdapter.JJJ>() {
val list = arrayListOf(
Fun(JUNK_CLEANER, R.drawable.cleanjunk, "Clean junk regularly to free up space", "Clean Up"),
Fun(JUNK_CLEANER, R.drawable.home_cleanjunk, "Clean junk regularly to free up space", "Clean Up"),
// Fun(VIRUS_SCAN, R.drawable.virus, "Scan your phone for viruses now to protect your security and pr", "Scan Now"),
Fun(PHOTO_COMPRESS, R.drawable.photo, "Compress photos to save space", "Compress"),
Fun(LARGE_FILE_CLEANER, R.drawable.large, "Clean large files to free up storage space", "Clean Up"),
Fun(BATTERY_INFO, R.drawable.batteryinfo, "View battery usage and details", "Check Now"),
Fun(PHOTO_COMPRESS, R.drawable.home_cleanjunk, "Compress photos to save space", "Compress"),
Fun(LARGE_FILE_CLEANER, R.drawable.home_cleanjunk, "Clean large files to free up storage space", "Clean Up"),
Fun(BATTERY_INFO, R.drawable.home_cleanjunk, "View battery usage and details", "Check Now"),
Fun(
APP_MANAGER,
R.drawable.appmanager,
R.drawable.home_cleanjunk,
"Check apps size and uninstall some apps to release storage space",
"Check Now"
),
Fun(
SIMILAR_PHOTOS,
R.drawable.similar,
R.drawable.home_cleanjunk,
"Check similar photos to release more space",
"Clean Up"
),
Fun(
NOTIFICATION_CLEANER,
R.drawable.notification,
R.drawable.home_cleanjunk,
"Too many annoying notifications? Block and clean",
"Check Now"
),
Fun(RECENT_APP_USAGE, R.drawable.recentapp, "Check and manage recently active apps", "View Now"),
Fun(RECENT_APP_USAGE, R.drawable.home_cleanjunk, "Check and manage recently active apps", "View Now"),
Fun(
NETWORK_TRAFFIC,
R.drawable.network,
R.drawable.home_cleanjunk,
"View network traffic usage and stop traffic-consuming apps",
"View Now"
)
......
......@@ -135,68 +135,68 @@ object NotificationHelper {
val remoteViews = RemoteViews(packageName, R.layout.notification_common_notify)
when (actionId) {
ID_JUNK_CLEAN_PUSH -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.cleanjunk)
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_cleanjunk)
remoteViews.setTextViewText(R.id.tv_desc, "Clean up remaining junk files")
remoteViews.setTextViewText(R.id.tv_btn, "Clean up")
}
ID_VIRUS_PUSH -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.virus)
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_cleanjunk)
remoteViews.setTextViewText(R.id.tv_desc, "Protect your device and privacy, scan for virus threats now!")
remoteViews.setTextViewText(R.id.tv_btn, "Scan")
}
ID_BATTERY_OPTIMIZATION -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.batteryinfo)
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_batteryinfo)
val random = Random.nextInt(0, 50)
remoteViews.setTextViewText(R.id.tv_desc, "$random Apps are consuming photo power")
remoteViews.setTextViewText(R.id.tv_btn, "Optimize")
}
ID_LARGE_FILE_PUSH -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.large)
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_large)
remoteViews.setTextViewText(R.id.tv_desc, "Clean big files to free up storage space")
remoteViews.setTextViewText(R.id.tv_btn, "Clean up")
}
ID_PHOTO_COMPRESS -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.photo)
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_photo)
remoteViews.setTextViewText(R.id.tv_desc, "Compress images to release more space")
remoteViews.setTextViewText(R.id.tv_btn, "Compress")
}
ID_APP_MANAGER -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.appmanager)
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_appmanager)
remoteViews.setTextViewText(R.id.tv_desc, "Check apps size and uninstall junk apps to release storage space")
remoteViews.setTextViewText(R.id.tv_btn, "Manage")
}
ID_NETWORK_TRAFFIC -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.network)
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_network)
remoteViews.setTextViewText(R.id.tv_desc, "View network traffic usage and stop traffic-consuming apps.")
remoteViews.setTextViewText(R.id.tv_btn, "View")
}
ID_CLEAN_NOTIFICATION -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.notification)
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_notification)
remoteViews.setTextViewText(R.id.tv_desc, "Too many annoying notifications? Block and clean")
remoteViews.setTextViewText(R.id.tv_btn, "View")
}
ID_RECENT_USE_APP -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.recentapp)
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_recent)
remoteViews.setTextViewText(R.id.tv_desc, "Check and manage recently active apps")
remoteViews.setTextViewText(R.id.tv_btn, "Manage")
}
ID_SIMILAR_IMAGE -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.similar)
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_similar)
remoteViews.setTextViewText(R.id.tv_desc, "Check similar photos to release more space")
remoteViews.setTextViewText(R.id.tv_btn, "Clean up")
}
ID_CLEAN_SPEAKER -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.speaker)
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_speaker)
remoteViews.setTextViewText(R.id.tv_desc, "Clean the speaker dust and fix the low volume problem")
remoteViews.setTextViewText(R.id.tv_btn, "Clean up")
}
......@@ -204,31 +204,31 @@ object NotificationHelper {
//==================================下面是被动推送的情况===============================================
ID_INSTALL_PACKAGE_PUSH -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.install)
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_recent)
remoteViews.setTextViewText(R.id.tv_desc, "Install successfully, scan for virus threats now!")
remoteViews.setTextViewText(R.id.tv_btn, "Scan")
}
ID_UNINSTALL_PACKAGE_PUSH -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.uninstall)
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_recent)
remoteViews.setTextViewText(R.id.tv_desc, "Uninstalled successfully, clean residual files from your device")
remoteViews.setTextViewText(R.id.tv_btn, "Clean up")
}
ID_CHARGE -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.start)
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_recent)
remoteViews.setTextViewText(R.id.tv_desc, "View phone battery consumption recently")
remoteViews.setTextViewText(R.id.tv_btn, "View")
}
ID_LOW_BATTERY_PUSH -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.batter)
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_recent)
remoteViews.setTextViewText(R.id.tv_desc, "The battery is $extra%, view the battery information")
remoteViews.setTextViewText(R.id.tv_btn, "View")
}
ID_PHONE_ACCELERATE -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.memory)
remoteViews.setImageViewResource(R.id.iv_icon, R.drawable.home_recent)
remoteViews.setTextViewText(R.id.tv_desc, "Ram usage reached $extra%, optimize now!")
remoteViews.setTextViewText(R.id.tv_btn, "Optimize")
}
......
......@@ -43,13 +43,20 @@
<ImageView
android:id="@+id/id_img_xuanzhuan"
android:layout_width="235dp"
android:layout_height="235dp"
android:id="@+id/id_yuan"
android:layout_width="209dp"
android:layout_height="209dp"
android:layout_gravity="center"
android:src="@drawable/yuan"
tools:ignore="ContentDescription" />
<ImageView
android:id="@+id/id_img_xuanzhuan"
android:layout_width="209dp"
android:layout_height="209dp"
android:layout_gravity="center"
android:src="@drawable/xuanzhuan"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
......@@ -58,7 +65,8 @@
android:text="CLEAN"
android:textColor="#FF7B0B"
android:textSize="29sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
</FrameLayout>
<TextView
......@@ -113,7 +121,6 @@
android:layout_width="38dp"
android:layout_height="38dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/virus"
tools:ignore="ContentDescription" />
......@@ -138,16 +145,14 @@
android:layout_margin="4dp"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical"
app:bl_corners_radius="10dp"
app:bl_solid_color="@color/color_f7faff">
android:orientation="vertical">
<ImageView
android:layout_width="49dp"
android:layout_height="49dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/cleanjunk"
android:src="@drawable/home_cleanjunk"
tools:ignore="ContentDescription" />
......@@ -158,31 +163,29 @@
android:layout_marginTop="5dp"
android:text="Clean Junk"
android:textColor="#000000"
android:textSize="11sp"
android:textSize="14sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
</com.noober.background.view.BLLinearLayout>
<!--App Manager-->
<!--Large File Cleaner-->
<com.noober.background.view.BLLinearLayout
android:id="@+id/id_app_manager"
android:id="@+id/id_large_file"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_margin="4dp"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical"
app:bl_corners_radius="10dp"
app:bl_solid_color="@color/color_f7faff">
android:orientation="vertical">
<ImageView
android:layout_width="49dp"
android:layout_height="49dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/appmanager"
android:src="@drawable/home_large"
tools:ignore="ContentDescription" />
......@@ -191,9 +194,9 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="5dp"
android:text="@string/app_manager"
android:text="@string/large_file_cleaner"
android:textColor="#000000"
android:textSize="11sp"
android:textSize="14sp"
android:textStyle="bold" />
</com.noober.background.view.BLLinearLayout>
......@@ -224,7 +227,7 @@
android:layout_width="38dp"
android:layout_height="38dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/photo"
android:src="@drawable/home_photo"
tools:ignore="ContentDescription" />
<TextView
......@@ -240,74 +243,71 @@
</com.noober.background.view.BLLinearLayout>
<!--Large File Cleaner-->
<!--Battery Info-->
<com.noober.background.view.BLLinearLayout
android:id="@+id/id_large_file"
android:id="@+id/id_battery_info"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_margin="4dp"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical"
app:bl_corners_radius="10dp"
app:bl_solid_color="@color/color_f7faff">
android:orientation="vertical">
<ImageView
android:layout_width="49dp"
android:layout_height="49dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/large"
android:src="@drawable/home_batteryinfo"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="5dp"
android:text="@string/large_file_cleaner"
android:text="Battery Info"
android:textColor="#000000"
android:textSize="11sp"
android:textStyle="bold" />
android:textSize="14sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
</com.noober.background.view.BLLinearLayout>
<!--Battery Info-->
<!--App Manager-->
<com.noober.background.view.BLLinearLayout
android:id="@+id/id_battery_info"
android:id="@+id/id_app_manager"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_margin="4dp"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical"
app:bl_corners_radius="10dp"
app:bl_solid_color="@color/color_f7faff">
android:orientation="vertical">
<ImageView
android:layout_width="49dp"
android:layout_height="49dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/batteryinfo"
android:src="@drawable/home_appmanager"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="5dp"
android:text="Battery Info"
android:text="@string/app_manager"
android:textColor="#000000"
android:textSize="11sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
android:textSize="14sp"
android:textStyle="bold" />
</com.noober.background.view.BLLinearLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
</com.noober.background.view.BLLinearLayout>
......@@ -323,23 +323,30 @@
app:bl_corners_radius="10dp"
app:bl_solid_color="@android:color/white">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
tools:ignore="DisableBaselineAlignment">
<!--Compress Photos-->
<com.noober.background.view.BLLinearLayout
android:id="@+id/ll_compress"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginVertical="4dp"
android:layout_margin="5dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingVertical="12dp"
android:paddingStart="10dp"
android:paddingVertical="13dp"
android:paddingStart="7dp"
app:bl_corners_radius="10dp"
app:bl_solid_color="@color/color_f7faff"
app:bl_solid_color="#F3FCFA"
tools:ignore="RtlSymmetry">
<ImageView
android:layout_width="38dp"
android:layout_height="38dp"
android:src="@drawable/photo"
android:layout_width="36dp"
android:layout_height="36dp"
android:src="@drawable/home_photo"
tools:ignore="ContentDescription" />
<TextView
......@@ -353,32 +360,27 @@
android:textStyle="bold"
tools:ignore="HardcodedText" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="15dp"
android:src="@drawable/jiantou"
tools:ignore="ContentDescription" />
</com.noober.background.view.BLLinearLayout>
<!--Similar Photos-->
<com.noober.background.view.BLLinearLayout
android:id="@+id/ll_similar"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginVertical="4dp"
android:layout_margin="5dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingVertical="12dp"
android:paddingStart="10dp"
android:paddingVertical="13dp"
android:paddingStart="7dp"
app:bl_corners_radius="10dp"
app:bl_solid_color="@color/color_f7faff"
app:bl_solid_color="#F3FBFF"
tools:ignore="RtlSymmetry">
<ImageView
android:layout_width="38dp"
android:layout_height="38dp"
android:src="@drawable/similar"
android:layout_width="36dp"
android:layout_height="36dp"
android:src="@drawable/home_similar"
tools:ignore="ContentDescription" />
<TextView
......@@ -392,33 +394,34 @@
android:textStyle="bold"
tools:ignore="HardcodedText" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="15dp"
android:src="@drawable/jiantou"
tools:ignore="ContentDescription" />
</com.noober.background.view.BLLinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
tools:ignore="DisableBaselineAlignment">
<!--Speaker Cleaner-->
<com.noober.background.view.BLLinearLayout
android:id="@+id/ll_speaker"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginVertical="4dp"
android:layout_margin="5dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingVertical="12dp"
android:paddingStart="10dp"
android:paddingVertical="13dp"
android:paddingStart="7dp"
app:bl_corners_radius="10dp"
app:bl_solid_color="@color/color_f7faff"
app:bl_solid_color="#FFF8F9"
tools:ignore="RtlSymmetry">
<ImageView
android:layout_width="38dp"
android:layout_height="38dp"
android:src="@drawable/speaker"
android:layout_width="36dp"
android:layout_height="36dp"
android:src="@drawable/home_speaker"
tools:ignore="ContentDescription" />
<TextView
......@@ -431,32 +434,27 @@
android:textSize="13sp"
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="15dp"
android:src="@drawable/jiantou" />
</com.noober.background.view.BLLinearLayout>
<!--Network Traffic-->
<com.noober.background.view.BLLinearLayout
android:id="@+id/ll_network"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginVertical="4dp"
android:layout_margin="5dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingVertical="12dp"
android:paddingStart="10dp"
android:paddingVertical="13dp"
android:paddingStart="7dp"
app:bl_corners_radius="10dp"
app:bl_solid_color="@color/color_f7faff"
app:bl_solid_color="#FAF8FE"
tools:ignore="RtlSymmetry">
<ImageView
android:layout_width="38dp"
android:layout_height="38dp"
android:src="@drawable/network"
android:layout_width="36dp"
android:layout_height="36dp"
android:src="@drawable/home_network"
tools:ignore="ContentDescription" />
<TextView
......@@ -468,34 +466,34 @@
android:textColor="#000000"
android:textSize="13sp"
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="15dp"
android:src="@drawable/jiantou" />
</com.noober.background.view.BLLinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!--Recent App Usage-->
<com.noober.background.view.BLLinearLayout
android:id="@+id/ll_recent"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginVertical="4dp"
android:layout_margin="5dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingVertical="12dp"
android:paddingStart="10dp"
android:paddingVertical="13dp"
android:paddingStart="7dp"
app:bl_corners_radius="10dp"
app:bl_solid_color="@color/color_f7faff"
app:bl_solid_color="#FFFBF2"
tools:ignore="RtlSymmetry">
<ImageView
android:layout_width="38dp"
android:layout_height="38dp"
android:src="@drawable/recentapp"
android:layout_width="36dp"
android:layout_height="36dp"
android:src="@drawable/home_recent"
tools:ignore="ContentDescription" />
<TextView
......@@ -508,34 +506,27 @@
android:textSize="13sp"
android:textStyle="bold" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="15dp"
android:src="@drawable/jiantou"
tools:ignore="ContentDescription" />
</com.noober.background.view.BLLinearLayout>
<!--Notification Cleaner-->
<com.noober.background.view.BLLinearLayout
android:id="@+id/ll_notification"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginBottom="16dp"
android:layout_margin="5dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingVertical="12dp"
android:paddingStart="10dp"
android:paddingVertical="13dp"
android:paddingStart="7dp"
app:bl_corners_radius="10dp"
app:bl_solid_color="@color/color_f7faff"
app:bl_solid_color="#F3FBFF"
tools:ignore="RtlSymmetry">
<ImageView
android:layout_width="38dp"
android:layout_height="38dp"
android:src="@drawable/notification"
android:layout_width="36dp"
android:layout_height="36dp"
android:src="@drawable/home_notification"
tools:ignore="ContentDescription" />
<TextView
......@@ -548,18 +539,13 @@
android:textSize="13sp"
android:textStyle="bold" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="15dp"
android:src="@drawable/jiantou"
tools:ignore="ContentDescription" />
</com.noober.background.view.BLLinearLayout>
</com.noober.background.view.BLLinearLayout>
</LinearLayout>
</com.noober.background.view.BLLinearLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.core.widget.NestedScrollView>
......
......@@ -18,7 +18,7 @@
android:layout_height="42dp"
android:layout_marginStart="12dp"
android:layout_marginEnd="9dp"
android:src="@drawable/batteryinfo" />
android:src="@drawable/home_cleanjunk" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
......
......@@ -27,5 +27,6 @@
<color name="color_f5f4ff">#F5F4FF</color>
<color name="color_f7faff">#F7FAFF</color>
<color name="color_3db9df">#3DB9DF</color>
<color name="color_f3fcfa">#F3FCFA</color>
</resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment