ProteusGridLayoutManager and ViewPager Example implemented#166
Open
raviranjan19750 wants to merge 4 commits into
Open
ProteusGridLayoutManager and ViewPager Example implemented#166raviranjan19750 wants to merge 4 commits into
raviranjan19750 wants to merge 4 commits into
Conversation
gridView with proteus view logic implemented and tested viewPager example added and tested in layouts.json file data of user.json is edited
adityasharat
requested changes
Apr 18, 2022
Collaborator
adityasharat
left a comment
There was a problem hiding this comment.
Thank you for contributing. I have left some tiny review comments to address.
Apologies for getting to this after soon.
| { | ||
| "0": { | ||
| "name": "John Doe", | ||
| "name": "Ravi Ranjan", |
Collaborator
There was a problem hiding this comment.
Can you please revert this?
Comment on lines
+223
to
+224
|
|
||
|
|
Collaborator
There was a problem hiding this comment.
Can these excess new lines be removed?
Comment on lines
191
to
193
| private void registerDefaultLayoutManagers() { | ||
| register(LAYOUT_MANAGER_LINEAR, ProteusLinearLayoutManager.BUILDER); | ||
| } |
Collaborator
There was a problem hiding this comment.
Can this be deleted now?
Comment on lines
+13
to
+45
|
|
||
|
|
||
| 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); | ||
| } | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
Collaborator
There was a problem hiding this comment.
Can the excess new lines be removed?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ProteusGridLayoutManager
ViewPager example