AppCompat Material Style widget tint error

Im using the appcompat_v7 library.

The documentation says:

[...] AppCompat provides a similar behavior in earlier versions of Android for a subset of the user interface widget:

Everything provided by the AppCompats toolbar (action modes, etc.)

  • Edittext
  • Spinner
  • Checkbox
  • Radiobutton
  • Switch (use the new android.support.v7.widget.SwitchCompat file)
  • CheckedTextView You don’t need to do anything special to make this work, just use these controls in your layouts as usual, and AppCompat will do the rest (with a few caveats, see Frequently Asked Questions below).

This is my code:

values ​​/ styles.xml

<style name="AppBaseTheme" parent="Theme.AppCompat">
    <item name="colorPrimary">@color/material_blue_grey_800</item>
    <item name="colorPrimaryDark">@color/material_blue_grey_950</item>
    <item name="colorAccent">@color/material_deep_teal_200</item>
</style>

Layout / activity_main.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.lollipoptest.MainActivity" >

<TextView
    android:id="@+id/textView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/hello_world" />

<CheckBox
    android:id="@+id/checkBox1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/textView1"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="28dp"
    android:text="CheckBox" />

<RadioButton
    android:id="@+id/radioButton1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/checkBox1"
    android:layout_centerHorizontal="true"
    android:text="RadioButton" />

<EditText
    android:id="@+id/editText1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/radioButton1"
    android:layout_centerHorizontal="true"
    android:ems="10" >

    <requestFocus />
</EditText>

No changes to default default MainActivity.java file

Material. . . ?

: https://drive.google.com/file/d/0B1jx6rK5CDqTRnhYVDU3V21JRlk/view?usp=sharing

+4
3

:

 <CheckBox
        android:id="@+id/chbDevuelto"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_centerVertical="true"
        android:layout_marginLeft="16dp"
        android:button="@drawable/abc_btn_check_material"
        android:buttonTint="@color/colorAccent"
        android:layout_marginStart="16dp"
        android:focusable="false" />

:

android:button="@drawable/abc_btn_check_material" android:buttonTint="@color/colorAccent"

: 3

+11

, . , . 4.0 - . . Appomppat , . 4.0 (Ice Cream Sandwich), , , .

, , Appcompat v21. https://chris.banes.me/2014/10/17/appcompat-v21/

SDK SDK. 85% 4.0. . : https://developer.android.com/about/dashboards/index.html

+2

AppCompat r22, (, Button, Checkbox RadioButton) Android 2.2/2.3.

AppCompat r22.1.

, abc_btn_check_material , , ; .

+1

All Articles