Commit Graph

96 Commits

Author SHA1 Message Date
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
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
6ef1e523cc View: relayout on visibility changes 2023-11-08 22:44:39 +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
Mis012
4a0755c6e0 api-impl{-jni}: make view.onTouchEvent work, misc stuff to make input work for Unity games
onTouchEvent was previously incorrectly handled in GLSurfaceView; move it
to View so that it works properly with any of it's descendants.

This is done by reusing the existing setOnTouchListener implementation
and changing it to use GtkEventControllerLegacy which provides motion
events.

Technically some of the code is in WrapperWidget.c since every widget
calls wrapper_widget_set_jobject and we already have related code
there.
2023-10-17 21:33:59 +02:00
Julian Winkler
520d153c55 call View.onAttachedToWindow() method 2023-10-14 18:29:33 +02:00
Julian Winkler
b88707592a add more stubs to make exoplayer not crash 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
Mis012
9270d3a923 api-impl/android/view/View: add getDisplay 2023-09-14 16:05:07 +02:00
Mis012
90cb1c925a api-impl: use liblog for android.util.Log; use Log.v for debugging prints and Log.w for stub tracing 2023-09-12 13:41:52 +02:00
Julian Winkler
096919ec37 implement View.getDrawingRect() 2023-09-08 20:10:45 +02: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