Commit Graph

46 Commits

Author SHA1 Message Date
Scott Main
138f3a3139 add nav drawer sample
Change-Id: I561c7577554c587b4ecacfc6f22fc2beefce27b1
2013-05-10 13:16:09 -07:00
Scott Main
d49fbdbcc1 add support library JAR to sample
Change-Id: I15c30e19606a0b3415d5883bced4c2f56fd703fa
2013-03-22 09:53:15 -07:00
Adam Koch
90808a363f am bc1a645f: Contacts Provider Training Class - Sample App Initial Commit This is the sample app for the Contacts Provider Android training class. It\'s a basic master/detail view with a list of contacts in the master and contact name, photo and mailing addresses in th
* commit 'bc1a645f26a30fd95e68043b608038537b7c798f':
  Contacts Provider Training Class - Sample App Initial Commit This is the sample app for the Contacts Provider Android training class. It's a basic master/detail view with a list of contacts in the master and contact name, photo and mailing addresses in the detail. This sample app is backward compatible to API level 7 and also optimized for all screen sizes.
2013-03-19 11:25:44 -07:00
Adam Koch
bc1a645f26 Contacts Provider Training Class - Sample App Initial Commit
This is the sample app for the Contacts Provider Android training
class. It's a basic master/detail view with a list of contacts in the
master and contact name, photo and mailing addresses in the detail.
This sample app is backward compatible to API level 7 and also
optimized for all screen sizes.

Change-Id: I83fe6beae9fd4c3fe710426b7dd0863e094cbc89
2013-03-19 12:40:00 -04:00
Roman Nurik
85364937ce Add InteractiveChart sample code for update to Gestures training class.
Change-Id: I1e245cd6735d54603174045ca557057763861469
2013-03-11 16:22:53 -07:00
Adam Koch
5f51b7fb0c Bitmapfun Sample: Add some docs and clean up some method naming.
Change-Id: I12dc039b1084a8f1a27b47a5a516773ab4e1c2cb
2013-02-21 11:00:19 -05:00
Adam Koch
e826ee24ec Merge "Bitmapfun Sample: Add additional sample images." into jb-mr1-dev 2013-02-21 14:03:07 +00:00
Adam Koch
ec4b4c4188 Bitmapfun Sample: Add additional sample images.
Add a larger number of sample images so it's easier to see the result
of the various bitmap optimizations.

Change-Id: Ieef04a1cd4dc6cf1fa165baa0a6f8d4750b58d71
2013-02-20 15:08:06 -05:00
Chris Banes
3b7f23f881 bitmapfun: Add support to use inBitmap option
This adds support for devices running Honeycomb or newer
to use the inBitmap BitmapFactory option when decoding images. The way
it accomplishes this is by adding a second level 'memory cache' using
SoftReferences. When an item is removed from the LruCache it is added
to this SoftReference Set. The next time an image is decoded, the Set
is searched to see if it contains a bitmap that can be re-used.

Change-Id: I8f980160ddc7116731b25e6f3f110c38f207f286
Signed-off-by: Chris Banes <chrisbanes@google.com>
2013-02-13 13:19:09 +00:00
Chris Banes
4d6574e878 Update bitmapfun sample to call recycle()
A new sub-class of BitmapDrawable has been created which tracks
when it is being used or cached when running on Gingerbread or
older. A new ImageView subclass has been added to accomplish this,
as well as changes to the LruCache.

Change-Id: I95d3334684703aebb6b09fcd56194cf73e3c2dcf
Signed-off-by: Chris Banes <chrisbanes@google.com>
2013-02-06 16:21:21 +00:00
Adam Koch
2e5555e04b Bitmapfun Sample: Fix bug where background image loading could hang
Background image loading is paused when the GridView is scrolling,
if the activity is destroyed during a scroll the image loading was
not unpaused causing it to remain running indefinitely. This change
makes sure the background image loading is unpaused.

Change-Id: Iad8093fc2af50fcfc1416c5d9089db0c064711cf
2013-01-28 12:20:42 -05:00
Adam Koch
b8a61acb07 Bitmapfun Sample: Change cache memory calculation to use maxMemory()
When calculating memory cache size, use Runtime.maxMemory() instead
of getMemoryClass() which is a more accurate value of available VM
heap size.

Also bump target and build SDK to 17.

Bug: 7988323
Change-Id: I4b94688b3800d958ffbe03ee9a2a620982483d3d
2013-01-11 16:51:09 -05:00
Adam Koch
6acfaccc50 Bitmapfun Sample: Fix inSampleSize selection and update dependencies
When computing inSampleSize, calculateInSampleSize() needs to compare
height/width ratios, rather than raw values.

