Commit Graph

979 Commits

Author SHA1 Message Date
Julian Winkler
6c2a3adae6 LinearLayout: default to horizontal orientation 2023-09-01 12:46:02 +02:00
Julian Winkler
a79b464503 View: properly handle MATCH_PARENT sizes 2023-09-01 12:42:57 +02:00
Julian Winkler
c6b98b14f8 Resources + LayoutInflater: throw same Exceptions as on AOSP 2023-09-01 12:39:20 +02:00
Julian Winkler
f968bcd7c4 add menu APIs and use Activity as Window.Callbacks implementation 2023-09-01 12:34:57 +02:00
Julian Winkler
ad83271080 add more Animation APIs and call onAnimationEnd()
Directly calling onAnimationEnd() skips the animation and directly sets
the target values
2023-09-01 12:30:27 +02:00
Julian Winkler
e522200e28 add android.widget.Adapter and related classes from AOSP 2023-09-01 12:25:19 +02:00
Julian Winkler
295d9dfda3 LinearLayout: handle overwritten performClick() method
This is needed to make TabLayout functional
2023-09-01 12:19:45 +02:00
Julian Winkler
fb1a07967e copy android.widget.Scroller from AOSP and implement missing scroll APIs
This is needed to make ViewPager functional
2023-09-01 12:13:24 +02:00
Julian Winkler
eac22aaa64 Resources.getSystem(): just return application resoources 2023-08-27 23:14:00 +02:00
Julian Winkler
d81c6800b2 add JNI implementation of android.database.SQLiteConnection
This is based on the implementation from https://www.sqlite.org/android,
which is equal to the AOSP implementation besides not depending private
Android APIs.
The code has been rewritten from C++ to C.
2023-08-27 11:40:46 +02:00
Julian Winkler
253932f985 rewrite android.database.CursorWindow in pure java
there is no need to implement it in native code, as we don't want to
pass this between processes
2023-08-27 11:17:33 +02:00
Julian Winkler
2e0c18d755 add complete java side of sqlite implementation
Mostly taken from https://www.sqlite.org/android which is forked from
AOSPs implementation
2023-08-27 11:17:33 +02:00
Julian Winkler
b861c86f0d FrameLayout: fix inserting child at last index 2023-08-23 14:52:56 +02:00
Julian Winkler
0f7548f189 refactor Dialog implementation to support custom content 2023-08-23 14:52:56 +02:00
Julian Winkler
029b26beb2 main.c: window size needs to be set before calling set_up_handle_cache()
the Context class init creates a static DisplayMetric
2023-08-23 14:52:56 +02:00
Julian Winkler
e694973a1f ViewGroup: add child View at correct index 2023-08-23 14:52:56 +02:00
Julian Winkler
28cd0006bc some fixes to make NewPipe not crash when layouting 2023-08-23 14:52:56 +02:00
Julian Winkler
1474d8d3e1 TextView: get textSize from attributes 2023-08-23 12:39:55 +02:00
Julian Winkler
c4b7bdc63d ViewGroup: handle scroll events 2023-08-23 12:39:55 +02:00
Julian Winkler
960930a348 Add some stubs needed by android material library 2023-08-23 12:39:49 +02:00
Julian Winkler
ca975a0e7c add support for ViewGroups with custom onLayout()
A custom GtkLayoutManager is set to these objects, which calls into the
java handlers when measure or layout is requested.

Androids onMeasure method is quite different from GTKs measure method,
because Android already defines the final size during onMeasure.
Therefore, we call onMeasure from GTKs allocate callback instead of the
measure callback.
2023-08-23 12:39:10 +02:00
Julian Winkler
4434de4a58 implement android.widget.EditText using GtkEntry 2023-08-23 11:47:05 +02:00
Julian Winkler
f9a85017c1 implement android.widget.ImageButton using GtkButton 2023-08-23 11:47:05 +02:00
Julian Winkler
f2e71cd50f implement android.widget.Button using GtkButton 2023-08-23 11:47:05 +02:00
Julian Winkler
36b6132324 fix reference counting for GtkWidgets created from java
GtkWidgets extend GInitiallyUnowned and are automatically freed when
removing from parent widget. We need to add an extra reference, to make
sure the object keeps alive as long as the java widget has a reference
to it
2023-08-23 11:47:05 +02:00