Skip to content

Commit 4c4d56c

Browse files
author
jacob-tabak
committed
fix docs, remove holo reference
1 parent 1882b2d commit 4c4d56c

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

library/src/main/java/com/timehop/stickyheadersrecyclerview/HeaderPositionCalculator.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ public boolean hasStickyHeader(View itemView, int orientation, int position) {
6868
* @param position of the list item in questions
6969
* @param isReverseLayout TRUE if layout manager has flag isReverseLayout
7070
* @return true if this item has a different header than the previous item in the list
71-
* @see {@link StickyRecyclerHeadersAdapter#getHeaderId(int)}
7271
*/
7372
public boolean hasNewHeader(int position, boolean isReverseLayout) {
7473
if (indexOutOfBounds(position)) {

library/src/main/java/com/timehop/stickyheadersrecyclerview/StickyRecyclerHeadersAdapter.java

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,33 @@ public interface StickyRecyclerHeadersAdapter<VH extends RecyclerView.ViewHolder
77
/**
88
* Get the ID of the header associated with this item. For example, if your headers group
99
* items by their first letter, you could return the character representation of the first letter.
10-
* Return a value < 0 if the view should not have a header (like, a header view or footer view)
10+
* Return a value &lt; 0 if the view should not have a header (like, a header view or footer view)
1111
*
12-
* @param position
13-
* @return
12+
* @param position the position of the view to get the header ID of
13+
* @return the header ID
1414
*/
15-
public long getHeaderId(int position);
15+
long getHeaderId(int position);
1616

1717
/**
1818
* Creates a new ViewHolder for a header. This works the same way onCreateViewHolder in
1919
* Recycler.Adapter, ViewHolders can be reused for different views. This is usually a good place
2020
* to inflate the layout for the header.
2121
*
22-
* @param parent
23-
* @return
22+
* @param parent the view to create a header view holder for
23+
* @return the view holder
2424
*/
25-
public VH onCreateHeaderViewHolder(ViewGroup parent);
25+
VH onCreateHeaderViewHolder(ViewGroup parent);
2626

2727
/**
2828
* Binds an existing ViewHolder to the specified adapter position.
2929
*
30-
* @param holder
31-
* @param position
30+
* @param holder the view holder
31+
* @param position the adapter position
3232
*/
33-
public void onBindHeaderViewHolder(VH holder, int position);
33+
void onBindHeaderViewHolder(VH holder, int position);
3434

35-
public int getItemCount();
35+
/**
36+
* @return the number of views in the adapter
37+
*/
38+
int getItemCount();
3639
}

library/src/main/java/com/timehop/stickyheadersrecyclerview/StickyRecyclerHeadersDecoration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ public int findHeaderPositionUnder(int x, int y) {
140140
* Gets the header view for the associated position. If it doesn't exist yet, it will be
141141
* created, measured, and laid out.
142142
*
143-
* @param parent
144-
* @param position
143+
* @param parent the recyclerview
144+
* @param position the position to get the header view for
145145
* @return Header view
146146
*/
147147
public View getHeaderView(RecyclerView parent, int position) {

sample/src/main/res/drawable/white_touch.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<selector xmlns:android="http://schemas.android.com/apk/res/android">
33
<item android:state_pressed="true">
44
<shape android:shape="rectangle">
5-
<solid android:color="@android:color/holo_blue_light" />
5+
<solid android:color="#ff33b5e5" />
66
</shape>
77
</item>
88
<item>

0 commit comments

Comments
 (0)