Class ChipList

ChipList

행에 표시되고 다음 줄로 래핑되어 가로로 스크롤 가능한 Chip 객체 집합을 보유합니다.

Google Chat 앱에서 사용할 수 있습니다. Google Workspace 부가기능의 개발자 프리뷰에서

const chip = CardService.newChip();
// Finish building the text chip...

const chipList = CardService.newChipList()
                     .setLayout(CardService.ChipListLayout.WRAPPED)
                     .addChip(chip);

메서드

메서드반환 유형간략한 설명
addChip(chip)ChipList칩을 추가합니다.
addEventAction(eventAction)Widget위젯에서 실행할 수 있는 이벤트 작업을 추가합니다.
setId(id)Widget변형할 위젯을 식별하는 데 사용되는 할당된 고유 ID를 설정합니다.
setLayout(layout)ChipList칩 목록 레이아웃을 설정합니다.
setVisibility(visibility)Widget위젯의 공개 상태를 설정합니다.

자세한 문서

addChip(chip)

칩을 추가합니다.

매개변수

이름유형설명
chipChip추가할 칩입니다.

리턴

ChipList - 연결을 위한 이 객체


addEventAction(eventAction)

위젯에서 실행할 수 있는 이벤트 작업을 추가합니다.

매개변수

이름유형설명
eventActionEventAction추가할 EventAction입니다.

리턴

Widget - 연결을 위한 객체입니다.


setId(id)

변형할 위젯을 식별하는 데 사용되는 할당된 고유 ID를 설정합니다. 위젯 변형은 부가기능에서만 지원됩니다.

매개변수

이름유형설명
idString위젯의 ID입니다. 64자(영문 기준)로 제한되며 `[a-zA-Z0-9-]+` 형식입니다.

리턴

Widget - 연결을 위한 이 객체


setLayout(layout)

칩 목록 레이아웃을 설정합니다. 설정하지 않으면 기본값은 ChipListLayout.WRAPPED 레이아웃입니다.

const chip = CardService.newChip();
// Finish building the text chip...

const chipList =
    CardService.newChipList()
        .setLayout(CardService.ChipListLayout.HORIZONTAL_SCROLLABLE)
        .addChip(chip);

매개변수

이름유형설명
layoutChipListLayout칩 목록 레이아웃입니다.

리턴

ChipList - 연결을 위한 이 객체


setVisibility(visibility)

위젯의 공개 상태를 설정합니다. 기본값은 `VISIBLE`입니다.

매개변수

이름유형설명
visibilityVisibility위젯의 Visibility입니다.

리턴

Widget - 연결을 위한 객체입니다.