set View Padding Right - Android User Interface

Android examples for User Interface:View Padding

Description

set View Padding Right

Demo Code


//package com.java2s;

import android.view.View;

public class Main {
    public static void setPaddingRight(View view, int right) {
        final int left = view.getPaddingLeft();
        final int top = view.getPaddingTop();
        final int bottom = view.getPaddingBottom();

        view.setPadding(left, top, right, bottom);
    }/* w  w w .java2s.  c  om*/
}

Related Tutorials