com.hipipal.texteditor
Class TedActivity

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 greendroid.app.GDActivity
                      extended by com.zuowuxuxi.common.GDBase
                          extended by com.hipipal.texteditor._ABaseAct
                              extended by com.hipipal.texteditor.TedActivity
All Implemented Interfaces:
android.content.ComponentCallbacks, android.content.ComponentCallbacks2, android.text.NoCopySpan, android.text.TextWatcher, android.view.KeyEvent.Callback, android.view.LayoutInflater.Factory, android.view.LayoutInflater.Factory2, android.view.View.OnClickListener, android.view.View.OnCreateContextMenuListener, android.view.Window.Callback, com.amazon.device.ads.AdListener, Constants, greendroid.app.ActionBarActivity

public class TedActivity
extends _ABaseAct
implements Constants, android.text.TextWatcher, android.view.View.OnClickListener


Nested Class Summary
 
Nested classes/interfaces inherited from interface android.text.NoCopySpan
android.text.NoCopySpan.Concrete
 
Field Summary
static java.lang.String TAG
           
 
Fields inherited from class com.zuowuxuxi.common.GDBase
progressHandler, wv, wvProgressBar
 
Fields inherited from class android.app.Activity
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK
 
Fields inherited from class android.content.Context
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, APP_OPS_SERVICE, AUDIO_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, CAPTIONING_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, INPUT_METHOD_SERVICE, INPUT_SERVICE, KEYGUARD_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_ROUTER_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, PRINT_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, STORAGE_SERVICE, TELEPHONY_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, UI_MODE_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
 
Fields inherited from interface com.hipipal.texteditor.common.Constants
ACTION_WIDGET_OPEN, BACKUP_FILE_NAME, COLOR_CLASSIC, COLOR_DRACULA, COLOR_MATRIX, COLOR_NEGATIVE, COLOR_SKY, ENC_ASCII, ENC_LATIN, ENC_UTF8, EOL_LINUX, EOL_MAC, EOL_WINDOWS, EXTRA_FORCE_READ_ONLY, EXTRA_REQUEST_CODE, FONT_FILE_NAME, FONT_FOLDER_NAME, MENU_ID_ABOUT, MENU_ID_NEW, MENU_ID_OPEN, MENU_ID_OPEN_RECENT, MENU_ID_QUIT, MENU_ID_REDO, MENU_ID_SAVE, MENU_ID_SAVE_AS, MENU_ID_SEARCH, MENU_ID_SETTINGS, MENU_ID_UNDO, PREFERENCE_ALLOW_UNDO, PREFERENCE_AUTO_SAVE, PREFERENCE_AUTO_SAVE_OVERWRITE, PREFERENCE_BACK_BUTTON_AS_UNDO, PREFERENCE_COLOR_THEME, PREFERENCE_ENCODING, PREFERENCE_END_OF_LINES, PREFERENCE_FLING_TO_SCROLL, PREFERENCE_FONT, PREFERENCE_HIGHLIGHT, PREFERENCE_HOME_PAGE_PATH, PREFERENCE_MAX_RECENTS, PREFERENCE_MAX_UNDO_STACK, PREFERENCE_RECENTS, PREFERENCE_SEARCH_MATCH_CASE, PREFERENCE_SEARCHWRAP, PREFERENCE_SELECT_FONT, PREFERENCE_SHOW_LINE_NUMBERS, PREFERENCE_TEXT_SIZE, PREFERENCE_USE_HOME_PAGE, PREFERENCE_WORDWRAP, PREFERENCES_NAME, REQUEST_FONT, REQUEST_HOME_PAGE, REQUEST_OPEN, REQUEST_RECENT, REQUEST_SAVE_AS, RESULT_ERROR, STORAGE, STORAGE_PATH, TEXT_SIZE_MAX, TEXT_SIZE_MIN
 
Fields inherited from interface greendroid.app.ActionBarActivity
GD_ACTION_BAR_TITLE, GD_ACTION_BAR_VISIBILITY
 
Fields inherited from interface android.content.ComponentCallbacks2
TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN
 
