6.3.2.3.7. NGActivity

public class NGActivity extends AppCompatActivity

A base activity for NextGIS derived activities

6.3.2.3.7.1. Fields

6.3.2.3.7.1.1. mCurrentTheme

protected String mCurrentTheme

6.3.2.3.7.1.2. mIsDarkTheme

protected boolean mIsDarkTheme

6.3.2.3.7.1.3. mPreferences

protected SharedPreferences mPreferences

6.3.2.3.7.2. Methods

6.3.2.3.7.2.1. getAppName

public String getAppName()

6.3.2.3.7.2.2. getThemeId

public int getThemeId()

6.3.2.3.7.2.3. getToolbarAlpha

protected int getToolbarAlpha()

6.3.2.3.7.2.4. isHomeEnabled

protected boolean isHomeEnabled()

6.3.2.3.7.2.5. isPermissionGranted

protected boolean isPermissionGranted(String permission)

6.3.2.3.7.2.6. onCreate

protected void onCreate(Bundle savedInstanceState)

6.3.2.3.7.2.7. onOptionsItemSelected

public boolean onOptionsItemSelected(MenuItem item)

This hook is called whenever an item in your options menu is selected. The default implementation simply returns false to have the normal processing happen (calling the item’s Runnable or sending a message to its Handler as appropriate). You can use this method for any items for which you would like to do processing without those other facilities.

Derived classes should call through to the base class for it to perform the default menu handling.

Parameters:
  • item – The menu item that was selected.
Returns:

boolean Return false to allow normal menu processing to proceed, true to consume it here.

See also: .onCreateOptionsMenu

6.3.2.3.7.2.8. onResume

protected void onResume()

6.3.2.3.7.2.9. refreshActivityView

public void refreshActivityView()

6.3.2.3.7.2.10. refreshCurrentTheme

protected void refreshCurrentTheme()

6.3.2.3.7.2.11. requestPermissions

protected void requestPermissions(int title, int message, int requestCode, String... permissions)

6.3.2.3.7.2.12. setCurrentThemePref

protected void setCurrentThemePref()

6.3.2.3.7.2.13. setToolbar

protected void setToolbar(int toolbarId)

6.3.2.3.7.2.14. updateMenuView

public void updateMenuView()