K Kamac Active Member Licensed User Longtime User Aug 22, 2011 #1 Hi i'm having problems with imageview manual adding... i have this: B4X: Dim achievmentb As ImageView achievmentb.Initialize("achievmentb") achievmentb.Gravity = Gravity.fill achievmentb.Enabled = True achievmentb.Width = 100 achievmentb.Height = 50 and i get error: java.lang.NullPointerException on: achievmentb.Width = 10
Hi i'm having problems with imageview manual adding... i have this: B4X: Dim achievmentb As ImageView achievmentb.Initialize("achievmentb") achievmentb.Gravity = Gravity.fill achievmentb.Enabled = True achievmentb.Width = 100 achievmentb.Height = 50 and i get error: java.lang.NullPointerException on: achievmentb.Width = 10
klaus Expert Licensed User Longtime User Aug 22, 2011 #2 You must Add the ImageView with AddView to the Activity or to a Panel before you can have access to the layout properties. Best regards. Upvote 0
You must Add the ImageView with AddView to the Activity or to a Panel before you can have access to the layout properties. Best regards.