Android Question Making Customview as a parent

azzam223

Active Member
Licensed User
Longtime User
hello Can I make custom view as parent like panel So I can Add views to it in designer
 
thanks steve but How Can I Know the target layout I want when Add controls to the designer I can put it in my custom view
 
Upvote 0
A custom view would normally only have one layout so you would do it the same as loading any other layout:
Code: Copy
mBase.LoadLayout("LayoutName")

I think you are suggesting that you want to load different layouts into the same custom view dependant on some user interaction. If that is the case, I wouldn't, as it will mean handling the events from views from multiple layouts in one class. I would create multiple custom views, then load and remove those from a panel or create a new activity for each, It really depends on what you are trying to achieve.
 
Upvote 0
thanks erel this mean that IF I want To add views to my custom I must put it in another layout then load this layout or load the same layout that my custom view in it

is any way to add it in designer instead of load it in run time
 
Upvote 0
I mean I want my custom view like panel So when i add view I can put the view in my custom view like panel through parent property
 
Last edited:
Upvote 0
Back
Top