Commit Graph

73 Commits

Author SHA1 Message Date
Julian Winkler
0a8b8a3874 use AndroidLayout class also in View implementation
drop the onMeasure hack from WrapperWidget
2023-11-02 08:20:19 +01:00
Mis012
fb3149b088 api-impl/android/content/res/Resources: fix trailing whitespace 2023-10-30 18:49:32 +01:00
Mis012
0b0cfed345 misc: fix stuff up to make SDL example work again
it still behaves weirdly, should probably find some
other example since I don't trust my own code.
2023-10-29 22:48:02 +01:00
Julian Winkler
9025142bdd AssetManager: speed up XML inflation using HashMap caching
This makes XML inflation around 10 times faster. Inflating a layout XML
with one TextView and one ImageView now takes 4 ms instead of 40 ms
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
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
2013024971 Context: implement startService() and bindService() 2023-10-14 18:29:33 +02:00
Julian Winkler
299a474aa0 move startActivity function to Context class
This way it can also be called on Application Context
2023-10-14 18:29:33 +02:00
Julian Winkler
55a1ff2cc5 create ContentProvider from AndroidManifest.xml
This is required for androidx startup library.
Only onCreate method is called for now.
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
Mis012
43306bf174 api-impl/android/content/res/AssetManager: fix infinite loop with suspicious self-referencing arsc entries 2023-10-09 20:11:36 +02:00
Mis012
f5b35b5ce9 api-impl: misc. stubs 2023-10-08 22:33:47 +02:00
Mis012
1b33acb658 api-impl/android/content: implement metadata bundle in PackageInfo 2023-10-08 22:33:14 +02:00
Nikita Travkin
d3e5c6ee70 api-impl,libandroid: Add some stubs, mostly 2023-09-19 14:44:50 +02:00
Mis012
a32961891d api-impl/android/content/Context: add getExternalFilesDirs 2023-09-19 11:12:15 +02:00
Mis012
210cda566a api-impl/android/content/Context: make getObbDir consistent with apps' hardcoded assumptions about the obb dir location 2023-09-18 13:54:12 +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
Mis012
897a1e68a4 TextView: implement setTextColor
also uncomment Resources.getCachedColorStateList
2023-09-12 13:37:41 +02:00
Julian Winkler
b35cbea099 implement URL opening using libportal 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
Julian Winkler
c6b98b14f8 Resources + LayoutInflater: throw same Exceptions as on AOSP 2023-09-01 12:39:20 +02:00
Julian Winkler
eac22aaa64 Resources.getSystem(): just return application resoources 2023-08-27 23:14:00 +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
28cd0006bc some fixes to make NewPipe not crash when layouting 2023-08-23 14:52:56 +02:00