Well, in your file build.gradle
you should have added something like this
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:recyclerview-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
.....
}
So now you can use the components (widgets) of the library, for example for AppBarLayout
you can do something like this
<!-- Resto de tu Layout -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:weightSum="6">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include
android:id="@+id/tool_bar"
layout="@layout/tool_bar"></include>
</android.support.design.widget.AppBarLayout>
Note the prefix android.support.design.widget
for AppBarLayout
, the example uses a include
therefore you must have a xml
called tool_bar.xml
with the following content (notice the prefix)
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/in_black"
android:theme="@style/ThemeOverlay.AppCompat.Dark"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
</android.support.v7.widget.Toolbar>
In your style.xml
(for example) you could have something like this
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="windowActionBar">false</item>
<item name="colorPrimary">tu primary color</item>
<item name="colorPrimaryDark">tu primary dark color</item>
<item name="colorAccent">tu accent color</item>
<item name="android:textColorHint">etc ...</item>"
</style>
The detail is in using those components that are only available for API's > = 21 through the compatibility library.
As you mention, API 19 is Android 4 (and for your capture) but components with look and feel Material are only available natively for API > = 21 (Android 5 or higher)
If you have any questions I recommend you read this post that although it is in English It is very intuitive and you can clear those doubts.