FamiliarRecyclerView


Source link: https://github.com/iwgang/FamiliarRecyclerView

FamiliarRecyclerView

????????ListView?GridView?????RecyclerView???????????ListView / GridView??????RecyclerView????????????ListView / GridView / ??? ???RecyclerView????????.

???

gradle

compile 'com.github.iwgang:familiarrecyclerview:1.3.3' 

?????????

// ??/?? ??View (????) mRecyclerView.addHeaderView() ? .removeHeaderView()  // ??/?? ??View (????) mRecyclerView.addFooterView() ? .removeFooterView()  // ??????????????????????Divider???????????????????????? mRecyclerView.setDivider() ???????????????????????????Divider??????  // ?????View???isRetainShowHeadOrFoot?true???????EmptyView?????????HeadView?FooterView? mRecyclerView.setEmptyView()  // Item???? mRecyclerView.setOnItemClickListener(new FamiliarRecyclerView.OnItemClickListener() {

  @Override
  public void onItemClick(FamiliarRecyclerView familiarRecyclerView, View view, int position) {

// ...
  
}
 
}
);
  // Item???? mRecyclerView.setOnItemLongClickListener(new FamiliarRecyclerView.OnItemLongClickListener() {

  @Override
  public boolean onItemLongClick(FamiliarRecyclerView familiarRecyclerView, View view, int position) {

return true;
  
}
 
}
);
  // ???????????????? mRecyclerView.setOnScrollListener(new FamiliarRecyclerViewOnScrollListener(mRecyclerView.getLayoutManager()) {

  @Override
  public void onScrolledToTop() {

// top
  
}

@Override
  public void onScrolledToBottom() {

// bottom
  
}
 
}
);
 

????? ??Adapter ???????DataBinding????Adapter

mAdapter = new FamiliarEasyAdapter<UserInfo>(this, R.layout.item_view, data) {

  @Override
  public void onBindViewHolder(ViewHolder holder, int position) {

TextView tvName = holder.findView(R.id.tv_name);

tvName.setText(mAdapter.getData(position).getName());

  
}
 
}
;  ?... ???RecyclerView?????????????? 

??

// LinearLayout ?ListView? <cn.iwgang.familiarrecyclerview.FamiliarRecyclerView
  android:id="@+id/mRecyclerView"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:scrollbars="vertical"
  app:frv_divider="#696969"
  app:frv_dividerHeight="1dp"
  app:frv_emptyView="@id/tv_empty"
  app:frv_layoutManager="linear"
  app:frv_layoutManagerOrientation="vertical" />

// GridLayout ?GridView? <cn.iwgang.familiarrecyclerview.FamiliarRecyclerView
  android:id="@+id/mRecyclerView"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:scrollbars="vertical"
  app:frv_dividerHorizontal="#FFEE00"
  app:frv_dividerVertical="#FFCCDD"
  app:frv_dividerHorizontalHeight="10dp"
  app:frv_dividerVerticalHeight="30dp"
  app:frv_itemViewBothSidesMargin="20dp"
  app:frv_layoutManager="grid"
  app:frv_layoutManagerOrientation="vertical"
  app:frv_spanCount="3" />

// StaggeredGridLayout ????? <cn.iwgang.familiarrecyclerview.FamiliarRecyclerView

 android:id="@+id/mRecyclerView"

 android:layout_width="match_parent"

 android:layout_height="match_parent"

 android:scrollbars="vertical"

 app:frv_divider="#EFADEF"

 app:frv_dividerHorizontalHeight="10dp"

 app:frv_dividerVerticalHeight="10dp"

 app:frv_itemViewBothSidesMargin="20dp"

 app:frv_layoutManager="staggeredGrid"

 app:frv_layoutManagerOrientation="vertical"

 app:frv_spanCount="2" /> 

???? + ????

?1.3.0?????????FamiliarRefreshRecyclerView???????????? ????????

// ?? ?FamiliarRecyclerView?????????List?Gird?staggeredGrid????? <cn.iwgang.familiarrecyclerview.FamiliarRefreshRecyclerView
  android:id="@+id/cv_refreshListRecyclerView"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:scrollbars="vertical"
  app:frv_divider="#333333"
  app:frv_dividerHeight="0.5dp"
  app:frv_emptyView="@id/tv_empty"
  app:frv_isEmptyViewKeepShowHeadOrFooter="true"
  app:frv_layoutManager="linear"
  app:frv_layoutManagerOrientation="vertical" />  // ?????? mCvRefreshListRecyclerView.setOnPullRefreshListener(...)  // ?????? mCvRefreshListRecyclerView.setOnLoadMoreListener(...)  // ???????View mCvRefreshListRecyclerView.setLoadMoreView(...)  // ????/?????? mCvRefreshListRecyclerView.setLoadMoreEnabled(true / false);
  // ????/?????? mCvRefreshListRecyclerView.setPullRefreshEnabled(true / false);
 

?????

?? ?? ??? ??
frv_divider reference / color ? ?????divider
frv_dividerVertical reference / color ? ?????divider
frv_dividerHorizontal reference / color ? ?????divider
frv_dividerHeight dimension 1px ?????size
frv_dividerVerticalHeight dimension 1px ?????size
frv_dividerHorizontalHeight dimension 1px ?????size
frv_isNotShowGridEndDivider boolean false ?????Grid??item????
frv_itemViewBothSidesMargin dimension ? itemView??????????headerView?footerView????
frv_emptyView reference ? emptyView id
frv_isEmptyViewKeepShowHeadOrFooter boolean false ??EmptyView????????????HeadView?FooterView
frv_layoutManager linear / grid / staggeredGrid ? ????
frv_layoutManagerOrientation horizontal / vertical vertical ????
frv_spanCount integer 2 ?????frv_layoutManager=grid / staggeredGrid???
frv_headerDividersEnabled boolean false ????headView?????
frv_footerDividersEnabled boolean false ????footerView?????

Resources

This library provides a circular button that looks like the new button shown in the Google+ app for Android.

Drawable animation inspired by Tinder.

Interpolation methods:

  • LinearInterpolator
  • BounceInterpolator
  • CycleInterpolator

Android Signature Pad is an Android library for drawing smooth signatures. It uses variable width Bézier curve interpolation.

Features:

  • Bézier implementation for a smoother line
  • Variable point size based on velocity
  • Customizable pen color and size

Various DialogFragments for Android:

  • AlertDialogFragment
  • ProgressDialogFragment
  • DatePickerDialogFragment
  • TimePickerDialogFragment
  • NumberPickerDialogFragment
  • StringPickerDialogFragment

Android library for getting existing db schema information from sqlite_master table.

You can use the schema information in your SQLiteOpenHelper's onCreate and onUpgrade to remove some boilerplate code.

Android library for populating the ContentProvider with test data.

The library is tightly coupled with MicroOrm and Thneed projects. You need to annotate your data models fields with MicroOrm's @Column.

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