Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Base.Widget.AppCompat.Button vs Widget.AppCompat.Button

I´m Using AppCompat 22.1.1

What´s the difference between Base.Widget.AppCompat.Buttonand Widget.AppCompat.Button ?

like image 306
Daniel Gomez Rico Avatar asked Apr 25 '15 04:04

Daniel Gomez Rico


People also ask

What is Appcompat button?

AppCompatButton widget enhanced with emoji capability by using EmojiTextViewHelper . A Button which supports compatible features on older versions of the platform, including: Allows dynamic tint of its background via the background tint methods in androidx.

What is the difference between Button and material button?

Material Buttons are slightly different to traditional Android buttons in that they do not include additional insets (4dp on the left/right) and have more letter-spacing, different default colors and other attributes that improve legibility and affordance amongst other components.

How to change the style of Buttons in Android?

To change the default Button style of the application we can use the android:buttonStyle attribute in the AppTheme style inside the styles. xml.

How to style Buttons in Android studio?

To add a button, that has an Android style all you need to do is to drag and drop a button from the Palette to your layout. For most versions that would mean a grey button with all corners at 2dp roundness. Check our blog, if you need to learn more about using Android Studio Layout Editor.


1 Answers

In the case of AppCompat.Button, it inherits directly, and as far as I've been able to find, nothing overrides it, so they should be the same. From AppCompat styles.xml:

<style name="Widget.AppCompat.Button" parent="Base.Widget.AppCompat.Button" />

But according to the AppCompat documentation, we should be using Widget.AppCompat:

Top level themes

These are the themes to be used directly by developers. These inherit from the relevant second level theme below.

Names: Theme.AppCompat, Theme.AppCompat.Light and Theme.AppCompat.Light.DarkActionBar

Example: values/Theme.AppCompat <- Theme.Base.AppCompat

like image 116
Jim Pekarek Avatar answered Oct 31 '22 23:10

Jim Pekarek