Neamar / KISS

Lightning fast, open-source, < 250kb Android launcher
https://kisslauncher.com/
GNU General Public License v3.0
2.98k stars 582 forks source link

Icons for tags on fav bar #1314

Open mzuther opened 4 years ago

mzuther commented 4 years ago

Hi!

I have just tried out the tagging of apps and placed several tags on my fav bar. This works great!

Given the neat look of KISS launcher, however, the round icons with just a letter look somewhat "out of place". What I'd like to see is the ability to add custom icons to tags. This would make it easier to identify tags and also add to the visual appeal of the launcher:

kiss_current

kiss_proposed

I see two possibilities (please note that I have only limited knowledge of Androids's internals): add the icons internally or create an "app" for each tag to which an icon can be attached externally.

Thanks for your continued effort in improving KISS launcher and, above all, merry Christmas! :)

Martin

Neamar commented 4 years ago

Hey Martin,

Thanks for your message! Adding icons would be nice, that's true... but it would also increase the size of KISS, that we try really hard to keep under control.

We could use system icons but this might be limited and not work on every device. I'll keep it open in case someone feels like doing this :) (maybe @TBog ?)

TBog commented 4 years ago

Right now I'm swamped with work but I'll have a look to see what I can do 😉

mzuther commented 4 years ago

Thanks for considering my idea. I'm patient... :smile:

TBog commented 4 years ago

I've made a prototype here: cd710d6a9911a229e41c6c62e824571d83bb15ac Long touch the favorite tag, select change icon, choose one of the android.R.drawables. Currently the icon is not saved and the background is not square.

Where else can I get more drawables? Can / Should I look for them inside apps?

mzuther commented 4 years ago

Thanks! :smile:

I tried this Android 7.1.1 and 9.0 emulators. The prototype works and I like your solution!

Regarding your question, these links might be helpful:

https://orcchg.wordpress.com/2016/02/25/get-attribute-color-or-drawable-programmatically/ https://stackoverflow.com/questions/31490630/how-to-load-icon-from-icon-pack https://stackoverflow.com/questions/24937890/using-icon-packs-in-my-app

However, with only a basic knowledge of Android, I'm not sure whether this is what you actually need.

TBog commented 4 years ago

We already do almost the same thing for icon packs. I also checked out https://github.com/LawnchairLauncher/Lawnchair/blob/alpha/lawnchair/src/ch/deletescape/lawnchair/iconpack/IconPackImpl.kt but...

What we could also try is to load image files (that you download yourself from the net to avoid extra permissions) and set them as icons.

mzuther commented 4 years ago

What we could also try is to load image files (that you download yourself from the net to avoid extra permissions) and set them as icons.

You are right, this sounds like the easiest way. No one is going to have more than a few categories on the fav bar, so providing an entire icon pack is a bit extreme.

I can think of two solutions:

  1. Users have to store their icons in a special directory. Drawback: a typical user will probably not understand this (or remember the correct location) and has to reference a manual.

  2. A file dialog allows users to locate a specific icon and its full path will be stored in the settings. Drawback: users occasionally delete and move stuff which will break things.

I'd prefer the second solution, but maybe you can think of a better way.

TBog commented 4 years ago
  1. A file dialog allows users to locate a specific icon and its full path will be stored in the settings. Drawback: users occasionally delete and move stuff which will break things.

Once the user chooses an icon we copy or re-encode it in the cache icon folder or smth

ildar commented 4 years ago

guys, there's a no-bother solution to this: use emojis as a first letter of tags. My favorite one is: ★

TBog commented 4 years ago

guys, there's a no-bother solution to this: use emojis as a first letter of tags. My favorite one is: ★

That's what I was thinking when I implemented the first letter drawing, I had a lot of problems with emoticons and treated them specially

mzuther commented 4 years ago

@ildar Thanks, that's a nice idea! I've just tried it and the tags immediately feel much more useful.

However, I see it only as an interim solution:

  1. It's not immediately obvious that using emojis is an option. Take me: I simply don't perceive emojis as characters (albeit knowing they are characters).

  2. Tagging becomes less efficient (at least with my keyboard).

  3. If you want to add a tag after a while, the emoji you need has probably been removed from the history list and you have to locate it in the long list of emojis.

  4. You are usually stuck with whatever set of emojis the manufacturer of your smartphone put on your phone. Mine just look awful.

There are ways around all of these points, but they still feel like "extending a kludge" to me. Whereas @TBog's proposed solution would solve all of them for once and in a clean way.

ildar commented 4 years ago

Jfyi, i often copy/paste tags containing non trivial characters i.e. emojis

ericksonx commented 4 years ago

I've seen that some launchers have the ability to set a individual custom icon for each app, so if that could be implemented.. could be use for the tags in favorite too? that way the user can choose from his own instaled icon packs without increasing excessively the size of KISS

yaomtc commented 3 years ago

I noticed that the icons for the tags do not comply with the shape set in User interface > Background shape for icons. It is always just a rounded square, no circle. This seems like a bug to me, because the tag is represented by an icon, which is what the setting should alter. Should I file a separate bug for this?

TBog commented 3 years ago

I have this working on my fork, the problem is with porting it back to KISS.