Constructor Summary
TedActivity()
           
 
Method Summary
 void afterTextChanged(android.text.Editable s)
           
 void beforeTextChanged(java.lang.CharSequence s, int start, int count, int after)
           
 int createLayout()
           
 void endScreen()
           
 void goToLine()
          Go to Line number in file
 void leftIndent()
          Indent the text left
 int NewLineIndex(int indexNewLine)
          Calculate the index of the Nth new line
 void onBack(android.view.View v)
           
 void onBrowser(android.view.View v)
           
 void onClick(android.view.View v)
           
 void onExitPrompt1(android.view.View v)
           
 void onExitPrompt2(android.view.View v)
           
 boolean onHandleActionBarItemClick(greendroid.widget.ActionBarItem item, int position)
           
 void onHistory(android.view.View v)
           
 boolean onKeyDown(int keyCoder, android.view.KeyEvent event)
           
 boolean onKeyShortcut(int keyCode, android.view.KeyEvent event)
          Defines the keyboard layout
 boolean onKeyUp(int keyCode, android.view.KeyEvent event)
           
 void onLeft(android.view.View v)
           
 boolean onOptionsItemSelected(android.view.MenuItem item)
           
 void onPlay(android.view.View v)
           
 void onRight(android.view.View v)
           
 void onSave(android.view.View v)
           
 void onSaveAs(android.view.View v)
           
 void onSearch(android.view.View v)
           
 void onSetting(android.view.View v)
           
 void onTextChanged(java.lang.CharSequence s, int start, int before, int count)
           
 void rightIndnent()
          Indent the text right
 void runScript()
          Run the current script
 void setSearch()
           
 
Methods inherited from class com.hipipal.texteditor._ABaseAct
callPyApi, confGetUpdateURL, getUpdateSrv, onAbout, onConfigurationChanged, onGSetting, playFromRemote
 
Methods inherited from class com.zuowuxuxi.common.GDBase
checkUpdate, closeWaitWindow, disNotify, disNotifyContent, initAD, initWebView, LoadAd, loadContent, loadurl, onAdCollapsed, onAdExpanded, onAdFailedToLoad, onAdLoaded, onCheckUpdate, onCreateDialog, onFeedback, onRefresh, openURL, openWaitWindow, playMusic, playTube, progress, sendWithBt, tapjoyInitIfUnavailable, tapjoySelect, tapjoyVideoAdRequest, useProxyInWebView, xprogress
 
Methods inherited from class greendroid.app.GDActivity
addActionBarItem, addActionBarItem, addActionBarItem, addActionBarItem, getActionBarType, getContentView, getGDActionBar, getGDApplication, onContentChanged, onPostContentChanged, onPreContentChanged, setActionBarContentView, setActionBarContentView, setActionBarContentView, setTitle, setTitle
 
Methods inherited from class android.app.Activity
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, dump, findViewById, finish, finishActivity, finishActivityFromChild, finishAffinity, finishFromChild, getActionBar, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getMenuInflater, getParent, getParentActivityIntent, getPreferences, getRequestedOrientation, getSystemService, getTaskId, getTitle, getTitleColor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, invalidateOptionsMenu, isChangingConfigurations, isChild, isDestroyed, isFinishing, isImmersive, isTaskRoot, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onAttachedToWindow, onAttachFragment, onBackPressed, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateDescription, onCreateNavigateUpTaskStack, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onCreateView, onDetachedFromWindow, onGenericMotionEvent, onKeyLongPress, onKeyMultiple, onLowMemory, onMenuItemSelected, onMenuOpened, onNavigateUp, onNavigateUpFromChild, onOptionsMenuClosed, onPanelClosed, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onPreparePanel, onProvideAssistData, onRetainNonConfigurationInstance, onSearchRequested, onTouchEvent, onTrackballEvent, onTrimMemory, onUserInteraction, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, openContextMenu, openOptionsMenu, overridePendingTransition, recreate, registerForContextMenu, removeDialog, reportFullyDrawn, requestWindowFeature, runOnUiThread, setContentView, setContentView, setContentView, setDefaultKeyMode, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setIntent, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTitleColor, setVisible, setVolumeControlStream, shouldUpRecreateTask, showDialog, showDialog, startActionMode, startActivities, startActivities, startActivity, startActivity, startActivityForResult, startActivityForResult, startActivityFromChild, startActivityFromChild, startActivityFromFragment, startActivityFromFragment, startActivityIfNeeded, startActivityIfNeeded, startIntentSender, startIntentSender, startIntentSenderForResult, startIntentSenderForResult, startIntentSenderFromChild, startIntentSenderFromChild, startManagingCursor, startNextMatchingActivity, startNextMatchingActivity, startSearch, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenu
 
