Core-Adapter


Source link: https://github.com/sajadshokri/Core-Adapter

Core-Adapter

Support Any Type of items in recyclerview with no pain

add to project:

compile 'ir.coderz.coreadapter:Core-Adapter:0.1.9@aar'

Usage:

0. ViewHolders are normal:

public class TextHolder extends RecyclerView.ViewHolder {

private TextView textView;

public TextHolder(View itemView) {

super(itemView);

textView = (TextView) itemView.findViewById(R.id.text);

  
}

public TextView getTextView() {

return textView;
  
}
 
}

1. Items must implement CoreItem<YOUR_VIEW_HOLDER,YOUR_DATA_MODEL>

public class TextItem implements CoreItem<TextHolder, String> {

@Override
  public void bind(TextHolder textHolder) {

// This is the onbind method used to be inside adapter

textHolder.getTextView().setText(textHolder.getAdapterPosition() + "");

  
}

@Override
  public int getLayout() {

// You must return the related layout

return R.layout.text_item;
  
}

@Override
  public String getData() {

// you might need the data! so return it here :)

return textHolder.getAdapterPosition() + "";
  
}
 
}

2. Use CoreAdapter for Recyclerviews adapter

CoreAdapter coreAdapter = new CoreAdapter();
 recycler.setAdapter(coreAdapter);

3. what layout for what viewholder?

coreAdapter.putViewType(R.layout.YOUR_LAYOUT, YOUR_HOLDER.class);

4. Fill the adapter by core items:

coreAdapter.addItem(new TextItem());

Resources

A progress view. It is similar to the Fitbit application's progress bar.

Create a simple button to play a media source.

An Android permission library extending Google's EasyPermissions with convenient additions.

Why EffortlessPermissions?

  • Used as a drop-in replacement for Google's EasyPermissions and based on its battle-tested implementation.
  • Added an @AfterPermissionDenied annotation for methods to run automatically after denial.
  • Included consumer ProGuard rules which fixes your release build.
  • Added more method overloads which make coding easier.
  • Added another DialogFragment to open app detail settings which you have more control upon, e.g. dialog title can be hidden now.

In a word, just start with EffortlessPermissions instead of EasyPermissions.

An infinite card switching UI for Android, support custom animation.

This is a library for odometer in an android. Odometer mainly used for measuring distance.

A library to help android developer working easly with activities and fragments

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