redlor / Minitask

Simple and lightweight todo list/task list for Android
Apache License 2.0
12 stars 8 forks source link

[Interface glitch] Image switcher / App displays a rocket image while swiping the image switcher #6

Closed danielblokus closed 6 years ago

danielblokus commented 6 years ago

I found some interface glitch (maybe it's a feature). A rocket icon appears on images switcher.

Steps to reproduce:

  1. Open app
  2. Change orientation to landscape
  3. Swipe tabs

device: Nexus 5X; API 26/8.0 branch: newversion I attached a movie file. [attachment](https://youtu.be/HeBFUDUU-w)

redlor commented 6 years ago

@danielblokus I see what you mean, I think it was a feature in the original app, where a ViewFactory was used to change the image when changing tab and with animations when sliding:


    descriptImage.setFactory(new ViewSwitcher.ViewFactory() {
                @Override
                public View makeView() {
                    // set props for image switcher
                    ImageView imgview = new ImageView(getApplicationContext());
                    imgview.setScaleType(ImageView.ScaleType.CENTER_CROP);
                    return imgview;
                }
            });

        // Photo flies in and out
        Animation in = AnimationUtils.loadAnimation(this, android.R.anim.slide_in_left);
        Animation out = AnimationUtils.loadAnimation(this, android.R.anim.slide_out_right);
        descriptImage.setInAnimation(in);
        descriptImage.setOutAnimation(out);
        descriptImage.setImageResource(IMAGES[0]); // first start render

In the firebase branch I just pulled i changed this logic, I am not re-using the same fragment but I created a fragment for every tab because I cannot make a SQL query. by doing that, I also changed the logic the images are loaded. If you try that branch you should't see any glitch. Let me know so I can close the issue. Many thanks!

danielblokus commented 6 years ago

@redlor yup, resolved. Feel free to close the issue.