Gary Miyakawa Active Member Licensed User Longtime User Jun 16, 2011 #1 I'm trying to change the back ground image on both a ProgressBar and SeekBar view. I've used the following code and the imageview1 does show the correct image, the others are not changed from their standard grey background. What am I doing wrong ? Code: Copy Activity.LoadLayout("1") Dim bmp As Bitmap bmp.Initialize(File.DirAssets, "abc.png") SeekBar2.SetBackgroundImage(bmp) seekbar4.SetBackgroundImage(bmp) imageview1.SetBackgroundImage(bmp) pbBar1.SetBackgroundImage(bmp) Thanks, Gary M
I'm trying to change the back ground image on both a ProgressBar and SeekBar view. I've used the following code and the imageview1 does show the correct image, the others are not changed from their standard grey background. What am I doing wrong ? Code: Copy Activity.LoadLayout("1") Dim bmp As Bitmap bmp.Initialize(File.DirAssets, "abc.png") SeekBar2.SetBackgroundImage(bmp) seekbar4.SetBackgroundImage(bmp) imageview1.SetBackgroundImage(bmp) pbBar1.SetBackgroundImage(bmp) Thanks, Gary M
Erel B4X founder Staff member Licensed User Longtime User Jun 16, 2011 #2 ProgressBar and SeekBar do not support an additional background image. Upvote 0
Gary Miyakawa Active Member Licensed User Longtime User Jun 16, 2011 #3 Ok, that would explain it! Guess the documentation needs to be adjusted for that. Thanks ! Gary M Upvote 0
nfordbscndrd Well-Known Member Licensed User Longtime User Jun 16, 2011 #4 Gary Miyakawa said: Ok, that would explain it! Guess the documentation needs to be adjusted for that. Click to expand... In the B4A Documentation Wiki, functions/properties common to all (or most) views are shown on one page; those unique to one (or a few) views are shown on the view's page. The Bitmap property does not appear on the common views page; it is on the ImageView page but not on the ProgressBar and SeekBar pages. OTOH, the Common Views page does show: Background As android.graphics.drawable.Drawable Gets or set the background drawable. Click to expand... and frankly, it's not clear to me exactly what that means. (I just copied it from the HelpViewer and futher searching didn't turn up a clear definition.) Upvote 0
Gary Miyakawa said: Ok, that would explain it! Guess the documentation needs to be adjusted for that. Click to expand... In the B4A Documentation Wiki, functions/properties common to all (or most) views are shown on one page; those unique to one (or a few) views are shown on the view's page. The Bitmap property does not appear on the common views page; it is on the ImageView page but not on the ProgressBar and SeekBar pages. OTOH, the Common Views page does show: Background As android.graphics.drawable.Drawable Gets or set the background drawable. Click to expand... and frankly, it's not clear to me exactly what that means. (I just copied it from the HelpViewer and futher searching didn't turn up a clear definition.)
Gary Miyakawa Active Member Licensed User Longtime User Jun 17, 2011 #5 The documentation at Basic4android - Views (Core) Clearly shows "setbackgroundimage" as an option and it does also show up in the IDE... Just needs to be updated for future folks... Gary M Upvote 0
The documentation at Basic4android - Views (Core) Clearly shows "setbackgroundimage" as an option and it does also show up in the IDE... Just needs to be updated for future folks... Gary M
nfordbscndrd Well-Known Member Licensed User Longtime User Jun 17, 2011 #6 You're right. I've changed this in the Wiki. Thanks. Upvote 0