Commit graph

1354 commits

Author SHA1 Message Date
Alexander--
8d98f9a967 Default to landscape orientation for Android TV 2019-12-01 12:41:11 +06:59
Alexander--
31bd60f3b1 Disable srolling down comment list while comments are loading
Prevents comment list from losing focus to some outside View
when user tries to scroll down after reaching "end"
2019-12-01 12:41:11 +06:59
Alexander--
e6f3cde4cb More fixes to comment focus handling 2019-12-01 12:41:11 +06:59
Alexander--
86fc9c0785 Special MovementMethod for video description
Video descriptions can be very long. Some of them are
basically walls of text with couple of lines at top or bottom.
They are also not scrolled within TextView itself, - instead
NewPipe expects user to scroll their containing ViewGroup.
This renders all builtin MovementMethod implementations useless.

This commit adds a new MovementMethod, that uses requestRectangleOnScreen
to intelligently re-position the TextView within it's scrollable container.
2019-12-01 12:41:11 +06:59
Alexander--
8018f6d37f Save/restore focused item 2019-12-01 12:41:11 +06:59
Alexander--
ac28cc7364 Remove FixedGridLayoutManager 2019-12-01 12:41:11 +06:59
Alexander--
10e38f7ea4 RecyclerView scroll fixes
* Move all focus-related work arouns to NewPipeRecyclerView
* Try to pass focus within closer parents first
* Do small arrow scroll if there are not more focusables in move direction
2019-12-01 12:41:11 +06:59
Alexander
f831c84c42 Eliminate bunch of ExoPlayer warnings 2019-12-01 12:41:11 +06:59
Alexander
1c975ccd3a Allow comment links (if any) to gain focus 2019-12-01 12:41:11 +06:59
Alexander
2f30802d29 More robust focus search in SuperScrollLayoutManager
FocusFinder has glitches when some of target Views have different size.
Fortunately LayoutManager can redefine focus search strategy to override
the default behavior.
2019-12-01 12:41:11 +06:59
Alexander
d2935d616c Focus video view thumbnail after it is loaded 2019-12-01 12:41:11 +06:59
Alexander
924fb49eb0 Implement global focus highlight 2019-12-01 12:41:11 +06:59
Alexander
feea320116 Focus drawer when it opens
It is still buggy because of NavigationView (why the hell
is NavigationMenuView marked as focusable?) but at least initial
opening works as intended
2019-12-01 12:41:10 +06:59
Alexander
ddc609e8d8 Support for seeking videos in directional navigation mode 2019-12-01 12:41:10 +06:59
Alexander
9329c2f7f1 Do not allow focus to escape from open DrawerLayout
Upstream DrawerLayout does override addFocusables, but
incorrectly checks for isDrawerOpen instread of isDrawerVisible
2019-12-01 12:41:10 +06:59
Alexander
adb83b5048 Improve usability of MainVideoActivity with directional navigation
* Hide player controls when back is pressed (only on TV devices)
* Do not hide control after click unless in touch mode
* Show player controls on dpad usage
* Notably increase control hide timeout when not in touch mode
2019-12-01 12:41:10 +06:59
Alexander
50410c4791 Do not discriminate against non-Amazon TV boxes 2019-12-01 12:41:10 +06:59
Alexander
2b8bd2c890 When child of CoordinatorLayout wants focus, show it!
The same logic is present in RecyclerView, ScrollView etc.
Android really should default to this behavior for all Views
with isScrollContainer = true
2019-12-01 12:41:10 +06:59
Alexander
b1aa3b018b Fix scrolling in main screen grid
GridLayoutManager is buggy - https://issuetracker.google.com/issues/37067220:
it randomly loses or incorrectly assigns focus when being scrolled via
direction-based navigation. This commit reimplements onFocusSearchFailed()
on top of scrollBy() to work around that problem.

