I often find that I write very similar project code. And most often I copy material from old projects.
Things like:
- Create images with round corners
- read density into a static variable and reuse. 4 lines ..
- disable / hide multiple views / deleted views at once. Example:
}
public static void disableViews(RemoteViews views, int... ids) { for (int id : ids) { views.setInt(id, SET_VISIBILITY, View.GONE); } } public static void showViews(RemoteViews views, int... ids) { for (int id : ids) { views.setInt(id, SET_VISIBILITY, View.VISIBLE); } }
I would like to compose these functions in a 1-letter / 2-letter class name, i.e. V.showViews(RemoteViews views, int... ids) would be easy to write and remember, I hope.
I am looking for Github recommendations and links, and if nothing is found, I might start a small github build project.
source share