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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

內(nèi)容復(fù)用問(wèn)題

為什么我在bean中添加了isChecked,按照你寫的方法寫了一遍,還是出現(xiàn)復(fù)用呀,第二種方法不會(huì)有復(fù)用,這是怎么回事呀

正在回答

3 回答

在MainActivity中用cb.setChecked(bean.isChecked());
為何出錯(cuò)?

0 回復(fù) 有任何疑惑可以回復(fù)我~

package com.doop.commonadapter.bean;

/**
?* Created by king on 2016/12/4.
?*/

public class Bean {
??? //定義變量
??? private String title;
??? private String desc;
??? private String time;
??? private String phone;
??? private Boolean isChecked;

??? //記錄復(fù)選框是否選中


??? public Boolean getChecked() {
??????? return isChecked;
??? }

??? public void setChecked(Boolean checked) {
??????? isChecked = checked;
??? }

??? //添加構(gòu)造方法
??? //代碼→生成→構(gòu)造函數(shù)
??? public Bean() {
??? }


??? //添加屬性構(gòu)造方法
??? //代碼→生成→構(gòu)造函數(shù)(按住shift全選參數(shù))
??? public Bean(String title, String desc, String time, String phone) {
??????? this.title = title;
??????? this.desc = desc;
??????? this.time = time;
??????? this.phone = phone;
??? }

??? // 生成get和set
//代碼→生成→構(gòu)造get和set(按住shift全選參數(shù))

??? public String getTitle() {
??????? return title;
??? }

??? public Bean setTitle(String title) {
??????? this.title = title;
??????? return this;
??? }

??? public String getDesc() {
??????? return desc;
??? }

??? public Bean setDesc(String desc) {
??????? this.desc = desc;
??????? return this;
??? }

??? public String getTime() {
??????? return time;
??? }

??? public Bean setTime(String time) {
??????? this.time = time;
??????? return this;
??? }

??? public String getPhone() {
??????? return phone;
??? }

??? public Bean setPhone(String phone) {
??????? this.phone = phone;
??????? return this;
??? }
}

0 回復(fù) 有任何疑惑可以回復(fù)我~

貼個(gè)代碼吧,仔細(xì)檢查可能漏寫了什么

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消
Android-打造萬(wàn)能適配器
  • 參與學(xué)習(xí)       34696    人
  • 解答問(wèn)題       113    個(gè)

本課程通過(guò)對(duì)傳統(tǒng)的ListView數(shù)據(jù)綁定寫法,打造萬(wàn)能適配器

進(jìn)入課程

內(nèi)容復(fù)用問(wèn)題

我要回答 關(guān)注問(wèn)題
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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