├── .gitignore
├── .idea
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── gradle.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
└── vcs.xml
├── LICENSE
├── README.md
├── app
├── .gitignore
├── build.gradle
├── libs
│ ├── skin-support-design-release.aar
│ └── skin-support-release.aar
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── assets
│ └── skins
│ │ ├── night.skin
│ │ └── white.skin
│ ├── java
│ └── com
│ │ └── ximsfei
│ │ └── skindemo
│ │ ├── App.java
│ │ ├── DataManager.java
│ │ ├── MainActivity.java
│ │ ├── SplashActivity.java
│ │ ├── bean
│ │ ├── ImageItem.java
│ │ └── RecommendItem.java
│ │ ├── ui
│ │ ├── AboutSkinLibActivity.java
│ │ ├── DiscoverFragment.java
│ │ ├── FriendsFragment.java
│ │ ├── MusicFragment.java
│ │ ├── SkinLibActivity.java
│ │ ├── adapter
│ │ │ ├── RecommendAdapter.java
│ │ │ ├── SkinLibAdapter.java
│ │ │ ├── SongMenuAdapter.java
│ │ │ ├── TabFragmentPagerAdapter.java
│ │ │ └── baseadapter
│ │ │ │ ├── BaseRecyclerViewAdapter.java
│ │ │ │ ├── BaseRecyclerViewHolder.java
│ │ │ │ └── OnItemClickListener.java
│ │ ├── base
│ │ │ ├── BaseActivity.java
│ │ │ └── BaseFragment.java
│ │ ├── discover
│ │ │ ├── RadioFragment.java
│ │ │ ├── RankingFragment.java
│ │ │ ├── RecommendFragment.java
│ │ │ └── SongMenuFragment.java
│ │ └── friends
│ │ │ ├── ContactsFragment.java
│ │ │ ├── FeedsFragment.java
│ │ │ └── NearbyFragment.java
│ │ ├── utils
│ │ ├── SPUtils.java
│ │ └── TimeUtil.java
│ │ └── widget
│ │ ├── ArrayDialogFragment.java
│ │ └── SquareImageView.java
│ └── res
│ ├── anim
│ ├── screen_zoom_in.xml
│ └── screen_zoom_out.xml
│ ├── color
│ ├── day_recommend_color_selector.xml
│ ├── fine_song_background_selector.xml
│ ├── select_song_menu_stroke_color.xml
│ └── selectable_text_color.xml
│ ├── drawable-nodpi
│ ├── b_1.png
│ ├── b_2.png
│ ├── b_3.png
│ ├── b_4.png
│ ├── b_5.jpg
│ ├── b_6.jpg
│ ├── ic_screen_default.png
│ ├── splash0.jpg
│ ├── splash1.jpg
│ ├── splash10.jpg
│ ├── splash11.jpg
│ ├── splash12.jpg
│ ├── splash13.jpg
│ ├── splash14.jpg
│ ├── splash15.jpg
│ ├── splash16.jpg
│ ├── splash2.jpg
│ ├── splash3.jpg
│ ├── splash4.jpg
│ ├── splash5.jpg
│ ├── splash6.jpg
│ ├── splash7.jpg
│ ├── splash8.jpg
│ └── splash9.jpg
│ ├── drawable-xhdpi
│ ├── header_layout_bg.jpg
│ ├── home_six_1.png
│ ├── home_six_10.png
│ ├── home_six_11.png
│ ├── home_six_12.png
│ ├── home_six_13.png
│ ├── home_six_14.png
│ ├── home_six_15.png
│ ├── home_six_16.png
│ ├── home_six_17.png
│ ├── home_six_18.png
│ ├── home_six_19.png
│ ├── home_six_2.png
│ ├── home_six_20.png
│ ├── home_six_21.png
│ ├── home_six_22.png
│ ├── home_six_23.png
│ ├── home_six_24.png
│ ├── home_six_25.png
│ ├── home_six_26.png
│ ├── home_six_27.png
│ ├── home_six_28.png
│ ├── home_six_29.png
│ ├── home_six_3.png
│ ├── home_six_30.png
│ ├── home_six_4.png
│ ├── home_six_5.png
│ ├── home_six_6.png
│ ├── home_six_7.png
│ ├── home_six_8.png
│ ├── home_six_9.png
│ ├── message.png
│ └── photo.jpeg
│ ├── drawable-xxhdpi
│ ├── actionbar_discover_normal.png
│ ├── actionbar_discover_selected.png
│ ├── actionbar_friends_normal.png
│ ├── actionbar_friends_selected.png
│ ├── actionbar_music_normal.png
│ ├── actionbar_music_selected.png
│ ├── android_group.png
│ ├── home_banner_1.png
│ ├── home_banner_10.png
│ ├── home_banner_11.png
│ ├── home_banner_12.png
│ ├── home_banner_2.png
│ ├── home_banner_3.png
│ ├── home_banner_4.png
│ ├── home_banner_5.png
│ ├── home_banner_6.png
│ ├── home_banner_7.png
│ ├── home_banner_8.png
│ ├── home_banner_9.png
│ ├── ic_back.png
│ ├── ic_banner_grey.png
│ ├── ic_banner_red.png
│ ├── ic_birthday_normal.png
│ ├── ic_birthday_pressed.png
│ ├── ic_day_normal.png
│ ├── ic_day_pressed.png
│ ├── ic_daynight_indicator.png
│ ├── ic_driving_mode_indicator.png
│ ├── ic_fm_normal.png
│ ├── ic_fm_pressed.png
│ ├── ic_indicator_0.png
│ ├── ic_indicator_1.png
│ ├── ic_indicator_2.png
│ ├── ic_indicator_3.png
│ ├── ic_indicator_4.png
│ ├── ic_menu.png
│ ├── ic_message_indicator.png
│ ├── ic_more_indicator.png
│ ├── ic_music_alarm_indicator.png
│ ├── ic_online_indicator.png
│ ├── ic_rank_normal.png
│ ├── ic_rank_pressed.png
│ ├── ic_scanner_indicator.png
│ ├── ic_search_white.png
│ ├── ic_shopping_indicator.png
│ ├── ic_skin_selected_indicator.png
│ ├── ic_sound_hound_indicator.png
│ ├── ic_theme_indicator.png
│ ├── ic_timing_indicator.png
│ ├── ic_vip_indicator.png
│ ├── loading.png
│ ├── login_bg.jpg
│ ├── sign_in_normal.png
│ ├── sign_in_pressed.png
│ ├── skin_color.png
│ ├── skin_red.png
│ └── skin_white.png
│ ├── drawable
│ ├── actionbar_discover.xml
│ ├── actionbar_friends.xml
│ ├── actionbar_music.xml
│ ├── day_selector.xml
│ ├── fm_selector.xml
│ ├── home_adjust_background.xml
│ ├── rank_selector.xml
│ ├── select_song_menu_background.xml
│ ├── shape_bg_level.xml
│ ├── shape_bg_sign.xml
│ └── sign_in_icon.xml
│ ├── layout
│ ├── activity_about_skin_lib.xml
│ ├── activity_main.xml
│ ├── activity_skin_lib.xml
│ ├── activity_splash.xml
│ ├── animator_choose_fragment.xml
│ ├── animator_choose_item.xml
│ ├── footer_recommend_item.xml
│ ├── fragment_contacts.xml
│ ├── fragment_discover.xml
│ ├── fragment_feeds.xml
│ ├── fragment_friends.xml
│ ├── fragment_music.xml
│ ├── fragment_nearby.xml
│ ├── fragment_radio.xml
│ ├── fragment_ranking.xml
│ ├── fragment_recommend.xml
│ ├── fragment_song.xml
│ ├── header_recommend_item.xml
│ ├── header_skin_lib.xml
│ ├── header_song_item.xml
│ ├── main_header_layout.xml
│ ├── one_item.xml
│ ├── recommend_item.xml
│ └── skin_lib_item.xml
│ ├── menu
│ ├── menu_main_options.xml
│ └── menu_skin_lib_options.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
│ ├── strings.xml
│ └── styles.xml
├── build.gradle
├── gif
├── 10.gif
├── 11.gif
├── 5.gif
├── 6.gif
├── 7.gif
├── 8.gif
└── 9.gif
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
├── skin-app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── assets
│ └── skins
│ │ └── red.skin
│ ├── java
│ └── com
│ │ └── ximsfei
│ │ └── dynamicskindemo
│ │ ├── App.java
│ │ ├── MainActivity.java
│ │ ├── tab
│ │ ├── ArrayDialogFragment.java
│ │ ├── FirstFragment.java
│ │ ├── LastFragment.java
│ │ ├── MiddleFragment.java
│ │ └── TabFragmentPagerAdapter.java
│ │ └── widget
│ │ ├── CircleImageView.java
│ │ ├── CustomCircleImageView.java
│ │ ├── CustomTextView.java
│ │ └── CustomTextView2.java
│ └── res
│ ├── color
│ └── color_selector.xml
│ ├── drawable-xxhdpi
│ ├── actionbar_discover_normal.png
│ ├── btn_check_to_on_mtrl_000.png
│ ├── btn_check_to_on_mtrl_015.png
│ ├── btn_radio_to_on_mtrl_000.png
│ ├── btn_radio_to_on_mtrl_015.png
│ ├── ic_camera_24dp.png
│ ├── ic_star_48dp.png
│ ├── ic_star_border_48dp.png
│ ├── ic_star_half_48dp.png
│ ├── picture.png
│ ├── refresh.png
│ ├── thumb_dn.png
│ └── thumb_up.png
│ ├── drawable
│ ├── bg_bar.xml
│ ├── button_checked.xml
│ ├── button_radio.xml
│ ├── progress_bar.xml
│ ├── progress_horizontal.xml
│ ├── rating_bar.xml
│ └── thumb_bar.xml
│ ├── layout
│ ├── activity_main.xml
│ ├── animator_choose_fragment.xml
│ ├── animator_choose_item.xml
│ ├── fragment.xml
│ ├── fragment_first.xml
│ ├── fragment_middle.xml
│ └── simple_spinner_item.xml
│ ├── menu
│ └── main_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-v19
│ └── styles.xml
│ ├── values-v21
│ └── styles.xml
│ └── values
│ ├── arrays.xml
│ ├── attrs.xml
│ ├── colors.xml
│ ├── dimens.xml
│ ├── strings.xml
│ └── styles.xml
├── skin-night
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── res
│ ├── color
│ └── color_selector.xml
│ ├── drawable-xxhdpi
│ ├── actionbar_discover_normal.png
│ ├── btn_check_to_on_mtrl_000.png
│ ├── btn_check_to_on_mtrl_015.png
│ ├── btn_radio_to_on_mtrl_000.png
│ ├── btn_radio_to_on_mtrl_015.png
│ ├── ic_camera_24dp.png
│ ├── ic_star_48dp.png
│ ├── ic_star_border_48dp.png
│ ├── ic_star_half_48dp.png
│ ├── picture.png
│ ├── thumb_dn.png
│ └── thumb_up.png
│ ├── drawable
│ ├── bg_bar.xml
│ ├── button_checked.xml
│ ├── button_radio.xml
│ ├── progress_bar.xml
│ ├── progress_horizontal.xml
│ ├── rating_bar.xml
│ └── thumb_bar.xml
│ ├── mipmap-xxhdpi
│ └── ic_launcher.png
│ └── values
│ ├── colors.xml
│ └── strings.xml
├── skin-support-design
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── skin
│ │ └── support
│ │ └── design
│ │ ├── SkinMaterialManager.java
│ │ ├── app
│ │ └── SkinMaterialViewInflater.java
│ │ └── widget
│ │ ├── SkinCompatAppBarLayout.java
│ │ ├── SkinCompatNavigationView.java
│ │ └── SkinCompatTabLayout.java
│ └── res
│ └── values
│ └── strings.xml
└── skin-support
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
└── main
├── AndroidManifest.xml
├── java
└── skin
│ └── support
│ ├── SkinCompatManager.java
│ ├── animator
│ ├── Action.java
│ ├── AnimatorType.java
│ ├── SingleAnimator
│ │ ├── AnimatorConfig.java
│ │ ├── AnimatorManager.java
│ │ ├── ViewAnimatorImpl.java
│ │ ├── ViewAnimatorType.java
│ │ ├── ViewAnimatorUtil.java
│ │ ├── hide
│ │ │ ├── AlphaHideAnimator.java
│ │ │ ├── RotationHideAnimator.java
│ │ │ ├── ScaleHideAnimator.java
│ │ │ ├── TranslationAlphaHideAnimator.java
│ │ │ ├── TranslationAlphaHideAnimator2.java
│ │ │ ├── TranslationHideAnimator.java
│ │ │ ├── TranslationHideAnimator2.java
│ │ │ └── TranslationRotationHideAnimator2.java
│ │ └── update
│ │ │ └── AlphaAnimator.java
│ ├── SkinAnimator.java
│ └── activityAnimator
│ │ ├── ScaleAnimator.java
│ │ ├── ScaleAnimator2.java
│ │ ├── SkinActivityAnimator.java
│ │ ├── SkinAlphaAnimator.java
│ │ ├── SkinRotateAnimator.java
│ │ ├── SkinRotateAnimator2.java
│ │ ├── SkinRotateAnimator3.java
│ │ ├── SkinRotateAnimator4.java
│ │ ├── SkinRotateHintAnimator.java
│ │ ├── TranslationAnimator.java
│ │ └── TranslationAnimator2.java
│ ├── app
│ ├── SkinCompatActivity.java
│ ├── SkinCompatDelegate.java
│ ├── SkinCompatViewInflater.java
│ └── SkinLayoutInflater.java
│ ├── content
│ └── res
│ │ └── SkinCompatResources.java
│ ├── observe
│ ├── SkinObservable.java
│ └── SkinObserver.java
│ ├── utils
│ ├── SkinConstants.java
│ ├── SkinFileUtils.java
│ ├── SkinLog.java
│ └── SkinPreference.java
│ └── widget
│ ├── SkinCompatAutoCompleteTextView.java
│ ├── SkinCompatBackgroundHelper.java
│ ├── SkinCompatButton.java
│ ├── SkinCompatCheckBox.java
│ ├── SkinCompatCheckedTextView.java
│ ├── SkinCompatCompoundButtonHelper.java
│ ├── SkinCompatEditText.java
│ ├── SkinCompatFrameLayout.java
│ ├── SkinCompatHelper.java
│ ├── SkinCompatImageButton.java
│ ├── SkinCompatImageHelper.java
│ ├── SkinCompatImageView.java
│ ├── SkinCompatLinearLayout.java
│ ├── SkinCompatMultiAutoCompleteTextView.java
│ ├── SkinCompatProgressBar.java
│ ├── SkinCompatProgressBarHelper.java
│ ├── SkinCompatRadioButton.java
│ ├── SkinCompatRatingBar.java
│ ├── SkinCompatRelativeLayout.java
│ ├── SkinCompatSeekBar.java
│ ├── SkinCompatSeekBarHelper.java
│ ├── SkinCompatSpinner.java
│ ├── SkinCompatSupportable.java
│ ├── SkinCompatTextHelper.java
│ ├── SkinCompatTextView.java
│ ├── SkinCompatToolbar.java
│ ├── SkinCompatView.java
│ └── animator
│ ├── SkinCompatAnimatorImageView.java
│ └── SkinCompatAnimatorTextView.java
└── res
└── values
├── attrs.xml
└── strings.xml
/.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 | freeline/*
11 | freeline.py
12 | freeline_project_description.json
13 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
20 |
21 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2017 pengfeng wang
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.2"
6 | defaultConfig {
7 | applicationId "com.ximsfei.skindemo"
8 | minSdkVersion 15
9 | targetSdkVersion 25
10 | aaptOptions.cruncherEnabled = false
11 | aaptOptions.useNewCruncher = false
12 | versionCode 1
13 | versionName "1.0"
14 | }
15 | buildTypes {
16 | release {
17 | minifyEnabled false
18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
19 | }
20 | }
21 | dataBinding {
22 | enabled = true
23 | }
24 | }
25 |
26 | repositories {
27 | flatDir {
28 | dirs 'libs'
29 | }
30 | }
31 |
32 | dependencies {
33 | compile fileTree(dir: 'libs', include: ['*.jar'])
34 | compile 'com.android.support:appcompat-v7:25.1.0'
35 | compile 'com.android.support:design:25.1.0'
36 |
37 | compile 'com.jcodecraeer:xrecyclerview:1.3.2'
38 | compile 'com.youth.banner:banner:1.4.8'
39 |
40 | compile 'com.github.bumptech.glide:glide:3.7.0'
41 |
42 | releaseCompile project(path: ':skin-support-design', configuration: 'release')
43 | debugCompile project(path: ':skin-support-design', configuration: 'debug')
44 | }
45 |
--------------------------------------------------------------------------------
/app/libs/skin-support-design-release.aar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/libs/skin-support-design-release.aar
--------------------------------------------------------------------------------
/app/libs/skin-support-release.aar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/libs/skin-support-release.aar
--------------------------------------------------------------------------------
/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 /home/ximsfei/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/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
15 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/assets/skins/night.skin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/assets/skins/night.skin
--------------------------------------------------------------------------------
/app/src/main/assets/skins/white.skin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/assets/skins/white.skin
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/App.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo;
2 |
3 | import android.app.Application;
4 |
5 | import com.ximsfei.skindemo.utils.SPUtils;
6 |
7 | import skin.support.SkinCompatManager;
8 | import skin.support.design.SkinMaterialManager;
9 |
10 | /**
11 | * Created by ximsfei on 17-1-8.
12 | */
13 |
14 | public class App extends Application {
15 | @Override
16 | public void onCreate() {
17 | super.onCreate();
18 | SkinMaterialManager.init(this);
19 | SkinCompatManager.init(this).loadSkin();
20 | SPUtils.init(this);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/SplashActivity.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.view.View;
6 |
7 | import com.ximsfei.skindemo.ui.base.BaseActivity;
8 |
9 | public class SplashActivity extends BaseActivity {
10 |
11 | @Override
12 | protected int getLayoutResId() {
13 | return R.layout.activity_splash;
14 | }
15 |
16 | @Override
17 | protected void onCreate(Bundle savedInstanceState) {
18 | super.onCreate(savedInstanceState);
19 | findViewById(R.id.btn).setOnClickListener(new View.OnClickListener() {
20 | @Override
21 | public void onClick(View v) {
22 | startActivity(new Intent(SplashActivity.this, MainActivity.class));
23 | overridePendingTransition(R.anim.screen_zoom_in, R.anim.screen_zoom_out);
24 | // finish();
25 | }
26 | });
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/bean/ImageItem.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo.bean;
2 |
3 | /**
4 | * Created by pengfengwang on 2017/1/15.
5 | */
6 |
7 | public class ImageItem {
8 | public ImageItem() {
9 | }
10 |
11 | public ImageItem(String title, String subtitle, int image) {
12 | this.title = title;
13 | this.subtitle = subtitle;
14 | this.image = image;
15 | }
16 |
17 | public String title;
18 | public String subtitle;
19 | public int image;
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/bean/RecommendItem.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo.bean;
2 |
3 | /**
4 | * Created by pengfengwang on 2017/1/15.
5 | */
6 |
7 | public class RecommendItem {
8 | public String title;
9 | public int indicator;
10 |
11 | public ImageItem item0;
12 | public ImageItem item1;
13 | public ImageItem item2;
14 | public ImageItem item3;
15 | public ImageItem item4;
16 | public ImageItem item5;
17 | }
18 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/ui/AboutSkinLibActivity.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo.ui;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.Nullable;
5 |
6 | import com.ximsfei.skindemo.R;
7 | import com.ximsfei.skindemo.databinding.ActivityAboutSkinLibBinding;
8 | import com.ximsfei.skindemo.ui.base.BaseActivity;
9 |
10 | /**
11 | * Created by ximsfei on 2017/1/17.
12 | */
13 |
14 | public class AboutSkinLibActivity extends BaseActivity {
15 | @Override
16 | protected int getLayoutResId() {
17 | return R.layout.activity_about_skin_lib;
18 | }
19 |
20 | @Override
21 | protected void onCreate(@Nullable Bundle savedInstanceState) {
22 | super.onCreate(savedInstanceState);
23 | initToolbar(mDataBinding.toolBar);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/ui/DiscoverFragment.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo.ui;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.app.Fragment;
5 | import android.view.LayoutInflater;
6 |
7 | import com.ximsfei.skindemo.R;
8 | import com.ximsfei.skindemo.databinding.FragmentDiscoverBinding;
9 | import com.ximsfei.skindemo.ui.adapter.TabFragmentPagerAdapter;
10 | import com.ximsfei.skindemo.ui.base.BaseFragment;
11 | import com.ximsfei.skindemo.ui.discover.RadioFragment;
12 | import com.ximsfei.skindemo.ui.discover.RankingFragment;
13 | import com.ximsfei.skindemo.ui.discover.RecommendFragment;
14 | import com.ximsfei.skindemo.ui.discover.SongMenuFragment;
15 |
16 | import java.util.ArrayList;
17 | import java.util.List;
18 |
19 | /**
20 | * Created by ximsfei on 17-1-7.
21 | */
22 |
23 | public class DiscoverFragment extends BaseFragment {
24 | private TabFragmentPagerAdapter mTabFragmentPagerAdapter;
25 |
26 | @Override
27 | protected int getLayoutId() {
28 | return R.layout.fragment_discover;
29 | }
30 |
31 | @Override
32 | protected void onCreateVew(LayoutInflater inflater, Bundle savedInstanceState) {
33 | super.onCreateVew(inflater, savedInstanceState);
34 | configFragments();
35 | }
36 |
37 | @Override
38 | protected void loadData() {
39 |
40 | }
41 |
42 | private void configFragments() {
43 | List list = new ArrayList<>();
44 | list.add(new RecommendFragment());
45 | list.add(new SongMenuFragment());
46 | list.add(new RadioFragment());
47 | list.add(new RankingFragment());
48 | List listTitle = new ArrayList<>();
49 | listTitle.add("个性推荐");
50 | listTitle.add("歌单");
51 | listTitle.add("主播电台");
52 | listTitle.add("排行榜");
53 | mTabFragmentPagerAdapter = new TabFragmentPagerAdapter(getChildFragmentManager(), list, listTitle);
54 | mDataBinding.viewPager.setAdapter(mTabFragmentPagerAdapter);
55 | mDataBinding.tabLayout.setupWithViewPager(mDataBinding.viewPager);
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/ui/FriendsFragment.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo.ui;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.app.Fragment;
5 | import android.view.LayoutInflater;
6 |
7 | import com.ximsfei.skindemo.R;
8 | import com.ximsfei.skindemo.databinding.FragmentFriendsBinding;
9 | import com.ximsfei.skindemo.ui.adapter.TabFragmentPagerAdapter;
10 | import com.ximsfei.skindemo.ui.base.BaseFragment;
11 | import com.ximsfei.skindemo.ui.friends.ContactsFragment;
12 | import com.ximsfei.skindemo.ui.friends.FeedsFragment;
13 | import com.ximsfei.skindemo.ui.friends.NearbyFragment;
14 |
15 | import java.util.ArrayList;
16 | import java.util.List;
17 |
18 | /**
19 | * Created by ximsfei on 17-1-7.
20 | */
21 |
22 | public class FriendsFragment extends BaseFragment {
23 | private TabFragmentPagerAdapter mTabFragmentPagerAdapter;
24 |
25 | @Override
26 | protected int getLayoutId() {
27 | return R.layout.fragment_friends;
28 | }
29 |
30 | @Override
31 | protected void onCreateVew(LayoutInflater inflater, Bundle savedInstanceState) {
32 | super.onCreateVew(inflater, savedInstanceState);
33 | configFragments();
34 | }
35 |
36 | @Override
37 | protected void loadData() {
38 |
39 | }
40 |
41 | private void configFragments() {
42 | List list = new ArrayList<>();
43 | list.add(new FeedsFragment());
44 | list.add(new NearbyFragment());
45 | list.add(new ContactsFragment());
46 | List listTitle = new ArrayList<>();
47 | listTitle.add("动态");
48 | listTitle.add("附近");
49 | listTitle.add("好友");
50 | mTabFragmentPagerAdapter = new TabFragmentPagerAdapter(getChildFragmentManager(), list, listTitle);
51 | mDataBinding.viewPager.setAdapter(mTabFragmentPagerAdapter);
52 | mDataBinding.tabLayout.setupWithViewPager(mDataBinding.viewPager);
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/ui/MusicFragment.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo.ui;
2 |
3 | import com.ximsfei.skindemo.R;
4 | import com.ximsfei.skindemo.databinding.FragmentMusicBinding;
5 | import com.ximsfei.skindemo.ui.base.BaseFragment;
6 |
7 | /**
8 | * Created by ximsfei on 17-1-7.
9 | */
10 |
11 | public class MusicFragment extends BaseFragment {
12 | @Override
13 | protected int getLayoutId() {
14 | return R.layout.fragment_music;
15 | }
16 |
17 | @Override
18 | protected void loadData() {
19 |
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/ui/adapter/SkinLibAdapter.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo.ui.adapter;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 | import android.view.ViewGroup;
5 |
6 | import com.ximsfei.skindemo.ui.adapter.baseadapter.BaseRecyclerViewAdapter;
7 |
8 | /**
9 | * Created by pengfengwang on 2017/1/16.
10 | */
11 | public class SkinLibAdapter extends BaseRecyclerViewAdapter {
12 | @Override
13 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
14 | return null;
15 | }
16 |
17 | @Override
18 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
19 |
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/ui/adapter/SongMenuAdapter.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo.ui.adapter;
2 |
3 | import android.content.Context;
4 | import android.support.v4.app.FragmentActivity;
5 | import android.support.v7.widget.RecyclerView;
6 | import android.view.ViewGroup;
7 |
8 | import com.ximsfei.skindemo.bean.RecommendItem;
9 | import com.ximsfei.skindemo.ui.adapter.baseadapter.BaseRecyclerViewAdapter;
10 |
11 | /**
12 | * Created by ximsfei on 17-1-15.
13 | */
14 | public class SongMenuAdapter extends BaseRecyclerViewAdapter {
15 | public SongMenuAdapter(Context context) {
16 | }
17 |
18 | @Override
19 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
20 | return null;
21 | }
22 |
23 | @Override
24 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
25 |
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/ui/adapter/TabFragmentPagerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo.ui.adapter;
2 |
3 | import android.support.v4.app.Fragment;
4 | import android.support.v4.app.FragmentManager;
5 | import android.support.v4.app.FragmentPagerAdapter;
6 |
7 | import java.util.List;
8 |
9 | /**
10 | * Created by ximsfei on 17-1-7.
11 | */
12 |
13 | public class TabFragmentPagerAdapter extends FragmentPagerAdapter {
14 |
15 | private List mFragments;
16 | private List mTitles;
17 |
18 | public TabFragmentPagerAdapter(FragmentManager fragmentManager, List fragments) {
19 | super(fragmentManager);
20 | mFragments = fragments;
21 | }
22 |
23 | public TabFragmentPagerAdapter(FragmentManager fragmentManager, List fragments, List titles) {
24 | super(fragmentManager);
25 | mFragments = fragments;
26 | mTitles = titles;
27 | }
28 |
29 | @Override
30 | public Fragment getItem(int position) {
31 | return mFragments.get(position);
32 | }
33 |
34 | @Override
35 | public int getCount() {
36 | return mFragments.size();
37 | }
38 |
39 | @Override
40 | public CharSequence getPageTitle(int position) {
41 | return mTitles != null ? mTitles.get(position) : "";
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/ui/adapter/baseadapter/BaseRecyclerViewAdapter.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo.ui.adapter.baseadapter;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 |
5 | import java.util.ArrayList;
6 | import java.util.List;
7 |
8 | /**
9 | * Created by ximsfei on 2017/1/15.
10 | */
11 | public abstract class BaseRecyclerViewAdapter extends RecyclerView.Adapter {
12 |
13 | protected List data = new ArrayList<>();
14 | protected OnItemClickListener listener;
15 |
16 | @Override
17 | public void onBindViewHolder(BaseRecyclerViewHolder holder, final int position) {
18 | holder.onBaseBindViewHolder(data.get(position), position);
19 | }
20 |
21 | @Override
22 | public int getItemCount() {
23 | return data.size();
24 | }
25 |
26 | public void addAll(List data) {
27 | this.data.addAll(data);
28 | }
29 |
30 | public void add(T object) {
31 | data.add(object);
32 | }
33 |
34 | public void clear() {
35 | data.clear();
36 | }
37 |
38 | public void remove(T object) {
39 | data.remove(object);
40 | }
41 |
42 | public void remove(int position) {
43 | data.remove(position);
44 | }
45 |
46 | public void removeAll(List data) {
47 | this.data.retainAll(data);
48 | }
49 |
50 | public void setOnItemClickListener(OnItemClickListener listener) {
51 | this.listener = listener;
52 | }
53 |
54 | public List getData() {
55 | return data;
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/ui/adapter/baseadapter/BaseRecyclerViewHolder.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo.ui.adapter.baseadapter;
2 |
3 | import android.databinding.DataBindingUtil;
4 | import android.databinding.ViewDataBinding;
5 | import android.support.v7.widget.RecyclerView;
6 | import android.view.LayoutInflater;
7 | import android.view.ViewGroup;
8 |
9 | /**
10 | * Created by ximsfei on 2017/1/15.
11 | */
12 | public abstract class BaseRecyclerViewHolder extends RecyclerView.ViewHolder {
13 |
14 | public D mBinding;
15 |
16 | public BaseRecyclerViewHolder(ViewGroup viewGroup, int layoutId) {
17 | super(DataBindingUtil.inflate(LayoutInflater.from(viewGroup.getContext()), layoutId, viewGroup, false).getRoot());
18 | mBinding = DataBindingUtil.getBinding(this.itemView);
19 | }
20 |
21 | /**
22 | * @param bean the data of bind
23 | * @param position the item position of recyclerView
24 | */
25 | public abstract void onBindViewHolder(T bean, final int position);
26 |
27 | /**
28 | * 当数据改变时,binding会在下一帧去改变数据,如果我们需要立即改变,就去调用executePendingBindings方法。
29 | */
30 | void onBaseBindViewHolder(T object, final int position) {
31 | onBindViewHolder(object, position);
32 | mBinding.executePendingBindings();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/ui/adapter/baseadapter/OnItemClickListener.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo.ui.adapter.baseadapter;
2 |
3 | /**
4 | * Created by ximsfei on 2017/1/15.
5 | */
6 | public interface OnItemClickListener {
7 | public void onClick(T t, int position);
8 | }
9 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/ui/base/BaseFragment.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo.ui.base;
2 |
3 | import android.databinding.DataBindingUtil;
4 | import android.databinding.ViewDataBinding;
5 | import android.os.Bundle;
6 | import android.support.annotation.LayoutRes;
7 | import android.support.annotation.Nullable;
8 | import android.support.v4.app.Fragment;
9 | import android.view.LayoutInflater;
10 | import android.view.View;
11 | import android.view.ViewGroup;
12 |
13 | /**
14 | * Created by ximsfei on 17-1-7.
15 | */
16 |
17 | public abstract class BaseFragment extends Fragment {
18 | protected VDB mDataBinding;
19 |
20 | @LayoutRes
21 | protected abstract int getLayoutId();
22 |
23 | @Override
24 | public void onActivityCreated(@Nullable Bundle savedInstanceState) {
25 | super.onActivityCreated(savedInstanceState);
26 | loadData();
27 | }
28 |
29 | @Nullable
30 | @Override
31 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
32 | View view = inflater.inflate(getLayoutId(), null);
33 | mDataBinding = DataBindingUtil.bind(view);
34 | onCreateVew(inflater, savedInstanceState);
35 | return view;
36 | }
37 |
38 | protected void onCreateVew(LayoutInflater inflater, Bundle savedInstanceState) {
39 |
40 | }
41 |
42 | protected abstract void loadData();
43 | }
44 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/ui/discover/RankingFragment.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo.ui.discover;
2 |
3 | import com.ximsfei.skindemo.R;
4 | import com.ximsfei.skindemo.databinding.FragmentRankingBinding;
5 | import com.ximsfei.skindemo.ui.base.BaseFragment;
6 |
7 | /**
8 | * Created by ximsfei on 17-1-8.
9 | */
10 |
11 | public class RankingFragment extends BaseFragment {
12 | @Override
13 | protected int getLayoutId() {
14 | return R.layout.fragment_ranking;
15 | }
16 |
17 | @Override
18 | protected void loadData() {
19 |
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/ui/discover/SongMenuFragment.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo.ui.discover;
2 |
3 | import android.databinding.DataBindingUtil;
4 | import android.os.Bundle;
5 | import android.support.v7.widget.DefaultItemAnimator;
6 | import android.support.v7.widget.LinearLayoutManager;
7 | import android.view.LayoutInflater;
8 |
9 | import com.ximsfei.skindemo.R;
10 | import com.ximsfei.skindemo.databinding.FragmentSongBinding;
11 | import com.ximsfei.skindemo.databinding.HeaderSongItemBinding;
12 | import com.ximsfei.skindemo.ui.adapter.SongMenuAdapter;
13 | import com.ximsfei.skindemo.ui.base.BaseFragment;
14 |
15 | /**
16 | * Created by ximsfei on 17-1-8.
17 | */
18 |
19 | public class SongMenuFragment extends BaseFragment {
20 | private HeaderSongItemBinding mHeaderBinding;
21 | private SongMenuAdapter mAdapter;
22 |
23 | @Override
24 | protected int getLayoutId() {
25 | return R.layout.fragment_song;
26 | }
27 |
28 | @Override
29 | protected void onCreateVew(LayoutInflater inflater, Bundle savedInstanceState) {
30 | super.onCreateVew(inflater, savedInstanceState);
31 | mHeaderBinding = DataBindingUtil.inflate(LayoutInflater.from(getContext()), R.layout.header_song_item, null, false);
32 | initRecyclerView();
33 | }
34 |
35 | private void initRecyclerView() {
36 | mDataBinding.recyclerView.setPullRefreshEnabled(false);
37 | mDataBinding.recyclerView.setLoadingMoreEnabled(true);
38 | mDataBinding.recyclerView.addHeaderView(mHeaderBinding.getRoot());
39 | mDataBinding.recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
40 | mDataBinding.recyclerView.setNestedScrollingEnabled(false);
41 | mDataBinding.recyclerView.setHasFixedSize(false);
42 | mDataBinding.recyclerView.setItemAnimator(new DefaultItemAnimator());
43 | mAdapter = new SongMenuAdapter(getActivity());
44 | mDataBinding.recyclerView.setAdapter(mAdapter);
45 | }
46 |
47 | @Override
48 | protected void loadData() {
49 |
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/ui/friends/ContactsFragment.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo.ui.friends;
2 |
3 | import com.ximsfei.skindemo.R;
4 | import com.ximsfei.skindemo.ui.base.BaseFragment;
5 |
6 | /**
7 | * Created by ximsfei on 17-1-8.
8 | */
9 |
10 | public class ContactsFragment extends BaseFragment {
11 | @Override
12 | protected int getLayoutId() {
13 | return R.layout.fragment_contacts;
14 | }
15 |
16 | @Override
17 | protected void loadData() {
18 |
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/ui/friends/FeedsFragment.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo.ui.friends;
2 |
3 | import com.ximsfei.skindemo.R;
4 | import com.ximsfei.skindemo.ui.base.BaseFragment;
5 |
6 | /**
7 | * Created by ximsfei on 17-1-8.
8 | */
9 |
10 | public class FeedsFragment extends BaseFragment {
11 | @Override
12 | protected int getLayoutId() {
13 | return R.layout.fragment_feeds;
14 | }
15 |
16 | @Override
17 | protected void loadData() {
18 |
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/ui/friends/NearbyFragment.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo.ui.friends;
2 |
3 | import com.ximsfei.skindemo.R;
4 | import com.ximsfei.skindemo.ui.base.BaseFragment;
5 |
6 | /**
7 | * Created by ximsfei on 17-1-8.
8 | */
9 |
10 | public class NearbyFragment extends BaseFragment {
11 | @Override
12 | protected int getLayoutId() {
13 | return R.layout.fragment_nearby;
14 | }
15 |
16 | @Override
17 | protected void loadData() {
18 |
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/utils/SPUtils.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo.utils;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 |
6 | import skin.support.SkinCompatManager;
7 |
8 | /**
9 | * Created by ximsfei on 17-1-8.
10 | */
11 |
12 | public class SPUtils {
13 | private static final String FILE_NAME = "meta-data";
14 |
15 | private static final String KEY_MODE_NIGHT = "mode-night";
16 | private static final String KEY_CUR_SKIN = "cur-skin";
17 | private static SPUtils sInstance;
18 | private final Context mApp;
19 | private final SharedPreferences mPref;
20 | private final SharedPreferences.Editor mEditor;
21 |
22 | public static void init(Context context) {
23 | if (sInstance == null) {
24 | synchronized (SPUtils.class) {
25 | if (sInstance == null) {
26 | sInstance = new SPUtils(context.getApplicationContext());
27 | }
28 | }
29 | }
30 | }
31 |
32 | public static SPUtils getInstance() {
33 | return sInstance;
34 | }
35 |
36 | private SPUtils(Context applicationContext) {
37 | mApp = applicationContext;
38 | mPref = mApp.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE);
39 | mEditor = mPref.edit();
40 | }
41 |
42 | public SPUtils setNightMode(boolean nightMode) {
43 | mEditor.putBoolean(KEY_MODE_NIGHT, nightMode);
44 | return this;
45 | }
46 |
47 | public boolean getNightMode() {
48 | return mPref.getBoolean(KEY_MODE_NIGHT, false);
49 | }
50 |
51 | public void commitEditor() {
52 | mEditor.apply();
53 | }
54 |
55 | public SPUtils setCurSkin(String curSkinName) {
56 | mEditor.putString(KEY_CUR_SKIN, curSkinName);
57 | return this;
58 | }
59 |
60 | public String getCurSkin() {
61 | return mPref.getString(KEY_CUR_SKIN, "");
62 | }
63 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/ximsfei/skindemo/widget/SquareImageView.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.skindemo.widget;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.widget.ImageView;
6 |
7 | /**
8 | * Created by pengfengwang on 2017/1/16.
9 | */
10 |
11 | public class SquareImageView extends ImageView {
12 | private static final float DEFAULT_ASPECT_RATIO = 1.0f;
13 | private float mAspectRatio = DEFAULT_ASPECT_RATIO;
14 |
15 | public SquareImageView(Context context) {
16 | super(context);
17 | }
18 |
19 | public SquareImageView(Context context, AttributeSet attrs) {
20 | super(context, attrs);
21 | }
22 |
23 | public SquareImageView(Context context, AttributeSet attrs, int defStyleAttr) {
24 | super(context, attrs, defStyleAttr);
25 | }
26 |
27 | @Override
28 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
29 | super.onMeasure(widthMeasureSpec, heightMeasureSpec);
30 | if (mAspectRatio <= 0) {
31 | mAspectRatio = DEFAULT_ASPECT_RATIO;
32 | }
33 | setMeasuredDimension(getMeasuredWidth(), (int) (getMeasuredWidth() * mAspectRatio));
34 | }
35 |
36 | public void setAspectRatio(float aspectRatio) {
37 | mAspectRatio = aspectRatio;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/screen_zoom_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/screen_zoom_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/color/day_recommend_color_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/color/fine_song_background_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/color/select_song_menu_stroke_color.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/color/selectable_text_color.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/b_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/b_1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/b_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/b_2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/b_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/b_3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/b_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/b_4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/b_5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/b_5.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/b_6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/b_6.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/ic_screen_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/ic_screen_default.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/splash0.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/splash0.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/splash1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/splash1.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/splash10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/splash10.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/splash11.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/splash11.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/splash12.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/splash12.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/splash13.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/splash13.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/splash14.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/splash14.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/splash15.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/splash15.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/splash16.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/splash16.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/splash2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/splash2.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/splash3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/splash3.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/splash4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/splash4.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/splash5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/splash5.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/splash6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/splash6.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/splash7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/splash7.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/splash8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/splash8.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/splash9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-nodpi/splash9.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/header_layout_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/header_layout_bg.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_10.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_11.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_12.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_13.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_14.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_15.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_16.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_17.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_17.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_18.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_18.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_19.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_20.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_21.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_21.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_22.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_22.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_23.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_23.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_24.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_25.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_25.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_26.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_26.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_27.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_27.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_28.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_28.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_29.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_30.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_30.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_5.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_6.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_7.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_8.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/home_six_9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/home_six_9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/message.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/message.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/photo.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xhdpi/photo.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/actionbar_discover_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/actionbar_discover_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/actionbar_discover_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/actionbar_discover_selected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/actionbar_friends_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/actionbar_friends_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/actionbar_friends_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/actionbar_friends_selected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/actionbar_music_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/actionbar_music_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/actionbar_music_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/actionbar_music_selected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/android_group.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/android_group.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/home_banner_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/home_banner_1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/home_banner_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/home_banner_10.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/home_banner_11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/home_banner_11.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/home_banner_12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/home_banner_12.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/home_banner_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/home_banner_2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/home_banner_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/home_banner_3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/home_banner_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/home_banner_4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/home_banner_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/home_banner_5.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/home_banner_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/home_banner_6.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/home_banner_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/home_banner_7.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/home_banner_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/home_banner_8.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/home_banner_9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/home_banner_9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_back.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_banner_grey.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_banner_grey.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_banner_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_banner_red.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_birthday_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_birthday_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_birthday_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_birthday_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_day_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_day_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_day_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_day_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_daynight_indicator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_daynight_indicator.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_driving_mode_indicator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_driving_mode_indicator.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_fm_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_fm_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_fm_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_fm_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_indicator_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_indicator_0.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_indicator_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_indicator_1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_indicator_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_indicator_2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_indicator_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_indicator_3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_indicator_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_indicator_4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_menu.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_message_indicator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_message_indicator.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_more_indicator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_more_indicator.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_music_alarm_indicator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_music_alarm_indicator.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_online_indicator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_online_indicator.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_rank_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_rank_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_rank_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_rank_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_scanner_indicator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_scanner_indicator.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_search_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_search_white.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_shopping_indicator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_shopping_indicator.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_skin_selected_indicator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_skin_selected_indicator.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_sound_hound_indicator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_sound_hound_indicator.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_theme_indicator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_theme_indicator.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_timing_indicator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_timing_indicator.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_vip_indicator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/ic_vip_indicator.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/loading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/loading.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/login_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/login_bg.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/sign_in_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/sign_in_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/sign_in_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/sign_in_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/skin_color.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/skin_color.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/skin_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/skin_red.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/skin_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/drawable-xxhdpi/skin_white.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/actionbar_discover.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/actionbar_friends.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/actionbar_music.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/day_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/fm_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/home_adjust_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | -
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/rank_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/select_song_menu_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_bg_level.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_bg_sign.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/sign_in_icon.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_skin_lib.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
11 |
14 |
15 |
16 |
20 |
21 |
28 |
29 |
38 |
39 |
40 |
41 |
42 |
46 |
47 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_splash.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/animator_choose_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/animator_choose_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/footer_recommend_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
15 |
16 |
25 |
26 |
37 |
38 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_contacts.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
10 |
11 |
12 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_discover.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
10 |
11 |
12 |
16 |
17 |
18 |
22 |
23 |
30 |
31 |
32 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_feeds.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
10 |
11 |
12 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_friends.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
10 |
11 |
12 |
16 |
20 |
21 |
28 |
29 |
30 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_music.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
10 |
11 |
12 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_nearby.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
10 |
11 |
12 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_ranking.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
10 |
11 |
12 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_recommend.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
11 |
16 |
17 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_song.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
11 |
16 |
17 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/one_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
15 |
16 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/skin_lib_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
13 |
14 |
20 |
21 |
28 |
29 |
30 |
37 |
38 |
47 |
48 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main_options.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_skin_lib_options.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #ffce3d3a
4 | #fffaebeb
5 | #ffce3d3a
6 | #ffce3d3a
7 | #ffce3d3a
8 | #88000000
9 | #ffce0f00
10 | #ffffffff
11 | #ff333333
12 | #ffffffff
13 | #ffce3d3a
14 | #ffffffff
15 | #ffd4d4d4
16 | #f2f4f5
17 | #ffce3d3a
18 |
19 | #7d7d7d
20 | #fffaebeb
21 | #3d3d3d
22 | #ffffffff
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 24dp
6 | 24sp
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 最佳换肤实践
3 | 搜索
4 | 管理
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
14 |
15 |
18 |
19 |
23 |
24 |
27 |
28 |
31 |
32 |
--------------------------------------------------------------------------------
/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 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.3'
9 | classpath 'com.antfortune.freeline:gradle:0.8.6'
10 |
11 | // NOTE: Do not place your application dependencies here; they belong
12 | // in the individual module build.gradle files
13 | }
14 | }
15 |
16 | allprojects {
17 | repositories {
18 | jcenter()
19 | }
20 | }
21 |
22 | task clean(type: Delete) {
23 | delete rootProject.buildDir
24 | }
25 |
--------------------------------------------------------------------------------
/gif/10.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/gif/10.gif
--------------------------------------------------------------------------------
/gif/11.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/gif/11.gif
--------------------------------------------------------------------------------
/gif/5.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/gif/5.gif
--------------------------------------------------------------------------------
/gif/6.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/gif/6.gif
--------------------------------------------------------------------------------
/gif/7.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/gif/7.gif
--------------------------------------------------------------------------------
/gif/8.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/gif/8.gif
--------------------------------------------------------------------------------
/gif/9.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/gif/9.gif
--------------------------------------------------------------------------------
/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 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
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-2.14.1-all.zip
7 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':skin-support', ':skin-night', ':skin-support-design', ':app'
2 |
--------------------------------------------------------------------------------
/skin-app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/skin-app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'com.antfortune.freeline'
3 |
4 | android {
5 | compileSdkVersion 25
6 | buildToolsVersion "25.0.2"
7 |
8 | defaultConfig {
9 | minSdkVersion 16
10 | targetSdkVersion 25
11 | versionCode 1
12 | versionName "1.0"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | compile 'com.android.support:appcompat-v7:25.1.0'
25 |
26 | releaseCompile project(path: ':skin-support-design', configuration: 'release')
27 | debugCompile project(path: ':skin-support-design', configuration: 'debug')
28 | }
29 |
--------------------------------------------------------------------------------
/skin-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 /home/ximsfei/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 |
--------------------------------------------------------------------------------
/skin-app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/skin-app/src/main/assets/skins/red.skin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-app/src/main/assets/skins/red.skin
--------------------------------------------------------------------------------
/skin-app/src/main/java/com/ximsfei/dynamicskindemo/App.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.dynamicskindemo;
2 |
3 | import android.app.Application;
4 |
5 | import skin.support.SkinCompatManager;
6 | import skin.support.design.SkinMaterialManager;
7 |
8 | /**
9 | * Created by ximsfei on 2017/1/10.
10 | */
11 |
12 | public class App extends Application {
13 | @Override
14 | public void onCreate() {
15 | super.onCreate();
16 | SkinMaterialManager.init(this);
17 | SkinCompatManager.init(this).loadSkin();
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/skin-app/src/main/java/com/ximsfei/dynamicskindemo/tab/LastFragment.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.dynamicskindemo.tab;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.Nullable;
5 | import android.support.v4.app.Fragment;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 |
10 | import com.ximsfei.dynamicskindemo.R;
11 |
12 | /**
13 | * Created by ximsfei on 17-1-14.
14 | */
15 |
16 | public class LastFragment extends Fragment {
17 | @Nullable
18 | @Override
19 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
20 | View view = inflater.inflate(R.layout.fragment, null);
21 | return view;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/skin-app/src/main/java/com/ximsfei/dynamicskindemo/tab/MiddleFragment.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.dynamicskindemo.tab;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.Nullable;
5 | import android.support.v4.app.Fragment;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.ArrayAdapter;
10 | import android.widget.Button;
11 | import android.widget.ProgressBar;
12 | import android.widget.Spinner;
13 |
14 | import com.ximsfei.dynamicskindemo.R;
15 |
16 | /**
17 | * Created by ximsfei on 17-1-14.
18 | */
19 |
20 | public class MiddleFragment extends Fragment {
21 | private ProgressBar mHorizontalBar;
22 | private Button mAdd;
23 | private Spinner mSpinner;
24 |
25 | @Nullable
26 | @Override
27 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
28 | View view = inflater.inflate(R.layout.fragment_middle, null);
29 | mHorizontalBar = (ProgressBar) view.findViewById(R.id.progress_horizontal);
30 | mAdd = (Button) view.findViewById(R.id.add);
31 | mAdd.setOnClickListener(new View.OnClickListener() {
32 | @Override
33 | public void onClick(View view) {
34 | mHorizontalBar.setProgress(mHorizontalBar.getProgress() + 2);
35 | }
36 | });
37 | mSpinner = (Spinner) view.findViewById(R.id.spinner);
38 | final CharSequence[] entries = getResources().getStringArray(R.array.languages);
39 | if (entries != null) {
40 | final ArrayAdapter adapter = new ArrayAdapter<>(getActivity(), R.layout.simple_spinner_item, entries);
41 | adapter.setDropDownViewResource(R.layout.simple_spinner_item);
42 | mSpinner.setAdapter(adapter);
43 | }
44 | return view;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/skin-app/src/main/java/com/ximsfei/dynamicskindemo/tab/TabFragmentPagerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.dynamicskindemo.tab;
2 |
3 | import android.support.v4.app.Fragment;
4 | import android.support.v4.app.FragmentManager;
5 | import android.support.v4.app.FragmentPagerAdapter;
6 |
7 | import java.util.List;
8 |
9 | /**
10 | * Created by ximsfei on 17-1-7.
11 | */
12 |
13 | public class TabFragmentPagerAdapter extends FragmentPagerAdapter {
14 |
15 | private List mFragments;
16 | private List mTitles;
17 |
18 | public TabFragmentPagerAdapter(FragmentManager fragmentManager, List fragments) {
19 | super(fragmentManager);
20 | mFragments = fragments;
21 | }
22 |
23 | public TabFragmentPagerAdapter(FragmentManager fragmentManager, List fragments, List titles) {
24 | super(fragmentManager);
25 | mFragments = fragments;
26 | mTitles = titles;
27 | }
28 |
29 | @Override
30 | public Fragment getItem(int position) {
31 | return mFragments.get(position);
32 | }
33 |
34 | @Override
35 | public int getCount() {
36 | return mFragments.size();
37 | }
38 |
39 | @Override
40 | public CharSequence getPageTitle(int position) {
41 | return mTitles != null ? mTitles.get(position) : "";
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/skin-app/src/main/java/com/ximsfei/dynamicskindemo/widget/CustomTextView.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.dynamicskindemo.widget;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 |
6 | import skin.support.widget.SkinCompatTextView;
7 |
8 | /**
9 | * Created by ximsfei on 2017/1/17.
10 | */
11 |
12 | public class CustomTextView extends SkinCompatTextView {
13 | public CustomTextView(Context context) {
14 | super(context);
15 | }
16 |
17 | public CustomTextView(Context context, AttributeSet attrs) {
18 | super(context, attrs);
19 | }
20 |
21 | public CustomTextView(Context context, AttributeSet attrs, int defStyleAttr) {
22 | super(context, attrs, defStyleAttr);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/skin-app/src/main/java/com/ximsfei/dynamicskindemo/widget/CustomTextView2.java:
--------------------------------------------------------------------------------
1 | package com.ximsfei.dynamicskindemo.widget;
2 |
3 | import android.content.Context;
4 | import android.support.annotation.DrawableRes;
5 | import android.util.AttributeSet;
6 | import android.widget.TextView;
7 |
8 | import skin.support.widget.SkinCompatBackgroundHelper;
9 | import skin.support.widget.SkinCompatSupportable;
10 | import skin.support.widget.SkinCompatTextHelper;
11 |
12 | /**
13 | * Created by ximsfei on 2017/1/17.
14 | */
15 |
16 | public class CustomTextView2 extends TextView implements SkinCompatSupportable {
17 | private SkinCompatTextHelper mTextHelper;
18 | private SkinCompatBackgroundHelper mBackgroundTintHelper;
19 |
20 | public CustomTextView2(Context context) {
21 | this(context, null);
22 | }
23 |
24 | public CustomTextView2(Context context, AttributeSet attrs) {
25 | this(context, attrs, 0);
26 | }
27 |
28 | public CustomTextView2(Context context, AttributeSet attrs, int defStyleAttr) {
29 | super(context, attrs, defStyleAttr);
30 | mBackgroundTintHelper = new SkinCompatBackgroundHelper(this);
31 | mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr);
32 | mTextHelper = new SkinCompatTextHelper(this);
33 | mTextHelper.loadFromAttributes(attrs, defStyleAttr);
34 | }
35 |
36 | @Override
37 | public void setBackgroundResource(@DrawableRes int resId) {
38 | super.setBackgroundResource(resId);
39 | if (mBackgroundTintHelper != null) {
40 | mBackgroundTintHelper.onSetBackgroundResource(resId);
41 | }
42 | }
43 |
44 | @Override
45 | public void setTextAppearance(Context context, int resId) {
46 | super.setTextAppearance(context, resId);
47 | if (mTextHelper != null) {
48 | mTextHelper.onSetTextAppearance(context, resId);
49 | }
50 | }
51 |
52 | @Override
53 | public void applySkin() {
54 | if (mBackgroundTintHelper != null) {
55 | mBackgroundTintHelper.applySkin();
56 | }
57 | if (mTextHelper != null) {
58 | mTextHelper.applySkin();
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/color/color_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/drawable-xxhdpi/actionbar_discover_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-app/src/main/res/drawable-xxhdpi/actionbar_discover_normal.png
--------------------------------------------------------------------------------
/skin-app/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_000.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-app/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_000.png
--------------------------------------------------------------------------------
/skin-app/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_015.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-app/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_015.png
--------------------------------------------------------------------------------
/skin-app/src/main/res/drawable-xxhdpi/btn_radio_to_on_mtrl_000.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-app/src/main/res/drawable-xxhdpi/btn_radio_to_on_mtrl_000.png
--------------------------------------------------------------------------------
/skin-app/src/main/res/drawable-xxhdpi/btn_radio_to_on_mtrl_015.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-app/src/main/res/drawable-xxhdpi/btn_radio_to_on_mtrl_015.png
--------------------------------------------------------------------------------
/skin-app/src/main/res/drawable-xxhdpi/ic_camera_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-app/src/main/res/drawable-xxhdpi/ic_camera_24dp.png
--------------------------------------------------------------------------------
/skin-app/src/main/res/drawable-xxhdpi/ic_star_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-app/src/main/res/drawable-xxhdpi/ic_star_48dp.png
--------------------------------------------------------------------------------
/skin-app/src/main/res/drawable-xxhdpi/ic_star_border_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-app/src/main/res/drawable-xxhdpi/ic_star_border_48dp.png
--------------------------------------------------------------------------------
/skin-app/src/main/res/drawable-xxhdpi/ic_star_half_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-app/src/main/res/drawable-xxhdpi/ic_star_half_48dp.png
--------------------------------------------------------------------------------
/skin-app/src/main/res/drawable-xxhdpi/picture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-app/src/main/res/drawable-xxhdpi/picture.png
--------------------------------------------------------------------------------
/skin-app/src/main/res/drawable-xxhdpi/refresh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-app/src/main/res/drawable-xxhdpi/refresh.png
--------------------------------------------------------------------------------
/skin-app/src/main/res/drawable-xxhdpi/thumb_dn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-app/src/main/res/drawable-xxhdpi/thumb_dn.png
--------------------------------------------------------------------------------
/skin-app/src/main/res/drawable-xxhdpi/thumb_up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-app/src/main/res/drawable-xxhdpi/thumb_up.png
--------------------------------------------------------------------------------
/skin-app/src/main/res/drawable/bg_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 | -
9 |
10 |
11 |
12 |
13 |
14 |
15 | -
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/drawable/button_checked.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/drawable/button_radio.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/drawable/progress_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/drawable/progress_horizontal.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
12 |
13 |
14 |
15 | -
16 |
17 |
18 |
19 |
25 |
26 |
27 |
28 |
29 | -
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/drawable/rating_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/drawable/thumb_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/layout/animator_choose_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
9 |
10 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/layout/animator_choose_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/layout/fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
23 |
24 |
28 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/layout/simple_spinner_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/menu/main_menu.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/skin-app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/skin-app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/skin-app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/skin-app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/skin-app/src/main/res/values-v19/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - Android Spinner popup mode
5 | - Java Spinner popup mode
6 | - H5 Spinner popup mode
7 | - PHP Spinner popup mode
8 | - XML Spinner popup mode
9 |
10 |
11 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #aaa
5 | #FF4081
6 | #ff00ff
7 | #000000
8 | #ff000000
9 |
10 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 24dp
4 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | App
3 |
4 |
--------------------------------------------------------------------------------
/skin-app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
13 |
17 |
18 |
21 |
22 |
27 |
28 |
--------------------------------------------------------------------------------
/skin-night/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/skin-night/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.2"
6 |
7 | defaultConfig {
8 | minSdkVersion 14
9 | targetSdkVersion 25
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:25.1.0'
24 | }
25 |
--------------------------------------------------------------------------------
/skin-night/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 /home/ximsfei/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 |
--------------------------------------------------------------------------------
/skin-night/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/skin-night/src/main/res/color/color_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/skin-night/src/main/res/drawable-xxhdpi/actionbar_discover_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-night/src/main/res/drawable-xxhdpi/actionbar_discover_normal.png
--------------------------------------------------------------------------------
/skin-night/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_000.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-night/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_000.png
--------------------------------------------------------------------------------
/skin-night/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_015.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-night/src/main/res/drawable-xxhdpi/btn_check_to_on_mtrl_015.png
--------------------------------------------------------------------------------
/skin-night/src/main/res/drawable-xxhdpi/btn_radio_to_on_mtrl_000.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-night/src/main/res/drawable-xxhdpi/btn_radio_to_on_mtrl_000.png
--------------------------------------------------------------------------------
/skin-night/src/main/res/drawable-xxhdpi/btn_radio_to_on_mtrl_015.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-night/src/main/res/drawable-xxhdpi/btn_radio_to_on_mtrl_015.png
--------------------------------------------------------------------------------
/skin-night/src/main/res/drawable-xxhdpi/ic_camera_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-night/src/main/res/drawable-xxhdpi/ic_camera_24dp.png
--------------------------------------------------------------------------------
/skin-night/src/main/res/drawable-xxhdpi/ic_star_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-night/src/main/res/drawable-xxhdpi/ic_star_48dp.png
--------------------------------------------------------------------------------
/skin-night/src/main/res/drawable-xxhdpi/ic_star_border_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-night/src/main/res/drawable-xxhdpi/ic_star_border_48dp.png
--------------------------------------------------------------------------------
/skin-night/src/main/res/drawable-xxhdpi/ic_star_half_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-night/src/main/res/drawable-xxhdpi/ic_star_half_48dp.png
--------------------------------------------------------------------------------
/skin-night/src/main/res/drawable-xxhdpi/picture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-night/src/main/res/drawable-xxhdpi/picture.png
--------------------------------------------------------------------------------
/skin-night/src/main/res/drawable-xxhdpi/thumb_dn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-night/src/main/res/drawable-xxhdpi/thumb_dn.png
--------------------------------------------------------------------------------
/skin-night/src/main/res/drawable-xxhdpi/thumb_up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-night/src/main/res/drawable-xxhdpi/thumb_up.png
--------------------------------------------------------------------------------
/skin-night/src/main/res/drawable/bg_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 | -
9 |
10 |
11 |
12 |
13 |
14 |
15 | -
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/skin-night/src/main/res/drawable/button_checked.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/skin-night/src/main/res/drawable/button_radio.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/skin-night/src/main/res/drawable/progress_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/skin-night/src/main/res/drawable/progress_horizontal.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
12 |
13 |
14 |
15 | -
16 |
17 |
18 |
19 |
25 |
26 |
27 |
28 |
29 | -
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/skin-night/src/main/res/drawable/rating_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/skin-night/src/main/res/drawable/thumb_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/skin-night/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wutongke/AndroidSkinAnimator/b0716bf7ef411970fba29e1e6a38591ef805ebad/skin-night/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/skin-night/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #7E3230
4 | #ffce3d3a
5 | #aaa
6 | #00ffff
7 | #ffffff
8 | #ffffffff
9 |
10 |
--------------------------------------------------------------------------------
/skin-night/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | SkinSample
3 |
4 |
--------------------------------------------------------------------------------
/skin-support-design/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/skin-support-design/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.2"
6 |
7 | defaultConfig {
8 | minSdkVersion 14
9 | targetSdkVersion 25
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 | publishNonDefault true
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | compile 'com.android.support:appcompat-v7:25.1.0'
25 | compile 'com.android.support:design:25.1.0'
26 | releaseCompile project(path: ':skin-support', configuration: 'release')
27 | debugCompile project(path: ':skin-support', configuration: 'debug')
28 | }
29 |
--------------------------------------------------------------------------------
/skin-support-design/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/ximsfei/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 |
--------------------------------------------------------------------------------
/skin-support-design/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/skin-support-design/src/main/java/skin/support/design/SkinMaterialManager.java:
--------------------------------------------------------------------------------
1 | package skin.support.design;
2 |
3 | import android.content.Context;
4 |
5 | import skin.support.SkinCompatManager;
6 | import skin.support.design.app.SkinMaterialViewInflater;
7 |
8 | /**
9 | * Created by ximsfei on 2017/1/13.
10 | */
11 |
12 | public class SkinMaterialManager {
13 | private static volatile SkinMaterialManager sInstance;
14 |
15 | public static SkinMaterialManager init(Context context) {
16 | if (sInstance == null) {
17 | synchronized (SkinMaterialManager.class) {
18 | if (sInstance == null) {
19 | sInstance = new SkinMaterialManager(context);
20 | }
21 | }
22 | }
23 | return sInstance;
24 | }
25 |
26 | public static SkinMaterialManager getInstance() {
27 | return sInstance;
28 | }
29 |
30 | private SkinMaterialManager(Context context) {
31 | SkinCompatManager.init(context).addInflater(new SkinMaterialViewInflater());
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/skin-support-design/src/main/java/skin/support/design/app/SkinMaterialViewInflater.java:
--------------------------------------------------------------------------------
1 | package skin.support.design.app;
2 |
3 | import android.content.Context;
4 | import android.support.annotation.NonNull;
5 | import android.util.AttributeSet;
6 | import android.view.View;
7 |
8 | import skin.support.app.SkinLayoutInflater;
9 | import skin.support.design.widget.SkinCompatAppBarLayout;
10 | import skin.support.design.widget.SkinCompatNavigationView;
11 | import skin.support.design.widget.SkinCompatTabLayout;
12 |
13 | /**
14 | * Created by ximsfei on 2017/1/13.
15 | */
16 | public class SkinMaterialViewInflater implements SkinLayoutInflater {
17 | @Override
18 | public View createView(@NonNull Context context, final String name, @NonNull AttributeSet attrs) {
19 | View view = null;
20 | switch (name) {
21 | case "android.support.design.widget.AppBarLayout":
22 | view = new SkinCompatAppBarLayout(context, attrs);
23 | break;
24 | case "android.support.design.widget.TabLayout":
25 | view = new SkinCompatTabLayout(context, attrs);
26 | break;
27 | case "android.support.design.widget.NavigationView":
28 | view = new SkinCompatNavigationView(context, attrs);
29 | break;
30 | }
31 | return view;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/skin-support-design/src/main/java/skin/support/design/widget/SkinCompatAppBarLayout.java:
--------------------------------------------------------------------------------
1 | package skin.support.design.widget;
2 |
3 | import android.content.Context;
4 | import android.support.design.widget.AppBarLayout;
5 | import android.util.AttributeSet;
6 |
7 | import skin.support.widget.SkinCompatBackgroundHelper;
8 | import skin.support.widget.SkinCompatSupportable;
9 |
10 | /**
11 | * Created by ximsfei on 2017/1/13.
12 | */
13 |
14 | public class SkinCompatAppBarLayout extends AppBarLayout implements SkinCompatSupportable {
15 | private final SkinCompatBackgroundHelper mBackgroundTintHelper;
16 |
17 | public SkinCompatAppBarLayout(Context context) {
18 | this(context, null);
19 | }
20 |
21 | public SkinCompatAppBarLayout(Context context, AttributeSet attrs) {
22 | super(context, attrs);
23 | mBackgroundTintHelper = new SkinCompatBackgroundHelper(this);
24 | mBackgroundTintHelper.loadFromAttributes(attrs, 0);
25 | }
26 |
27 | @Override
28 | public void applySkin() {
29 | if (mBackgroundTintHelper != null) {
30 | mBackgroundTintHelper.applySkin();
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/skin-support-design/src/main/java/skin/support/design/widget/SkinCompatNavigationView.java:
--------------------------------------------------------------------------------
1 | package skin.support.design.widget;
2 |
3 | import android.content.Context;
4 | import android.support.design.widget.NavigationView;
5 | import android.util.AttributeSet;
6 |
7 | import skin.support.widget.SkinCompatBackgroundHelper;
8 | import skin.support.widget.SkinCompatSupportable;
9 |
10 | /**
11 | * Created by pengfengwang on 2017/1/15.
12 | */
13 |
14 | public class SkinCompatNavigationView extends NavigationView implements SkinCompatSupportable {
15 | private final SkinCompatBackgroundHelper mBackgroundTintHelper;
16 | // private int mBackgroundResId = INVALID_ID;
17 |
18 | public SkinCompatNavigationView(Context context) {
19 | this(context, null);
20 | }
21 |
22 | public SkinCompatNavigationView(Context context, AttributeSet attrs) {
23 | this(context, attrs, 0);
24 | }
25 |
26 | public SkinCompatNavigationView(Context context, AttributeSet attrs, int defStyleAttr) {
27 | super(context, attrs, defStyleAttr);
28 | mBackgroundTintHelper = new SkinCompatBackgroundHelper(this);
29 | mBackgroundTintHelper.loadFromAttributes(attrs, 0);
30 | applySkin();
31 | }
32 |
33 | @Override
34 | public void applySkin() {
35 | if (mBackgroundTintHelper != null) {
36 | mBackgroundTintHelper.applySkin();
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/skin-support-design/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | skin-support-design
3 |
4 |
--------------------------------------------------------------------------------
/skin-support/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/skin-support/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.2"
6 | defaultConfig {
7 | minSdkVersion 14
8 | targetSdkVersion 25
9 | versionCode 1
10 | versionName "1.0"
11 | }
12 | buildTypes {
13 | release {
14 | minifyEnabled false
15 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
16 | }
17 | }
18 | publishNonDefault true
19 | }
20 |
21 | dependencies {
22 | compile fileTree(dir: 'libs', include: ['*.jar'])
23 | compile 'com.android.support:appcompat-v7:25.1.0'
24 | compile 'com.android.support:design:25.1.0'
25 | }
26 |
--------------------------------------------------------------------------------
/skin-support/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 /home/ximsfei/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 |
--------------------------------------------------------------------------------
/skin-support/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/animator/Action.java:
--------------------------------------------------------------------------------
1 | package skin.support.animator;
2 |
3 | /**
4 | * Created by erfli on 2/25/17.
5 | */
6 |
7 | public interface Action {
8 | void action();
9 | }
10 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/animator/SingleAnimator/AnimatorManager.java:
--------------------------------------------------------------------------------
1 | package skin.support.animator.SingleAnimator;
2 |
3 | /**
4 | * Created by erfli on 2/27/17.
5 | */
6 |
7 | public class AnimatorManager {
8 | private static AnimatorConfig config = new AnimatorConfig.Builder().build();
9 |
10 | public static AnimatorConfig getConfig() {
11 | return config;
12 | }
13 |
14 | public static void setConfig(AnimatorConfig animatorConfig) {
15 | config = animatorConfig;
16 | }
17 |
18 | public static void openAnimator(){
19 | config.openAnimator();
20 | }
21 |
22 | public static void closeAnimator(){
23 | config.closeAnimator();
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/animator/SingleAnimator/ViewAnimatorImpl.java:
--------------------------------------------------------------------------------
1 | package skin.support.animator.SingleAnimator;
2 |
3 | import android.support.annotation.NonNull;
4 | import android.support.annotation.Nullable;
5 | import android.view.View;
6 |
7 | import skin.support.animator.Action;
8 | import skin.support.animator.SkinAnimator;
9 |
10 | /**
11 | * Created by erfli on 2/25/17.
12 | */
13 |
14 | public abstract class ViewAnimatorImpl implements SkinAnimator {
15 | @Override
16 | public abstract SkinAnimator apply(@NonNull View view, @Nullable Action action);
17 |
18 | @Override
19 | public SkinAnimator setPreDuration() {
20 | return this;
21 | }
22 |
23 | @Override
24 | public SkinAnimator setAfterDuration() {
25 | return this;
26 | }
27 |
28 | @Override
29 | public SkinAnimator setDuration() {
30 | return this;
31 | }
32 |
33 | @Override
34 | public abstract void start();
35 |
36 | protected void resetView(View view) {
37 | view.setAlpha(1);
38 | view.setScaleY(1);
39 | view.setScaleX(1);
40 | view.setRotation(0);
41 | view.setTranslationX(0);
42 | view.setTranslationY(0);
43 | view.setPivotX(view.getWidth() / 2);
44 | view.setPivotY(view.getHeight() / 2);
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/animator/SingleAnimator/ViewAnimatorUtil.java:
--------------------------------------------------------------------------------
1 | package skin.support.animator.SingleAnimator;
2 |
3 | import android.support.annotation.NonNull;
4 | import android.support.annotation.Nullable;
5 | import android.view.View;
6 |
7 | import skin.support.animator.Action;
8 |
9 | /**
10 | * Created by erfli on 2/27/17.
11 | */
12 |
13 | public class ViewAnimatorUtil {
14 | private ViewAnimatorUtil(){}
15 | public static void executeAnimator(@NonNull View view, @NonNull ViewAnimatorType animatorType, @Nullable Action action) {
16 | animatorType.apply(view, action);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/animator/SingleAnimator/hide/AlphaHideAnimator.java:
--------------------------------------------------------------------------------
1 | package skin.support.animator.SingleAnimator.hide;
2 |
3 | import android.animation.Animator;
4 | import android.animation.AnimatorListenerAdapter;
5 | import android.animation.ObjectAnimator;
6 | import android.animation.PropertyValuesHolder;
7 | import android.support.annotation.NonNull;
8 | import android.support.annotation.Nullable;
9 | import android.view.View;
10 | import android.view.animation.LinearInterpolator;
11 |
12 | import skin.support.animator.Action;
13 | import skin.support.animator.SingleAnimator.ViewAnimatorImpl;
14 | import skin.support.animator.SkinAnimator;
15 |
16 | /**
17 | * Created by erfli on 2/25/17.
18 | */
19 |
20 | public class AlphaHideAnimator extends ViewAnimatorImpl {
21 |
22 | private ObjectAnimator animator;
23 |
24 | private AlphaHideAnimator() {
25 | }
26 |
27 |
28 | public static AlphaHideAnimator getInstance() {
29 | return new AlphaHideAnimator();
30 | }
31 |
32 | @Override
33 | public SkinAnimator apply(@NonNull final View view, @Nullable final Action action) {
34 | animator = ObjectAnimator.ofPropertyValuesHolder(view,
35 | PropertyValuesHolder.ofFloat("alpha", 1, 0)
36 | );
37 | animator.setDuration(3 * PRE_DURATION);
38 | animator.setInterpolator(new LinearInterpolator());
39 | animator.addListener(new AnimatorListenerAdapter() {
40 | @Override
41 | public void onAnimationEnd(Animator animation) {
42 | super.onAnimationEnd(animation);
43 | resetView(view);
44 | if (action != null) {
45 | action.action();
46 | }
47 | }
48 | });
49 | return this;
50 | }
51 |
52 | @Override
53 | public void start() {
54 | animator.start();
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/animator/SingleAnimator/hide/ScaleHideAnimator.java:
--------------------------------------------------------------------------------
1 | package skin.support.animator.SingleAnimator.hide;
2 |
3 | import android.animation.Animator;
4 | import android.animation.AnimatorListenerAdapter;
5 | import android.animation.ObjectAnimator;
6 | import android.animation.PropertyValuesHolder;
7 | import android.support.annotation.NonNull;
8 | import android.support.annotation.Nullable;
9 | import android.view.View;
10 | import android.view.animation.AnticipateInterpolator;
11 |
12 | import skin.support.animator.Action;
13 | import skin.support.animator.SingleAnimator.ViewAnimatorImpl;
14 | import skin.support.animator.SkinAnimator;
15 |
16 | /**
17 | * Created by erfli on 2/25/17.
18 | */
19 |
20 | public class ScaleHideAnimator extends ViewAnimatorImpl {
21 |
22 | private ObjectAnimator animator;
23 |
24 | private ScaleHideAnimator() {
25 | }
26 |
27 |
28 | public static ScaleHideAnimator getInstance() {
29 | return new ScaleHideAnimator();
30 | }
31 |
32 | @Override
33 | public SkinAnimator apply(@NonNull final View view, @Nullable final Action action) {
34 | animator = ObjectAnimator.ofPropertyValuesHolder(view,
35 | PropertyValuesHolder.ofFloat("alpha", 1, 0),
36 | PropertyValuesHolder.ofFloat("scaleX", 1, 0),
37 | PropertyValuesHolder.ofFloat("scaleY", 1, 0)
38 | );
39 | animator.setDuration(3 * PRE_DURATION);
40 | animator.setInterpolator(new AnticipateInterpolator());
41 | animator.addListener(new AnimatorListenerAdapter() {
42 | @Override
43 | public void onAnimationEnd(Animator animation) {
44 | super.onAnimationEnd(animation);
45 | resetView(view);
46 | if (action != null) {
47 | action.action();
48 | }
49 | }
50 | });
51 | return this;
52 | }
53 |
54 | @Override
55 | public void start() {
56 | animator.start();
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/animator/SingleAnimator/hide/TranslationAlphaHideAnimator.java:
--------------------------------------------------------------------------------
1 | package skin.support.animator.SingleAnimator.hide;
2 |
3 | import android.animation.Animator;
4 | import android.animation.AnimatorListenerAdapter;
5 | import android.animation.ObjectAnimator;
6 | import android.animation.PropertyValuesHolder;
7 | import android.support.annotation.NonNull;
8 | import android.support.annotation.Nullable;
9 | import android.view.View;
10 | import android.view.animation.LinearInterpolator;
11 |
12 | import skin.support.animator.Action;
13 | import skin.support.animator.SingleAnimator.ViewAnimatorImpl;
14 | import skin.support.animator.SkinAnimator;
15 |
16 | /**
17 | * Created by erfli on 2/25/17.
18 | */
19 |
20 | public class TranslationAlphaHideAnimator extends ViewAnimatorImpl {
21 |
22 | private ObjectAnimator animator;
23 |
24 | private TranslationAlphaHideAnimator() {
25 | }
26 |
27 |
28 | public static TranslationAlphaHideAnimator getInstance() {
29 | return new TranslationAlphaHideAnimator();
30 | }
31 |
32 | @Override
33 | public SkinAnimator apply(@NonNull final View view, @Nullable final Action action) {
34 | int offset = -view.getWidth() / 2;
35 | animator = ObjectAnimator.ofPropertyValuesHolder(view,
36 | PropertyValuesHolder.ofFloat("alpha", 1, 0),
37 | PropertyValuesHolder.ofFloat("translationX", 0, - offset, -offset, offset, offset, 0),
38 | PropertyValuesHolder.ofFloat("rotation", 0, -30, -30, 30, 30, 0),
39 | PropertyValuesHolder.ofFloat("translationY", 0, 3 * view.getHeight())
40 | );
41 | animator.setDuration(5 * PRE_DURATION);
42 | animator.setInterpolator(new LinearInterpolator());
43 | animator.addListener(new AnimatorListenerAdapter() {
44 | @Override
45 | public void onAnimationEnd(Animator animation) {
46 | super.onAnimationEnd(animation);
47 | resetView(view);
48 | if (action != null) {
49 | action.action();
50 | }
51 | }
52 | });
53 | return this;
54 | }
55 |
56 | @Override
57 | public void start() {
58 | animator.start();
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/animator/SingleAnimator/hide/TranslationHideAnimator.java:
--------------------------------------------------------------------------------
1 | package skin.support.animator.SingleAnimator.hide;
2 |
3 | import android.animation.Animator;
4 | import android.animation.AnimatorListenerAdapter;
5 | import android.animation.ObjectAnimator;
6 | import android.animation.PropertyValuesHolder;
7 | import android.support.annotation.NonNull;
8 | import android.support.annotation.Nullable;
9 | import android.view.View;
10 | import android.view.animation.AnticipateInterpolator;
11 |
12 | import skin.support.animator.Action;
13 | import skin.support.animator.SingleAnimator.ViewAnimatorImpl;
14 | import skin.support.animator.SkinAnimator;
15 |
16 | /**
17 | * Created by erfli on 2/25/17.
18 | */
19 |
20 | public class TranslationHideAnimator extends ViewAnimatorImpl {
21 |
22 | private ObjectAnimator animator;
23 |
24 | private TranslationHideAnimator() {
25 | }
26 |
27 |
28 | public static TranslationHideAnimator getInstance() {
29 | return new TranslationHideAnimator();
30 | }
31 |
32 | @Override
33 | public SkinAnimator apply(@NonNull final View view, @Nullable final Action action) {
34 | animator = ObjectAnimator.ofPropertyValuesHolder(view,
35 | PropertyValuesHolder.ofFloat("alpha", 1, 0),
36 | PropertyValuesHolder.ofFloat("translationX", view.getLeft(), view.getRight()));
37 | animator.setDuration(3 * PRE_DURATION);
38 | animator.setInterpolator(new AnticipateInterpolator());
39 | animator.addListener(new AnimatorListenerAdapter() {
40 | @Override
41 | public void onAnimationEnd(Animator animation) {
42 | super.onAnimationEnd(animation);
43 | resetView(view);
44 | if (action != null) {
45 | action.action();
46 | }
47 | }
48 | });
49 | return this;
50 | }
51 |
52 | @Override
53 | public void start() {
54 | animator.start();
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/animator/SingleAnimator/hide/TranslationHideAnimator2.java:
--------------------------------------------------------------------------------
1 | package skin.support.animator.SingleAnimator.hide;
2 |
3 | import android.animation.Animator;
4 | import android.animation.AnimatorListenerAdapter;
5 | import android.animation.ObjectAnimator;
6 | import android.animation.PropertyValuesHolder;
7 | import android.support.annotation.NonNull;
8 | import android.support.annotation.Nullable;
9 | import android.view.View;
10 | import android.view.animation.AccelerateInterpolator;
11 |
12 | import skin.support.animator.Action;
13 | import skin.support.animator.SingleAnimator.ViewAnimatorImpl;
14 | import skin.support.animator.SkinAnimator;
15 |
16 | /**
17 | * Created by erfli on 2/25/17.
18 | */
19 |
20 | public class TranslationHideAnimator2 extends ViewAnimatorImpl {
21 |
22 | private ObjectAnimator animator;
23 |
24 | private TranslationHideAnimator2() {
25 | }
26 |
27 |
28 | public static TranslationHideAnimator2 getInstance() {
29 | return new TranslationHideAnimator2();
30 | }
31 |
32 | @Override
33 | public SkinAnimator apply(@NonNull final View view, @Nullable final Action action) {
34 | animator = ObjectAnimator.ofPropertyValuesHolder(view,
35 | PropertyValuesHolder.ofFloat("alpha", 1, 0),
36 | PropertyValuesHolder.ofFloat("translationY", 0, view.getHeight()));
37 | animator.setDuration(3 * PRE_DURATION);
38 | animator.setInterpolator(new AccelerateInterpolator());
39 | animator.addListener(new AnimatorListenerAdapter() {
40 | @Override
41 | public void onAnimationEnd(Animator animation) {
42 | super.onAnimationEnd(animation);
43 | resetView(view);
44 | if (action != null) {
45 | action.action();
46 | }
47 | }
48 | });
49 | return this;
50 | }
51 |
52 | @Override
53 | public void start() {
54 | animator.start();
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/animator/SingleAnimator/hide/TranslationRotationHideAnimator2.java:
--------------------------------------------------------------------------------
1 | package skin.support.animator.SingleAnimator.hide;
2 |
3 | import android.animation.Animator;
4 | import android.animation.AnimatorListenerAdapter;
5 | import android.animation.ObjectAnimator;
6 | import android.animation.PropertyValuesHolder;
7 | import android.support.annotation.NonNull;
8 | import android.support.annotation.Nullable;
9 | import android.view.View;
10 | import android.view.animation.AccelerateInterpolator;
11 |
12 | import skin.support.animator.Action;
13 | import skin.support.animator.SingleAnimator.ViewAnimatorImpl;
14 | import skin.support.animator.SkinAnimator;
15 |
16 | /**
17 | * Created by erfli on 2/25/17.
18 | */
19 |
20 | public class TranslationRotationHideAnimator2 extends ViewAnimatorImpl {
21 |
22 | private ObjectAnimator animator;
23 |
24 | private TranslationRotationHideAnimator2() {
25 | }
26 |
27 |
28 | public static TranslationRotationHideAnimator2 getInstance() {
29 | return new TranslationRotationHideAnimator2();
30 | }
31 |
32 | @Override
33 | public SkinAnimator apply(@NonNull final View view, @Nullable final Action action) {
34 | animator = ObjectAnimator.ofPropertyValuesHolder(view,
35 | PropertyValuesHolder.ofFloat("alpha", 1, 0),
36 | PropertyValuesHolder.ofFloat("rotation", 0, 360),
37 | PropertyValuesHolder.ofFloat("translationY", 0, view.getHeight()),
38 | PropertyValuesHolder.ofFloat("translationX", 0, view.getWidth()));
39 | animator.setDuration(5 * PRE_DURATION);
40 | animator.setInterpolator(new AccelerateInterpolator());
41 | animator.addListener(new AnimatorListenerAdapter() {
42 | @Override
43 | public void onAnimationEnd(Animator animation) {
44 | super.onAnimationEnd(animation);
45 | resetView(view);
46 | if (action != null) {
47 | action.action();
48 | }
49 | }
50 | });
51 | return this;
52 | }
53 |
54 | @Override
55 | public void start() {
56 | animator.start();
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/animator/SingleAnimator/update/AlphaAnimator.java:
--------------------------------------------------------------------------------
1 | package skin.support.animator.SingleAnimator.update;
2 |
3 | import android.animation.Animator;
4 | import android.animation.AnimatorListenerAdapter;
5 | import android.animation.ObjectAnimator;
6 | import android.support.annotation.NonNull;
7 | import android.support.annotation.Nullable;
8 | import android.view.View;
9 | import android.view.animation.LinearInterpolator;
10 |
11 | import skin.support.animator.Action;
12 | import skin.support.animator.SingleAnimator.ViewAnimatorImpl;
13 | import skin.support.animator.SkinAnimator;
14 |
15 | /**
16 | * Created by erfli on 2/25/17.
17 | */
18 |
19 | public class AlphaAnimator extends ViewAnimatorImpl {
20 | protected ObjectAnimator preAnimator;
21 | protected ObjectAnimator afterAnimator;
22 | protected View targetView;
23 |
24 | private AlphaAnimator() {
25 | }
26 |
27 | public static AlphaAnimator getInstance() {
28 | AlphaAnimator skinAlphaAnimator = new AlphaAnimator();
29 | return skinAlphaAnimator;
30 | }
31 |
32 | @Override
33 | public SkinAnimator apply(@NonNull View view, @Nullable final Action action) {
34 | this.targetView = view;
35 | preAnimator = ObjectAnimator.ofFloat(targetView, "alpha", 1, 0)
36 | .setDuration(2 * PRE_DURATION);
37 | preAnimator.setInterpolator(new LinearInterpolator());
38 | afterAnimator = ObjectAnimator.ofFloat(targetView, "alpha", 0, 1)
39 | .setDuration(AFTER_DURATION);
40 | afterAnimator.setInterpolator(new LinearInterpolator());
41 |
42 | preAnimator.addListener(new AnimatorListenerAdapter() {
43 | @Override
44 | public void onAnimationEnd(Animator animation) {
45 | super.onAnimationEnd(animation);
46 | if (action != null) {
47 | action.action();
48 | }
49 | afterAnimator.start();
50 | }
51 | });
52 | return this;
53 | }
54 |
55 | @Override
56 | public void start() {
57 | preAnimator.start();
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/animator/SkinAnimator.java:
--------------------------------------------------------------------------------
1 | package skin.support.animator;
2 |
3 | import android.support.annotation.NonNull;
4 | import android.support.annotation.Nullable;
5 | import android.view.View;
6 |
7 | /**
8 | * Created by erfli on 2/25/17.
9 | */
10 |
11 | public interface SkinAnimator {
12 | int PRE_DURATION = 200;
13 | int AFTER_DURATION = 200;
14 |
15 | SkinAnimator apply(@NonNull View view, @Nullable Action action);
16 |
17 | SkinAnimator setPreDuration();
18 |
19 | SkinAnimator setAfterDuration();
20 |
21 | SkinAnimator setDuration();
22 |
23 | void start();
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/animator/activityAnimator/SkinActivityAnimator.java:
--------------------------------------------------------------------------------
1 | package skin.support.animator.activityAnimator;
2 |
3 | import android.view.View;
4 |
5 | import skin.support.animator.Action;
6 | import skin.support.animator.AnimatorType;
7 |
8 | /**
9 | * Created by erfli on 2/26/17.
10 | */
11 |
12 | public class SkinActivityAnimator {
13 | private static AnimatorType ACTIVITYANIMATORTYPE = AnimatorType.ALPHA;
14 |
15 | public static void configActivityAnimatorType(AnimatorType animatorType){
16 | ACTIVITYANIMATORTYPE = animatorType;
17 | }
18 |
19 | public static void updateSkin(View view, Action action){
20 | ACTIVITYANIMATORTYPE.apply(view, action);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/app/SkinLayoutInflater.java:
--------------------------------------------------------------------------------
1 | package skin.support.app;
2 |
3 | import android.content.Context;
4 | import android.support.annotation.NonNull;
5 | import android.util.AttributeSet;
6 | import android.view.View;
7 |
8 | /**
9 | * Created by ximsfei on 2017/1/13.
10 | */
11 |
12 | public interface SkinLayoutInflater {
13 | View createView(@NonNull Context context, final String name, @NonNull AttributeSet attrs);
14 | }
15 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/observe/SkinObservable.java:
--------------------------------------------------------------------------------
1 | package skin.support.observe;
2 |
3 | import java.util.ArrayList;
4 |
5 | /**
6 | * Created by ximsfei on 2017/1/10.
7 | */
8 |
9 | public class SkinObservable {
10 | private final ArrayList observers;
11 |
12 | public SkinObservable() {
13 | observers = new ArrayList<>();
14 | }
15 |
16 | public synchronized void addObserver(SkinObserver o) {
17 | if (o == null)
18 | throw new NullPointerException();
19 | if (!observers.contains(o)) {
20 | observers.add(o);
21 | }
22 | }
23 |
24 | public synchronized void deleteObserver(SkinObserver o) {
25 | observers.remove(o);
26 | }
27 |
28 | public void notifyUpdateSkin() {
29 | notifyUpdateSkin(null);
30 | }
31 |
32 | public void notifyUpdateSkin(Object arg) {
33 | SkinObserver[] arrLocal;
34 |
35 | synchronized (this) {
36 | arrLocal = observers.toArray(new SkinObserver[observers.size()]);
37 | }
38 |
39 | for (int i = arrLocal.length-1; i>=0; i--)
40 | arrLocal[i].updateSkin(this, arg);
41 | }
42 |
43 | public synchronized void deleteObservers() {
44 | observers.clear();
45 | }
46 |
47 | public synchronized int countObservers() {
48 | return observers.size();
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/observe/SkinObserver.java:
--------------------------------------------------------------------------------
1 | package skin.support.observe;
2 |
3 | /**
4 | * Created by ximsfei on 2017/1/10.
5 | */
6 |
7 | public interface SkinObserver {
8 | void updateSkin(SkinObservable observable, Object o);
9 | }
10 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/utils/SkinConstants.java:
--------------------------------------------------------------------------------
1 | package skin.support.utils;
2 |
3 | /**
4 | * Created by ximsfei on 17-1-9.
5 | */
6 |
7 | public class SkinConstants {
8 | public static final String SKIN_DEPLOY_PATH = "skins";
9 | }
10 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/utils/SkinFileUtils.java:
--------------------------------------------------------------------------------
1 | package skin.support.utils;
2 |
3 | import android.content.Context;
4 | import android.os.Environment;
5 |
6 | import java.io.File;
7 |
8 | /**
9 | * Created by ximsfei on 17-1-10.
10 | */
11 |
12 | public class SkinFileUtils {
13 | public static String getSkinDir(Context context) {
14 | File skinDir = new File(getCacheDir(context), SkinConstants.SKIN_DEPLOY_PATH);
15 | if (!skinDir.exists()) {
16 | skinDir.mkdirs();
17 | }
18 | return skinDir.getAbsolutePath();
19 | }
20 |
21 | public static String getCacheDir(Context context) {
22 | if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
23 | File cacheDir = context.getExternalCacheDir();
24 | if (cacheDir != null && (cacheDir.exists() || cacheDir.mkdirs())) {
25 | return cacheDir.getAbsolutePath();
26 | }
27 | }
28 |
29 | return context.getCacheDir().getAbsolutePath();
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/utils/SkinLog.java:
--------------------------------------------------------------------------------
1 | package skin.support.utils;
2 |
3 | import android.util.Log;
4 |
5 | import skin.support.BuildConfig;
6 |
7 | /**
8 | * Created by ximsfei on 17-1-9.
9 | */
10 |
11 | public class SkinLog {
12 | private static boolean DEBUG = BuildConfig.DEBUG;
13 | private static final String TAG = "Skin-support";
14 |
15 | public static void v(String msg) {
16 | v(TAG, msg);
17 | }
18 |
19 | public static void d(String msg) {
20 | d(TAG, msg);
21 | }
22 |
23 | public static void i(String msg) {
24 | i(TAG, msg);
25 | }
26 |
27 | public static void w(String msg) {
28 | w(TAG, msg);
29 | }
30 |
31 | public static void e(String msg) {
32 | e(TAG, msg);
33 | }
34 |
35 | public static void v(String tag, String msg) {
36 | if (DEBUG) {
37 | Log.v(tag, msg);
38 | }
39 | }
40 |
41 | public static void d(String tag, String msg) {
42 | if (DEBUG) {
43 | Log.d(tag, msg);
44 | }
45 | }
46 |
47 | public static void i(String tag, String msg) {
48 | if (DEBUG) {
49 | Log.i(tag, msg);
50 | }
51 | }
52 |
53 | public static void w(String tag, String msg) {
54 | if (DEBUG) {
55 | Log.w(tag, msg);
56 | }
57 | }
58 |
59 | public static void e(String tag, String msg) {
60 | if (DEBUG) {
61 | Log.e(tag, msg);
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/utils/SkinPreference.java:
--------------------------------------------------------------------------------
1 | package skin.support.utils;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 |
6 | /**
7 | * Created by ximsfei on 2017/1/10.
8 | */
9 |
10 | public class SkinPreference {
11 | private static final String FILE_NAME = "meta-data";
12 |
13 | public static final String KEY_SKIN_NAME = "skin-name";
14 | private static SkinPreference sInstance;
15 | private final Context mApp;
16 | private final SharedPreferences mPref;
17 | private final SharedPreferences.Editor mEditor;
18 |
19 | public static void init(Context context) {
20 | if (sInstance == null) {
21 | synchronized (SkinPreference.class) {
22 | if (sInstance == null) {
23 | sInstance = new SkinPreference(context.getApplicationContext());
24 | }
25 | }
26 | }
27 | }
28 |
29 | public static SkinPreference getInstance() {
30 | return sInstance;
31 | }
32 |
33 | private SkinPreference(Context applicationContext) {
34 | mApp = applicationContext;
35 | mPref = mApp.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE);
36 | mEditor = mPref.edit();
37 | }
38 |
39 | public SkinPreference setSkinName(String skinName) {
40 | mEditor.putString(KEY_SKIN_NAME, skinName);
41 | return this;
42 | }
43 |
44 | public String getSkinName() {
45 | return mPref.getString(KEY_SKIN_NAME, "");
46 | }
47 |
48 | public void commitEditor() {
49 | mEditor.apply();
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/widget/SkinCompatButton.java:
--------------------------------------------------------------------------------
1 | package skin.support.widget;
2 |
3 | import android.content.Context;
4 | import android.support.annotation.DrawableRes;
5 | import android.support.v7.appcompat.R;
6 | import android.support.v7.widget.AppCompatButton;
7 | import android.util.AttributeSet;
8 |
9 | /**
10 | * Created by ximsfei on 17-1-11.
11 | */
12 | public class SkinCompatButton extends AppCompatButton implements SkinCompatSupportable {
13 | private SkinCompatTextHelper mTextHelper;
14 | private SkinCompatBackgroundHelper mBackgroundTintHelper;
15 |
16 | public SkinCompatButton(Context context) {
17 | this(context, null);
18 | }
19 |
20 | public SkinCompatButton(Context context, AttributeSet attrs) {
21 | this(context, attrs, R.attr.buttonStyle);
22 | }
23 |
24 | public SkinCompatButton(Context context, AttributeSet attrs, int defStyleAttr) {
25 | super(context, attrs, defStyleAttr);
26 | mBackgroundTintHelper = new SkinCompatBackgroundHelper(this);
27 | mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr);
28 | mTextHelper = new SkinCompatTextHelper(this);
29 | mTextHelper.loadFromAttributes(attrs, defStyleAttr);
30 | }
31 |
32 | @Override
33 | public void setBackgroundResource(@DrawableRes int resId) {
34 | super.setBackgroundResource(resId);
35 | if (mBackgroundTintHelper != null) {
36 | mBackgroundTintHelper.onSetBackgroundResource(resId);
37 | }
38 | }
39 |
40 | @Override
41 | public void setTextAppearance(Context context, int resId) {
42 | super.setTextAppearance(context, resId);
43 | if (mTextHelper != null) {
44 | mTextHelper.onSetTextAppearance(context, resId);
45 | }
46 | }
47 |
48 | @Override
49 | public void applySkin() {
50 | if (mBackgroundTintHelper != null) {
51 | mBackgroundTintHelper.applySkin();
52 | }
53 | if (mTextHelper != null) {
54 | mTextHelper.applySkin();
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/widget/SkinCompatCheckBox.java:
--------------------------------------------------------------------------------
1 | package skin.support.widget;
2 |
3 | import android.content.Context;
4 | import android.support.annotation.DrawableRes;
5 | import android.support.v7.widget.AppCompatCheckBox;
6 | import android.util.AttributeSet;
7 |
8 | import skin.support.R;
9 |
10 | /**
11 | * Created by ximsfei on 17-1-14.
12 | */
13 |
14 | public class SkinCompatCheckBox extends AppCompatCheckBox implements SkinCompatSupportable {
15 | private final SkinCompatCompoundButtonHelper mCompoundButtonHelper;
16 |
17 | public SkinCompatCheckBox(Context context) {
18 | this(context, null);
19 | }
20 |
21 | public SkinCompatCheckBox(Context context, AttributeSet attrs) {
22 | this(context, attrs, R.attr.checkboxStyle);
23 | }
24 |
25 | public SkinCompatCheckBox(Context context, AttributeSet attrs, int defStyleAttr) {
26 | super(context, attrs, defStyleAttr);
27 | mCompoundButtonHelper = new SkinCompatCompoundButtonHelper(this);
28 | mCompoundButtonHelper.loadFromAttributes(attrs, defStyleAttr);
29 | }
30 |
31 | @Override
32 | public void setButtonDrawable(@DrawableRes int resId) {
33 | super.setButtonDrawable(resId);
34 | if (mCompoundButtonHelper != null) {
35 | mCompoundButtonHelper.setButtonDrawable(resId);
36 | }
37 | }
38 |
39 | @Override
40 | public void applySkin() {
41 | if (mCompoundButtonHelper != null) {
42 | mCompoundButtonHelper.applySkin();
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/widget/SkinCompatEditText.java:
--------------------------------------------------------------------------------
1 | package skin.support.widget;
2 |
3 | import android.content.Context;
4 | import android.support.annotation.DrawableRes;
5 | import android.support.v7.appcompat.R;
6 | import android.support.v7.widget.AppCompatEditText;
7 | import android.util.AttributeSet;
8 |
9 | /**
10 | * Created by ximsfei on 2017/1/10.
11 | */
12 |
13 | public class SkinCompatEditText extends AppCompatEditText implements SkinCompatSupportable {
14 | private SkinCompatTextHelper mTextHelper;
15 | private SkinCompatBackgroundHelper mBackgroundTintHelper;
16 |
17 | public SkinCompatEditText(Context context) {
18 | this(context, null);
19 | }
20 |
21 | public SkinCompatEditText(Context context, AttributeSet attrs) {
22 | this(context, attrs, R.attr.editTextStyle);
23 | }
24 |
25 | public SkinCompatEditText(Context context, AttributeSet attrs, int defStyleAttr) {
26 | super(context, attrs, defStyleAttr);
27 | mBackgroundTintHelper = new SkinCompatBackgroundHelper(this);
28 | mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr);
29 | mTextHelper = new SkinCompatTextHelper(this);
30 | mTextHelper.loadFromAttributes(attrs, defStyleAttr);
31 | }
32 |
33 | @Override
34 | public void setBackgroundResource(@DrawableRes int resId) {
35 | super.setBackgroundResource(resId);
36 | if (mBackgroundTintHelper != null) {
37 | mBackgroundTintHelper.onSetBackgroundResource(resId);
38 | }
39 | }
40 |
41 | @Override
42 | public void setTextAppearance(Context context, int resId) {
43 | super.setTextAppearance(context, resId);
44 | if (mTextHelper != null) {
45 | mTextHelper.onSetTextAppearance(context, resId);
46 | }
47 | }
48 |
49 | @Override
50 | public void applySkin() {
51 | if (mBackgroundTintHelper != null) {
52 | mBackgroundTintHelper.applySkin();
53 | }
54 | if (mTextHelper != null) {
55 | mTextHelper.applySkin();
56 | }
57 | }
58 |
59 | }
60 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/widget/SkinCompatFrameLayout.java:
--------------------------------------------------------------------------------
1 | package skin.support.widget;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.widget.FrameLayout;
6 |
7 | /**
8 | * Created by pengfengwang on 2017/1/13.
9 | */
10 |
11 | public class SkinCompatFrameLayout extends FrameLayout implements SkinCompatSupportable {
12 | private final SkinCompatBackgroundHelper mBackgroundTintHelper;
13 |
14 | public SkinCompatFrameLayout(Context context) {
15 | this(context, null);
16 | }
17 |
18 | public SkinCompatFrameLayout(Context context, AttributeSet attrs) {
19 | this(context, attrs, 0);
20 | }
21 |
22 | public SkinCompatFrameLayout(Context context, AttributeSet attrs, int defStyleAttr) {
23 | super(context, attrs, defStyleAttr);
24 | mBackgroundTintHelper = new SkinCompatBackgroundHelper(this);
25 | mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr);
26 | }
27 |
28 | @Override
29 | public void setBackgroundResource(int resid) {
30 | super.setBackgroundResource(resid);
31 | if (mBackgroundTintHelper != null) {
32 | mBackgroundTintHelper.applySkin();
33 | }
34 | }
35 |
36 | @Override
37 | public void applySkin() {
38 | if (mBackgroundTintHelper != null) {
39 | mBackgroundTintHelper.applySkin();
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/widget/SkinCompatHelper.java:
--------------------------------------------------------------------------------
1 | package skin.support.widget;
2 |
3 | import skin.support.utils.SkinLog;
4 |
5 | /**
6 | * Created by ximsfei on 2017/1/13.
7 | */
8 |
9 | public abstract class SkinCompatHelper {
10 | protected static final String TAG = SkinCompatHelper.class.getSimpleName();
11 | protected static final String SYSTEM_ID_PREFIX = "1";
12 | public static final int INVALID_ID = -1;
13 |
14 | final static public int checkResourceId(int resId) {
15 | String hexResId = Integer.toHexString(resId);
16 | SkinLog.d(TAG, "hexResId = " + hexResId);
17 | return hexResId.startsWith(SYSTEM_ID_PREFIX) ? INVALID_ID : resId;
18 | }
19 |
20 | abstract public void applySkin();
21 | }
22 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/widget/SkinCompatImageButton.java:
--------------------------------------------------------------------------------
1 | package skin.support.widget;
2 |
3 | import android.content.Context;
4 | import android.support.annotation.DrawableRes;
5 | import android.support.v7.appcompat.R;
6 | import android.support.v7.widget.AppCompatImageButton;
7 | import android.util.AttributeSet;
8 |
9 | /**
10 | * Created by ximsfei on 17-1-13.
11 | */
12 |
13 | public class SkinCompatImageButton extends AppCompatImageButton implements SkinCompatSupportable {
14 | private SkinCompatBackgroundHelper mBackgroundTintHelper;
15 | private SkinCompatImageHelper mImageHelper;
16 |
17 | public SkinCompatImageButton(Context context) {
18 | this(context, null);
19 | }
20 |
21 | public SkinCompatImageButton(Context context, AttributeSet attrs) {
22 | this(context, attrs, R.attr.imageButtonStyle);
23 | }
24 |
25 | public SkinCompatImageButton(Context context, AttributeSet attrs, int defStyleAttr) {
26 | super(context, attrs, defStyleAttr);
27 | mBackgroundTintHelper = new SkinCompatBackgroundHelper(this);
28 | mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr);
29 |
30 | mImageHelper = new SkinCompatImageHelper(this);
31 | mImageHelper.loadFromAttributes(attrs, defStyleAttr);
32 | }
33 |
34 | @Override
35 | public void setBackgroundResource(@DrawableRes int resId) {
36 | super.setBackgroundResource(resId);
37 | if (mBackgroundTintHelper != null) {
38 | mBackgroundTintHelper.onSetBackgroundResource(resId);
39 | }
40 | }
41 |
42 | @Override
43 | public void setImageResource(@DrawableRes int resId) {
44 | // Intercept this call and instead retrieve the Drawable via the image helper
45 | if (mImageHelper != null) {
46 | mImageHelper.setImageResource(resId);
47 | }
48 | }
49 |
50 | @Override
51 | public void applySkin() {
52 | if (mBackgroundTintHelper != null) {
53 | mBackgroundTintHelper.applySkin();
54 | }
55 | if (mImageHelper != null) {
56 | mImageHelper.applySkin();
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/widget/SkinCompatImageView.java:
--------------------------------------------------------------------------------
1 | package skin.support.widget;
2 |
3 | import android.content.Context;
4 | import android.support.annotation.DrawableRes;
5 | import android.support.v7.widget.AppCompatImageView;
6 | import android.util.AttributeSet;
7 |
8 | /**
9 | * Created by ximsfei on 2017/1/10.
10 | */
11 |
12 | public class SkinCompatImageView extends AppCompatImageView implements SkinCompatSupportable {
13 | private SkinCompatBackgroundHelper mBackgroundTintHelper;
14 | private SkinCompatImageHelper mImageHelper;
15 |
16 | public SkinCompatImageView(Context context) {
17 | this(context, null);
18 | }
19 |
20 | public SkinCompatImageView(Context context, AttributeSet attrs) {
21 | this(context, attrs, 0);
22 | }
23 |
24 | public SkinCompatImageView(Context context, AttributeSet attrs, int defStyleAttr) {
25 | super(context, attrs, defStyleAttr);
26 | mBackgroundTintHelper = new SkinCompatBackgroundHelper(this);
27 | mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr);
28 |
29 | mImageHelper = new SkinCompatImageHelper(this);
30 | mImageHelper.loadFromAttributes(attrs, defStyleAttr);
31 | }
32 |
33 | @Override
34 | public void setBackgroundResource(@DrawableRes int resId) {
35 | super.setBackgroundResource(resId);
36 | if (mBackgroundTintHelper != null) {
37 | mBackgroundTintHelper.onSetBackgroundResource(resId);
38 | }
39 | }
40 |
41 | @Override
42 | public void setImageResource(@DrawableRes int resId) {
43 | // Intercept this call and instead retrieve the Drawable via the image helper
44 | if (mImageHelper != null) {
45 | mImageHelper.setImageResource(resId);
46 | }
47 | }
48 |
49 | @Override
50 | public void applySkin() {
51 | if (mBackgroundTintHelper != null) {
52 | mBackgroundTintHelper.applySkin();
53 | }
54 | if (mImageHelper != null) {
55 | mImageHelper.applySkin();
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/widget/SkinCompatLinearLayout.java:
--------------------------------------------------------------------------------
1 | package skin.support.widget;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.widget.LinearLayout;
6 |
7 | /**
8 | * Created by pengfengwang on 2017/1/13.
9 | */
10 |
11 | public class SkinCompatLinearLayout extends LinearLayout implements SkinCompatSupportable {
12 | private final SkinCompatBackgroundHelper mBackgroundTintHelper;
13 |
14 | public SkinCompatLinearLayout(Context context) {
15 | this(context, null);
16 | }
17 |
18 | public SkinCompatLinearLayout(Context context, AttributeSet attrs) {
19 | this(context, attrs, 0);
20 | }
21 |
22 | public SkinCompatLinearLayout(Context context, AttributeSet attrs, int defStyleAttr) {
23 | super(context, attrs, defStyleAttr);
24 | mBackgroundTintHelper = new SkinCompatBackgroundHelper(this);
25 | mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr);
26 | }
27 |
28 | @Override
29 | public void setBackgroundResource(int resid) {
30 | super.setBackgroundResource(resid);
31 | if (mBackgroundTintHelper != null) {
32 | mBackgroundTintHelper.applySkin();
33 | }
34 | }
35 |
36 | @Override
37 | public void applySkin() {
38 | if (mBackgroundTintHelper != null) {
39 | mBackgroundTintHelper.applySkin();
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/widget/SkinCompatProgressBar.java:
--------------------------------------------------------------------------------
1 | package skin.support.widget;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.widget.ProgressBar;
6 |
7 | /**
8 | * Created by ximsfei on 2017/1/19.
9 | */
10 |
11 | public class SkinCompatProgressBar extends ProgressBar implements SkinCompatSupportable {
12 | private final SkinCompatProgressBarHelper mSkinCompatProgressBarHelper;
13 |
14 | public SkinCompatProgressBar(Context context) {
15 | this(context, null);
16 | }
17 |
18 | public SkinCompatProgressBar(Context context, AttributeSet attrs) {
19 | this(context, attrs, android.R.attr.progressBarStyle);
20 | }
21 |
22 | public SkinCompatProgressBar(Context context, AttributeSet attrs, int defStyleAttr) {
23 | super(context, attrs, defStyleAttr);
24 | mSkinCompatProgressBarHelper = new SkinCompatProgressBarHelper(this);
25 | mSkinCompatProgressBarHelper.loadFromAttributes(attrs, defStyleAttr);
26 | }
27 |
28 | @Override
29 | public void applySkin() {
30 | if (mSkinCompatProgressBarHelper != null) {
31 | mSkinCompatProgressBarHelper.applySkin();
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/widget/SkinCompatRadioButton.java:
--------------------------------------------------------------------------------
1 | package skin.support.widget;
2 |
3 | import android.content.Context;
4 | import android.support.annotation.DrawableRes;
5 | import android.support.v7.widget.AppCompatRadioButton;
6 | import android.util.AttributeSet;
7 |
8 | import skin.support.R;
9 |
10 | /**
11 | * Created by ximsfei on 17-1-14.
12 | */
13 |
14 | public class SkinCompatRadioButton extends AppCompatRadioButton implements SkinCompatSupportable {
15 | private final SkinCompatCompoundButtonHelper mCompoundButtonHelper;
16 |
17 | public SkinCompatRadioButton(Context context) {
18 | this(context, null);
19 | }
20 |
21 | public SkinCompatRadioButton(Context context, AttributeSet attrs) {
22 | this(context, attrs, R.attr.radioButtonStyle);
23 | }
24 |
25 | public SkinCompatRadioButton(Context context, AttributeSet attrs, int defStyleAttr) {
26 | super(context, attrs, defStyleAttr);
27 | mCompoundButtonHelper = new SkinCompatCompoundButtonHelper(this);
28 | mCompoundButtonHelper.loadFromAttributes(attrs, defStyleAttr);
29 | }
30 |
31 | @Override
32 | public void setButtonDrawable(@DrawableRes int resId) {
33 | super.setButtonDrawable(resId);
34 | if (mCompoundButtonHelper != null) {
35 | mCompoundButtonHelper.setButtonDrawable(resId);
36 | }
37 | }
38 |
39 | @Override
40 | public void applySkin() {
41 | if (mCompoundButtonHelper != null) {
42 | mCompoundButtonHelper.applySkin();
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/widget/SkinCompatRatingBar.java:
--------------------------------------------------------------------------------
1 | package skin.support.widget;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.AppCompatRatingBar;
5 | import android.util.AttributeSet;
6 |
7 | import skin.support.R;
8 |
9 | /**
10 | * Created by ximsfei on 17-1-21.
11 | */
12 |
13 | public class SkinCompatRatingBar extends AppCompatRatingBar implements SkinCompatSupportable {
14 | private final SkinCompatProgressBarHelper mSkinCompatProgressBarHelper;
15 |
16 | public SkinCompatRatingBar(Context context) {
17 | this(context, null);
18 | }
19 |
20 | public SkinCompatRatingBar(Context context, AttributeSet attrs) {
21 | this(context, attrs, R.attr.ratingBarStyle);
22 | }
23 |
24 | public SkinCompatRatingBar(Context context, AttributeSet attrs, int defStyleAttr) {
25 | super(context, attrs, defStyleAttr);
26 |
27 | mSkinCompatProgressBarHelper = new SkinCompatProgressBarHelper(this);
28 | mSkinCompatProgressBarHelper.loadFromAttributes(attrs, defStyleAttr);
29 | }
30 |
31 | @Override
32 | public void applySkin() {
33 | if (mSkinCompatProgressBarHelper != null) {
34 | mSkinCompatProgressBarHelper.applySkin();
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/widget/SkinCompatRelativeLayout.java:
--------------------------------------------------------------------------------
1 | package skin.support.widget;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.widget.RelativeLayout;
6 |
7 | /**
8 | * Created by pengfengwang on 2017/1/13.
9 | */
10 |
11 | public class SkinCompatRelativeLayout extends RelativeLayout implements SkinCompatSupportable {
12 | private final SkinCompatBackgroundHelper mBackgroundTintHelper;
13 |
14 | public SkinCompatRelativeLayout(Context context) {
15 | this(context, null);
16 | }
17 |
18 | public SkinCompatRelativeLayout(Context context, AttributeSet attrs) {
19 | this(context, attrs, 0);
20 | }
21 |
22 | public SkinCompatRelativeLayout(Context context, AttributeSet attrs, int defStyleAttr) {
23 | super(context, attrs, defStyleAttr);
24 | mBackgroundTintHelper = new SkinCompatBackgroundHelper(this);
25 | mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr);
26 | }
27 |
28 | @Override
29 | public void setBackgroundResource(int resid) {
30 | super.setBackgroundResource(resid);
31 | if (mBackgroundTintHelper != null) {
32 | mBackgroundTintHelper.applySkin();
33 | }
34 | }
35 |
36 | @Override
37 | public void applySkin() {
38 | if (mBackgroundTintHelper != null) {
39 | mBackgroundTintHelper.applySkin();
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/widget/SkinCompatSeekBar.java:
--------------------------------------------------------------------------------
1 | package skin.support.widget;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.AppCompatSeekBar;
5 | import android.util.AttributeSet;
6 |
7 | import skin.support.R;
8 |
9 | /**
10 | * Created by ximsfei on 17-1-21.
11 | */
12 |
13 | public class SkinCompatSeekBar extends AppCompatSeekBar implements SkinCompatSupportable {
14 | private final SkinCompatSeekBarHelper mSkinCompatSeekBarHelper;
15 |
16 | public SkinCompatSeekBar(Context context) {
17 | this(context, null);
18 | }
19 |
20 | public SkinCompatSeekBar(Context context, AttributeSet attrs) {
21 | this(context, attrs, R.attr.seekBarStyle);
22 | }
23 |
24 | public SkinCompatSeekBar(Context context, AttributeSet attrs, int defStyleAttr) {
25 | super(context, attrs, defStyleAttr);
26 |
27 | mSkinCompatSeekBarHelper = new SkinCompatSeekBarHelper(this);
28 | mSkinCompatSeekBarHelper.loadFromAttributes(attrs, defStyleAttr);
29 | }
30 |
31 |
32 | @Override
33 | public void applySkin() {
34 | if (mSkinCompatSeekBarHelper != null) {
35 | mSkinCompatSeekBarHelper.applySkin();
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/widget/SkinCompatSupportable.java:
--------------------------------------------------------------------------------
1 | package skin.support.widget;
2 |
3 | /**
4 | * Created by ximsfei on 2017/1/10.
5 | */
6 |
7 | public interface SkinCompatSupportable {
8 | void applySkin();
9 | }
10 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/widget/SkinCompatTextView.java:
--------------------------------------------------------------------------------
1 | package skin.support.widget;
2 |
3 | import android.content.Context;
4 | import android.support.annotation.DrawableRes;
5 | import android.support.v7.widget.AppCompatTextView;
6 | import android.util.AttributeSet;
7 |
8 | /**
9 | * Created by ximsfei on 2017/1/10.
10 | */
11 |
12 | public class SkinCompatTextView extends AppCompatTextView implements SkinCompatSupportable {
13 | private SkinCompatTextHelper mTextHelper;
14 | private SkinCompatBackgroundHelper mBackgroundTintHelper;
15 |
16 | public SkinCompatTextView(Context context) {
17 | this(context, null);
18 | }
19 |
20 | public SkinCompatTextView(Context context, AttributeSet attrs) {
21 | this(context, attrs, android.R.attr.textViewStyle);
22 | }
23 |
24 | public SkinCompatTextView(Context context, AttributeSet attrs, int defStyleAttr) {
25 | super(context, attrs, defStyleAttr);
26 | mBackgroundTintHelper = new SkinCompatBackgroundHelper(this);
27 | mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr);
28 | mTextHelper = new SkinCompatTextHelper(this);
29 | mTextHelper.loadFromAttributes(attrs, defStyleAttr);
30 | }
31 |
32 | @Override
33 | public void setBackgroundResource(@DrawableRes int resId) {
34 | super.setBackgroundResource(resId);
35 | if (mBackgroundTintHelper != null) {
36 | mBackgroundTintHelper.onSetBackgroundResource(resId);
37 | }
38 | }
39 |
40 | @Override
41 | public void setTextAppearance(Context context, int resId) {
42 | super.setTextAppearance(context, resId);
43 | if (mTextHelper != null) {
44 | mTextHelper.onSetTextAppearance(context, resId);
45 | }
46 | }
47 |
48 | @Override
49 | public void applySkin() {
50 | if (mBackgroundTintHelper != null) {
51 | mBackgroundTintHelper.applySkin();
52 | }
53 | if (mTextHelper != null) {
54 | mTextHelper.applySkin();
55 | }
56 | }
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/skin-support/src/main/java/skin/support/widget/SkinCompatView.java:
--------------------------------------------------------------------------------
1 | package skin.support.widget;
2 |
3 | import android.content.Context;
4 | import android.os.Build;
5 | import android.support.annotation.RequiresApi;
6 | import android.util.AttributeSet;
7 | import android.view.View;
8 |
9 | /**
10 | * Created by pengfengwang on 2017/1/13.
11 | */
12 |
13 | public class SkinCompatView extends View implements SkinCompatSupportable {
14 | private final SkinCompatBackgroundHelper mBackgroundTintHelper;
15 |
16 | public SkinCompatView(Context context) {
17 | this(context, null);
18 | }
19 |
20 | public SkinCompatView(Context context, AttributeSet attrs) {
21 | this(context, attrs, 0);
22 | }
23 |
24 | public SkinCompatView(Context context, AttributeSet attrs, int defStyleAttr) {
25 | super(context, attrs, defStyleAttr);
26 | mBackgroundTintHelper = new SkinCompatBackgroundHelper(this);
27 | mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr);
28 |
29 | }
30 |
31 | @Override
32 | public void setBackgroundResource(int resid) {
33 | super.setBackgroundResource(resid);
34 | if (mBackgroundTintHelper != null) {
35 | mBackgroundTintHelper.applySkin();
36 | }
37 | }
38 |
39 | @Override
40 | public void applySkin() {
41 | if (mBackgroundTintHelper != null) {
42 | mBackgroundTintHelper.applySkin();
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/skin-support/src/main/res/values/attrs.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 |
30 |
--------------------------------------------------------------------------------
/skin-support/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | skin-support
3 |
4 |
--------------------------------------------------------------------------------