Quick Answer: What Is Default Color of Button in Android?
Contents

What is the default button color in Android?

When I open a new android studio project, the default color for button is purple.

How can set background color of button in Android?

For a button, you can either set its colors by using layout setting xml in resources, or dynamically through coding.

  1. Using XML resources. – To set button background color, use: “android:background” …
  2. Through coding. – To set button background color, use: “Button.setBackgroundColor()” …
  3. Sample Project. …
  4. Final Words.

10 июн. 2011 г.

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest