Răsfoiți Sursa

change class name of ActivityListItemDecoration to StickyHeaderItemDecoration, which is more generic

Signed-off-by: alex <alex.plutta@googlemail.com>
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
alex 5 ani în urmă
părinte
comite
f4e964e46e

+ 1 - 1
src/main/java/com/owncloud/android/ui/activities/ActivitiesActivity.java

@@ -174,7 +174,7 @@ public class ActivitiesActivity extends FileActivity implements ActivityListInte
         LinearLayoutManager layoutManager = new LinearLayoutManager(this);
 
         recyclerView.setLayoutManager(layoutManager);
-        recyclerView.addItemDecoration(new ActivityListItemDecoration(adapter));
+        recyclerView.addItemDecoration(new StickyHeaderItemDecoration(adapter));
         recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
 
             @Override

+ 2 - 2
src/main/java/com/owncloud/android/ui/activities/ActivityListItemDecoration.java → src/main/java/com/owncloud/android/ui/activities/StickyHeaderItemDecoration.java

@@ -31,11 +31,11 @@ import com.owncloud.android.ui.adapter.StickyHeaderAdapter;
 import androidx.annotation.NonNull;
 import androidx.recyclerview.widget.RecyclerView;
 
-public class ActivityListItemDecoration extends RecyclerView.ItemDecoration {
+public class StickyHeaderItemDecoration extends RecyclerView.ItemDecoration {
     private final StickyHeaderAdapter adapter;
 
 
-    public ActivityListItemDecoration(StickyHeaderAdapter stickyHeaderAdapter) {
+    public StickyHeaderItemDecoration(StickyHeaderAdapter stickyHeaderAdapter) {
         this.adapter = stickyHeaderAdapter;
     }
 

+ 5 - 5
src/main/java/com/owncloud/android/ui/adapter/StickyHeaderAdapter.java

@@ -22,11 +22,11 @@ package com.owncloud.android.ui.adapter;
 
 import android.view.View;
 
-import com.owncloud.android.ui.activities.ActivityListItemDecoration;
+import com.owncloud.android.ui.activities.StickyHeaderItemDecoration;
 
 public interface StickyHeaderAdapter {
     /**
-     * This method gets called by {@link ActivityListItemDecoration} to fetch the position of the header item in the adapter
+     * This method gets called by {@link StickyHeaderItemDecoration} to fetch the position of the header item in the adapter
      * that is used for (represents) item at specified position.
      * @param itemPosition int. Adapter's position of the item for which to do the search of the position of the header item.
      * @return int. Position of the header item in the adapter.
@@ -34,21 +34,21 @@ public interface StickyHeaderAdapter {
     int getHeaderPositionForItem(int itemPosition);
 
     /**
-     * This method gets called by {@link ActivityListItemDecoration} to get layout resource id for the header item at specified adapter's position.
+     * This method gets called by {@link StickyHeaderItemDecoration} to get layout resource id for the header item at specified adapter's position.
      * @param headerPosition int. Position of the header item in the adapter.
      * @return int. Layout resource id.
      */
     int getHeaderLayout(int headerPosition);
 
     /**
-     * This method gets called by {@link ActivityListItemDecoration} to setup the header View.
+     * This method gets called by {@link StickyHeaderItemDecoration} to setup the header View.
      * @param header View. Header to set the data on.
      * @param headerPosition int. Position of the header item in the adapter.
      */
     void bindHeaderData(View header, int headerPosition);
 
     /**
-     * This method gets called by {@link ActivityListItemDecoration} to verify whether the item represents a header.
+     * This method gets called by {@link StickyHeaderItemDecoration} to verify whether the item represents a header.
      * @param itemPosition int.
      * @return true, if item at the specified adapter's position represents a header.
      */