Android examples for User Interface:View Padding
apply View Top Padding
//package com.java2s; import android.view.View; public class Main { public static void applyTopPadding(int paddingTop, View... paddedViews) { for (View v : paddedViews) { if (v == null) continue; v.setPadding(v.getPaddingLeft(), paddingTop, v.getPaddingRight(), v.getPaddingBottom()); }//ww w .j av a2s.com } }