Commit Graph

224 Commits

Author SHA1 Message Date
Julian Winkler
bd83e211d0 handle onClickListener for synthesized MotionEvents
Since synthesized events can't be handled by GTK, we also need to handle
gestures by ourself in that case.
2025-04-18 07:21:21 +02:00
Julian Winkler
728c43f925 implement View.scrollBy() 2025-04-09 12:40:09 +02:00
Nikita Travkin
882cd1b471 ATLKeyboard: Integrate with phosh and wayland IME 2025-04-02 16:58:17 +02:00
Mis012
bce91cc527 api-impl: add ATLKeyboardViewer to support launching IMEs 2025-04-02 16:58:17 +02:00
Mis012
f3332b7201 api-impl: misc stubs and fixes 2025-03-26 21:12:02 +01:00
Mis012
4d12ad5c90 View: add basic implemntation of dispatchTouchEvent
Some Views block all events going to their descendants, and
then synthesize new events themselves. Gtk doesn't allow event
synthesization, which makes this quite annoying to deal with.
This initial implementation definiely has some problems,
for example it seems to cause infinite loops in some cases,
however it surprisingly works well enough.
2025-03-26 20:06:15 +01:00
Julian Winkler
15a6432d01 Revert "View: call onLayout() only on size change or on request"
This reverts commit b33a470c7b.

This commit was added as fix for layout recreation loops, but this is no
longer a problem, since ViewGroup.detachViewFromParent() has been
improved. The first fix is no longer needed and it seems to cause some
minor regressions, so we revert it.
2025-03-25 23:34:56 +01:00
Julian Winkler
caa4700487 ViewGroup: keep track of detachedChildren
Some ViewGroups like ViewPager2 call attachViewToParent() without
calling detachViewFromParent() first. This is not allowed according to
the Android API spec, but we need to handle it.
2025-03-25 23:34:56 +01:00
Julian Winkler
4a4b4a4722 api-impl: misc stubs and fixes for several apps including F-Droid and AuroraStore 2025-03-25 23:34:56 +01:00
Julian Winkler
494b4e7134 call onAnimationStart() / onAnimationStop() callbacks from View.startAnimation() 2025-03-25 23:17:09 +01:00
Julian Winkler
1edb28b0f7 implement ViewGroup.detachViewFromParent() properly
Temporarily detaching a View from its parent should not call any
callbacks, which was the case with the old implementation. This was
causing infinite recreation loops in some cases.
2025-03-23 18:32:47 +01:00
Mis012
582307f74c ExpandableListView: borrow from AOSP master (commit 272d3ffb52e10ee821eaf58fa398376c45b16b06) 2025-03-07 18:41:21 +01:00
Julian Winkler
911b6dff9a DecelerateInterpolator: add default constructor 2025-03-02 00:05:59 +01:00
Julian Winkler
b33a470c7b View: call onLayout() only on size change or on request
GTK always wants us to call gtk_widget_allocate() on all children, so we
need to do it manually when not calling onLayout().
2025-03-02 00:05:59 +01:00
Mis012
8afb1a0fe2 VelocityTracker: fix infinite loop typo 2025-02-27 22:06:28 +01:00
Julian Winkler
161904c8a8 View: implement onKeyDown() callback 2025-02-24 21:49:46 +01:00
Julian Winkler
2374d44b0f View: make sure onDetachedFromWindow() gets called before updating attachedToWindow property 2025-02-24 21:49:46 +01:00
Julian Winkler
3fb1f56da2 api-impl: add misc APIs for Open Sudoku 2025-02-24 21:45:36 +01:00
Julian Winkler
227f3c9682 View: HACK: catch Exceptions during dispatch draw 2025-02-24 21:45:36 +01:00
Mis012
453224cf31 api-impl: misc stubs and trivial impls 2025-02-15 21:42:21 +01:00
Julian Winkler
c725bb32df copy AutoCompleteTextView from AOSP
copied from main branch (frameworks/base commit 72ea9148bc619515a649cec9029136e42b342d9b)
2025-02-13 06:56:26 +01:00
Julian Winkler
1cf48085ff api-impl: add misc APIs needed for AntennaPod 2025-02-10 21:55:27 +01:00
Julian Winkler
c7f1e05f5d copy AnimatorSet and related classes from AOSP
This makes AnimatedVectorDrawableCompat from androidx functional and
probably also helps other animation stuff.
2025-02-10 21:55:27 +01:00
Mis012
ab5b600bf1 run whitespace_format.py --add-new-line-marker-at-end-of-file --remove-trailing-whitespace --remove-trailing-empty-lines --new-line-marker=linux --normalize-non-standard-whitespace=remove on src/ 2025-02-05 16:27:17 +01:00
Julian Winkler
9c454accca make LayoutInflater instances persistent per Context
Also implement LayoutInfater.cloneInContext() and support mutipe View
factories at once.

This is needed, so that androidx can repace all normal Views with
appcompat Views, which is needed for proper tint color support.
2025-01-28 06:54:31 +01:00