Android : Add 4 views to 4 corners programatically using ALIGN_PARENT : I am trying to add 4 views to 4 corners of the screen programatically,

But its not working as required. Kindly help me.

    View[] TchBoxAryVar = new View[4];
    int LyoRulAryVar[] = {RelativeLayout.ALIGN_PARENT_TOP,
                        RelativeLayout.ALIGN_PARENT_TOP | 
                        RelativeLayout.ALIGN_PARENT_RIGHT,
                        RelativeLayout.ALIGN_PARENT_BOTTOM,
                        RelativeLayout.ALIGN_PARENT_BOTTOM |
                        RelativeLayout.ALIGN_PARENT_RIGHT};
    int ClrAryVar[] = {Color.RED, Color.GREEN, Color.GRAY, Color.MAGENTA};

    for(int IdxVal = 0; IdxVal < TchBoxAryVar.length; IdxVal++)
    {
        Log.d("TAG", "onCreate: " + IdxVal);
        TchBoxAryVar[IdxVal] = new View(this);

        RelativeLayout.LayoutParams LyoRulVar = new RelativeLayout.LayoutParams(200, 200);
        LyoRulVar.addRule(LyoRulAryVar[IdxVal]);
        TchBoxAryVar[IdxVal].setLayoutParams(LyoRulVar);
        TchBoxAryVar[IdxVal].setBackgroundColor(ClrAryVar[IdxVal]);
        MainViewVav.addView(TchBoxAryVar[IdxVal]);
    }