Load Toast Library


Source link: https://github.com/code-mc/loadtoast

Load Toast Library

The default toasts are ugly and don't really provide much more than a short message. This small library provides a better toast which will give the user feedback by morphing into a checkmark or cross (success and fail). The lifetime of the toast is completely controlled by you.

Demo

Usage

Step 1

Gradle

dependencies {

  compile 'net.steamcrafted:load-toast:1.0.12' 
}

Step 2

The API is very simple, create a new toast by providing a context:

LoadToast lt = new LoadToast(context);

Change the displayed text:

lt.setText("Sending Reply...");

If you don't have a message to display, the toast will shrink to only show the circular loader.

Then proceed to show the toast:

lt.show();

When your background thingy is done provide feedback to the user and hide the toast:

// Call this if it was successful lt.success();
  // Or this method if it failed lt.error();
  // Or if no feedback is desired you can simply hide the toast lt.hide();

To properly position the toast use the following method to adjust the Y offset:

lt.setTranslationY(100);
 // y offset in pixels

You can also change the colors of the different toast elements:

lt.setTextColor(Color.RED).setBackgroundColor(Color.GREEN).setProgressColor(Color.BLUE);

In some situations a border might be desired for increased visibility, by default it is transparent:

// Change the border color lt.setBorderColor(int color);
  // Change the border width lt.setBorderWidthPx(int widthPx);
 lt.setBorderWidthDp(int widthDp);
 lt.setBorderWidthRes(int resourceId);

When displaying a message in a RTL language you can force the text to marquee from left to right instead of the default right to left:

// pass in false for RTL text, true for LTR text lt.setTextDirection(boolean isLeftToRight);

These can be chained as you can see.

License

Released under the Apache 2.0 License

Resources

Conversations is an open source XMPP (formally known as Jabber) client for Android 4.0+ smart phones.

Features:

  • End-to-end encryption with either OTR or openPGP
  • Sending and receiving images
  • Indication when your contact has read your message
  • Intuitive UI that follows Android Design guidelines
  • Pictures / Avatars for your Contacts
  • Syncs with desktop client
  • Conferences (with support for bookmarks)
  • Address book integration
  • Multiple Accounts / unified inbox
  • Very low impact on battery life

Fragment-Switcher is an adapter-based, state-saving fragment container similar to a ViewPager.

It was designed with the NavigationDrawer and Tab patterns in mind but can be used anywhere that you switch between fragments and would like to retain instance state.

flixel-gdx is an open source 2D game engine written in Java. Flixel-gdx is a port of AS3 flixel. It is built on top of the powerful libgdx framework which allows developers to build and distribute cross-platform games.

Fast JSON parser for Java projects. The following scalar types are supported:

  • String
  • boolean/Boolean
  • int/Integer
  • long/Long
  • float/Float
  • double/Double

If a json field is another dictionary, it can be represented by another model class. That model class must also have the @JsonType annotation.

Lists of objects are supported either as Java Lists or Queues.

Mimicry is a tiny Android library (actually just one class) to format items in a ListAdapter to display as a grid.

Why not just use a GridView? Because a MimicryAdapter can be used with other ListAdapters!

Encryption is a simple way to create encrypted strings to Android project.

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