get View Relative Layout Rules - Android User Interface

Android examples for User Interface:Layout

Description

get View Relative Layout Rules

Demo Code


//package com.java2s;
import android.view.View;
import android.widget.RelativeLayout;

public class Main {
    public static int[] getRelativeLayoutRules(View view) {
        return ((RelativeLayout.LayoutParams) view.getLayoutParams())
                .getRules();// w ww  .j a  v  a 2 s  . c  om
    }
}

Related Tutorials