- Notifications
You must be signed in to change notification settings - Fork1
This library offers you the vector drawable version of TablerIcons with some additional features that you can easily use in your Android projects.
License
AlirezaIvaz/TablerIcons
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
TablerIcons (Github) is a setof over 4600 free MIT-licensed high-quality SVGicons for you to use in your projects.
This library offers you the vector drawable version of these icons with some additional featuresthat you can easily use in your Android projects.
If you're using the old project structure, addJitPack in your rootbuild.gradle
orbuild.gradle.kts
file like this:
build.gradle
allprojects { repositories {... maven { url'https://jitpack.io' } }}
build.gradle.kts
allprojects { repositories {... maven("https://jitpack.io") }}
Otherwise if you're using new project structure, addJitPack in yoursettings.gradle
orsettings.gradle.kts
like this:
settings.gradle
dependencyResolutionManagement {... repositories {... maven { url'https://jitpack.io' } }}
settings.gradle.kts
dependencyResolutionManagement {... repositories {... maven("https://jitpack.io") }}
First add dependency in your project version catalog like this:
libs.versions.toml
[version]tablericons ="1.13.0"# You can find the latest version from releases page[libraries]tablericons = {group ="ir.alirezaivaz",name ="tablericons",version.ref ="tablericons" }
Then add the library dependency in your application modulebuild.gradle
orbuild.gradle.kts
file like this:
build.gradle
dependencies {... implementation libs.tablericons}
build.gradle.kts
dependencies {... implementation(libs.tablericons)}
Just add the library dependency in your application modulebuild.gradle
orbuild.gradle.kts
file like this:
build.gradle
dependencies {...def tablerIconsVersion="1.13.0"// You can find the latest version from releases page implementation"ir.alirezaivaz:tablericons:$tablerIconsVersion"}
build.gradle.kts
dependencies {...val tablerIconsVersion="1.13.0"// You can find the latest version from releases page implementation("ir.alirezaivaz:tablericons:$tablerIconsVersion")}
You can see the list of icons categorized onthis page.
Note: The names of all icons in this library start with
ic_
and instead of-
(dash) youshould use_
(underline).
E.g: If you want to use an icon namedarrow-back
, you should change its name toic_arrow_back
.
Just call the desired icon from the drawables like this:
<ImageViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:src="@drawable/ic_arrow_back" />
You've three ways to get and use the icons you want:
Java
importir.alirezaivaz.tablericons.TablerIcons;publicclassActivityMainextendsAppCompatActivity {@OverridevoidonCreate(Bundlebundle) {super.onCreate(bundle);// Get icon directly from library `R` classintarrowBackIcon =ir.alirezaivaz.tablericons.R.ic_arrow_back;imageView.setImageResource(arrowBackIcon);// Use `TablerIcons` objectimageView.setImageResource(TablerIcons.ArrowBackUp); }}
Kotlin
importir.alirezaivaz.tablericons.TablerIconsclassActivityMain :AppCompatActivity() {overridefunonCreate(bundle:Bundle?) {super.onCreate(bundle)// Get icon directly from library `R` classval arrowBackIcon= ir.alirezaivaz.tablericons.R.ic_arrow_back imageView.setImageResource(arrowBackIcon)// Use `TablerIcons` object imageView.setImageResource(TablerIcons.ArrowBackUp) }}
If you want to change the color of all icons at once, overridetabler_icon
to yourcolors.xml
:
<?xml version="1.0" encoding="utf-8"?><resources> ... <colorname="tabler_icon">#2196F3</color></resources>
Otherwise, if you want to change the color of one icon, you can useapp:tint
attribute inyourImageView
like this:
<ImageViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:src="@drawable/ic_arrow_back"app:tint="#2196F3" />
Copyright 2017-2023 Alireza IvazLicensed 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.0Unless required by applicable law or agreed to in writing, softwaredistributed 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 andlimitations under the License.
TablerIcons
MIT LicenseCopyright (c) 2020-2023 Paweł KunaPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.
About
This library offers you the vector drawable version of TablerIcons with some additional features that you can easily use in your Android projects.