These snippets are designed to make it quicker and easier to create Android apps using Sublime Text 2/3.
ad-baseadapterA stub BaseAdapter implementation which uses the view holder petternad-logdebugDebug log with a messagead-widgetThe basics needed to get started with creating a custom widgetad-toastCreate and display a toast<TextViewA basic TextView<EditTextA basic EditTextad-assertOnScreenCheck that a view on on the screenad-onActivityResultThe onActivityResult activity methodad-onCreateThe onCreate activity methodad-onDestroyThe onDestroy activity methodad-onPauseThe onPause activity methodad-onResumeThe onResume activity methodad-onStartThe onStart activity methodad-onStopThe onStop activity method
The easiest way to install this is with Package Control.
- Make sure you've restarted Sublime if you've just installed Package Control.
- Bring up the Command Palette (
Cmd+Shift+Pon OS X,Ctrl+Shift+Pon Linux & Windows). - Select
Package Control: Install Package(it will take a few seconds to load). - Select
AndroidSnippetswhen the list appears.
Package Control will automatically keep the plugin up to date with the latest version.
OSX
cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/
git clone git://github.com/ribot/SublimeAndroidSnippets.git AndroidSnippetsLinux (Ubuntu like distros)
cd ~/.config/sublime-text-2/Packages/
git clone git://github.com/ribot/SublimeAndroidSnippets.git AndroidSnippetsWindows 7
Copy the directory to: C:\Users\<username>\AppData\Roaming\Sublime Text 2\Packages
Windows XP
Copy the directory to: C:\Documents and Settings\<username>\Application Data\Sublime Text 2\Packages