Commit Graph

38 Commits

Author SHA1 Message Date
Mis012
5af3fa9e79 api-impl: add TableLayout from AOSP 2024-03-21 16:19:19 +01:00
Julian Winkler
276b5ca7ef add more APIs needed for NewPipe 2024-03-17 20:02:50 +01:00
Mis012
6443e3977c api-impl: quick&dirty implementations and stubing 2024-03-16 15:03:06 +01:00
Julian Winkler
f852c2bbc9 remove View.haveComplexMeasure as it is redundant with haveCustomMeasure
Makes haveCustomMeasure true by default. And disable it for widgets
which previously set haveComplexMeasure
2024-03-15 18:57:49 +01:00
Mis012
c0d3e679ac ViewGroup: implement measureChildren 2024-03-14 12:50:49 +01:00
Mis012
8ad7359941 ViewGroup.java: fix code style 2024-03-14 12:50:49 +01:00
Julian Winkler
89b98faf04 ViewGroup: remove detached views
detached views should not be part of the view hierarchy
2024-02-18 10:08:43 +01:00
Julian Winkler
d253bfd24f findViewById(): only search among child views
also set default content view in Window
2024-02-16 15:28:04 +01:00
Julian Winkler
d2f28a5b21 add some methods needed for androidx dialogs 2024-02-16 15:28:04 +01:00
Julian Winkler
ef029f7cea implement LayoutParams.resolveLayoutDirection() callback
This is needed to make androidx ConstraintLayout behave correctly
2024-02-10 10:28:48 +01:00
Julian Winkler
bf3f595a8c LinearLayout: set GtkBox to homogeneous if all child weights are equal
Real weighted allocation is not supported by GtkBox
2024-01-01 12:11:31 +01:00
Julian Winkler
1b03fa6e1a merge View and ViewGroup constructor
Introduce empy JavaWidget to replace confusing usage of GtkBox and GtkDrawingArea.
gtk_widget_set_name() is called with the Java class name
2023-12-29 12:16:10 +01:00
Julian Winkler
757d689689 unify View construction and measurement
No longer allow constructing Views without Context.
Lets have only one onMeasure() method to unify behaviour
2023-12-29 11:40:52 +01:00
Julian Winkler
1a039e5e51 add missing APIs related to scrolling 2023-11-12 12:16:23 +01:00
Julian Winkler
e11d9ec6b6 set parent before calling setLayoutParams()
Allows the parent gravity to get handled correctly
2023-11-12 12:16:23 +01:00
Julian Winkler
36d7a1cc44 support layout margins
This makes the menu in Gravity Defied not get behind the keyboard.
Also makes the TabLayout in NewPipe not get behing the titlebar.
2023-11-12 12:16:23 +01:00
Julian Winkler
d025fd3ce3 FrameLayout: replace with AOSPs implementation
There are many Widgets extending FrameLayout and adding custom behaviour
on top. For example NavigationView. This didn't realy work with our
custom implementation
2023-11-08 22:44:39 +01:00
Julian Winkler
3de842b1d8 enable onTouchEvent for ViewGroups and add some stubs 2023-11-01 17:54:59 +01:00
Julian Winkler
520d153c55 call View.onAttachedToWindow() method 2023-10-14 18:29:33 +02:00
Julian Winkler
c830abc5f3 add more API stubs for NewPipe 2023-10-14 18:29:33 +02:00
Julian Winkler
f5fc993484 add APIs needed for non legacy NewPipe version 2023-10-14 18:29:33 +02:00
Julian Winkler
37d9b13470 View.onMeasure: handle MEASURE_SPEC_AT_MOST properly
We decide between simple widgets which handles MEASURE_SPEC_AT_MOST the same way as
MEASURE_SPEC_EXACTLY, and complex widgets which handles MEASURE_SPEC_AT_MOST by measuring the content
2023-10-14 10:01:01 +00:00
Julian Winkler
255eed3e59 setLayoutParams(): better match Androids behaviour
View.setGravity() specifies gravity of children, not of the view itself
LayoutParams.weight > 0 should cause expansion of widget
2023-09-08 20:10:45 +02:00
Julian Winkler
9ad77d5b62 ViewGroup: make sure all child views have valid LayoutParams 2023-09-01 16:05:26 +02:00
Julian Winkler
97f8c2ed0f Add some missing APIs.
android.widget.Filter and android.webkit.MimeTypeMap are copied from
AOSP. Other new classes are only stub implementations.
2023-09-01 16:05:26 +02:00