Get View offset Children Top And Bottom - Android User Interface

Android examples for User Interface:View Child

Description

Get View offset Children Top And Bottom

Demo Code


//package com.java2s;

import android.view.View;
import android.view.ViewGroup;

public class Main {
    public static void offsetChildrenTopAndBottom(ViewGroup viewGroup,
            int offset) {
        final int count = viewGroup.getChildCount();
        for (int i = 0; i < count; i++) {
            final View child = viewGroup.getChildAt(i);
            child.offsetTopAndBottom(offset);
        }/*from  w w w .ja  v a  2 s. c  o m*/
    }
}

Related Tutorials