forked from organicmaps/organicmaps
[android] remove stickyheadersrecyclerview dependency
Signed-off-by: Arnaud Vergnet <arnaud.vergnet@mailo.com>
This commit is contained in:
parent
6387ebd81c
commit
b338389dd3
2 changed files with 0 additions and 33 deletions
|
@ -95,7 +95,6 @@ dependencies {
|
|||
implementation 'androidx.work:work-runtime:2.8.0'
|
||||
implementation 'com.google.android.material:material:1.8.0'
|
||||
implementation 'com.google.code.gson:gson:2.10.1'
|
||||
implementation 'com.timehop.stickyheadersrecyclerview:library:0.4.3@aar'
|
||||
implementation 'com.github.devnullorthrow:MPAndroidChart:3.2.0-alpha'
|
||||
implementation 'net.jcip:jcip-annotations:1.0'
|
||||
|
||||
|
|
|
@ -30,8 +30,6 @@ import app.organicmaps.util.UiUtils;
|
|||
import app.organicmaps.util.bottomsheet.MenuBottomSheetFragment;
|
||||
import app.organicmaps.util.bottomsheet.MenuBottomSheetItem;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.timehop.stickyheadersrecyclerview.StickyRecyclerHeadersAdapter;
|
||||
import com.timehop.stickyheadersrecyclerview.StickyRecyclerHeadersDecoration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
@ -42,7 +40,6 @@ import java.util.Map;
|
|||
import java.util.Stack;
|
||||
|
||||
class DownloaderAdapter extends RecyclerView.Adapter<DownloaderAdapter.ViewHolderWrapper>
|
||||
implements StickyRecyclerHeadersAdapter<DownloaderAdapter.HeaderViewHolder>
|
||||
{
|
||||
private static final int HEADER_ADVERTISMENT_ID = CountryItem.CATEGORY__LAST + 1;
|
||||
private static final int HEADER_ADS_OFFSET = 10;
|
||||
|
@ -54,8 +51,6 @@ class DownloaderAdapter extends RecyclerView.Adapter<DownloaderAdapter.ViewHolde
|
|||
private final RecyclerView mRecycler;
|
||||
private final Activity mActivity;
|
||||
private final DownloaderFragment mFragment;
|
||||
private final StickyRecyclerHeadersDecoration mHeadersDecoration;
|
||||
|
||||
private boolean mMyMapsMode = true;
|
||||
private boolean mSearchResultsMode;
|
||||
private String mSearchQuery;
|
||||
|
@ -662,7 +657,6 @@ class DownloaderAdapter extends RecyclerView.Adapter<DownloaderAdapter.ViewHolde
|
|||
|
||||
mFragment.showPlaceholder(mItems.isEmpty());
|
||||
|
||||
mHeadersDecoration.invalidateHeaders();
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
|
@ -671,8 +665,6 @@ class DownloaderAdapter extends RecyclerView.Adapter<DownloaderAdapter.ViewHolde
|
|||
mActivity = fragment.requireActivity();
|
||||
mFragment = fragment;
|
||||
mRecycler = mFragment.getRecyclerView();
|
||||
mHeadersDecoration = new StickyRecyclerHeadersDecoration(this);
|
||||
mRecycler.addItemDecoration(mHeadersDecoration);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
@ -699,30 +691,6 @@ class DownloaderAdapter extends RecyclerView.Adapter<DownloaderAdapter.ViewHolde
|
|||
holder.bind(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HeaderViewHolder onCreateHeaderViewHolder(ViewGroup parent)
|
||||
{
|
||||
return new HeaderViewHolder(inflate(parent, R.layout.downloader_item_header));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindHeaderViewHolder(HeaderViewHolder holder, int position)
|
||||
{
|
||||
holder.bind(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getHeaderId(int position)
|
||||
{
|
||||
if (position >= mNearMeCount)
|
||||
{
|
||||
if (position < mNearMeCount)
|
||||
return HEADER_ADVERTISMENT_ID;
|
||||
}
|
||||
|
||||
return mItems.get(position).headerId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount()
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue