Android Question Puzzling... me

Cableguy

Expert
Licensed User
Longtime User
Hi guys

Continuing my quest to get AnyView.Parent and use it to set as the parent of another view I came to these lines of code...

B4X:
  Private JPanel = DPanel As JavaObject 'DPanel is a Panel, JPanel is the JObj linked to it
   Private jParent = byParent As JavaObject 'byParent is the view passed in the class initializer, JParent is its JObj
 
   JPanel.RunMethod("setParent",jParent.RunMethod("getParent",Null))

wich doesn't work...

I am trying to set a views Parent to be another's view Parent

if needed i can provide the debug stack
 
Last edited:

Cableguy

Expert
Licensed User
Longtime User
this is as Bare as a Bone can be...

The Button's Parent is main activity... BUT I may need to call my class from a view who has a Panel as Parent... or an Activity... this is to be a Custom Dialog for an App I'm re-starting... so it will be called a bunch of times, and each time the Parent may be not directly known...
I could live with seperate initializers, as I will know if Parent is a Panel or an Activity..
 

Attachments

  • TapDialog.zip
    7.5 KB · Views: 247
Last edited:
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Thanks for all your time... I never thought that the panel was being created the same color as the activity..
I can live with the not logging part...LoL
 
Upvote 0
Top