Change default design theme to customized color

前端 未结 2 1867
旧巷少年郎
旧巷少年郎 2021-01-14 09:12

I am very new to Android Studio. As a beginner I have created a simple app just for testing purpose and to view the appearance of Android studio material theme. I am current

2条回答
  •  不要未来只要你来
    2021-01-14 09:32

    First Method:

    In res/values-v21/styles.xml,

    
    

    First Method : Pink color

    First Method: Green color

    The above code is simple and working well. In Android studio, it could be able to change from default sky blue color to any other colors like pink or green!

    Second Method:

    Create 3 files under xml ie. res/xml such as checked.xml, unchecked.xml and custom_checkbox.xml

    checked.xml

    
    
    
    
    

    unchecked.xml

    
    
    
    
    

    custom_checkbox.xml

    
    
     
     
     
    
    

    From above second method, it (customized file) also could be able to create any shapes and colors based on our requirements. Even we can be able to customize the style, shapes and themes for a widget by using 2nd method.

    Above two methods are working fine for me!

提交回复
热议问题