Skip to content

Instantly share code, notes, and snippets.

@Razhan
Razhan / DataBindingHelper.java
Created December 20, 2018 10:05 — forked from yhirano/DataBindingHelper.java
My DataBindingHelper for Android.
package your.project.view.helper;
import android.databinding.BindingAdapter;
import android.graphics.drawable.Drawable;
import android.support.annotation.ColorInt;
import android.support.annotation.DrawableRes;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.support.v4.widget.SwipeRefreshLayout;
import android.text.TextUtils;
@Razhan
Razhan / ActivityLifecycle.md
Created April 9, 2016 03:20 — forked from kristopherjohnson/ActivityLifecycle.md
Notes about Android Activity lifecycle method ordering

Results of some experiments to determine which Activity lifecycle methods get called in certain situations.

Scenario: Launch app from home, then return home

Launch:

  • activity.onCreate()
  • activity.onStart()
  • activity.onResume()
  • activity.onWindowFocusChanged(true)
@Razhan
Razhan / ViewPropertyAnimator start
Created December 1, 2015 08:57
ViewPropertyAnimator start
public void start ()
Starts the currently pending property animations immediately. Calling start() is optional because all animations start automatically at the next opportunity. However, if the animations are needed to start immediately and synchronously (not at the time when the next event is processed by the hierarchy, which is when the animations would begin otherwise), then this method can be used.
Source
The only difference is that with start it starts immediately.