tufanv Expert Licensed User Longtime User Jul 4, 2015 #1 Hello, I am using several imageviews in my app. I have a problem.i set imageview1 's bitmap as : imageview1.bitmap = LoadBitmap(File.DirAssets, "gri.png" ) when i try to get the bitmap with log(imageview1.bitmap) i get something like : <B4IBitmap: <UIImage: 0x17ec86b0>, {100, 100}> what i try to make is i want to check if imageview1.bitmap = gri.png then do something but i cant do it . Any ideas ? Thank you
Hello, I am using several imageviews in my app. I have a problem.i set imageview1 's bitmap as : imageview1.bitmap = LoadBitmap(File.DirAssets, "gri.png" ) when i try to get the bitmap with log(imageview1.bitmap) i get something like : <B4IBitmap: <UIImage: 0x17ec86b0>, {100, 100}> what i try to make is i want to check if imageview1.bitmap = gri.png then do something but i cant do it . Any ideas ? Thank you
S strat Active Member Licensed User Longtime User Jul 4, 2015 #2 Tufan bu kısım genel forum olduğundan ingilizce yazıyorum. Sadece bir fikir. Use an array like B4X: Dim imagenames(50) As String Assign imagenames to array : B4X: imagenames(1)="gri.png" imagenames(2)="red.png" .... To check imagename to any picture use this : B4X: If imagenames(1)="gri.png" Then imagename(1) cheks for name of imageview1.bitmap, imagenames(2) checks for imageview2.bitmap etc. Upvote 0
Tufan bu kısım genel forum olduğundan ingilizce yazıyorum. Sadece bir fikir. Use an array like B4X: Dim imagenames(50) As String Assign imagenames to array : B4X: imagenames(1)="gri.png" imagenames(2)="red.png" .... To check imagename to any picture use this : B4X: If imagenames(1)="gri.png" Then imagename(1) cheks for name of imageview1.bitmap, imagenames(2) checks for imageview2.bitmap etc.
imbault Well-Known Member Licensed User Longtime User Jul 4, 2015 #3 You can put your image file name in ImageView.tag then use the tag property to check your file name, like : B4X: imageview1.Bitmap = LoadBitmap(File.DirAssets, "gri.png" ) imageview1.Tag = "gri.png" log(imageview1.Tag ) Upvote 0
You can put your image file name in ImageView.tag then use the tag property to check your file name, like : B4X: imageview1.Bitmap = LoadBitmap(File.DirAssets, "gri.png" ) imageview1.Tag = "gri.png" log(imageview1.Tag )
tufanv Expert Licensed User Longtime User Jul 4, 2015 #4 strat said: Tufan bu kısım genel forum olduğundan ingilizce yazıyorum. Sadece bir fikir. Use an array like B4X: Dim imagenames(50) As String Assign imagenames to array : B4X: imagenames(1)="gri.png" imagenames(2)="red.png" .... To check imagename to any picture use this : B4X: If imagenames(1)="gri.png" Then imagename(1) cheks for name of imageview1.bitmap, imagenames(2) checks for imageview2.bitmap etc. Click to expand... Hocam tesekkur ederim Upvote 0
strat said: Tufan bu kısım genel forum olduğundan ingilizce yazıyorum. Sadece bir fikir. Use an array like B4X: Dim imagenames(50) As String Assign imagenames to array : B4X: imagenames(1)="gri.png" imagenames(2)="red.png" .... To check imagename to any picture use this : B4X: If imagenames(1)="gri.png" Then imagename(1) cheks for name of imageview1.bitmap, imagenames(2) checks for imageview2.bitmap etc. Click to expand... Hocam tesekkur ederim
tufanv Expert Licensed User Longtime User Jul 4, 2015 #5 imbault said: You can put your image file name in ImageView.tag then use the tag property to check your file name, like : B4X: imageview1.Bitmap = LoadBitmap(File.DirAssets, "gri.png" ) imageview1.Tag = "gri.png" log(imageview1.Tag ) Click to expand... Thank you Upvote 0
imbault said: You can put your image file name in ImageView.tag then use the tag property to check your file name, like : B4X: imageview1.Bitmap = LoadBitmap(File.DirAssets, "gri.png" ) imageview1.Tag = "gri.png" log(imageview1.Tag ) Click to expand... Thank you