Code example for AlphaAnimation

Methods: startAnimationsetDurationsetFillAfter

0
    public BaseAdapterHelper setAlpha(int viewId, float value) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
            retrieveView(viewId).setAlpha(value);
        } else { 
            // Pre-honeycomb hack to set Alpha value 
            AlphaAnimation alpha = new AlphaAnimation(value, value);
            alpha.setDuration(0);
            alpha.setFillAfter(true);
            retrieveView(viewId).startAnimation(alpha);
        } 
        return this;
    } 
 
    /** 
     * Set a view visibility to VISIBLE (true) or GONE (false). 
     * @param viewId  The view id. 
     * @param visible True for VISIBLE, false for GONE. 
     * @return The BaseAdapterHelper for chaining. 
     */ 
    public BaseAdapterHelper setVisible(int viewId, boolean visible) {
Contextual code suggestions in your IDE  Get Codota for Java