/developers/samples/android/ui/text/TextStyling-Java/app/src/main/java/com/android/example/text/styling/renderer/ |
D | MarkdownBuilder.java | 66 SpannableStringBuilder builder = new SpannableStringBuilder(); in markdownToSpans() local 68 buildSpans(markdown.getElements().get(i), builder); in markdownToSpans() local 70 return new SpannedString(builder); in markdownToSpans() 80 @NonNull final SpannableStringBuilder builder) { in buildSpans() argument 84 buildCodeBlockSpan(element, builder); in buildSpans() 87 buildQuoteSpans(element, builder); in buildSpans() 90 buildBulletPointSpans(element, builder); in buildSpans() 93 builder.append(element.getText()); in buildSpans() 99 @NonNull final SpannableStringBuilder builder) { in buildBulletPointSpans() argument 100 int startIndex = builder.length(); in buildBulletPointSpans() [all …]
|
/developers/samples/android/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/ |
D | CommonUtil.kt | 30 private fun bundleToString(builder: StringBuilder, data: Bundle) { in bundleToString() 32 builder.append("[Bundle with ").append(keySet.size).append(" keys:") in bundleToString() 34 builder.append(' ').append(key).append('=') in bundleToString() 37 bundleToString(builder, value) in bundleToString() 40 builder.append(string) in bundleToString() 43 builder.append(']') in bundleToString() 50 val builder = StringBuilder() in bundleToString() constant 51 bundleToString(builder, data) in bundleToString() 52 return builder.toString() in bundleToString()
|
/developers/samples/android/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/ |
D | Util.java | 38 private static void bundleToString(StringBuilder builder, Bundle data) { in bundleToString() argument 40 builder.append("[Bundle with ").append(keySet.size()).append(" keys:"); in bundleToString() 42 builder.append(' ').append(key).append('='); in bundleToString() 45 bundleToString(builder, (Bundle) value); in bundleToString() 47 builder.append((value instanceof Object[]) in bundleToString() 51 builder.append(']'); in bundleToString() 58 final StringBuilder builder = new StringBuilder(); in bundleToString() local 59 bundleToString(builder, data); in bundleToString() 60 return builder.toString(); in bundleToString() 82 StringBuilder builder = new StringBuilder(value.toString()).append('('); in getAutofillValueAndTypeAsString() [all …]
|
/developers/samples/android/notification/BasicNotifications/Application/src/main/java/com/example/android/basicnotifications/ |
D | MainActivity.java | 49 NotificationCompat.Builder builder = new NotificationCompat.Builder(this); in sendNotification() local 59 builder.setSmallIcon(R.drawable.ic_stat_notification); in sendNotification() 62 builder.setContentIntent(pendingIntent); in sendNotification() 66 builder.setAutoCancel(true); in sendNotification() 74 builder.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher)); in sendNotification() 85 builder.setContentTitle("BasicNotifications Sample"); in sendNotification() 86 builder.setContentText("Time to learn about notifications!"); in sendNotification() 87 builder.setSubText("Tap to view documentation about notifications."); in sendNotification() 98 notificationManager.notify(NOTIFICATION_ID, builder.build()); in sendNotification()
|
/developers/samples/android/ui/fonts/DownloadableFonts/kotlinApp/app/src/main/kotlin/com/example/android/downloadablefonts/ |
D | QueryBuilder.kt | 32 val builder = StringBuilder() in build() constant 33 builder.append("name=").append(familyName) in build() 34 weight?.let { builder.append("&weight=").append(weight) } in build() 35 width?.let { builder.append("&width=").append(width) } in build() 36 italic?.let { builder.append("&italic=").append(italic) } in build() 37 besteffort?.let { builder.append("&besteffort=").append(besteffort) } in build() 38 return builder.toString() in build()
|
/developers/samples/android/deprecated/wearable/wear/Notifications/Application/src/main/java/com/example/android/support/wearable/notifications/ |
D | NotificationPresets.java | 71 NotificationCompat.Builder builder, NotificationCompat.WearableExtender wearableOptions, in applyBasicOptions() argument 73 builder.setContentTitle(options.titlePreset) in applyBasicOptions() 78 options.actionsPreset.apply(context, builder, wearableOptions); in applyBasicOptions() 79 options.priorityPreset.apply(builder, wearableOptions); in applyBasicOptions() 81 builder.setLargeIcon(BitmapFactory.decodeResource( in applyBasicOptions() 85 builder.setLocalOnly(true); in applyBasicOptions() 88 builder.setContentIntent(NotificationUtil.getExamplePendingIntent(context, in applyBasicOptions() 92 builder.setVibrate(new long[] {0, 100, 50, 100} ); in applyBasicOptions() 94 return builder; in applyBasicOptions() 105 NotificationCompat.Builder builder = new NotificationCompat.Builder(context); in buildNotifications() local [all …]
|
D | ActionsPresets.java | 45 public void apply(Context context, NotificationCompat.Builder builder, in apply() argument 56 public void apply(Context context, NotificationCompat.Builder builder, in apply() argument 58 builder.addAction(R.drawable.ic_full_action, in apply() 72 public void apply(Context context, NotificationCompat.Builder builder, in apply() argument 74 builder.addAction(R.drawable.ic_full_action, in apply() 88 public void apply(Context context, NotificationCompat.Builder builder, in apply() argument 100 builder.addAction(action); in apply() 110 public void apply(Context context, NotificationCompat.Builder builder, in apply() argument 134 public void apply(Context context, NotificationCompat.Builder builder, in apply() argument 142 builder.addAction(phoneAction); in apply()
|
/developers/samples/android/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/util/ |
D | Util.java | 47 private static void bundleToString(StringBuilder builder, Bundle data) { in bundleToString() argument 49 builder.append("[Bundle with ").append(keySet.size()).append(" keys:"); in bundleToString() 51 builder.append(' ').append(key).append('='); in bundleToString() 54 bundleToString(builder, (Bundle) value); in bundleToString() 56 builder.append((value instanceof Object[]) in bundleToString() 60 builder.append(']'); in bundleToString() 67 final StringBuilder builder = new StringBuilder(); in bundleToString() local 68 bundleToString(builder, data); in bundleToString() 69 return builder.toString(); in bundleToString() 91 StringBuilder builder = new StringBuilder(value.toString()).append('('); in getAutofillValueAndTypeAsString() [all …]
|
D | SecurityHelper.java | 61 StringBuilder builder = new StringBuilder(bytes.length * 2); in toHexFormat() local 71 builder.append(hex.toUpperCase()); in toHexFormat() 73 builder.append(':'); in toHexFormat() 76 return builder.toString(); in toHexFormat()
|
/developers/samples/android/ui/fonts/DownloadableFonts/app/src/main/java/com/example/android/downloadablefonts/ |
D | QueryBuilder.java | 85 StringBuilder builder = new StringBuilder(); in build() local 86 builder.append("name=").append(mFamilyName); in build() 88 builder.append("&weight=").append(mWeight); in build() 91 builder.append("&width=").append(mWidth); in build() 94 builder.append("&italic=").append(mItalic); in build() 97 builder.append("&besteffort=").append(mBesteffort); in build() 99 return builder.toString(); in build()
|
/developers/samples/android/deprecated/wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/wearable/recipeassistant/ |
D | RecipeService.java | 73 NotificationCompat.Builder builder = new NotificationCompat.Builder(this); in createNotification() local 74 builder.setStyle(style); in createNotification() 75 notificationPages.add(builder.build()); in createNotification() 78 NotificationCompat.Builder builder = new NotificationCompat.Builder(this); in createNotification() local 84 builder.setLargeIcon(recipeImage); in createNotification() 86 builder.setContentTitle(mRecipe.titleText); in createNotification() 87 builder.setContentText(mRecipe.summaryText); in createNotification() 88 builder.setSmallIcon(R.mipmap.ic_notification_recipe); in createNotification() 90 Notification notification = builder in createNotification()
|
/developers/samples/android/tv/ChannelsPrograms/Application/src/main/java/com/example/android/tv/channelsprograms/util/ |
D | TvUtil.java | 91 Channel.Builder builder = new Channel.Builder(); in createChannel() local 92 builder.setType(TvContractCompat.Channels.TYPE_PREVIEW) in createChannel() 102 builder.build().toContentValues()); in createChannel() 159 JobInfo.Builder builder = new JobInfo.Builder(1, componentName); in scheduleSyncingChannel() local 160 builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY); in scheduleSyncingChannel() 166 scheduler.schedule(builder.build()); in scheduleSyncingChannel() 179 JobInfo.Builder builder = in scheduleSyncingProgramsForChannel() local 186 builder.addTriggerContentUri(triggerContentUri); in scheduleSyncingProgramsForChannel() 187 builder.setTriggerContentMaxDelay(0L); in scheduleSyncingProgramsForChannel() 188 builder.setTriggerContentUpdateDelay(0L); in scheduleSyncingProgramsForChannel() [all …]
|
/developers/samples/android/media/HdrViewfinder/Application/src/main/java/com/example/android/hdrviewfinder/ |
D | MessageDialogFragment.java | 49 AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); in onCreateDialog() local 50 builder.setPositiveButton(android.R.string.ok, null); in onCreateDialog() 53 builder.setMessage(args.getInt(ARG_MESSAGE_INT)); in onCreateDialog() 55 builder.setMessage(args.getString(ARG_MESSAGE_STRING)); in onCreateDialog() 57 return builder.create(); in onCreateDialog()
|
/developers/samples/android/notification/CustomNotifications/Application/src/main/java/com/example/android/customnotifications/ |
D | MainActivity.java | 46 NotificationCompat.Builder builder = new NotificationCompat.Builder(this); in createNotification() local 55 builder.setContentIntent(intent); in createNotification() 60 builder.setTicker(getResources().getString(R.string.custom_notification)); in createNotification() 63 builder.setSmallIcon(R.drawable.ic_stat_custom); in createNotification() 68 builder.setAutoCancel(true); in createNotification() 71 Notification notification = builder.build(); in createNotification()
|
/developers/samples/android/ui/text/TextStyling-Java/app/src/androidTest/java/com/android/example/text/styling/renderer/ |
D | MarkdownBuilderTest.java | 38 private MarkdownBuilder builder; field in MarkdownBuilderTest 45 builder = new MarkdownBuilder(bulletPointColor, codeBackgroundColor, codeBlockTypeface, in MarkdownBuilderTest() 50 public void builder() { in builder() method in MarkdownBuilderTest 51 SpannedString result = builder.markdownToSpans("Hello, world!"); in builder() 57 SpannedString result = builder.markdownToSpans("Text"); in text() 65 SpannedString result = builder.markdownToSpans("Text\n> Quote"); in textWithQuote() 85 SpannedString result = builder.markdownToSpans("Points\n* one\n+ two"); in textWithBulletPoints() 101 SpannedString result = builder.markdownToSpans("Text `code`"); in textWithCode()
|
/developers/samples/android/connectivity/sync/BasicSyncAdapter/Application/src/main/java/com/example/android/basicsyncadapter/provider/ |
D | FeedProvider.java | 95 SelectionBuilder builder = new SelectionBuilder(); in query() local 101 builder.where(FeedContract.Entry._ID + "=?", id); in query() 104 builder.table(FeedContract.Entry.TABLE_NAME) in query() 106 Cursor c = builder.query(db, projection, sortOrder); in query() 149 SelectionBuilder builder = new SelectionBuilder(); in delete() local 155 count = builder.table(FeedContract.Entry.TABLE_NAME) in delete() 161 count = builder.table(FeedContract.Entry.TABLE_NAME) in delete() 181 SelectionBuilder builder = new SelectionBuilder(); in update() local 187 count = builder.table(FeedContract.Entry.TABLE_NAME) in update() 193 count = builder.table(FeedContract.Entry.TABLE_NAME) in update()
|
/developers/samples/android/ui/text/TextStyling-Kotlin/app/src/androidTest/java/com/android/example/text/styling/renderer/ |
D | MarkdownBuilderTest.kt | 40 private val builder = MarkdownBuilder(bulletPointColor, codeBackgroundColor, codeBlockTypeface, constant 43 @Test fun builder() { in builder() method in com.android.example.text.styling.renderer.MarkdownBuilderTest 44 val result = builder.markdownToSpans("Hello, world!") in builder() 49 val result = builder.markdownToSpans("Text") in text() 56 val result = builder.markdownToSpans("Text\n> Quote") in textWithQuote() 75 val result = builder.markdownToSpans("Points\n* one\n+ two") in textWithBulletPoints() 90 val result = builder.markdownToSpans("Text `code`") in textWithCode()
|
/developers/samples/android/notification/Bubbles/app/src/main/java/com/example/android/bubbles/data/ |
D | Chat.kt | 39 fun addMessage(builder: Message.Builder) { in <lambda>() 40 builder.id = _messages.last().id + 1 in <lambda>() 41 _messages.add(builder.build()) in <lambda>()
|
/developers/samples/android/background/JobScheduler/kotlinApp/app/src/main/java/com/example/android/jobscheduler/ |
D | MainActivity.kt | 98 val builder = JobInfo.Builder(jobId++, serviceComponent) in scheduleJob() constant 102 builder.setMinimumLatency(delay.toLong() * TimeUnit.SECONDS.toMillis(1)) in scheduleJob() 107 builder.setOverrideDeadline(deadline.toLong() * TimeUnit.SECONDS.toMillis(1)) in scheduleJob() 111 builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_UNMETERED) in scheduleJob() 113 builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY) in scheduleJob() 123 builder.run { in scheduleJob() 131 (getSystemService(Context.JOB_SCHEDULER_SERVICE) as JobScheduler).schedule(builder.build()) in scheduleJob()
|
/developers/samples/android/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/data/adapter/ |
D | DatasetAdapter.java | 110 FieldType fieldType, Dataset.Builder builder) { in bindDatasetToFocusedNode() argument 114 bindValueToNode(node, field, builder, setValueAtLeastOnce); in bindDatasetToFocusedNode() 123 Dataset.Builder builder, MutableBoolean setValueAtLeastOnce) { in parseAutofillFields() argument 138 bindValueToNode(viewNode, field, builder, setValueAtLeastOnce); in parseAutofillFields() 142 FilledAutofillField field, Dataset.Builder builder, in bindValueToNode() argument 158 builder.setValue(autofillId, AutofillValue.forList(listValue)); in bindValueToNode() 165 builder.setValue(autofillId, AutofillValue.forDate(dateValue)); in bindValueToNode() 172 builder.setValue(autofillId, AutofillValue.forText(textValue)); in bindValueToNode() 179 builder.setValue(autofillId, AutofillValue.forToggle(toggleValue)); in bindValueToNode()
|
/developers/samples/android/wearable/wear/WearNotifications/Wearable/src/main/java/com/example/android/wearable/wear/wearnotifications/ |
D | GlobalNotificationBuilder.java | 53 public static void setNotificationCompatBuilderInstance(NotificationCompat.Builder builder) { in setNotificationCompatBuilderInstance() argument 54 sGlobalNotificationCompatBuilder = builder; in setNotificationCompatBuilderInstance()
|
/developers/samples/android/wearable/wear/WearNotifications/Application/src/main/java/com/example/android/wearable/wear/wearnotifications/ |
D | GlobalNotificationBuilder.java | 53 public static void setNotificationCompatBuilderInstance (NotificationCompat.Builder builder) { in setNotificationCompatBuilderInstance() argument 54 sGlobalNotificationCompatBuilder = builder; in setNotificationCompatBuilderInstance()
|
/developers/samples/android/wearable/wear/WearAccessibilityApp/Wearable/src/main/java/com/example/android/wearable/wear/wearaccessibilityapp/ |
D | GlobalNotificationBuilder.java | 53 public static void setNotificationCompatBuilderInstance(NotificationCompat.Builder builder) { in setNotificationCompatBuilderInstance() argument 54 sGlobalNotificationCompatBuilder = builder; in setNotificationCompatBuilderInstance()
|
/developers/samples/android/media/MediaBrowserService/Application/src/main/java/com/example/android/mediasession/service/notifications/ |
D | MediaNotificationManager.java | 120 NotificationCompat.Builder builder = in getNotification() local 122 return builder.build(); in getNotification() 135 NotificationCompat.Builder builder = new NotificationCompat.Builder(mService, CHANNEL_ID); in buildNotification() local 136 builder.setStyle( in buildNotification() 164 builder.addAction(mPrevAction); in buildNotification() 167 builder.addAction(isPlaying ? mPauseAction : mPlayAction); in buildNotification() 171 builder.addAction(mNextAction); in buildNotification() 174 return builder; in buildNotification()
|
/developers/samples/android/background/JobScheduler/Application/src/main/java/com/example/android/jobscheduler/ |
D | MainActivity.java | 124 JobInfo.Builder builder = new JobInfo.Builder(mJobId++, mServiceComponent); in scheduleJob() local 128 builder.setMinimumLatency(Long.valueOf(delay) * 1000); in scheduleJob() 132 builder.setOverrideDeadline(Long.valueOf(deadline) * 1000); in scheduleJob() 137 builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_UNMETERED); in scheduleJob() 139 builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY); in scheduleJob() 141 builder.setRequiresDeviceIdle(mRequiresIdleCheckbox.isChecked()); in scheduleJob() 142 builder.setRequiresCharging(mRequiresChargingCheckBox.isChecked()); in scheduleJob() 152 builder.setExtras(extras); in scheduleJob() 157 tm.schedule(builder.build()); in scheduleJob()
|