fenix/app
Christian Sadilek 6637f61088
Support tab movement/reordering (#22751)
* Adds basic support for tab reordering via drag-and-drop selected tabs

* ktlint/detekt formatting

* Use defaultTabsFilter (now not private) instead of getter

* Convert from position+filter API to target+placeAfter
Unfortunately I still need the filter passed around a bit

* Handle inactive tabs' holder being children of the RecyclerView of the normal tabs
Don't go through LayoutManager needlessly

* Non-working use tabID the whole way. Does not compile.

* Fix to do direct tab ID and use grid setting directly

* Remove non-null assertion. Now fully works for "other" tabs.

* Prevent grouped tabs from being dragged

* Remove unused import

* Add/fix comments

* Do API version check and use deprecated startDrag if too old.

* Build process fails: both outdated and too new, so reverting to just too new

* Use deprecated function and suppress warning

* fix space

* Suppress "TooManyFunctions" on DefaultTabsTrayController

* Repeatedly update tab movement during drag

* Remove multi-tab movement, only allow dragging if tab groups disabled, fix tab positioning during movement
I'm forced to suppress LongParameterList to get the settings information where it needs to go though

* Remove settings argument and corresponding long args suppression: instead get settings from parent AbstractBrowserTrayList's context

* New UI: Select a tab and then, while holding down, start dragging

* Revert to using before/after boolean to accomodate delays
Move drag transparency to start of drag

* Use new BlankDragShadowBuilder and DraggableItemAnimator to handle tab movement

* Replace Pair<>s with data classes

* Only drag if exactly 1 tab selected, don't consume drag event if not used

* Auto-scroll tab tray while dragging near top/bottom edge

* Remove unexpected scrolling on tab bind (triggered when tab is selected)

* Fix broken scroll behavior during dragging

* Cleanup for ktlint/detekt

* Constantly set elevation during drag in case of update
Clean code at drag start

* Add custom drag start behavior

* Add drag distance constant, do all touch-drag behavior in OnTouchListener

* Disable parent vertical scrolling on drag start, fix detekt ComplexCondition

* Minor cleanup/comments

* Revert removal of scroll on bind, this was related to something different

* Correction to prepareForDrop to match documentation- doesn't seem to have any effect

* Simplify via unchecked typecast, use ViewCompat

* Use ViewConfiguration.scaledTouchSlop instead of arbitrary 30px

* Added tabReorderingFeature flag, split drag interactor to separate function to satisfy complexity requirement

Co-authored-by: Steven Knipe <ssk97@case.edu>
Co-authored-by: ssk97 <knipesteven@gmail.com>
Co-authored-by: Sebastian Kaspari <s.kaspari@gmail.com>
2021-12-08 16:36:49 +00:00
..
sampledata For #7092: Add initial Migration UI 2020-01-15 21:41:01 -08:00
src Support tab movement/reordering (#22751) 2021-12-08 16:36:49 +00:00
.gitignore Initializes Android project 2018-12-07 15:25:38 -05:00
benchmark.gradle For #21700: linting fixes 2021-10-14 21:03:05 +00:00
build.gradle Issue #22580: Track APK size in perfherder 2021-11-25 16:48:49 +00:00
lint-baseline.xml For #22729 - Tag unused strings for removal 2021-12-07 15:38:15 +00:00
lint.xml For #21861 - Ignore the UnusedResources lint check for localized strings 2021-10-12 14:48:47 +00:00
metrics.yaml Add distribution_id into first session ping 2021-12-01 03:05:57 +00:00
pings.yaml For #20596 remove startup timeline probes 2021-08-22 00:57:10 +00:00
proguard-rules.pro For #20824: use fast service loader for MainDispatcherFactory. 2021-08-18 03:59:44 +00:00