About-icons - Android library to easily give credit if using icons which require attribution

Overview

Android About Icons Library

API Jitpack last commit license


About this project

This Android library simplifies the exhausting process of giving credits to licensed icons which require attribution (like icons from flaticon.com or fontawesome.com in the free plan).

YOU CAN DOWNLOAD THE SAMPLE APP HERE!
If you want to build the app on your own, build the debug build variant.

This was my very first library and I'm still a student so the progress might not be as fast as on other projects.

Features

  • automatically recognizing the icons to show based on file name (further information here)
  • automatically retrieving the information and credits by reading related string arrays (further information here)
  • automatically highlight icons who have been modified by reading related string entry (further information here)

How to use

1. Implementation

Add this to your root build.gradle file:

allprojects {
  repositories {
    maven { url "https://jitpack.io" }
  }
}

Then add this to your module's build.gradle file:

dependencies {
  implementation 'com.github.cyb3rko:about-icons:lastest-version'
}

2. Mark icons

Afterwards you have to add an underscore to every icon filename you want the library to attribute.
If you don't add an underscore, the icon is ignored.

Example:

3. Add information

Now you have to add the information the library needs for attributing.
Do this by adding a string array for each icon with the icon name as string array name (without the underscore; it doesn't matter in which .xml file):

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string-array name="icon_alink">
        <item>Dave Gandy</item>
        <item>flaticon.com</item>
        <item>https://www.flaticon.com/free-icon/external-link-symbol_25284</item>
        <item>false</item>
        <item>cc_by_3.0</item>
    </string-array>

    <string-array name="icon_art">
        <item>xnimrodx</item>
        <item>flaticon.com</item>
        <item>https://www.flaticon.com/free-icon/computer_2905155</item>
    </string-array>
    ...
</resources>

4. Create view

At last just create a new AboutIcons object, pass the context and the drawable class, and get the view by calling get().
Optionally you can configure your AboutIcons page using following config methods:

.setTitle(customTitle: String)
.setTitleSize(customSize: Float)
.setModificationTitle(customTitle: String)
.setModificationTitleSize(customSize: Float)
.hideModificationAnnotation()

HINT: If you want to hide the title, simply call "setTitle("")", then the title layout will be hidden

Simple example for a fragment: Kotlin

override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
    super.onCreateView(inflater, container, savedInstanceState)

    return AboutIcons(requireContext(), R.drawable::class.java).get()
}

Java Activity

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(new AboutIcons(this, R.drawable.class).get());
}

Advanced example (using configuration) for a fragment:
Kotlin:

override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
    super.onCreateView(inflater, container, savedInstanceState)
    
    val aboutIcons = AboutIcons(requireContext(), R.drawable::class.java)
            .setTitle("Your Title")
            .hideModificationAnnotation();

     return aboutIcons.get()
}

Java Activity:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    
    AboutIcons aboutIcons = new AboutIcons(this, R.drawable.class)
            .setTitle("Your Title")
            .setModificationTitleSize(6f)
            .hideModificationAnnotation();

    setContentView(aboutIcons.get());
}

Proguard Minify Compatibility

If you have minify enabled and you let it shrink the resources this library is most likely to not be able to find your icons you want to give credit to.

Then simply add the following to your proguard rules:

-keep class .R
-keep class **.R$* {
    <fields>;
}

Planned improvements

  • improving scroll performance
  • adding simple licensing information for several icon library websites

Screenshots

Contribute

Of course I'm happy about any kind of contribution.

Feel free to open issues for new features or bug reports. If you want to directly contribute code just open pull requests.

Apps using this library

If you want to add an app here, just open a new issue / PR.

LogViewer for openHAB by Cyb3rko

Used Libraries

Click here to see the list
Toasty by GrenderG licensed under GNU Lesser General Public License v3.0
Material Dialogs by Aidan Follestad licensed under Apache License 2.0
Android Licenses Library by Cyb3rKo licensed under Apache License 2.0

Used Icons

