Android Open Source - android-ui Ui Helper






From Project

Back to project page android-ui.

License

The source code is released under:

Apache License

If you think the Android project android-ui listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package at.markushi.ui.util;
// w w w . j av  a  2 s  . c om
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.view.View;

public class UiHelper {

  @SuppressWarnings("deprecation")
  public static void setBackground(View view, Drawable d) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
      view.setBackground(d);
    } else {
      view.setBackgroundDrawable(d);
    }
  }

  public static void postInvalidateOnAnimation(View view) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
      view.postInvalidateOnAnimation();
    } else {
      view.invalidate();
    }
  }
}




Java Source Code List

at.markushi.ui.ActionView.java
at.markushi.ui.RevealColorView.java
at.markushi.ui.action.Action.java
at.markushi.ui.action.BackAction.java
at.markushi.ui.action.CloseAction.java
at.markushi.ui.action.DrawerAction.java
at.markushi.ui.action.LineSegment.java
at.markushi.ui.action.PlusAction.java
at.markushi.ui.util.BakedBezierInterpolator.java
at.markushi.ui.util.UiHelper.java