-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
No image displayed when using this for ImageButton Image States #71
Comments
Not sure why the code disappeared.
|
I think you are hitting this problem: #10 (comment) If you set |
Hey, thanks for the response. I read through the linked issue and saw that someone mentioned that setting height and width request to Fill or FillAndExpand also helped. I tried fill, fillandexpand, and setting actual height and width (512) and it was better but still having issues. Now the image button does display in the carousel view using any combinationof fill, fillandexpland, and width and height but when you pressed the button and it goes to the pressed state image, it disappears. The button still takes up the space so when I press it multiple times it eventually flashes back in place and the disappears and then a few more times later then the pressed state image "loads" I guess and then it works properly and is very smooth. So the problem I'm having now is the pressed state image doesn't always appear. However doing the above didn't fix my other view in which I have both buttons on the screen in just a normal flexlayout at all times.
The initial button images appear but when I press them they disappear completely and doesn't take up space anymore so the other button fills up the missing space and then I press that button and it disappears and now all buttons are gone and I can't use them anymore. Removing glidex.forms has them work but it lags so hard from the images that it's not acceptable for release. I also saw this in the console at some point, not sure if it was before I set the width and height but it may help: "Glide treats LayoutParams.WRAP_CONTENT as a request for an image the size of this device's screen dimensions. If you want to load the original image and are ok with the corresponding memory cost and OOMs (depending on the input size), use override(Target.SIZE_ORIGINAL). Otherwise, use LayoutParams.MATCH_PARENT, set layout_width and layout_height to fixed dimension, or use .override() with fixed dimensions." |
If you could send a PR adding this example here that would help out a lot: https://github.com/jonathanpeppers/glidex/tree/master/glidex.forms.sample/Forms I run through these before each release. If not, I may get around to testing this at some point, thanks. |
I've never actually submitted a PR to github. When you say this, do you want me to make a sample project showing the error and submit that or take your samples at the link and try and make it occur within your samples? |
If you can, make a view that shows the problem in the glidex samples. Thanks! |
So as mentioned I never summitted a PR so I'm running into a bit of an issue. I have cloned the code using visual studio 2019's clone GitHub feature. I then created a local branch and added all my examples showing the issue. I then try and push that branch and get the following error:
Since 403 tends to be not authorized, is this not the way I'm supposed to be doing it? Do you need to turn me on to do this? I was thinking after pushing the branch up I can then create a pull request through the website for master -> to Davids_ImageButton branch. I'm trying to piece together tutorials online as I never used git (always TFS) so I could be going down a completely wrong path. Any help would be appreciated. |
@dberroa it sounds like you need to "fork" this repository, and send the pull request from your fork. Does this help? |
Forking it did the trick. I was able to create a pull request and have explained what to do with the buttons in the pull request. #74 Let me know if you have any questions. |
Context: #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. Co-authored-by: David Berroa <[email protected]> Co-authored-by: Jonathan Peppers <[email protected]>
Context: #71 The `VisualStateManagerPage` displays an issue where you see an image flicker for a moment when tapping a button for the first time. Subsequent taps work fine. I found that setting a `Placeholder` solved the problem completely, and I don't see flickering any longer. Not sure if this fully fixes #71 as there are some mentions of `FlexLayout`.
I have installed this package and the glidex package and everything builds properly but the images I am trying to display do not display. When I remove this package but not the glidex package, they do. This leads me to believe this is related to glidex.forms. This is for Android.
I'm trying to do the following below to display two images buttons in a carousel.
The text was updated successfully, but these errors were encountered: