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

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

如何在expandbleView的子視圖中獲取editText字符串值?

如何在expandbleView的子視圖中獲取editText字符串值?

拉丁的傳說(shuō) 2022-07-14 17:03:28
我無(wú)法從 ExpandableListView 的 childView 中的 editText“Amount”獲取字符串值。我使用了共享偏好。這是我的代碼        case CHILD_TYPE_1:            TextView description_child = (TextView) convertView.findViewById(R.id.chidtext);            description_child.setText(incoming_text);            EditText editamoount=convertView.findViewById(R.id.editamount);            editamoount.setBackground(null);            break;我附上了 GUI 的屏幕截圖。可擴(kuò)展列表視圖:
查看完整描述

2 回答

?
繁星點(diǎn)點(diǎn)滴滴

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

提取字符串:


        EditText editamoount= (EditText)findViewById(R.id.editamount);

        String s=editamoont.gettext().tostring();

然后將其傳遞給另一個(gè)活動(dòng):


    *in First one:

         Intent in = new Intent(FirstAct.this, SecondAct.class);

         in.putExtra("Tag",s);

         startActivity(in);


     *in Second one:

         Intent in1 = getIntent();

         String s1 = in1.getStringExtra("Tag");

就這樣。


查看完整回答
反對(duì) 回復(fù) 2022-07-14
?
眼眸繁星

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

使用這樣的東西:

String s=editamoont.gettext().tostring(); int t= Integer.parseint(s);

第二行是將字符串轉(zhuǎn)換為 Int,以防萬(wàn)一。希望能幫助到你。


查看完整回答
反對(duì) 回復(fù) 2022-07-14
  • 2 回答
  • 0 關(guān)注
  • 163 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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