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

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

顯示ProgressDialog Android

顯示ProgressDialog Android

寶慕林4294392 2019-10-17 13:57:27
我有一個(gè)EditText,它從用戶和一個(gè)searchButton中獲取一個(gè)字符串。單擊searchButton時(shí),它將搜索XML文件并將其顯示在ListView中。我能夠從用戶那里獲取輸入,搜索XML文件并在ListView中也顯示usersearched值。我想要的是ProgressDialog在單擊searchButton之后顯示一個(gè)“請(qǐng)等待...正在檢索數(shù)據(jù)...”之類的信息,然后在顯示數(shù)據(jù)時(shí)將其關(guān)閉。public class Tab1Activity extends ListActivity {private Button okButton;private Button searchButton;Toast toast;String xml;private TextView searchText;private String searchTextString;HashMap<String, String> o;ArrayList<HashMap<String, String>> mylist = new ArrayList<HashMap<String, String>>();@Overridepublic void onCreate(Bundle savedInstanceState) {    super.onCreate(savedInstanceState);    setContentView(R.layout.tab1);    searchButton = (Button) findViewById(R.id.search_button);    searchButton.setOnClickListener(new View.OnClickListener() {        public void onClick(View v) {            // TODO Auto-generated method stub            System.out.print("hello");            searchText = (TextView) findViewById(R.id.search_text);            searchTextString = searchText.getText().toString();            readXml(searchTextString);        }    });}private void readXml(String searchTextString1) {    ArrayList<HashMap<String, String>> mylist = new ArrayList<HashMap<String, String>>();    String xml = XMLfunctions.getXML();            //Here XMLfunctions is class name which parse xml    Document doc = XMLfunctions.XMLfromString(xml);    int numResults = XMLfunctions.numResults(doc);    if ((numResults <= 0)) {        Toast.makeText(Tab1Activity.this, "Testing xmlparser",                Toast.LENGTH_LONG).show();        finish();    }    NodeList nodes = doc.getElementsByTagName("result");    for (int i = 0; i < nodes.getLength(); i++) {        HashMap<String, String> map = new HashMap<String, String>();        Element e = (Element) nodes.item(i);        String nameMapString = XMLfunctions.getValue(e, "name");
查看完整描述

3 回答

  • 3 回答
  • 0 關(guān)注
  • 426 瀏覽

添加回答

舉報(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)