Commit 6b720d9c authored by wanglei's avatar wanglei

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	app/src/main/java/com/zxdemo/notity/NotificationUtils.kt
parents 9af3af7b aad8bace
......@@ -38,6 +38,10 @@ public class EndCleanJunkActivity extends AppCompatActivity {
startActivity(new Intent(this, BatteryInfoActivity.class));
finish();
});
binding.buttonWhatsappCheckNo.setOnClickListener(v->{
startActivity(new Intent(this, WhatsAppActivity.class));
finish();
});
binding.buttonAppProcessCheckNo.setOnClickListener(v->{
startActivity(new Intent(this, AppProcessActivity.class));
finish();
......@@ -50,6 +54,10 @@ public class EndCleanJunkActivity extends AppCompatActivity {
startActivity(new Intent(this, LargeFileActivity.class));
finish();
});
binding.buttonSimilarPhotos.setOnClickListener(v->{
startActivity(new Intent(this, SimilarPhotosActivity.class));
finish();
});
binding.buttonScreenshot.setOnClickListener(v->{
startActivity(new Intent(this, ScreenShotActivity.class));
finish();
......
package com.swiftcleaner.chovey.view.activity;
import static com.swiftcleaner.chovey.model.bean.Global.FUNCTION_APP_MANAGER;
import static com.swiftcleaner.chovey.model.bean.Global.FUNCTION_APP_PROCESS;
import static com.swiftcleaner.chovey.model.bean.Global.FUNCTION_BATTERY;
import static com.swiftcleaner.chovey.model.bean.Global.FUNCTION_CLEAN;
import static com.swiftcleaner.chovey.model.bean.Global.FUNCTION_LARGE_FILE;
import static com.swiftcleaner.chovey.model.bean.Global.FUNCTION_SCREENSHOT;
import static com.swiftcleaner.chovey.model.bean.Global.FUNCTION_SIMILAR_PHOTOS;
import static com.swiftcleaner.chovey.model.bean.Global.FUNCTION_WHATS_APP;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
......@@ -245,7 +249,26 @@ public class StartActivity extends AppCompatActivity {
finish();
return;
}
if (Objects.equals(actionId, FUNCTION_WHATS_APP)) {
startActivity(new Intent(this, WhatsAppActivity.class));
finish();
return;
}
if (Objects.equals(actionId, FUNCTION_APP_PROCESS)) {
startActivity(new Intent(this, AppProcessActivity.class));
finish();
return;
}
if (Objects.equals(actionId, FUNCTION_SIMILAR_PHOTOS)) {
startActivity(new Intent(this, SimilarPhotosActivity.class));
finish();
return;
}
if (Objects.equals(actionId, FUNCTION_SCREENSHOT)) {
startActivity(new Intent(this, ScreenShotActivity.class));
finish();
return;
}
startActivity(new Intent(this, MainActivity.class));
finish();
......
......@@ -135,11 +135,15 @@ object NotificationUtils {
when (actionId) {
FUNCTION_CLEAN -> {
bigRemoteViews.setImageViewResource(R.id.iv_icon, R.mipmap.h_cleanjunk)
smallRemoteViews.setImageViewResource(R.id.iv_icon, R.mipmap.h_cleanjunk)
smallRemoteViews.setImageViewResource(R.id.iv_icon, R.mipmap.logox)
val desc = "Clean out junk files to free up space on your phone!"
val descsmall = "Swift Cleaner - Phone Helper"
bigRemoteViews.setTextViewText(R.id.tv_desc, desc)
smallRemoteViews.setTextViewText(R.id.tv_desc, desc)
smallRemoteViews.setTextViewText(R.id.tv_desc, descsmall)
intentAction = Global.FUNCTION_CLEAN
}
......@@ -148,8 +152,13 @@ object NotificationUtils {
smallRemoteViews.setImageViewResource(R.id.iv_icon, R.mipmap.h_appmanager)
val desc = "Smart App Management."
smallRemoteViews.setImageViewResource(R.id.iv_icon, R.mipmap.logox)
val descsmall = "Swift Cleaner - Phone Helper"
val desc = "Clean out junk files to free up space on your phone!"
bigRemoteViews.setTextViewText(R.id.tv_desc, desc)
smallRemoteViews.setTextViewText(R.id.tv_desc, desc)
smallRemoteViews.setTextViewText(R.id.tv_desc, descsmall)
intentAction = Global.FUNCTION_CLEAN
}
FUNCTION_BATTERY -> {
......@@ -157,8 +166,13 @@ object NotificationUtils {
smallRemoteViews.setImageViewResource(R.id.iv_icon, R.mipmap.h_batteryinfo)
val desc = "Watch your battery info!"
smallRemoteViews.setImageViewResource(R.id.iv_icon, R.mipmap.logox)
val descsmall = "Swift Cleaner - Phone Helper"
val desc = "Clean out junk files to free up space on your phone!"
bigRemoteViews.setTextViewText(R.id.tv_desc, desc)
smallRemoteViews.setTextViewText(R.id.tv_desc, desc)
smallRemoteViews.setTextViewText(R.id.tv_desc, descsmall)
intentAction = Global.FUNCTION_CLEAN
}
FUNCTION_LARGE_FILE -> {
......@@ -166,8 +180,13 @@ object NotificationUtils {
smallRemoteViews.setImageViewResource(R.id.iv_icon, R.mipmap.h_large)
val desc = "Clean out large files to free up space on your phone!"
smallRemoteViews.setImageViewResource(R.id.iv_icon, R.mipmap.logox)
val descsmall = "Swift Cleaner - Phone Helper"
val desc = "Clean out junk files to free up space on your phone!"
bigRemoteViews.setTextViewText(R.id.tv_desc, desc)
smallRemoteViews.setTextViewText(R.id.tv_desc, desc)
smallRemoteViews.setTextViewText(R.id.tv_desc, descsmall)
intentAction = Global.FUNCTION_CLEAN
}
FUNCTION_WHATS_APP -> {
......@@ -175,8 +194,13 @@ object NotificationUtils {
smallRemoteViews.setImageViewResource(R.id.iv_icon, R.mipmap.h_whatsapp)
val desc = "Clean out whatsapp files to free up space on your phone!"
smallRemoteViews.setImageViewResource(R.id.iv_icon, R.mipmap.logox)
val descsmall = "Swift Cleaner - Phone Helper"
val desc = "Clean out junk files to free up space on your phone!"
bigRemoteViews.setTextViewText(R.id.tv_desc, desc)
smallRemoteViews.setTextViewText(R.id.tv_desc, desc)
smallRemoteViews.setTextViewText(R.id.tv_desc, descsmall)
intentAction = Global.FUNCTION_CLEAN
}
FUNCTION_APP_PROCESS -> {
......@@ -184,8 +208,13 @@ object NotificationUtils {
smallRemoteViews.setImageViewResource(R.id.iv_icon, R.mipmap.jg__appprocss)
val desc = "Smart App Process."
smallRemoteViews.setImageViewResource(R.id.iv_icon, R.mipmap.logox)
val descsmall = "Swift Cleaner - Phone Helper"
val desc = "Clean out junk files to free up space on your phone!"
bigRemoteViews.setTextViewText(R.id.tv_desc, desc)
smallRemoteViews.setTextViewText(R.id.tv_desc, desc)
smallRemoteViews.setTextViewText(R.id.tv_desc, descsmall)
intentAction = Global.FUNCTION_CLEAN
}
FUNCTION_SIMILAR_PHOTOS -> {
......@@ -193,8 +222,13 @@ object NotificationUtils {
smallRemoteViews.setImageViewResource(R.id.iv_icon, R.mipmap.h_simiar)
val desc = "Clean out similar files to free up space on your phone!"
smallRemoteViews.setImageViewResource(R.id.iv_icon, R.mipmap.logox)
val descsmall = "Swift Cleaner - Phone Helper"
val desc = "Clean out junk files to free up space on your phone!"
bigRemoteViews.setTextViewText(R.id.tv_desc, desc)
smallRemoteViews.setTextViewText(R.id.tv_desc, desc)
smallRemoteViews.setTextViewText(R.id.tv_desc, descsmall)
intentAction = Global.FUNCTION_CLEAN
}
FUNCTION_SCREENSHOT -> {
......@@ -202,8 +236,13 @@ object NotificationUtils {
smallRemoteViews.setImageViewResource(R.id.iv_icon, R.mipmap.h_screenshot)
val desc = "Clean out screen files to free up space on your phone!"
smallRemoteViews.setImageViewResource(R.id.iv_icon, R.mipmap.logox)
val descsmall = "Swift Cleaner - Phone Helper"
val desc = "Clean out junk files to free up space on your phone!"
bigRemoteViews.setTextViewText(R.id.tv_desc, desc)
smallRemoteViews.setTextViewText(R.id.tv_desc, desc)
smallRemoteViews.setTextViewText(R.id.tv_desc, descsmall)
intentAction = Global.FUNCTION_CLEAN
}
else -> {
......@@ -265,9 +304,6 @@ object NotificationUtils {
if (currentNotificationIdIndex >= NOTIFICATION_IDS.size) {
currentNotificationIdIndex = 0
}
if (BuildConfig.DEBUG) {
return FUNCTION_BATTERY
}
// 返回下一个通知 ID
return NOTIFICATION_IDS[currentNotificationIdIndex]
}
......
......@@ -336,7 +336,70 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_cl_end_large_file_cleaner" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_end_whatsapp"
android:layout_width="match_parent"
android:layout_height="155dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="12dp"
android:background="@drawable/shape_radio_10dp_white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cl_end_large_file">
<ImageView
android:id="@+id/iv_cl_end_whatsapp"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginStart="14dp"
android:layout_marginTop="17dp"
android:src="@mipmap/h_whatsapp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_whatsapp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="13dp"
android:layout_marginTop="3dp"
android:text="WhatsApp Cleaner"
android:textColor="#000000"
android:textSize="16sp"
app:layout_constraintStart_toEndOf="@id/iv_cl_end_whatsapp"
app:layout_constraintTop_toTopOf="@id/iv_cl_end_whatsapp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="13dp"
android:layout_marginTop="3dp"
android:gravity="start"
android:maxLines="2"
android:ellipsize="end"
android:layout_marginEnd="25dp"
android:text="@string/free_up_space_by_cleaning_up_whatsapp_junkfiles"
android:textColor="#999999"
android:textSize="13sp"
app:layout_constraintStart_toEndOf="@id/iv_cl_end_whatsapp"
app:layout_constraintTop_toBottomOf="@id/tv_whatsapp" />
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/button_whatsapp_check_no"
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginHorizontal="15dp"
android:layout_marginTop="27dp"
android:background="@drawable/shape_clean_up"
android:gravity="center"
android:text="View"
android:textAllCaps="false"
android:textColor="#FFFFFF"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_cl_end_whatsapp" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_end_app_process"
......@@ -347,7 +410,7 @@
android:background="@drawable/shape_radio_10dp_white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cl_end_large_file">
app:layout_constraintTop_toBottomOf="@id/cl_end_whatsapp">
<ImageView
android:id="@+id/iv_cl_end_process"
......@@ -400,7 +463,70 @@
app:layout_constraintTop_toBottomOf="@id/iv_cl_end_process" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_end_similar_photos"
android:layout_width="match_parent"
android:layout_height="155dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="12dp"
android:background="@drawable/shape_radio_10dp_white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cl_end_app_process">
<ImageView
android:id="@+id/iv_cl_end_similar_photos"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginStart="14dp"
android:layout_marginTop="17dp"
android:src="@mipmap/h_simiar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_similar_photos"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="13dp"
android:layout_marginTop="3dp"
android:text="Similar Photos"
android:textColor="#000000"
android:textSize="16sp"
app:layout_constraintStart_toEndOf="@id/iv_cl_end_similar_photos"
app:layout_constraintTop_toTopOf="@id/iv_cl_end_similar_photos" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="13dp"
android:layout_marginTop="3dp"
android:gravity="start"
android:text="@string/check_apps_size_and_uninstall_some_apps_to_release_storage_space"
android:textColor="#999999"
android:textSize="13sp"
android:maxLines="2"
android:ellipsize="end"
android:layout_marginEnd="16dp"
app:layout_constraintStart_toEndOf="@id/iv_cl_end_similar_photos"
app:layout_constraintTop_toBottomOf="@id/tv_similar_photos" />
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/button_similar_photos"
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginHorizontal="15dp"
android:layout_marginTop="27dp"
android:background="@drawable/shape_clean_up"
android:gravity="center"
android:text="Clean Up"
android:textAllCaps="false"
android:textColor="#FFFFFF"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_cl_end_similar_photos" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_end_screenshot"
android:layout_width="match_parent"
......@@ -410,7 +536,7 @@
android:background="@drawable/shape_radio_10dp_white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cl_end_app_process">
app:layout_constraintTop_toBottomOf="@id/cl_end_similar_photos">
<ImageView
android:id="@+id/iv_cl_end_screenshot"
......
......@@ -2,7 +2,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="66dp"
android:layout_height="50dp"
android:orientation="vertical">
<LinearLayout
......
......@@ -10,6 +10,8 @@
<string name="screenshot">Check screenshot cleaner to release more \n space</string>
<string name="spinner_a">文件名称</string>
<string name="quanxian_title">To ensure proper functionality, please allow \n Swift Cleaner - Phone Helper to access all \n files on your device.</string>
<string name="check_apps_size_and_uninstall_some_apps_to_release_storage_space">Check apps size and uninstall some apps \n to release storage space</string>
<string name="free_up_space_by_cleaning_up_whatsapp_junkfiles">Free up space by cleaning up WhatsApp \n junkfiles</string>
<string-array name="spinner_list">
<item>1111</item>
<item>1111</item>
......
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