/developers/samples/android/deprecated/wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/wearable/recipeassistant/ |
D | AssetUtils.java | 36 InputStream is = context.getAssets().open(asset); in loadAsset() local 37 int size = is.available(); in loadAsset() 39 is.read(buffer); in loadAsset() 40 is.close(); in loadAsset() 59 InputStream is = null; in loadBitmapAsset() local 62 is = context.getAssets().open(asset); in loadBitmapAsset() 63 if (is != null) { in loadBitmapAsset() 64 bitmap = BitmapFactory.decodeStream(is); in loadBitmapAsset() 69 if (is != null) { in loadBitmapAsset() 71 is.close(); in loadBitmapAsset()
|
/developers/samples/android/deprecated/wearable/wear/Quiz/Application/src/main/java/com/example/android/wearable/quiz/ |
D | JsonUtils.java | 39 InputStream is = context.getAssets().open(fileName); in loadJsonFile() local 40 int size = is.available(); in loadJsonFile() 42 is.read(buffer); in loadJsonFile() 43 is.close(); in loadJsonFile()
|
/developers/samples/android/notification/MessagingService/ |
D | README.md | 10 when the notification is presented there. 11 Note: Each unread conversation from a user is sent as a distinct 21 is automotive enabled. 41 MessagingFragment is shown to the user. Depending on the button clicked, the MessagingService is 45 When a message is read, the associated PendingIntent is triggered and MessageReadReceiver is called 46 with the appropriate conversationId. Similarly, when a reply is received, the MessageReplyReceiver 47 is called with the appropriate conversationId. MessageLogger logs each event and shows them in a 95 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/samples/android/media/HdrViewfinder/ |
D | README.md | 7 compositing together the latest two frames whenever a new frame is captured. 16 frames, and then compositing together the latest two frames whenever a new frame is 30 The HDR fusion and the split-screen viewfinder processing is done with RenderScript; as is the 33 fused/composited, a standard YUV->RGB color transform is applied before the the data is written 34 to the output Allocation. The HDR fusion algorithm is very simple, and tends to result in 37 Data is passed between the subsystems (camera, RenderScript, and display) using the 88 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/samples/android/ui/window/DragAndDropAcrossApps/ |
D | README.md | 21 Which gesture or action triggers this is up to you as an app developer. 28 is down while the drag is starting, and the most recent touch/click 29 position is used as the original position of the drag shadow. 35 By default a drag and drop operation is constrained by the window 41 If a Uri requiring permission grants is being sent, then the 47 until the activity is alive, or until the `release()` method is called on the 95 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/samples/android/sensors/BatchStepSensor/ |
D | README.md | 18 event when a step is detected, while the step counter returns the total number of 21 Both sensors only count steps while a listener is registered. This sample only covers the 22 basic case, where a listener is only registered while the app is running. Likewise, 23 batched sensors can be used in the background (when the CPU is suspended), which 24 requires manually flushing the [sensor event][3] queue before it overflows, which is not 76 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/samples/android/connectivity/network/NetworkConnect/ |
D | README.md | 6 HttpsURLConnection. AsyncTask is used to perform the fetch on a background thread. 12 [`HttpsURLConnection`][4]. Since API 11, it is required by default that all network 14 when the network response is ready should the work return to the main thread to update 15 the UI. An [`AsyncTask`][3] is a viable background task manager that is used to perform 19 a network connection, and if so, what type of connection it is. 76 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/samples/android/ui/transition/BasicTransition/ |
D | README.md | 12 A Scene is an encapsulation of the state of a view hierarchy, 16 scene dynamically as it is entered. 18 A Transition is a mechanism to automatically animate changes that 19 occur when a new scene is entered. Some transition capabilities are 20 automatic. That is, entering a scene may cause animations to run which 29 TransitionManager is used to specify custom transitions for particular 78 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/samples/android/media/PictureInPicture/kotlinApp/ |
D | README.md | 5 The sample plays a video. The video keeps on playing when the app is turned in to 12 As of Android O, activities can launch in [Picture-in-Picture (PiP)][1] mode. PiP is a 15 The app is *paused* when it enters PiP mode, but it should continue showing content. For this 27 activity should behave when it is in PiP mode. You can also use it to call 28 [setPictureInPictureParams()][8] and update the current behavior. If the app is in not PiP mode, it 32 available for PiP mode. The aspect ratio is used when the activity is in PiP mode. The action items 34 item is selected. 91 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/templates/create/_MODULE_/ |
D | build.gradle.ftl | 12 distributed under the License is distributed on an "AS IS" BASIS, 18 <#-- This build script is a bootstrapper for the "real" android build script that 19 is contained in templates/base. It includes only what's necessary for Android Studio 37 <#-- Note that target SDK is hardcoded in this template. We expect all samples
|
/developers/build/templates/CardStream/_MODULE_/src/template/java/_PACKAGE_/cardstream/ |
D | CardStreamAnimator.java.ftl | 12 distributed under the License is distributed on an "AS IS" BASIS, 49 * Define disappearing animation of a child which fired when a view is removed programmatically 57 * Define appearing animation of a child which fired when a view is added programmatically 66 * which fired when a view is not moved enough to be removed. 77 * which fired when a view is removing by a user swipe action. 87 * A simple CardStreamAnimator implementation which is used to turn animations off.
|
/developers/build/templates/create/ |
D | template-params.xml.ftl | 12 distributed under the License is distributed on an "AS IS" BASIS, 32 Introductory text that explains what the sample is intended to demonstrate. Edit 54 <!-- Most samples just need to udpate the Categories field. This is a comma- 63 <!-- Beginner is for "getting started" type content, or essential content. 66 Intermediate is for content that covers material a beginner doesn't need 67 to know, but that a skilled developer is expected to know. 70 Advanced is for highly technical content geared towards experienced developers. 73 Expert is reserved for highly technical or specialized content, and should
|
/developers/samples/android/connectivity/wifidirect/DirectP2P/Application/src/main/java/com/example/android/wifidirectp2p/ |
D | FileTransferService.java | 61 InputStream is = null; in onHandleIntent() local 63 is = cr.openInputStream(Uri.parse(fileUri)); in onHandleIntent() 67 DeviceDetailFragment.copyFile(is, stream); in onHandleIntent()
|
/developers/samples/android/ui/fonts/DownloadableFonts/kotlinApp/ |
D | README.md | 5 Downloadable Fonts is a feature that allows apps to request a certain font from a provider 6 instead of bundling it or downloading it themselves. This means, there is no need to bundle the 24 The third parameter is a query string about the requested font. The syntax of the query is defined 33 corresponding classes in the framework, but the feature is available back to API level 14 if you 47 meta-data tag in the AndroidManifest, you can avoid the delay until the font is downloaded by the 67 You can sign up for the beta program so that the beta version of Google Play Services is 69 If you have Google Play Services whose version number is equal or above 11.x.x, that means you 121 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/samples/android/input/autofill/AutofillFramework/kotlinApp/ |
D | README.md | 1 Warning: This sample is currently outdated and you should reference the Java version instead. 13 **IMPORTANT:** The Kotlin version of this sample is temporarily out of date. Until this is correcte… 20 will only have one service as default at a time, and there is just a small number of 3rd-party apps 23 and 2) optimize their autofill performance. Most of the time, there is little to no extra code 26 The sample's Autofill service is implemented to parse the client's view hierarchy in search of 30 `importantForAutofill` specifies whether the view is autofillable. `autofillHints` is a list of 34 receive (i.e. a list index, a date, or a string). Specifying `autofillType` is only necessary 44 **Note:** This sample service stores all autofill data in SharedPreferences and thus is not secure. 52 child views. Supporting autofill on these child views is a little more involved. 72 to provide the virtual view hierarchy to the Autofill service. This is done out of the box for [all …]
|
/developers/build/templates/base/_MODULE_/ |
D | build.gradle.ftl | 11 distributed under the License is distributed on an "AS IS" BASIS, 41 <#-- TODO (jewalker): Revise once androidX is released to production. --> 64 <#-- Output dependency after checking if it is a play services depdency and 80 <#-- TODO (jewalker): Revise once androidX is released to production. --> 96 'template'] // boilerplate code that is generated by the sample template process 99 <#-- Note that target SDK is hardcoded in this template. We expect all samples
|
/developers/build/templates/WearPlusShared/_MODULE_/ |
D | build.gradle.ftl | 11 distributed under the License is distributed on an "AS IS" BASIS, 41 <#-- Output dependency after checking if it is a play services depdency and 50 <#-- TODO (jewalker): Revise once androidX is released to production. --> 65 'template'] // boilerplate code that is generated by the sample template process
|
/developers/build/templates/base-application/_MODULE_/ |
D | build.gradle.ftl | 11 distributed under the License is distributed on an "AS IS" BASIS, 41 <#-- TODO (jewalker): Revise once androidX is released to production. --> 59 <#-- Output dependency after checking if it is a play services depdency and 75 'template'] // boilerplate code that is generated by the sample template process 78 <#-- Note that target SDK is hardcoded in this template. We expect all samples
|
/developers/samples/android/ui/views/SlidingTabs/SlidingTabsColors/ |
D | README.md | 11 This sample consists of a custom [HorizontalScrollView][1] called `SlidingTabLayout` that is used 15 The colors can be customized in two ways. The first and simplest is to provide an 16 array of colors and the alternative is via the `TabColorizer` interface which gives 17 complete control over which color is used for any individual position. 70 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/templates/include/ |
D | common.ftl | 12 distributed under the License is distributed on an "AS IS" BASIS, 23 <#-- Set the compile SDK version. This is more complicated than it should be, because 25 both to see if the variable is empty. Note that to freemarker, all values from 44 <#-- Set the MinSDK version. This is more complicated than it should be, because 46 both to see if the variable is empty. Note that to freemarker, all values from 68 <#-- Check if dependency is a play services dependency and if it doesn't
|
/developers/samples/android/ui/actionbar/DoneBar/ |
D | README.md | 6 2 alternative layouts. This is well suited for simple data entry activities, where the only 13 …r even recommended, as using a menu xml file is all that is needed to add action icons to it. Howe… 14 possible to use a custom view and it is useful in some cases. 76 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/samples/android/renderScript/BasicRenderScript/ |
D | README.md | 12 [RenderScript][1] is a framework for running computationally intensive tasks at high performance on… 18 RenderScript is especially useful for applications performing image processing, computational photo… 22 manipulation. In this case, each pixel is transformed based on a liner interpolation between its or… 73 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/samples/android/ui/DrawableTinting/ |
D | README.md | 8 Tinting is set on a nine-patch drawable through the "tint" and "tintMode" parameters. 9 A color state list is referenced as the tint color, which defines colors for different 12 Programmatically, tinting is applied to a Drawable through its "setColorFilter" method, 56 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/samples/android/connectivity/network/BasicNetworking/ |
D | README.md | 11 a network connection, and if so, what type of connection it is. 13 A [`NetworkInfo`][2] object is retrieved from the ConnectivityManager, which contains information 14 on the active connection, and then the connection type is printed to an on-screen console. 67 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
/developers/build/templates/create/_MODULE_/src/androidTest/java/_PACKAGE_/test/ |
D | SampleTests.java.ftl | 11 * distributed under the License is distributed on an "AS IS" BASIS, 53 assertNotNull("mTestActivity is null", mTestActivity); 54 assertNotNull("mTestFragment is null", mTestFragment);
|