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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/widget/ExpandableGridView.java

Issue 2902503002: [Payment] should show all accepted card icon in payment editor. (Closed)
Patch Set: fix a class name. Created 3 years, 6 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
OLDNEW
(Empty)
1 // Copyright 2017 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.chrome.browser.widget;
6
7 import android.content.Context;
8 import android.util.AttributeSet;
9 import android.view.View;
10 import android.widget.GridView;
11
12 /**
13 * This class is a customized GridView which draws items in multiple lines autom atically
14 */
15 public class ExpandableGridView extends GridView {
16 /** Constructor for when the gridview is inflated from XML. */
17 public ExpandableGridView(Context context, AttributeSet attrs) {
18 super(context, attrs);
19 }
20
21 /** Constructor for when the gridview is inflated from XML. */
22 public ExpandableGridView(Context context, AttributeSet attrs, int defStyle) {
gogerald1 2017/05/31 15:12:01 nit: I guess this constructor is not needed for no
Hwanseung Lee 2017/05/31 15:37:58 Done.
23 super(context, attrs, defStyle);
24 }
25
26 @Override
27 public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
28 int heightSpec;
29 if (getLayoutParams().height == LayoutParams.WRAP_CONTENT) {
30 heightSpec = MeasureSpec.makeMeasureSpec(View.MEASURED_SIZE_MASK, Me asureSpec.AT_MOST);
31 } else {
32 heightSpec = heightMeasureSpec;
33 }
34
35 super.onMeasure(widthMeasureSpec, heightSpec);
36 }
37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698