How to change style of a default EditText

后端 未结 6 1743
余生分开走
余生分开走 2020-11-27 16:16

I am creating three EditTexts in my xml file using code like this:



        
6条回答
  •  情深已故
    2020-11-27 16:48

    You have a few options.

    1. Use Android assets studios Android Holo colors generator to generate the resources, styles and themes you need to add to your app to get the holo look across all devices.

    2. Use holo everywhere library.

    3. Use the PNG for the holo text fields and set them as background images yourself. You can get the images from the Android assets studios holo color generator. You'll have to make a drawable and define the normal, selected and disabled states.

    UPDATE 2016-01-07

    This answer is now outdated. Android has tinting API and ability to theme on controls directly now. A good reference for how to style or theme any element is a site called materialdoc.

提交回复
热议问题