Android Question HELP StdActionBar error

PABLO2013

Well-Known Member
Licensed User
Longtime User
regards
I want to know what can be the following problem:


I want to open two layoud stdactionbar, this works per gives me an error
if someone could help me thanks

error..........................................................................................................
(Main, 460) Panel.LoadLayout should only be called after the panel was added to its parent. (warning #1001)
(Main, 461) Panel.LoadLayout should only be called after the panel was added to its parent. (warning #1001)

error..........................................................................................................

code.........................................................................
bar.Initialize("bar")
bar.NavigationMode = bar.NAVIGATION_MODE_TABS
bar.Subtitle = "Maestría en Valuación"
Activity.Title = "UNED"
Panel1.Initialize("1")
panel2.Initialize("2")
bar.AddTab("CapUso").Tag = panel2
bar.AddTab("Mapa").Tag = Panel1
Panel1.LoadLayout("1")
panel2.LoadLayout("2")
code.........................................................................
 
If you have added the panels via the designer, you shouldn't initialize them in your code. If you haven't added them in the designer, you need to add them to a parent(activity or Panel) i.e. Activity.LoadLayout(Panel1.....) before loading a layout into them.
 
Upvote 0
Back
Top