Skip to content
This repository was archived by the owner on Jan 2, 2021. It is now read-only.

Commit bbd8091

Browse files
authored
Add missing javadoc comment inside OnItemClickListener class (#89)
1 parent fcdf53b commit bbd8091

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

multi-view-adapter/src/main/java/mva2/adapter/decorator/Decorator.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
/**
3636
* A Decorator allows the application to add a special drawing and layout offset to specific
37-
* itemviews from the adapter's data set.
37+
* item views from the adapter's data set.
3838
* This can be useful for drawing dividers between items, highlights and more.
3939
*
4040
* <p>
@@ -49,9 +49,9 @@
4949
private MultiViewAdapter adapter;
5050

5151
/**
52-
* Constructor which initialized the Decorator with the adapter object.
52+
* Constructor which initializes the Decorator with the adapter object.
5353
*
54-
* @param adapter MultiViewAaapter that is attached with this decorator.
54+
* @param adapter MultiViewAdapter that is attached with this decorator.
5555
*/
5656
public Decorator(MultiViewAdapter adapter) {
5757
this.adapter = adapter;
@@ -74,7 +74,10 @@ public void addToRect(Rect outRect, int left, int top, int right, int bottom) {
7474
}
7575

7676
/**
77-
* Returns the position type of the item for given adapter position.
77+
* Returns the position type of the item for given adapter position. PositionType lets you
78+
* identify specific information about the position of the item inside the adapter. For example
79+
* you can use PositionType to find whether the item lies on the left or right or top or bottom
80+
* edge of the adapter.
7881
*
7982
* @param adapterPosition Item position inside the adapter for which position type is calculated
8083
* @param parent Parent recyclerview

multi-view-adapter/src/main/java/mva2/adapter/util/OnItemClickListener.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,19 @@
1616

1717
package mva2.adapter.util;
1818

19+
import mva2.adapter.ItemSection;
20+
import mva2.adapter.ItemViewHolder;
21+
import mva2.adapter.ListSection;
22+
1923
/**
24+
* This interface lets you listen to the click event of the items inside the ListSection or
25+
* ItemSection. You can attach this listener to the section and listen for click events. To pass
26+
* down the click events to this interface call {@link ItemViewHolder#onClick()} method.
27+
*
28+
* @param <M> Model used in the {@link ListSection} or {@link ItemSection} where this listener is
29+
* attached.
2030
*
21-
* @param <M>
31+
* @see ItemViewHolder#onClick()
2232
*/
2333
public interface OnItemClickListener<M> {
2434

0 commit comments

Comments
 (0)