I hereby claim:
- I am sagaratalatti on github.
- I am ibitcoinist (https://keybase.io/ibitcoinist) on keybase.
- I have a public key ASBjsyJfcpPl9aBGsD6FgvXBBKPhyqLxJnez2kjhJi6FBwo
To claim this, I am signing this object:
pragma solidity ^0.6.12; | |
library Address { | |
function isContract(address account) internal view returns (bool) { | |
bytes32 codehash; | |
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; | |
assembly { codehash := extcodehash(account) } | |
return (codehash != accountHash && codehash != 0x0); | |
} |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
You can use this class to realize a simple sectioned RecyclerView.Adapter
without changing your code.
The RecyclerView
should use a LinearLayoutManager
.
You can use this code also with the TwoWayView
with the ListLayoutManager
(https://github.com/lucasr/twoway-view)
This is a porting of the class SimpleSectionedListAdapter
provided by Google
Example:
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="daichan4649.lockoverlay" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<uses-sdk | |
android:minSdkVersion="15" | |
android:targetSdkVersion="17" /> |
public abstract class FirebaseRecyclerAdapter<T, VH extends RecyclerView.ViewHolder> extends RecyclerView.Adapter<VH > implements Filterable { | |
private static final String LOG_TAG = FirebaseRecyclerAdapter.class.getSimpleName(); | |
private Query mRef; | |
private Class<T> mModelClass; | |
private int mLayout; | |
private LayoutInflater mInflater; | |
protected Class<VH> mViewHolderClass; | |
private List<T> mModels; | |
private List<T> mFilteredModels; |