NativeActivity

Class of android.app · NativeActivity.java · Android's reference

public class NativeActivity extends Activity implements SurfaceHolder.Callback2, ViewTreeObserver.OnGlobalLayoutListener, android.view.InputQueue.Callback

NativeActivity ← Activity ← ContextThemeWrapper ← ContextWrapper ← Context

An activity of native code: it loads the library that its meta-data names and calls its ANativeActivity_onCreate (or the function that android.app.func_name names) with an ANativeActivity, then the callbacks that the library set at each step of the activity's life. It takes its window's input queue, which the system's touches and keys then go to, as Android's does. Only the 32-bit native bridge has the glue yet; with another, the library is loaded and its entry point does not run. The window's surface is the views', so the surface callbacks do not run.

Fields

public static final String META_DATA_LIB_NAME = "android.app.lib_name" source
public static final String META_DATA_FUNC_NAME = "android.app.func_name" source

Constructors

public NativeActivity() empty body source

Methods

protected void onCreate(Bundle savedInstanceState) source
protected void onStart() source
protected void onResume() source
protected void onPause() source
protected void onStop() source
protected void onDestroy() source
public void onWindowFocusChanged(boolean hasFocus) source
public void onConfigurationChanged(android.content.res.Configuration newConfig) source
public void onLowMemory() source
public void onInputQueueCreated(android.view.InputQueue queue) source
public void onInputQueueDestroyed(android.view.InputQueue queue) source
public void surfaceCreated(SurfaceHolder holder) empty body source
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) empty body source
public void surfaceRedrawNeeded(SurfaceHolder holder) empty body source
public void surfaceDestroyed(SurfaceHolder holder) empty body source
public void onGlobalLayout() empty body source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.