4

以下は、この子と親が動的リスト値で構築されている簡単な宣言です。関連するコードはcreateGroupList()andcreateChildList()です。私は操作することができTextViewますが、フィールドの 1 つは、私の動的なイメージJSONがロードされていませんWebView

expListAdapter = new SimpleExpandableListAdapter(
            this, createGroupList(),  // Creating group List.
            R.layout.group_row, 
            new String[] { "Group Item" }, 
            new int[] { R.id.`enter code here`row_name },                                                       
            createChildList(),  // Creating Child List.
            R.layout.child_row,                     
            new String[] { "Sub Item0", "Sub Item1", "Sub Item2", "Sub Item3" },                            
            new int[] { R.id.grpChildName, R.id.grpChildAddress, R.id.grpChildPhoneNo, R.id.childImage }                                    
                );
        setListAdapter(expListAdapter);



    private List createGroupList() {
            String header = "";
            int headerSize = 0;
            ArrayList result = new ArrayList();
            for (int i = 0; i < dynamicList.size(); i++) { 
                HashMap m = new HashMap();
                String taxiCompanyData[] = dynamicList.get(i);
                if (header != taxiCompanyData[3]) {
                    m.put("Group Item", taxiCompanyData[3]);                                        
                    header = taxiCompanyData[3];
                    headerList[headerSize] = header;
                    headerSize++;
                    result.add(m);
                    counter++;
                }
            }
            return (List) result;
            }

    Above is Group creating and 

     private List createChildList() {
                ArrayList result = new ArrayList();
                Log.i("Info ", "headerList.length" + headerList.length);
                    for (int i = 0; i < headerList.length; i++) {
                    final ArrayList secList = new ArrayList();
                    System.out.println("dynamic list size is in main"
                            + dynamicList.size());
                     webView = (WebView) findViewById(R.id.childImage);
                    for (int j = 0; j < dynamicList.size(); j++) {
                        String taxiCompanyData[] = dynamicList.get(j);
                        if (taxiCompanyData[3].equalsIgnoreCase(headerList[i])) {
                            final HashMap child = new HashMap();
                            child.put("Sub Item0", taxiCompanyData[0]);
                            child.put("Sub Item1", taxiCompanyData[1]);
                            child.put("Sub Item2", taxiCompanyData[2]);
    //                      child.put("Sub Item3",  taxiCompanyData[4]); 
                            Thread th = new Thread(){
                                @Override
                                public void run() {
                                    webView.loadUrl("https://lh5.googleusercontent.com/-u8heQyD_4y4/T5VMu-Zc6wI/AAAAAAAi71s/EP32a3D-fc0/s90/Corsino");
                                    secList.add(child);
                                };

                            };
                            th.start();

                        }
                    }

                    result.add(secList);
                }
                return (List)result;
            }

を読み込めませんWebUI。誰か助けてください。

4

0 に答える 0