Giter Site home page Giter Site logo

fennifith / adaptiveiconview Goto Github PK

View Code? Open in Web Editor NEW
29.0 29.0 7.0 1.04 MB

A library to allow easy implementation of pre-Oreo adaptive icon support in Android launchers.

Home Page: https://jitpack.io/#me.jfenn/AdaptiveIconView

License: Apache License 2.0

Java 100.00%
android android-library android-ui

adaptiveiconview's Introduction

Open Source

I've written a wide range of software for various reasons - to suit my needs, experiment with new functionality, or just mess around for fun.

Much of it is buggy, inefficient, out of date, or otherwise incomplete - but I like to open source it regardless so anyone can see what I'm working on. Generally, it's a lot more interesting to interact with other people and collaborate on improving my work.

If you need help with the contributing process in any of my projects, have any questions or confusion, or want to get feedback before a contribution, please don't hesitate to get in touch!

Discord Twitch

Elsewhere

adaptiveiconview's People

Contributors

fennifith avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

adaptiveiconview's Issues

Icon Pack Fallback method

This will not be implemented in the initial release simply because I'm lazy and have suddenly acquired a strong dislike for XML parsing. It is a relatively important feature, though, and should be added as soon as I stop procrastinating and actually do some work for once.

Auto-Resize Legacy Icons

Option to guess the shape of a legacy icon and dynamically resize it to fit inside the shape of the clip path. This is already kind of done using the isTransparent (or maybe it's hasTransparency, I can't remember) method to set the scale to 1 if it doesn't have any transparency (meaning the icon will always cover an area greater than the shape) or 1.25 if it doesn't.

Badge Support?

Probably redundant with Material Components Badge Drawable on its way out but having an option you know works is always good.

An optional badge or dot indicator for the view. Refer to this link as an example (or just fork in code and save a day of hassle)

https://github.com/nikartm/Image-Support

Some icons have wrong background

With apps like ZEDGE and some other the background is ignored.
You can add try/catch to these lines in AdaptiveIcon.java to fix that:

try {
    iconName = resources.getResourceName(manifestParser.getAttributeResourceValue(ANDROID_SCHEMA, "icon", 0));
    if (iconName.contains("/"))
        iconName = iconName.split("/")[1];
}catch (Exception e){
}

Convert AdaptiveIcon to Bitmap?

How can I do it?

I want to merge the background and foreground of it to a single bitmap/drawable, but it doesn't let me...

Sample App is Crap

It shows off the functionality in some remotely reasonable manner, but other than that is actually pretty buggy and takes a long time to launch because idk maybe the developer has never heard of multithreading or something like that.

U N I F O R M I T Y

Why is the library module called "library" when all of my other projects give the module the same name as the artifact id? WHY DID I DO THIS???

I must have been tired.
I will fix it soon.
Maybe.

onTouch consumes onLongClick

May not be the case but assuming as a long click listener does nothing on an adaptiveIconView in recyclerview. Longclick is detected in the itemview layout surrounding adaptiveIconView.

More investigation leads this is the case. onTouch is detected first before longClick so a couple of things will be tried.

-We implement 1 click and 2 click(double tap) touch events
-We implement 1 click and a timer to emulate a long click
-We implement gesture detector to the onTouch and set events to what happens with certain clicks and listeners to those events (obviously, onTap setting off motion of icon and whatever else tied to it)

will be trying a few things

Question: is this part really correct?

This seems weird:

    private static float[] getFloats(String s) {
        if (s.charAt(0) == 'z' | s.charAt(0) == 'Z') {
            return new float[0];
        }

I think you meant to use "||" and not a single one...
Where did you get this code from?
Maybe it should get updated...
Not even sure what this means with a single one...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.