第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

如何在 Android 中單擊 Single Chocie 時(shí)出現(xiàn)的多選選項(xiàng)

如何在 Android 中單擊 Single Chocie 時(shí)出現(xiàn)的多選選項(xiàng)

喵喵時(shí)光機(jī) 2021-08-25 10:28:09
我想要這樣的東西。在所有單項(xiàng)選擇下方可能有被動(dòng)多選按鈕。沒關(guān)系。那可能嗎?
查看完整描述

1 回答

?
四季花海

TA貢獻(xiàn)1811條經(jīng)驗(yàn) 獲得超5個(gè)贊

您可以使用 view.setVisibility(View.Visible 或 View.Gone)控制每個(gè)視圖的可見性。在單選按鈕上設(shè)置單擊偵聽器,并使用該方法顯示帶有單選按鈕的容器布局。


chkIos.setOnClickListener(new OnClickListener() {


@Override

public void onClick(View view) {        

    if (v.isChecked()) {

        multiChoiceView.setVisibility(View.VISIBLE);

    } else {

        multiChoiceView.setVisibility(View.GONE);

    }


});

要在您的圖片上構(gòu)建布局,您可以在每個(gè) RadioButton 下將 RadioGroup 與 LinearLayout 結(jié)合起來,以這種方式:


<RadioGroup

    android:layout_width="match_parent"

    android:layout_height="wrap_content">


    <RadioButton

        android:layout_width="wrap_content"

        android:layout_height="wrap_content" />


    <LinearLayout

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_marginStart="20dp"

        android:orientation="vertical">


        <CheckBox

            android:layout_width="match_parent"

            android:layout_height="wrap_content" />


        <CheckBox

            android:layout_width="match_parent"

            android:layout_height="wrap_content" />


        <CheckBox

            android:layout_width="match_parent"

            android:layout_height="wrap_content" />


    </LinearLayout>


    <RadioButton

        android:layout_width="wrap_content"

        android:layout_height="wrap_content" />


</RadioGroup>


查看完整回答
反對 回復(fù) 2021-08-25
  • 1 回答
  • 0 關(guān)注
  • 165 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)