Click here to see the list
Multiple Icons made by Freepik from www.flaticon.com
Multiple Icons made by Dave Gandy from www.flaticon.com

License

Copyright © 2021, Cyb3rKo

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You might also like...
Android app which shows the information on animes and their characters
Android app which shows the information on animes and their characters

Anime-app Android app which shows the information on animes and their characters Requirements To try out this app, you need to use Android Studio Arct

Simple Jetpack Compose demo app which is developed with CoinGecko API and modern android technologies.
Simple Jetpack Compose demo app which is developed with CoinGecko API and modern android technologies.

CoinBox CoinBox is a multi module small currency tracker app which is developed with Jetpack Compose. This demo app used coingecko.com API to fetch da

Jetpack Compose app which generates random names
Jetpack Compose app which generates random names

Compose-Your-Name? A Jetpack Compose App Meme App for knowing you nick name Inspiration You recently might have seen this meme on Instagram, I also di

A Collection of major Jetpack compose UI components which are commonly used.🎉🔝👌
A Collection of major Jetpack compose UI components which are commonly used.🎉🔝👌

SSComposeCookBook A Collection of major Jetpack compose UI components which are commonly used. Introduction Jetpack Compose is a modern toolkit for bu

Add IndustrialTNT like from old IC2 mod which keeps items after explosion and helps to mine resources
Add IndustrialTNT like from old IC2 mod which keeps items after explosion and helps to mine resources

IndustrialTNT Add IndustrialTNT like from old IC2 mod which keeps items after ex

Instagraph is an Instagram Clone which I am practicing on a new concepts and other advanced Jetpack compose specific concepts.

Instagraph Instagraph is an Instagram Clone which I am practicing on a new concepts and other advanced Jetpack compose specific concepts. The clone on

A lightweight library for using Material Colors in Android Jetpack Compose Project 🚀🚀🚀
A lightweight library for using Material Colors in Android Jetpack Compose Project 🚀🚀🚀

How To Use Step 1: Add the JitPack repository to your build file. Add it in your root build.gradle / build.gradle.kts at the end of repositories: Groo

An android library to highlight different features of the app built using Jetpack Compose.
An android library to highlight different features of the app built using Jetpack Compose.

An android library to highlight different features of the app built using Jetpack Compose.

Camera is a library for Android built using the Camera2 API.

Camera Camera is a library for Android built using the Camera2 API. The Camera2 API allows users to capture RAW images, i.e. unprocessed pixel data di

