Canot resolves android.support.v7.internal.widget.TintImageView file

I tried installing compileSdkVersion in my project to 23, and also updated the following libraries:

  • com.android.support:appcompat-v7:23.1.1
  • com.android.support:recyclerview-v7:23.1.1
  • com.android.support:cardview-v7:23.1.1

Since then I get an error when importing android.support.v7.internal.widget.TintImageView

Can someone tell me why this is so? Any change in the TintImageView package? Please help.

I am using Studio Preview 2.0

+6
source share
2 answers

This happens because the class

 android.support.v7.internal.widget.TintImageView 

does not exist in appcompat v 23.xx.

In general, do not use classes in the internal package.

You can check the source in the androidsdk\extras\android\m2repository\com\android\support\appcompat-v7\ .

You should switch to AppCompatImageView .

A ImageView that supports compatible features on the old version of the platform, including:

  • Allows you to use dynamic background hue using the background hue methods in ViewCompat.
  • Allows you to set the hue of the background using backgroundTint and backgroundTintMode.

This will be automatically used when using ImageView in your layouts. You will only need to manually use this class when writing custom views.

+12
source

Use this to tint an ImageView :

 <android.support.v7.widget.AppCompatImageView android:id="@id/imageview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/my_image" android:tint="#636363" /> 
0
source

All Articles