Julian Winkler
8c7dbf6ceb
start implementing Drawable using underlying GdkPaintable
2023-12-30 23:38:48 +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
0614e6c245
add some stubs needed since we now handle onMeasure() for more Views
2023-12-29 11:40:52 +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
bff62a6e77
View: implement visibility and alpha properly
2023-11-12 12:16:23 +01:00
Julian Winkler
1a039e5e51
add missing APIs related to scrolling
2023-11-12 12:16:23 +01:00
Julian Winkler
7ac38adae0
View.scrollTo(): invalidate View
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
72a8b3a047
add more stubs
2023-11-12 12:16:23 +01:00
Julian Winkler
9f74ab811e
LayoutInflater: support android:theme attribute
2023-11-08 22:44:39 +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
6ef1e523cc
View: relayout on visibility changes
2023-11-08 22:44:39 +01:00
Julian Winkler
1cef28f086
Window: use content_view as DecorView if available
2023-11-04 23:32:29 +01:00
Julian Winkler
385f6dcf0b
android_layout_measure: reuse old MeasureSpec for missing dimension
...
This should fix the SurfaceView in NewPipe not resizing automatically
2023-11-04 08:49:58 +01:00
Julian Winkler
4bce3544dd
WrapperWidget: handle View.computeScroll()
...
Currently the scrolling is purely visual.
2023-11-02 23:30:21 +01:00
Julian Winkler
0a8b8a3874
use AndroidLayout class also in View implementation
...
drop the onMeasure hack from WrapperWidget
2023-11-02 08:20:19 +01:00
Julian Winkler
3de842b1d8
enable onTouchEvent for ViewGroups and add some stubs
2023-11-01 17:54:59 +01:00
Mis012
b714dad281
api-impl/android/view/View: apply background from attrs
2023-10-30 20:45:08 +01:00
Mis012
d483828236
android/view/View: naive implementation for setBackgroundColor
2023-10-30 17:28:38 +01:00
Julian Winkler
3bdffe7ce9
View: prevent redundant measuring for performance reasons
...
No need to remeasure or relayout when nothing has changed
2023-10-29 15:28:06 +01:00
Julian Winkler
4f9e672819
View: handle all invalidate methods
2023-10-29 15:28:06 +01:00
Julian Winkler
3e7f07ec71
onTouchEvent: pass return value to GTK
...
This allows to propagate unhandled events to the next handler
2023-10-29 15:28:06 +01:00
Julian Winkler
469d47091c
Window: fix issue with multi Activity support
...
each Activity has its own Window object. Therefore the check if the
contentView has changed needs to be in the common native window
2023-10-29 15:28:06 +01:00
Mis012
9ef2151c5e
GLSurfaceView: remove old implementation, import the one from AOSP
...
Now that we have a reasonably well working SurfaceView implementation,
it is actually cleaner to just implement GLSurfaceView the way AOSP
does. In fact, their code doesn't have any weird dependencies, and
can mostly be used as-is.
The AOSP code is pure Java, which means we had to implement some
EGL wrappers.
This change fixes issues with Wayland (it only ever worked because
the pbuffers were allocated using an XWayland EGLDisplay), and
with resizing (which we simply didn't support), all while getting
rid of quite some (arguably not very readable) LoC.
2023-10-20 20:54:37 +02:00