set Shadow for SlidingPaneLayout - Android android.support.v4.widget

Android examples for android.support.v4.widget:SlidingPaneLayout

Description

set Shadow for SlidingPaneLayout

Demo Code

import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.os.Build;
import android.support.v4.widget.SlidingPaneLayout;
import android.view.View;
import android.widget.ListView;

public class Main{

    public static final int FADING_COLOR = -858993460;
    public static void setShadow(SlidingPaneLayout pane) {
        pane.setShadowResource(R.drawable.slidingpane_shadow);

        pane.setHorizontalFadingEdgeEnabled(true);

        pane.setSliderFadeColor(FADING_COLOR);
    }//from   w ww  . ja  v  a2s  .c  o m

}

Related Tutorials