-
-
Notifications
You must be signed in to change notification settings - Fork 45
Migrate to ViewPager2 #2873
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
Merged
Merged
Migrate to ViewPager2 #2873
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
4238469
Automated version bump
avazirna d1aedf0
viewpager2 Poc with issues
devanshhooda 729ced2
Changed few things in adapter setup to encounter null pointer exception
devanshhooda b5c3d05
Added the TabLayout with static data
devanshhooda fe4fcc4
Resolved merge conflicts
devanshhooda 2355c7a
Styling changes
devanshhooda bb5425f
Added dynamic data support to the tabs
devanshhooda 5b38e21
Few prop and styling changes for TabLayout
devanshhooda a6807c2
Remove RtlViewPager library
avazirna 8b670b0
Lint
avazirna f29e666
Update tabbed detail view layout
avazirna b12e6e3
Hide tab layout when no tabs to show
avazirna 5e0945e
Remove previous tab menu layout
avazirna 675618e
Refactor
avazirna b8f77b3
Remove multidex proguard conf
avazirna 649bb57
Update detail drawer row colour
avazirna 8da9d40
Null check adapter when returning number of items
avazirna File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,41 +1,40 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <merge xmlns:android="http://schemas.android.com/apk/res/android" | ||
| xmlns:tools="http://schemas.android.com/tools" | ||
| xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| tools:viewBindingIgnore="true"> | ||
|
|
||
| <LinearLayout | ||
| android:id="@+id/tabbed_detail_menu" | ||
| android:orientation="horizontal" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content"> | ||
| </LinearLayout> | ||
|
|
||
| <LinearLayout | ||
| android:id="@+id/tabbed_detail_pager_wrapper" | ||
| android:layout_below="@id/tabbed_detail_menu" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content"> | ||
| android:layout_height="match_parent" | ||
| android:orientation="vertical"> | ||
|
|
||
| <com.google.android.material.tabs.TabLayout | ||
| android:id="@+id/tab_layout" | ||
| android:layout_gravity="top" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" | ||
| android:background="@color/cc_brand_bg" | ||
| android:paddingTop="@dimen/dp6" | ||
| app:tabMode="scrollable" | ||
| app:tabGravity="center" | ||
| app:tabIndicatorGravity="bottom" | ||
| app:tabIndicatorHeight="@dimen/detail_view_tab_indicator_height" | ||
| app:tabIndicatorColor="@color/cc_brand_text" | ||
| app:tabPaddingStart="@dimen/detail_view_tab_padding_horizontal" | ||
| app:tabPaddingEnd="@dimen/detail_view_tab_padding_horizontal" | ||
| app:tabTextAppearance="@style/DetailViewTabStyle" /> | ||
|
|
||
| <!-- NOTE: In order to deal with annoying issues of multiplicity, | ||
| this ID shouldn't be considered static for layouts, etc. DO NOT REFER | ||
| to the tabbed_detail_pager ID in any xml, and only within the pager | ||
| class in android until its ID changes. --> | ||
| <com.duolingo.open.rtlviewpager.RtlViewPager | ||
| <androidx.viewpager2.widget.ViewPager2 | ||
| android:id="@+id/tabbed_detail_pager" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content"> | ||
|
|
||
| <androidx.viewpager.widget.PagerTabStrip | ||
| android:id="@+id/pager_tab_strip" | ||
| android:layout_gravity="top" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" | ||
| android:paddingTop="@dimen/content_min_margin" | ||
| android:paddingBottom="@dimen/content_min_margin" | ||
| android:textColor="@color/cc_brand_text" | ||
| android:background="@color/cc_brand_bg" | ||
| /> | ||
| </com.duolingo.open.rtlviewpager.RtlViewPager> | ||
|
|
||
| android:layout_height="0dp" | ||
| android:layout_weight="1" /> | ||
| </LinearLayout> | ||
|
|
||
| </merge> |
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.