Chromium Code Reviews| Index: ui/android/java/src/org/chromium/ui/DropdownItemBase.java |
| diff --git a/ui/android/java/src/org/chromium/ui/DropdownItemBase.java b/ui/android/java/src/org/chromium/ui/DropdownItemBase.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..661edf4b0e89c562a948de4655c99db25276c3d6 |
| --- /dev/null |
| +++ b/ui/android/java/src/org/chromium/ui/DropdownItemBase.java |
| @@ -0,0 +1,52 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +package org.chromium.ui; |
| + |
| +/** |
| + * Base implementation of DropdownItem which is used to get default settings to |
| + * show the item. Subclassing is the proper way to use this class to create |
|
Ted C
2016/11/17 17:52:26
I think the Subclassing sentence is unnecessary (a
lshang
2016/11/18 00:03:19
Done.
|
| + * customized dropdown items, see AutofillSeggestion as an example. |
| + */ |
| +public class DropdownItemBase implements DropdownItem { |
| + @Override |
| + public String getLabel() { |
| + return null; |
| + } |
| + |
| + @Override |
| + public String getSublabel() { |
| + return null; |
| + } |
| + |
| + @Override |
| + public int getIconId() { |
| + return NO_ICON; |
| + } |
| + |
| + @Override |
| + public boolean isEnabled() { |
| + return true; |
| + } |
| + |
| + @Override |
| + public boolean isGroupHeader() { |
| + return false; |
| + } |
| + |
| + @Override |
| + public boolean isMultilineLabel() { |
| + return false; |
| + } |
| + |
| + @Override |
| + public int getLabelFontColor() { |
| + return R.drawable.dropdown_label_color; |
| + } |
| + |
| + @Override |
| + public int getLabelFontSize() { |
| + return R.dimen.dropdown_item_label_font_size; |
| + } |
| +} |