Here you go
@shubas,
YourWidget.RV.SetVisible("Panel1", False)
YourWidget.RV.SetVisible("Panel2", True)
YourWidget.RV.SetVisible("Panel3", False)
YourWidget.RV.SetVisible("Panel4", False)
YourWidget.RV.SetVisible("Panel5", False)
Using SetVisible is how you set the panel visibility in widgets. Above Panel2 (Widget layout 1) is viewable in your widget, all the rest are not. Please note that All your layouts (Panels) must share the same main parent panel, that main parent panel has the activity as its parent, see below. Panels can be changed during run time.
In designer:
Activity
MainPanel
Panel1 (Widget layout 1)
Panel2 (Widget layout 2)
Panel3 (Widget layout 3)
Panel4 (Widget layout 4)
Panel5 (Widget layout 5)
You can have as many widget layouts (Panels) as you would like.
Enjoy...