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

Update SimpleGallery.java #756

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Heluojiang
Copy link

Try to Fix nullException

Fix nullException
@Kronos2308
Copy link

the chrash get fixed with that
the images are not show
UnsignedBuild for test

@Heluojiang
Copy link
Author

@Kronos2308 It performs very well. When I use a proxy, the installation package you upload to the mega can log in correctly and load the image correctly. It passed my test.

@Kronos2308
Copy link

Kronos2308 commented Nov 12, 2024

whass a litle hell because one of the libraries got deprected and deleted
multiline-collapsingtoolbar-release.zip

@Heluojiang
Copy link
Author

Heluojiang commented Nov 12, 2024

I am a web application developer, so it seems that I may not be able to fully understand and solve this problem; but I believe you can solve this problem, come on

@Kronos2308
Copy link

Kronos2308 commented Nov 12, 2024



done
app-debug.zip

@Kronos2308
Copy link

Kronos2308 commented Nov 12, 2024

Page.java

    public static String extToString(ImageExt ext) {
        switch (ext) {
            case GIF:
                return "gif";
            case PNG:
                return "png";
            case JPG:
                return "jpg";
            case WEBP:
                return "webp";
        }
        return null;
    }

    public static char extToChar(ImageExt imageExt) {
        switch (imageExt) {
            case GIF:
                return 'g';
            case PNG:
                return 'p';
            case JPG:
                return 'j';
            case WEBP:
                return 'w';
        }
        return '\0';
    }

    public static ImageExt charToExt(int ext) {
        switch (ext) {
            case 'g':
                return ImageExt.GIF;
            case 'p':
                return ImageExt.PNG;
            case 'j':
                return ImageExt.JPG;
            case 'w':
                return ImageExt.WEBP;
        }
        return null;
    }

@Kronos2308
Copy link

It is an interesting application. I only have Notepad++, so I work with that.
you just need to add one more extension WEBP("webp")
but the app is programmed to work with extensions of 3 characters jpg png gif, webp has 4 characters so I just touched the part that arbitrarily takes the final 3 characters for something more flexible and then you just have to modify the regex, with which you search the files
and the functions that converted the extension into a character and the character into an extension
simply follow the functions from the inside out

@Heluojiang
Copy link
Author

Well done, so excited.

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