public class DataMainActivity extends MenuActivity
It hosts, in its layout, View instances (widgets) wrapped, each, by an enclosing Term
instance. The set of Term objects helps to identify the set of data that will open.
Then the class offers two different mode of running: as searcher and as contextor.
As searcher it processes the Term objects as defining a filtering criteria arbitrarily compiled and
the expected record set, in turn, has not a known size so that it is paginated.
As contextor the class expects the criteria components to be fully filled and the expected record set
must be known in its invariant size, or, at any rate, is not paginated.
So that, to the default equipment of the action bar, the class adds, in the first mode, the "search"
command and optionally the "new record" command; while in the second mode the "look" command is added.
The class, indeed collaborates with two other children of the MenuActivity class: DataResultActivity
and DataDetailsActivity
. However tha collaboration passes through an intermediary for each of these
classes: both have a controller class with which are strictly bound; they are the (@code ResultController}
and DetailsController
classes.
The setCollaboratorActivities
method allows the developer to specify the two collaborator activities
only the first one of which, the DataResultActivity, is required. But the method creates the respective controller
that, in turn, will create the controlled activity when the time of its opening comes.
The "search" and the "look" command invoke the method of the same name that carries to the execution of the
ResultController.accessResult
method, that deliver the request to the Joty Server and will open
the DataResultActivity upon the response got from the server.
The "new record", instead, directly comes, by means of the DetailsController.openDetailsActivity
method, to
the opening of the DataDetailsActivity, opened as empty form.
Actually a further running mode of the class does exist: the one that makes it behaving like a context of
selection of a record of the entity for which it has been implemented: the m_asSelector
member holds the activation of this behavior. This mode implies to work with the JotyApp.ValuesOnChoice
class for checking if, on resuming, this instance must be closed (because the job has been done).
Another important role of this class is contributing in control of the navigation flow.
One contribution in this domain is to track itself into the JotyApp.m_dataMainActivityStack
member, a stack of instances of this class.
The class put its instance in the stack upon the creation and removes it from the stack on finishing.
Another contribution in navigation control is to hold one stack of DataResultActivity
objects
and a one stack of DataDetailsActivity
objects, both growing as the navigation goes forward,
far from the current activity and decreasing as the navigation turns back, next to the current activity.
From this asset, evidently, derives a sort of hierarchy in navigation control where at the top is the application
object and then a set of DataMainActivity objects follows as the navigation proceeds. The multiplicity of these objects
is possible because, from a DataDetailsActivity context, is possible to open the inspection/management of another entity,
typically related to the previous one.
DataResultActivity
,
DataDetailsActivity
,
ResultController
,
DetailsController
,
JotyApp.m_dataMainActivityStack
,
JotyApp.ValuesOnChoice
Modifier and Type | Class and Description |
---|---|
static class |
DataMainActivity.Type |
MenuActivity.Action, MenuActivity.Permission
JotyActivity.AccessorCoordinates, JotyActivity.WaitCursor
Modifier and Type | Field and Description |
---|---|
boolean |
m_asSelector |
protected java.lang.Class |
m_dataDetailsActivityClass |
java.lang.Class |
m_dataResultActivityClass |
DetailsController |
m_detailsController |
org.joty.app.Common.JotyStack<DetailsController> |
m_detailsControllersStack |
java.lang.String |
m_IdFieldName |
java.lang.String |
m_orderByClause |
DataResultActivity |
m_resultActivity |
ResultController |
m_resultController |
org.joty.app.Common.JotyStack<ResultController> |
m_resultControllersStack |
m_accessorCoordinates, m_accessorMode, m_contextActivity, m_mainActivity, m_paramContext, m_permission, m_stockedMenuItems
m_app, m_common, m_extras, m_termMap, m_terms, m_waitCursor
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, APP_OPS_SERVICE, APPWIDGET_SERVICE, AUDIO_SERVICE, BATTERY_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_EXTERNAL_SERVICE, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, BLUETOOTH_SERVICE, CAMERA_SERVICE, CAPTIONING_SERVICE, CARRIER_CONFIG_SERVICE, CLIPBOARD_SERVICE, COMPANION_DEVICE_SERVICE, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, FINGERPRINT_SERVICE, HARDWARE_PROPERTIES_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, JOB_SCHEDULER_SERVICE, KEYGUARD_SERVICE, LAUNCHER_APPS_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_PROJECTION_SERVICE, MEDIA_ROUTER_SERVICE, MEDIA_SESSION_SERVICE, MIDI_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_NO_LOCALIZED_COLLATORS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NETWORK_STATS_SERVICE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, PRINT_SERVICE, RECEIVER_VISIBLE_TO_INSTANT_APPS, RESTRICTIONS_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, SHORTCUT_SERVICE, STORAGE_SERVICE, STORAGE_STATS_SERVICE, SYSTEM_HEALTH_SERVICE, TELECOM_SERVICE, TELEPHONY_SERVICE, TELEPHONY_SUBSCRIPTION_SERVICE, TEXT_CLASSIFICATION_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, TV_INPUT_SERVICE, UI_MODE_SERVICE, USAGE_STATS_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_AWARE_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
Constructor and Description |
---|
DataMainActivity() |
Modifier and Type | Method and Description |
---|---|
boolean |
accomplished() |
void |
finish() |
java.lang.String |
getMainFilter() |
protected void |
look() |
protected boolean |
newIsAllowed() |
protected void |
newRecord() |
protected void |
onCreate(android.os.Bundle savedInstanceState) |
boolean |
onCreateOptionsMenu(android.view.Menu menu) |
protected void |
onResume() |
protected void |
onStart() |
protected void |
search() |
protected void |
setCollaboratorActivities(java.lang.Class resultActivityClass,
java.lang.Class detailsActivityClass) |
void |
setOrderByExpr(java.lang.String definition) |
protected void |
setType(DataMainActivity.Type type) |
accessIsAllowed, accessorMode, addHome, addItemAsSubMenu, addMenuItemsToAppMenu, addMenuItemToAppMenu, addMenuItemToAppMenu, addMenuItemToAppMenu, addMenuItemToAppMenu, addNewRecordMenu, beforeFinish, createContextPostStatement, createParamContext, createParamContext, doBackAction, enableRole, finish, getMaxPermission, hasPermission, mainActivity, navigationNeeded, onOptionsItemSelected, openImage, putFieldAsExtra, setBack, setContextActivity, setContextParams, setHint, setItem, setLangHint, setLangText, setText
addExtrasInOpenActivity, getRespManager, getRespManagerKey, guiDataExchange, guiDataExchange, home, isPortrait, jotyLang, lockRotation, onBackPressed, onPostCreate, onSaveInstanceState, onWidgetClick, onWidgetItemSelected, postInit, resetDirtyStatus, setContentView, setWaitCursor, startActivity, startActivity, startActivity, term
addContentView, dispatchKeyEvent, findViewById, getDelegate, getDrawerToggleDelegate, getMenuInflater, getResources, getSupportActionBar, getSupportParentActivityIntent, invalidateOptionsMenu, onConfigurationChanged, onContentChanged, onCreateSupportNavigateUpTaskStack, onDestroy, onMenuItemSelected, onMenuOpened, onPanelClosed, onPostResume, onPrepareSupportNavigateUpTaskStack, onStop, onSupportActionModeFinished, onSupportActionModeStarted, onSupportContentChanged, onSupportNavigateUp, onTitleChanged, onWindowStartingSupportActionMode, setContentView, setContentView, setSupportActionBar, setSupportProgress, setSupportProgressBarIndeterminate, setSupportProgressBarIndeterminateVisibility, setSupportProgressBarVisibility, setTheme, startSupportActionMode, supportInvalidateOptionsMenu, supportNavigateUpTo, supportRequestWindowFeature, supportShouldUpRecreateTask
dump, getLastCustomNonConfigurationInstance, getSupportFragmentManager, getSupportLoaderManager, onActivityResult, onAttachFragment, onCreatePanelMenu, onLowMemory, onMultiWindowModeChanged, onNewIntent, onPause, onPictureInPictureModeChanged, onPrepareOptionsPanel, onPreparePanel, onRequestPermissionsResult, onResumeFragments, onRetainCustomNonConfigurationInstance, onRetainNonConfigurationInstance, onStateNotSaved, setEnterSharedElementCallback, setExitSharedElementCallback, startActivityForResult, startActivityFromFragment, startActivityFromFragment, startIntentSenderFromFragment, supportFinishAfterTransition, supportPostponeEnterTransition, supportStartPostponedEnterTransition, validateRequestPermissionsRequestCode
closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dismissKeyboardShortcutsHelper, dispatchGenericMotionEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, enterPictureInPictureMode, enterPictureInPictureMode, finishActivity, finishActivityFromChild, finishAffinity, finishAfterTransition, finishAndRemoveTask, finishFromChild, getActionBar, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getContentScene, getContentTransitionManager, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getMaxNumPictureInPictureActions, getMediaController, getParent, getParentActivityIntent, getPreferences, getReferrer, getRequestedOrientation, getSearchEvent, getSystemService, getTaskId, getTitle, getTitleColor, getVoiceInteractor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, isActivityTransitionRunning, isChangingConfigurations, isChild, isDestroyed, isFinishing, isImmersive, isInMultiWindowMode, isInPictureInPictureMode, isLocalVoiceInteractionSupported, isTaskRoot, isVoiceInteraction, isVoiceInteractionRoot, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onActivityReenter, onApplyThemeResource, onAttachedToWindow, onAttachFragment, onChildTitleChanged, onContextItemSelected, onContextMenuClosed, onCreate, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreateNavigateUpTaskStack, onCreatePanelView, onCreateThumbnail, onDetachedFromWindow, onEnterAnimationComplete, onGenericMotionEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onLocalVoiceInteractionStarted, onLocalVoiceInteractionStopped, onMultiWindowModeChanged, onNavigateUp, onNavigateUpFromChild, onOptionsMenuClosed, onPictureInPictureModeChanged, onPostCreate, onPrepareDialog, onPrepareDialog, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onProvideAssistContent, onProvideAssistData, onProvideKeyboardShortcuts, onProvideReferrer, onRestart, onRestoreInstanceState, onRestoreInstanceState, onSaveInstanceState, onSearchRequested, onSearchRequested, onTouchEvent, onTrackballEvent, onTrimMemory, onUserInteraction, onUserLeaveHint, onVisibleBehindCanceled, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, openOptionsMenu, overridePendingTransition, postponeEnterTransition, recreate, registerForContextMenu, releaseInstance, removeDialog, reportFullyDrawn, requestDragAndDropPermissions, requestPermissions, requestShowKeyboardShortcuts, requestVisibleBehind, requestWindowFeature, runOnUiThread, setActionBar, setContentTransitionManager, setDefaultKeyMode, setEnterSharedElementCallback, setExitSharedElementCallback, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setIntent, setMediaController, setPictureInPictureParams, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTaskDescription, setTitle, setTitle, setTitleColor, setVisible, setVolumeControlStream, setVrModeEnabled, shouldShowRequestPermissionRationale, shouldUpRecreateTask, showAssist, showDialog, showDialog, showLockTaskEscapeMessage, startActionMode, startActionMode, startActivities, startActivities, startActivity, startActivity, startActivityFromChild, startActivityFromChild, startActivityFromFragment, startActivityFromFragment, startActivityIfNeeded, startActivityIfNeeded, startIntentSender, startIntentSender, startIntentSenderFromChild, startIntentSenderFromChild, startLocalVoiceInteraction, startLockTask, startManagingCursor, startNextMatchingActivity, startNextMatchingActivity, startPostponedEnterTransition, startSearch, stopLocalVoiceInteraction, stopLockTask, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenu
applyOverrideConfiguration, attachBaseContext, getAssets, getTheme
bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkSelfPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createContextForSplit, createDeviceProtectedStorageContext, createDisplayContext, createPackageContext, databaseList, deleteDatabase, deleteFile, deleteSharedPreferences, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDatabasePath, getDataDir, getDir, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFilesDir, getFileStreamPath, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getSharedPreferences, getSystemServiceName, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isDeviceProtectedStorage, isRestricted, moveDatabaseFrom, moveSharedPreferencesFrom, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, setWallpaper, startForegroundService, startInstrumentation, startService, stopService, unbindService, unregisterReceiver
getColor, getColorStateList, getDrawable, getString, getString, getSystemService, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, registerComponentCallbacks, unregisterComponentCallbacks
public boolean m_asSelector
public java.lang.Class m_dataResultActivityClass
protected java.lang.Class m_dataDetailsActivityClass
public java.lang.String m_orderByClause
public java.lang.String m_IdFieldName
public DataResultActivity m_resultActivity
public org.joty.app.Common.JotyStack<DetailsController> m_detailsControllersStack
public DetailsController m_detailsController
public org.joty.app.Common.JotyStack<ResultController> m_resultControllersStack
public ResultController m_resultController
protected void setCollaboratorActivities(java.lang.Class resultActivityClass, java.lang.Class detailsActivityClass)
protected void setType(DataMainActivity.Type type)
protected void onCreate(android.os.Bundle savedInstanceState)
onCreate
in class MenuActivity
public void finish()
finish
in class MenuActivity
public boolean onCreateOptionsMenu(android.view.Menu menu)
onCreateOptionsMenu
in class MenuActivity
protected void search()
protected void newRecord()
newRecord
in class MenuActivity
protected void look()
protected boolean newIsAllowed()
public void setOrderByExpr(java.lang.String definition)
protected void onStart()
onStart
in class android.support.v7.app.AppCompatActivity
protected void onResume()
onResume
in class JotyActivity
public boolean accomplished()
public java.lang.String getMainFilter()