NClientV2 icon indicating copy to clipboard operation
NClientV2 copied to clipboard

Update SimpleGallery.java

Open Heluojiang opened this issue 1 year ago • 8 comments

Try to Fix nullException

Heluojiang avatar Nov 10 '24 09:11 Heluojiang

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

Kronos2308 avatar Nov 12 '24 07:11 Kronos2308

@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.

Heluojiang avatar Nov 12 '24 07:11 Heluojiang

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

Kronos2308 avatar Nov 12 '24 07:11 Kronos2308

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

Heluojiang avatar Nov 12 '24 07:11 Heluojiang


done app-debug.zip

Kronos2308 avatar Nov 12 '24 09:11 Kronos2308

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 avatar Nov 12 '24 09:11 Kronos2308

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

Kronos2308 avatar Nov 12 '24 10:11 Kronos2308

Well done, so excited.

Heluojiang avatar Nov 12 '24 10:11 Heluojiang