├── .gitignore ├── .idea ├── .name ├── compiler.xml ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── gradle.xml ├── inspectionProfiles │ ├── Project_Default.xml │ └── profiles_settings.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── vcs.xml ├── Clean.iml ├── README.md ├── app ├── .gitignore ├── app.iml ├── build.gradle ├── libs │ └── eventbus.jar ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── zx │ │ └── clean │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── aidl │ │ └── android │ │ │ └── content │ │ │ └── pm │ │ │ ├── IPackageDataObserver.aidl │ │ │ ├── IPackageStatsObserver.aidl │ │ │ └── PackageStats.aidl │ ├── java │ │ └── com │ │ │ └── zx │ │ │ └── clean │ │ │ ├── MyApplication.java │ │ │ ├── activity │ │ │ ├── AboutActivity.java │ │ │ ├── AppManagerActivity.java │ │ │ ├── BaseActivity.java │ │ │ ├── ChangThemeActivity.java │ │ │ ├── CleanCompletedActivity.java │ │ │ ├── LoginActivity.java │ │ │ ├── MainActivity.java │ │ │ ├── MemoryCleanActivity.java │ │ │ ├── RubbishCleanActivity.java │ │ │ └── SplashActivity.java │ │ │ ├── adapter │ │ │ ├── AppManagerItemAdapter.java │ │ │ ├── MemoryInfoPagerAdapter.java │ │ │ ├── MemoryItemAdapter.java │ │ │ ├── RubbishItemAdapter.java │ │ │ ├── ThemeRecycleViewAdapter.java │ │ │ └── ViewPagerAdapter.java │ │ │ ├── bean │ │ │ ├── AppInfo.java │ │ │ ├── AppProcessInfo.java │ │ │ ├── ItemTheme.java │ │ │ ├── RubbishItemBean.java │ │ │ └── SDCardInfo.java │ │ │ ├── fragment │ │ │ └── AppManagerFragment.java │ │ │ ├── service │ │ │ ├── CleanerService.java │ │ │ └── CoreService.java │ │ │ ├── utils │ │ │ ├── AppUtil.java │ │ │ ├── DrawerNavigationItemListener.java │ │ │ ├── MyActivityManager.java │ │ │ ├── PreferenceManager.java │ │ │ ├── StorageUtil.java │ │ │ ├── Theme.java │ │ │ ├── ThemeSet.java │ │ │ └── Utils.java │ │ │ └── views │ │ │ ├── ArcProgress.java │ │ │ ├── ItemCardView.java │ │ │ ├── ItemCardViewMini.java │ │ │ └── MemoryInfoView.java │ └── res │ │ ├── drawable-v21 │ │ ├── selector_text_ripple.xml │ │ └── selector_toolbar_right_corner_ripple.xml │ │ ├── drawable-xhdpi │ │ ├── bdcx.png │ │ ├── bg_qq.png │ │ ├── bg_wechat.png │ │ ├── bg_weibo.png │ │ ├── card_icon_autorun.png │ │ ├── card_icon_media.png │ │ ├── card_icon_speedup.png │ │ ├── card_icon_trash.png │ │ ├── default_avator.png │ │ ├── ic_lock.png │ │ ├── ic_login_user.png │ │ ├── list_icn_slt.png │ │ ├── login_bg.jpg │ │ ├── radio_checkbox.png │ │ ├── small_icon.png │ │ └── tp.png │ │ ├── drawable-xxhdpi │ │ ├── S51208-114446.jpg │ │ ├── S51208-114510.jpg │ │ ├── S51208-114521.jpg │ │ ├── S51208-114535.jpg │ │ ├── ce.png │ │ ├── entrance2.png │ │ ├── entrance3.png │ │ ├── ng.png │ │ ├── s51208114446.jpg │ │ ├── s51208114510.jpg │ │ ├── s51208114521.jpg │ │ └── s51208114535.jpg │ │ ├── drawable │ │ ├── button_bg.xml │ │ ├── circle.xml │ │ ├── clean_already_circle.xml │ │ ├── ic_account_circle_24dp.xml │ │ ├── ic_arrow_back_24dp.xml │ │ ├── ic_battery_60_24dp.xml │ │ ├── ic_check_24dp.xml │ │ ├── ic_home_24dp.xml │ │ ├── ic_menu_24dp.xml │ │ ├── ic_perm_contact_cal_24dp.xml │ │ ├── ic_security_24dp.xml │ │ ├── ic_settings_applications_24dp.xml │ │ ├── ic_signal_cellular_1_bar_24dp.xml │ │ ├── ic_signal_wifi_3_bar_24dp.xml │ │ ├── ic_verified_user_24dp.xml │ │ ├── ic_wallet_travel_24dp.xml │ │ ├── selector_text_ripple.xml │ │ ├── selector_toolbar_right_corner_ripple.xml │ │ └── side_nav_bar.xml │ │ ├── layout │ │ ├── activity_about.xml │ │ ├── activity_app_manager.xml │ │ ├── activity_app_manager_pre.xml │ │ ├── activity_chang_theme.xml │ │ ├── activity_clean_completed.xml │ │ ├── activity_login.xml │ │ ├── activity_main.xml │ │ ├── activity_memory_clean.xml │ │ ├── activity_memory_clean_pre.xml │ │ ├── activity_rubbish_clean.xml │ │ ├── activity_rubbish_clean_pre.xml │ │ ├── activity_splash.xml │ │ ├── app_bar_main.xml │ │ ├── card_item.xml │ │ ├── card_item_mini.xml │ │ ├── content_main.xml │ │ ├── content_main_mini.xml │ │ ├── content_rubbish_clean.xml │ │ ├── fragment_app_manager.xml │ │ ├── fragment_rv_item.xml │ │ ├── item_theme.xml │ │ ├── memory_item.xml │ │ ├── nav_header_main.xml │ │ └── view_memory_info.xml │ │ ├── menu │ │ ├── activity_main_drawer.xml │ │ ├── main.xml │ │ └── menu_rubbish_clean.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ ├── values-v21 │ │ └── styles.xml │ │ ├── values-w820dp │ │ └── dimens.xml │ │ └── values │ │ ├── attrs.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ ├── styles.xml │ │ └── themes.xml │ └── test │ └── java │ └── com │ └── zx │ └── clean │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── library ├── .gitignore ├── build.gradle ├── gradle.properties ├── library.iml ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── github │ │ └── OrangeGangsters │ │ └── circularbarpager │ │ └── library │ │ └── ApplicationTest.java │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── github │ │ └── OrangeGangsters │ │ └── circularbarpager │ │ └── library │ │ ├── CircularBar.java │ │ ├── CircularBarPager.java │ │ └── viewpager │ │ ├── FadeViewPagerTransformer.java │ │ └── WrapContentViewPager.java │ └── res │ ├── layout │ └── circularbar_view_pager.xml │ └── values │ ├── attrs.xml │ ├── strings.xml │ └── styles.xml └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | /captures 8 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | Clean -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 46 | 47 | 48 | 49 | 50 | 1.7 51 | 52 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Clean.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Clean 2 | 手机安全中心 3 | 包含内存加速,垃圾清理,应用管理,权限管理,病毒查杀,同时嵌入主题换肤等功能,目前功能还不够完善,后续会一一添加! 4 | 5 | 6 | 7 | 8 | ![image](https://github.com/xunzzz/Clean/blob/master/app/src/main/res/drawable-xxhdpi/s51208114446.jpg) 9 | ![image](https://github.com/xunzzz/Clean/blob/master/app/src/main/res/drawable-xxhdpi/s51208114510.jpg) 10 | 11 | 12 | 13 | ![image](https://github.com/xunzzz/Clean/blob/master/app/src/main/res/drawable-xxhdpi/s51208114521.jpg) 14 | ![image](https://github.com/xunzzz/Clean/blob/master/app/src/main/res/drawable-xxhdpi/s51208114535.jpg) 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "23.0.2" 6 | 7 | defaultConfig { 8 | applicationId "com.zx.clean" 9 | minSdkVersion 14 10 | targetSdkVersion 23 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | testCompile 'junit:junit:4.12' 25 | compile 'com.android.support:appcompat-v7:23.1.1' 26 | compile 'com.android.support:design:23.1.1' 27 | compile 'com.android.support:support-v13:23.+' 28 | compile 'com.android.support:support-v4:23.+' 29 | compile 'com.android.support:palette-v7:+' 30 | compile 'com.android.support:recyclerview-v7:+' 31 | compile 'com.android.support:cardview-v7:23.0.+' 32 | compile 'com.squareup.picasso:picasso:2.5.0' 33 | compile 'com.jakewharton:butterknife:5.1.2' 34 | compile 'com.zhy:percent-support-extends:1.0.5' 35 | compile 'com.balysv:material-ripple:1.0.2' 36 | compile files('libs/eventbus.jar') 37 | compile project(':library') 38 | } 39 | -------------------------------------------------------------------------------- /app/libs/eventbus.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/libs/eventbus.jar -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\Android\programFiles\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/zx/clean/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 34 | 38 | 39 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 55 | 56 | 60 | 61 | 62 | 66 | 67 | 68 | 71 | 72 | 73 | 77 | 78 | 79 | 83 | 84 | 85 | 86 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /app/src/main/aidl/android/content/pm/IPackageDataObserver.aidl: -------------------------------------------------------------------------------- 1 | /* 2 | ** 3 | ** Copyright 2007, The Android Open Source Project 4 | ** 5 | ** Licensed under the Apache License, Version 2.0 (the "License"); 6 | ** you may not use this file except in compliance with the License. 7 | ** You may obtain a copy of the License at 8 | ** 9 | ** http://www.apache.org/licenses/LICENSE-2.0 10 | ** 11 | ** Unless required by applicable law or agreed to in writing, software 12 | ** distributed under the License is distributed on an "AS IS" BASIS, 13 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | ** See the License for the specific language governing permissions and 15 | ** limitations under the License. 16 | */ 17 | 18 | package android.content.pm; 19 | 20 | /** 21 | * API for package data change related callbacks from the Package Manager. 22 | * Some usage scenarios include deletion of cache directory, generate 23 | * statistics related to code, data, cache usage(TODO) 24 | * {@hide} 25 | */ 26 | oneway interface IPackageDataObserver { 27 | void onRemoveCompleted(in String packageName, boolean succeeded); 28 | } -------------------------------------------------------------------------------- /app/src/main/aidl/android/content/pm/IPackageStatsObserver.aidl: -------------------------------------------------------------------------------- 1 | /* 2 | ** 3 | ** Copyright 2007, The Android Open Source Project 4 | ** 5 | ** Licensed under the Apache License, Version 2.0 (the "License"); 6 | ** you may not use this file except in compliance with the License. 7 | ** You may obtain a copy of the License at 8 | ** 9 | ** http://www.apache.org/licenses/LICENSE-2.0 10 | ** 11 | ** Unless required by applicable law or agreed to in writing, software 12 | ** distributed under the License is distributed on an "AS IS" BASIS, 13 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | ** See the License for the specific language governing permissions and 15 | ** limitations under the License. 16 | */ 17 | 18 | package android.content.pm; 19 | 20 | import android.content.pm.PackageStats; 21 | /** 22 | * API for package data change related callbacks from the Package Manager. 23 | * Some usage scenarios include deletion of cache directory, generate 24 | * statistics related to code, data, cache usage(TODO) 25 | * {@hide} 26 | */ 27 | oneway interface IPackageStatsObserver { 28 | 29 | void onGetStatsCompleted(in PackageStats pStats, boolean succeeded); 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/aidl/android/content/pm/PackageStats.aidl: -------------------------------------------------------------------------------- 1 | /* //device/java/android/android/view/WindowManager.aidl 2 | ** 3 | ** Copyright 2007, The Android Open Source Project 4 | ** 5 | ** Licensed under the Apache License, Version 2.0 (the "License"); 6 | ** you may not use this file except in compliance with the License. 7 | ** You may obtain a copy of the License at 8 | ** 9 | ** http://www.apache.org/licenses/LICENSE-2.0 10 | ** 11 | ** Unless required by applicable law or agreed to in writing, software 12 | ** distributed under the License is distributed on an "AS IS" BASIS, 13 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | ** See the License for the specific language governing permissions and 15 | ** limitations under the License. 16 | */ 17 | 18 | package android.content.pm; 19 | 20 | parcelable PackageStats; 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/MyApplication.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean; 2 | 3 | import android.app.Application; 4 | 5 | /** 6 | * Created by zhangxun on 2015/11/19. 7 | */ 8 | public class MyApplication extends Application{ 9 | 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/activity/AboutActivity.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.activity; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.app.AppCompatActivity; 5 | import android.support.v7.widget.RecyclerView; 6 | 7 | import com.zx.clean.R; 8 | 9 | public class AboutActivity extends AppCompatActivity { 10 | 11 | private RecyclerView Nm; 12 | private RecyclerView m1; 13 | 14 | private String a; 15 | 16 | @Override 17 | protected void onCreate(Bundle savedInstanceState) { 18 | super.onCreate(savedInstanceState); 19 | setContentView(R.layout.activity_about); 20 | 21 | 22 | 23 | initView(a); 24 | initView2(); 25 | 26 | 27 | } 28 | 29 | 30 | 31 | private void initView2() { 32 | 33 | 34 | } 35 | 36 | private void initView(String aaa) { 37 | 38 | initView2(); 39 | initView2(); 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/activity/AppManagerActivity.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.activity; 2 | 3 | import android.os.Bundle; 4 | import android.support.design.widget.TabLayout; 5 | import android.support.v4.view.ViewPager; 6 | import android.support.v7.widget.Toolbar; 7 | 8 | import com.zx.clean.R; 9 | import com.zx.clean.adapter.ViewPagerAdapter; 10 | import com.zx.clean.bean.AppInfo; 11 | import com.zx.clean.fragment.AppManagerFragment; 12 | import com.zx.clean.utils.ThemeSet; 13 | 14 | import java.util.ArrayList; 15 | 16 | import butterknife.InjectView; 17 | import butterknife.OnClick; 18 | 19 | public class AppManagerActivity extends BaseActivity { 20 | 21 | @InjectView(R.id.toolbar) 22 | Toolbar toolbar; 23 | @InjectView(R.id.tabLayout) 24 | TabLayout tabLayout; 25 | @InjectView(R.id.viewpager) 26 | ViewPager viewpager; 27 | 28 | private ViewPagerAdapter mAdapter; 29 | 30 | @Override 31 | protected void onCreate(Bundle savedInstanceState) { 32 | ThemeSet.onPreCreate(this); 33 | super.onCreate(savedInstanceState); 34 | setContentView(R.layout.activity_app_manager); 35 | setupViewPager(); 36 | 37 | } 38 | 39 | private void setupViewPager() { 40 | mAdapter = new ViewPagerAdapter(getSupportFragmentManager()); 41 | mAdapter.addFragment(new AppManagerFragment(AppManagerActivity.this, 0), "用户应用"); 42 | mAdapter.addFragment(new AppManagerFragment(AppManagerActivity.this, 1), "系统应用"); 43 | viewpager.setAdapter(mAdapter); 44 | tabLayout.setupWithViewPager(viewpager); 45 | } 46 | 47 | @OnClick(R.id.back) 48 | public void onBack(){ 49 | finish(); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/activity/BaseActivity.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.activity; 2 | 3 | import android.support.v7.app.AppCompatActivity; 4 | 5 | import com.zx.clean.utils.MyActivityManager; 6 | 7 | import butterknife.ButterKnife; 8 | 9 | /** 10 | * Created by zhangxun on 2015/11/20. 11 | */ 12 | public class BaseActivity extends AppCompatActivity{ 13 | 14 | @Override 15 | public void setContentView(int layoutResID) { 16 | super.setContentView(layoutResID); 17 | MyActivityManager.getInstance().addActivity(this); 18 | injectViews(); 19 | } 20 | protected void injectViews() { 21 | ButterKnife.inject(this); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/activity/ChangThemeActivity.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.activity; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.support.v7.widget.LinearLayoutManager; 6 | import android.support.v7.widget.RecyclerView; 7 | import android.support.v7.widget.Toolbar; 8 | import android.view.View; 9 | import android.widget.ImageButton; 10 | import android.widget.RelativeLayout; 11 | import android.widget.TextView; 12 | import android.widget.Toast; 13 | 14 | import com.zx.clean.R; 15 | import com.zx.clean.adapter.ThemeRecycleViewAdapter; 16 | import com.zx.clean.bean.ItemTheme; 17 | import com.zx.clean.utils.PreferenceManager; 18 | import com.zx.clean.utils.ThemeSet; 19 | import com.zx.clean.views.ArcProgress; 20 | 21 | import java.util.ArrayList; 22 | import java.util.List; 23 | 24 | import butterknife.InjectView; 25 | import butterknife.OnClick; 26 | import de.greenrobot.event.EventBus; 27 | 28 | public class ChangThemeActivity extends BaseActivity implements ThemeRecycleViewAdapter.OnItemClickListener{ 29 | 30 | @InjectView(R.id.recycleView) 31 | RecyclerView recycleView; 32 | @InjectView(R.id.top_rl) 33 | RelativeLayout top_rl; 34 | @InjectView(R.id.toolbar_rl) 35 | RelativeLayout toolbar_rl; 36 | @InjectView(R.id.circle_rl) 37 | RelativeLayout circle_rl; 38 | @InjectView(R.id.arc_store) 39 | ArcProgress arc_store; 40 | @InjectView(R.id.arc_process) 41 | ArcProgress arc_process; 42 | @InjectView(R.id.consume) 43 | TextView consume; 44 | @InjectView(R.id.back) 45 | ImageButton back; 46 | 47 | 48 | 49 | 50 | private ThemeRecycleViewAdapter adapter; 51 | private LinearLayoutManager manager; 52 | 53 | 54 | @Override 55 | protected void onCreate(Bundle savedInstanceState) { 56 | ThemeSet.onPreCreate(this); 57 | super.onCreate(savedInstanceState); 58 | setContentView(R.layout.activity_chang_theme); 59 | setupRecycleView(); 60 | } 61 | 62 | 63 | private void setupRecycleView() { 64 | adapter = new ThemeRecycleViewAdapter(ChangThemeActivity.this); 65 | adapter.setItemClickListener(this); 66 | manager = new LinearLayoutManager(ChangThemeActivity.this); 67 | manager.setOrientation(LinearLayoutManager.HORIZONTAL); 68 | recycleView.setLayoutManager(manager); 69 | recycleView.setAdapter(adapter); 70 | } 71 | 72 | 73 | @Override 74 | public void onItemClick(View v, int position) { 75 | if (adapter != null){ 76 | freshColor(adapter.getCheckedItem()); 77 | } 78 | } 79 | 80 | private void freshColor(ItemTheme checkedItem) { 81 | top_rl.setBackgroundColor(getResources().getColor(checkedItem.getColor())); 82 | toolbar_rl.setBackgroundColor(getResources().getColor(checkedItem.getColor())); 83 | circle_rl.setBackgroundColor(getResources().getColor(checkedItem.getColor())); 84 | arc_store.setUnfinishedStrokeColor(getResources().getColor(checkedItem.getColorDark())); 85 | arc_process.setUnfinishedStrokeColor(getResources().getColor(checkedItem.getColorDark())); 86 | } 87 | @OnClick(R.id.consume) 88 | public void onConsume(){ 89 | if (adapter != null && adapter.getCheckedItem() != null){ 90 | PreferenceManager.setCurrentTheme(ChangThemeActivity.this, adapter.getCheckedItem().getTheme()); 91 | // Intent intent = new Intent(ChangThemeActivity.this, MainActivity.class); 92 | // startActivity(intent); 93 | EventBus.getDefault().post(adapter.getCheckedItem()); 94 | finish(); 95 | }else { 96 | finish(); 97 | } 98 | } 99 | @OnClick(R.id.back) 100 | public void onBack(){ 101 | finish(); 102 | } 103 | 104 | 105 | 106 | } 107 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/activity/CleanCompletedActivity.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.activity; 2 | 3 | import android.os.Build; 4 | import android.os.Bundle; 5 | import android.util.Log; 6 | import android.widget.TextView; 7 | 8 | import com.zx.clean.R; 9 | import com.zx.clean.utils.ThemeSet; 10 | 11 | import butterknife.InjectView; 12 | import butterknife.OnClick; 13 | 14 | public class CleanCompletedActivity extends BaseActivity { 15 | @InjectView(R.id.clean_size) 16 | TextView clean_size; 17 | @InjectView(R.id.clean_app_size) 18 | TextView clean_app_size; 19 | 20 | String cleanSize; 21 | String appSize; 22 | 23 | @Override 24 | protected void onCreate(Bundle savedInstanceState) { 25 | ThemeSet.onPreCreate(this); 26 | super.onCreate(savedInstanceState); 27 | setContentView(R.layout.activity_clean_completed); 28 | setStatusBarColor(); 29 | getBundle(); 30 | initView(); 31 | } 32 | private void setStatusBarColor() { 33 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){ 34 | CleanCompletedActivity.this.getWindow().setStatusBarColor(getResources().getColor(R.color.white_light)); 35 | } 36 | } 37 | private void initView() { 38 | clean_size.setText("共清理"+cleanSize+"垃圾"); 39 | clean_app_size.setText("共清理"+appSize+"款应用垃圾"); 40 | } 41 | 42 | private void getBundle() { 43 | Bundle bundle = getIntent().getExtras(); 44 | if (bundle == null){ 45 | return; 46 | } 47 | cleanSize = bundle.getString("cleanSize", "0"); 48 | appSize = bundle.getString("appSize", "0"); 49 | } 50 | 51 | @OnClick(R.id.consume) 52 | public void OnConsume(){ 53 | finish(); 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/activity/LoginActivity.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.activity; 2 | 3 | import android.os.Bundle; 4 | 5 | import com.zx.clean.R; 6 | 7 | /** 8 | * A login screen that offers login via email/password. 9 | */ 10 | public class LoginActivity extends BaseActivity{ 11 | 12 | 13 | @Override 14 | protected void onCreate(Bundle savedInstanceState) { 15 | super.onCreate(savedInstanceState); 16 | setContentView(R.layout.activity_login); 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/activity/RubbishCleanActivity.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.activity; 2 | 3 | import android.content.ComponentName; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.content.ServiceConnection; 7 | import android.os.Bundle; 8 | import android.os.IBinder; 9 | import android.support.v7.widget.LinearLayoutManager; 10 | import android.support.v7.widget.RecyclerView; 11 | import android.util.Log; 12 | import android.view.View; 13 | import android.widget.ImageButton; 14 | import android.widget.TextView; 15 | 16 | import com.zx.clean.R; 17 | import com.zx.clean.adapter.RubbishItemAdapter; 18 | import com.zx.clean.bean.RubbishItemBean; 19 | import com.zx.clean.service.CleanerService; 20 | import com.zx.clean.utils.StorageUtil; 21 | import com.zx.clean.utils.ThemeSet; 22 | import com.zx.clean.views.ArcProgress; 23 | 24 | import java.math.BigDecimal; 25 | import java.text.DecimalFormat; 26 | import java.util.ArrayList; 27 | import java.util.List; 28 | import java.util.Timer; 29 | import java.util.TimerTask; 30 | 31 | import butterknife.InjectView; 32 | import butterknife.OnClick; 33 | 34 | public class RubbishCleanActivity extends BaseActivity implements CleanerService.OnCleanActionListener { 35 | @InjectView(R.id.recyclerview) 36 | RecyclerView recyclerview; 37 | @InjectView(R.id.progress) 38 | ArcProgress progress; 39 | @InjectView(R.id.back) 40 | ImageButton back; 41 | @InjectView(R.id.advice) 42 | TextView advice; 43 | @InjectView(R.id.scan_completed) 44 | TextView scan_completed; 45 | @InjectView(R.id.rubbish_clear) 46 | TextView rubbish_clear; 47 | 48 | RubbishItemAdapter mAdapter; 49 | LinearLayoutManager manager; 50 | 51 | 52 | private List list = new ArrayList<>(); 53 | 54 | private CleanerService mCleanerService; 55 | private boolean mAlreadyScanned = false; 56 | private boolean mAlreadyCleaned = true; 57 | 58 | private ServiceConnection mServiceConnection = new ServiceConnection() { 59 | @Override 60 | public void onServiceConnected(ComponentName name, IBinder service) { 61 | mCleanerService = ((CleanerService.CleanerServiceBinder) service).getService(); 62 | mCleanerService.setmCleanListener(RubbishCleanActivity.this); 63 | 64 | if (!mCleanerService.isScanning() && !mAlreadyScanned) { 65 | mCleanerService.scanRubbish(); 66 | } 67 | } 68 | 69 | @Override 70 | public void onServiceDisconnected(ComponentName name) { 71 | mCleanerService.setmCleanListener(null); 72 | mCleanerService = null; 73 | } 74 | }; 75 | 76 | @Override 77 | protected void onCreate(Bundle savedInstanceState) { 78 | ThemeSet.onPreCreate(this); 79 | super.onCreate(savedInstanceState); 80 | setContentView(R.layout.activity_rubbish_clean_pre); 81 | setupRecyclerView(); 82 | bindService(new Intent(RubbishCleanActivity.this, CleanerService.class), mServiceConnection 83 | , BIND_AUTO_CREATE); 84 | } 85 | 86 | @Override 87 | protected void onDestroy() { 88 | unbindService(mServiceConnection); 89 | super.onDestroy(); 90 | } 91 | 92 | private void setupRecyclerView() { 93 | manager = new LinearLayoutManager(RubbishCleanActivity.this); 94 | recyclerview.setLayoutManager(manager); 95 | } 96 | 97 | @OnClick(R.id.back) 98 | public void Onback() { 99 | finish(); 100 | } 101 | @OnClick(R.id.rubbish_clear) 102 | public void OnClear(){ 103 | if (!mCleanerService.isCleaning() && !mAlreadyCleaned){ 104 | mCleanerService.cleanRubbish(); 105 | } 106 | } 107 | 108 | @Override 109 | public void onScanStarted(Context context) { 110 | progress.setProgress(0); 111 | advice.setVisibility(View.GONE); 112 | progress.setBottomText("正在扫描"); 113 | } 114 | 115 | @Override 116 | public void onScanProgressUpdated(Context context, int current, int max, int size) { 117 | BigDecimal b1 = new BigDecimal(current); 118 | BigDecimal b2 = new BigDecimal(max); 119 | double value = b1.divide(b2, 2, BigDecimal.ROUND_HALF_UP).doubleValue(); 120 | int currentProgress = (int) (value*100); 121 | progress.setProgress(currentProgress); 122 | scan_completed.setText(StorageUtil.convertStorage(size)); 123 | } 124 | 125 | @Override 126 | public void onScanCompleted(Context context, List apps) { 127 | list = apps; 128 | advice.setVisibility(View.VISIBLE); 129 | progress.setBottomText("扫描完成"); 130 | scan_completed.setText(StorageUtil.convertStorage(mCleanerService.getmCleanSize())); 131 | mAdapter = new RubbishItemAdapter(this, list); 132 | recyclerview.setAdapter(mAdapter); 133 | mAlreadyScanned = true; 134 | mAlreadyCleaned = false; 135 | } 136 | 137 | @Override 138 | public void onCleanStarted(Context context) { 139 | timer = null; 140 | timer = new Timer(); 141 | progress.setProgress(100); 142 | advice.setVisibility(View.GONE); 143 | progress.setBottomText("正在清理"); 144 | } 145 | private Timer timer; 146 | @Override 147 | public void onCleanProgressUpdated(Context context, int current) { 148 | 149 | } 150 | long size; 151 | @Override 152 | public void onCleanCompleted(Context context, final long cleanSize) { 153 | 154 | 155 | size = cleanSize; 156 | 157 | timer.schedule(new TimerTask() { 158 | @Override 159 | public void run() { 160 | runOnUiThread(new Runnable() { 161 | @Override 162 | public void run() { 163 | if (progress.getProgress() > 0) { 164 | progress.setProgress(progress.getProgress() - 1); 165 | if (size > (cleanSize / 100)) { 166 | size = size - cleanSize / 100; 167 | } 168 | scan_completed.setText(StorageUtil.convertStorage(size)); 169 | } else { 170 | timer.cancel(); 171 | progress.setBottomText("清理完成"); 172 | scan_completed.setText("0MB"); 173 | mAdapter.updateAdapter(null); 174 | Intent intent = new Intent(RubbishCleanActivity.this, CleanCompletedActivity.class); 175 | intent.putExtra("cleanSize", StorageUtil.convertStorage(cleanSize)); 176 | intent.putExtra("appSize", list.size() + ""); 177 | startActivity(intent); 178 | finish(); 179 | } 180 | } 181 | }); 182 | } 183 | }, 0, 30); 184 | mAlreadyCleaned = true; 185 | } 186 | } 187 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/activity/SplashActivity.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.activity; 2 | 3 | import android.animation.Animator; 4 | import android.animation.AnimatorListenerAdapter; 5 | import android.animation.AnimatorSet; 6 | import android.animation.ObjectAnimator; 7 | import android.content.Intent; 8 | import android.support.v7.app.AppCompatActivity; 9 | import android.os.Bundle; 10 | import android.view.animation.DecelerateInterpolator; 11 | import android.widget.ImageView; 12 | 13 | import com.zx.clean.R; 14 | 15 | import java.util.Random; 16 | 17 | public class SplashActivity extends AppCompatActivity { 18 | 19 | ImageView mImageView; 20 | 21 | @Override 22 | protected void onCreate(Bundle savedInstanceState) { 23 | super.onCreate(savedInstanceState); 24 | setContentView(R.layout.activity_splash); 25 | 26 | mImageView = (ImageView) findViewById(R.id.image); 27 | 28 | initAnimation(); 29 | 30 | } 31 | 32 | private void initAnimation() { 33 | int index = new Random().nextInt(2); 34 | if (index == 1){ 35 | mImageView.setImageResource(R.drawable.entrance3); 36 | }else { 37 | mImageView.setImageResource(R.drawable.entrance2); 38 | } 39 | AnimatorSet set = new AnimatorSet(); 40 | ObjectAnimator alpha = new ObjectAnimator().ofFloat(mImageView, "alpha", 0.5f, 1f); 41 | alpha.setDuration(700); 42 | 43 | ObjectAnimator scaleX = new ObjectAnimator().ofFloat(mImageView, "scaleX", 1f, 1.1f); 44 | scaleX.setDuration(2000); 45 | scaleX.setInterpolator(new DecelerateInterpolator()); 46 | 47 | ObjectAnimator scaleY= new ObjectAnimator().ofFloat(mImageView, "scaleY", 1f, 1.1f); 48 | scaleY.setDuration(2000); 49 | scaleY.setInterpolator(new DecelerateInterpolator()); 50 | 51 | set.play(scaleX).with(scaleY).after(alpha); 52 | set.addListener(new AnimatorListenerAdapter() { 53 | @Override 54 | public void onAnimationEnd(Animator animation) { 55 | Intent intent = new Intent(SplashActivity.this, MainActivity.class); 56 | startActivity(intent); 57 | finish(); 58 | } 59 | }); 60 | set.start(); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/adapter/AppManagerItemAdapter.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.adapter; 2 | 3 | import android.animation.Animator; 4 | import android.animation.AnimatorListenerAdapter; 5 | import android.content.Context; 6 | import android.content.Intent; 7 | import android.net.Uri; 8 | import android.support.v7.widget.RecyclerView; 9 | import android.view.LayoutInflater; 10 | import android.view.View; 11 | import android.view.ViewGroup; 12 | import android.view.animation.DecelerateInterpolator; 13 | import android.widget.ImageView; 14 | import android.widget.TextView; 15 | 16 | import com.zx.clean.R; 17 | import com.zx.clean.bean.AppInfo; 18 | import com.zx.clean.utils.StorageUtil; 19 | 20 | import java.util.ArrayList; 21 | import java.util.List; 22 | 23 | import butterknife.ButterKnife; 24 | import butterknife.InjectView; 25 | 26 | /** 27 | * Created by zhangxun on 2015/11/24. 28 | */ 29 | public class AppManagerItemAdapter extends RecyclerView.Adapter { 30 | 31 | private Context mContext; 32 | private ArrayList list = new ArrayList<>(); 33 | private List checkedPositionList;//选中的位置 34 | private List checkedData = new ArrayList<>();//选中的数据 35 | 36 | private boolean animationsLocked = false; 37 | private int lastAnimatedPosition = -1; 38 | private boolean delayEnterAnimation = true; 39 | 40 | public AppManagerItemAdapter(Context mContext, ArrayList list) { 41 | this.mContext = mContext; 42 | this.list = list; 43 | checkedPositionList = new ArrayList<>(); 44 | } 45 | 46 | @Override 47 | public AppManagerItemAdapter.AppManagerItemViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 48 | View view = LayoutInflater.from(mContext).inflate(R.layout.fragment_rv_item, parent, false); 49 | return new AppManagerItemViewHolder(view); 50 | } 51 | 52 | @Override 53 | public void onBindViewHolder(AppManagerItemAdapter.AppManagerItemViewHolder holder, int position) { 54 | final AppInfo appInfo = list.get(position); 55 | runEnterAnimation(holder.itemView, position); 56 | holder.app_icon.setImageDrawable(appInfo.getAppIcon()); 57 | holder.app_name.setText(appInfo.getAppName()); 58 | holder.app_use_size.setText("占用" + StorageUtil.convertStorage(appInfo.getPkgSize())); 59 | holder.uninstall.setOnClickListener(new View.OnClickListener() { 60 | @Override 61 | public void onClick(View v) { 62 | Intent intent = new Intent(); 63 | intent.setAction("android.intent.action.VIEW"); 64 | intent.setAction("android.intent.action.DELETE"); 65 | intent.addCategory("android.intent.category.DEFAULT"); 66 | intent.setData(Uri.parse("package:" + appInfo.getPackName())); 67 | mContext.startActivity(intent); 68 | } 69 | }); 70 | } 71 | 72 | @Override 73 | public int getItemCount() { 74 | if (list != null) { 75 | return list.size(); 76 | } 77 | return 0; 78 | } 79 | private void runEnterAnimation(View view, int position) { 80 | if (animationsLocked){ 81 | return; 82 | } 83 | 84 | if (position > lastAnimatedPosition){ 85 | lastAnimatedPosition = position; 86 | view.setTranslationY(140); 87 | view.setAlpha(0.f); 88 | view.animate().translationY(0).alpha(1.f) 89 | .setStartDelay(delayEnterAnimation ? list.size()*(position) : 0) 90 | .setInterpolator(new DecelerateInterpolator(2.f)) 91 | .setDuration(200) 92 | .setListener(new AnimatorListenerAdapter() { 93 | @Override 94 | public void onAnimationEnd(Animator animation) { 95 | animationsLocked = true; 96 | } 97 | }).start(); 98 | } 99 | } 100 | public class AppManagerItemViewHolder extends RecyclerView.ViewHolder { 101 | @InjectView(R.id.app_icon) 102 | ImageView app_icon; 103 | @InjectView(R.id.app_name) 104 | TextView app_name; 105 | @InjectView(R.id.app_use_size) 106 | TextView app_use_size; 107 | @InjectView(R.id.uninstall) 108 | TextView uninstall; 109 | 110 | public AppManagerItemViewHolder(View itemView) { 111 | super(itemView); 112 | ButterKnife.inject(this, itemView); 113 | } 114 | } 115 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/adapter/MemoryInfoPagerAdapter.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.adapter; 2 | 3 | import android.content.Context; 4 | import android.support.v4.view.PagerAdapter; 5 | import android.support.v4.view.ViewPager; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | 9 | /** 10 | * Created by zhangxun on 2015/11/30. 11 | */ 12 | public class MemoryInfoPagerAdapter extends PagerAdapter{ 13 | 14 | private Context mContext; 15 | private View[] mViews; 16 | 17 | public MemoryInfoPagerAdapter(Context mContext, View[] mViews) { 18 | this.mContext = mContext; 19 | this.mViews = mViews; 20 | } 21 | 22 | @Override 23 | public int getCount() { 24 | return mViews.length; 25 | } 26 | 27 | @Override 28 | public Object instantiateItem(ViewGroup container, int position) { 29 | View currentView = mViews[position]; 30 | ((ViewPager) container).addView(currentView); 31 | return currentView; 32 | } 33 | 34 | @Override 35 | public void destroyItem(ViewGroup container, int position, Object object) { 36 | ((ViewPager) container).removeView((View) object); 37 | } 38 | 39 | @Override 40 | public boolean isViewFromObject(View view, Object object) { 41 | return false; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/adapter/RubbishItemAdapter.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.adapter; 2 | 3 | import android.animation.Animator; 4 | import android.animation.AnimatorListenerAdapter; 5 | import android.content.Context; 6 | import android.content.Intent; 7 | import android.net.Uri; 8 | import android.provider.Settings; 9 | import android.support.v7.widget.RecyclerView; 10 | import android.view.LayoutInflater; 11 | import android.view.View; 12 | import android.view.ViewAnimationUtils; 13 | import android.view.ViewGroup; 14 | import android.view.animation.DecelerateInterpolator; 15 | import android.view.animation.LinearInterpolator; 16 | import android.widget.ImageView; 17 | import android.widget.RelativeLayout; 18 | import android.widget.TextView; 19 | 20 | import com.zx.clean.R; 21 | import com.zx.clean.bean.RubbishItemBean; 22 | import com.zx.clean.utils.StorageUtil; 23 | 24 | import java.util.ArrayList; 25 | import java.util.List; 26 | 27 | import butterknife.ButterKnife; 28 | import butterknife.InjectView; 29 | 30 | /** 31 | * Created by zhangxun on 2015/11/26. 32 | */ 33 | public class RubbishItemAdapter extends RecyclerView.Adapter implements View.OnClickListener{ 34 | 35 | private Context mContext; 36 | private List list = new ArrayList<>(); 37 | private int size = 0; 38 | private boolean animationsLocked = false; 39 | private int lastAnimatedPosition = -1; 40 | private boolean delayEnterAnimation = true; 41 | 42 | public RubbishItemAdapter(Context mContext, List list) { 43 | this.mContext = mContext; 44 | this.list = list; 45 | if (list != null && list.size() > 0){ 46 | this.size = list.size(); 47 | } 48 | 49 | } 50 | 51 | @Override 52 | public RubbishItemAdapter.ItemViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 53 | View view = LayoutInflater.from(mContext).inflate(R.layout.fragment_rv_item, parent, false); 54 | return new ItemViewHolder(view); 55 | } 56 | 57 | @Override 58 | public void onBindViewHolder(RubbishItemAdapter.ItemViewHolder holder, int position) { 59 | final RubbishItemBean itemBean = list.get(position); 60 | runEnterAnimation(holder.itemView, position); 61 | holder.uninstall.setVisibility(View.INVISIBLE); 62 | holder.app_icon.setImageDrawable(itemBean.getmIcon()); 63 | holder.app_name.setText(itemBean.getmApplicationName()); 64 | holder.app_use_size.setText(StorageUtil.convertStorage(itemBean.getmCacheSize())); 65 | holder.item_rl.setOnClickListener(this); 66 | holder.item_rl.setTag(position); 67 | } 68 | 69 | @Override 70 | public int getItemCount() { 71 | if (list != null && list.size() > 0){ 72 | return list.size(); 73 | } 74 | return 0; 75 | } 76 | private void runEnterAnimation(View view, int position) { 77 | if (animationsLocked){ 78 | return; 79 | } 80 | 81 | if (position > lastAnimatedPosition){ 82 | lastAnimatedPosition = position; 83 | view.setTranslationY(140); 84 | view.setAlpha(0.f); 85 | view.animate().translationY(0).alpha(1.f) 86 | .setStartDelay(delayEnterAnimation ? list.size()*(position) : 0) 87 | .setInterpolator(new DecelerateInterpolator(2.f)) 88 | .setDuration(200) 89 | .setListener(new AnimatorListenerAdapter() { 90 | @Override 91 | public void onAnimationEnd(Animator animation) { 92 | animationsLocked = true; 93 | } 94 | }).start(); 95 | } 96 | } 97 | public void updateAdapter(List list){ 98 | this.list = list; 99 | notifyDataSetChanged(); 100 | } 101 | 102 | @Override 103 | public void onClick(View v) { 104 | switch (v.getId()){ 105 | case R.id.item_rl : 106 | int position = (int) v.getTag(); 107 | Intent intent = new Intent(); 108 | intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); 109 | intent.setAction(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS); 110 | intent.setData(Uri.parse("package:" + list.get(position).getmPackageName())); 111 | mContext.startActivity(intent); 112 | break; 113 | } 114 | } 115 | 116 | 117 | public class ItemViewHolder extends RecyclerView.ViewHolder{ 118 | @InjectView(R.id.app_icon) 119 | ImageView app_icon; 120 | @InjectView(R.id.app_name) 121 | TextView app_name; 122 | @InjectView(R.id.app_use_size) 123 | TextView app_use_size; 124 | @InjectView(R.id.uninstall) 125 | TextView uninstall; 126 | @InjectView(R.id.item_rl) 127 | RelativeLayout item_rl; 128 | 129 | public ItemViewHolder(View itemView) { 130 | super(itemView); 131 | ButterKnife.inject(this, itemView); 132 | } 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/adapter/ThemeRecycleViewAdapter.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.adapter; 2 | 3 | import android.content.Context; 4 | import android.content.res.Resources; 5 | import android.graphics.Color; 6 | import android.support.v7.widget.CardView; 7 | import android.support.v7.widget.RecyclerView; 8 | import android.util.TypedValue; 9 | import android.view.LayoutInflater; 10 | import android.view.View; 11 | import android.view.ViewGroup; 12 | import android.widget.ImageView; 13 | import android.widget.RelativeLayout; 14 | import android.widget.TextView; 15 | 16 | import com.zx.clean.R; 17 | import com.zx.clean.bean.ItemTheme; 18 | import com.zx.clean.utils.Theme; 19 | import com.zx.clean.utils.ThemeSet; 20 | 21 | import org.w3c.dom.Attr; 22 | 23 | import java.util.ArrayList; 24 | import java.util.List; 25 | 26 | import butterknife.ButterKnife; 27 | import butterknife.InjectView; 28 | 29 | /** 30 | * Created by zhangxun on 2015/11/20. 31 | */ 32 | public class ThemeRecycleViewAdapter extends RecyclerView.Adapter implements View.OnClickListener{ 33 | 34 | private Context context; 35 | private int count = 9; 36 | private OnItemClickListener itemClickListener; 37 | 38 | private List list = new ArrayList<>(); 39 | // private int checkedColor; 40 | // private int checkedColorDark; 41 | // private Theme theme; 42 | private ItemTheme checkedItem; 43 | 44 | 45 | 46 | public ThemeRecycleViewAdapter(Context context) { 47 | this.context = context; 48 | this.list = ThemeSet.initThemeData(context); 49 | } 50 | 51 | @Override 52 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 53 | View view = LayoutInflater.from(context).inflate(R.layout.item_theme, parent, false); 54 | ViewHolder holder = new ViewHolder(view); 55 | holder.item_theme_cd.setOnClickListener(this); 56 | return holder; 57 | } 58 | 59 | @Override 60 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { 61 | ViewHolder itemHolder = (ViewHolder) holder; 62 | ItemTheme itemTheme = list.get(position); 63 | itemHolder.item_theme_text.setText(itemTheme.getCardName()); 64 | itemHolder.item_theme_cd.setCardBackgroundColor(context.getResources().getColor(itemTheme.getColor())); 65 | if (itemTheme.isChecked()){ 66 | itemHolder.check_iv.setVisibility(View.VISIBLE); 67 | }else { 68 | itemHolder.check_iv.setVisibility(View.GONE); 69 | } 70 | itemHolder.item_theme_cd.setTag(holder); 71 | } 72 | 73 | @Override 74 | public int getItemCount() { 75 | return list.size(); 76 | } 77 | 78 | public void updateChecked(ViewHolder holder){ 79 | for (ItemTheme item : list){ 80 | item.setIsChecked(false); 81 | } 82 | int position = holder.getPosition(); 83 | ItemTheme itemTheme = list.get(position); 84 | itemTheme.setIsChecked(true); 85 | checkedItem = itemTheme; 86 | // checkedColor = itemTheme.getColor(); 87 | // checkedColorDark = itemTheme.getColorDark(); 88 | // theme = itemTheme.getTheme(); 89 | list.set(position, itemTheme); 90 | notifyDataSetChanged(); 91 | } 92 | 93 | @Override 94 | public void onClick(View v) { 95 | switch (v.getId()){ 96 | case R.id.item_theme_cd : 97 | if (itemClickListener !=null){ 98 | ViewHolder holder = (ViewHolder) v.getTag(); 99 | updateChecked(holder); 100 | itemClickListener.onItemClick(v, holder.getPosition()); 101 | } 102 | break; 103 | } 104 | } 105 | 106 | public List getThemeData() { 107 | return list; 108 | } 109 | 110 | public ItemTheme getCheckedItem() { 111 | return checkedItem; 112 | } 113 | 114 | // public int getCheckedColor() { 115 | // return checkedColor; 116 | // } 117 | // 118 | // public int getCheckedColorDark() {TypedValue typedValue = new TypedValue(); 119 | // return checkedColorDark; 120 | // } 121 | // 122 | // public Theme getTheme() { 123 | // return theme; 124 | // } 125 | 126 | public interface OnItemClickListener{ 127 | void onItemClick(View v, int position); 128 | } 129 | 130 | public void setItemClickListener(OnItemClickListener itemClickListener) { 131 | this.itemClickListener = itemClickListener; 132 | } 133 | 134 | class ViewHolder extends RecyclerView.ViewHolder { 135 | @InjectView(R.id.item_theme_cd) 136 | CardView item_theme_cd; 137 | @InjectView(R.id.item_theme_text) 138 | TextView item_theme_text; 139 | @InjectView(R.id.check_iv) 140 | ImageView check_iv; 141 | @InjectView(R.id.item_rl) 142 | RelativeLayout item_rl; 143 | 144 | public ViewHolder(View itemView) { 145 | super(itemView); 146 | ButterKnife.inject(this, itemView); 147 | } 148 | } 149 | 150 | } 151 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/adapter/ViewPagerAdapter.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.adapter; 2 | 3 | import android.support.v4.app.Fragment; 4 | import android.support.v4.app.FragmentManager; 5 | import android.support.v4.app.FragmentStatePagerAdapter; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | 10 | /** 11 | * Created by zhangxun on 2015/11/24. 12 | */ 13 | public class ViewPagerAdapter extends FragmentStatePagerAdapter{ 14 | 15 | private final List mFragments = new ArrayList<>(); 16 | private final List mFragmentTitles = new ArrayList<>(); 17 | 18 | public ViewPagerAdapter(FragmentManager fm) { 19 | super(fm); 20 | } 21 | 22 | public void addFragment(Fragment fragment, String title){ 23 | mFragments.add(fragment); 24 | mFragmentTitles.add(title); 25 | } 26 | 27 | @Override 28 | public Fragment getItem(int position) { 29 | if (mFragments != null && mFragments.size() > 0){ 30 | return mFragments.get(position); 31 | } 32 | return null; 33 | } 34 | 35 | @Override 36 | public int getCount() { 37 | if (mFragments != null && mFragments.size() > 0){ 38 | return mFragments.size(); 39 | } 40 | return 0; 41 | } 42 | 43 | @Override 44 | public CharSequence getPageTitle(int position) { 45 | if (mFragmentTitles != null && mFragmentTitles.size() > 0){ 46 | return mFragmentTitles.get(position); 47 | } 48 | return super.getPageTitle(position); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/bean/AppInfo.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.bean; 2 | 3 | import android.graphics.drawable.Drawable; 4 | 5 | /** 6 | * Created by zhangxun on 2015/11/24. 7 | */ 8 | public class AppInfo { 9 | private int app_icon; 10 | private String app_name; 11 | private String app_use_size; 12 | 13 | private Drawable appIcon; 14 | private String appName; 15 | private String packName; 16 | private String version; 17 | private int uid; 18 | private long pkgSize; 19 | 20 | /** 21 | * 应用程序可以被安装到不同的位置 , 手机内存 外部存储sd卡 22 | */ 23 | 24 | 25 | private boolean inRom; 26 | 27 | private boolean userApp; 28 | 29 | 30 | public AppInfo(int app_icon, String app_name, String app_use_size) { 31 | this.app_icon = app_icon; 32 | this.app_name = app_name; 33 | this.app_use_size = app_use_size; 34 | } 35 | 36 | public AppInfo() { 37 | } 38 | 39 | 40 | public boolean isInRom() { 41 | return inRom; 42 | } 43 | 44 | public void setInRom(boolean inRom) { 45 | this.inRom = inRom; 46 | } 47 | 48 | public boolean isUserApp() { 49 | return userApp; 50 | } 51 | 52 | public void setUserApp(boolean userApp) { 53 | this.userApp = userApp; 54 | } 55 | 56 | public Drawable getAppIcon() { 57 | return appIcon; 58 | } 59 | 60 | public void setAppIcon(Drawable appIcon) { 61 | this.appIcon = appIcon; 62 | } 63 | 64 | public String getAppName() { 65 | return appName; 66 | } 67 | 68 | public void setAppName(String appName) { 69 | this.appName = appName; 70 | } 71 | 72 | public String getPackName() { 73 | return packName; 74 | } 75 | 76 | public void setPackName(String packName) { 77 | this.packName = packName; 78 | } 79 | 80 | public String getVersion() { 81 | return version; 82 | } 83 | 84 | public void setVersion(String version) { 85 | this.version = version; 86 | } 87 | 88 | public int getUid() { 89 | return uid; 90 | } 91 | 92 | public void setUid(int uid) { 93 | this.uid = uid; 94 | } 95 | 96 | public long getPkgSize() { 97 | return pkgSize; 98 | } 99 | 100 | public void setPkgSize(long pkgSize) { 101 | this.pkgSize = pkgSize; 102 | } 103 | 104 | public int getApp_icon() { 105 | return app_icon; 106 | } 107 | 108 | public void setApp_icon(int app_icon) { 109 | this.app_icon = app_icon; 110 | } 111 | 112 | public String getApp_name() { 113 | return app_name; 114 | } 115 | 116 | public void setApp_name(String app_name) { 117 | this.app_name = app_name; 118 | } 119 | 120 | public String getApp_use_size() { 121 | return app_use_size; 122 | } 123 | 124 | public void setApp_use_size(String app_use_size) { 125 | this.app_use_size = app_use_size; 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/bean/AppProcessInfo.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.bean; 2 | 3 | import android.graphics.drawable.Drawable; 4 | 5 | /** 6 | * Created by zhangxun on 2015/11/27. 7 | */ 8 | public class AppProcessInfo implements Comparable{ 9 | public String appName; 10 | public String processName; 11 | /** 12 | * 用户进程的id 13 | */ 14 | public int uid; 15 | /** 16 | * 进程pid,0代表无 17 | */ 18 | public int pid; 19 | public Drawable icon; 20 | /** 21 | * 占用的内存 22 | */ 23 | public long memory; 24 | /** 25 | * 占用的内存 26 | */ 27 | public String cpu; 28 | /** 29 | * 进程的状态,其中S表示休眠,R表示正在运行,Z表示僵死状态,N表示该进程优先值是负数. 30 | */ 31 | public String status; 32 | /** 33 | * 当前使用的线程数. 34 | */ 35 | public String threadsCount; 36 | public boolean checked = true; 37 | /** 38 | * 是否是系统进程. 39 | */ 40 | public boolean isSystem; 41 | 42 | // public AppProcessInfo(int uid, int pid, String appName) { 43 | // this.uid = uid; 44 | // this.pid = pid; 45 | // this.appName = appName; 46 | // } 47 | 48 | @Override 49 | public int compareTo(AppProcessInfo another) { 50 | if (this.processName.compareTo(another.processName) == 0) { 51 | if (this.memory < another.memory) { 52 | return 1; 53 | } else if (this.memory == another.memory) { 54 | return 0; 55 | } else { 56 | return -1; 57 | } 58 | } else { 59 | return this.processName.compareTo(another.processName); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/bean/ItemTheme.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.bean; 2 | 3 | import com.zx.clean.utils.Theme; 4 | 5 | /** 6 | * Created by zhangxun on 2015/11/20. 7 | */ 8 | public class ItemTheme { 9 | private boolean isChecked; 10 | private String cardName; 11 | private int color; 12 | private int colorDark; 13 | private Theme theme; 14 | 15 | public ItemTheme(boolean isChecked, String cardName, int color, int colorDark, Theme theme) { 16 | this.isChecked = isChecked; 17 | this.cardName = cardName; 18 | this.color = color; 19 | this.colorDark = colorDark; 20 | this.theme = theme; 21 | } 22 | 23 | public int getColorDark() { 24 | return colorDark; 25 | } 26 | 27 | public void setColorDark(int colorDark) { 28 | this.colorDark = colorDark; 29 | } 30 | 31 | public boolean isChecked() { 32 | return isChecked; 33 | } 34 | 35 | public void setIsChecked(boolean isChecked) { 36 | this.isChecked = isChecked; 37 | } 38 | 39 | public String getCardName() { 40 | return cardName; 41 | } 42 | 43 | public void setCardName(String cardName) { 44 | this.cardName = cardName; 45 | } 46 | 47 | public int getColor() { 48 | return color; 49 | } 50 | 51 | public void setColor(int color) { 52 | this.color = color; 53 | } 54 | 55 | public Theme getTheme() { 56 | return theme; 57 | } 58 | 59 | public void setTheme(Theme theme) { 60 | this.theme = theme; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/bean/RubbishItemBean.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.bean; 2 | 3 | import android.graphics.drawable.Drawable; 4 | 5 | /** 6 | * Created by zhangxun on 2015/11/26. 7 | */ 8 | public class RubbishItemBean { 9 | private long mCacheSize; 10 | private String mPackageName, mApplicationName; 11 | private Drawable mIcon; 12 | 13 | public RubbishItemBean(long mCacheSize, String mPackageName, String mApplicationName, Drawable mIcon) { 14 | this.mCacheSize = mCacheSize; 15 | this.mPackageName = mPackageName; 16 | this.mApplicationName = mApplicationName; 17 | this.mIcon = mIcon; 18 | } 19 | 20 | public long getmCacheSize() { 21 | return mCacheSize; 22 | } 23 | 24 | public String getmPackageName() { 25 | return mPackageName; 26 | } 27 | 28 | public String getmApplicationName() { 29 | return mApplicationName; 30 | } 31 | 32 | public Drawable getmIcon() { 33 | return mIcon; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/bean/SDCardInfo.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.bean; 2 | 3 | /** 4 | * Created by zhangxun on 2015/11/24. 5 | */ 6 | public class SDCardInfo { 7 | 8 | public long total; 9 | 10 | public long free; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/utils/AppUtil.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.utils; 2 | 3 | import android.app.ActivityManager; 4 | import android.content.Context; 5 | import android.util.Log; 6 | 7 | import java.io.BufferedReader; 8 | import java.io.FileNotFoundException; 9 | import java.io.FileReader; 10 | 11 | /** 12 | * Created by zhangxun on 2015/11/24. 13 | */ 14 | public class AppUtil { 15 | 16 | /** 17 | * 获取可用内存 18 | * @param context 19 | * @return 20 | */ 21 | public static long getAvailMemory(Context context){ 22 | //获取android当前可用内存大小 23 | ActivityManager activityManager = (ActivityManager) context 24 | .getSystemService(Context.ACTIVITY_SERVICE); 25 | ActivityManager.MemoryInfo memoryInfo = new ActivityManager.MemoryInfo(); 26 | activityManager.getMemoryInfo(memoryInfo); 27 | return memoryInfo.availMem; 28 | } 29 | 30 | public static long getTotalMemory(Context context){ 31 | //系统内存信息文件 32 | String file = "/proc/meminfo"; 33 | String memInfo; 34 | String[] strs; 35 | long memory = 0; 36 | 37 | try { 38 | FileReader fileReader = new FileReader(file); 39 | BufferedReader bufferedReader = new BufferedReader(fileReader, 8192); 40 | //读取meminfo第一行,系统内存大小 41 | memInfo = bufferedReader.readLine(); 42 | strs = memInfo.split("\\s+"); 43 | for (String str : strs){ 44 | Log.d("AppUtil", str + "\t"); 45 | } 46 | //获取系统总内存,单位KB 47 | memory = Integer.valueOf(strs[1]).intValue(); 48 | bufferedReader.close(); 49 | } catch (Exception e) { 50 | e.printStackTrace(); 51 | } 52 | 53 | 54 | return memory * 1024; 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/utils/DrawerNavigationItemListener.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.utils; 2 | 3 | import android.view.View; 4 | 5 | /** 6 | * Created by zhangxun on 2015/11/23. 7 | */ 8 | public interface DrawerNavigationItemListener { 9 | 10 | void drawerColse(int id); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/utils/MyActivityManager.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.utils; 2 | 3 | import android.app.Activity; 4 | import android.content.Context; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | /** 10 | * Created by zhangxun on 2015/11/23. 11 | */ 12 | public class MyActivityManager { 13 | 14 | public List activityList = new ArrayList<>(); 15 | 16 | public static MyActivityManager activityManager; 17 | 18 | private MyActivityManager() { 19 | } 20 | 21 | public static MyActivityManager getInstance(){ 22 | if (activityManager == null){ 23 | activityManager = new MyActivityManager(); 24 | } 25 | return activityManager; 26 | } 27 | 28 | public void addActivity(Activity activity){ 29 | activityList.add(activity); 30 | } 31 | 32 | public void removeActivity(Activity activity){ 33 | activityList.remove(activity); 34 | } 35 | 36 | public void finishAllActivity(){ 37 | if (activityList != null && activityList.size() > 0){ 38 | for (Activity activity : activityList){ 39 | activity.finish(); 40 | } 41 | } 42 | } 43 | 44 | public void exit(Context context){ 45 | finishAllActivity(); 46 | System.exit(0); 47 | } 48 | 49 | 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/utils/PreferenceManager.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.utils; 2 | 3 | 4 | import android.content.Context; 5 | import android.content.SharedPreferences; 6 | 7 | 8 | public class PreferenceManager { 9 | 10 | 11 | private static SharedPreferences getSharedPreferences(final Context context) { 12 | return android.preference.PreferenceManager.getDefaultSharedPreferences(context); 13 | } 14 | 15 | 16 | public static boolean isFirstTime(Context context, String key) { 17 | if (getBoolean(context, key, false)) { 18 | return false; 19 | } else { 20 | putBoolean(context, key, true); 21 | return true; 22 | } 23 | } 24 | 25 | 26 | public static boolean contains(Context context, String key) { 27 | return PreferenceManager.getSharedPreferences(context).contains(key); 28 | } 29 | 30 | public static int getInt(final Context context, final String key, final int defaultValue) { 31 | return PreferenceManager.getSharedPreferences(context).getInt(key, defaultValue); 32 | } 33 | 34 | public static boolean putInt(final Context context, final String key, final int pValue) { 35 | final SharedPreferences.Editor editor = PreferenceManager.getSharedPreferences(context).edit(); 36 | 37 | editor.putInt(key, pValue); 38 | 39 | return editor.commit(); 40 | } 41 | 42 | public static long getLong(final Context context, final String key, final long defaultValue) { 43 | return PreferenceManager.getSharedPreferences(context).getLong(key, defaultValue); 44 | } 45 | 46 | public static Long getLong(final Context context, final String key, final Long defaultValue) { 47 | if (PreferenceManager.getSharedPreferences(context).contains(key)) { 48 | return PreferenceManager.getSharedPreferences(context).getLong(key, 0); 49 | } else { 50 | return null; 51 | } 52 | } 53 | 54 | 55 | public static boolean putLong(final Context context, final String key, final long pValue) { 56 | final SharedPreferences.Editor editor = PreferenceManager.getSharedPreferences(context).edit(); 57 | 58 | editor.putLong(key, pValue); 59 | 60 | return editor.commit(); 61 | } 62 | 63 | public static boolean getBoolean(final Context context, final String key, final boolean defaultValue) { 64 | return PreferenceManager.getSharedPreferences(context).getBoolean(key, defaultValue); 65 | } 66 | 67 | public static boolean putBoolean(final Context context, final String key, final boolean pValue) { 68 | final SharedPreferences.Editor editor = PreferenceManager.getSharedPreferences(context).edit(); 69 | 70 | editor.putBoolean(key, pValue); 71 | 72 | return editor.commit(); 73 | } 74 | 75 | public static String getString(final Context context, final String key, final String defaultValue) { 76 | return PreferenceManager.getSharedPreferences(context).getString(key, defaultValue); 77 | } 78 | 79 | public static boolean putString(final Context context, final String key, final String pValue) { 80 | final SharedPreferences.Editor editor = PreferenceManager.getSharedPreferences(context).edit(); 81 | 82 | editor.putString(key, pValue); 83 | 84 | return editor.commit(); 85 | } 86 | 87 | 88 | public static boolean remove(final Context context, final String key) { 89 | final SharedPreferences.Editor editor = PreferenceManager.getSharedPreferences(context).edit(); 90 | 91 | editor.remove(key); 92 | 93 | return editor.commit(); 94 | } 95 | 96 | public static Theme getCurrentTheme(Context context) { 97 | return Theme.valueOf(PreferenceManager.getString(context, "app_theme", Theme.Blue.name())); 98 | } 99 | 100 | public static void setCurrentTheme(Context context, Theme currentTheme) { 101 | PreferenceManager.putString(context, "app_theme", currentTheme.name()); 102 | } 103 | } -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/utils/StorageUtil.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.utils; 2 | 3 | import android.content.Context; 4 | import android.os.Environment; 5 | import android.os.StatFs; 6 | 7 | import com.zx.clean.bean.SDCardInfo; 8 | 9 | import java.io.File; 10 | 11 | /** 12 | * Created by zhangxun on 2015/11/24. 13 | */ 14 | public class StorageUtil { 15 | 16 | /** 17 | * 获取SDCard的总计大小于剩余大小 18 | * @return 19 | */ 20 | public static SDCardInfo getSDCardInfo(){ 21 | if (Environment.isExternalStorageRemovable()){ 22 | String sDcString = Environment.getExternalStorageState(); 23 | if (sDcString.equals(Environment.MEDIA_MOUNTED)){ 24 | File pathFile = Environment.getExternalStorageDirectory(); 25 | 26 | try { 27 | StatFs statFs = new StatFs(pathFile.getPath()); 28 | 29 | //获取SDCard上BLOCK总数 30 | long nToalBlocks = statFs.getBlockCount(); 31 | 32 | //获取SDCard上每个BLOCK的SIZE 33 | long nBlockSize = statFs.getBlockSize(); 34 | 35 | //获取可供程序使用BLOCK的数量 36 | long nAvailaBlock = statFs.getAvailableBlocks(); 37 | 38 | //获取剩下的所有BLOCK的数量(包括预留的一般程序无法使用的块) 39 | long nFreeBlock = statFs.getFreeBlocks(); 40 | 41 | SDCardInfo info = new SDCardInfo(); 42 | //计算SDCard总容量大小MB 43 | info.total = nToalBlocks * nBlockSize; 44 | 45 | //计算SDCard剩余大小MB 46 | info.free = nAvailaBlock * nBlockSize; 47 | 48 | return info; 49 | } catch (Exception e) { 50 | e.printStackTrace(); 51 | } 52 | } 53 | } 54 | return null; 55 | } 56 | 57 | /** 58 | * 获取系统总共存储信息 59 | * @param context 60 | * @return 61 | */ 62 | public static SDCardInfo getSystemSpaceInfo(Context context){ 63 | File path = Environment.getDataDirectory(); 64 | 65 | SDCardInfo info = null; 66 | try { 67 | StatFs statFs = new StatFs(path.getPath()); 68 | long blockSize = statFs.getBlockSize(); 69 | long totalBlocks = statFs.getBlockCount(); 70 | long availableBlocks = statFs.getAvailableBlocks(); 71 | 72 | info = new SDCardInfo(); 73 | info.total = totalBlocks * blockSize; 74 | info.free = availableBlocks * blockSize; 75 | } catch (Exception e) { 76 | e.printStackTrace(); 77 | } 78 | return info; 79 | } 80 | 81 | /** 82 | * 转换 G M K B 83 | * @param size 84 | * @return 85 | */ 86 | public static String convertStorage(long size){ 87 | long kb = 1024; 88 | long mb = kb * 1024; 89 | long gb = mb * 1024; 90 | 91 | if (size >= gb){ 92 | return String.format("%.1f GB", (float)size / gb); 93 | }else if (size >= mb){ 94 | float f = (float) size / mb; 95 | return String.format( f > 100 ? "%.0f MB" : "%.1f MB", f); 96 | }else if (size >= kb){ 97 | float f = (float) size / kb; 98 | return String.format( f > 100 ? "%.0f KB" : "%.1f KB", f); 99 | }else { 100 | return String.format("%df B", size); 101 | } 102 | } 103 | 104 | } 105 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/utils/Theme.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.utils; 2 | 3 | /** 4 | */ 5 | public enum Theme { 6 | Blue, 7 | 8 | Indigo, 9 | 10 | Green, 11 | 12 | Red, 13 | 14 | BlueGrey, 15 | 16 | Black, 17 | 18 | Purple, 19 | 20 | Orange, 21 | 22 | Pink 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/utils/ThemeSet.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.utils; 2 | 3 | import android.content.Context; 4 | 5 | import com.zx.clean.R; 6 | import com.zx.clean.bean.ItemTheme; 7 | 8 | import java.util.ArrayList; 9 | 10 | 11 | /** 12 | * Created by zhangxun on 2015/11/19. 13 | */ 14 | public class ThemeSet { 15 | 16 | public static void onPreCreate(Context context) { 17 | final Theme currentTheme = PreferenceManager.getCurrentTheme(context); 18 | 19 | switch (currentTheme) { 20 | case Blue: 21 | context.setTheme(R.style.BlueTheme); 22 | break; 23 | case Green: 24 | context.setTheme(R.style.GreenTheme); 25 | break; 26 | case Red: 27 | context.setTheme(R.style.RedTheme); 28 | break; 29 | case Indigo: 30 | context.setTheme(R.style.IndigoTheme); 31 | break; 32 | case BlueGrey: 33 | context.setTheme(R.style.BlueGreyTheme); 34 | break; 35 | case Black: 36 | context.setTheme(R.style.BlackTheme); 37 | break; 38 | case Orange: 39 | context.setTheme(R.style.OrangeTheme); 40 | break; 41 | case Purple: 42 | context.setTheme(R.style.PurpleTheme); 43 | break; 44 | case Pink: 45 | context.setTheme(R.style.PinkTheme); 46 | break; 47 | default: 48 | context.setTheme(R.style.BlueTheme); 49 | break; 50 | } 51 | } 52 | 53 | public static ArrayList initThemeData(Context context) { 54 | ArrayList themeList = new ArrayList<>(); 55 | 56 | ItemTheme t1 = new ItemTheme(false, "Blue", R.color.blue_primary, R.color.blue_primary_dark, Theme.Blue); 57 | ItemTheme t2 = new ItemTheme(false, "Green", R.color.green_primary, R.color.green_primary_dark, Theme.Green); 58 | ItemTheme t3 = new ItemTheme(false, "Red", R.color.red_primary, R.color.red_primary_dark, Theme.Red); 59 | ItemTheme t4 = new ItemTheme(false, "Indigo", R.color.indigo_primary, R.color.indigo_primary_dark, Theme.Indigo); 60 | ItemTheme t5 = new ItemTheme(false, "Black", R.color.black_primary, R.color.black_primary_dark, Theme.Black); 61 | ItemTheme t6 = new ItemTheme(false, "BlueGrey", R.color.blue_grey_primary, R.color.blue_grey_primary_dark, Theme.BlueGrey); 62 | ItemTheme t7 = new ItemTheme(false, "Orange", R.color.orange_primary, R.color.orange_primary_dark, Theme.Orange); 63 | ItemTheme t8 = new ItemTheme(false, "Purple", R.color.purple_primary, R.color.purple_primary_dark, Theme.Purple); 64 | ItemTheme t9 = new ItemTheme(false, "Pink", R.color.pink_primary, R.color.pink_primary_dark, Theme.Pink); 65 | 66 | themeList.add(t1); 67 | themeList.add(t2); 68 | themeList.add(t3); 69 | themeList.add(t4); 70 | themeList.add(t5); 71 | themeList.add(t6); 72 | themeList.add(t7); 73 | themeList.add(t8); 74 | themeList.add(t9); 75 | 76 | 77 | return themeList; 78 | } 79 | 80 | 81 | } 82 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/utils/Utils.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.utils; 2 | 3 | import android.content.res.Resources; 4 | 5 | /** 6 | */ 7 | public class Utils { 8 | public static float dp2px(Resources resources, float dp) { 9 | final float scale = resources.getDisplayMetrics().density; 10 | return dp * scale + 0.5f; 11 | } 12 | 13 | public static float sp2px(Resources resources, float sp){ 14 | final float scale = resources.getDisplayMetrics().scaledDensity; 15 | return sp * scale; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/views/ItemCardView.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.views; 2 | 3 | import android.content.Context; 4 | import android.content.res.TypedArray; 5 | import android.util.AttributeSet; 6 | import android.view.View; 7 | import android.widget.ImageView; 8 | import android.widget.RelativeLayout; 9 | import android.widget.TextView; 10 | 11 | import com.zx.clean.R; 12 | import com.zx.clean.utils.Utils; 13 | 14 | /** 15 | * Created by zhangxun on 2015/11/20. 16 | */ 17 | public class ItemCardView extends RelativeLayout{ 18 | 19 | private ImageView cardImage; 20 | private TextView cardName; 21 | private Context mContext; 22 | 23 | public ItemCardView(Context context) { 24 | super(context); 25 | init(context); 26 | } 27 | 28 | public ItemCardView(Context context, AttributeSet attrs) { 29 | super(context, attrs); 30 | init(context); 31 | mContext = context; 32 | TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.ItemCardView); 33 | cardName.setText(typedArray.getString(R.styleable.ItemCardView_card_name)); 34 | cardImage.setImageDrawable(typedArray.getDrawable(R.styleable.ItemCardView_card_image)); 35 | typedArray.recycle(); 36 | } 37 | 38 | private void init(Context context) { 39 | View view = View.inflate(context, R.layout.card_item, this); 40 | cardName = (TextView) view.findViewById(R.id.card_name); 41 | cardImage = (ImageView) view.findViewById(R.id.card_image); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/views/ItemCardViewMini.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.views; 2 | 3 | import android.content.Context; 4 | import android.content.res.TypedArray; 5 | import android.util.AttributeSet; 6 | import android.view.View; 7 | import android.widget.ImageView; 8 | import android.widget.RelativeLayout; 9 | import android.widget.TextView; 10 | 11 | import com.zx.clean.R; 12 | 13 | /** 14 | * Created by zhangxun on 2015/11/20. 15 | */ 16 | public class ItemCardViewMini extends RelativeLayout{ 17 | 18 | private ImageView cardImage; 19 | private TextView cardName; 20 | private Context mContext; 21 | 22 | public ItemCardViewMini(Context context) { 23 | super(context); 24 | init(context); 25 | } 26 | 27 | public ItemCardViewMini(Context context, AttributeSet attrs) { 28 | super(context, attrs); 29 | init(context); 30 | mContext = context; 31 | TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.ItemCardView); 32 | cardName.setText(typedArray.getString(R.styleable.ItemCardView_card_name)); 33 | cardImage.setImageDrawable(typedArray.getDrawable(R.styleable.ItemCardView_card_image)); 34 | typedArray.recycle(); 35 | } 36 | 37 | private void init(Context context) { 38 | View view = View.inflate(context, R.layout.card_item_mini, this); 39 | cardName = (TextView) view.findViewById(R.id.card_name); 40 | cardImage = (ImageView) view.findViewById(R.id.card_image); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/com/zx/clean/views/MemoryInfoView.java: -------------------------------------------------------------------------------- 1 | package com.zx.clean.views; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.view.LayoutInflater; 6 | import android.widget.LinearLayout; 7 | import android.widget.TextView; 8 | 9 | import com.zx.clean.R; 10 | 11 | import butterknife.ButterKnife; 12 | import butterknife.InjectView; 13 | 14 | /** 15 | * Created by zhangxun on 2015/11/30. 16 | */ 17 | public class MemoryInfoView extends LinearLayout{ 18 | 19 | @InjectView(R.id.advice) 20 | TextView advice; 21 | @InjectView(R.id.scan_completed) 22 | TextView scan_completed; 23 | @InjectView(R.id.action) 24 | TextView action; 25 | 26 | public MemoryInfoView(Context context) { 27 | super(context); 28 | ButterKnife.inject(context, MemoryInfoView.this); 29 | initView(); 30 | } 31 | 32 | private void initView() { 33 | LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); 34 | final LinearLayout mainV = (LinearLayout) inflater.inflate(R.layout.view_memory_info, this); 35 | } 36 | 37 | public void setTextValues(String action_tv, String scan_completed_tv, boolean show){ 38 | action.setText(action_tv); 39 | scan_completed.setText(scan_completed_tv); 40 | if (show){ 41 | action.setVisibility(VISIBLE); 42 | }else { 43 | action.setVisibility(GONE); 44 | } 45 | } 46 | 47 | public void setScanText(String scan_completed_tv){ 48 | scan_completed.setText(scan_completed_tv); 49 | } 50 | 51 | public String getScanText(){ 52 | return scan_completed.getText().toString(); 53 | } 54 | 55 | 56 | } 57 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/selector_text_ripple.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/selector_toolbar_right_corner_ripple.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bdcx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xhdpi/bdcx.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bg_qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xhdpi/bg_qq.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bg_wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xhdpi/bg_wechat.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/bg_weibo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xhdpi/bg_weibo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/card_icon_autorun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xhdpi/card_icon_autorun.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/card_icon_media.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xhdpi/card_icon_media.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/card_icon_speedup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xhdpi/card_icon_speedup.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/card_icon_trash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xhdpi/card_icon_trash.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/default_avator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xhdpi/default_avator.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xhdpi/ic_lock.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_login_user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xhdpi/ic_login_user.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/list_icn_slt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xhdpi/list_icn_slt.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/login_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xhdpi/login_bg.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/radio_checkbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xhdpi/radio_checkbox.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/small_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xhdpi/small_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/tp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xhdpi/tp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/S51208-114446.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xxhdpi/S51208-114446.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/S51208-114510.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xxhdpi/S51208-114510.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/S51208-114521.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xxhdpi/S51208-114521.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/S51208-114535.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xxhdpi/S51208-114535.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xxhdpi/ce.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/entrance2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xxhdpi/entrance2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/entrance3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xxhdpi/entrance3.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xxhdpi/ng.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/s51208114446.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xxhdpi/s51208114446.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/s51208114510.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xxhdpi/s51208114510.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/s51208114521.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xxhdpi/s51208114521.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/s51208114535.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunzzz/Clean/58d872c151a702439ee347710e746e40ee213e80/app/src/main/res/drawable-xxhdpi/s51208114535.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/circle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/clean_already_circle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_account_circle_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_arrow_back_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_battery_60_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_check_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_home_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_menu_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_perm_contact_cal_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_security_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_settings_applications_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_signal_cellular_1_bar_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_signal_wifi_3_bar_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_verified_user_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_wallet_travel_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_text_ripple.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_toolbar_right_corner_ripple.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 3 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_about.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | 16 | 19 | 20 | 23 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_app_manager.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 15 | 16 | 24 | 25 | 34 | 35 | 46 | 47 | 59 | 60 | 61 | 62 | 67 | 68 | 69 | 70 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_app_manager_pre.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 14 | 15 | 20 | 21 |