Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

This library offers you the vector drawable version of TablerIcons with some additional features that you can easily use in your Android projects.

License

NotificationsYou must be signed in to change notification settings

AlirezaIvaz/TablerIcons

Repository files navigation

JitPackApache2API 21Kotlin 1.9.24Tabler Icons 3.6.0Issues

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.

Demo

Get it on GitHubGet it on BazaarGet it on Myket

Adding to your project

1. Adding the library repository

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")    }}

2. Adding the library dependency

Gradle Version Catalog

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)}

Legacy

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")}

Usage

You can see the list of icons categorized onthis page.

Note: The names of all icons in this library start withic_ 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.

XML views

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" />

Java/Kotlin codes

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)    }}

Change the color of icons

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" />

Licenses

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.

Topics

Resources

License

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp