Android Question How to set views' Horizontal Anchor and Vertical Anchor properties by codes?

Hi, everyone

I am creating a layout by codes.
I found it is easily to set its' Left, Top, Width and Height. But how can I set it's Horizontal Anchor and Vertical Anchor by codes?

custom view:
    Dim mBase As Panel
    Dim lblTitle as Label
    lblTitle.TextSize = 14
    lblTitle.TextColor = Colors.Black
    lblTitle.Gravity = Bit.Or(Gravity.Left, Gravity.CENTER_HORIZONTAL)
    lblTitle.Text = "qty per pallet"
    mBase.AddView(lblTitle, 0, 0, 90dip, 20dip)

    Activity.AddView(mBase, 0, 0, 100%x, 100%y)