Skip to content

LsPush/Android-Tips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Android-Tips

Adb

Android Studio

Dev

<meta-data
    android:name="com.mixpanel.android.MPConfig.ResourcePackageName"
    android:value="${applicationId}" />
@BindingAdapter("bind:colorTint")
public static void setColorTint(ImageView view, @ColorRes int color) {
    DrawableCompat.setTint(view.getDrawable(), color);
}

In XML it looks like:

<ImageView
    style="@style/circle"
    android:src="@drawable/circle"
    app:colorTint="@{item.color}"/>

I feel we have only started scratching the surface of DataBinding power. Definitively check it out. It is a game changer.

[1] Custom Fonts tip
[2] DataBinding
[3] DrawableCompat

Tips

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors