Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.os.Build;

import android.widget.RemoteViews;

public class Main {
    /**
     * Sets the view padding for View with viewId of RemoveViews views.
     * Will only work from JELLY_BEAN.
     * <p>
     * @param views The RemoteViews that contains viewId to set the padding for.
     * @param viewId The viewId to set the padding for
     * @param left Left padding in pixels.
     * @param top Top padding in pixels.
     * @param right Right padding in pixels.
     * @param bottom Bottom padding in pixels.
     */
    public static final void setRemoteViewsPadding(RemoteViews views, int viewId, int left, int top, int right,
            int bottom) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
            views.setViewPadding(viewId, left, top, right, bottom);
        }
    }
}