OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 org.chromium.content.app; | 5 package org.chromium.content.app; |
6 | 6 |
7 import java.lang.reflect.Field; | 7 import java.lang.reflect.Field; |
8 import java.lang.reflect.Modifier; | 8 import java.lang.reflect.Modifier; |
9 | 9 |
10 /** | 10 /** |
11 * Interface to list and expose any required Android app resources. | 11 * Interface to list and expose any required Android app resources. |
12 * All resources must be registered before instantiating ContentView objects. | 12 * All resources must be registered before instantiating ContentView objects. |
13 */ | 13 */ |
14 public class AppResource { | 14 public class AppResource { |
15 /** Array resource containing the official command line arguments. */ | 15 /** Array resource containing the official command line arguments. */ |
16 public static int ARRAY_OFFICIAL_COMMAND_LINE; | 16 public static int ARRAY_OFFICIAL_COMMAND_LINE; |
17 | 17 |
18 /** Dimension of the radius used in the link preview overlay. */ | 18 /** Dimension of the radius used in the link preview overlay. */ |
19 public static int DIMENSION_LINK_PREVIEW_OVERLAY_RADIUS; | 19 public static int DIMENSION_LINK_PREVIEW_OVERLAY_RADIUS; |
20 | 20 |
| 21 /** Drawable icon resource for the Share button in the action bar. */ |
| 22 public static int DRAWABLE_ICON_ACTION_BAR_SHARE; |
| 23 |
| 24 /** Drawable icon resource for the Web Search button in the action bar. */ |
| 25 public static int DRAWABLE_ICON_ACTION_BAR_WEB_SEARCH; |
| 26 |
21 /** Drawable resource for the link preview popup overlay. */ | 27 /** Drawable resource for the link preview popup overlay. */ |
22 public static int DRAWABLE_LINK_PREVIEW_POPUP_OVERLAY; | 28 public static int DRAWABLE_LINK_PREVIEW_POPUP_OVERLAY; |
23 | 29 |
24 /** Id of the date picker view. */ | 30 /** Id of the date picker view. */ |
25 public static int ID_DATE_PICKER; | 31 public static int ID_DATE_PICKER; |
26 | 32 |
27 /** Id of the month picker view. */ | 33 /** Id of the month picker view. */ |
28 public static int ID_MONTH_PICKER; | 34 public static int ID_MONTH_PICKER; |
29 | 35 |
30 /** Id of the time picker view. */ | 36 /** Id of the time picker view. */ |
31 public static int ID_TIME_PICKER; | 37 public static int ID_TIME_PICKER; |
32 | 38 |
33 /** Id of the year picker view. */ | 39 /** Id of the year picker view. */ |
34 public static int ID_YEAR_PICKER; | 40 public static int ID_YEAR_PICKER; |
35 | 41 |
36 /** Id of the view containing the month and year pickers. */ | 42 /** Id of the view containing the month and year pickers. */ |
37 public static int ID_MONTH_YEAR_PICKERS_CONTAINER; | 43 public static int ID_MONTH_YEAR_PICKERS_CONTAINER; |
38 | 44 |
39 /** Layout of the date/time picker dialog. */ | 45 /** Layout of the date/time picker dialog. */ |
40 public static int LAYOUT_DATE_TIME_PICKER_DIALOG; | 46 public static int LAYOUT_DATE_TIME_PICKER_DIALOG; |
41 | 47 |
42 /** Layout of the month picker. */ | 48 /** Layout of the month picker. */ |
43 public static int LAYOUT_MONTH_PICKER; | 49 public static int LAYOUT_MONTH_PICKER; |
44 | 50 |
45 /** Layout of the month picker dialog. */ | 51 /** Layout of the month picker dialog. */ |
46 public static int LAYOUT_MONTH_PICKER_DIALOG; | 52 public static int LAYOUT_MONTH_PICKER_DIALOG; |
47 | 53 |
| 54 /** String for the Share button in the action bar. */ |
| 55 public static int STRING_ACTION_BAR_SHARE; |
| 56 |
| 57 /** String for the Web Search button in the action bar. */ |
| 58 public static int STRING_ACTION_BAR_WEB_SEARCH; |
| 59 |
48 /** String for the Clear button in the date picker dialog. */ | 60 /** String for the Clear button in the date picker dialog. */ |
49 public static int STRING_DATE_PICKER_DIALOG_CLEAR; | 61 public static int STRING_DATE_PICKER_DIALOG_CLEAR; |
50 | 62 |
51 /** String for the Set button in the date picker dialog. */ | 63 /** String for the Set button in the date picker dialog. */ |
52 public static int STRING_DATE_PICKER_DIALOG_SET; | 64 public static int STRING_DATE_PICKER_DIALOG_SET; |
53 | 65 |
54 /** String for the title of the date/time picker dialog. */ | 66 /** String for the title of the date/time picker dialog. */ |
55 public static int STRING_DATE_TIME_PICKER_DIALOG_TITLE; | 67 public static int STRING_DATE_TIME_PICKER_DIALOG_TITLE; |
56 | 68 |
57 /** String for the title of the month picker dialog. */ | 69 /** String for the title of the month picker dialog. */ |
(...skipping 21 matching lines...) Expand all Loading... |
79 try { | 91 try { |
80 if (field.getType().equals(int.class) && Modifier.isStatic(field.g
etModifiers())) { | 92 if (field.getType().equals(int.class) && Modifier.isStatic(field.g
etModifiers())) { |
81 if (field.getInt(null) == 0) return false; | 93 if (field.getInt(null) == 0) return false; |
82 } | 94 } |
83 } catch (IllegalAccessException e) { | 95 } catch (IllegalAccessException e) { |
84 } | 96 } |
85 } | 97 } |
86 return true; | 98 return true; |
87 } | 99 } |
88 } | 100 } |
OLD | NEW |