Releases(2.0.0)
  • 2.0.0(Oct 3, 2022)

    Addition:

    • German library translation (4ed38cbe2e4367d997fcf07f8208f68aa8c2d858)

    Enhancements:

    • Removed last third-party dependency (754621fea950999e7651e4d7a588272fdaa65bd2)
    • Improved async calculations (60db3ffc4028022d34d1b6ee61270361ad616ab1)
    • Updated design elements (c9ba1b5b9b2c55d78cbd730ef0791ee31d356b9d, 3b7de8558eafc8c986aac981cb5d8cc058ca1a48)
    • Updated build scripts + following problems (ee71d74a97ad7b0059fcec5a64a28e4cdf43efb9)

    Changes:

    • Updated demo app (2d8fa1ec6fc910f33c6d573637af6b26420684c2, 77d2177373b29c4dda23e62c062ebe8a7eb88ca6, 90b914ce48b981ee3f0450dffacc31e2bf5d19f3, 7b98ac30658998f19f908e2af114a88896e99221, 029a335aa6d63af697b07e457d9de9bf4edb9b62, fb355104af258ac4f78443d184fe84e6e13276be)
    Source code(tar.gz)
    Source code(zip)
  • 1.5.0(Apr 7, 2022)

    Enhancements:

    • replaced IconInfoActivity with simple AlertDialog (567447efae25a8381480794d96d01160a19d0075, 56496ea48c14b5617433bb369f16b7bef23ce3c0, 0bdd2bcac3f877a6c170d7f3be7c000c8ced898e)
    • removed unused dependency (daac4e430644b9fa9c03318d470dce5187fdf93b)
    • updated icons and icon credits (ff70c960148d989afbc97bbdb7e0a08f06f32585, 4fd7ce15dad90b3b69ce87afb0fa32070610febd, 56bce0d16646bb2b92e02669d79b7973329d3fbe)
    • updated dependencies (139a9db2a00321c3d639678793339509099d7ec7)
    • refactoring (c34f9f251763fcb1cd9202c95384f2ce9a66bbb1)
    Source code(tar.gz)
    Source code(zip)
  • 1.4.0(May 24, 2021)

    Added:

    • Support of CC BY-NC-SA 3.0 (dc371dd2228dc175c6525d7b09cec1bd7ff2621b)
    • loading animation (86ab55c65eaf1febaedacd42e4438f5c53c24f4a)

    Enhancements:

    • enhanced button and list item textview layouts (7138b85d820ffb1ed55c36c860b17c6cd90d2602)
    • added modified color for dark mode (b9556e57ef763f1e1aad1479fbca183660025bf2)

    Fixed:

    • fix missing icons bug for larger amount of icons (d5d75f1da9791075b86aa9f424e6f2312d3bfabe)
    Source code(tar.gz)
    Source code(zip)
  • 1.3.0(May 8, 2021)

    Added:

    • Support of CC BY-NC 3.0 (efe3f4d146cd31af1385d90281a21dc67cc42bbb)
    • App Theme based Dark Mode (75851148de6adf1e78364a7f465dd2f86f16a286)

    Enhancements:

    • load movement to async thread (af5bf2c4691cd4730e44fd81f9f1139563f37c9a)

    Fixed:

    • remove access of async thread to background colour (ddd9cf5daacf8ba7de96753d210ec68033b8df5b)
    Source code(tar.gz)
    Source code(zip)
  • 1.2.1(Oct 31, 2020)

  • 1.2.0(Oct 20, 2020)

    Added:

    • header cardview (c6cf3cdc018c9db533fe23d39502b87ef2a3f5bb)

    Changes:

    • improved cardview design (9d5a35eb463143e3c1fe2d865f7988bf8c541993)
    • finished rewrite to kotlin (3/3 classes) (885bf53a2ffa88e6f4e7ea74c5a0e2248d8b2bf9)
    • improved library methods (75f055cd99a8ee0e6b1bb0c23d90b5a51b4b4642)
    • improved license item click (a853f584bdbf52d54cb7f25b39d4f5541843d665, 5d988136aaf9b3684103bb041ccac45e23b09864)
    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Sep 17, 2020)

    Added:

    • new configuration methods (c3b5b89570e5198a4e157e1fc97bc224bf65306e, d930433bbb7e3174b413ef4d17e5c81f80f153b8)

    Fixed:

    • non working 'hideModificationAnnotation' method (d0ee13f204c9ff42adddb0724edb28f1b632ad22)
    • moved average icon colour calculation for background to coroutines (b34252ea47e4811da0dbf492bd5d4ad24ff79f7a)
    Source code(tar.gz)
    Source code(zip)
  • 1.0.1(Aug 30, 2020)

  • 1.0.0(Aug 16, 2020)

    First release after beta.

    Added

    • new info activity on onClick to show all information about every icon and to open icon link / website (467d310509dfd99581958984fa92ee2e33451647, a24f4cdf29f2f6fb92ab37c6a116337a101142e4, 422645542838baf1d0d153f3934cb79189d93128)
    • option to add license to icons and to show them in a BottomSheet (a24f4cdf29f2f6fb92ab37c6a116337a101142e4)

    Fixed

    • "hideTitle" method is now deprecated, rather use "setTitle("")" (57e2374cfb5f5daad50f791e8aa89fdbea27306f)
    • improved icon item layout (e29f0ec34c90f0808204717f9dd2af2217093899)
    • partly rewritten library to Kotlin (2/3 classes) (90a739d63f6484108271287eab29dd596206a391)
    • hid library classes that are not intended to be public (07476a27627710fa3189052c69e54892dd78646e)
    • smaller fixes (1ccd1fdcdc39c282c0d6578038c307dbf3c6e822, c9d43d1e12bee4d843321dbced895579c9cbbaf3, 28b0f37ab1cedff4b0de8dbdf60da1a84a888471)
    Source code(tar.gz)
    Source code(zip)
  • 0.1.1(Jul 24, 2020)

    Added

    • layout title (incl. methods to change and hide it) (2afbf4149269b932a89c2fd93eba5016fc8797c3)
    • modification annotation (incl. method to hide them) (a2cf4ab438f55c20e391571432304278e78a1bc0)
    • support for non quadratic icons (289ed389bf0b1259c4047a7d9810a725b76ffe7d)
    • pom information (cc8f5a1c6f3cb25ef4e34808703c235f5e380928, 706080e952fb1fd07a33328602b54a7f9793ccb7)

    Fixed

    • code, resource and import optimization (404da13aa9e62427b64b3f1504e6f087a8a93899)
    • smaller improvements (22969a36ab3864c05f9ecac059791b180a5c6b06, cb32abe68373e55dd1b8b09eeba1627e8f8d159d)
    Source code(tar.gz)
    Source code(zip)
  • 0.1.0(Aug 23, 2020)

    Features

    • automatically recognizing the icons to show based on file name
    • automatically retrieving the information and credits by reading related string arrays
    Source code(tar.gz)
    Source code(zip)
