Android examples for User Interface:View Padding
Sets a view's bottom padding while retaining the padding from other sides
//package com.java2s; import android.support.annotation.NonNull; import android.view.View; public class Main { /**// ww w .j av a 2s . c o m * Sets a view's bottom padding while retaining the padding from other sides * * @param view the input view * @param newPadding the new bottom padding in pixels */ public static void setPaddingBottom(@NonNull View view, int newPadding) { view.setPadding(view.getPaddingLeft(), view.getPaddingTop(), view.getPaddingRight(), newPadding); } }