de.msponer.android.yac.activities.workqueues
Class EditWorkItemActivity

java.lang.Object
  extended by android.content.Context
      extended by android.content.ContextWrapper
          extended by android.view.ContextThemeWrapper
              extended by android.app.Activity
                  extended by com.j256.ormlite.android.apptools.OrmLiteBaseActivity<DatabaseHelper>
                      extended by de.msponer.android.yac.activities.workqueues.EditWorkItemActivity
All Implemented Interfaces:
ComponentCallbacks, KeyEvent.Callback, LayoutInflater.Factory, View.OnCreateContextMenuListener, Window.Callback

public class EditWorkItemActivity
extends com.j256.ormlite.android.apptools.OrmLiteBaseActivity<DatabaseHelper>

Activity to edit a mobile work item. Content view is generated by a given XSD and XML document.

Author:
marcel

Field Summary
static int COMPLETED
          Result code for operation: 'Complete'.
static int QR_SCAN_COMPLETE
          Request code for a complete (implicit) QR code scan operation.
static int QR_SCAN_SINGLE
          Request code for a single (explicit) QR code scan operation.
static int SAVED
          Result code for operation: 'Saved'.
static int SIGN
          Request code indicating a touch screen signing.
static int TAKE_PICTUTE
          Request code for taking a picture.
 
Fields inherited from class android.app.Activity
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
 
Fields inherited from class android.content.Context
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, AUDIO_SERVICE, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_NOT_FOREGROUND, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DROPBOX_SERVICE, INPUT_METHOD_SERVICE, KEYGUARD_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MODE_APPEND, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NOTIFICATION_SERVICE, POWER_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, TELEPHONY_SERVICE, UI_MODE_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
 
Constructor Summary
EditWorkItemActivity()
           
 
Method Summary
 View addButtonLayout(WorkItemElementEntry workItemElementEntry, LinearLayout fatherLayout, LinearLayout childLayout)
          Adds a button layout for adding and removing view components.
 void createViewElements(LinearLayout fatherLayout, WorkItemElementEntry root)
          Creates view elements based on the work element entries and adds them to the given father layout.
 MobileWorkItem getCurrentMobileWorkItem()
          Returns the current mobile work item.
 int getUniqueViewId()
          Return a unique view id.
 WorkItemElementEntry getWorkItemElementEntryRoot()
          Returns the current work item element entry root.
protected  void onActivityResult(int requestCode, int resultCode, Intent intent)
           
 boolean onContextItemSelected(MenuItem item)
           
protected  void onCreate(Bundle savedInstanceState)
           
 boolean onCreateOptionsMenu(Menu menu)
           
 boolean onOptionsItemSelected(MenuItem item)
           
 
Methods inherited from class com.j256.ormlite.android.apptools.OrmLiteBaseActivity
getConnectionSource, getHelper, getHelperInternal, onDestroy, releaseHelper
 
Methods inherited from class android.app.Activity
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dispatchKeyEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, finish, finishActivity, finishActivityFromChild, finishFromChild, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getCurrentFocus, getInstanceCount, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLocalClassName, getMenuInflater, getParent, getPreferences, getRequestedOrientation, getSystemService, getTaskId, getTitle, getTitleColor, getVolumeControlStream, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, getWindow, getWindowManager, hasWindowFocus, isChild, isFinishing, isTaskRoot, managedQuery, moveTaskToBack, onApplyThemeResource, onAttachedToWindow, onBackPressed, onChildTitleChanged, onConfigurationChanged, onContentChanged, onContextMenuClosed, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onDetachedFromWindow, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyUp, onLowMemory, onMenuItemSelected, onMenuOpened, onNewIntent, onOptionsMenuClosed, onPanelClosed, onPause, onPostCreate, onPostResume, onPrepareDialog, onPrepareDialog, onPrepareOptionsMenu, onPreparePanel, onRestart, onRestoreInstanceState, onResume, onRetainNonConfigurationInstance, onSaveInstanceState, onSearchRequested, onStart, onStop, onTitleChanged, onTouchEvent, onTrackballEvent, onUserInteraction, onUserLeaveHint, onWindowAttributesChanged, onWindowFocusChanged, openContextMenu, openOptionsMenu, overridePendingTransition, registerForContextMenu, removeDialog, requestWindowFeature, runOnUiThread, setContentView, setContentView, setContentView, setDefaultKeyMode, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setIntent, setPersistent, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTitle, setTitle, setTitleColor, setVisible, setVolumeControlStream, showDialog, showDialog, startActivity, startActivityForResult, startActivityFromChild, startActivityIfNeeded, startIntentSender, startIntentSenderForResult, startIntentSenderFromChild, startManagingCursor, startNextMatchingActivity, startSearch, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenu
 
