-
Prevent ADB logcat window to open automatically every time you launch your app:
- Open: Run > Edit Configurations...
- Select Miscellaneous tab
- Untick Show logcat automatically
-
For example
<meta-data
android:name="com.mixpanel.android.MPConfig.ResourcePackageName"
android:value="${applicationId}" />-
One-line drawable tint using in XML using data binding
Inspired by +Lisa Wray tip[1] to customise fonts using DataBinding I started exploring this lib yesterday.
Here there is an easy way to tint Drawables using DataBinding[2] and DrawableCompat[3]
@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

