Code example for DrawerLayout

 * Created by adelnizamutdinov on 05/12/2013 
public class CustomDrawerLayout extends DrawerLayout { 
    public CustomDrawerLayout(Context context) { 
    public CustomDrawerLayout(Context context, AttributeSet attrs) { 
        super(context, attrs); 
    public CustomDrawerLayout(Context context, AttributeSet attrs, int defStyle) { 
        super(context, attrs, defStyle); 
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 
        widthMeasureSpec = MeasureSpec.makeMeasureSpec(MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.EXACTLY); 
        heightMeasureSpec = MeasureSpec.makeMeasureSpec(MeasureSpec.getSize(heightMeasureSpec), MeasureSpec.EXACTLY); 
Connect your IDE to all the code out there  Get Codota for Java