-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from AlanCheen/develop
release 0.7.0
- Loading branch information
Showing
17 changed files
with
201 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package me.yifeiyuan.flapdev; | ||
|
||
import android.support.annotation.NonNull; | ||
import android.view.View; | ||
|
||
import java.util.List; | ||
|
||
import me.yifeiyuan.flap.FlapAdapter; | ||
import me.yifeiyuan.flap.FlapItem; | ||
|
||
/** | ||
* Created by 程序亦非猿 on 2018/12/29. | ||
*/ | ||
public class BaseFlapItem<T> extends FlapItem<T> { | ||
|
||
public BaseFlapItem(final View itemView) { | ||
super(itemView); | ||
} | ||
|
||
@Override | ||
protected void onBind(@NonNull final T model, @NonNull final FlapAdapter adapter, @NonNull final List<Object> payloads) { | ||
|
||
} | ||
|
||
@Override | ||
protected void onViewAttachedToWindow(final FlapAdapter flapAdapter) { | ||
super.onViewAttachedToWindow(flapAdapter); | ||
} | ||
|
||
@Override | ||
protected void onViewDetachedFromWindow(final FlapAdapter flapAdapter) { | ||
super.onViewDetachedFromWindow(flapAdapter); | ||
} | ||
|
||
@Override | ||
protected void onViewRecycled(final FlapAdapter flapAdapter) { | ||
super.onViewRecycled(flapAdapter); | ||
} | ||
|
||
@Override | ||
protected boolean onFailedToRecycleView(final FlapAdapter flapAdapter) { | ||
return super.onFailedToRecycleView(flapAdapter); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
flap/src/main/java/me/yifeiyuan/flap/FlapAdapterDelegate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package me.yifeiyuan.flap; | ||
|
||
import android.support.annotation.NonNull; | ||
import android.view.LayoutInflater; | ||
import android.view.ViewGroup; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Created by 程序亦非猿 on 2019/1/2. | ||
*/ | ||
interface FlapAdapterDelegate { | ||
|
||
int getItemViewType(@NonNull Object model); | ||
|
||
@NonNull | ||
FlapItem onCreateViewHolder(@NonNull LayoutInflater inflater, @NonNull ViewGroup parent, int viewType); | ||
|
||
void onBindViewHolder(@NonNull final FlapItem holder, Object model, @NonNull FlapAdapter flapAdapter, @NonNull List<Object> payloads); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,9 @@ | |
/** | ||
* Flap | ||
* Created by 程序亦非猿 on 2018/12/13. | ||
* | ||
* Debug helper for Flap. | ||
* | ||
*/ | ||
final class FlapDebug { | ||
|
||
|
Oops, something went wrong.