android页面怎么把数据显示在类似表格的控件上

解决方案 »

  1.   

    好像是用gridview,tablelayout之类的吧,有高手知道的贴出详细例子分享一下吧
      

  2.   

    用ListView可以实现,参考下面这个:http://www.open-open.com/lib/view/open1333372619624.html
      

  3.   

    xml文件中设置
     
     <ListView
             android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:entries="@array/books"
          />android:entries="@array/books"
    books就是你存在的数据数组
      

  4.   

    String [] s={"字符串1",  
                    "字符串2",  
                    "字符串3",  
                    "字符串4",  
                    "字符串5"};  
            ArrayAdapter aa=new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,s);  
            listView.setAdapter(aa);这是显示到 listView中的代码,  
      

  5.   

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginRight="10dip"
        android:layout_marginTop="10dip"
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:orientation="horizontal">     <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/str_url" />
        <AutoCompleteTextView
            android:id="@+id/et_mmssend_url"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="5dip"
            android:layout_weight="0.27"
            android:completionThreshold="1"
            android:dropDownHeight="wrap_content" /> </LinearLayout>et_url = (EditText)findViewById(R.id.et_mmssend_url);
    用类似的方法