2010-11-26 161 views
1

我对Android应用程序非常新颖。我有一个问题要问。我的XML文件看起来像下面显示来自数据库的值

<?xml version="1.0" encoding="utf-8"?> 
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/myTableLayout" android:layout_width="fill_parent" 

    android:layout_height="fill_parent"> 
    <TableRow> 
     <TextView 
      android:layout_column="0" 
      android:text="Name" 
      android:padding="0px" /> 
    </TableRow> 

    <TableRow> 
     <EditText 
      android:layout_column="0" 
      android:id="@+id/name" 
      android:layout_width="250px" 
      android:layout_height="wrap_content" 
      /> 
    </TableRow> 
</TableLayout> 

有没有一种方法,我可以分配值的EditText使用Java代码,然后显示它。基本上我想要做的就是从数据库中获取价值并展示它。任何帮助表示赞赏。

回答

相关问题