Bitmap loaded into a label (which is in a ScrollView) dissappears

andrewtheart

Member
Licensed User
Longtime User
I have a bitmap loaded into a label (which is in a ScrollView) which disappears after I make the scrollview invisible and then visible again (visible=false later followed by visible=true)

The best way to show you guys this is to give you my app, so here goes:

BridgeLocator.zip

Search for bridges near you within a 2 mile radius. This will only work for you if you're in the United States. You'll get a list of bridges near you. The image I am referring to that gets erased is under the "Favorited" column. Then click on a bridge in the scrollview result list, let it load, then press the Back button to go back to the main page. The bitmap that was loaded into the Favorited column is gone!

By the way, even though I used LoadBitmapSample, the image is still stretched to the full size of the column ...

Any ideas?
 

andrewtheart

Member
Licensed User
Longtime User
If you can please create a small program that demonstrates the problem.

That's going to be more trouble than it's worth - the program I uploaded demonstrates the issue. For now, I am just putting text in the column instead of a bitmap.
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
That's going to be more trouble than it's worth - the program I uploaded demonstrates the issue.
That's not the point. If we are to help it is easier to diagnose using a small example. If you can't be bothered to help us by providing a small demonstrator program we certainly aren't prepared to help you by wading through a large unfamiliar heap of code. Remember that most everybody here is helping in our own time for no reward.
 
Upvote 0

andrewtheart

Member
Licensed User
Longtime User

I completely understand but I do not have the invest the time to create a new small program to reproduce this problem. For now, just putting text in the column works fine. If someone else stumbles into the problem and wants to do this then good on them.
 
Upvote 0

andrewtheart

Member
Licensed User
Longtime User
Also, if the actual developers of Basic4Android (not people dedicating their free time to the forum) care enough to support a paying customer, they will invest the time to look at my application. If they don't, it's no longer my loss.

 
Upvote 0

kickaha

Well-Known Member
Licensed User
Longtime User
Supplying an app that only works if you are in (the good old) United States is limiting your help somewhat, check out the locations of the major contributors to this forum
 
Upvote 0

andrewtheart

Member
Licensed User
Longtime User
I should be on the ignore list of anyone who isn't going to help a paying customer because of their inexperience with Basic4Android.

I somehow doubt the devs would have handled this situation the same way.

As an experienced developer myself I am confident that the people who wrote Basic4Android can work with my code quite easily. It's not nuclear launch code.
 
Last edited:
Upvote 0

kickaha

Well-Known Member
Licensed User
Longtime User
It's not nuclear launch code.

No, but it is still time consuming to follow, especially when you know there are errors.

In my case I started reading through your code and got as far as line 89 through 93
B4X:
   Dim details_tabs_map_webview_complete As Boolean
   Dim details_tabs_directions_webview_loadcomplete As Boolean
   
   details_tabs_map_webview_loadcomplete = False
   details_tabs_directions_webview_loadcomplete = False
Can you see your error? Now this is not the problem, but it gives an indication of the possible type of problem in the program.

At that point I stopped reading the code, and as I cannot run your app it was the end of the line for me.
 
Upvote 0

andrewtheart

Member
Licensed User
Longtime User
That code is simply setting two booleans to false which later get set to true in the loadComplete handlers of two different webviews.

not that complicated.

but as you said, the problem doesn't lie there.

if you simply ran the application, you'd see quickly what issue I am talking about with the bitmap disappearing after a row is selected, the bridge details page loads, and the user clicks the back button.

let me be clear, there are no problems with the code besides the loaded bitmap (loaded in a label which is present on each row in the table) dissapearing after the above scenario plays out.
 
Last edited:
Upvote 0

Kevin

Well-Known Member
Licensed User
Longtime User
I don't mean to interrupt, but I think this may be what kickaha was referring to:

B4X:
Dim [I]details_tabs_map_webview_complete[/I] As Boolean
Dim details_tabs_directions_webview_loadcomplete As Boolean
   
[I]details_tabs_map_webview_[B]load[/B]complete[/I] = False
details_tabs_directions_webview_loadcomplete = False


Not that that has anything to do with your error.... just thought that this may indeed be a "typo", so just trying to help. Unless there are multiple boolean variables that are named similarly and those two are supposed to be different.
 
Upvote 0

kickaha

Well-Known Member
Licensed User
Longtime User
B4X:
   Dim [COLOR="Blue"]details_tabs_map_webview_complete[/COLOR] As Boolean
   Dim details_tabs_directions_webview_loadcomplete As Boolean
   
   [COLOR="Blue"]details_tabs_map_webview_loadcomplete[/COLOR] = False
   details_tabs_directions_webview_loadcomplete = False

Two Booleans? Really? have a look at the bits in blue and do a recount (you can do it on one hand).

The point is your code may be littered with other issues that you have not noticed (even when pointed out).

Then as your code only works for US based users, the "if you simply ran the application" is not an option (and will not be for the devs).
 
Upvote 0

andrewtheart

Member
Licensed User
Longtime User
OK, I do see that issue, and I am shocked because

B4X:
details_tabs_map_webview_loadcomplete

is not even defined - why did Basic4Android not complain about this?

Anyway, this is definitely unrelated to the bitmap issue.

I see you're point that it might be littered with issues.
 
Upvote 0

andrewtheart

Member
Licensed User
Longtime User
Then just forget it, I am not willing to invest the time to make a knockoff of my app for testing this.

Can this thread be closed?
 
Upvote 0

Kevin

Well-Known Member
Licensed User
Longtime User


I've seen at least one suggestion for "OPTION EXPLICIT" but at this time, it is unknown if Erel will add that in or not. That would alleviate problems like this, which can definitely bite you in the ass (believe me, I know).

Anyway, good luck sorting out your problem.
 
Last edited:
Upvote 0

andrewtheart

Member
Licensed User
Longtime User
seems pretty damn important to me. thanks
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…