PageRenderTime 26ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/development/samples/ApiDemos/src/com/example/android/apis/app/_index.html

https://gitlab.com/brian0218/rk3188_r-box_android4.2.2_sdk
HTML | 307 lines | 251 code | 56 blank | 0 comment | 0 complexity | 0207fc76b9fd42c9ae4c1add20584b2b MD5 | raw file
  1. <p>This section includes samples for:</p>
  2. <ul>
  3. <li><a href="#Activity">Activity</a></li>
  4. <li><a href="#Fragment">Fragment</a></li>
  5. <li><a href="#ActionBar">Action Bar</a></li>
  6. <li><a href="#LoaderManager">LoaderManager</a></li>
  7. <li><a href="#Alarm">Alarm</a></li>
  8. <li><a href="#Notification">Notification</a></li>
  9. <li><a href="#Search">Search</a></li>
  10. <li><a href="#Misc">Misc</a></li>
  11. </ul>
  12. <h3 id="Activity">Activity</h3>
  13. <dl>
  14. <dt><a href="HelloWorld.html">Hello World</a></dt>
  15. <dd>Demonstrates a basic screen activity.
  16. <dl>
  17. <dt>Code:
  18. <dd> <a href="HelloWorld.html">HelloWorld.java</a>
  19. <dt>Layout:
  20. <dd> <a href="../../../../../../res/layout/hello_world.html">
  21. hello_world.xml</a>
  22. </dl>
  23. </dd>
  24. <dt><a href="SaveRestoreState.html">Save &amp; Restore State</a></dt>
  25. <dd>Demonstrates how an activity should save state when it is paused.</dd>
  26. <dt><a href="PersistentState.html">Persistent State</a></dt>
  27. <dd>Demonstrates how you can save and restore preferences, which are stored
  28. even after the user closes the application. </dd>
  29. <dt><a href="ReceiveResult.html">Receive Result</a></dt>
  30. <dd>Demonstrates how an activity screen can return a result to the
  31. activity that opened it. </dd>
  32. <dt><a href="Forwarding.html">Forwarding</a></dt>
  33. <dd>Demonstrates opening a new activity and removing the current activity
  34. from the history stack, so that when the user later presses BACK they will
  35. not see the intermediate activity.</dd>
  36. <dt><a href="RedirectEnter.html">Redirection</a></dt>
  37. <dd>Demonstrates how to save data to preferences and use it to determine
  38. which activity to open next.</dd>
  39. <dt><a href="TranslucentActivity.html">Translucent</a></dt>
  40. <dd>Demonstrates how to make an activity with a transparent background. </dd>
  41. <dt><a href="TranslucentBlurActivity.html">TranslucentBlur</a></dt>
  42. <dd>Demonstrates how to make an activity with a transparent background with
  43. a special effect (blur). </dd>
  44. <dt><a href="DialogActivity.html">Dialog Activity</a></dt>
  45. <dd>An Activity that sets its theme to android:style/Theme.Dialog so that
  46. it looks like a Dialog.</dd>
  47. <dt><a href="CustomTitle.html">Custom Title</a></dt>
  48. <dd>An Activity that places a custom UI in its title.</dd>
  49. <dt><a href="Animation.html">Animation</a></dt>
  50. <dd>Demonstrates how to use custom animations when moving between activities. </dd>
  51. <dt><a href="ActivityRecreate.html">Activity Recreate</a></dt>
  52. <dd>Demonstrates how an Activity can cause itself to be recreated.</dd>
  53. <dt><a href="ScreenOrientation.html">Screen Orientation</a></dt>
  54. <dd>Demonstrates the different screen orientations an Activity can request.</dd>
  55. <dt><a href="SoftInputModes.html">Soft Input Modes</a></dt>
  56. <dd>Demonstrates how different soft input modes set in an Activity's
  57. window impacts how it adjusts to accommodate an IME.</dd>
  58. <dt><a href="IntentActivityFlags.html">Intent Activity Flags</a></dt>
  59. <dd>Demonstrates various uses of Intent flags to modify an application
  60. task's activity stack in common ways.</dd>
  61. <dt><a href="ReorderOnLaunch.html">Reorder on Launch</a></dt>
  62. <dd>Demonstrates how the activities in a task can be reordered. UI flow
  63. goes through the activities <a href="ReorderOnLaunch.html">ReorderOnLaunch</a>,
  64. <a href="ReorderTwo.html">ReorderTwo</a>, <a href="ReorderThree.html">ReorderThree</a>,
  65. and <a href="ReorderFour.html">ReorderFour</a>.</dd>
  66. <dt><a href="WallpaperActivity.html">Wallpaper Activity</a></dt>
  67. <dd>An Activity that uses android:style/Theme.Wallpaper to be displayed
  68. on top of the system wallpaper.</dd>
  69. </dl>
  70. <h3 id="Fragment">Fragment</h3>
  71. <dl>
  72. <dt><a href="FragmentAlertDialog.html">Fragment Alert Dialog</a></dt>
  73. <dd>Demonstrates how to use a DialogFragment to show and manage an
  74. AlertDialog.</dd>
  75. <dt><a href="FragmentArguments.html">Fragment Arguments</a></dt>
  76. <dd>Demonstrates how a fragment can be initialized with arguments,
  77. supplying them either as an argument Bundle at runtime or XML attributes
  78. in a &lt;fragment> tag.</dd>
  79. <dt><a href="FragmentContextMenu.html">Fragment Context Menu</a></dt>
  80. <dd>Demonstrates how to display and respond to a context menu that is
  81. display from a fragment's view hierarchy.</dd>
  82. <dt><a href="FragmentCustomAnimation.html">Fragment Custom Animation</a></dt>
  83. <dd>Demonstrates the use of a custom animation for pushing and popping fragments
  84. on the back stack.</dd>
  85. <dt><a href="FragmentDialog.html">Fragment Dialog</a></dt>
  86. <dd>Demonstrates use of DialogFragment to show various types of dialogs.</dd>
  87. <dt><a href="FragmentDialogOrActivity.html">Fragment Dialog or Activity</a></dt>
  88. <dd>Demonstrates how the same Fragment implementation can be used to provide the UI
  89. for either an Activity or Dialog.</dd>
  90. <dt><a href="FragmentHideShow.html">Fragment Hide Show</a></dt>
  91. <dd>Demonstrates hiding and showing fragments.</dd>
  92. <dt><a href="FragmentLayout.html">Fragment Layout</a></dt>
  93. <dd>Demonstrates use of the &lt;fragment&gt; tag to embed a Fragment in
  94. an Activity's content view layout, and making the layout change based on
  95. configuration to achieve different UI flows.</dd>
  96. <dt><a href="FragmentListArray.html">Fragment List Array</a></dt>
  97. <dd>Demonstrates use of ListFragment to show the contents of a simple ArrayAdapter.</dd>
  98. <dt><a href="FragmentMenu.html">Fragment Menu</a></dt>
  99. <dd>Demonstrates populating custom menu items from a Fragment.</dd>
  100. <dt><a href="FragmentReceiveResult.html">Fragment Receive Result</a></dt>
  101. <dd>Demonstrates starting a new Activity from a Fragment, and receiving
  102. a result back from it.</dd>
  103. <dt><a href="FragmentRetainInstance.html">Fragment Retain Instance</a></dt>
  104. <dd>Demonstrates a Fragment can be used to easily retain active state across
  105. an Activity's configuration change.</dd>
  106. <dt><a href="FragmentStack.html">Fragment Stack</a></dt>
  107. <dd>Demonstrates creating a stack of Fragment instances similar to the
  108. traditional stack of activities.</dd>
  109. <dt><a href="FragmentTabs.html">Fragment Tabs</a></dt>
  110. <dd>Demonstrates implementing ActionBar tabs by switching between
  111. Fragments.</dd>
  112. </dl>
  113. <h3 id="ActionBar">Action Bar</h3>
  114. <dl>
  115. <dt><a href="ActionBarMechanics.html">Action Bar Mechanics</a></dt>
  116. <dd>Demonstrates the basics of the Action Bar and how it interoperates with the standard options
  117. menu. This demo is for informative purposes only; see Usage for an example of using the
  118. Action Bar in a more idiomatic manner.</dd>
  119. <dt><a href="ActionBarTabs.html">Action Bar Tabs</a></dt>
  120. <dd>Demonstrates the use of Action Bar tabs and how they interact with other action bar
  121. features. Also see the <a href="FragmentTabs.html">Fragment Tabs</a> for a more
  122. complete example of how to switch between fragments.</dd>
  123. <dt><a href="ActionBarUsage.html">Action Bar Usage</a></dt>
  124. <dd>Demonstrates simple usage of the Action Bar, including a SearchView as an action item. The
  125. default Honeycomb theme includes the Action Bar by default and a menu resource is used to populate
  126. the menu data itself. If you'd like to see how these things work under the hood, see
  127. Mechanics.</dd>
  128. <dt><a href="ActionBarActionProviderSettingsActivity.html">Settings Action Provider</a></dt>
  129. <dd>Shows how to implement an ActionProvider for launching the system settings that supplies a
  130. menu item with a specialized action view and handles standard menu item clicks in one place.</dd>
  131. <dt><a href="ActionBarShareActionProviderActivity.html">Share Action Provider</a></dt>
  132. <dd>Shows how to use a ShareActionProvider to embed sharing functionality in your application
  133. via the streamlined sharing UI added in ICS. </dd>
  134. <dt><a href="ActionBarDisplayOptions.html">Display Options</a></dt>
  135. <dd>Shows how various Action Bar display option flags can be combined and their effects.</dd>
  136. </dl>
  137. <h3 id="LoaderManager">LoaderManager</h3>
  138. <dl>
  139. <dt><a href="LoaderCursor.html">Loader Cursor</a></dt>
  140. <dd>Demonstrates use of LoaderManager to perform a query for a Cursor that
  141. populates a ListFragment.</dd>
  142. <dt><a href="LoaderCustom.html">Loader Custom</a></dt>
  143. <dd>Demonstrates implementation and use of a custom Loader class. The
  144. custom class here "loads" the currently installed applications.</dd>
  145. <dt><a href="LoaderThrottle.html">Loader Throttle</a></dt>
  146. <dd>Complete end-to-end demonstration of a simple content provider that
  147. populates data in a list through a cursor loader. The UI allows the list
  148. to be populated with a series of items, showing how AsyncTaskLoader's
  149. throttling facility can be used to control how much a Loader is refreshed
  150. in this case.</dd>
  151. </dl>
  152. <h3 id="Service">Service</h3>
  153. <dl>
  154. <dt><a href="LocalService.html">Local Service</a></dt>
  155. <dd>Demonstrate the implementation of a service that runs in the same
  156. process as its client(s). Shows how those clients can either start/stop it
  157. with Context.startService and Context.stopService, or bind and call it with
  158. Context.bindService and Context.unindService.
  159. This also shows how you can simplify working
  160. with a service when you know it will only run in your own process. The client
  161. code for interacting with the service is in
  162. <a href="LocalServiceActivities.html">Local Service Activities</a>.</dd>
  163. <dt><a href="MessengerService.html">Messenger Service</a></dt>
  164. <dd>Demonstrates binding to a Service whose interface is implemented with
  165. the Messenger class. This is often an easier way to do remote communication
  166. with a Service than using a raw AIDL interface. The client
  167. code for interacting with the service is in
  168. <a href="MessengerServiceActivities.html">Messenger Service Activities</a>.</dd>
  169. <dt><a href="RemoteService.html">Remote Service Controller and
  170. Remove Service Binding</a></dt>
  171. <dd>Demonstrates starting a service in a separate process, by assigning
  172. <code>android:process=&quot;:remote&quot;</code> to the service in the
  173. AndroidManifest.xml file. Shows how those clients can either start/stop it
  174. with Context.startService and Context.stopService, or bind and call it with
  175. Context.bindService and Context.unindService.
  176. Binding is similar to the local service sample,
  177. but illustrates the additional work (defining aidl
  178. interfaces) needed to interact with a service in another process. Also
  179. shows how a service can publish multiple interfaces and implement
  180. callbacks to its clients.</dd>
  181. <dt><a href="ServiceStartArguments.html">Service Start Arguments</a></dt>
  182. <dd>Demonstrates how you can use a Service as a job queue, where you
  183. submit jobs to it with Context.startService instead of binding to the service. Such a service
  184. automatically stops itself once all jobs have been processed. This can be
  185. a very convenient way to interact with a service when you do not need
  186. a result back from it.</dd>
  187. <dt><a href="ForegroundService.html">Foreground Service</a></dt>
  188. <dd>Shows how you
  189. can write a Service that runs in the foreground and works on both pre-2.0
  190. and post-2.0 versions of the platform. This example will selectively use
  191. the new foreground APIs that were introduced in Android 2.0 if they are
  192. available.</dd>
  193. </dl>
  194. <h3 id="Alarm">Alarm</h3>
  195. <dl>
  196. <dt><a href="AlarmController.html">Alarm Controller</a></dt>
  197. <dd>Demonstrates two ways you can schedule alarms: a one-shot alarm that
  198. will happen once at a given time, and a repeating alarm that will happen
  199. first at a given time and then continually trigger at regular intervals
  200. after that.
  201. <dl>
  202. <dt>Code:
  203. <dd> <a href="AlarmController.html">AlarmController.java</a>
  204. <dd> <a href="OneShotAlarm.html">OneShotAlarm.java</a>
  205. <dd> <a href="RepeatingAlarm.html">RepeatingAlarm.java</a>
  206. <dt>Layout:
  207. <dd> <a href="../../../../../../res/layout/alarm_controller.html">
  208. alarm_controller.xml</a>
  209. </dl>
  210. </dd>
  211. <dt><a href="AlarmService.html">Alarm Service</a></dt>
  212. <dd>Demonstrates how you can schedule an alarm that causes a service to
  213. be started. This is useful when you want to schedule alarms that initiate
  214. long-running operations, such as retrieving recent e-mails.
  215. <dl>
  216. <dt>Code:
  217. <dd> <a href="AlarmService.html">AlarmService.java</a>
  218. <dd> <a href="AlarmService_Service.html">AlarmService_Service.java</a>
  219. <dt>Layout:
  220. <dd> <a href="../../../../../../res/layout/alarm_service.html">
  221. alarm_service.xml</a>
  222. </dl>
  223. </dd>
  224. </dl>
  225. <h3 id="Notification">Notification</h3>
  226. <dl>
  227. <dt><a href="NotifyWithText.html">NotifyWithText</a></dt>
  228. <dd>Demonstrates popup notifications of varying length.</dd>
  229. <dt><a href="IncomingMessage.html">IncomingMessage</a></dt>
  230. <dd> Demonstrates sending persistent and transient notifications, with a View object in the notification. It also demonstrated inflating a View object from an XML layout resource. </dd>
  231. <dt><a href="StatusBarNotifications.html">Status Bar Notifications</a></dt>
  232. <dd> Demonstrates a variety of different notifications that can be posted in
  233. the status bar, and a standard way for handling them.</dd>
  234. </dl>
  235. <h3 id="Search">Search</h3>
  236. <dl>
  237. <dt><a href="SearchInvoke.html">SearchInvoke</a></dt>
  238. <dd>Demonstrates various ways in which activities can launch the Search UI.</dd>
  239. <dt><a href="SearchQueryResults.html">SearchQueryResults</a></dt>
  240. <dd>Demonstrates an activity that receives Search intents and handles them.</dd>
  241. <dt><a href="SearchSuggestionSampleProvider.html">SearchSuggestionSampleProvider</a></dt>
  242. <dd>Demonstrates how to configure and use the built-in "recent queries" suggestion provider.</dd>
  243. </dl>
  244. <h3 id="Misc">Misc</h3>
  245. <dl>
  246. <dt><a href="AlertDialogSamples.html">Alert Dialog Samples</a></dt>
  247. <dd>Demonstrates various styles of alert dialogs.</dd>
  248. <dt><a href="DeviceAdminSample.html">Device Admin Sample</a></dt>
  249. <dd>Demonstration of the implementation of a simple device administrator
  250. and its use of the DevicePolicyManager.</dd>
  251. </dl>