├── .gitignore
├── .idea
├── caches
│ ├── build_file_checksums.ser
│ └── gradle_models.ser
├── codeStyles
│ └── Project.xml
├── gradle.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
└── vcs.xml
├── README.md
├── app
├── .gitignore
├── build.gradle
├── libs
│ └── freemarker.jar
├── proguard-rules.pro
├── release
│ ├── app-release.apk
│ └── output.json
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── assets
│ └── templet_AS2Aide
│ │ ├── BasicActivity
│ │ ├── app
│ │ │ ├── proguard-rules.pro
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ └── res
│ │ │ │ ├── menu
│ │ │ │ └── menu_main.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values-v21
│ │ │ │ └── styles.xml
│ │ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ └── styles.xml
│ │ └── app_
│ │ │ ├── AndroidManifest.ftl
│ │ │ ├── MainActivity.ftl
│ │ │ ├── activity_main.ftl
│ │ │ ├── build.gradle.ftl
│ │ │ ├── content_main.ftl
│ │ │ └── strings.ftl
│ │ ├── EmptyActivity
│ │ ├── app
│ │ │ ├── proguard-rules.pro
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ └── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ └── styles.xml
│ │ └── app_
│ │ │ ├── AndroidManifest.ftl
│ │ │ ├── MainActivity.ftl
│ │ │ ├── activity_main.ftl
│ │ │ ├── build.gradle.ftl
│ │ │ └── strings.ftl
│ │ ├── FullscreenActivity
│ │ ├── app
│ │ │ ├── proguard-rules.pro
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ └── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ └── values
│ │ │ │ ├── attrs.xml
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ └── app_
│ │ │ ├── AndroidManifest.ftl
│ │ │ ├── FullscreenActivity.ftl
│ │ │ ├── activity_fullscreen.ftl
│ │ │ ├── build.gradle.ftl
│ │ │ └── strings.ftl
│ │ ├── LoginActivity
│ │ ├── app
│ │ │ ├── proguard-rules.pro
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ └── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ └── styles.xml
│ │ └── app_
│ │ │ ├── AndroidManifest.ftl
│ │ │ ├── LoginActivity.ftl
│ │ │ ├── activity_login.ftl
│ │ │ ├── build.gradle.ftl
│ │ │ └── strings.ftl
│ │ ├── NavigationDrawerActivity
│ │ ├── app
│ │ │ ├── proguard-rules.pro
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ └── res
│ │ │ │ ├── drawable-v21
│ │ │ │ ├── ic_menu_camera.xml
│ │ │ │ ├── ic_menu_gallery.xml
│ │ │ │ ├── ic_menu_manage.xml
│ │ │ │ ├── ic_menu_send.xml
│ │ │ │ ├── ic_menu_share.xml
│ │ │ │ └── ic_menu_slideshow.xml
│ │ │ │ ├── drawable
│ │ │ │ └── side_nav_bar.xml
│ │ │ │ ├── layout
│ │ │ │ ├── app_bar_main.xml
│ │ │ │ ├── content_main.xml
│ │ │ │ └── nav_header_main.xml
│ │ │ │ ├── menu
│ │ │ │ ├── activity_main_drawer.xml
│ │ │ │ └── main.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values-v21
│ │ │ │ └── styles.xml
│ │ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── drawables.xml
│ │ │ │ └── styles.xml
│ │ └── app_
│ │ │ ├── AndroidManifest.ftl
│ │ │ ├── MainActivity.ftl
│ │ │ ├── activity_main.ftl
│ │ │ ├── build.gradle.ftl
│ │ │ └── strings.ftl
│ │ ├── ScrollActivity
│ │ ├── app
│ │ │ ├── proguard-rules.pro
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ └── res
│ │ │ │ ├── layout
│ │ │ │ └── content_scrolling.xml
│ │ │ │ ├── menu
│ │ │ │ └── menu_scrolling.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values-v21
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ └── styles.xml
│ │ └── app_
│ │ │ ├── AndroidManifest.ftl
│ │ │ ├── ScrollingActivity.ftl
│ │ │ ├── activity_scrolling.ftl
│ │ │ ├── build.gradle.ftl
│ │ │ └── strings.ftl
│ │ ├── SettingsActivity
│ │ ├── app
│ │ │ ├── proguard-rules.pro
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ └── res
│ │ │ │ ├── drawable
│ │ │ │ ├── ic_info_black_24dp.xml
│ │ │ │ ├── ic_notifications_black_24dp.xml
│ │ │ │ └── ic_sync_black_24dp.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ │ │ └── xml
│ │ │ │ ├── pref_data_sync.xml
│ │ │ │ ├── pref_general.xml
│ │ │ │ └── pref_notification.xml
│ │ └── app_
│ │ │ ├── AndroidManifest.ftl
│ │ │ ├── AppCompatPreferenceActivity.ftl
│ │ │ ├── SettingsActivity.ftl
│ │ │ ├── build.gradle.ftl
│ │ │ ├── pref_headers.ftl
│ │ │ └── strings.ftl
│ │ └── TabbedActivity
│ │ ├── app
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ └── main
│ │ │ └── res
│ │ │ ├── layout
│ │ │ └── fragment_main.xml
│ │ │ ├── menu
│ │ │ └── menu_main.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-v21
│ │ │ └── styles.xml
│ │ │ ├── values-w820dp
│ │ │ └── dimens.xml
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ └── styles.xml
│ │ └── app_
│ │ ├── AndroidManifest.ftl
│ │ ├── MainActivity.ftl
│ │ ├── activity_main.ftl
│ │ ├── build.gradle.ftl
│ │ └── strings.ftl
│ ├── java
│ ├── aide
│ │ └── xd
│ │ │ └── com
│ │ │ └── buildaide
│ │ │ ├── AboutActivity.java
│ │ │ ├── MainActivity.java
│ │ │ ├── MarketUtils.java
│ │ │ ├── PackageName.java
│ │ │ ├── Utils.java
│ │ │ ├── adapter
│ │ │ └── HorizontalPagerAdapter.java
│ │ │ └── fragment
│ │ │ ├── FragmentHead.java
│ │ │ ├── FragmentOne.java
│ │ │ ├── FragmentThree.java
│ │ │ └── FragmentTwo.java
│ ├── base
│ │ └── Tools.java
│ └── pub
│ │ └── devrel
│ │ └── easypermissions
│ │ ├── AfterPermissionGranted.java
│ │ ├── AppSettingsDialog.java
│ │ ├── AppSettingsDialogHolderActivity.java
│ │ ├── EasyPermissions.java
│ │ ├── PermissionRequest.java
│ │ ├── RationaleDialogClickListener.java
│ │ ├── RationaleDialogConfig.java
│ │ ├── RationaleDialogFragment.java
│ │ ├── RationaleDialogFragmentCompat.java
│ │ └── helper
│ │ ├── ActivityPermissionHelper.java
│ │ ├── AppCompatActivityPermissionsHelper.java
│ │ ├── BaseSupportPermissionsHelper.java
│ │ ├── LowApiPermissionsHelper.java
│ │ ├── PermissionHelper.java
│ │ └── SupportFragmentPermissionHelper.java
│ └── res
│ ├── anim
│ ├── cycle.xml
│ ├── myanim.xml
│ ├── push_left_in_no_alpha.xml
│ ├── push_left_out_no_alpha.xml
│ ├── push_right_in_no_alpha.xml
│ └── push_right_out_no_alpha.xml
│ ├── drawable
│ ├── about_auther.png
│ ├── about_changelog.png
│ ├── about_license.png
│ ├── about_tieba.png
│ ├── basic_activity.png
│ ├── blank_activity.png
│ ├── blank_activity_drawer.png
│ ├── blank_activity_tabs.png
│ ├── fullscreen_activity.png
│ ├── ic_file_download_black_24dp.xml
│ ├── ic_looks_5_black_24dp.xml
│ ├── login_activity.png
│ ├── scroll_activity.png
│ ├── settings_activity.png
│ ├── shape.xml
│ └── shape_button.xml
│ ├── layout
│ ├── activity_main.xml
│ ├── fragment_main_head.xml
│ ├── fragment_one.xml
│ ├── fragment_three.xml
│ ├── fragment_two.xml
│ └── item.xml
│ ├── menu
│ └── menu.xml
│ ├── mipmap-hdpi
│ └── ic_launcher.png
│ ├── mipmap-mdpi
│ └── ic_launcher.png
│ ├── mipmap-xhdpi
│ └── ic_launcher.png
│ ├── mipmap-xxhdpi
│ └── ic_launcher.png
│ ├── mipmap-xxxhdpi
│ └── ic_launcher.png
│ ├── values
│ ├── colors.xml
│ ├── strings.xml
│ └── styles.xml
│ └── xml
│ └── provider_paths.xml
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── library
├── .gitignore
├── build.gradle
├── gradle.properties
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── danielstone
│ │ └── materialaboutlibrary
│ │ ├── ConvenienceBuilder.java
│ │ ├── MaterialAboutActivity.java
│ │ ├── adapters
│ │ ├── MaterialAboutItemAdapter.java
│ │ └── MaterialAboutListAdapter.java
│ │ ├── holders
│ │ └── MaterialAboutItemViewHolder.java
│ │ ├── items
│ │ ├── MaterialAboutActionItem.java
│ │ ├── MaterialAboutItem.java
│ │ ├── MaterialAboutItemOnClickAction.java
│ │ └── MaterialAboutTitleItem.java
│ │ ├── model
│ │ ├── MaterialAboutCard.java
│ │ └── MaterialAboutList.java
│ │ └── util
│ │ ├── DefaultViewTypeManager.java
│ │ ├── OpenSourceLicense.java
│ │ └── ViewTypeManager.java
│ └── res
│ ├── layout
│ ├── mal_material_about_action_item.xml
│ ├── mal_material_about_activity.xml
│ ├── mal_material_about_fragment.xml
│ ├── mal_material_about_list_card.xml
│ └── mal_material_about_title_item.xml
│ ├── values-cs
│ └── strings.xml
│ ├── values-de
│ └── strings.xml
│ ├── values-es
│ └── strings.xml
│ ├── values-uk
│ └── strings.xml
│ └── values
│ ├── attrs.xml
│ ├── colors.xml
│ ├── dimens.xml
│ ├── strings.xml
│ └── styles.xml
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 |
--------------------------------------------------------------------------------
/.idea/caches/build_file_checksums.ser:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/.idea/caches/build_file_checksums.ser
--------------------------------------------------------------------------------
/.idea/caches/gradle_models.ser:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/.idea/caches/gradle_models.ser
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # AS2Aide
2 |
3 | ### Aide辅助工具AS2Aide
4 |
5 | 还在用Aide自带的模板开发吗。
6 |
7 | 还没见识过官方v7库的各类炫酷控件吗。
8 |
9 | 还在为修改新建的模板中的包名类名而发愁吗。
10 |
11 | 本软件可以帮你从这些烦恼中解脱出来。
12 |
13 | 使用它可以自动生成工程模板。 包名、项目名称完全由你说了算。
14 |
15 | 采用AS模板引擎Freemarker,快速生成。
16 |
17 | 完全遵循Matrial Design风格设计开发。 无任何暗扣和广告。
18 |
19 | 完全纯净免费便捷的Aide辅助工具
20 |
21 | 注:
22 |
23 | 模板文件是基于Android Studio内置的8个模板稍加修改为适合Aide的模板。
24 |
25 | 用户的Aide需配置好官方的v7库,否则有些工程会报错,配置好v7库的用户可以尽情享受本软件带来的开发便利!
26 |
27 | 软件首次打开,会占用一定时间配置模板库,请稍等~"
28 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'android-aspectjx'
3 |
4 | android {
5 | signingConfigs {
6 | config {
7 | keyAlias 'yjm'
8 | keyPassword '512245'
9 | storeFile file('F:/yjm.jks')
10 | storePassword '512245'
11 | }
12 | }
13 | compileSdkVersion COMPILE_SDK_VERSION as int
14 | defaultConfig {
15 | applicationId "aide.xd.com.buildaide"
16 | minSdkVersion MIN_SDK_VERSION as int
17 | targetSdkVersion TARGET_SDK_VERSION as int
18 | versionCode VERSION_CODE as int
19 | versionName VERSION_NAME
20 | }
21 | lintOptions {
22 | checkReleaseBuilds false
23 | abortOnError false
24 | }
25 |
26 | }
27 | dependencies {
28 | api fileTree(include: ['*.jar'], dir: 'libs')
29 | implementation project(':library')
30 | // noinspection GradleCompatible
31 | api "com.android.support:appcompat-v7:${SUPPORT_LIB_VERSION}"
32 | api "com.android.support:cardview-v7:${SUPPORT_LIB_VERSION}"
33 | api "com.android.support:design:${SUPPORT_LIB_VERSION}"
34 | api "com.android.support:support-v4:${SUPPORT_LIB_VERSION}"
35 | api 'com.android.support.constraint:constraint-layout:1.1.3'
36 | // infinitecycleviewpager
37 | api 'com.github.devlight:infinitecycleviewpager:1.0.2'
38 | // FilePickerLibrary
39 | api 'com.github.DeveloperPaul123:FilePickerLibrary:3.5.1'
40 | // bugly
41 | api 'com.tencent.bugly:crashreport_upgrade:1.3.7'
42 | // fragment-rigger
43 | api 'com.justkiddingbaby:fragment-rigger:1.4.3'
44 | // api 'com.gitee.SanYan:Crash:1.0'
45 | }
46 |
--------------------------------------------------------------------------------
/app/libs/freemarker.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/libs/freemarker.jar
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\adt-bundle-windows-x86_64-20140321\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/release/app-release.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/release/app-release.apk
--------------------------------------------------------------------------------
/app/release/output.json:
--------------------------------------------------------------------------------
1 | [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":19,"versionName":"1.8","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
19 |
22 |
23 |
24 |
25 |
26 |
27 |
29 |
32 |
37 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/BasicActivity/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\yjm\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/BasicActivity/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/BasicActivity/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/BasicActivity/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/BasicActivity/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/BasicActivity/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/BasicActivity/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/BasicActivity/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/BasicActivity/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/BasicActivity/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/BasicActivity/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/BasicActivity/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/BasicActivity/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/BasicActivity/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/BasicActivity/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/BasicActivity/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 16dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/BasicActivity/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/BasicActivity/app_/AndroidManifest.ftl:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/BasicActivity/app_/MainActivity.ftl:
--------------------------------------------------------------------------------
1 | package ${packagefullname};
2 |
3 | import android.os.Bundle;
4 | import android.support.design.widget.FloatingActionButton;
5 | import android.support.design.widget.Snackbar;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.support.v7.widget.Toolbar;
8 | import android.view.View;
9 | import android.view.Menu;
10 | import android.view.MenuItem;
11 |
12 | public class ${activityname} extends AppCompatActivity {
13 |
14 | @Override
15 | protected void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | setContentView(R.layout.${layoutname});
18 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
19 | setSupportActionBar(toolbar);
20 |
21 | FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
22 | fab.setOnClickListener(new View.OnClickListener() {
23 | @Override
24 | public void onClick(View view) {
25 | Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
26 | .setAction("Action", null).show();
27 | }
28 | });
29 | }
30 |
31 | @Override
32 | public boolean onCreateOptionsMenu(Menu menu) {
33 | // Inflate the menu; this adds items to the action bar if it is present.
34 | getMenuInflater().inflate(R.menu.menu_main, menu);
35 | return true;
36 | }
37 |
38 | @Override
39 | public boolean onOptionsItemSelected(MenuItem item) {
40 | // Handle action bar item clicks here. The action bar will
41 | // automatically handle clicks on the Home/Up button, so long
42 | // as you specify a parent activity in AndroidManifest.xml.
43 | int id = item.getItemId();
44 |
45 | //noinspection SimplifiableIfStatement
46 | if (id == R.id.action_settings) {
47 | return true;
48 | }
49 |
50 | return super.onOptionsItemSelected(item);
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/BasicActivity/app_/activity_main.ftl:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
20 |
21 |
22 |
23 |
24 |
25 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/BasicActivity/app_/build.gradle.ftl:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 24
5 | buildToolsVersion "24.0.2"
6 | defaultConfig {
7 | applicationId "${packagefullname}"
8 | minSdkVersion 16
9 | targetSdkVersion 24
10 | versionCode 1
11 | versionName "1.0"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | compile fileTree(dir: 'libs', include: ['*.jar'])
23 | compile 'com.android.support:appcompat-v7:+'
24 | compile 'com.android.support:design:+'
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/BasicActivity/app_/content_main.ftl:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/BasicActivity/app_/strings.ftl:
--------------------------------------------------------------------------------
1 |
2 | ${app_name}
3 | Settings
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/EmptyActivity/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\yjm\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/EmptyActivity/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/EmptyActivity/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/EmptyActivity/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/EmptyActivity/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/EmptyActivity/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/EmptyActivity/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/EmptyActivity/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/EmptyActivity/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/EmptyActivity/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/EmptyActivity/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/EmptyActivity/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/EmptyActivity/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/EmptyActivity/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/EmptyActivity/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/EmptyActivity/app_/AndroidManifest.ftl:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/EmptyActivity/app_/MainActivity.ftl:
--------------------------------------------------------------------------------
1 | package ${packagefullname};
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 |
6 | public class ${activityname} extends AppCompatActivity {
7 |
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.${layoutname});
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/EmptyActivity/app_/activity_main.ftl:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/EmptyActivity/app_/build.gradle.ftl:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 24
5 | buildToolsVersion "24.0.2"
6 | defaultConfig {
7 | applicationId "${packagefullname}"
8 | minSdkVersion 16
9 | targetSdkVersion 24
10 | versionCode 1
11 | versionName "1.0"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | compile fileTree(dir: 'libs', include: ['*.jar'])
23 | compile 'com.android.support:appcompat-v7:+'
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/EmptyActivity/app_/strings.ftl:
--------------------------------------------------------------------------------
1 |
2 | ${app_name}
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/FullscreenActivity/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\yjm\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/FullscreenActivity/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/FullscreenActivity/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/FullscreenActivity/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/FullscreenActivity/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/FullscreenActivity/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/FullscreenActivity/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/FullscreenActivity/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/FullscreenActivity/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/FullscreenActivity/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/FullscreenActivity/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/FullscreenActivity/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/FullscreenActivity/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 | #66000000
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/FullscreenActivity/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
18 |
19 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/FullscreenActivity/app_/AndroidManifest.ftl:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/FullscreenActivity/app_/activity_fullscreen.ftl:
--------------------------------------------------------------------------------
1 |
6 |
7 |
10 |
19 |
20 |
22 |
25 |
26 |
34 |
35 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/FullscreenActivity/app_/build.gradle.ftl:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 24
5 | buildToolsVersion "24.0.2"
6 | defaultConfig {
7 | applicationId "${packagefullname}"
8 | minSdkVersion 16
9 | targetSdkVersion 24
10 | versionCode 1
11 | versionName "1.0"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | compile fileTree(dir: 'libs', include: ['*.jar'])
23 | compile 'com.android.support:appcompat-v7:+'
24 | compile 'com.android.support:support-v4:+'
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/FullscreenActivity/app_/strings.ftl:
--------------------------------------------------------------------------------
1 |
2 | ${app_name}
3 |
4 | Dummy Button
5 | DUMMY\nCONTENT
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/LoginActivity/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\yjm\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/LoginActivity/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/LoginActivity/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/LoginActivity/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/LoginActivity/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/LoginActivity/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/LoginActivity/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/LoginActivity/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/LoginActivity/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/LoginActivity/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/LoginActivity/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/LoginActivity/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/LoginActivity/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/LoginActivity/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/LoginActivity/app_/AndroidManifest.ftl:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/LoginActivity/app_/activity_login.ftl:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
20 |
21 |
25 |
26 |
31 |
32 |
35 |
36 |
44 |
45 |
46 |
47 |
50 |
51 |
62 |
63 |
64 |
65 |
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/LoginActivity/app_/build.gradle.ftl:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 24
5 | buildToolsVersion "24.0.2"
6 | defaultConfig {
7 | applicationId "${packagefullname}"
8 | minSdkVersion 16
9 | targetSdkVersion 24
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | compile 'com.android.support:appcompat-v7:+'
25 | compile 'com.android.support:design:+'
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/LoginActivity/app_/strings.ftl:
--------------------------------------------------------------------------------
1 |
2 | ${app_name}
3 |
4 |
5 | Email
6 | Password (optional)
7 | Sign in or register
8 | Sign in
9 | This email address is invalid
10 | This password is too short
11 | This password is incorrect
12 | This field is required
13 | "Contacts permissions are needed for providing email
14 | completions."
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\yjm\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/drawable-v21/ic_menu_camera.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/drawable-v21/ic_menu_gallery.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/drawable-v21/ic_menu_manage.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/drawable-v21/ic_menu_send.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/drawable-v21/ic_menu_share.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/drawable-v21/ic_menu_slideshow.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/drawable/side_nav_bar.xml:
--------------------------------------------------------------------------------
1 |
3 |
9 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/layout/app_bar_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
19 |
20 |
21 |
22 |
23 |
24 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/layout/content_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/layout/nav_header_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
21 |
22 |
28 |
29 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/menu/activity_main_drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
37 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 160dp
5 |
6 | 16dp
7 | 16dp
8 | 16dp
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/values/drawables.xml:
--------------------------------------------------------------------------------
1 |
2 | - @android:drawable/ic_menu_camera
3 | - @android:drawable/ic_menu_gallery
4 | - @android:drawable/ic_menu_slideshow
5 | - @android:drawable/ic_menu_manage
6 | - @android:drawable/ic_menu_share
7 | - @android:drawable/ic_menu_send
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app_/AndroidManifest.ftl:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app_/MainActivity.ftl:
--------------------------------------------------------------------------------
1 | package ${packagefullname};
2 |
3 | import android.os.Bundle;
4 | import android.support.design.widget.FloatingActionButton;
5 | import android.support.design.widget.Snackbar;
6 | import android.view.View;
7 | import android.support.design.widget.NavigationView;
8 | import android.support.v4.view.GravityCompat;
9 | import android.support.v4.widget.DrawerLayout;
10 | import android.support.v7.app.ActionBarDrawerToggle;
11 | import android.support.v7.app.AppCompatActivity;
12 | import android.support.v7.widget.Toolbar;
13 | import android.view.Menu;
14 | import android.view.MenuItem;
15 |
16 | public class ${activityname} extends AppCompatActivity
17 | implements NavigationView.OnNavigationItemSelectedListener {
18 |
19 | @Override
20 | protected void onCreate(Bundle savedInstanceState) {
21 | super.onCreate(savedInstanceState);
22 | setContentView(R.layout.${layoutname});
23 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
24 | setSupportActionBar(toolbar);
25 |
26 | FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
27 | fab.setOnClickListener(new View.OnClickListener() {
28 | @Override
29 | public void onClick(View view) {
30 | Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
31 | .setAction("Action", null).show();
32 | }
33 | });
34 |
35 | DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
36 | ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
37 | this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
38 | drawer.setDrawerListener(toggle);
39 | toggle.syncState();
40 |
41 | NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
42 | navigationView.setNavigationItemSelectedListener(this);
43 | }
44 |
45 | @Override
46 | public void onBackPressed() {
47 | DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
48 | if (drawer.isDrawerOpen(GravityCompat.START)) {
49 | drawer.closeDrawer(GravityCompat.START);
50 | } else {
51 | super.onBackPressed();
52 | }
53 | }
54 |
55 | @Override
56 | public boolean onCreateOptionsMenu(Menu menu) {
57 | // Inflate the menu; this adds items to the action bar if it is present.
58 | getMenuInflater().inflate(R.menu.main, menu);
59 | return true;
60 | }
61 |
62 | @Override
63 | public boolean onOptionsItemSelected(MenuItem item) {
64 | // Handle action bar item clicks here. The action bar will
65 | // automatically handle clicks on the Home/Up button, so long
66 | // as you specify a parent activity in AndroidManifest.xml.
67 | int id = item.getItemId();
68 |
69 | //noinspection SimplifiableIfStatement
70 | if (id == R.id.action_settings) {
71 | return true;
72 | }
73 |
74 | return super.onOptionsItemSelected(item);
75 | }
76 |
77 | @SuppressWarnings("StatementWithEmptyBody")
78 | @Override
79 | public boolean onNavigationItemSelected(MenuItem item) {
80 | // Handle navigation view item clicks here.
81 | int id = item.getItemId();
82 |
83 | if (id == R.id.nav_camera) {
84 | // Handle the camera action
85 | } else if (id == R.id.nav_gallery) {
86 |
87 | } else if (id == R.id.nav_slideshow) {
88 |
89 | } else if (id == R.id.nav_manage) {
90 |
91 | } else if (id == R.id.nav_share) {
92 |
93 | } else if (id == R.id.nav_send) {
94 |
95 | }
96 |
97 | DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
98 | drawer.closeDrawer(GravityCompat.START);
99 | return true;
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app_/activity_main.ftl:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app_/build.gradle.ftl:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 24
5 | buildToolsVersion "24.0.2"
6 | defaultConfig {
7 | applicationId "${packagefullname}"
8 | minSdkVersion 16
9 | targetSdkVersion 24
10 | versionCode 1
11 | versionName "1.0"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | compile fileTree(dir: 'libs', include: ['*.jar'])
23 | compile 'com.android.support:appcompat-v7:+'
24 | compile 'com.android.support:design:+'
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/NavigationDrawerActivity/app_/strings.ftl:
--------------------------------------------------------------------------------
1 |
2 | ${app_name}
3 |
4 | Open navigation drawer
5 | Close navigation drawer
6 |
7 | Settings
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/ScrollActivity/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\yjm\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/ScrollActivity/app/src/main/res/layout/content_scrolling.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/ScrollActivity/app/src/main/res/menu/menu_scrolling.xml:
--------------------------------------------------------------------------------
1 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/ScrollActivity/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/ScrollActivity/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/ScrollActivity/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/ScrollActivity/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/ScrollActivity/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/ScrollActivity/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/ScrollActivity/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/ScrollActivity/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/ScrollActivity/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/ScrollActivity/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/ScrollActivity/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/ScrollActivity/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/ScrollActivity/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | 180dp
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/ScrollActivity/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/ScrollActivity/app_/AndroidManifest.ftl:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/ScrollActivity/app_/ScrollingActivity.ftl:
--------------------------------------------------------------------------------
1 | package ${packagefullname};
2 |
3 | import android.os.Bundle;
4 | import android.support.design.widget.FloatingActionButton;
5 | import android.support.design.widget.Snackbar;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.support.v7.widget.Toolbar;
8 | import android.view.View;
9 | import android.view.Menu;
10 | import android.view.MenuItem;
11 |
12 | public class ${activityname} extends AppCompatActivity {
13 |
14 | @Override
15 | protected void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | setContentView(R.layout.${layoutname});
18 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
19 | setSupportActionBar(toolbar);
20 |
21 | FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
22 | fab.setOnClickListener(new View.OnClickListener() {
23 | @Override
24 | public void onClick(View view) {
25 | Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
26 | .setAction("Action", null).show();
27 | }
28 | });
29 | }
30 |
31 | @Override
32 | public boolean onCreateOptionsMenu(Menu menu) {
33 | // Inflate the menu; this adds items to the action bar if it is present.
34 | getMenuInflater().inflate(R.menu.menu_scrolling, menu);
35 | return true;
36 | }
37 |
38 | @Override
39 | public boolean onOptionsItemSelected(MenuItem item) {
40 | // Handle action bar item clicks here. The action bar will
41 | // automatically handle clicks on the Home/Up button, so long
42 | // as you specify a parent activity in AndroidManifest.xml.
43 | int id = item.getItemId();
44 |
45 | //noinspection SimplifiableIfStatement
46 | if (id == R.id.action_settings) {
47 | return true;
48 | }
49 | return super.onOptionsItemSelected(item);
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/ScrollActivity/app_/activity_scrolling.ftl:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
15 |
16 |
23 |
24 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/ScrollActivity/app_/build.gradle.ftl:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 24
5 | buildToolsVersion "24.0.2"
6 | defaultConfig {
7 | applicationId "${packagefullname}"
8 | minSdkVersion 16
9 | targetSdkVersion 24
10 | versionCode 1
11 | versionName "1.0"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | compile fileTree(dir: 'libs', include: ['*.jar'])
23 | compile 'com.android.support:appcompat-v7:+'
24 | compile 'com.android.support:design:+'
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/SettingsActivity/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\yjm\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/SettingsActivity/app/src/main/res/drawable/ic_info_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/SettingsActivity/app/src/main/res/drawable/ic_notifications_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/SettingsActivity/app/src/main/res/drawable/ic_sync_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/SettingsActivity/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/SettingsActivity/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/SettingsActivity/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/SettingsActivity/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/SettingsActivity/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/SettingsActivity/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/SettingsActivity/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/SettingsActivity/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/SettingsActivity/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/SettingsActivity/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/SettingsActivity/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/SettingsActivity/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/SettingsActivity/app/src/main/res/xml/pref_data_sync.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
14 |
15 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/SettingsActivity/app/src/main/res/xml/pref_general.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
20 |
21 |
23 |
24 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/SettingsActivity/app/src/main/res/xml/pref_notification.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
9 |
10 |
11 |
12 |
13 |
19 |
20 |
21 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/SettingsActivity/app_/AndroidManifest.ftl:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/SettingsActivity/app_/AppCompatPreferenceActivity.ftl:
--------------------------------------------------------------------------------
1 | package ${packagefullname};
2 |
3 | import android.content.res.Configuration;
4 | import android.os.Bundle;
5 | import android.preference.PreferenceActivity;
6 | import android.support.annotation.LayoutRes;
7 | import android.support.annotation.Nullable;
8 | import android.support.v7.app.ActionBar;
9 | import android.support.v7.app.AppCompatDelegate;
10 | import android.support.v7.widget.Toolbar;
11 | import android.view.MenuInflater;
12 | import android.view.View;
13 | import android.view.ViewGroup;
14 |
15 | /**
16 | * A {@link android.preference.PreferenceActivity} which implements and proxies the necessary calls
17 | * to be used with AppCompat.
18 | */
19 | public abstract class AppCompatPreferenceActivity extends PreferenceActivity {
20 |
21 | private AppCompatDelegate mDelegate;
22 |
23 | @Override
24 | protected void onCreate(Bundle savedInstanceState) {
25 | getDelegate().installViewFactory();
26 | getDelegate().onCreate(savedInstanceState);
27 | super.onCreate(savedInstanceState);
28 | }
29 |
30 | @Override
31 | protected void onPostCreate(Bundle savedInstanceState) {
32 | super.onPostCreate(savedInstanceState);
33 | getDelegate().onPostCreate(savedInstanceState);
34 | }
35 |
36 | public ActionBar getSupportActionBar() {
37 | return getDelegate().getSupportActionBar();
38 | }
39 |
40 | public void setSupportActionBar(@Nullable Toolbar toolbar) {
41 | getDelegate().setSupportActionBar(toolbar);
42 | }
43 |
44 | @Override
45 | public MenuInflater getMenuInflater() {
46 | return getDelegate().getMenuInflater();
47 | }
48 |
49 | @Override
50 | public void setContentView(@LayoutRes int layoutResID) {
51 | getDelegate().setContentView(layoutResID);
52 | }
53 |
54 | @Override
55 | public void setContentView(View view) {
56 | getDelegate().setContentView(view);
57 | }
58 |
59 | @Override
60 | public void setContentView(View view, ViewGroup.LayoutParams params) {
61 | getDelegate().setContentView(view, params);
62 | }
63 |
64 | @Override
65 | public void addContentView(View view, ViewGroup.LayoutParams params) {
66 | getDelegate().addContentView(view, params);
67 | }
68 |
69 | @Override
70 | protected void onPostResume() {
71 | super.onPostResume();
72 | getDelegate().onPostResume();
73 | }
74 |
75 | @Override
76 | protected void onTitleChanged(CharSequence title, int color) {
77 | super.onTitleChanged(title, color);
78 | getDelegate().setTitle(title);
79 | }
80 |
81 | @Override
82 | public void onConfigurationChanged(Configuration newConfig) {
83 | super.onConfigurationChanged(newConfig);
84 | getDelegate().onConfigurationChanged(newConfig);
85 | }
86 |
87 | @Override
88 | protected void onStop() {
89 | super.onStop();
90 | getDelegate().onStop();
91 | }
92 |
93 | @Override
94 | protected void onDestroy() {
95 | super.onDestroy();
96 | getDelegate().onDestroy();
97 | }
98 |
99 | public void invalidateOptionsMenu() {
100 | getDelegate().invalidateOptionsMenu();
101 | }
102 |
103 | private AppCompatDelegate getDelegate() {
104 | if (mDelegate == null) {
105 | mDelegate = AppCompatDelegate.create(this, null);
106 | }
107 | return mDelegate;
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/SettingsActivity/app_/build.gradle.ftl:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 24
5 | buildToolsVersion "24.0.0"
6 | defaultConfig {
7 | applicationId "${packagefullname}"
8 | minSdkVersion 15
9 | targetSdkVersion 24
10 | versionCode 1
11 | versionName "1.0"
12 | vectorDrawables.useSupportLibrary = true
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | compile 'com.android.support:appcompat-v7:+'
25 | compile 'com.android.support:support-v4:+'
26 | compile 'com.android.support:support-vector-drawable:+'
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/SettingsActivity/app_/pref_headers.ftl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
14 |
15 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/SettingsActivity/app_/strings.ftl:
--------------------------------------------------------------------------------
1 |
2 | ${app_name}
3 |
4 |
5 |
6 |
7 | General
8 |
9 | Enable social recommendations
10 | Recommendations for people to contact
11 | based on your message history
12 |
13 |
14 | Display name
15 | John Smith
16 |
17 | Add friends to messages
18 |
19 | - Always
20 | - When possible
21 | - Never
22 |
23 |
24 | - 1
25 | - 0
26 | - -1
27 |
28 |
29 |
30 | Data & sync
31 |
32 | Sync frequency
33 |
34 | - 15 minutes
35 | - 30 minutes
36 | - 1 hour
37 | - 3 hours
38 | - 6 hours
39 | - Never
40 |
41 |
42 | - 15
43 | - 30
44 | - 60
45 | - 180
46 | - 360
47 | - -1
48 |
49 |
50 |
51 | - Entry 1
52 | - Entry 2
53 | - Entry 3
54 |
55 |
56 |
57 | - 1
58 | - 2
59 | - 3
60 |
61 |
62 |
63 |
64 | System sync settings
65 |
66 |
67 | Notifications
68 |
69 | New message notifications
70 |
71 | Ringtone
72 | Silent
73 |
74 | Vibrate
75 |
76 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/TabbedActivity/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\yjm\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/TabbedActivity/app/src/main/res/layout/fragment_main.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/TabbedActivity/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/TabbedActivity/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/TabbedActivity/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/TabbedActivity/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/TabbedActivity/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/TabbedActivity/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/TabbedActivity/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/TabbedActivity/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/TabbedActivity/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/TabbedActivity/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/assets/templet_AS2Aide/TabbedActivity/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/TabbedActivity/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/TabbedActivity/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/TabbedActivity/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/TabbedActivity/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 16dp
6 | 8dp
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/TabbedActivity/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/TabbedActivity/app_/AndroidManifest.ftl:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/TabbedActivity/app_/activity_main.ftl:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
17 |
24 |
25 |
26 |
27 |
28 |
29 |
34 |
35 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/TabbedActivity/app_/build.gradle.ftl:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 24
5 | buildToolsVersion "24.0.2"
6 | defaultConfig {
7 | applicationId "${packagefullname}"
8 | minSdkVersion 16
9 | targetSdkVersion 24
10 | versionCode 1
11 | versionName "1.0"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | compile fileTree(dir: 'libs', include: ['*.jar'])
23 | compile 'com.android.support:appcompat-v7:+'
24 | compile 'com.android.support:design:+'
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/assets/templet_AS2Aide/TabbedActivity/app_/strings.ftl:
--------------------------------------------------------------------------------
1 |
2 | ${app_name}
3 | Settings
4 | Hello World from section: %1$d
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/java/aide/xd/com/buildaide/PackageName.java:
--------------------------------------------------------------------------------
1 | package aide.xd.com.buildaide;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * @author Administrator
7 | */
8 | public class PackageName implements Serializable {
9 | private static final long serialVersionUID = 1L;
10 | private String com;
11 | private String myCompany;
12 | private String myApp;
13 | private String name;
14 |
15 | public PackageName(String com, String myCompany, String myApp, String name) {
16 | this.com = com;
17 | this.myCompany = myCompany;
18 | this.myApp = myApp;
19 | this.name = name;
20 | }
21 |
22 | public String getFullName() {
23 | return this.myApp + "." + this.myCompany + "." + this.com + "." + this.name.toLowerCase();
24 | }
25 |
26 | public void setName(String name) {
27 | this.name = name;
28 | }
29 |
30 | public String getDName() {
31 | return name;
32 | }
33 |
34 | public String getName() {
35 | return name.toLowerCase();
36 | }
37 |
38 | public void setCom(String com) {
39 | this.com = com;
40 | }
41 |
42 | public String getCom() {
43 | return com;
44 | }
45 |
46 | public String getMyCompany() {
47 | return myCompany;
48 | }
49 |
50 | public String getMyApp() {
51 | return myApp;
52 | }
53 | }
--------------------------------------------------------------------------------
/app/src/main/java/aide/xd/com/buildaide/Utils.java:
--------------------------------------------------------------------------------
1 | package aide.xd.com.buildaide;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 | import android.net.Uri;
6 | import android.text.TextUtils;
7 | import android.view.View;
8 | import android.widget.ImageView;
9 |
10 | import java.io.File;
11 | import java.io.FileOutputStream;
12 | import java.io.InputStream;
13 | import java.util.ArrayList;
14 | import java.util.List;
15 |
16 | /**
17 | * Created by yjm on 2017/1/14.
18 | */
19 |
20 | public class Utils {
21 |
22 | public static void setupItem(final View view, final LibraryObject libraryObject) {
23 | final ImageView img = view.findViewById(R.id.img_item);
24 | img.setImageResource(libraryObject.getRes());
25 | }
26 |
27 | public static class LibraryObject {
28 | private int mRes;
29 | public LibraryObject(final int res) {
30 | mRes = res;
31 | }
32 | public int getRes() {
33 | return mRes;
34 | }
35 | public void setRes(final int res) {
36 | mRes = res;
37 | }
38 | }
39 | static void copyFilesFromAssets(Context context, String oldPath, String newPath) {
40 | try {
41 | String[] fileNames = context.getAssets().list(oldPath);
42 | assert fileNames != null;
43 | if (fileNames.length > 0) {
44 | File file = new File(newPath);
45 | file.mkdirs();
46 | for (String fileName : fileNames) {
47 | copyFilesFromAssets(context, oldPath + "/" + fileName, newPath + "/" + fileName);
48 | }
49 | } else {
50 | InputStream is = context.getAssets().open(oldPath);
51 | FileOutputStream fos = new FileOutputStream(new File(newPath));
52 | byte[] buffer = new byte[1024];
53 | int byteCount;
54 | while ((byteCount = is.read(buffer)) != -1) {
55 | fos.write(buffer, 0, byteCount);
56 | }
57 | fos.flush();
58 | is.close();
59 | fos.close();
60 | }
61 | } catch (Exception ignored) {
62 | }
63 | }
64 |
65 |
66 | static void goToMarket(Context context,String marketPkg){
67 | String appPkg = context.getPackageName();
68 | // 扫描已经安装的市场包名
69 | ArrayList marketPkgs = MarketUtils.queryInstalledMarketPkgs(context);
70 | Uri uri = Uri.parse("market://details?id=" + appPkg);
71 | Intent intent = new Intent(Intent.ACTION_VIEW, uri);
72 | // 指定市场
73 | if (!TextUtils.isEmpty(marketPkg) && marketPkgs.contains(marketPkg)) {
74 | intent.setPackage(marketPkg);
75 | }
76 | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
77 | context.startActivity(intent);
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/app/src/main/java/aide/xd/com/buildaide/adapter/HorizontalPagerAdapter.java:
--------------------------------------------------------------------------------
1 | package aide.xd.com.buildaide.adapter;
2 |
3 | import android.content.Context;
4 | import android.support.annotation.NonNull;
5 | import android.support.v4.view.PagerAdapter;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 |
10 | import aide.xd.com.buildaide.R;
11 | import aide.xd.com.buildaide.Utils;
12 |
13 | import static aide.xd.com.buildaide.Utils.setupItem;
14 |
15 | /**
16 | * Created by yjm on 2017/1/14.
17 | */
18 |
19 | public class HorizontalPagerAdapter extends PagerAdapter {
20 | private final Utils.LibraryObject[] LIBRARIES = new Utils.LibraryObject[]{
21 | new Utils.LibraryObject(
22 | R.drawable.blank_activity
23 | ),
24 | new Utils.LibraryObject(
25 | R.drawable.basic_activity
26 | ),
27 | new Utils.LibraryObject(
28 | R.drawable.blank_activity_drawer
29 | ),
30 | new Utils.LibraryObject(
31 | R.drawable.blank_activity_tabs
32 | ),
33 |
34 | new Utils.LibraryObject(
35 | R.drawable.fullscreen_activity
36 | )
37 | ,
38 | new Utils.LibraryObject(
39 | R.drawable.login_activity
40 |
41 | ),
42 |
43 | new Utils.LibraryObject(
44 | R.drawable.scroll_activity
45 |
46 | ),
47 | new Utils.LibraryObject(
48 | R.drawable.settings_activity
49 |
50 | )
51 | };
52 |
53 | private LayoutInflater mLayoutInflater;
54 |
55 |
56 |
57 | public HorizontalPagerAdapter(final Context context)
58 | {
59 | mLayoutInflater = LayoutInflater.from(context);
60 |
61 | }
62 |
63 | @Override
64 | public int getCount()
65 | {
66 | return 8;
67 | }
68 |
69 | @Override
70 | public int getItemPosition(@NonNull final Object object)
71 | {
72 | return POSITION_NONE;
73 | }
74 |
75 | @NonNull
76 | @Override
77 | public Object instantiateItem(@NonNull final ViewGroup container, final int position)
78 | {
79 | final View view;
80 |
81 | view = mLayoutInflater.inflate(R.layout.item, container, false);
82 | setupItem(view, LIBRARIES[position]);
83 |
84 | container.addView(view);
85 | return view;
86 | }
87 |
88 | @Override
89 | public boolean isViewFromObject(@NonNull final View view, @NonNull final Object object)
90 | {
91 | return view.equals(object);
92 | }
93 |
94 | @Override
95 | public void destroyItem(@NonNull final ViewGroup container, final int position, @NonNull final Object object)
96 | {
97 | container.removeView((View) object);
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/app/src/main/java/aide/xd/com/buildaide/fragment/FragmentHead.java:
--------------------------------------------------------------------------------
1 | package aide.xd.com.buildaide.fragment;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.NonNull;
5 | import android.support.annotation.Nullable;
6 | import android.support.v4.app.Fragment;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 |
11 | import aide.xd.com.buildaide.R;
12 |
13 | /**
14 | * FileName: FragmentHead
15 | * Author: Administrator
16 | * Date: 2019/2/21 21:14
17 | */
18 | public class FragmentHead extends Fragment {
19 | @Nullable
20 | @Override
21 | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
22 | return inflater.inflate(R.layout.fragment_main_head,container,false);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/java/aide/xd/com/buildaide/fragment/FragmentTwo.java:
--------------------------------------------------------------------------------
1 | package aide.xd.com.buildaide.fragment;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.NonNull;
5 | import android.support.annotation.Nullable;
6 | import android.support.v4.app.Fragment;
7 | import android.support.v4.view.ViewPager;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.view.ViewGroup;
11 | import com.gigamole.infinitecycleviewpager.HorizontalInfiniteCycleViewPager;
12 | import com.jkb.fragment.rigger.annotation.Animator;
13 | import com.jkb.fragment.rigger.annotation.Puppet;
14 |
15 | import java.util.Objects;
16 |
17 | import aide.xd.com.buildaide.MainActivity;
18 | import aide.xd.com.buildaide.PackageName;
19 | import aide.xd.com.buildaide.R;
20 | import aide.xd.com.buildaide.adapter.HorizontalPagerAdapter;
21 | @Animator(enter = R.anim.push_left_in_no_alpha, exit = R.anim.push_right_out_no_alpha,
22 | popEnter = R.anim.push_right_in_no_alpha, popExit = R.anim.push_left_out_no_alpha)
23 | @Puppet
24 | public class FragmentTwo extends Fragment {
25 | private int zhi = 0;
26 | public static FragmentTwo newInstance(Bundle bundle) {
27 | FragmentTwo fragment = new FragmentTwo();
28 | fragment.setArguments(bundle);
29 | return fragment;
30 | }
31 |
32 | @Nullable
33 | @Override
34 | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
35 |
36 | View v = inflater.inflate(R.layout.fragment_two, container, false);
37 | v.findViewById(R.id.selectButton).setOnClickListener(new View.OnClickListener() {
38 | @Override
39 | public void onClick(View p1) {
40 | Bundle bundle = new Bundle();
41 | PackageName p = (PackageName) Objects.requireNonNull(getArguments()).getSerializable("packagename");
42 | bundle.putSerializable("packagename", p);
43 | bundle.putInt("image", zhi);
44 | ((MainActivity) Objects.requireNonNull(getActivity())).startThree(bundle);
45 | }
46 | });
47 | HorizontalInfiniteCycleViewPager infiniteCycleViewPager = v.findViewById(R.id.viewpager);
48 | HorizontalPagerAdapter n = new HorizontalPagerAdapter(getContext());
49 | infiniteCycleViewPager.setAdapter(n);
50 | infiniteCycleViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
51 | @Override
52 | public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
53 | }
54 |
55 | @Override
56 | public void onPageSelected(int position) {
57 | zhi = Math.abs(position % 8);
58 | }
59 |
60 | @Override
61 | public void onPageScrollStateChanged(int state) {
62 | }
63 | });
64 | return v;
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/app/src/main/java/base/Tools.java:
--------------------------------------------------------------------------------
1 | package base;
2 | import android.content.Context;
3 | import android.content.SharedPreferences;
4 | import android.os.Environment;
5 |
6 | /**
7 | * Created by yjm on 2017/1/23.
8 | */
9 |
10 | public class Tools {
11 | /**
12 | * 保存在手机里面的文件名
13 | */
14 | private static final String FILE_NAME = "share_date";
15 |
16 |
17 | /**
18 | * 保存数据的方法,我们需要拿到保存数据的具体类型,然后根据类型调用不同的保存方法
19 | */
20 | public static void setParam(Context context , String key, Object object){
21 |
22 | String type = object.getClass().getSimpleName();
23 | SharedPreferences sp = context.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE);
24 | SharedPreferences.Editor editor = sp.edit();
25 |
26 | if("String".equals(type)){
27 | editor.putString(key, (String)object);
28 | }
29 | else if("Integer".equals(type)){
30 | editor.putInt(key, (Integer)object);
31 | }
32 | else if("Boolean".equals(type)){
33 | editor.putBoolean(key, (Boolean)object);
34 | }
35 | else if("Float".equals(type)){
36 | editor.putFloat(key, (Float)object);
37 | }
38 | else if("Long".equals(type)){
39 | editor.putLong(key, (Long)object);
40 | }
41 |
42 | editor.apply();
43 | }
44 |
45 | /**
46 | * 得到保存数据的方法,我们根据默认值得到保存的数据的具体类型,然后调用相对于的方法获取值
47 | */
48 | public static Object getParam(Context context , String key, Object defaultObject){
49 | String type = defaultObject.getClass().getSimpleName();
50 | SharedPreferences sp = context.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE);
51 |
52 | if("String".equals(type)){
53 | if(defaultObject != Environment.getExternalStorageDirectory().getPath() + "/AppProjects/") {
54 | return sp.getString(key, (String) defaultObject);
55 | } else{
56 | return sp.getString(key, Environment.getExternalStorageDirectory().getPath() + "/AppProjects/");
57 | }
58 | }
59 | else if("Integer".equals(type)){
60 | return sp.getInt(key, (Integer)defaultObject);
61 | }
62 | else if("Boolean".equals(type)){
63 | return sp.getBoolean(key, (Boolean)defaultObject);
64 | }
65 | else if("Float".equals(type)){
66 | return sp.getFloat(key, (Float)defaultObject);
67 | }
68 | else if("Long".equals(type)){
69 | return sp.getLong(key, (Long)defaultObject);
70 | }
71 |
72 | return null;
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/app/src/main/java/pub/devrel/easypermissions/AfterPermissionGranted.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright Google Inc. All Rights Reserved.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package pub.devrel.easypermissions;
17 |
18 | import java.lang.annotation.ElementType;
19 | import java.lang.annotation.Retention;
20 | import java.lang.annotation.RetentionPolicy;
21 | import java.lang.annotation.Target;
22 |
23 | @Retention(RetentionPolicy.RUNTIME)
24 | @Target(ElementType.METHOD)
25 | public @interface AfterPermissionGranted {
26 |
27 | int value();
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/java/pub/devrel/easypermissions/AppSettingsDialogHolderActivity.java:
--------------------------------------------------------------------------------
1 | package pub.devrel.easypermissions;
2 |
3 | import android.app.Activity;
4 | import android.app.Dialog;
5 | import android.content.Context;
6 | import android.content.DialogInterface;
7 | import android.content.Intent;
8 | import android.net.Uri;
9 | import android.os.Bundle;
10 | import android.provider.Settings;
11 | import android.support.annotation.RestrictTo;
12 | import android.support.v7.app.AlertDialog;
13 | import android.support.v7.app.AppCompatActivity;
14 |
15 | @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
16 | public class AppSettingsDialogHolderActivity extends AppCompatActivity implements DialogInterface.OnClickListener {
17 | private static final int APP_SETTINGS_RC = 7534;
18 |
19 | private AlertDialog mDialog;
20 | private int mIntentFlags;
21 |
22 | public static Intent createShowDialogIntent(Context context, AppSettingsDialog dialog) {
23 | Intent intent = new Intent(context, AppSettingsDialogHolderActivity.class);
24 | intent.putExtra(AppSettingsDialog.EXTRA_APP_SETTINGS, dialog);
25 | return intent;
26 | }
27 |
28 | @Override
29 | protected void onCreate(Bundle savedInstanceState) {
30 | super.onCreate(savedInstanceState);
31 | AppSettingsDialog appSettingsDialog = AppSettingsDialog.fromIntent(getIntent(), this);
32 | mIntentFlags = appSettingsDialog.getIntentFlags();
33 | mDialog = appSettingsDialog.showDialog(this, this);
34 | }
35 |
36 | @Override
37 | protected void onDestroy() {
38 | super.onDestroy();
39 | if (mDialog != null && mDialog.isShowing()) {
40 | mDialog.dismiss();
41 | }
42 | }
43 |
44 | @Override
45 | public void onClick(DialogInterface dialog, int which) {
46 | if (which == Dialog.BUTTON_POSITIVE) {
47 | Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
48 | .setData(Uri.fromParts("package", getPackageName(), null));
49 | intent.addFlags(mIntentFlags);
50 | startActivityForResult(intent, APP_SETTINGS_RC);
51 | } else if (which == Dialog.BUTTON_NEGATIVE) {
52 | setResult(Activity.RESULT_CANCELED);
53 | finish();
54 | } else {
55 | throw new IllegalStateException("Unknown button type: " + which);
56 | }
57 | }
58 |
59 | @Override
60 | protected void onActivityResult(int requestCode, int resultCode, Intent data) {
61 | super.onActivityResult(requestCode, resultCode, data);
62 | setResult(resultCode, data);
63 | finish();
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/app/src/main/java/pub/devrel/easypermissions/RationaleDialogClickListener.java:
--------------------------------------------------------------------------------
1 | package pub.devrel.easypermissions;
2 |
3 | import android.app.Activity;
4 | import android.app.Dialog;
5 | import android.content.DialogInterface;
6 | import android.support.v4.app.Fragment;
7 |
8 | import java.util.Arrays;
9 |
10 | import pub.devrel.easypermissions.helper.PermissionHelper;
11 |
12 | /**
13 | * Click listener for either {@link RationaleDialogFragment} or {@link RationaleDialogFragmentCompat}.
14 | */
15 | class RationaleDialogClickListener implements Dialog.OnClickListener {
16 |
17 | private Object mHost;
18 | private RationaleDialogConfig mConfig;
19 | private EasyPermissions.PermissionCallbacks mCallbacks;
20 | private EasyPermissions.RationaleCallbacks mRationaleCallbacks;
21 |
22 | RationaleDialogClickListener(RationaleDialogFragmentCompat compatDialogFragment,
23 | RationaleDialogConfig config,
24 | EasyPermissions.PermissionCallbacks callbacks,
25 | EasyPermissions.RationaleCallbacks rationaleCallbacks) {
26 |
27 | mHost = compatDialogFragment.getParentFragment() != null
28 | ? compatDialogFragment.getParentFragment()
29 | : compatDialogFragment.getActivity();
30 |
31 | mConfig = config;
32 | mCallbacks = callbacks;
33 | mRationaleCallbacks = rationaleCallbacks;
34 |
35 | }
36 |
37 | RationaleDialogClickListener(RationaleDialogFragment dialogFragment,
38 | RationaleDialogConfig config,
39 | EasyPermissions.PermissionCallbacks callbacks,
40 | EasyPermissions.RationaleCallbacks dialogCallback) {
41 |
42 | mHost = dialogFragment.getActivity();
43 |
44 | mConfig = config;
45 | mCallbacks = callbacks;
46 | mRationaleCallbacks = dialogCallback;
47 | }
48 |
49 | @Override
50 | public void onClick(DialogInterface dialog, int which) {
51 | int requestCode = mConfig.requestCode;
52 | if (which == Dialog.BUTTON_POSITIVE) {
53 | String[] permissions = mConfig.permissions;
54 | if (mRationaleCallbacks != null) {
55 | mRationaleCallbacks.onRationaleAccepted(requestCode);
56 | }
57 | if (mHost instanceof Fragment) {
58 | PermissionHelper.newInstance((Fragment) mHost).directRequestPermissions(requestCode, permissions);
59 | } else if (mHost instanceof Activity) {
60 | PermissionHelper.newInstance((Activity) mHost).directRequestPermissions(requestCode, permissions);
61 | } else {
62 | throw new RuntimeException("Host must be an Activity or Fragment!");
63 | }
64 | } else {
65 | if (mRationaleCallbacks != null) {
66 | mRationaleCallbacks.onRationaleDenied(requestCode);
67 | }
68 | notifyPermissionDenied();
69 | }
70 | }
71 |
72 | private void notifyPermissionDenied() {
73 | if (mCallbacks != null) {
74 | mCallbacks.onPermissionsDenied(mConfig.requestCode, Arrays.asList(mConfig.permissions));
75 | }
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/app/src/main/java/pub/devrel/easypermissions/RationaleDialogConfig.java:
--------------------------------------------------------------------------------
1 | package pub.devrel.easypermissions;
2 |
3 | import android.app.Dialog;
4 | import android.content.Context;
5 | import android.os.Bundle;
6 | import android.support.annotation.NonNull;
7 | import android.support.annotation.StyleRes;
8 | import android.support.v7.app.AlertDialog;
9 |
10 | /**
11 | * Configuration for either {@link RationaleDialogFragment} or {@link RationaleDialogFragmentCompat}.
12 | */
13 | class RationaleDialogConfig {
14 |
15 | private static final String KEY_POSITIVE_BUTTON = "positiveButton";
16 | private static final String KEY_NEGATIVE_BUTTON = "negativeButton";
17 | private static final String KEY_RATIONALE_MESSAGE = "rationaleMsg";
18 | private static final String KEY_THEME = "theme";
19 | private static final String KEY_REQUEST_CODE = "requestCode";
20 | private static final String KEY_PERMISSIONS = "permissions";
21 |
22 | String positiveButton;
23 | String negativeButton;
24 | int theme;
25 | int requestCode;
26 | String rationaleMsg;
27 | String[] permissions;
28 |
29 | RationaleDialogConfig(@NonNull String positiveButton,
30 | @NonNull String negativeButton,
31 | @NonNull String rationaleMsg,
32 | @StyleRes int theme,
33 | int requestCode,
34 | @NonNull String[] permissions) {
35 |
36 | this.positiveButton = positiveButton;
37 | this.negativeButton = negativeButton;
38 | this.rationaleMsg = rationaleMsg;
39 | this.theme = theme;
40 | this.requestCode = requestCode;
41 | this.permissions = permissions;
42 | }
43 |
44 | RationaleDialogConfig(Bundle bundle) {
45 | positiveButton = bundle.getString(KEY_POSITIVE_BUTTON);
46 | negativeButton = bundle.getString(KEY_NEGATIVE_BUTTON);
47 | rationaleMsg = bundle.getString(KEY_RATIONALE_MESSAGE);
48 | theme = bundle.getInt(KEY_THEME);
49 | requestCode = bundle.getInt(KEY_REQUEST_CODE);
50 | permissions = bundle.getStringArray(KEY_PERMISSIONS);
51 | }
52 |
53 | Bundle toBundle() {
54 | Bundle bundle = new Bundle();
55 | bundle.putString(KEY_POSITIVE_BUTTON, positiveButton);
56 | bundle.putString(KEY_NEGATIVE_BUTTON, negativeButton);
57 | bundle.putString(KEY_RATIONALE_MESSAGE, rationaleMsg);
58 | bundle.putInt(KEY_THEME, theme);
59 | bundle.putInt(KEY_REQUEST_CODE, requestCode);
60 | bundle.putStringArray(KEY_PERMISSIONS, permissions);
61 |
62 | return bundle;
63 | }
64 |
65 | AlertDialog createSupportDialog(Context context, Dialog.OnClickListener listener) {
66 | AlertDialog.Builder builder;
67 | if (theme > 0) {
68 | builder = new AlertDialog.Builder(context, theme);
69 | } else {
70 | builder = new AlertDialog.Builder(context);
71 | }
72 | return builder
73 | .setCancelable(false)
74 | .setPositiveButton(positiveButton, listener)
75 | .setNegativeButton(negativeButton, listener)
76 | .setMessage(rationaleMsg)
77 | .create();
78 | }
79 |
80 | android.app.AlertDialog createFrameworkDialog(Context context, Dialog.OnClickListener listener) {
81 | android.app.AlertDialog.Builder builder;
82 | if (theme > 0) {
83 | builder = new android.app.AlertDialog.Builder(context, theme);
84 | } else {
85 | builder = new android.app.AlertDialog.Builder(context);
86 | }
87 | return builder
88 | .setCancelable(false)
89 | .setPositiveButton(positiveButton, listener)
90 | .setNegativeButton(negativeButton, listener)
91 | .setMessage(rationaleMsg)
92 | .create();
93 | }
94 |
95 | }
96 |
--------------------------------------------------------------------------------
/app/src/main/java/pub/devrel/easypermissions/RationaleDialogFragmentCompat.java:
--------------------------------------------------------------------------------
1 | package pub.devrel.easypermissions;
2 |
3 | import android.app.Dialog;
4 | import android.content.Context;
5 | import android.os.Bundle;
6 | import android.support.annotation.NonNull;
7 | import android.support.annotation.RestrictTo;
8 | import android.support.annotation.StyleRes;
9 | import android.support.v4.app.FragmentManager;
10 | import android.support.v7.app.AppCompatDialogFragment;
11 |
12 | /**
13 | * {@link AppCompatDialogFragment} to display rationale for permission requests when the request
14 | * comes from a Fragment or Activity that can host a Fragment.
15 | */
16 | @RestrictTo(RestrictTo.Scope.LIBRARY)
17 | public class RationaleDialogFragmentCompat extends AppCompatDialogFragment {
18 |
19 | public static final String TAG = "RationaleDialogFragmentCompat";
20 |
21 | private EasyPermissions.PermissionCallbacks mPermissionCallbacks;
22 | private EasyPermissions.RationaleCallbacks mRationaleCallbacks;
23 |
24 | public static RationaleDialogFragmentCompat newInstance(
25 | @NonNull String rationaleMsg,
26 | @NonNull String positiveButton,
27 | @NonNull String negativeButton,
28 | @StyleRes int theme,
29 | int requestCode,
30 | @NonNull String[] permissions) {
31 |
32 | // Create new Fragment
33 | RationaleDialogFragmentCompat dialogFragment = new RationaleDialogFragmentCompat();
34 |
35 | // Initialize configuration as arguments
36 | RationaleDialogConfig config = new RationaleDialogConfig(
37 | positiveButton, negativeButton, rationaleMsg, theme, requestCode, permissions);
38 | dialogFragment.setArguments(config.toBundle());
39 |
40 | return dialogFragment;
41 | }
42 |
43 | /**
44 | * Version of {@link #show(FragmentManager, String)} that no-ops when an IllegalStateException
45 | * would otherwise occur.
46 | */
47 | public void showAllowingStateLoss(FragmentManager manager, String tag) {
48 | if (manager.isStateSaved()) {
49 | return;
50 | }
51 |
52 | show(manager, tag);
53 | }
54 |
55 | @Override
56 | public void onAttach(Context context) {
57 | super.onAttach(context);
58 | if (getParentFragment() != null) {
59 | if (getParentFragment() instanceof EasyPermissions.PermissionCallbacks) {
60 | mPermissionCallbacks = (EasyPermissions.PermissionCallbacks) getParentFragment();
61 | }
62 | if (getParentFragment() instanceof EasyPermissions.RationaleCallbacks){
63 | mRationaleCallbacks = (EasyPermissions.RationaleCallbacks) getParentFragment();
64 | }
65 | }
66 |
67 | if (context instanceof EasyPermissions.PermissionCallbacks) {
68 | mPermissionCallbacks = (EasyPermissions.PermissionCallbacks) context;
69 | }
70 |
71 | if (context instanceof EasyPermissions.RationaleCallbacks) {
72 | mRationaleCallbacks = (EasyPermissions.RationaleCallbacks) context;
73 | }
74 | }
75 |
76 | @Override
77 | public void onDetach() {
78 | super.onDetach();
79 | mPermissionCallbacks = null;
80 | mRationaleCallbacks = null;
81 | }
82 |
83 | @NonNull
84 | @Override
85 | public Dialog onCreateDialog(Bundle savedInstanceState) {
86 | // Rationale dialog should not be cancelable
87 | setCancelable(false);
88 |
89 | // Get config from arguments, create click listener
90 | RationaleDialogConfig config = new RationaleDialogConfig(getArguments());
91 | RationaleDialogClickListener clickListener =
92 | new RationaleDialogClickListener(this, config, mPermissionCallbacks, mRationaleCallbacks);
93 |
94 | // Create an AlertDialog
95 | return config.createSupportDialog(getContext(), clickListener);
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/app/src/main/java/pub/devrel/easypermissions/helper/ActivityPermissionHelper.java:
--------------------------------------------------------------------------------
1 | package pub.devrel.easypermissions.helper;
2 |
3 | import android.app.Activity;
4 | import android.app.Fragment;
5 | import android.app.FragmentManager;
6 | import android.content.Context;
7 | import android.support.annotation.NonNull;
8 | import android.support.annotation.StyleRes;
9 | import android.support.v4.app.ActivityCompat;
10 | import android.util.Log;
11 |
12 | import pub.devrel.easypermissions.RationaleDialogFragment;
13 |
14 | /**
15 | * Permissions helper for {@link Activity}.
16 | */
17 | class ActivityPermissionHelper extends PermissionHelper {
18 | private static final String TAG = "ActPermissionHelper";
19 |
20 | public ActivityPermissionHelper(Activity host) {
21 | super(host);
22 | }
23 |
24 | @Override
25 | public void directRequestPermissions(int requestCode, @NonNull String... perms) {
26 | ActivityCompat.requestPermissions(getHost(), perms, requestCode);
27 | }
28 |
29 | @Override
30 | public boolean shouldShowRequestPermissionRationale(@NonNull String perm) {
31 | return ActivityCompat.shouldShowRequestPermissionRationale(getHost(), perm);
32 | }
33 |
34 | @Override
35 | public Context getContext() {
36 | return getHost();
37 | }
38 |
39 | @Override
40 | public void showRequestPermissionRationale(@NonNull String rationale,
41 | @NonNull String positiveButton,
42 | @NonNull String negativeButton,
43 | @StyleRes int theme,
44 | int requestCode,
45 | @NonNull String... perms) {
46 | FragmentManager fm = getHost().getFragmentManager();
47 |
48 | // Check if fragment is already showing
49 | Fragment fragment = fm.findFragmentByTag(RationaleDialogFragment.TAG);
50 | if (fragment instanceof RationaleDialogFragment) {
51 | Log.d(TAG, "Found existing fragment, not showing rationale.");
52 | return;
53 | }
54 |
55 | RationaleDialogFragment
56 | .newInstance(positiveButton, negativeButton, rationale, theme, requestCode, perms)
57 | .showAllowingStateLoss(fm, RationaleDialogFragment.TAG);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/app/src/main/java/pub/devrel/easypermissions/helper/AppCompatActivityPermissionsHelper.java:
--------------------------------------------------------------------------------
1 | package pub.devrel.easypermissions.helper;
2 |
3 | import android.content.Context;
4 | import android.support.annotation.NonNull;
5 | import android.support.v4.app.ActivityCompat;
6 | import android.support.v4.app.FragmentManager;
7 | import android.support.v7.app.AppCompatActivity;
8 |
9 | /**
10 | * Permissions helper for {@link AppCompatActivity}.
11 | */
12 | class AppCompatActivityPermissionsHelper extends BaseSupportPermissionsHelper {
13 |
14 | public AppCompatActivityPermissionsHelper(AppCompatActivity host) {
15 | super(host);
16 | }
17 |
18 | @Override
19 | public FragmentManager getSupportFragmentManager() {
20 | return getHost().getSupportFragmentManager();
21 | }
22 |
23 | @Override
24 | public void directRequestPermissions(int requestCode, @NonNull String... perms) {
25 | ActivityCompat.requestPermissions(getHost(), perms, requestCode);
26 | }
27 |
28 | @Override
29 | public boolean shouldShowRequestPermissionRationale(@NonNull String perm) {
30 | return ActivityCompat.shouldShowRequestPermissionRationale(getHost(), perm);
31 | }
32 |
33 | @Override
34 | public Context getContext() {
35 | return getHost();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/java/pub/devrel/easypermissions/helper/BaseSupportPermissionsHelper.java:
--------------------------------------------------------------------------------
1 | package pub.devrel.easypermissions.helper;
2 |
3 | import android.support.annotation.NonNull;
4 | import android.support.annotation.StyleRes;
5 | import android.support.v4.app.Fragment;
6 | import android.support.v4.app.FragmentManager;
7 | import android.util.Log;
8 |
9 | import pub.devrel.easypermissions.RationaleDialogFragmentCompat;
10 |
11 | /**
12 | * Implementation of {@link PermissionHelper} for Support Library host classes.
13 | */
14 | public abstract class BaseSupportPermissionsHelper extends PermissionHelper {
15 |
16 | private static final String TAG = "BSPermissionsHelper";
17 |
18 | public BaseSupportPermissionsHelper(@NonNull T host) {
19 | super(host);
20 | }
21 |
22 | public abstract FragmentManager getSupportFragmentManager();
23 |
24 | @Override
25 | public void showRequestPermissionRationale(@NonNull String rationale,
26 | @NonNull String positiveButton,
27 | @NonNull String negativeButton,
28 | @StyleRes int theme,
29 | int requestCode,
30 | @NonNull String... perms) {
31 |
32 | FragmentManager fm = getSupportFragmentManager();
33 |
34 | // Check if fragment is already showing
35 | Fragment fragment = fm.findFragmentByTag(RationaleDialogFragmentCompat.TAG);
36 | if (fragment instanceof RationaleDialogFragmentCompat) {
37 | Log.d(TAG, "Found existing fragment, not showing rationale.");
38 | return;
39 | }
40 |
41 | RationaleDialogFragmentCompat
42 | .newInstance(rationale, positiveButton, negativeButton, theme, requestCode, perms)
43 | .showAllowingStateLoss(fm, RationaleDialogFragmentCompat.TAG);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/java/pub/devrel/easypermissions/helper/LowApiPermissionsHelper.java:
--------------------------------------------------------------------------------
1 | package pub.devrel.easypermissions.helper;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 | import android.support.annotation.NonNull;
6 | import android.support.annotation.StyleRes;
7 | import android.support.v4.app.Fragment;
8 |
9 | /**
10 | * Permissions helper for apps built against API < 23, which do not need runtime permissions.
11 | */
12 | class LowApiPermissionsHelper extends PermissionHelper {
13 | public LowApiPermissionsHelper(@NonNull T host) {
14 | super(host);
15 | }
16 |
17 | @Override
18 | public void directRequestPermissions(int requestCode, @NonNull String... perms) {
19 | throw new IllegalStateException("Should never be requesting permissions on API < 23!");
20 | }
21 |
22 | @Override
23 | public boolean shouldShowRequestPermissionRationale(@NonNull String perm) {
24 | return false;
25 | }
26 |
27 | @Override
28 | public void showRequestPermissionRationale(@NonNull String rationale,
29 | @NonNull String positiveButton,
30 | @NonNull String negativeButton,
31 | @StyleRes int theme,
32 | int requestCode,
33 | @NonNull String... perms) {
34 | throw new IllegalStateException("Should never be requesting permissions on API < 23!");
35 | }
36 |
37 | @Override
38 | public Context getContext() {
39 | if (getHost() instanceof Activity) {
40 | return (Context) getHost();
41 | } else if (getHost() instanceof Fragment) {
42 | return ((Fragment) getHost()).getContext();
43 | } else {
44 | throw new IllegalStateException("Unknown host: " + getHost());
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/java/pub/devrel/easypermissions/helper/SupportFragmentPermissionHelper.java:
--------------------------------------------------------------------------------
1 | package pub.devrel.easypermissions.helper;
2 |
3 | import android.content.Context;
4 | import android.support.annotation.NonNull;
5 | import android.support.v4.app.Fragment;
6 | import android.support.v4.app.FragmentActivity;
7 | import android.support.v4.app.FragmentManager;
8 |
9 | /**
10 | * Permissions helper for {@link Fragment} from the support library.
11 | */
12 | class SupportFragmentPermissionHelper extends BaseSupportPermissionsHelper {
13 |
14 | public SupportFragmentPermissionHelper(@NonNull Fragment host) {
15 | super(host);
16 | }
17 |
18 | @Override
19 | public FragmentManager getSupportFragmentManager() {
20 | return getHost().getChildFragmentManager();
21 | }
22 |
23 | @Override
24 | public void directRequestPermissions(int requestCode, @NonNull String... perms) {
25 | getHost().requestPermissions(perms, requestCode);
26 | }
27 |
28 | @Override
29 | public boolean shouldShowRequestPermissionRationale(@NonNull String perm) {
30 | return getHost().shouldShowRequestPermissionRationale(perm);
31 | }
32 |
33 | @Override
34 | public Context getContext() {
35 | return getHost().getActivity();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/cycle.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/myanim.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
11 |
18 |
25 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/push_left_in_no_alpha.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/push_left_out_no_alpha.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/push_right_in_no_alpha.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/push_right_out_no_alpha.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/about_auther.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/res/drawable/about_auther.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/about_changelog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/res/drawable/about_changelog.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/about_license.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/res/drawable/about_license.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/about_tieba.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/res/drawable/about_tieba.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/basic_activity.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/res/drawable/basic_activity.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/blank_activity.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/res/drawable/blank_activity.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/blank_activity_drawer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/res/drawable/blank_activity_drawer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/blank_activity_tabs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/res/drawable/blank_activity_tabs.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/fullscreen_activity.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/res/drawable/fullscreen_activity.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_file_download_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_looks_5_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/login_activity.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/res/drawable/login_activity.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/scroll_activity.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/res/drawable/scroll_activity.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/settings_activity.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/res/drawable/settings_activity.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
20 |
21 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_main_head.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
18 |
19 |
33 |
34 |
43 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_one.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
18 |
29 |
30 |
41 |
42 |
52 |
53 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_two.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
25 |
26 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/provider_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | maven {
7 | url 'https://maven.google.com/'
8 | name 'Google'
9 | }
10 | google()
11 | }
12 | dependencies {
13 | classpath 'com.android.tools.build:gradle:3.3.2'
14 | classpath "com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.4"
15 | classpath 'org.aspectj:aspectjtools:1.8.13'
16 | }
17 | }
18 |
19 | allprojects {
20 | repositories {
21 | jcenter()
22 | maven { url 'https://jitpack.io' }
23 | google()
24 | }
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 | # When configured, Gradle will run in incubating parallel mode.
14 | # This option should only be used with decoupled projects. More details, visit
15 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
16 | # org.gradle.parallel=true
17 | COMPILE_SDK_VERSION=28
18 | TARGET_SDK_VERSION=28
19 | MIN_SDK_VERSION=19
20 | SUPPORT_LIB_VERSION=28.0.0
21 | VERSION_CODE = 19
22 | VERSION_NAME = 1.8
23 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xdjm/AS2Aide/642b24eb992743bf7c10dafa2248bfeca8b13a32/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Feb 06 07:57:47 CST 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/library/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/library/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | android {
3 | compileSdkVersion 28
4 | defaultConfig {
5 | minSdkVersion 19
6 | targetSdkVersion 28
7 | versionCode 1
8 | versionName "1.0"
9 | }
10 | buildTypes {
11 | release {
12 | minifyEnabled false
13 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
14 | }
15 | }
16 | }
17 | dependencies {
18 | api "com.android.support:appcompat-v7:$SUPPORT_LIB_VERSION"
19 | api "com.android.support:cardview-v7:$SUPPORT_LIB_VERSION"
20 | api "com.android.support:design:$SUPPORT_LIB_VERSION"
21 | }
22 |
--------------------------------------------------------------------------------
/library/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 | # When configured, Gradle will run in incubating parallel mode.
14 | # This option should only be used with decoupled projects. More details, visit
15 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
16 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/library/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/danielstone/Library/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/library/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/library/src/main/java/com/danielstone/materialaboutlibrary/adapters/MaterialAboutItemAdapter.java:
--------------------------------------------------------------------------------
1 | package com.danielstone.materialaboutlibrary.adapters;
2 |
3 | import android.content.Context;
4 | import android.support.v7.recyclerview.extensions.AsyncListDiffer;
5 | import android.support.v7.util.DiffUtil;
6 | import android.support.v7.widget.RecyclerView;
7 | import android.util.Log;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.view.ViewGroup;
11 |
12 | import com.danielstone.materialaboutlibrary.holders.MaterialAboutItemViewHolder;
13 | import com.danielstone.materialaboutlibrary.items.MaterialAboutItem;
14 | import com.danielstone.materialaboutlibrary.model.MaterialAboutCard;
15 | import com.danielstone.materialaboutlibrary.util.DefaultViewTypeManager;
16 | import com.danielstone.materialaboutlibrary.util.ViewTypeManager;
17 |
18 | import java.util.ArrayList;
19 | import java.util.Collections;
20 | import java.util.List;
21 | import java.util.UUID;
22 |
23 |
24 | public class MaterialAboutItemAdapter extends RecyclerView.Adapter {
25 |
26 | private final AsyncListDiffer differ = new AsyncListDiffer(this, DIFF_CALLBACK);
27 |
28 | private ViewTypeManager viewTypeManager;
29 |
30 | private Context context;
31 |
32 | MaterialAboutItemAdapter() {
33 | setHasStableIds(true);
34 | this.viewTypeManager = new DefaultViewTypeManager();
35 | }
36 |
37 | MaterialAboutItemAdapter(ViewTypeManager customViewTypeManager) {
38 | setHasStableIds(true);
39 | this.viewTypeManager = customViewTypeManager;
40 | }
41 |
42 | @Override
43 | public MaterialAboutItemViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {
44 | context = viewGroup.getContext();
45 | if (!(viewGroup instanceof RecyclerView)) {
46 | throw new RuntimeException("Not bound to RecyclerView");
47 | }
48 |
49 | int layoutId = viewTypeManager.getLayout(viewType);
50 |
51 | View view = LayoutInflater.from(viewGroup.getContext()).inflate(layoutId, viewGroup, false);
52 | view.setFocusable(true);
53 |
54 | return viewTypeManager.getViewHolder(viewType, view);
55 | }
56 |
57 | @Override
58 | public void onBindViewHolder(MaterialAboutItemViewHolder holder, int position) {
59 | viewTypeManager.setupItem(getItemViewType(position), holder, differ.getCurrentList().get(position), context);
60 | }
61 |
62 |
63 | @Override
64 | public long getItemId(int position) {
65 | return UUID.fromString(differ.getCurrentList().get(position).getId()).getMostSignificantBits() & Long.MAX_VALUE;
66 | }
67 |
68 | @Override
69 | public int getItemCount() {
70 | return differ.getCurrentList().size();
71 | }
72 |
73 | @Override
74 | public int getItemViewType(int position) {
75 | return differ.getCurrentList().get(position).getType();
76 | }
77 |
78 | public void setData(ArrayList newData) {
79 | List data = new ArrayList<>();
80 | for (MaterialAboutItem item : newData) {
81 | data.add(item.clone());
82 | }
83 | differ.submitList(data);
84 | }
85 |
86 | public List getData() {
87 | return differ.getCurrentList();
88 | }
89 |
90 |
91 | public static final DiffUtil.ItemCallback DIFF_CALLBACK = new DiffUtil.ItemCallback() {
92 | @Override
93 | public boolean areItemsTheSame(MaterialAboutItem oldItem, MaterialAboutItem newItem) {
94 | return oldItem.getId().equals(newItem.getId());
95 | }
96 |
97 | @Override
98 | public boolean areContentsTheSame(MaterialAboutItem oldItem, MaterialAboutItem newItem) {
99 | return oldItem.getDetailString().equals(newItem.getDetailString());
100 | }
101 | };
102 |
103 | }
104 |
--------------------------------------------------------------------------------
/library/src/main/java/com/danielstone/materialaboutlibrary/holders/MaterialAboutItemViewHolder.java:
--------------------------------------------------------------------------------
1 | package com.danielstone.materialaboutlibrary.holders;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 | import android.view.View;
5 |
6 | public abstract class MaterialAboutItemViewHolder extends RecyclerView.ViewHolder {
7 |
8 | public MaterialAboutItemViewHolder(View itemView) {
9 | super(itemView);
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/library/src/main/java/com/danielstone/materialaboutlibrary/items/MaterialAboutItem.java:
--------------------------------------------------------------------------------
1 | package com.danielstone.materialaboutlibrary.items;
2 |
3 | import java.util.UUID;
4 |
5 | public abstract class MaterialAboutItem {
6 | public String id;
7 |
8 | MaterialAboutItem() {
9 | this.id = UUID.randomUUID().toString();
10 | }
11 |
12 | public String getId() {
13 | return id;
14 | }
15 |
16 | public abstract int getType();
17 |
18 | public abstract String getDetailString();
19 |
20 | public abstract MaterialAboutItem clone();
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/library/src/main/java/com/danielstone/materialaboutlibrary/items/MaterialAboutItemOnClickAction.java:
--------------------------------------------------------------------------------
1 | package com.danielstone.materialaboutlibrary.items;
2 |
3 | public interface MaterialAboutItemOnClickAction {
4 | void onClick();
5 | }
6 |
--------------------------------------------------------------------------------
/library/src/main/java/com/danielstone/materialaboutlibrary/model/MaterialAboutList.java:
--------------------------------------------------------------------------------
1 | package com.danielstone.materialaboutlibrary.model;
2 |
3 |
4 | import java.util.ArrayList;
5 | import java.util.Collections;
6 |
7 | public class MaterialAboutList {
8 |
9 | private ArrayList cards = new ArrayList<>();
10 |
11 | private MaterialAboutList(Builder builder) {
12 | this.cards = builder.cards;
13 | }
14 |
15 | public MaterialAboutList(MaterialAboutCard... materialAboutCards) {
16 | Collections.addAll(cards, materialAboutCards);
17 | }
18 |
19 | public MaterialAboutList addCard(MaterialAboutCard card) {
20 | cards.add(card);
21 | return this;
22 | }
23 |
24 | public MaterialAboutList clearCards(MaterialAboutCard card) {
25 | cards.clear();
26 | return this;
27 | }
28 |
29 | public ArrayList getCards() {
30 | return cards;
31 | }
32 |
33 | public static class Builder {
34 | private ArrayList cards = new ArrayList<>();
35 |
36 | public Builder addCard(MaterialAboutCard card) {
37 | this.cards.add(card);
38 | return this;
39 | }
40 |
41 | public MaterialAboutList build() {
42 | return new MaterialAboutList(this);
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/library/src/main/java/com/danielstone/materialaboutlibrary/util/DefaultViewTypeManager.java:
--------------------------------------------------------------------------------
1 | package com.danielstone.materialaboutlibrary.util;
2 |
3 | import android.content.Context;
4 | import android.view.View;
5 |
6 | import com.danielstone.materialaboutlibrary.holders.MaterialAboutItemViewHolder;
7 | import com.danielstone.materialaboutlibrary.items.MaterialAboutActionItem;
8 | import com.danielstone.materialaboutlibrary.items.MaterialAboutItem;
9 | import com.danielstone.materialaboutlibrary.items.MaterialAboutTitleItem;
10 |
11 | import static com.danielstone.materialaboutlibrary.util.DefaultViewTypeManager.ItemLayout.ACTION_LAYOUT;
12 | import static com.danielstone.materialaboutlibrary.util.DefaultViewTypeManager.ItemLayout.TITLE_LAYOUT;
13 | import static com.danielstone.materialaboutlibrary.util.DefaultViewTypeManager.ItemType.ACTION_ITEM;
14 | import static com.danielstone.materialaboutlibrary.util.DefaultViewTypeManager.ItemType.TITLE_ITEM;
15 |
16 | public class DefaultViewTypeManager extends ViewTypeManager {
17 |
18 | public static final class ItemType {
19 | public static final int ACTION_ITEM = ViewTypeManager.ItemType.ACTION_ITEM;
20 | public static final int TITLE_ITEM = ViewTypeManager.ItemType.TITLE_ITEM;
21 | }
22 |
23 | public static final class ItemLayout {
24 | public static final int ACTION_LAYOUT = ViewTypeManager.ItemLayout.ACTION_LAYOUT;
25 | public static final int TITLE_LAYOUT = ViewTypeManager.ItemLayout.TITLE_LAYOUT;
26 | }
27 |
28 | public int getLayout(int itemType) {
29 | switch (itemType) {
30 | case ACTION_ITEM:
31 | return ACTION_LAYOUT;
32 | case TITLE_ITEM:
33 | return TITLE_LAYOUT;
34 | default:
35 | return -1;
36 | }
37 | }
38 |
39 | public MaterialAboutItemViewHolder getViewHolder(int itemType, View view) {
40 | switch (itemType) {
41 | case ACTION_ITEM:
42 | return MaterialAboutActionItem.getViewHolder(view);
43 | case TITLE_ITEM:
44 | return MaterialAboutTitleItem.getViewHolder(view);
45 | default:
46 | return null;
47 | }
48 | }
49 |
50 | public void setupItem(int itemType, MaterialAboutItemViewHolder holder, MaterialAboutItem item, Context context) {
51 | switch (itemType) {
52 | case ACTION_ITEM:
53 | MaterialAboutActionItem.setupItem((MaterialAboutActionItem.MaterialAboutActionItemViewHolder) holder, (MaterialAboutActionItem) item, context);
54 | break;
55 | case TITLE_ITEM:
56 | MaterialAboutTitleItem.setupItem((MaterialAboutTitleItem.MaterialAboutTitleItemViewHolder) holder, (MaterialAboutTitleItem) item, context);
57 | break;
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/library/src/main/java/com/danielstone/materialaboutlibrary/util/OpenSourceLicense.java:
--------------------------------------------------------------------------------
1 | package com.danielstone.materialaboutlibrary.util;
2 |
3 | import com.danielstone.materialaboutlibrary.R;
4 |
5 | public enum OpenSourceLicense {
6 | APACHE_2, MIT, GNU_GPL_3, BSD;
7 |
8 | public int getResourceId() {
9 | switch (this) {
10 | case APACHE_2:
11 | return R.string.license_apache2;
12 | case MIT:
13 | return R.string.license_mit;
14 | case GNU_GPL_3:
15 | return R.string.license_gpl;
16 | case BSD:
17 | return R.string.license_bsd;
18 | default:
19 | return -1;
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/library/src/main/java/com/danielstone/materialaboutlibrary/util/ViewTypeManager.java:
--------------------------------------------------------------------------------
1 | package com.danielstone.materialaboutlibrary.util;
2 |
3 | import android.content.Context;
4 | import android.view.View;
5 |
6 | import com.danielstone.materialaboutlibrary.R;
7 | import com.danielstone.materialaboutlibrary.holders.MaterialAboutItemViewHolder;
8 | import com.danielstone.materialaboutlibrary.items.MaterialAboutItem;
9 |
10 | public abstract class ViewTypeManager {
11 |
12 | public static final class ItemType {
13 | public static final int ACTION_ITEM = 0;
14 | public static final int TITLE_ITEM = 1;
15 | }
16 |
17 | public static final class ItemLayout {
18 | public static final int ACTION_LAYOUT = R.layout.mal_material_about_action_item;
19 | public static final int TITLE_LAYOUT = R.layout.mal_material_about_title_item;
20 | }
21 |
22 | public abstract int getLayout(int itemType);
23 |
24 | public abstract MaterialAboutItemViewHolder getViewHolder(int itemType, View view);
25 |
26 | public abstract void setupItem(int itemType, MaterialAboutItemViewHolder holder, MaterialAboutItem item, Context context);
27 | }
28 |
--------------------------------------------------------------------------------
/library/src/main/res/layout/mal_material_about_action_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
25 |
26 |
38 |
39 |
46 |
47 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/library/src/main/res/layout/mal_material_about_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
23 |
24 |
25 |
26 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/library/src/main/res/layout/mal_material_about_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
--------------------------------------------------------------------------------
/library/src/main/res/layout/mal_material_about_list_card.xml:
--------------------------------------------------------------------------------
1 |
2 |
26 |
27 |
31 |
32 |
45 |
46 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/library/src/main/res/layout/mal_material_about_title_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
29 |
30 |
36 |
37 |
46 |
47 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/library/src/main/res/values-cs/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | O aplikaci
4 | Zavřít
5 | Odeslat e-mail
6 | Nenalezena aplikace pro tuto akci
7 |
8 |
--------------------------------------------------------------------------------
/library/src/main/res/values-de/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Über
4 |
5 | Schließen
6 | E-Mail senden
7 |
8 |
9 |
--------------------------------------------------------------------------------
/library/src/main/res/values-es/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Acerca de
4 | Cerrar
5 | Enviar email
6 | No hay apps para ejecutar esta acción
7 |
8 |
--------------------------------------------------------------------------------
/library/src/main/res/values-uk/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Про застосунок
4 | Закрити
5 | Надіслати e-mail
6 | Немає програм для обробки дій
7 |
8 |
--------------------------------------------------------------------------------
/library/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/library/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #de000000
5 | #8a000000
6 |
7 | #FFFFFF
8 | #b4ffffff
9 |
10 | #616161
11 | #E0E0E0
12 |
--------------------------------------------------------------------------------
/library/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 16dp
6 | 8dp
7 | 24dp
8 | 32dp
9 | 40dp
10 | 2dp
11 | 2dp
12 |
13 |
14 |
--------------------------------------------------------------------------------
/library/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
19 |
20 |
23 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':library'
2 |
--------------------------------------------------------------------------------