Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added image button examples for carousel views and flexlayout issues #74

Merged
merged 3 commits into from
Sep 23, 2020

Conversation

dberroa
Copy link
Contributor

@dberroa dberroa commented Sep 23, 2020

This pull request is in reference to #71

You can see the issues by doing the following.

Launch the app on device or in simulator and scroll down to the bottom and select FlexLayout Image Buttons. This will display two image buttons on the screen. When you tap on one you will notice it will disappear for a second and then load in the pressed image. You can see this better by holding the tap. After releasing the first time and then tapping it again, it does not flash anymore however it completely loses its positioning and starts resizing weird. If I tap only the top one it shrinks down and up. If I tap the bottom one after the top one it stretches to the side. Now if I tap the top one again it will stretch to the side as well. On my personal app it takes about a whole second for the pressed image to load but in this app its about .8 seconds but still noticeable. The point of this layout shows exactly what I'm trying to do with my app that can have dynamic screen sizes for ipad and iphone so it needs to be able to expand and shrink.

The second example is the carousel view image buttons. This one you can see the image disappears and reappears on first use and then stays loaded on additional uses.

Let me know if you have any questions.

This doesn't need two `FlexLayout`, and `<ContentPage.Content>` can be omitted.
@jonathanpeppers
Copy link
Owner

Thanks, the result of the FlexLayout example is definitely weird:

image

But then I removed the reference to glidex.forms completely, and it acts in a similar weird way!

image

I think this is just a bug with FlexLayout and nothing to do with glidex.forms?

I can see the blinking image. That might be a different issue, so let me test that some more.

@jonathanpeppers
Copy link
Owner

So I could fix the "blinking" by changing this line:

builder = request.Load (drawable);

To just do this instead:

imageView.SetImageResource (drawable);
return;

This doesn't use Glide at all, just regular ImageView. But it seems to work a little better?

I'll merge this PR with your examples and look into fixing the actual problem tomorrow, thanks!

@jonathanpeppers jonathanpeppers merged commit fe2454d into jonathanpeppers:master Sep 23, 2020
@dberroa
Copy link
Contributor Author

dberroa commented Sep 28, 2020

"But then I removed the reference to glidex.forms completely, and it acts in a similar weird way!"

How did you end up removing it? When I removed it from the sample, it wouldn't compile.

In my personal real life app I'm making, removing the glidex.forms does make the fleylayout work fine with no code changes so that is what lead me to thinking it was this. I know this may not help as much as actual code but I can create a video if you would like to show how it works with and without the glidex.forms library.

@jonathanpeppers
Copy link
Owner

When I removed it from the sample, it wouldn't compile.

I commented out the code that didn't compile. It's one line in MainActivity.cs and just remove RandomAlphaHandler from the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants