Giter Site home page Giter Site logo

yzyskin's Introduction

YzySkin

网易云音乐换肤框架实现

  • 如果觉得有用,不吝啬在右上角给我一个Star。谢谢!!

    使用步骤
    1、在app目录中创建一个aars的文件夹
    2、将skinlibrary.aar复制进去
    3、在app的build.gradle文件中进行配置
android{
    repositories {
        flatDir {
            dirs'aars' 
        }
    }
}
dependencies {
       compile(name:'skinlibrary', ext:'aar')
}

4、需要换肤的页面继承SkinActivity
5、将皮肤包skin.apk复制到手机
6、调用YzyChangeSkin.getInstance().changeSkin(context, skinPath);进行换肤
注意
1、所有的颜色、图片资源都是引用资源,不能在xml文件中写死,否则无法更换
2、皮肤包也是一个apk,该包内只需要有引用资源的同名的图片、同名的颜色引用即可。
如:
按钮背景颜色为@color/bt_bg,那么在app/src/main/res/values/colors.xml中就会有一个bt_bg的颜色值对应
在皮肤包中也要在colors.xml中有bt_bg这个item,只是颜色值不同.如果没有皮肤包或皮肤包中没有找到相对应的引用资源,将会使用原始值
3、有任何疑问欢迎发邮件到[email protected] 欢迎提交代码

yzyskin's People

Contributors

yzytmac avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.