Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 924 Bytes

README.md

File metadata and controls

42 lines (29 loc) · 924 Bytes

FlagKit

Beautiful country flag icons for usage in Android apps. All flags are provided as VectorDrawable. FlagKit copy from this iOS library.

Installation

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

dependencies {
    implementation 'com.github.murgupluoglu:flagkit-android:lastVersion'
}

Usage

val resourceId = FlagKit.getResId(context, "tr")

ImageView.setImageResource(resourceId)

val drawable = FlagKit.getDrawable(this, "tr")

ImageView.setImageDrawable(drawable)

val all = FlagKit.getAllAvailableCodes()

Reference

FlagKit provides over 249 flags. A list of all flags can be found here.