I am pretty much new to Android application. I have a question to ask. My XML file looks like below
<?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>
Is there a way i can assign values to EditText using java code and then display it. Basically all i want to do is to get value from database and display it. Any help is appreciated.
Did you try reading this page: http://developer.android.com/reference/android/widget/EditText.html
In your
onStart/onResumemethod, add code like this:Take a look at the samples in your SDK.