Owner
Niko Diamadis
Student & Freetime Android developer
Niko Diamadis
Svg-to-compose-intellij - A simple Android Studio plugin to generate Jetpack Compose ImageVector icons

svg-to-compose-intellij A simple Android Studio plugin to generate Jetpack Compo

Pavel Shurmilov 21 Dec 15, 2022
Easily adding gaps inside such as Columns and Rows for Jetpack Compose.

Compose Gap Easily adding gaps inside such as Columns and Rows for Jetpack Compose. Inspired by Flutter's Gap. Introduction When it comes to add empty

Daichi Furiya 28 Oct 1, 2022
🍂 Jetpack Compose image loading library which can fetch and display network images using Glide, Coil, and Fresco.

Landscapist ?? Jetpack Compose image loading library which can fetch and display network images using Glide, Coil, Fresco Usecase You can see the use

Jaewoong Eum 1.4k Jan 1, 2023
Compose-html - An Android library which provides HTML support for Jetpack Compose texts

HtmlCompose An Android library which provides HTML support for Jetpack Compose t

iRewardHealth 43 Dec 29, 2022
SSJetpackComposeSwipeableView is a small library which provides support for the swipeable views

SSJetpackComposeSwipeableView is a small library which provides support for the swipeable views. You can use this in your lazyColumns or can add a simple view which contains swipe to edit/delete functionality.

Simform Solutions 60 Nov 18, 2022
Jetpack Compose Boids | Flocking Insect 🐜. bird or Fish simulation using Jetpack Compose Desktop 🚀, using Canvas API 🎨

?? ?? ?? Compose flocking Ants(boids) ?? ?? ?? Jetpack compose Boids | Flocking Insect. bird or Fish simulation using Jetpack Compose Desktop ?? , usi

Chetan Gupta 38 Sep 25, 2022
Fractal Trees 🌴 using recursion | Demonstrated using Jetpack Compose 🚀

Fractal Trees ?? Description Implementing Fractal Trees ?? with recursion ➰ and using Jetpack Compose to demonstrate it ?? ?? Motivation and Context H

Vivek Sharma 28 Oct 5, 2022
Jetpack-compose-uis - A collection of some UIs using Jetpack Compose. built using Katalog

Jetpack Compose UIs This is a collection of some UIs using Jetpack Compose. It i

Mori Atsushi 3 Dec 15, 2022
A simple authentication application using Jetpack compose to illustrate signin and sign up using Mvvm, Kotlin and jetpack compose

Authentication A simple authentication application using Jetpack compose to illustrate signin and sign up using Mvvm, Kotlin and jetpack compose Scree

Felix Kariuki 5 Dec 29, 2022