public class FeedbackActivity extends android.app.Activity implements FeedbackActivityInterface, android.view.View.OnClickListener
Copyright (c) 2011-2014 Bit Stadium GmbH Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
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_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, BLUETOOTH_SERVICE, CAMERA_SERVICE, CAPTIONING_SERVICE, CARRIER_CONFIG_SERVICE, CLIPBOARD_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, 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_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NETWORK_STATS_SERVICE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, PRINT_SERVICE, RESTRICTIONS_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, STORAGE_SERVICE, TELECOM_SERVICE, TELEPHONY_SERVICE, TELEPHONY_SUBSCRIPTION_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, TV_INPUT_SERVICE, UI_MODE_SERVICE, USAGE_STATS_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
Constructor and Description |
---|
FeedbackActivity() |
Modifier and Type | Method and Description |
---|---|
protected void |
configureFeedbackView(boolean haveToken)
Configures the content view by initializing the input
EditText s
and the listener for the Send Feedback Button |
void |
enableDisableSendFeedbackButton(boolean isEnable)
Enables/Disables the Send Feedback button.
|
android.view.ViewGroup |
getLayoutView()
Creates and returns a new instance of
FeedbackView |
protected void |
onActivityResult(int requestCode,
int resultCode,
android.content.Intent data)
Called when picture or file was chosen.
|
void |
onClick(android.view.View v)
Called when the Send Feedback
Button is tapped. |
boolean |
onContextItemSelected(android.view.MenuItem item)
Called when user clicked on context menu item.
|
void |
onCreate(android.os.Bundle savedInstanceState)
Called when the activity is starting.
|
void |
onCreateContextMenu(android.view.ContextMenu menu,
android.view.View v,
android.view.ContextMenu.ContextMenuInfo menuInfo)
Called when context menu is needed (on add attachment button).
|
protected android.app.Dialog |
onCreateDialog(int id) |
boolean |
onKeyDown(int keyCode,
android.view.KeyEvent event) |
protected void |
onPrepareDialog(int id,
android.app.Dialog dialog) |
protected void |
onRestoreInstanceState(android.os.Bundle savedInstanceState)
Restore all attachments.
|
Object |
onRetainNonConfigurationInstance()
Detaches the activity from the send feedback task and returns the task
as last instance.
|
protected void |
onSaveInstanceState(android.os.Bundle outState)
Save all attachments.
|
protected void |
onSendFeedbackResult(boolean success)
Called when the request for sending the feedback has finished.
|
protected void |
onStop() |
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, dump, findViewById, finish, finishActivity, finishActivityFromChild, finishAffinity, finishAfterTransition, finishAndRemoveTask, finishFromChild, getActionBar, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getContentScene, getContentTransitionManager, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getMediaController, getMenuInflater, getParent, getParentActivityIntent, getPreferences, getReferrer, getRequestedOrientation, getSearchEvent, getSystemService, getTaskId, getTitle, getTitleColor, getVoiceInteractor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, invalidateOptionsMenu, isChangingConfigurations, isChild, isDestroyed, isFinishing, isImmersive, isTaskRoot, isVoiceInteraction, isVoiceInteractionRoot, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onActivityReenter, onApplyThemeResource, onAttachedToWindow, onAttachFragment, onBackPressed, onChildTitleChanged, onConfigurationChanged, onContentChanged, onContextMenuClosed, onCreate, onCreateDescription, onCreateDialog, onCreateNavigateUpTaskStack, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onCreateView, onDestroy, onDetachedFromWindow, onEnterAnimationComplete, onGenericMotionEvent, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onLowMemory, onMenuItemSelected, onMenuOpened, onNavigateUp, onNavigateUpFromChild, onNewIntent, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPause, onPostCreate, onPostCreate, onPostResume, onPrepareDialog, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onPreparePanel, onProvideAssistContent, onProvideAssistData, onProvideReferrer, onRequestPermissionsResult, onRestart, onRestoreInstanceState, onResume, onSaveInstanceState, onSearchRequested, onSearchRequested, onStart, onStateNotSaved, onTitleChanged, onTouchEvent, onTrackballEvent, onTrimMemory, onUserInteraction, onUserLeaveHint, onVisibleBehindCanceled, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, openOptionsMenu, overridePendingTransition, postponeEnterTransition, recreate, registerForContextMenu, releaseInstance, removeDialog, reportFullyDrawn, requestPermissions, requestVisibleBehind, requestWindowFeature, runOnUiThread, setActionBar, setContentTransitionManager, setContentView, setContentView, setContentView, setDefaultKeyMode, setEnterSharedElementCallback, setExitSharedElementCallback, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setIntent, setMediaController, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTaskDescription, setTitle, setTitle, setTitleColor, setVisible, setVolumeControlStream, shouldShowRequestPermissionRationale, shouldUpRecreateTask, showAssist, showDialog, showDialog, showLockTaskEscapeMessage, startActionMode, startActionMode, startActivities, startActivities, startActivity, startActivity, startActivityForResult, startActivityForResult, startActivityFromChild, startActivityFromChild, startActivityFromFragment, startActivityFromFragment, startActivityIfNeeded, startActivityIfNeeded, startIntentSender, startIntentSender, startIntentSenderForResult, startIntentSenderForResult, startIntentSenderFromChild, startIntentSenderFromChild, startLockTask, startManagingCursor, startNextMatchingActivity, startNextMatchingActivity, startPostponedEnterTransition, startSearch, stopLockTask, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenu
applyOverrideConfiguration, attachBaseContext, getResources, getTheme, setTheme
bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkSelfPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createDisplayContext, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFilesDir, getFileStreamPath, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getSharedPreferences, getSystemServiceName, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiver
public void enableDisableSendFeedbackButton(boolean isEnable)
isEnable
- the button is enabled if truepublic android.view.ViewGroup getLayoutView()
FeedbackView
getLayoutView
in interface FeedbackActivityInterface
FeedbackView
public void onClick(android.view.View v)
Button
is tapped. Sends the feedback and disables
the button to avoid multiple taps.onClick
in interface android.view.View.OnClickListener
public boolean onContextItemSelected(android.view.MenuItem item)
onContextItemSelected
in class android.app.Activity
public void onCreate(android.os.Bundle savedInstanceState)
onCreate
in class android.app.Activity
savedInstanceState
- Data it most recently supplied in
onSaveInstanceState(Bundle)public void onCreateContextMenu(android.view.ContextMenu menu, android.view.View v, android.view.ContextMenu.ContextMenuInfo menuInfo)
onCreateContextMenu
in interface android.view.View.OnCreateContextMenuListener
onCreateContextMenu
in class android.app.Activity
protected void onStop()
onStop
in class android.app.Activity
public boolean onKeyDown(int keyCode, android.view.KeyEvent event)
onKeyDown
in interface android.view.KeyEvent.Callback
onKeyDown
in class android.app.Activity
public Object onRetainNonConfigurationInstance()
onRetainNonConfigurationInstance
in class android.app.Activity
protected void configureFeedbackView(boolean haveToken)
EditText
s
and the listener for the Send Feedback Button
haveToken
- the message list is shown if trueprotected void onSendFeedbackResult(boolean success)
success
- is true if the sending of the feedback was successfulprotected void onActivityResult(int requestCode, int resultCode, android.content.Intent data)
onActivityResult
in class android.app.Activity
protected android.app.Dialog onCreateDialog(int id)
onCreateDialog
in class android.app.Activity
protected void onPrepareDialog(int id, android.app.Dialog dialog)
onPrepareDialog
in class android.app.Activity
protected void onRestoreInstanceState(android.os.Bundle savedInstanceState)
onRestoreInstanceState
in class android.app.Activity
protected void onSaveInstanceState(android.os.Bundle outState)
onSaveInstanceState
in class android.app.Activity
Copyright © 2015. All Rights Reserved.