Tutorial by Examples: appcompat

The AppCompat support library provides themes to build apps with the Material Design specification. A theme with a parent of Theme.AppCompat is also required for an Activity to extend AppCompatActivity. The first step is to customize your theme’s color palette to automatically colorize your app. I...
AlertDialog is a subclass of Dialog that can display one, two or three buttons. If you only want to display a String in this dialog box, use the setMessage() method. The AlertDialog from android.app package displays differently on different Android OS Versions. The Android V7 Appcompat library pro...
build.gradle: dependencies { compile 'com.android.support:appcompat-v7:23.3.0' compile 'com.jakewharton.rxbinding:rxbinding-appcompat-v7:0.4.0' } menu/menu.xml: <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.c...
A few pre-requisites in the build.gradle for vectors to work all the way down to API 7 for VectorDrawables and API 13 for AnimatedVectorDrawables (with some caveats currently): //Build Tools has to be 24+ buildToolsVersion '24.0.0' defaultConfig { vectorDrawables.useSupportLibrary = true ...
Extend your activity from this activity public abstract class BaseCompatLifecycleActivity extends AppCompatActivity implements LifecycleRegistryOwner { // We need this class, because LifecycleActivity extends FragmentActivity not AppCompatActivity @NonNull private final LifecycleRe...

Page 1 of 1