public class

ForgeActivity

extends Activity
java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.view.ContextThemeWrapper
         ↳ android.app.Activity
           ↳ io.trigger.forge.android.core.ForgeActivity

Class Overview

The Forge subclass of Activity. The entry point to the application, contains references to the root layout and webView objects.

Summary

[Expand]
Inherited Constants
From class android.app.Activity
From class android.content.Context
From interface android.content.ComponentCallbacks2
Fields
public boolean hasModalView Whether or not a modal view is currently being displayed over the main view
public LinearLayout mainLayout The root layout of the application, can be manipulated to place other views above or below the webview.
public WebView webView The main webView, used to display the app.
[Expand]
Inherited Fields
From class android.app.Activity
Public Methods
void addModalView(View view)
Add an animate in a modal view over the top of the webView.
void addResumeCallback(Runnable callback)
Add a callback for the next time the app is resumed.
void gotoUrl(String url)
Load a specific URL in the webView
void removeModalView(View view, Runnable callback)
Remove a modal view added with addModalView.
[Expand]
Inherited Methods
From class android.app.Activity
From class android.view.ContextThemeWrapper
From class android.content.ContextWrapper
From class android.content.Context
From class java.lang.Object
From interface android.content.ComponentCallbacks
From interface android.content.ComponentCallbacks2
From interface android.view.KeyEvent.Callback
From interface android.view.LayoutInflater.Factory
From interface android.view.LayoutInflater.Factory2
From interface android.view.View.OnCreateContextMenuListener
From interface android.view.Window.Callback

Fields

public boolean hasModalView

Whether or not a modal view is currently being displayed over the main view

public LinearLayout mainLayout

The root layout of the application, can be manipulated to place other views above or below the webview.

public WebView webView

The main webView, used to display the app.

Public Methods

public void addModalView (View view)

Add an animate in a modal view over the top of the webView.

Parameters
view View to add, should be ready to display.

public void addResumeCallback (Runnable callback)

Add a callback for the next time the app is resumed. Useful when triggering an intent with no result to know when the user has returned to the Forge app.

Parameters
callback Called on next app resume.

public void gotoUrl (String url)

Load a specific URL in the webView

Parameters
url Absolute url to load

public void removeModalView (View view, Runnable callback)

Remove a modal view added with addModalView.

Parameters
view View to remove.
callback Callback when view has been entirely removed from the display.