Farbod Salamat-Zadeh Farbod Salamat-Zadeh - 2 months ago 12
Android Question

Difference between an AppCompat view and a normal Android view

What is the difference between an

AppCompat
view component and a standard/default view component?

For example, the difference between an
AppCompatEditText
, and an
EditText
, or between an
AppCompatButton
and a
Button
.

Looking at the developer docs for
android.support.v7.widget
, the
AppCompat
view components are described as "tint aware", but is this the only difference, and what exactly does this do?

Sid Sid
Answer

When you are using a Button or an EditText you are actually using AppCompatButton and AppCompatEditText. From the official documentation of the AppCompatEditText.

A tint aware EditText. This will automatically be used when you use EditText in your layouts. You should only need to manually use this class when writing custom views