-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ProteusGridLayoutManager and ViewPager Example implemented #166
base: master
Are you sure you want to change the base?
Conversation
gridView with proteus view logic implemented and tested viewPager example added and tested in layouts.json file data of user.json is edited
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contributing. I have left some tiny review comments to address.
Apologies for getting to this after soon.
@@ -1,6 +1,6 @@ | |||
{ | |||
"0": { | |||
"name": "John Doe", | |||
"name": "Ravi Ranjan", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please revert this?
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these excess new lines be removed?
private void registerDefaultLayoutManagers() { | ||
register(LAYOUT_MANAGER_LINEAR, ProteusLinearLayoutManager.BUILDER); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be deleted now?
|
||
|
||
private static final String ATTRIBUTE_COL = "numCols"; | ||
private static final String ATTRIBUTE_ORIENTATION = "orientation"; | ||
private static final String ATTRIBUTE_REVERSE_LAYOUT = "reverse"; | ||
|
||
|
||
public static final LayoutManagerBuilder<ProteusGridLayoutManager> BUILDER = new LayoutManagerBuilder<ProteusGridLayoutManager>() { | ||
|
||
@NonNull | ||
@Override | ||
public ProteusGridLayoutManager create(@NonNull ProteusRecyclerView view, @NonNull ObjectValue config) { | ||
|
||
int orientation = config.getAsInteger(ATTRIBUTE_ORIENTATION, GridLayoutManager.VERTICAL); | ||
boolean reverseLayout = config.getAsBoolean(ATTRIBUTE_REVERSE_LAYOUT, false); | ||
|
||
int col = config.getAsInteger(ATTRIBUTE_COL, 1); | ||
|
||
|
||
|
||
return new ProteusGridLayoutManager(view.getContext(), col, orientation, reverseLayout); | ||
} | ||
}; | ||
|
||
|
||
public ProteusGridLayoutManager(Context context, int spanCount, int orientation, boolean reverseLayout) { | ||
super(context, spanCount, orientation, reverseLayout); | ||
} | ||
|
||
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the excess new lines be removed?
ProteusGridLayoutManager
ViewPager example