WAZUMBi Well-Known Member Licensed User Longtime User Jul 1, 2012 #1 Is not possible to define an image view inside a type definition? For example this code will not work: Code: Copy Type exampleData(imv as ImageView, a as int, b as int) Dim example as exampleData example.imv.Initialize("imv") Activity.AddView(example.imv, 0, 0, 50dip, 50dip) I get a null pointer exeption
Is not possible to define an image view inside a type definition? For example this code will not work: Code: Copy Type exampleData(imv as ImageView, a as int, b as int) Dim example as exampleData example.imv.Initialize("imv") Activity.AddView(example.imv, 0, 0, 50dip, 50dip) I get a null pointer exeption
thedesolatesoul Expert Licensed User Longtime User Jul 1, 2012 #2 You need to still initialize both the variable and the image view. Example.initialize Example.imv.initialize("imv") Sent from my GT-I9000 using Tapatalk 2 Upvote 0
You need to still initialize both the variable and the image view. Example.initialize Example.imv.initialize("imv") Sent from my GT-I9000 using Tapatalk 2
WAZUMBi Well-Known Member Licensed User Longtime User Jul 1, 2012 #3 That was it. Thank you. Curious: Is it only when you add views to a type that the type must first be initialized? I havn't had to initialize a type before this way. Upvote 0
That was it. Thank you. Curious: Is it only when you add views to a type that the type must first be initialized? I havn't had to initialize a type before this way.
thedesolatesoul Expert Licensed User Longtime User Jul 1, 2012 #4 Some times when types contain further custom types or arrays you also need to initialize them. Sent from my GT-I9000 using Tapatalk 2 Upvote 0
Some times when types contain further custom types or arrays you also need to initialize them. Sent from my GT-I9000 using Tapatalk 2