Icon Pack Support for Sleek Launcher


So I got the icon pack support implemented, albeit a basic implementation. Trying to implement this was hard a first because the solution posted on stackoverflow was pretty convoluted and the posted code wasn't that clean. I had to go through his whole code to try and figure out what the hell he was actually doing then try to simplify the idea to make a more concise code.

In the end I was able to create a "summary version" of that code which is, to me, pretty understandable. But the one thing I am not happy about my code is that some of the methods are in the main activity which I would have preferred to be grouped together with the other icon pack related methods. The problem was I had not thought about the architecture ahead of time, I just went along as I did the code.


The custom single icon picker was also pretty fun to implement, I thought it was going to be hard, but once I created a method to get all the drawables inside the icon pack it was all pretty straight forward. I just added an ImageView in the AlertDialog then scale and set the icon of the selected app into that ImageView.

After that, I just needed another RecyclerView grid adapter to display all the icons from an icon pack and once the user tapped on his selected icon, it would set that icon in the main app grid, the AlertDialog and save that customization to the database.

Also renamed it to Sleek Launcher.

Source Code

Comments

Popular Posts