Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 package org.chromium.ui; | |
| 6 | |
| 7 /** | |
| 8 * Base implementation of DropdownItem which is used to get default settings to | |
| 9 * show the item. Subclassing is the proper way to use this class to create | |
| 10 * customized dropdown items, see AutofillSeggestion as an example. | |
|
csashi
2016/11/17 01:41:31
s/Seggestion/Suggestion
lshang
2016/11/17 07:03:46
Done.
| |
| 11 */ | |
| 12 public class DropdownItemBase implements DropdownItem { | |
| 13 @Override | |
| 14 public String getLabel() { | |
| 15 return null; | |
| 16 } | |
| 17 | |
| 18 @Override | |
| 19 public String getSublabel() { | |
| 20 return null; | |
| 21 } | |
| 22 | |
| 23 @Override | |
| 24 public int getIconId() { | |
| 25 return NO_ICON; | |
| 26 } | |
| 27 | |
| 28 @Override | |
| 29 public boolean isEnabled() { | |
| 30 return true; | |
| 31 } | |
| 32 | |
| 33 @Override | |
| 34 public boolean isGroupHeader() { | |
| 35 return false; | |
| 36 } | |
| 37 | |
| 38 @Override | |
| 39 public boolean isMultilineLabel() { | |
| 40 return false; | |
| 41 } | |
| 42 | |
| 43 @Override | |
| 44 public int getLabelFontColor() { | |
| 45 return R.drawable.dropdown_label_color; | |
| 46 } | |
| 47 | |
| 48 @Override | |
| 49 public int getLabelFontSize() { | |
| 50 return R.dimen.dropdown_item_label_font_size; | |
| 51 } | |
| 52 } | |
| OLD | NEW |