I just developed an app on Android Studio and I used normal default grey button of kitkat. But some time later I made a copy of that app (to make another project) and now in this copied app, new buttons as well as those old buttons are shown with some different style. I am confused as to where I got that new style. It looks cool but I don't want to lose it as automatically as I got it.
I am attaching an image, this will show the changes in design.
Asked
Active
Viewed 521 times
0

Usman
- 2,331
- 2
- 21
- 29
-
maybe it's for your Android version on device – Aspicas Jun 12 '15 at 11:46
-
You're probably using some other theme. – Bidhan Jun 12 '15 at 11:46
-
Right image shows Material Design buttons, which is standard since Lollipop. Left image is pre-Lollipop, most likely to be KitKat. – Edwin Lambregts Jun 12 '15 at 11:48
2 Answers
1
Either you are using Theme.Material
or Theme.AppCompat
, or something that inherits from those (e.g., Theme.AppCompat.Light
), as the basis for your app's theme. Or, you have no theme, and you are running on an Android 5.0+ device, and so you get Theme.Material
by default.
Both Theme.Material
and Theme.AppCompat
(the latter in conjunction with AppCompatActivity
and the rest of the appcompat-v7
library) aim to implement the Material Design aesthetic, and Material Design says that button captions are in all caps.

CommonsWare
- 986,068
- 189
- 2,389
- 2,491
-
Any easy way to tell the appcompat library to leave my buttons(and buttons only) alone? (some attribute?) – Selvin Jun 12 '15 at 11:50
-
@Selvin: You can do it in your theme: http://stackoverflow.com/questions/26958909/why-is-my-button-text-coerced-to-all-caps-on-lollipop – CommonsWare Jun 12 '15 at 11:53
-
Problem is, that in fact it is not a normal Button class but TintButton ... i changed the style but on some device (3.2, yeah i know deprecated but still we use it) it is not working ... so I'm using `MyButton extends Button` in layouts ... also i don't care about CAPS :) – Selvin Jun 12 '15 at 11:55
-
@Selvin: "that in fact it is not a normal Button class but TintButton" -- yeah, IIRC, that's `appcompat-v7`'s class for handling the `colorAccent` stuff. However, if you apply your own `style` to it, inheriting from something like `Widget.AppCompat.Button`, you should still be able to affect it. – CommonsWare Jun 12 '15 at 11:59
-
Thanks a lot! Yes I am using AppCompat copuled with `compile 'com.android.support:appcompat-v7:22.0.0'` in gradle. In the previous app, I was compiling `com.android.support:appcompat-v7:21.0.3` – Usman Jun 12 '15 at 14:32