Make sure you installed the library like explained in the README.
This tutorial assumes you have the basic understanding of the Android GUI from the crash course.
Initializing the library, displaying "Hello World" and deinitializing.
Starting an Activity and exiting when it's closed.
Showing text in a TextView.
Reacting to a button press to change the text of a TextView.
Using NestedScrollView for content longer than the screen.
It is possible to intercept the default behavior of the volume buttons and the back button and get an event instead.
Also includes setting the Activity to fullscreen mode.
Using EditText to get text input from the user, and also introducing dialog Activities.
Using toggleable Views like RadioButton, CheckBox, Switch and ToggleButton.
Using ImageViews to display images.
Using a shared buffer to display images and drawing into it with SDL.
This requires the X11 repo to be enabled and SDL to be installed.
You have to use the -lSDL2
compiler option to link to SDL2.
Using swipe-to-refresh for swipable tabs in a HorizontalScrollView that can also be navigated with tabs in a TabLayout.
Displaying an Activity on the lockscreen, selecting text options with a Spinner, turning on the screen and requesting an unlock.
Using a ProgressBar, setting text gravity for better alignment, using margins and paddings for alignment and layouting and modifying the layout at runtime.
Posting notifications and different notification types.
Using remote layouts to display content in a widget.
Using WebView to display web content.
It's possible to share a GPU buffer with the plugin for hardware accelerated rendering on Android 8.0 and higher. Your EGL and GLES2 implementations have to also support some extensions though, so support isn't guaranteed.
You have to compile the example with the -lEGL -lGLESv2
compiler options to link against EGL and GLES2.
If you have Mesa installed, you have to run LD_PRELOAD='/system/lib/:/system/lib64/' buffer_gl
to run the example, because otherwise the Mesa libraries take priority over the Android ones. Also try that if you get an error about the EGL extension EGL_ANDROID_image_native_buffer
missing.
Additionally, the example assumes basic familiarity with graphics APIs in general and EGL and OpenGL ES2 specifically.