Methods inherited from class android.view.ContextThemeWrapper
applyOverrideConfiguration, getResources, getTheme, setTheme
 
Methods inherited from class android.content.ContextWrapper
bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createDisplayContext, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getFilesDir, getFileStreamPath, getMainLooper, getObbDir, getObbDirs, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getSharedPreferences, 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
 
Methods inherited from class android.content.Context
getString, getString, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, registerComponentCallbacks, unregisterComponentCallbacks
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG

public static final java.lang.String TAG
See Also:
Constant Field Values
Constructor Detail

TedActivity

public TedActivity()
Method Detail

setSearch

public void setSearch()

createLayout

public int createLayout()
Specified by:
createLayout in interface greendroid.app.ActionBarActivity
Overrides:
createLayout in class greendroid.app.GDActivity

onOptionsItemSelected

public boolean onOptionsItemSelected(android.view.MenuItem item)
Overrides:
onOptionsItemSelected in class android.app.Activity
See Also:
Activity.onOptionsItemSelected(android.view.MenuItem)

onSetting

public void onSetting(android.view.View v)

beforeTextChanged

public void beforeTextChanged(java.lang.CharSequence s,
                              int start,
                              int count,
                              int after)
Specified by:
beforeTextChanged in interface android.text.TextWatcher
See Also:
TextWatcher.beforeTextChanged(java.lang.CharSequence, int, int, int)

onTextChanged

public void onTextChanged(java.lang.CharSequence s,
                          int start,
                          int before,
                          int count)
Specified by:
onTextChanged in interface android.text.TextWatcher
See Also:
TextWatcher.onTextChanged(java.lang.CharSequence, int, int, int)

afterTextChanged

public void afterTextChanged(android.text.Editable s)
Specified by:
afterTextChanged in interface android.text.TextWatcher
See Also:
TextWatcher.afterTextChanged(android.text.Editable)

onKeyUp

public boolean onKeyUp(int keyCode,
                       android.view.KeyEvent event)
Specified by:
onKeyUp in interface android.view.KeyEvent.Callback
Overrides:
onKeyUp in class android.app.Activity
See Also:
Activity.onKeyUp(int, android.view.KeyEvent)

onClick

public void onClick(android.view.View v)
Specified by:
onClick in interface android.view.View.OnClickListener
See Also:
View.OnClickListener.onClick(View)

onBrowser

public void onBrowser(android.view.View v)

onHandleActionBarItemClick

public boolean onHandleActionBarItemClick(greendroid.widget.ActionBarItem item,
                                          int position)
Specified by:
onHandleActionBarItemClick in interface greendroid.app.ActionBarActivity
Overrides:
onHandleActionBarItemClick in class greendroid.app.GDActivity

onKeyDown

public boolean onKeyDown(int keyCoder,
                         android.view.KeyEvent event)
Specified by:
onKeyDown in interface android.view.KeyEvent.Callback
Overrides:
onKeyDown in class android.app.Activity

endScreen

public void endScreen()

onExitPrompt1

public void onExitPrompt1(android.view.View v)

onExitPrompt2

public void onExitPrompt2(android.view.View v)

onLeft

public void onLeft(android.view.View v)

leftIndent

public void leftIndent()
Indent the text left


onRight

public void onRight(android.view.View v)

rightIndnent

public void rightIndnent()
Indent the text right


onBack

public void onBack(android.view.View v)
Overrides:
onBack in class com.zuowuxuxi.common.GDBase

NewLineIndex

public int NewLineIndex(int indexNewLine)
Calculate the index of the Nth new line

Parameters:
indexNewLine - New line to find
Returns:
Gives the position of the Nth new line

goToLine

public void goToLine()
Go to Line number in file


onPlay

public void onPlay(android.view.View v)

runScript

public void runScript()
Run the current script


onSearch

public void onSearch(android.view.View v)

onSave

public void onSave(android.view.View v)

onSaveAs

public void onSaveAs(android.view.View v)

onHistory

public void onHistory(android.view.View v)

onKeyShortcut

public boolean onKeyShortcut(int keyCode,
                             android.view.KeyEvent event)
Defines the keyboard layout

Overrides:
onKeyShortcut in class android.app.Activity