Also updating support library JAR to latest version.

Bug: 7951398
Change-Id: Id15dbcc105bbd2bbf8e03883aeba780da6f807eb
2013-01-09 16:12:52 -05:00
Katie McCormick
65cc8b78a8 Network sample: fix typo in manifest
Change-Id: I5731dbb89d17bd15bc72a2f140bca2915976b4c1
2013-01-04 16:04:23 -08:00
Joe Malin
50600ba5d6 am a525bf71: am 1e083591: am 2c063c88: Android Training: Threads sample app
* commit 'a525bf719545fc315d03c1c6ee74f61e8dda03e0':
  Android Training: Threads sample app
2012-12-13 11:00:59 -08:00
Joe Malin
2c063c889a Android Training: Threads sample app
Change-Id: I6d07871acad31807eb4bf06aa8406b722320680c
2012-12-12 10:47:58 -08:00
kmccormick@google.com
ab85a2a59a am d77ac2b9: am 80e0ac6a: am 70db2b6b: Merge "Doc change: sample app for Notifications class" into jb-dev-docs
* commit 'd77ac2b955ff5adf68f7437bb286c3e02430f896':
  Doc change: sample app for Notifications class
2012-11-27 11:25:27 -08:00
&& repo sync -j8
fc0d593056 Doc change: sample app for Notifications class
Change-Id: Iaa45156f333e5b8e9bc9cc596900835540ff138e
2012-11-26 16:56:34 -08:00
Katie McCormick
99ca344b23 cherrypick from ics-mr1 docs: network sample Change-Id: If50f407a0e56fa802fe9beedaa650e3a131872b2
Change-Id: I60235aa3e80974f2c3000760853f0159cf41cfa5
2012-11-05 14:52:30 -08:00
Roman Nurik
01be9fd4c0 AnimationsDemo sample code for Animations training class.
Change-Id: I0fbf3c2f66ee4321adcc0c0bf3fe7f4b4e67584e
2012-10-25 12:59:24 -07:00
Adam Koch
a4877aed76 Merge "Updating code sample for "displaying bitmaps efficiently" training class. Changes: -Use updated versions of ImageWorker & ImageCache from I/O 2012 app -Use copied DiskLruCache from system (rather than custom) -Use copied AsyncTask from system (to keep behavior consistent) -Ensure no strict mode violations or lint errors -Other misc bug fixes -Move single-use static methods in Utils to corresponding class" into jb-dev 2012-08-28 07:42:11 -07:00
Adam Koch
03ceb37f79 Updating code sample for "displaying bitmaps efficiently" training class.
Changes:
 -Use updated versions of ImageWorker & ImageCache from I/O 2012 app
 -Use copied DiskLruCache from system (rather than custom)
 -Use copied AsyncTask from system (to keep behavior consistent)
 -Ensure no strict mode violations or lint errors
 -Other misc bug fixes
 -Move single-use static methods in Utils to corresponding class

Change-Id: If21e045db1e1a80391169f3c9c9258d48345ab6b
2012-08-23 16:41:05 -04:00
Roman Nurik
d80ee02011 Retroactively add EffectiveNavigation and TabCompat sample code.
This sample code was launched with the Implementing Effective Navigation and
Creating Backward-Compatible UIs training classes, but the source was never
added to AOSP. This retroactively adds the source, unmodified.

Change-Id: If6face5a0548107f7fd273e466b1ced2790f4f3a
2012-08-22 08:05:28 -07:00
Scott Main
826be7b0f9 remove all zip files for training class samples.
They're now at frameworks/base/docs/downloads/

Change-Id: I3a82edcc73196dfc8ffc6a1e4d172925d5581157
2012-08-07 15:13:23 -07:00
Scott Main
d0f75a5ae3 docs: move all ZIP files for training classes here, originally
from the html/shareables/ directory to save space on the developer site.

Change-Id: I545e0002215b17aa0a2e8e261591652046308210
2012-07-25 14:51:20 -07:00
Alexander Lucas
8a8046a918 Initial commit of NsdChat application
Change-Id: I157ddfe38b79f01e72e8b52fa16d666c92f08254
2012-06-18 16:25:19 -07:00
Scott Main
1583b7c603 Delete the fragment-UI sample in favor of the FragmentBasics sample
for the 101 training class on fragments

