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代碼,然後顯示它。基本上我想要做的就是從數據庫中獲取價值並展示它。任何幫助表示讚賞。