Create new Transparent Relative Layout - Android User Interface

Android examples for User Interface:Layout

Description

Create new Transparent Relative Layout

Demo Code


//package com.java2s;
import android.content.Context;
import android.view.ViewGroup.LayoutParams;
import android.widget.RelativeLayout;

public class Main {
    public static RelativeLayout newTransparentRelativeLayout(
            Context context) {//  w  w w  .  j a v  a 2  s. c o m
        RelativeLayout layout = new RelativeLayout(context);
        layout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
                LayoutParams.FILL_PARENT));
        layout.setBackgroundColor(0x00000000);
        return layout;
    }
}

Related Tutorials