Methods inherited from class android.view.ContextThemeWrapper
attachBaseContext, getTheme, setTheme
 
Methods inherited from class android.content.ContextWrapper
bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalFilesDir, getFilesDir, getFileStreamPath, getMainLooper, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getResources, getSharedPreferences, getWallpaper, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, revokeUriPermission, sendBroadcast, sendBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendStickyBroadcast, sendStickyOrderedBroadcast, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiver
 
Methods inherited from class android.content.Context
getString, getString, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QR_SCAN_SINGLE

public static final int QR_SCAN_SINGLE
Request code for a single (explicit) QR code scan operation.

See Also:
Constant Field Values

QR_SCAN_COMPLETE

public static final int QR_SCAN_COMPLETE
Request code for a complete (implicit) QR code scan operation.

See Also:
Constant Field Values

TAKE_PICTUTE

public static final int TAKE_PICTUTE
Request code for taking a picture.

See Also:
Constant Field Values

SIGN

public static final int SIGN
Request code indicating a touch screen signing.

See Also:
Constant Field Values

COMPLETED

public static final int COMPLETED
Result code for operation: 'Complete'.

See Also:
Constant Field Values

SAVED

public static final int SAVED
Result code for operation: 'Saved'.

See Also:
Constant Field Values
Constructor Detail

EditWorkItemActivity

public EditWorkItemActivity()
Method Detail

onCreate

protected void onCreate(Bundle savedInstanceState)
Overrides:
onCreate in class Activity

createViewElements

public void createViewElements(LinearLayout fatherLayout,
                               WorkItemElementEntry root)
Creates view elements based on the work element entries and adds them to the given father layout.

Parameters:
fatherLayout - The father layout to which items are added.
root - The work element entry root.

addButtonLayout

public View addButtonLayout(WorkItemElementEntry workItemElementEntry,
                            LinearLayout fatherLayout,
                            LinearLayout childLayout)
Adds a button layout for adding and removing view components.

Parameters:
workItemElementEntry - The work item element entry
fatherLayout - The father layout.
childLayout - The child layout.
Returns:
The resulting button layout.

onCreateOptionsMenu

public boolean onCreateOptionsMenu(Menu menu)
Overrides:
onCreateOptionsMenu in class Activity

onOptionsItemSelected

public boolean onOptionsItemSelected(MenuItem item)
Overrides:
onOptionsItemSelected in class Activity

onContextItemSelected

public boolean onContextItemSelected(MenuItem item)
Overrides:
onContextItemSelected in class Activity

getUniqueViewId

public int getUniqueViewId()
Return a unique view id.

Returns:
The unique view id.

onActivityResult

protected void onActivityResult(int requestCode,
                                int resultCode,
                                Intent intent)
Overrides:
onActivityResult in class Activity

getCurrentMobileWorkItem

public MobileWorkItem getCurrentMobileWorkItem()
Returns the current mobile work item.

Returns:
The current mobile work item.

getWorkItemElementEntryRoot

public WorkItemElementEntry getWorkItemElementEntryRoot()
Returns the current work item element entry root.

Returns:
The current work item element entry root.