OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package android.support.customtabs; | 5 package android.support.customtabs; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.app.ActivityOptions; | 8 import android.app.ActivityOptions; |
9 import android.app.PendingIntent; | 9 import android.app.PendingIntent; |
10 import android.content.Intent; | 10 import android.content.Intent; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 * <p> | 51 * <p> |
52 * The data associated with this extra can be either a bundle or an {@link A
rrayList} of | 52 * The data associated with this extra can be either a bundle or an {@link A
rrayList} of |
53 * bundles. If an {@link ArrayList} is given, only the bundle with the id of | 53 * bundles. If an {@link ArrayList} is given, only the bundle with the id of |
54 * {@link #TOOLBAR_ACTION_BUTTON_ID} will be displayed on toolbar; the rest
will be put on a | 54 * {@link #TOOLBAR_ACTION_BUTTON_ID} will be displayed on toolbar; the rest
will be put on a |
55 * bottom bar. | 55 * bottom bar. |
56 */ | 56 */ |
57 public static final String EXTRA_ACTION_BUTTON_BUNDLE = | 57 public static final String EXTRA_ACTION_BUTTON_BUNDLE = |
58 "android.support.customtabs.extra.ACTION_BUTTON_BUNDLE"; | 58 "android.support.customtabs.extra.ACTION_BUTTON_BUNDLE"; |
59 | 59 |
60 /** | 60 /** |
| 61 * List<Bundle> used for adding items to the top and bottom action bars. The
client should |
| 62 * provide an ID, a description, an icon {@link Bitmap} for each item. They
may also provide a |
| 63 * {@link PendingIntent} if the item is a button. |
| 64 */ |
| 65 public static final String EXTRA_ACTION_BAR_ITEMS = |
| 66 "android.support.customtabs.extra.ACTION_BAR_ITEMS"; |
| 67 |
| 68 /** |
61 * Key that specifies the {@link Bitmap} to be used as the image source for
the action button. | 69 * Key that specifies the {@link Bitmap} to be used as the image source for
the action button. |
62 */ | 70 */ |
63 public static final String KEY_ICON = "android.support.customtabs.customacti
on.ICON"; | 71 public static final String KEY_ICON = "android.support.customtabs.customacti
on.ICON"; |
64 | 72 |
65 /** | 73 /** |
66 * Key that specifies the content description for the custom action button. | 74 * Key that specifies the content description for the custom action button. |
67 */ | 75 */ |
68 public static final String KEY_DESCRIPTION = | 76 public static final String KEY_DESCRIPTION = |
69 "android.support.customtabs.customaction.DESCRIPTION"; | 77 "android.support.customtabs.customaction.DESCRIPTION"; |
70 | 78 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 Bundle.class.getMethod("putIBinder", String.class, IBind
er.class); | 186 Bundle.class.getMethod("putIBinder", String.class, IBind
er.class); |
179 putBinderMethod.invoke(bundle, key, binder); | 187 putBinderMethod.invoke(bundle, key, binder); |
180 } | 188 } |
181 } catch (InvocationTargetException | IllegalAccessException | IllegalArg
umentException | 189 } catch (InvocationTargetException | IllegalAccessException | IllegalArg
umentException |
182 | NoSuchMethodException e) { | 190 | NoSuchMethodException e) { |
183 return false; | 191 return false; |
184 } | 192 } |
185 return true; | 193 return true; |
186 } | 194 } |
187 } | 195 } |
OLD | NEW |