IconHandler


Source link: https://github.com/jrvansuita/IconHandler

Icon Handler

This is an Android project. This library handle the drawable customization and position on View, EditText, ImageView, TextView, Button and etc. You can do a lot with a few lines of code, like change the icon color, alpha or even the size. This library has a lot more customization and features than is able to show here. Please check the sample app and feel free to help with a pull request.


Setup

Step #1. Add the JitPack repository to your build file:

allprojects {

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

  
}
 
}

Step #2. Add the dependency ( See latest release).

dependencies {

  compile 'com.github.jrvansuita:IconHandler:+' 
}

Implamentation

//Setting up a icon on background of a View. Icon.put(yourView, R.mipmap.your_icon);
  //Setting up a icon on the ImageView. Icon.put(yourImageView, R.mipmap.your_icon);
  //Setting up a icon on the left of the TextView. Also can use right(), top() and bottom() methods. Icon.left(yourTextView, R.mipmap.your_icon);
  //Setting up a icon on MenuItem Icon.on(yourMenuItem).icon(R.mipmap.your_icon).put();
  //Setting up a icon to the ImageView and converting it to blue. Icon.top(yourTextView).gray(R.mipmap.your_icon).put();
  //Setting up a icon to the ImageView and converting it to your custom color. Icon.on(yourImageView).color(R.color.your_color).icon(R.mipmap.your_icon).put();
  //Setting up a bitmap as a icon. Icon.right(yourTextView).bitmap(yourBitmap).put();
  //Setting up a icon on dynamic position Icon.on(yourTextView).icon(R.mipmap.your_icon).position(Gravity.LEFT).put();
  //You can merge the usage with colors transformations. Icon.on(yourImageView).black(R.mipmap.your_icon).put();
  //Setting up a icon to the ImageView and applying alpha. (0-255) Icon.on(yourImageView).white(R.mipmap.your_icon).alpha(130).put();
  //Will make the icon appears weak. Receiving focus will reveals the real color of icon. Icon.focusable(yourEditText, R.mipmap.your_icon, Gravity.RIGHT);
  //Just another edit text to lose the focus of the first. Icon.focusable(yourEditText).position(Gravity.RIGHT).icon(R.mipmap.your_icon).put();
  yourImageButton.setOnClickListener(new View.OnClickListener() {

  @Override
  public void onClick(View view) {

 //Clearing all icons of the View.

 Icon.clear(yourImageButton);

 
}

  
}
);

Resources

Use this library to safely create valid, correctly encoded URL strings with a fluent API.

A fast way to store POJO in sqlite on an Android device without troubling yourself with database creation.

A resizer tool to resize automatically png files and 9 patches in several densities.

An android library that allows selection of multiple images from gallery. It shows an initial album chooser and then images in selected album.

Gradle plugin for Github releases. You can fully automate releases via gradle-github-plugin.

Modification of ZXING Barcode Scanner project for easy Android QR-Code detection in portrait mode and AR purposes.

This project implements an Android view which show camera and notify when there's a QR code inside the preview.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes