├── .gitignore ├── .idea ├── codeStyles │ └── Project.xml ├── compiler.xml ├── encodings.xml ├── gradle.xml ├── jarRepositories.xml ├── misc.xml ├── runConfigurations.xml └── vcs.xml ├── README.md ├── README_CN.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── eajy │ │ └── materialdesign2 │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ └── open_source_license.html │ ├── ic_launcher-web.png │ ├── java │ │ └── com │ │ │ └── eajy │ │ │ └── materialdesign2 │ │ │ ├── App.java │ │ │ ├── Constant.java │ │ │ ├── Data.java │ │ │ ├── activity │ │ │ ├── AboutActivity.java │ │ │ ├── BaseActivity.java │ │ │ ├── BottomAppBarActivity.java │ │ │ ├── BottomNavigationActivity.java │ │ │ ├── DonateActivity.java │ │ │ ├── MainActivity.java │ │ │ ├── MyAppsActivity.java │ │ │ ├── RecyclerViewActivity.java │ │ │ ├── ScrollingActivity.java │ │ │ ├── SettingsActivity.java │ │ │ ├── ShareViewActivity.java │ │ │ └── StartActivity.java │ │ │ ├── adapter │ │ │ ├── FragmentAdapter.java │ │ │ ├── MyAppsAdapter.java │ │ │ ├── RecyclerViewAdapter.java │ │ │ └── ViewPagerAdapter.java │ │ │ ├── fragment │ │ │ ├── CardsFragment.java │ │ │ ├── DialogsFragment.java │ │ │ ├── SettingsFragment.java │ │ │ └── WidgetsFragment.java │ │ │ ├── util │ │ │ └── AppUtils.java │ │ │ └── view │ │ │ ├── ItemTouchHelperCallback.java │ │ │ ├── MyAppsModel.java │ │ │ └── onMoveAndSwipedListener.java │ └── res │ │ ├── anim │ │ ├── activity_exit_alpha.xml │ │ ├── anim_about_card_show.xml │ │ └── anim_recycler_item_show.xml │ │ ├── drawable-nodpi │ │ ├── flutter_demo.png │ │ ├── game_2048.png │ │ ├── material_design_2.png │ │ ├── material_design_color.png │ │ ├── material_design_demo.png │ │ ├── tasks.png │ │ └── x_launcher.png │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable-w820dp │ │ └── round_big.xml │ │ ├── drawable-xxhdpi │ │ └── ic_github.png │ │ ├── drawable │ │ ├── bg_start.xml │ │ ├── bottom_dialog.jpg │ │ ├── google_assistant.png │ │ ├── ic_add_white_24dp.xml │ │ ├── ic_apps_black_24dp.xml │ │ ├── ic_attach_money_black_24dp.xml │ │ ├── ic_bookmark_border_white_24dp.xml │ │ ├── ic_close_white_24dp.xml │ │ ├── ic_copyright_black_24dp.xml │ │ ├── ic_dashboard_black_24dp.xml │ │ ├── ic_email_black_24dp.xml │ │ ├── ic_favorite_border_white_24dp.xml │ │ ├── ic_file_download_black_24dp.xml │ │ ├── ic_format_list_bulleted_black_24dp.xml │ │ ├── ic_fullscreen_black_24dp.xml │ │ ├── ic_inbox_black_24dp.xml │ │ ├── ic_info_outline_black_24dp.xml │ │ ├── ic_launcher_round.png │ │ ├── ic_monetization_on_black_24dp.xml │ │ ├── ic_more_horiz_black_24dp.xml │ │ ├── ic_movie_black_24dp.xml │ │ ├── ic_music_note_black_24dp.xml │ │ ├── ic_photo_black_24dp.xml │ │ ├── ic_photo_white_24dp.xml │ │ ├── ic_settings_black_24dp.xml │ │ ├── ic_share_white_24dp.xml │ │ ├── ic_shop_black_24dp.xml │ │ ├── ic_web_black_24dp.xml │ │ ├── material_design_1.jpg │ │ ├── material_design_11.png │ │ ├── material_design_3.png │ │ ├── material_design_4.jpg │ │ ├── material_design_5.jpg │ │ ├── round.xml │ │ ├── round_big.xml │ │ └── side_nav_bar.xml │ │ ├── layout-w600dp │ │ └── content_scrolling.xml │ │ ├── layout │ │ ├── activity_about.xml │ │ ├── activity_bottom_app_bar.xml │ │ ├── activity_bottom_navigation.xml │ │ ├── activity_donate.xml │ │ ├── activity_main.xml │ │ ├── activity_my_apps.xml │ │ ├── activity_recycler_view.xml │ │ ├── activity_scrolling.xml │ │ ├── activity_settings.xml │ │ ├── activity_share_view.xml │ │ ├── activity_start.xml │ │ ├── ad_banner_donate.xml │ │ ├── ad_banner_main_card.xml │ │ ├── ad_banner_main_dialog.xml │ │ ├── ad_banner_main_widget.xml │ │ ├── ad_native_main_card.xml │ │ ├── app_bar_main.xml │ │ ├── card_1.xml │ │ ├── card_2.xml │ │ ├── card_3.xml │ │ ├── card_about_1.xml │ │ ├── card_about_2.xml │ │ ├── content_donate.xml │ │ ├── content_scrolling.xml │ │ ├── dialog_bottom_sheet.xml │ │ ├── dialog_fullscreen.xml │ │ ├── dialog_source_licenses.xml │ │ ├── fragment_cards.xml │ │ ├── fragment_dialogs.xml │ │ ├── fragment_widgets.xml │ │ ├── item_my_apps.xml │ │ ├── item_recycler_footer.xml │ │ ├── item_recycler_header.xml │ │ ├── item_recycler_view.xml │ │ ├── item_view_pager.xml │ │ └── nav_header_main.xml │ │ ├── menu │ │ ├── drawer_main.xml │ │ ├── menu_bottom_navigation.xml │ │ ├── menu_main.xml │ │ └── popup_menu_main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── values-night │ │ ├── colors.xml │ │ └── styles.xml │ │ ├── values-w600dp │ │ └── dimens.xml │ │ ├── values-w820dp │ │ └── dimens.xml │ │ ├── values │ │ ├── arrays.xml │ │ ├── colors.xml │ │ ├── configs.xml │ │ ├── dimens.xml │ │ ├── ic_launcher_background.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ └── preferences_settings.xml │ └── test │ └── java │ └── com │ └── eajy │ └── materialdesign2 │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── pictures ├── 1.png ├── 2.png └── 3.png └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 20 | 21 | 22 | 23 | 25 | 26 | 27 |
28 | 29 | 30 | 31 | xmlns:android 32 | 33 | ^$ 34 | 35 | 36 | 37 |
38 |
39 | 40 | 41 | 42 | xmlns:.* 43 | 44 | ^$ 45 | 46 | 47 | BY_NAME 48 | 49 |
50 |
51 | 52 | 53 | 54 | .*:id 55 | 56 | http://schemas.android.com/apk/res/android 57 | 58 | 59 | 60 |
61 |
62 | 63 | 64 | 65 | .*:name 66 | 67 | http://schemas.android.com/apk/res/android 68 | 69 | 70 | 71 |
72 |
73 | 74 | 75 | 76 | name 77 | 78 | ^$ 79 | 80 | 81 | 82 |
83 |
84 | 85 | 86 | 87 | style 88 | 89 | ^$ 90 | 91 | 92 | 93 |
94 |
95 | 96 | 97 | 98 | .* 99 | 100 | ^$ 101 | 102 | 103 | BY_NAME 104 | 105 |
106 |
107 | 108 | 109 | 110 | .* 111 | 112 | http://schemas.android.com/apk/res/android 113 | 114 | 115 | ANDROID_ATTRIBUTE_ORDER 116 | 117 |
118 |
119 | 120 | 121 | 122 | .* 123 | 124 | .* 125 | 126 | 127 | BY_NAME 128 | 129 |
130 |
131 |
132 |
133 |
134 |
-------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 27 | 42 | 43 | 44 | 45 | 46 | 47 | 49 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [Language:简体中文](https://github.com/Eajy/MaterialDesign2/blob/master/README_CN.md) 2 | 3 | --- 4 | 5 | **This is a demo app designed with the fascinating and modern Google's Material Design 2. 6 | It was created using Androidx Libraries and Material Components. 7 | It covers many material design components to show how to implement material design 2 in apps.** 8 | 9 | This app is based on my another App: [Material Design Demo](https://github.com/Eajy/MaterialDesignDemo) which is designed with MD using support libraries. 10 | 11 | 12 | #### Google Play: 13 | https://play.google.com/store/apps/details?id=com.eajy.materialdesign2 14 | 15 | ![image](https://github.com/Eajy/MaterialDesign2/blob/master/pictures/1.png) 16 | 17 | ![image](https://github.com/Eajy/MaterialDesign2/blob/master/pictures/2.png) 18 | 19 | ![image](https://github.com/Eajy/MaterialDesign2/blob/master/pictures/3.png) 20 | 21 | --- 22 | 23 | #### Contributors 24 | - [Gurupreet](https://github.com/Gurupreet) 25 | 26 | #### Open Source Licenses: 27 | Copyright 2019 Eajy 28 | 29 | The product includes: 30 | 31 | Apache License, Version 2.0 32 | You may obtain a copy of the license at 33 | http://www.apache.org/licenses/LICENSE-2.0 34 | 35 | Material Components Android 36 | Copyright © 2017 The Android Open Source Project. All rights reserved. 37 | https://material.io/develop/android/ 38 | 39 | Glide 40 | Copyright © 2014 Google, Inc. All rights reserved. 41 | https://github.com/bumptech/glide 42 | 43 | Google Material Design Icons 44 | Copyright © Google, Inc. All rights reserved. 45 | https://material.io/icons/ 46 | 47 | [_**- Designed by Eajy in China.**_](https://sites.google.com/view/eajy) -------------------------------------------------------------------------------- /README_CN.md: -------------------------------------------------------------------------------- 1 | 2 | --- 3 | 4 | **这是一个遵循 Material Design 2 设计理念的 demo 应用。 5 | 它使用了最新的 Androidx Libraries 和 Material Components。 6 | 该应用涵盖了很多材料设计的组件,展示如何使用 Material Design 2 来设计 app。** 7 | 8 | 这款应用参考了我以前的: [Material Design Demo](https://github.com/Eajy/MaterialDesignDemo)。 它使用了 Support Libraries。 9 | 10 | 11 | #### Google Play: 12 | https://play.google.com/store/apps/details?id=com.eajy.materialdesign2 13 | 14 | ![image](https://github.com/Eajy/MaterialDesign2/blob/master/pictures/1.png) 15 | 16 | ![image](https://github.com/Eajy/MaterialDesign2/blob/master/pictures/2.png) 17 | 18 | ![image](https://github.com/Eajy/MaterialDesign2/blob/master/pictures/3.png) 19 | 20 | --- 21 | 22 | #### 贡献者 23 | - [Gurupreet](https://github.com/Gurupreet) 24 | 25 | #### 开源许可: 26 | Copyright 2019 Eajy 27 | 28 | The product includes: 29 | 30 | Apache License, Version 2.0 31 | You may obtain a copy of the license at 32 | http://www.apache.org/licenses/LICENSE-2.0 33 | 34 | Material Components Android 35 | Copyright © 2017 The Android Open Source Project. All rights reserved. 36 | https://material.io/develop/android/ 37 | 38 | Glide 39 | Copyright © 2014 Google, Inc. All rights reserved. 40 | https://github.com/bumptech/glide 41 | 42 | Google Material Design Icons 43 | Copyright © Google, Inc. All rights reserved. 44 | https://material.io/icons/ 45 | 46 | [_**- Designed by Eajy in China.**_](https://sites.google.com/view/eajy) -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 30 5 | 6 | defaultConfig { 7 | applicationId "com.eajy.materialdesign2" 8 | minSdkVersion 21 9 | targetSdkVersion 30 10 | versionCode 7 11 | versionName "1.6" 12 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 13 | } 14 | 15 | buildTypes { 16 | release { 17 | minifyEnabled true 18 | shrinkResources true 19 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 20 | } 21 | debug { 22 | minifyEnabled false 23 | } 24 | } 25 | 26 | compileOptions { 27 | targetCompatibility 1.8 28 | sourceCompatibility 1.8 29 | } 30 | } 31 | 32 | dependencies { 33 | implementation fileTree(dir: 'libs', include: ['*.jar']) 34 | testImplementation 'junit:junit:4.13.2' 35 | androidTestImplementation 'androidx.test:runner:1.4.0-alpha04' 36 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0-alpha04' 37 | 38 | implementation 'androidx.appcompat:appcompat:1.3.0-beta01' 39 | implementation 'androidx.legacy:legacy-support-v4:1.0.0' 40 | implementation 'com.google.android.material:material:1.4.0-alpha01' 41 | implementation 'androidx.constraintlayout:constraintlayout:2.0.4' 42 | implementation 'androidx.preference:preference:1.1.1' 43 | implementation 'com.android.billingclient:billing:3.0.3' 44 | implementation 'com.github.bumptech.glide:glide:4.9.0' 45 | implementation 'com.google.android.gms:play-services-ads:19.1.0' 46 | } 47 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -keep class com.android.vending.billing.** 23 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/eajy/materialdesign2/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.InstrumentationRegistry; 6 | import androidx.test.runner.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getTargetContext(); 24 | 25 | assertEquals("com.eajy.materialdesign2", appContext.getPackageName()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 30 | 35 | 39 | 44 | 47 | 50 | 54 | 59 | 63 | 68 | 69 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /app/src/main/assets/open_source_license.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Open Sources License 5 | 6 | 7 | 8 | 9 | Copyright 2019 Eajy 10 |
11 |
12 | 13 | The product includes: 14 |
15 |
16 | 17 | Apache License, Version 2.0 18 |
19 | You may obtain a copy of the license at 20 |
21 | http://www.apache.org/licenses/LICENSE-2.0 22 |
23 |
24 | 25 | Material Components Android 26 |
27 | Copyright © 2017 The Android Open Source Project. All rights reserved. 28 |
29 | https://material.io/develop/android/ 30 |
31 |
32 | 33 | Glide 34 |
35 | Copyright © 2014 Google, Inc. All rights reserved. 36 |
37 | https://github.com/bumptech/glide 38 |
39 | BSD, part MIT and Apache 2.0. See the LICENSE file for details. 41 |
42 |
43 | 44 | Google Material Design Icons 45 |
46 | Copyright © Google, Inc. All rights reserved. 47 |
48 | https://material.io/icons/ 49 |
50 |
51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Eajy/MaterialDesign2/5de957102b0788d81cff4766f61ac2362e07ae66/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/App.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import android.os.AsyncTask; 6 | import android.os.Handler; 7 | import android.os.Looper; 8 | 9 | import com.google.android.gms.ads.MobileAds; 10 | 11 | import java.util.concurrent.Executor; 12 | 13 | /** 14 | * Created by zhangxiao on 2019/4/2 15 | */ 16 | public class App extends Application { 17 | 18 | private Handler mHandler; 19 | private Executor mExecutor; 20 | private static Context context; 21 | private static App instance; 22 | 23 | @Override 24 | public void onCreate() { 25 | super.onCreate(); 26 | instance = this; 27 | mHandler = new Handler(); 28 | mExecutor = AsyncTask.THREAD_POOL_EXECUTOR; 29 | 30 | MobileAds.initialize(this, getString(R.string.admob_app_id)); 31 | } 32 | 33 | public void runOnUi(Runnable runnable) { 34 | if (mHandler != null) { 35 | mHandler.post(runnable); 36 | } else { 37 | mHandler = new Handler(Looper.getMainLooper()); 38 | mHandler.post(runnable); 39 | } 40 | } 41 | 42 | public void runOnBackground(Runnable runnable) { 43 | if (mExecutor != null) { 44 | mExecutor.execute(runnable); 45 | } else { 46 | mExecutor = AsyncTask.THREAD_POOL_EXECUTOR; 47 | mExecutor.execute(runnable); 48 | } 49 | } 50 | 51 | @Override 52 | protected void attachBaseContext(Context base) { 53 | super.attachBaseContext(base); 54 | context = base; 55 | } 56 | 57 | public static Context getContext() { 58 | return context; 59 | } 60 | 61 | public static App getApplication() { 62 | return instance; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/Constant.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2; 2 | 3 | /** 4 | * Created by zhang on 2016.09.23. 5 | */ 6 | public class Constant { 7 | 8 | public static String APP_URL = "https://play.google.com/store/apps/details?id=com.eajy.materialdesign2"; 9 | private static String DESIGNED_BY = "Designed by Eajy in China"; 10 | public static String SHARE_CONTENT = "A beautiful app designed with Material Design 2:\n" + APP_URL + "\n- " + DESIGNED_BY; 11 | public static String EMAIL = "mailto:eajy.zhangxiao@gmail.com"; 12 | public static String GIT_HUB = "https://github.com/Eajy/MaterialDesign2"; 13 | public static String MY_WEBSITE = "https://sites.google.com/view/eajy"; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/Data.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2; 2 | 3 | import com.eajy.materialdesign2.view.MyAppsModel; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | public class Data { 9 | 10 | public static List getMyAppsData() { 11 | List lists = new ArrayList(); 12 | 13 | MyAppsModel model0 = new MyAppsModel(); 14 | model0.setName("Material Design"); 15 | model0.setDescription("A beautiful app designed with Material Design."); 16 | model0.setPackageName("com.eajy.materialdesigndemo"); 17 | model0.setGooglePlayUrl("https://play.google.com/store/apps/details?id=com.eajy.materialdesigndemo"); 18 | model0.setImageUrl("material_design_demo"); 19 | if (!model0.getPackageName().equals(BuildConfig.APPLICATION_ID)) 20 | lists.add(model0); 21 | 22 | MyAppsModel model7 = new MyAppsModel(); 23 | model7.setName("Tasks"); 24 | model7.setDescription("Simply create any task or goal or target, and to achieve it."); 25 | model7.setPackageName("com.eajy.apps.tasks"); 26 | model7.setGooglePlayUrl("https://play.google.com/store/apps/details?id=com.eajy.apps.tasks"); 27 | model7.setImageUrl("tasks"); 28 | if (!model7.getPackageName().equals(BuildConfig.APPLICATION_ID)) 29 | lists.add(model7); 30 | 31 | MyAppsModel model6 = new MyAppsModel(); 32 | model6.setName("Material Design 2"); 33 | model6.setDescription("A beautiful app designed with Material Design 2."); 34 | model6.setPackageName("com.eajy.materialdesign2"); 35 | model6.setGooglePlayUrl("https://play.google.com/store/apps/details?id=com.eajy.materialdesign2"); 36 | model6.setImageUrl("material_design_2"); 37 | if (!model6.getPackageName().equals(BuildConfig.APPLICATION_ID)) 38 | lists.add(model6); 39 | 40 | MyAppsModel model3 = new MyAppsModel(); 41 | model3.setName("X Launcher"); 42 | model3.setDescription("A beautiful Pixel-Launcher-liked launcher with simplify."); 43 | model3.setPackageName("com.eajy.launcher"); 44 | model3.setGooglePlayUrl("https://play.google.com/store/apps/details?id=com.eajy.launcher"); 45 | model3.setImageUrl("x_launcher"); 46 | if (!model3.getPackageName().equals(BuildConfig.APPLICATION_ID)) 47 | lists.add(model3); 48 | 49 | MyAppsModel model2 = new MyAppsModel(); 50 | model2.setName("Flutter Demo"); 51 | model2.setDescription("A beautiful app designed with Material Design by using Flutter."); 52 | model2.setPackageName("com.eajy.flutterdemo"); 53 | model2.setGooglePlayUrl("https://play.google.com/store/apps/details?id=com.eajy.flutterdemo"); 54 | model2.setImageUrl("flutter_demo"); 55 | if (!model2.getPackageName().equals(BuildConfig.APPLICATION_ID)) 56 | lists.add(model2); 57 | 58 | MyAppsModel model1 = new MyAppsModel(); 59 | model1.setName("Material Design Color"); 60 | model1.setDescription("This app shows the color in Material Design."); 61 | model1.setPackageName("com.eajy.materialdesigncolor"); 62 | model1.setGooglePlayUrl("https://play.google.com/store/apps/details?id=com.eajy.materialdesigncolor"); 63 | model1.setImageUrl("material_design_color"); 64 | if (!model1.getPackageName().equals(BuildConfig.APPLICATION_ID)) 65 | lists.add(model1); 66 | 67 | MyAppsModel model5 = new MyAppsModel(); 68 | model5.setName("2048 Game"); 69 | model5.setDescription("Classic game - 2048. Please enjoy it."); 70 | model5.setPackageName("com.eajy.game.game2048"); 71 | model5.setGooglePlayUrl("https://play.google.com/store/apps/details?id=com.eajy.game.game2048"); 72 | model5.setImageUrl("game_2048"); 73 | if (!model5.getPackageName().equals(BuildConfig.APPLICATION_ID)) 74 | lists.add(model5); 75 | 76 | return lists; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/activity/AboutActivity.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2.activity; 2 | 3 | import android.app.Dialog; 4 | import android.content.Intent; 5 | import android.net.Uri; 6 | import android.os.Bundle; 7 | import android.view.View; 8 | import android.view.animation.AlphaAnimation; 9 | import android.view.animation.Animation; 10 | import android.view.animation.AnimationUtils; 11 | import android.webkit.WebView; 12 | import android.widget.ScrollView; 13 | import android.widget.TextView; 14 | import android.widget.Toast; 15 | 16 | import com.eajy.materialdesign2.Constant; 17 | import com.eajy.materialdesign2.R; 18 | import com.eajy.materialdesign2.util.AppUtils; 19 | import com.google.android.material.button.MaterialButton; 20 | import com.google.android.material.floatingactionbutton.FloatingActionButton; 21 | 22 | import androidx.appcompat.widget.Toolbar; 23 | 24 | 25 | public class AboutActivity extends BaseActivity implements View.OnClickListener { 26 | 27 | @Override 28 | protected void onCreate(Bundle savedInstanceState) { 29 | super.onCreate(savedInstanceState); 30 | setContentView(R.layout.activity_about); 31 | Toolbar toolbar = findViewById(R.id.toolbar_about); 32 | setToolbar(toolbar); 33 | getWindow().setNavigationBarColor(getResources().getColor(R.color.colorPrimary)); 34 | initView(); 35 | } 36 | 37 | public void initView() { 38 | Animation animation = AnimationUtils.loadAnimation(this, R.anim.anim_about_card_show); 39 | ScrollView scroll_about = findViewById(R.id.scroll_about); 40 | scroll_about.startAnimation(animation); 41 | 42 | TextView tv_card_about_2_shop = findViewById(R.id.tv_card_about_2_shop); 43 | TextView tv_card_about_2_email = findViewById(R.id.tv_card_about_2_email); 44 | TextView tv_card_about_2_git_hub = findViewById(R.id.tv_card_about_2_git_hub); 45 | TextView tv_card_about_2_website = findViewById(R.id.tv_card_about_2_website); 46 | TextView tv_card_about_source_licenses = findViewById(R.id.tv_card_about_source_licenses); 47 | tv_card_about_2_shop.setOnClickListener(this); 48 | tv_card_about_2_email.setOnClickListener(this); 49 | tv_card_about_2_git_hub.setOnClickListener(this); 50 | tv_card_about_2_website.setOnClickListener(this); 51 | tv_card_about_source_licenses.setOnClickListener(this); 52 | 53 | FloatingActionButton fab = findViewById(R.id.fab_about_share); 54 | fab.setOnClickListener(this); 55 | 56 | AlphaAnimation alphaAnimation = new AlphaAnimation(0.0f, 1.0f); 57 | alphaAnimation.setDuration(300); 58 | alphaAnimation.setStartOffset(600); 59 | 60 | TextView tv_about_version = findViewById(R.id.tv_about_version); 61 | tv_about_version.setText(AppUtils.getVersionName(this)); 62 | tv_about_version.startAnimation(alphaAnimation); 63 | } 64 | 65 | @Override 66 | public void onClick(View view) { 67 | Intent intent = new Intent(); 68 | 69 | switch (view.getId()) { 70 | case R.id.tv_card_about_2_shop: 71 | intent.setData(Uri.parse(Constant.APP_URL)); 72 | intent.setAction(Intent.ACTION_VIEW); 73 | startActivity(intent); 74 | break; 75 | 76 | case R.id.tv_card_about_2_email: 77 | intent.setAction(Intent.ACTION_SENDTO); 78 | intent.setData(Uri.parse(Constant.EMAIL)); 79 | intent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.about_email_intent)); 80 | //intent.putExtra(Intent.EXTRA_TEXT, "Hi,"); 81 | try { 82 | startActivity(intent); 83 | } catch (Exception e) { 84 | Toast.makeText(AboutActivity.this, getString(R.string.about_not_found_email), Toast.LENGTH_SHORT).show(); 85 | } 86 | break; 87 | 88 | case R.id.tv_card_about_source_licenses: 89 | final Dialog dialog = new Dialog(this, R.style.DialogFullscreenWithTitle); 90 | dialog.setTitle(getString(R.string.about_source_licenses)); 91 | dialog.setContentView(R.layout.dialog_source_licenses); 92 | WebView webView = dialog.findViewById(R.id.web_source_licenses); 93 | webView.loadUrl("file:///android_asset/open_source_license.html"); 94 | MaterialButton btn_source_licenses_close = dialog.findViewById(R.id.btn_source_licenses_close); 95 | btn_source_licenses_close.setOnClickListener(v -> dialog.dismiss()); 96 | dialog.show(); 97 | break; 98 | 99 | case R.id.tv_card_about_2_git_hub: 100 | intent.setData(Uri.parse(Constant.GIT_HUB)); 101 | intent.setAction(Intent.ACTION_VIEW); 102 | startActivity(intent); 103 | break; 104 | 105 | case R.id.tv_card_about_2_website: 106 | intent.setData(Uri.parse(Constant.MY_WEBSITE)); 107 | intent.setAction(Intent.ACTION_VIEW); 108 | startActivity(intent); 109 | break; 110 | 111 | case R.id.fab_about_share: 112 | intent.setAction(Intent.ACTION_SEND); 113 | intent.putExtra(Intent.EXTRA_TEXT, Constant.SHARE_CONTENT); 114 | intent.setType("text/plain"); 115 | startActivity(Intent.createChooser(intent, getString(R.string.share_with))); 116 | break; 117 | } 118 | } 119 | 120 | } 121 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/activity/BaseActivity.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2.activity; 2 | 3 | import android.os.Bundle; 4 | import android.view.MenuItem; 5 | import android.view.View; 6 | import android.view.Window; 7 | import android.view.WindowManager; 8 | 9 | import androidx.appcompat.app.AppCompatActivity; 10 | import androidx.appcompat.widget.Toolbar; 11 | 12 | /** 13 | * Created by zhangxiao on 2018/10/11 14 | */ 15 | public abstract class BaseActivity extends AppCompatActivity { 16 | 17 | @Override 18 | protected void onCreate(Bundle savedInstanceState) { 19 | super.onCreate(savedInstanceState); 20 | 21 | if (getSupportActionBar() != null) { 22 | getSupportActionBar().setDisplayHomeAsUpEnabled(true); 23 | } 24 | } 25 | 26 | @Override 27 | public boolean onOptionsItemSelected(MenuItem item) { 28 | if (item.getItemId() == android.R.id.home) { 29 | onBackPressed(); 30 | } 31 | return true; 32 | } 33 | 34 | public void setToolbar(Toolbar toolbar) { 35 | if (toolbar != null) { 36 | setSupportActionBar(toolbar); 37 | if (getSupportActionBar() != null) { 38 | getSupportActionBar().setDisplayHomeAsUpEnabled(true); 39 | } 40 | } 41 | } 42 | 43 | public void setSupportActionBarTitle(String title) { 44 | if (getSupportActionBar() != null) { 45 | getSupportActionBar().setTitle(title); 46 | } 47 | } 48 | 49 | public void setStatusBarColor(int color) { 50 | Window window = getWindow(); 51 | window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN); 52 | // getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); 53 | window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); 54 | window.setStatusBarColor(color); 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/activity/BottomAppBarActivity.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2.activity; 2 | 3 | import android.os.Bundle; 4 | import android.view.Menu; 5 | import android.view.View; 6 | import android.widget.TextView; 7 | 8 | import com.eajy.materialdesign2.R; 9 | import com.eajy.materialdesign2.adapter.RecyclerViewAdapter; 10 | import com.eajy.materialdesign2.util.AppUtils; 11 | import com.google.android.material.bottomappbar.BottomAppBar; 12 | import com.google.android.material.chip.Chip; 13 | import com.google.android.material.floatingactionbutton.FloatingActionButton; 14 | 15 | import java.util.ArrayList; 16 | import java.util.List; 17 | 18 | import androidx.recyclerview.widget.GridLayoutManager; 19 | import androidx.recyclerview.widget.LinearLayoutManager; 20 | import androidx.recyclerview.widget.RecyclerView; 21 | 22 | public class BottomAppBarActivity extends BaseActivity { 23 | 24 | private RecyclerView mRecyclerView; 25 | private FloatingActionButton fab; 26 | private RecyclerViewAdapter adapter; 27 | private List data; 28 | private BottomAppBar bottomAppBar; 29 | private TextView bottomAppBarTitle; 30 | private Chip positionChip, radiusChip, marginChip, showTitleChip; 31 | 32 | boolean isFabAlignRight = false; 33 | boolean isCutoutMarginZero = false; 34 | boolean isCutoutRadiusZero = false; 35 | boolean showBottomBarTitle = false; 36 | 37 | @Override 38 | protected void onCreate(Bundle savedInstanceState) { 39 | super.onCreate(savedInstanceState); 40 | setContentView(R.layout.activity_bottom_app_bar); 41 | initData(); 42 | initViews(); 43 | } 44 | 45 | private void initData() { 46 | data = new ArrayList<>(); 47 | for (int i = 1; i <= 20; i++) { 48 | data.add("List item row: " + i); 49 | } 50 | } 51 | 52 | private void initViews() { 53 | fab = findViewById(R.id.fab_bottom_appbar); 54 | mRecyclerView = findViewById(R.id.recycler_view_bottom_appbar); 55 | bottomAppBar = findViewById(R.id.bottom_App_bar); 56 | positionChip = findViewById(R.id.position_chip); 57 | radiusChip = findViewById(R.id.radius_chip); 58 | marginChip = findViewById(R.id.margin_chip); 59 | showTitleChip = findViewById(R.id.show_title_chip); 60 | bottomAppBarTitle = findViewById(R.id.bottom_app_bar_title); 61 | setToolbar(bottomAppBar); 62 | 63 | if (AppUtils.getScreenWidthDp(this) >= 1200) { 64 | final GridLayoutManager gridLayoutManager = new GridLayoutManager(this, 3); 65 | mRecyclerView.setLayoutManager(gridLayoutManager); 66 | } else if (AppUtils.getScreenWidthDp(this) >= 800) { 67 | final GridLayoutManager gridLayoutManager = new GridLayoutManager(this, 2); 68 | mRecyclerView.setLayoutManager(gridLayoutManager); 69 | } else { 70 | final LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this); 71 | mRecyclerView.setLayoutManager(linearLayoutManager); 72 | } 73 | 74 | adapter = new RecyclerViewAdapter(this); 75 | mRecyclerView.setAdapter(adapter); 76 | adapter.setItems(data); 77 | 78 | setupUiClicks(); 79 | } 80 | 81 | private void setupUiClicks() { 82 | positionChip.setOnCheckedChangeListener((compoundButton, b) -> { 83 | isFabAlignRight = b; 84 | resetBottomAppBar(); 85 | }); 86 | radiusChip.setOnCheckedChangeListener((compoundButton, b) -> { 87 | isCutoutRadiusZero = b; 88 | resetBottomAppBar(); 89 | }); 90 | marginChip.setOnCheckedChangeListener((compoundButton, b) -> { 91 | isCutoutMarginZero = b; 92 | resetBottomAppBar(); 93 | }); 94 | showTitleChip.setOnCheckedChangeListener((compoundButton, b) -> { 95 | showBottomBarTitle = b; 96 | resetBottomAppBar(); 97 | }); 98 | fab.setOnClickListener(view -> { 99 | adapter.addItem(0, "1"); 100 | mRecyclerView.smoothScrollToPosition(0); 101 | }); 102 | } 103 | 104 | private void resetBottomAppBar() { 105 | bottomAppBar.setFabAlignmentMode(isFabAlignRight ? BottomAppBar.FAB_ALIGNMENT_MODE_END : BottomAppBar.FAB_ALIGNMENT_MODE_CENTER); 106 | bottomAppBar.setFabCradleMargin(isCutoutMarginZero ? 0 : 17f); //initial default value 17f 107 | bottomAppBar.setFabCradleRoundedCornerRadius(isCutoutRadiusZero ? 0 : 28f); //initial default value 28f 108 | 109 | bottomAppBarTitle.setVisibility(showBottomBarTitle ? View.VISIBLE : View.GONE); //By Default its not suggested to add title but this is just a method if required. 110 | if (showBottomBarTitle) 111 | bottomAppBar.setFabAlignmentMode(BottomAppBar.FAB_ALIGNMENT_MODE_END); 112 | 113 | bottomAppBar.invalidate(); 114 | } 115 | 116 | @Override 117 | public boolean onCreateOptionsMenu(Menu menu) { 118 | getMenuInflater().inflate(R.menu.popup_menu_main, menu); 119 | return true; 120 | } 121 | 122 | } 123 | 124 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/activity/BottomNavigationActivity.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2.activity; 2 | 3 | import android.animation.ArgbEvaluator; 4 | import android.os.Bundle; 5 | import android.view.MenuItem; 6 | import android.view.View; 7 | 8 | import com.eajy.materialdesign2.R; 9 | import com.eajy.materialdesign2.adapter.ViewPagerAdapter; 10 | import com.google.android.material.bottomnavigation.BottomNavigationView; 11 | 12 | import java.util.ArrayList; 13 | import java.util.List; 14 | 15 | import androidx.annotation.NonNull; 16 | import androidx.appcompat.widget.Toolbar; 17 | import androidx.viewpager.widget.ViewPager; 18 | 19 | public class BottomNavigationActivity extends BaseActivity { 20 | 21 | private ViewPager viewPager; 22 | private BottomNavigationView navigation; 23 | 24 | @Override 25 | protected void onCreate(Bundle savedInstanceState) { 26 | super.onCreate(savedInstanceState); 27 | setContentView(R.layout.activity_bottom_navigation); 28 | initView(); 29 | } 30 | 31 | private void initView() { 32 | setStatusBarColor(getResources().getColor(R.color.transparent)); 33 | Toolbar toolbar = findViewById(R.id.toolbar); 34 | setToolbar(toolbar); 35 | 36 | View view1 = getLayoutInflater().inflate(R.layout.item_view_pager, null); 37 | View view2 = getLayoutInflater().inflate(R.layout.item_view_pager, null); 38 | View view3 = getLayoutInflater().inflate(R.layout.item_view_pager, null); 39 | View view4 = getLayoutInflater().inflate(R.layout.item_view_pager, null); 40 | List viewList = new ArrayList<>(); 41 | viewList.add(view1); 42 | viewList.add(view2); 43 | viewList.add(view3); 44 | viewList.add(view4); 45 | viewPager = findViewById(R.id.view_pager_bottom_navigation); 46 | ViewPagerAdapter adapter = new ViewPagerAdapter(viewList); 47 | viewPager.setAdapter(adapter); 48 | viewPager.addOnPageChangeListener(pageChangeListener); 49 | 50 | navigation = findViewById(R.id.bottom_navigation); 51 | navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener); 52 | } 53 | 54 | private ViewPager.OnPageChangeListener pageChangeListener = new ViewPager.OnPageChangeListener() { 55 | @Override 56 | public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { 57 | ArgbEvaluator evaluator = new ArgbEvaluator(); 58 | int evaluate = getResources().getColor(R.color.app_blue); 59 | if (position == 0) { 60 | evaluate = (Integer) evaluator.evaluate(positionOffset, getResources().getColor(R.color.app_blue), getResources().getColor(R.color.app_green)); 61 | } else if (position == 1) { 62 | evaluate = (Integer) evaluator.evaluate(positionOffset, getResources().getColor(R.color.app_green), getResources().getColor(R.color.app_yellow)); 63 | } else if (position == 2) { 64 | evaluate = (Integer) evaluator.evaluate(positionOffset, getResources().getColor(R.color.app_yellow), getResources().getColor(R.color.app_red)); 65 | } else { 66 | evaluate = getResources().getColor(R.color.app_red); 67 | } 68 | ((View) viewPager.getParent()).setBackgroundColor(evaluate); 69 | } 70 | 71 | @Override 72 | public void onPageSelected(int position) { 73 | switch (position) { 74 | case 0: 75 | navigation.setSelectedItemId(R.id.bottom_navigation_blue); 76 | break; 77 | case 1: 78 | navigation.setSelectedItemId(R.id.bottom_navigation_green); 79 | break; 80 | case 2: 81 | navigation.setSelectedItemId(R.id.bottom_navigation_yellow); 82 | break; 83 | case 3: 84 | navigation.setSelectedItemId(R.id.bottom_navigation_red); 85 | break; 86 | } 87 | } 88 | 89 | @Override 90 | public void onPageScrollStateChanged(int state) { 91 | 92 | } 93 | }; 94 | 95 | private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener = new BottomNavigationView.OnNavigationItemSelectedListener() { 96 | @Override 97 | public boolean onNavigationItemSelected(@NonNull MenuItem item) { 98 | switch (item.getItemId()) { 99 | case R.id.bottom_navigation_blue: 100 | viewPager.setCurrentItem(0); 101 | return true; 102 | case R.id.bottom_navigation_green: 103 | viewPager.setCurrentItem(1); 104 | return true; 105 | case R.id.bottom_navigation_yellow: 106 | viewPager.setCurrentItem(2); 107 | return true; 108 | case R.id.bottom_navigation_red: 109 | viewPager.setCurrentItem(3); 110 | return true; 111 | } 112 | return false; 113 | } 114 | }; 115 | 116 | } 117 | 118 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/activity/DonateActivity.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2.activity; 2 | 3 | import android.os.Bundle; 4 | 5 | import androidx.appcompat.widget.Toolbar; 6 | 7 | import com.eajy.materialdesign2.R; 8 | 9 | public class DonateActivity extends BaseActivity { 10 | 11 | @Override 12 | protected void onCreate(Bundle savedInstanceState) { 13 | super.onCreate(savedInstanceState); 14 | setContentView(R.layout.activity_donate); 15 | initView(); 16 | } 17 | 18 | private void initView() { 19 | Toolbar toolbar = findViewById(R.id.toolbar_donate); 20 | setSupportActionBar(toolbar); 21 | if (getSupportActionBar() != null) { 22 | getSupportActionBar().setDisplayHomeAsUpEnabled(true); 23 | } 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/activity/MyAppsActivity.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2.activity; 2 | 3 | import android.os.Bundle; 4 | 5 | import com.eajy.materialdesign2.Data; 6 | import com.eajy.materialdesign2.R; 7 | import com.eajy.materialdesign2.adapter.MyAppsAdapter; 8 | 9 | import androidx.appcompat.widget.Toolbar; 10 | import androidx.recyclerview.widget.LinearLayoutManager; 11 | import androidx.recyclerview.widget.RecyclerView; 12 | 13 | public class MyAppsActivity extends BaseActivity { 14 | 15 | @Override 16 | protected void onCreate(Bundle savedInstanceState) { 17 | super.onCreate(savedInstanceState); 18 | setContentView(R.layout.activity_my_apps); 19 | 20 | Toolbar toolbar = findViewById(R.id.toolbar_my_apps); 21 | setToolbar(toolbar); 22 | 23 | RecyclerView recycler_my_apps = findViewById(R.id.recycler_my_apps); 24 | MyAppsAdapter adapter = new MyAppsAdapter(this, Data.getMyAppsData()); 25 | LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this); 26 | recycler_my_apps.setLayoutManager(linearLayoutManager); 27 | recycler_my_apps.setAdapter(adapter); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/activity/RecyclerViewActivity.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2.activity; 2 | 3 | import android.os.Bundle; 4 | import android.os.Handler; 5 | 6 | import com.eajy.materialdesign2.R; 7 | import com.eajy.materialdesign2.adapter.RecyclerViewAdapter; 8 | import com.eajy.materialdesign2.util.AppUtils; 9 | import com.eajy.materialdesign2.view.ItemTouchHelperCallback; 10 | import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton; 11 | import com.google.android.material.snackbar.Snackbar; 12 | 13 | import java.util.ArrayList; 14 | import java.util.List; 15 | 16 | import androidx.annotation.NonNull; 17 | import androidx.appcompat.widget.Toolbar; 18 | import androidx.recyclerview.widget.GridLayoutManager; 19 | import androidx.recyclerview.widget.ItemTouchHelper; 20 | import androidx.recyclerview.widget.LinearLayoutManager; 21 | import androidx.recyclerview.widget.RecyclerView; 22 | import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; 23 | 24 | public class RecyclerViewActivity extends BaseActivity { 25 | 26 | private SwipeRefreshLayout swipeRefreshLayout; 27 | private RecyclerView mRecyclerView; 28 | private ExtendedFloatingActionButton efab; 29 | private RecyclerViewAdapter adapter; 30 | private int color = 0; 31 | private List data; 32 | private String insertData; 33 | private boolean loading; 34 | private int loadTimes; 35 | 36 | @Override 37 | protected void onCreate(Bundle savedInstanceState) { 38 | super.onCreate(savedInstanceState); 39 | setContentView(R.layout.activity_recycler_view); 40 | Toolbar toolbar = findViewById(R.id.toolbar_recycler_view); 41 | setToolbar(toolbar); 42 | initData(); 43 | initView(); 44 | } 45 | 46 | private void initData() { 47 | data = new ArrayList<>(); 48 | for (int i = 1; i <= 20; i++) { 49 | data.add(i + ""); 50 | } 51 | insertData = "0"; 52 | loadTimes = 0; 53 | } 54 | 55 | private void initView() { 56 | efab = findViewById(R.id.efab_recycler_view); 57 | mRecyclerView = findViewById(R.id.recycler_view_recycler_view); 58 | 59 | if (AppUtils.getScreenWidthDp(this) >= 1200) { 60 | final GridLayoutManager gridLayoutManager = new GridLayoutManager(this, 3); 61 | mRecyclerView.setLayoutManager(gridLayoutManager); 62 | } else if (AppUtils.getScreenWidthDp(this) >= 800) { 63 | final GridLayoutManager gridLayoutManager = new GridLayoutManager(this, 2); 64 | mRecyclerView.setLayoutManager(gridLayoutManager); 65 | } else { 66 | final LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this); 67 | mRecyclerView.setLayoutManager(linearLayoutManager); 68 | } 69 | 70 | adapter = new RecyclerViewAdapter(this); 71 | mRecyclerView.setAdapter(adapter); 72 | adapter.addHeader(); 73 | adapter.setItems(data); 74 | adapter.addFooter(); 75 | 76 | efab.setOnClickListener(view -> { 77 | LinearLayoutManager linearLayoutManager = (LinearLayoutManager) mRecyclerView.getLayoutManager(); 78 | adapter.addItem(linearLayoutManager.findFirstVisibleItemPosition() + 1, insertData); 79 | }); 80 | 81 | ItemTouchHelper.Callback callback = new ItemTouchHelperCallback(adapter); 82 | ItemTouchHelper mItemTouchHelper = new ItemTouchHelper(callback); 83 | mItemTouchHelper.attachToRecyclerView(mRecyclerView); 84 | 85 | swipeRefreshLayout = findViewById(R.id.swipe_refresh_layout_recycler_view); 86 | swipeRefreshLayout.setColorSchemeResources(R.color.google_blue, R.color.google_green, R.color.google_red, R.color.google_yellow); 87 | swipeRefreshLayout.setOnRefreshListener(() -> new Handler().postDelayed(() -> { 88 | if (color > 4) { 89 | color = 0; 90 | } 91 | adapter.setColor(++color); 92 | swipeRefreshLayout.setRefreshing(false); 93 | }, 2000)); 94 | 95 | mRecyclerView.addOnScrollListener(scrollListener); 96 | } 97 | 98 | RecyclerView.OnScrollListener scrollListener = new RecyclerView.OnScrollListener() { 99 | @Override 100 | public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) { 101 | super.onScrolled(recyclerView, dx, dy); 102 | 103 | if (dy > 0) { 104 | efab.shrink(); 105 | } else { 106 | efab.extend(); 107 | } 108 | 109 | final LinearLayoutManager linearLayoutManager = (LinearLayoutManager) recyclerView.getLayoutManager(); 110 | if (!loading && linearLayoutManager.getItemCount() == (linearLayoutManager.findLastVisibleItemPosition() + 1)) { 111 | loadMoreData(); 112 | loading = true; 113 | } 114 | } 115 | }; 116 | 117 | private void loadMoreData() { 118 | new Handler().postDelayed(new Runnable() { 119 | @Override 120 | public void run() { 121 | if (loadTimes <= 5) { 122 | adapter.removeFooter(); 123 | loading = false; 124 | adapter.addItems(data); 125 | adapter.addFooter(); 126 | loadTimes++; 127 | } else { 128 | adapter.removeFooter(); 129 | Snackbar.make(mRecyclerView, getString(R.string.no_more_data), Snackbar.LENGTH_SHORT).setCallback(new Snackbar.Callback() { 130 | @Override 131 | public void onDismissed(Snackbar transientBottomBar, int event) { 132 | super.onDismissed(transientBottomBar, event); 133 | loading = false; 134 | adapter.addFooter(); 135 | } 136 | }).show(); 137 | } 138 | } 139 | }, 1500); 140 | } 141 | 142 | } 143 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/activity/ScrollingActivity.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2.activity; 2 | 3 | import android.content.Intent; 4 | import android.content.res.ColorStateList; 5 | import android.content.res.Configuration; 6 | import android.graphics.Color; 7 | import android.os.Bundle; 8 | import android.view.WindowManager; 9 | import android.widget.ImageView; 10 | 11 | import com.bumptech.glide.Glide; 12 | import com.bumptech.glide.request.RequestOptions; 13 | import com.eajy.materialdesign2.Constant; 14 | import com.eajy.materialdesign2.R; 15 | import com.eajy.materialdesign2.util.AppUtils; 16 | import com.google.android.material.appbar.CollapsingToolbarLayout; 17 | import com.google.android.material.floatingactionbutton.FloatingActionButton; 18 | 19 | import androidx.appcompat.widget.Toolbar; 20 | 21 | public class ScrollingActivity extends BaseActivity { 22 | 23 | @Override 24 | protected void onCreate(Bundle savedInstanceState) { 25 | super.onCreate(savedInstanceState); 26 | setContentView(R.layout.activity_scrolling); 27 | getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION); 28 | Toolbar toolbar = findViewById(R.id.toolbar); 29 | setToolbar(toolbar); 30 | FloatingActionButton fab = findViewById(R.id.fab_scrolling); 31 | fab.setOnClickListener(view -> { 32 | Intent intent = new Intent(); 33 | intent.setAction(Intent.ACTION_SEND); 34 | intent.putExtra(Intent.EXTRA_TEXT, Constant.SHARE_CONTENT); 35 | intent.setType("text/plain"); 36 | startActivity(Intent.createChooser(intent, getString(R.string.share_with))); 37 | }); 38 | 39 | ImageView image_scrolling_top = findViewById(R.id.image_scrolling_top); 40 | Glide.with(this).load(R.drawable.material_design_3).apply(new RequestOptions().fitCenter()).into(image_scrolling_top); 41 | 42 | if (AppUtils.getScreenWidthDp(this) >= 600) { 43 | CollapsingToolbarLayout collapsing_toolbar_layout = findViewById(R.id.collapsing_toolbar_layout); 44 | collapsing_toolbar_layout.setExpandedTitleTextColor(ColorStateList.valueOf(Color.TRANSPARENT)); 45 | } 46 | } 47 | 48 | @Override 49 | protected void onResume() { 50 | super.onResume(); 51 | Configuration configuration = getResources().getConfiguration(); 52 | if (configuration.orientation == Configuration.ORIENTATION_LANDSCAPE) { 53 | getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION); 54 | } else { 55 | getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION); 56 | } 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/activity/SettingsActivity.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2.activity; 2 | 3 | import android.os.Bundle; 4 | 5 | import com.eajy.materialdesign2.R; 6 | import com.eajy.materialdesign2.fragment.SettingsFragment; 7 | 8 | public class SettingsActivity extends BaseActivity { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | super.onCreate(savedInstanceState); 13 | setContentView(R.layout.activity_settings); 14 | 15 | getSupportFragmentManager().beginTransaction() 16 | .replace(R.id.content, new SettingsFragment()) 17 | .commit(); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/activity/ShareViewActivity.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2.activity; 2 | 3 | import android.animation.ObjectAnimator; 4 | import android.content.res.ColorStateList; 5 | import android.os.Bundle; 6 | import android.view.MotionEvent; 7 | import android.view.View; 8 | import android.view.animation.AccelerateInterpolator; 9 | import android.view.animation.AlphaAnimation; 10 | import android.view.animation.Animation; 11 | import android.view.animation.DecelerateInterpolator; 12 | import android.widget.RelativeLayout; 13 | import android.widget.TextView; 14 | 15 | import com.eajy.materialdesign2.R; 16 | import com.google.android.material.card.MaterialCardView; 17 | 18 | import androidx.appcompat.widget.Toolbar; 19 | 20 | 21 | public class ShareViewActivity extends BaseActivity { 22 | 23 | private TextView tv_share_view_tip; 24 | 25 | @Override 26 | protected void onCreate(Bundle savedInstanceState) { 27 | super.onCreate(savedInstanceState); 28 | setContentView(R.layout.activity_share_view); 29 | Toolbar toolbar = findViewById(R.id.toolbar_share_view); 30 | toolbar.setSubtitle("Shared Element Transitions"); 31 | toolbar.setNavigationIcon(R.drawable.ic_close_white_24dp); 32 | setToolbar(toolbar); 33 | initView(); 34 | } 35 | 36 | private void initView() { 37 | MaterialCardView card_share_view = findViewById(R.id.card_share_view); 38 | RelativeLayout rela_round_big = findViewById(R.id.rela_round_big); 39 | tv_share_view_tip = findViewById(R.id.tv_share_view_tip); 40 | 41 | if (getIntent() != null) { 42 | int color = getIntent().getIntExtra("color", 0); 43 | if (color == 1) { 44 | rela_round_big.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.google_blue))); 45 | } else if (color == 2) { 46 | rela_round_big.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.google_green))); 47 | } else if (color == 3) { 48 | rela_round_big.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.google_yellow))); 49 | } else if (color == 4) { 50 | rela_round_big.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.google_red))); 51 | } else { 52 | rela_round_big.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.gray))); 53 | } 54 | } 55 | 56 | AlphaAnimation alphaAnimation = new AlphaAnimation(1.0f, 0.0f); 57 | alphaAnimation.setDuration(1500); 58 | alphaAnimation.setStartOffset(1000); 59 | alphaAnimation.setAnimationListener(new Animation.AnimationListener() { 60 | @Override 61 | public void onAnimationStart(Animation animation) { 62 | 63 | } 64 | 65 | @Override 66 | public void onAnimationEnd(Animation animation) { 67 | tv_share_view_tip.setVisibility(View.GONE); 68 | } 69 | 70 | @Override 71 | public void onAnimationRepeat(Animation animation) { 72 | 73 | } 74 | }); 75 | tv_share_view_tip.startAnimation(alphaAnimation); 76 | 77 | ObjectAnimator downAnim = ObjectAnimator.ofFloat(card_share_view, "translationZ", 24); 78 | downAnim.setDuration(200); 79 | downAnim.setInterpolator(new AccelerateInterpolator()); 80 | downAnim.start(); 81 | card_share_view.setOnTouchListener(touchListener); 82 | } 83 | 84 | private View.OnTouchListener touchListener = new View.OnTouchListener() { 85 | @Override 86 | public boolean onTouch(View view, MotionEvent motionEvent) { 87 | switch (motionEvent.getAction()) { 88 | case MotionEvent.ACTION_DOWN: 89 | ObjectAnimator upAnim = ObjectAnimator.ofFloat(view, "translationZ", 0); 90 | upAnim.setDuration(200); 91 | upAnim.setInterpolator(new DecelerateInterpolator()); 92 | upAnim.start(); 93 | break; 94 | case MotionEvent.ACTION_UP: 95 | case MotionEvent.ACTION_CANCEL: 96 | ObjectAnimator downAnim = ObjectAnimator.ofFloat(view, "translationZ", 24); 97 | downAnim.setDuration(200); 98 | downAnim.setInterpolator(new AccelerateInterpolator()); 99 | downAnim.start(); 100 | break; 101 | } 102 | return false; 103 | } 104 | }; 105 | 106 | } 107 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/activity/StartActivity.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2.activity; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.os.CountDownTimer; 6 | 7 | import androidx.annotation.Nullable; 8 | 9 | import com.eajy.materialdesign2.R; 10 | 11 | /** 12 | * Created by zhangxiao on 2019/4/3 13 | */ 14 | public class StartActivity extends BaseActivity { 15 | 16 | @Override 17 | protected void onCreate(@Nullable Bundle savedInstanceState) { 18 | super.onCreate(savedInstanceState); 19 | setContentView(R.layout.activity_start); 20 | } 21 | 22 | @Override 23 | protected void onResume() { 24 | countDownTimer.cancel(); 25 | countDownTimer.start(); 26 | super.onResume(); 27 | } 28 | 29 | @Override 30 | protected void onStop() { 31 | countDownTimer.cancel(); 32 | super.onStop(); 33 | } 34 | 35 | CountDownTimer countDownTimer = new CountDownTimer(500, 500) { 36 | @Override 37 | public void onTick(long millisUntilFinished) { 38 | 39 | } 40 | 41 | @Override 42 | public void onFinish() { 43 | Intent intent = new Intent(StartActivity.this, MainActivity.class); 44 | startActivity(intent); 45 | overridePendingTransition(-1, R.anim.activity_exit_alpha); 46 | finish(); 47 | } 48 | }; 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/adapter/FragmentAdapter.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2.adapter; 2 | 3 | import java.util.List; 4 | 5 | import androidx.fragment.app.Fragment; 6 | import androidx.fragment.app.FragmentManager; 7 | import androidx.fragment.app.FragmentStatePagerAdapter; 8 | 9 | /** 10 | * Created by zhang on 2016.08.07. 11 | */ 12 | public class FragmentAdapter extends FragmentStatePagerAdapter { 13 | private List mFragments; 14 | private List mTitles; 15 | 16 | public FragmentAdapter(FragmentManager fm, List fragments, List titles) { 17 | super(fm); 18 | mFragments = fragments; 19 | mTitles = titles; 20 | } 21 | 22 | @Override 23 | public Fragment getItem(int position) { 24 | return mFragments.get(position); 25 | } 26 | 27 | @Override 28 | public int getCount() { 29 | return mFragments.size(); 30 | } 31 | 32 | @Override 33 | public CharSequence getPageTitle(int position) { 34 | return mTitles.get(position); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/adapter/MyAppsAdapter.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2.adapter; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | import android.net.Uri; 6 | import android.view.LayoutInflater; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | import android.widget.ImageView; 10 | import android.widget.TextView; 11 | 12 | import com.bumptech.glide.Glide; 13 | import com.eajy.materialdesign2.R; 14 | import com.eajy.materialdesign2.util.AppUtils; 15 | import com.eajy.materialdesign2.view.MyAppsModel; 16 | 17 | import java.util.List; 18 | 19 | import androidx.annotation.NonNull; 20 | import androidx.recyclerview.widget.RecyclerView; 21 | 22 | public class MyAppsAdapter extends RecyclerView.Adapter { 23 | 24 | private Context context; 25 | private List items; 26 | 27 | public MyAppsAdapter(Context context, List items) { 28 | this.context = context; 29 | this.items = items; 30 | } 31 | 32 | @NonNull 33 | @Override 34 | public MyAppsHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { 35 | View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_my_apps, parent, false); 36 | return new MyAppsHolder(view); 37 | } 38 | 39 | @Override 40 | public void onBindViewHolder(@NonNull final MyAppsHolder holder, final int position) { 41 | holder.setIsRecyclable(false); 42 | 43 | final MyAppsModel model = items.get(holder.getAdapterPosition()); 44 | int resId = context.getResources().getIdentifier(model.getImageUrl(), "drawable", context.getPackageName()); 45 | Glide.with(context).load(resId).into(holder.image_app); 46 | holder.tv_app_name.setText(model.getName()); 47 | holder.tv_app_description.setText(model.getDescription()); 48 | 49 | holder.itemView.setOnClickListener(v -> { 50 | Intent intent = new Intent(); 51 | if (AppUtils.checkAppInstalled(context, model.getPackageName())) { 52 | intent = context.getPackageManager().getLaunchIntentForPackage(model.getPackageName()); 53 | if (intent != null) { 54 | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED | Intent.FLAG_ACTIVITY_CLEAR_TOP); 55 | } 56 | context.startActivity(intent); 57 | } else { 58 | intent.setData(Uri.parse(model.getGooglePlayUrl())); 59 | intent.setAction(Intent.ACTION_VIEW); 60 | context.startActivity(intent); 61 | } 62 | }); 63 | } 64 | 65 | @Override 66 | public int getItemCount() { 67 | return items.size(); 68 | } 69 | 70 | 71 | class MyAppsHolder extends RecyclerView.ViewHolder { 72 | 73 | private View mView; 74 | private ImageView image_app; 75 | private TextView tv_app_name, tv_app_description; 76 | 77 | private MyAppsHolder(View itemView) { 78 | super(itemView); 79 | mView = itemView; 80 | image_app = itemView.findViewById(R.id.image_app); 81 | tv_app_name = itemView.findViewById(R.id.tv_app_name); 82 | tv_app_description = itemView.findViewById(R.id.tv_app_description); 83 | } 84 | } 85 | 86 | } 87 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/adapter/ViewPagerAdapter.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2.adapter; 2 | 3 | import android.view.View; 4 | import android.view.ViewGroup; 5 | 6 | import java.util.List; 7 | 8 | import androidx.annotation.NonNull; 9 | import androidx.viewpager.widget.PagerAdapter; 10 | 11 | public class ViewPagerAdapter extends PagerAdapter { 12 | 13 | private List viewList; 14 | 15 | public ViewPagerAdapter(List viewList) { 16 | this.viewList = viewList; 17 | } 18 | 19 | @Override 20 | public int getCount() { 21 | return viewList.size(); 22 | } 23 | 24 | @Override 25 | public boolean isViewFromObject(@NonNull View view, @NonNull Object object) { 26 | return view == object; 27 | } 28 | 29 | @Override 30 | public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) { 31 | container.removeView(viewList.get(position)); 32 | } 33 | 34 | @NonNull 35 | @Override 36 | public Object instantiateItem(@NonNull ViewGroup container, int position) { 37 | container.addView(viewList.get(position)); 38 | return viewList.get(position); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/fragment/SettingsFragment.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2.fragment; 2 | 3 | import android.content.SharedPreferences; 4 | import android.os.Bundle; 5 | 6 | import com.eajy.materialdesign2.App; 7 | import com.eajy.materialdesign2.R; 8 | import com.google.android.material.snackbar.Snackbar; 9 | 10 | import androidx.preference.ListPreference; 11 | import androidx.preference.Preference; 12 | import androidx.preference.PreferenceFragmentCompat; 13 | import androidx.preference.PreferenceManager; 14 | 15 | public class SettingsFragment extends PreferenceFragmentCompat implements Preference.OnPreferenceChangeListener { 16 | 17 | @Override 18 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { 19 | addPreferencesFromResource(R.xml.preferences_settings); 20 | } 21 | 22 | @Override 23 | public void onCreate(Bundle savedInstanceState) { 24 | super.onCreate(savedInstanceState); 25 | 26 | findPreference("pref_text").setOnPreferenceChangeListener(this); 27 | findPreference("pref_list").setOnPreferenceChangeListener(this); 28 | 29 | SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(App.getContext()); 30 | onPreferenceChange(findPreference("pref_text"), preferences.getString("pref_text", "")); 31 | onPreferenceChange(findPreference("pref_list"), preferences.getString("pref_list", "")); 32 | } 33 | 34 | @Override 35 | public boolean onPreferenceTreeClick(Preference preference) { 36 | if (preference.getKey() != null) { 37 | switch (preference.getKey()) { 38 | case "pref_click": 39 | Snackbar.make(getListView(), getString(R.string.pref_on_preference_click), Snackbar.LENGTH_SHORT).show(); 40 | break; 41 | } 42 | return true; 43 | } 44 | return super.onPreferenceTreeClick(preference); 45 | } 46 | 47 | @Override 48 | public boolean onPreferenceChange(Preference preference, Object newValue) { 49 | String stringValue = newValue.toString(); 50 | if (preference instanceof ListPreference) { 51 | ListPreference listPreference = (ListPreference) preference; 52 | int index = listPreference.findIndexOfValue(stringValue); 53 | preference.setSummary(index >= 0 ? listPreference.getEntries()[index] : null); 54 | } else { 55 | preference.setSummary(stringValue); 56 | } 57 | return true; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/fragment/WidgetsFragment.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2.fragment; 2 | 3 | import android.content.SharedPreferences; 4 | import android.os.Bundle; 5 | import android.view.LayoutInflater; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | import android.view.animation.AlphaAnimation; 9 | import android.view.animation.Animation; 10 | 11 | import com.eajy.materialdesign2.R; 12 | import com.google.android.gms.ads.AdRequest; 13 | import com.google.android.gms.ads.AdView; 14 | 15 | import androidx.annotation.Nullable; 16 | import androidx.cardview.widget.CardView; 17 | import androidx.core.widget.NestedScrollView; 18 | import androidx.fragment.app.Fragment; 19 | 20 | import static android.content.Context.MODE_PRIVATE; 21 | 22 | /** 23 | * Created by zhang on 2016.08.07. 24 | */ 25 | public class WidgetsFragment extends Fragment { 26 | 27 | private AdView ad_view_widget; 28 | private CardView card_ad_widget; 29 | 30 | @Nullable 31 | @Override 32 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 33 | NestedScrollView nestedScrollView = (NestedScrollView) inflater.inflate(R.layout.fragment_widgets, container, false); 34 | ad_view_widget = nestedScrollView.findViewById(R.id.ad_view_widget); 35 | card_ad_widget = nestedScrollView.findViewById(R.id.card_ad_widget); 36 | return nestedScrollView; 37 | } 38 | 39 | @Override 40 | public void onActivityCreated(@Nullable Bundle savedInstanceState) { 41 | super.onActivityCreated(savedInstanceState); 42 | showAd(); 43 | } 44 | 45 | private void showAd() { 46 | try { 47 | SharedPreferences sharedPreferences = getContext().getSharedPreferences("app", MODE_PRIVATE); 48 | if (!sharedPreferences.getBoolean("isDonated", false)) { 49 | AdRequest adRequest = new AdRequest.Builder().build(); 50 | ad_view_widget.loadAd(adRequest); 51 | 52 | Animation animation = new AlphaAnimation(0.0f, 1.0f); 53 | animation.setDuration(500); 54 | card_ad_widget.setVisibility(View.VISIBLE); 55 | card_ad_widget.startAnimation(animation); 56 | } 57 | } catch (Exception e) { 58 | e.printStackTrace(); 59 | } 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/util/AppUtils.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2.util; 2 | 3 | import android.content.Context; 4 | import android.content.pm.ApplicationInfo; 5 | import android.content.pm.PackageInfo; 6 | import android.content.pm.PackageManager; 7 | import android.os.Build; 8 | import android.util.DisplayMetrics; 9 | 10 | /** 11 | * Created by zhang on 2017.11.22. 12 | */ 13 | 14 | public class AppUtils { 15 | 16 | public static boolean checkAppInstalled(Context context, String packageName) { 17 | try { 18 | context.getPackageManager().getPackageInfo(packageName, PackageManager.GET_ACTIVITIES); 19 | return true; 20 | } catch (PackageManager.NameNotFoundException e) { 21 | return false; 22 | } 23 | } 24 | 25 | public static String getVersionName(Context context) { 26 | try { 27 | PackageManager manager = context.getPackageManager(); 28 | PackageInfo info = manager.getPackageInfo(context.getPackageName(), 0); 29 | String version = info.versionName; 30 | return "V: " + version; 31 | } catch (Exception e) { 32 | e.printStackTrace(); 33 | return ""; 34 | } 35 | } 36 | 37 | public static int getScreenWidthDp(Context context) { 38 | DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics(); 39 | return (int) (displayMetrics.widthPixels / displayMetrics.density); 40 | } 41 | 42 | public static boolean isGame(Context context) { 43 | try { 44 | PackageManager pm = context.getPackageManager(); 45 | ApplicationInfo applicationInfo = pm.getApplicationInfo(context.getPackageName(), 0); 46 | if ((applicationInfo.flags & ApplicationInfo.FLAG_IS_GAME) == ApplicationInfo.FLAG_IS_GAME) { 47 | return true; 48 | } 49 | if (Build.VERSION.SDK_INT >= 26 && applicationInfo.category == ApplicationInfo.CATEGORY_GAME) { 50 | return true; 51 | } 52 | return false; 53 | } catch (Exception e) { 54 | e.printStackTrace(); 55 | return false; 56 | } 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/view/ItemTouchHelperCallback.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2.view; 2 | 3 | import androidx.recyclerview.widget.GridLayoutManager; 4 | import androidx.recyclerview.widget.ItemTouchHelper; 5 | import androidx.recyclerview.widget.RecyclerView; 6 | 7 | /** 8 | * Created by zhang on 2016.08.21. 9 | */ 10 | public class ItemTouchHelperCallback extends ItemTouchHelper.Callback { 11 | 12 | private final int TYPE_NORMAL = 1; 13 | 14 | private onMoveAndSwipedListener moveAndSwipedListener; 15 | 16 | public ItemTouchHelperCallback(onMoveAndSwipedListener listener) { 17 | this.moveAndSwipedListener = listener; 18 | } 19 | 20 | @Override 21 | public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) { 22 | if (recyclerView.getLayoutManager() instanceof GridLayoutManager) { 23 | // for recyclerView with gridLayoutManager, support drag all directions, not support swipe 24 | int dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN | ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT; 25 | int swipeFlags = 0; 26 | return makeMovementFlags(dragFlags, swipeFlags); 27 | 28 | } else { 29 | // for recyclerView with linearLayoutManager, support drag up and down, and swipe lift and right 30 | if (viewHolder.getItemViewType() == TYPE_NORMAL) { 31 | int dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN; 32 | int swipeFlags = ItemTouchHelper.START | ItemTouchHelper.END; 33 | return makeMovementFlags(dragFlags, swipeFlags); 34 | } else { 35 | return 0; 36 | } 37 | } 38 | } 39 | 40 | @Override 41 | public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) { 42 | // If the 2 items are not the same type, no dragging 43 | if (viewHolder.getItemViewType() != target.getItemViewType()) { 44 | return false; 45 | } 46 | moveAndSwipedListener.onItemMove(viewHolder.getAdapterPosition(), target.getAdapterPosition()); 47 | return true; 48 | } 49 | 50 | @Override 51 | public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) { 52 | moveAndSwipedListener.onItemDismiss(viewHolder.getAdapterPosition()); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/view/MyAppsModel.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2.view; 2 | 3 | import java.io.Serializable; 4 | 5 | public class MyAppsModel implements Serializable { 6 | 7 | private static final long serialVersionUID = 1L; 8 | 9 | private String name; 10 | private String description; 11 | private String imageUrl; 12 | private String packageName; 13 | private String googlePlayUrl; 14 | 15 | public String getName() { 16 | return name; 17 | } 18 | 19 | public void setName(String name) { 20 | this.name = name; 21 | } 22 | 23 | public String getDescription() { 24 | return description; 25 | } 26 | 27 | public void setDescription(String description) { 28 | this.description = description; 29 | } 30 | 31 | public String getImageUrl() { 32 | return imageUrl; 33 | } 34 | 35 | public void setImageUrl(String imageUrl) { 36 | this.imageUrl = imageUrl; 37 | } 38 | 39 | public String getPackageName() { 40 | return packageName; 41 | } 42 | 43 | public void setPackageName(String packageName) { 44 | this.packageName = packageName; 45 | } 46 | 47 | public String getGooglePlayUrl() { 48 | return googlePlayUrl; 49 | } 50 | 51 | public void setGooglePlayUrl(String googlePlayUrl) { 52 | this.googlePlayUrl = googlePlayUrl; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/com/eajy/materialdesign2/view/onMoveAndSwipedListener.java: -------------------------------------------------------------------------------- 1 | package com.eajy.materialdesign2.view; 2 | 3 | /** 4 | * Created by zhang on 2016.08.21. 5 | */ 6 | public interface onMoveAndSwipedListener { 7 | 8 | boolean onItemMove(int fromPosition, int toPosition); 9 | 10 | void onItemDismiss(int position); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/res/anim/activity_exit_alpha.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_about_card_show.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_recycler_item_show.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/flutter_demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Eajy/MaterialDesign2/5de957102b0788d81cff4766f61ac2362e07ae66/app/src/main/res/drawable-nodpi/flutter_demo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/game_2048.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Eajy/MaterialDesign2/5de957102b0788d81cff4766f61ac2362e07ae66/app/src/main/res/drawable-nodpi/game_2048.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/material_design_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Eajy/MaterialDesign2/5de957102b0788d81cff4766f61ac2362e07ae66/app/src/main/res/drawable-nodpi/material_design_2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/material_design_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Eajy/MaterialDesign2/5de957102b0788d81cff4766f61ac2362e07ae66/app/src/main/res/drawable-nodpi/material_design_color.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/material_design_demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Eajy/MaterialDesign2/5de957102b0788d81cff4766f61ac2362e07ae66/app/src/main/res/drawable-nodpi/material_design_demo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/tasks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Eajy/MaterialDesign2/5de957102b0788d81cff4766f61ac2362e07ae66/app/src/main/res/drawable-nodpi/tasks.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/x_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Eajy/MaterialDesign2/5de957102b0788d81cff4766f61ac2362e07ae66/app/src/main/res/drawable-nodpi/x_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-w820dp/round_big.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Eajy/MaterialDesign2/5de957102b0788d81cff4766f61ac2362e07ae66/app/src/main/res/drawable-xxhdpi/ic_github.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_start.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bottom_dialog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Eajy/MaterialDesign2/5de957102b0788d81cff4766f61ac2362e07ae66/app/src/main/res/drawable/bottom_dialog.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/google_assistant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Eajy/MaterialDesign2/5de957102b0788d81cff4766f61ac2362e07ae66/app/src/main/res/drawable/google_assistant.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_apps_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_attach_money_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_bookmark_border_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_close_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_copyright_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_dashboard_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_email_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_favorite_border_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_file_download_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_format_list_bulleted_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_fullscreen_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_inbox_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_info_outline_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Eajy/MaterialDesign2/5de957102b0788d81cff4766f61ac2362e07ae66/app/src/main/res/drawable/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_monetization_on_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_more_horiz_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_movie_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_music_note_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_photo_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_photo_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_settings_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_share_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_shop_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_web_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/material_design_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Eajy/MaterialDesign2/5de957102b0788d81cff4766f61ac2362e07ae66/app/src/main/res/drawable/material_design_1.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/material_design_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Eajy/MaterialDesign2/5de957102b0788d81cff4766f61ac2362e07ae66/app/src/main/res/drawable/material_design_11.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/material_design_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Eajy/MaterialDesign2/5de957102b0788d81cff4766f61ac2362e07ae66/app/src/main/res/drawable/material_design_3.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/material_design_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Eajy/MaterialDesign2/5de957102b0788d81cff4766f61ac2362e07ae66/app/src/main/res/drawable/material_design_4.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/material_design_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Eajy/MaterialDesign2/5de957102b0788d81cff4766f61ac2362e07ae66/app/src/main/res/drawable/material_design_5.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/round.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/round_big.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 3 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/layout-w600dp/content_scrolling.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 15 | 16 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_about.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 16 | 17 | 23 | 24 | 29 | 30 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 49 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_bottom_app_bar.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 22 | 23 | 34 | 35 | 42 | 43 | 50 | 51 | 58 | 59 | 66 | 67 | 68 | 72 | 73 | 74 | 82 | 83 | 95 | 96 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_bottom_navigation.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 17 | 18 | 26 | 27 | 28 | 29 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_donate.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 18 | 19 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 15 | 16 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_my_apps.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 21 | 22 | 28 | 29 | 30 | 31 | 32 | 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_recycler_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 19 | 20 | 21 | 22 | 27 | 28 | 34 | 35 | 36 | 37 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_scrolling.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 22 | 23 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_share_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 18 | 19 | 20 | 32 | 33 | 41 | 42 | 43 | 51 | 52 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_start.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/layout/ad_banner_donate.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 16 | 17 | 26 | 27 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/layout/ad_banner_main_card.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 17 | 18 | 27 | 28 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/ad_banner_main_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 17 | 18 | 27 | 28 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/ad_banner_main_widget.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 17 | 18 | 27 | 28 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/ad_native_main_card.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | 15 | 16 | 22 | 23 | 29 | 30 | 31 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /app/src/main/res/layout/app_bar_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 20 | 21 | 26 | 27 | 28 | 29 | 34 | 35 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/layout/card_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 16 | 17 | 24 | 25 | 35 | 36 | 47 | 48 | 56 | 57 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /app/src/main/res/layout/card_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 16 | 17 | 24 | 25 | 34 | 35 | 42 | 43 | 52 | 53 | 62 | 63 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /app/src/main/res/layout/card_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 19 | 20 | 27 | 28 | 42 | 43 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /app/src/main/res/layout/card_about_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 24 | 25 | 32 | 33 | 40 | 41 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /app/src/main/res/layout/card_about_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 15 | 16 | 24 | 25 | 30 | 31 | 45 | 46 | 60 | 61 | 75 | 76 | 90 | 91 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /app/src/main/res/layout/content_donate.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 18 | 19 | 27 | 28 | 36 | 37 | 47 | 48 |