apply View Top Padding - Android User Interface

Android examples for User Interface:View Padding

Description

apply View Top Padding

Demo Code


//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
    }
}

Related Tutorials