Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialogContentView.java

Issue 14801009: [rAc Android dialog] Logo, banner, text, alignment fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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.chrome.browser.autofill; 5 package org.chromium.chrome.browser.autofill;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.content.res.Resources; 8 import android.content.res.Resources;
9 import android.graphics.Bitmap; 9 import android.graphics.Bitmap;
10 import android.graphics.drawable.BitmapDrawable; 10 import android.graphics.drawable.BitmapDrawable;
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 226 }
227 227
228 /** 228 /**
229 * @return The current section if we are in editing mode, INVALID_SECTION ot herwise. 229 * @return The current section if we are in editing mode, INVALID_SECTION ot herwise.
230 */ 230 */
231 public int getCurrentSection() { 231 public int getCurrentSection() {
232 return getSectionForLayoutMode(mCurrentLayout); 232 return getSectionForLayoutMode(mCurrentLayout);
233 } 233 }
234 234
235 /** 235 /**
236 * Updates the legal documents footer.
237 * @param legalDocumentsText The text to show, or a null/empty string.
238 */
239 public void updateLegalDocumentsText(String legalDocumentsText) {
240 TextView legalView = (TextView) findViewById(R.id.terms_info);
241 if (TextUtils.isEmpty(legalDocumentsText)) {
242 legalView.setVisibility(View.GONE);
243 return;
244 }
245
246 legalView.setText(legalDocumentsText);
247 legalView.setVisibility(View.VISIBLE);
248 }
249
250 /**
236 * Updates a dropdown with the given items and adds default items to the end . 251 * Updates a dropdown with the given items and adds default items to the end .
237 * @param section The dialog section. 252 * @param section The dialog section.
238 * @param items The {@link AutofillDialogMenuItem} array to update the dropd own with. 253 * @param items The {@link AutofillDialogMenuItem} array to update the dropd own with.
239 * @param selectedMenuItem The index of the selected menu item, or -1. 254 * @param selectedMenuItem The index of the selected menu item, or -1.
240 */ 255 */
241 public void updateMenuItemsForSection(int section, 256 public void updateMenuItemsForSection(int section,
242 List<AutofillDialogMenuItem> items, final int selectedMenuItem) { 257 List<AutofillDialogMenuItem> items, final int selectedMenuItem) {
243 final Spinner spinner = mSpinners[section]; 258 final Spinner spinner = mSpinners[section];
244 // Set the listener to null and reset it after updating the menu items t o avoid getting an 259 // Set the listener to null and reset it after updating the menu items t o avoid getting an
245 // onItemSelected call when the first item is selected after updating th e items. 260 // onItemSelected call when the first item is selected after updating th e items.
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 cvcEdit.setVisibility(VISIBLE); 541 cvcEdit.setVisibility(VISIBLE);
527 if (!TextUtils.isEmpty(mCVCHint)) { 542 if (!TextUtils.isEmpty(mCVCHint)) {
528 cvcEdit.setHint(mCVCHint); 543 cvcEdit.setHint(mCVCHint);
529 } 544 }
530 cvcEdit.setCompoundDrawables(null, null, mCVCIcon, null); 545 cvcEdit.setCompoundDrawables(null, null, mCVCIcon, null);
531 } 546 }
532 return spinnerView; 547 return spinnerView;
533 } 548 }
534 } 549 }
535 } 550 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698