Ordinary touch-based navigation should not be affected.
2019-12-01 12:41:10 +06:59
Alexander
9429fbfa65 Close DrawerLayout on back button press 2019-12-01 12:41:10 +06:59
Alexander
0d0b3b888f Fix scrolling comments list
AppBarLayout mostly gets it, but we still need to uphold our own part -
expanding it back after focus returns to it
2019-12-01 12:41:10 +06:59
mitosagi
00f1b114f3 Fix popup player gestures 2019-11-22 11:41:10 +01:00
Mauricio Colli
5dd9ef156d Make the KioskFragment aware of changes in the preferred content country 2019-11-20 00:23:35 -03:00
Mauricio Colli
910910f524 Use tab position from parameters instead of relying on the view pager 2019-11-20 00:23:34 -03:00
Mauricio Colli
bb34f3e711 Enable toolbar title visibility when setting a new one 2019-11-20 00:23:33 -03:00
Mauricio Colli
03c59cbb0d Clear the item list when starting loading 2019-11-20 00:23:31 -03:00
Mauricio Colli
991776c25e Fix broken view pager tabs implementation
- Fragments were being recreated from scratch (losing their state) every
time some configuration change occurred (e.g. screen rotation).
- Use `FragmentStatePagerAdapter` instead, as it is built to work with
them and manage their states.
2019-11-20 00:23:30 -03:00
Mauricio Colli
532d2f305a Fix mess with tab handling and enable ignored tests again
- Fix typo in a string resource
- Reorder tabs so the default kiosk is on top of the others
2019-11-20 00:23:29 -03:00
Mauricio Colli
ab1c2b00da Show parsed relative times instead of whatever the service gives us
Before, the direct value was given to the user, now it uses the parsed
date so we can match the device's language.

To get the relative time from the parsed dates, we use the PrettyTime
library.

Also introduces a debug option to check the service's original value.
2019-11-17 23:58:55 -03:00
Mauricio Colli
8df3186f83 Show proper text for live streams watching/listening count 2019-11-17 23:58:54 -03:00
Mauricio Colli
cb2f0625b1 Use new Localization and Downloader implementations from extractor 2019-11-17 23:58:52 -03:00
TobiGr
5a8714f8e4 Make "Default Kiosk" string translatable
Closes #2778
2019-11-04 11:21:41 +01:00
TobiGr
912086506c Update extractor version and add head request to downloader 2019-10-28 01:13:06 +01:00
Robin
e7de1bd2ec fix NPE, fix 'wrong' constant, avoid unnecessary nulling 2019-10-08 06:36:29 +02:00
Redirion
3ccd90806b Apply suggestions from code review
Co-Authored-By: Tobias Groza <TobiGr@users.noreply.github.com>
2019-10-07 11:27:43 +02:00
Robin
4479cd8f9f Make use of isPlaying feature of ExoPlayer 2.10.5 2019-10-07 11:18:27 +02:00
Robin
709b9a511c Fixed deprecations 2019-10-07 11:18:26 +02:00
Robin
6a28c5767c Update to ExoPlayer 2.10.5 2019-10-07 11:18:26 +02:00
Robin
edd5ad2d13 Migrate to AndroidX 2019-10-04 14:59:08 +02:00
yausername
7b5ae64488 Merge remote-tracking branch 'upstream/dev' into videoDetailscrollFix 2019-10-02 06:35:44 +05:30
yausername
cc7e21a93b fix scrolling in video detail fragment. fixes #2627 2019-09-29 22:05:29 +05:30
Christian Schabesberger
108b20b467 add tab description and download dialog bag button 2019-09-22 13:26:53 +02:00
Christian Schabesberger
3d02c2458b add content description for toggle service button 2019-09-22 11:59:50 +02:00
Tobias Groza
09b10c1a37 Merge branch 'dev' into android-pie-workarrounds 2019-09-09 18:59:59 +02:00
Tobias Groza
fb29b3c847 Merge branch 'dev' into remove-dead-code 2019-09-04 22:59:18 +02:00
kapodamy
d91722192f add warning after toggle the SAF option 2019-09-01 18:53:12 -03:00
kapodamy
cc7797b2dc add @NotNull 2019-09-01 18:07:14 -03:00
kapodamy
1e1f68e3dd show hidden directories in the file picker 2019-09-01 17:35:42 -03:00
TobiGr
0099d0d3f9 Add option in history settings to delete playback positions 2019-08-22 21:49:33 +02:00
jimbo1qaz
2793d5c89e remove dead code 2019-08-17 23:21:06 -07:00