[ Web Proxy ]
URL:
Viewing: https://developer.android.com/reference/androidx/leanback/widget/BaseCardView.LayoutParams [Back]  [Original]

BaseCardView.LayoutParams  |  API reference  |  Android Developers Skip to main content
Essentials Design & Plan Develop Google Play Blog
Search:
Android Studio
Android Developers [Android Developers]
Stay organized with collections Save and categorize content based on your preferences.

BaseCardView.LayoutParams


public class BaseCardView.LayoutParams extends FrameLayout.LayoutParams

java.lang.Object
    android.view.ViewGroup.LayoutParams
      android.view.ViewGroup.MarginLayoutParams
        android.widget.FrameLayout.LayoutParams
          androidx.leanback.widget.BaseCardView.LayoutParams

Per-child layout information associated with BaseCardView.

Summary

Constants

static final int
static final int
static final int

Public fields

int
@ViewDebug.ExportedProperty(category = "layout", mapping = [@ViewDebug.IntToString(from = 0, to = "MAIN"), @ViewDebug.IntToString(from = 1, to = "INFO"), @ViewDebug.IntToString(from = 2, to = "EXTRA")])
viewType

Card component type for the view associated with these LayoutParams.

Public constructors

Copy constructor.

LayoutParams(int width, int height)

Inherited Constants

From android.widget.FrameLayout.LayoutParams
static final int
From android.view.ViewGroup.LayoutParams
static final int

This field is deprecated.

static final int
static final int

Inherited fields

From android.widget.FrameLayout.LayoutParams
int
From android.view.ViewGroup.LayoutParams
From android.view.ViewGroup.MarginLayoutParams

Inherited methods

From android.view.ViewGroup.LayoutParams
void
setBaseAttributes(TypedArray a, int widthAttr, int heightAttr)
From android.view.ViewGroup.MarginLayoutParams
int
int
int
boolean
void
resolveLayoutDirection(int layoutDirection)
void
setLayoutDirection(int layoutDirection)
void
setMarginEnd(int end)
void
setMarginStart(int start)
void
setMargins(int left, int top, int right, int bottom)

Constants

VIEW_TYPE_EXTRA

Added in 1.1.0
public static final int VIEW_TYPE_EXTRA = 2

VIEW_TYPE_INFO

Added in 1.1.0
public static final int VIEW_TYPE_INFO = 1

VIEW_TYPE_MAIN

Added in 1.1.0
public static final int VIEW_TYPE_MAIN = 0

Public fields

viewType

Added in 1.1.0
@ViewDebug.ExportedProperty(category = "layout", mapping = [@ViewDebug.IntToString(from = 0, to = "MAIN"), @ViewDebug.IntToString(from = 1, to = "INFO"), @ViewDebug.IntToString(from = 2, to = "EXTRA")])
public int viewType

Card component type for the view associated with these LayoutParams.

Public constructors

LayoutParams

Added in 1.1.0
public LayoutParams(ViewGroup.LayoutParams p)

LayoutParams

Added in 1.1.0
public LayoutParams(BaseCardView.LayoutParams source)

Copy constructor. Clones the width, height, and View Type of the source.

Parameters
BaseCardView.LayoutParams source

The layout params to copy from.

LayoutParams

Added in 1.1.0
public LayoutParams(Context c, AttributeSet attrs)

LayoutParams

Added in 1.1.0
public LayoutParams(int width, int height)

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026-06-24 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-06-24 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page