-
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 #18 from AlanCheen/develop
Release 1.1.0
- Loading branch information
Showing
22 changed files
with
222 additions
and
95 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
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
7 changes: 7 additions & 0 deletions
7
app/src/main/java/me/yifeiyuan/flapdev/customviewtype/CustomModel.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,7 @@ | ||
package me.yifeiyuan.flapdev.customviewtype; | ||
|
||
/** | ||
* Created by 程序亦非猿 on 2019/1/18. | ||
*/ | ||
public class CustomModel { | ||
} |
43 changes: 43 additions & 0 deletions
43
app/src/main/java/me/yifeiyuan/flapdev/customviewtype/CustomViewTypeItem.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,43 @@ | ||
package me.yifeiyuan.flapdev.customviewtype; | ||
|
||
import android.support.annotation.NonNull; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import java.util.List; | ||
|
||
import me.yifeiyuan.flap.FlapAdapter; | ||
import me.yifeiyuan.flap.FlapItem; | ||
import me.yifeiyuan.flap.internal.FlapItemFactory; | ||
import me.yifeiyuan.flapdev.R; | ||
|
||
/** | ||
* Created by 程序亦非猿 on 2019/1/18. | ||
*/ | ||
public class CustomViewTypeItem extends FlapItem<CustomModel> { | ||
|
||
public CustomViewTypeItem(final View itemView) { | ||
super(itemView); | ||
} | ||
|
||
@Override | ||
protected void onBind(@NonNull final CustomModel model, @NonNull final FlapAdapter adapter, @NonNull final List<Object> payloads) { | ||
|
||
} | ||
|
||
public static class Factory implements FlapItemFactory<CustomModel, CustomViewTypeItem> { | ||
|
||
@NonNull | ||
@Override | ||
public CustomViewTypeItem onCreateViewHolder(@NonNull final LayoutInflater inflater, @NonNull final ViewGroup parent, final int viewType) { | ||
return new CustomViewTypeItem(inflater.inflate(R.layout.flap_item_custom_type, parent, false)); | ||
} | ||
|
||
@Override | ||
public int getItemViewType(final CustomModel model) { | ||
return 3333; | ||
} | ||
} | ||
|
||
} |
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,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
android:background="#ff00ff" | ||
android:orientation="horizontal" | ||
android:layout_marginBottom="4dp" | ||
> | ||
|
||
<TextView | ||
android:id="@+id/tv_content" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:gravity="center" | ||
android:paddingLeft="16dp" | ||
android:singleLine="true" | ||
android:text="Custom View Type Item" | ||
android:textColor="@android:color/white" | ||
android:textSize="16sp" | ||
/> | ||
|
||
</LinearLayout> |
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,18 +1,10 @@ | ||
package me.yifeiyuan.flap; | ||
|
||
import android.support.annotation.NonNull; | ||
import android.view.LayoutInflater; | ||
import android.view.ViewGroup; | ||
|
||
/** | ||
* Created by 程序亦非猿 | ||
* | ||
* IFlap is the core interface that define what Flap can do and how Flap works. | ||
*/ | ||
interface IFlap extends ItemFactoryManager, FlapAdapterDelegate { | ||
|
||
@SuppressWarnings("unused") | ||
@NonNull | ||
FlapItem onCreateDefaultViewHolder(@NonNull LayoutInflater inflater, @NonNull ViewGroup parent, int viewType); | ||
|
||
} |
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
14 changes: 0 additions & 14 deletions
14
flap/src/main/java/me/yifeiyuan/flap/ItemFactoryNotFoundException.java
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.