Description
An Android library that contains 'all' the flags of the countries of the world This is to be used for android projects where the developer is interested in getting the flag of a particular country for any reason.
World Country Data, flags, currency and more alternatives and similar packages
Based on the "Animations" category.
Alternatively, view World Country Data, flags, currency and more alternatives based on common mentions on social networks and blogs.
-
Lottie for Android, iOS, and React Native
Render After Effects animations natively on Android and iOS -
AndroidViewAnimations
Cute view animation collection. -
Material-Animations
Android Transition animations explanation with examples. -
AndroidImageSlider
An amazing and convenient Android image slider. -
ListViewAnimations
An Android library which allows developers to easily add animations to ListView items -
UltimateAndroidReference
🚀 Ultimate Android Reference - Your Road to Become a Better Android Developer -
NineOldAndroids
Android library for using the Honeycomb animation API on all versions of the platform back to 1.0! -
Rebound
A Java library that models spring dynamics and adds real world physics to your app. -
shimmer-android
An easy, flexible way to add a shimmering effect to any view in an Android app. -
transitions-everywhere
Backport of Transitions API from Android 4.4. Compatible with Android 2.2+ -
android-flip
A component for flip animation on Android, which is similar to the effect in Flipboard iPhone/Android -
CircleIndicator
a lightweight viewpager indicator like in nexus 5 launcher -
ChatKit for Android
Flexible components for chat UI implementation with flexible possibilities for styling, customizing and data management -
ExplosionField
explosive dust effect for views -
Music Player
From UI Proposal to Code -
RecyclerViewItemAnimators
This repo provides simple animators for the item views in the RecyclerView This code is cloned from DefaultItemAnimator provided by Google customizing the animations. -
PhotoEditor
A Photo Editor library with simple, easy support for image editing using paints,text,emoji and Sticker like stories. -
animate
An application demoing meaningful motion on Android -
ViewPagerTransforms
Library containing common animations needed for transforming ViewPager scrolling for Android v13+. -
Spotlight
Android Library that lights items for tutorials or walk-throughs etc... -
AnimationEasingFunctions
Android Animation Easing Functions. Let's make animation more real! -
Slidr
Easily add slide to dismiss functionality to an Activity -
android-ripple-background
A beautiful ripple animation for your app -
CircularReveal
Lollipop ViewAnimationUtils.createCircularReveal for everyone 2.3+ -
FabulousFilter
Android library to animate Floating Action Button to Bottom Sheet Dialog and vice-versa -
ShimmerLayout
Memory efficient shimmering effect for Android applications -
Rich Path Animator
animation, vector-drawable, vector, SVG -
BaseAnimation
BaseAnimation network Android animation set, custom controls, nearly 200 kinds of source code! BaseAnimation, if a new version is updated automatically to remind everyone, I hope everyone will contribute their animated XML files or other source, together to create this open source app! -
EasyAndroidAnimations
Easy Android Animations is an animation library that aims to make android animations easier, with 50+ builtin animations, it allows you to introduce many complex animation effects in your application with one or two lines of code. -
Backboard
A motion-driven animation framework for Android -
PreLollipopTransition
Simple tool which help you to implement activity transition for pre-Lollipop devices. -
Stfalcon ImageViewer
A simple and customizable Android full-screen image viewer with shared image transition support, "pinch to zoom" and "swipe to dismiss" gestures -
mkloader
Beautiful and smooth custom loading views -
ArcAnimator
ArcAnimator helps to create arc transition animation: 2.3.+ -
SpeedView
Dynamic Speedometer and Gauge for Android. amazing, powerful, and multi shape ⚡ -
TransitionPlayer
Android library to control Transition animates. A simple way to create a interactive animation. -
EasyFlipView
A quick and easy flip view through which you can create views with two sides like credit cards, poker cards etc. -
Interactive-animation
Collect android animation -
FragmentAnimations
3D animations for support-v4 Fragment transition. -
Road Runner
Road Runner is a library for android which allow you to make your own loading animation using a SVG image -
ColorPickerView
color picker, colorpickerview, android, argb -
EasingInterpolator
Twenty-eight different easing animation interpolators for Android. -
WhatTodo
A Simple Todo app design in flutter to keep track of your task on daily basis.You can add project,labels and due-date to your task also you can sort your task on the basis of project, label and dates -
TreeView
Android TreeView is used to display data in tree structures. -
AppIntroAnimation
AppIntroAnimation is a set of code snippets to make cool intro screen for your app with special Image Translation and Transformation animation effects. It is very easy to use and customize without adding third party library integrations. -
Youtube UI/UX Animation
With MVVM Architecture pattern using Android Architecture Components This is a sample app demonstrating Youtube player animation using constraint layout -
Dachshund Tab Layout
Extended Android tab layout with animated indicators that have continuous feedback. -
FPSAnimator
FPSAnimator is very easy animation library for Android TextureView and SurfaceView -
TextFieldBoxes
New Material Design text field that comes in a box, based on Google Material Design guidelines. -
fab-transformation
Support Floating Action Button transformation for Android
Get performance insights in less than 4 minutes
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of World Country Data, flags, currency and more or a related project?
Popular Comparisons
-
World Country Data, flags, currency and morevsAndroidViewAnimations
-
World Country Data, flags, currency and morevsMaterial-Animations
-
World Country Data, flags, currency and morevsLottie for Android, iOS, and React Native
-
android-page-curlvsLottie for Android, iOS, and React Native
-
AndroidViewAnimationsvsListViewAnimations
README
World Country Data, flags, currency and more - an open source android library for getting country flags and other country attributes
An Android library that contains 'all' the flags of the countries of the world This is to be used for android projects where the developer is interested in getting the flag of a particular country for any reason.
- A flag is obtained as a drawable resource (int).
- A flag can be set to an ImageView using XML
- There is possibility to get all the countries and their flags by invoking just two methods. --- ## System requirement
- Android minSDKversion = 15
- Android targetSDKversion = 29
Usage
Add JitPack in your respository build file
build.gradle
(Project appname)allprojects { repositories { //... maven { url 'https://jitpack.io' } } }
Add the dependency in your
build.gradle
(Module: app)dependencies { //... implementation 'com.github.blongho:worldCountryData:$version' }
Replace
$version
withvXXX
for the most stable version you want to use see releasesBuild your project (and make sure gradle has successfully synced)
Buid >> Clean Project, Build >> Rebuild Projeect
Load all the flags of the world by calling. Do this once in the application context.
World.init(getApplicationContext()); // Initializes the libray and loads all data
This inititializes the data. All countries are read, and their flags loaded
Get the flag of a country(dynamically)
You can get the flag of a country by using the two iso alpha2 or alpha3 or the country name or the numeric code.
// Demonstrating with Sweden
//The attribute is case-insensitive "se == SE == sE == Se"
// use alpha2
final int flag = World.getFlagOf("se"); // use "se" or "sE" or "SE" or "Se"
// use alpha3
final int flag = World.getFlagOf("swe");
// Use country name
final int flag = World.getFlagOf("sweden");
// use country name
final int flag = World.getFlagOf(752);
// Set the image of an imageView
final ImageView swedishFlag= (ImageView) findViewById(R.id.flagImageView);
swedishFlag.setImageResource(flag);
/*
The value of flag is either
- the flag of the country if it is loaded in the library
OR
- a demo flag of the globe (This provides a fall-back and help your app not crash due to nullPointerException)
*/
- You can hard-code the country flag if you know the alpha2 code of the country. Eg. to set the flag of Sweden, you could do
<ImageView android:id="@+id/flagImageId"
android:layout_width="@dimens/imageWidth"
android:layout_height="@dimens/imageHeight"
android:src="@drawable/se"/> <!-- Sets this image to the Swedish flag -->
- In java code, you could statically do same as
// Set the image of an imageView
final ImageView swedishFlag= (ImageView) findViewById(R.id.flagImageView);
swedishFlag.setImageResource(R.drawable.se);
- Get a Country with attributes like
"id":4,"name":"Afghanistan","alpha2":"af","alpha3":"afg", flag:imageResource"
final Country afghanistan = World.getCountryFrom("af|afg|afghanistan|4");
// Log.d(TAG, afghanistan.toString());
- Get a list of all the countries with their identifies
java final List<Country> countries = World.getAllCountries(); // This list cannot be modified but you can get its contents
Link to javadoc --> javadoc link
All the steps above are demonstrated in this project --> world country flag demo
![]() |
---|
Live retrieval of Country data |
Get this sample app in the playstore [Sample at playstore](img/playstore.png)
Data sources for the project
All country flags
Most of the flags came from flagpedia.net. This site does not contain all the countries in the world so some where downloaded from wikipedia after quering the country name
Countries and their iso alpha values
All country names were download from Geonames using a Python project written by Bernard Longho aka @blongho. Check it out Countries data by blongho
Getting different dimensions of the flags
Some guys from Egypt made some awesome App icon generator which generates android drawables as well as iOS images(if you want) in different dimensions. It is super fast and can do batch processing of images.
Contribution guidelines
Please feel free to add more flags or modify any thing that would make this libray more useful. Follow First contributions instructions and i will be super happy to merge your pull request.
Contact
Feel free to contact me to discuss anything related to development in particular and life in general.