recent-images


Source link: https://github.com/amirarcane/recent-images

Recent Images

Do you noticed the new feature of Telegram or Instagram?! They show your latest images when you try to attach or post a picture. So I developed this library the same with lots of customization.

Simple way to get all images of device based on date taken, name, id and other customization.

Watching this repository will allow GitHub to email you whenever I publish a release.


Gradle Dependency

Add this line to your build.gradle project

compile 'com.amirarcane.recent-images:recentimages:2.0.1'

Usage

Just add these lines to your class, that's it.

RecentImages recentImages = new RecentImages();
 ImageAdapter adapter = recentImages.getAdapter(MainActivity.this);

recentImages.getAdapter() method returns an adapter that you can easily set it as your gridView adapter. By default it returns device pictures based on Date_Taken and Descending order, for changing them see Customization

Use recentImages.cleanupCache() to clean the cache. It removes all the callbacks from the drawables stored in the memory cache. This method must be called from the onDestroy() method of any activity using the cached drawables. Failure to do so will result in the entire activity being leaked.

You can use regular gridView but if you want to use it exactly like above picture you need horizontal gridView. I used jess-anders/two-way-gridView in this library. All you have to do is set below code in your xml instead of regular gridView:

<com.jess.ui.TwoWayGridView
  android:id="@+id/gridView"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:background="#E8E8E8"
  app:columnWidth="70dp"
  app:rowHeight="70dp"
  app:numColumns="auto_fit"
  app:numRows="auto_fit"
  app:verticalSpacing="16dp"
  app:horizontalSpacing="16dp"
  app:gravity="center"/> 

Customization

RecentImages class contains some methods for customization:

getAdapter(Context context) default method to get adapter

getAdapter(Context context, String columns, String sort) parameter columns filters device images base on date, name, id and etc. parameter sort will sort them based on Desecnding or Ascending order

setDrawable(int drawable) to use an image from you drawable folder before loading of images

setHeight(int height) to set images height (in dp)

setWidth(int width) to set images width (in dp)

setPadding(int padding) to set images padding (in dp)

setSize(int size) to set quality of thumbnail images (values are 1, 2, 3, 4. 1 means best quality and high resolution and 4 means least quality an low resolution)

Here is an example:

RecentImages recentImages = new RecentImages();
 ri.setHeight(70);
 ri.setWidth(70);
 ImageAdapter adapter = recentImages.getAdapter(MainActivity.this, ri.LATITUDE, ri.ASCENDING);
 gridView.setAdapter(adapter);

Resources

A flexible view for providing a limited rect window into a large data set, just like a two-dimensional RecyclerView. It different from RecyclerView is that it's two-dimensional (just like a Panel) and it pin the itemView of first row and first column in their original location.

This is a Decompiler that extracts the source code of an Android application (including XML files and image assets). Works directly from your android device.

Implementation of List to Grid: Icon Transition.

Icon Transition x3 slower:

Special PhoneEditText library that allows you to have internationals phone codes in a simple EditText, all international phone codes came from https://countrycode.org

Music Player APP looks and feels like a classic device.

Powerfull Shodan client written using RxJava and Retrofit. You can integrate this client into existing apps or create new one. With this Shodan client you can:

  • Search Shodan
  • Exploit search
  • Streaming API to consume Shodan data in real time (in development)

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