Change-Id: I3289e3f4d74869956ee20a5b817a469cce885018
2012-04-19 16:49:16 -07:00
Scott Main
ff329d74fc Merge "Rename the activity lifecycle sample's directory" into ics-mr1 2012-04-19 16:47:27 -07:00
Scott Main
d573ba579b Rename the activity lifecycle sample's directory
Change-Id: I76c27dfbead6462b0bdfc3b58e24b0fe96d8272f
2012-04-19 16:46:14 -07:00
Scott Main
ba1636e425 Add new sample for 101 class on fragments.
The app has a fragment with a list that shows a couple phony
article names and a fragment that displays the phony articles.
They appear side by side on a large screen, but one at a time on smaller screens.

Change-Id: Ic78b772e1c8d1ddbfa6fa3fdb0b54a2363951063
2012-04-19 16:18:16 -07:00
Fred Chung
16266ff711 Updated "Making your App Location Aware" class to include information on location provider enable check.
Change-Id: I97e0a6b02bccbfbdc5697953d2d8b63cb6089370
2012-04-16 23:26:40 -07:00
Scott Main
cbece7322a Merge "Sample app for Android U class: Displaying Bitmaps Efficiently" into ics-mr1 2012-04-05 11:29:42 -07:00
Trevor Johns
a539e4e377 Update activity-lifecycle sample: Use unique package name
Changing the package name for activity-lifecycle sample from
com.example.android to com.example.android.lifecycle.

Change-Id: I8c17762fde0895408da0b2e1b17b425bcb9e7abb
2012-04-04 17:21:53 -07:00
Scott Main
dfd2ae2278 Merge "uploading sample code for AU class on Activity Lifecycle" into ics-mr1 2012-04-04 16:25:14 -07:00
Scott Main
96f6139c59 Merge "first draft of sample code for AU basic training class on fragments" into ics-mr1 2012-04-04 16:22:49 -07:00
Fred Chung
137dce1528 Sample app for Android Training lesson: Making your app location aware.
Change-Id: I205a9e3f98823fbd90c5b770de8fe6ce8a9e345b
2012-04-03 22:46:10 -07:00
Billy Rutledge
87a714c17c uploading sample code for AU class on Activity Lifecycle
Change-Id: Ieefd55823eaa7ce7042a5dd8739a8ab7c4b992fc
2012-04-03 20:39:32 -07:00
Adam Koch
2bab0137e0 Sample app for Android U class: Displaying Bitmaps Efficiently
Change-Id: I21da4e60f719b7159ada83894cca8d108bedd3d5
2012-04-03 23:15:18 -04:00
Billy Rutledge
d2d0d4feb2 first draft of sample code for AU basic training class on fragments
Change-Id: I15b04de5e63ecbfaa1d911a2070c5c0b01542211
2012-04-03 20:10:48 -07:00
Megha Joshi
52b557155b Adding values-large-land and values-large-port folders.
This is so that I can replace xlarge with large in
training/multiscreen/screensizes.html for it to be compatible with TVs as well.

Change-Id: I7685f4c51dc01ac76c98318d3ee48c73402bf848
2012-03-07 16:04:24 -08:00
Scott Main
e97475210a Merge "Sample code for Android U lesson: Monetization - Ads without Compromising User Experience." into ics-mr0 2011-12-15 10:12:19 -08:00
Scott Main
d46d8577a8 Merge "Sample app for Android U lesson: Building apps for enterprise - Device administration." into ics-mr0 2011-12-15 10:11:55 -08:00
Fred Chung
b9c12ba27b Sample app for Android U lesson: Building apps for enterprise - Device administration.
Change-Id: Ie4fbc26be45c32d19a94faed68d9f4070a96c1d7
2011-12-14 20:08:51 -08:00
Fred Chung
df52a4cafe Sample code for Android U lesson: Monetization - Ads without Compromising User Experience.
Change-Id: I6b077c24f71c00e99fe6e15da127b02707ad57f3
2011-12-13 15:39:35 -08:00
Scott Main
442088151c revisions to NewsReader sample app for AndroidU.
Clean up XML markup for clean rendering in HTML docs;
Change string resources for two-pane mode to bools;
Rename resource files w/ layout info from main.xml to layouts.xml.
Add support lib
Add HTML page

Change-Id: I88fc5cedb8f11dae9de019ba75593de2027de231
2011-12-12 16:28:27 -08:00
Bruno Oliveira
4ea24bff40 cherrypick from master cl Change-Id: I45f91fd9cfe0cb89789017deec63565e4757063e
Adding the NewsReader sample.

This sample demonstrates how to design a UI for multiple screens and
is part of the "Designing for Multiple Screens" AndroidU lesson.

Change-Id: I462261933c68b3a40f9611fcf7153c25abdfcd5d
2011-12-09 11:55:36 -08:00