NGActivity

public class NGActivity extends AppCompatActivity

A base activity for NextGIS derived activities

Fields

mCurrentTheme

protected String mCurrentTheme

mIsDarkTheme

protected boolean mIsDarkTheme

mPreferences

protected SharedPreferences mPreferences

Methods

getAppName

public String getAppName()

getThemeId

public int getThemeId()

getToolbarAlpha

protected int getToolbarAlpha()

isHomeEnabled

protected boolean isHomeEnabled()

isPermissionGranted

protected boolean isPermissionGranted(String permission)

onCreate

protected void onCreate(Bundle savedInstanceState)

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.

Параметры:
  • item – The menu item that was selected.
Результат:

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

See also: .onCreateOptionsMenu

onResume

protected void onResume()

refreshActivityView

public void refreshActivityView()

refreshCurrentTheme

protected void refreshCurrentTheme()

requestPermissions

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

setCurrentThemePref

protected void setCurrentThemePref()

setToolbar

protected void setToolbar(int toolbarId)

updateMenuView

public void updateMenuView()