I am query my sqlite data base for my Android app.
I then use a simple cursor adapter to bind the data to a list view.
there are two doubles being called from the database and on the list view the only show up as 6 digits long.
Example: 43.6234 and -116.203
in the database (I dumped it) these numbers have a lot more digits.
What went wrong?
Here is my row XML for the list view
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:id="@+id/relativeLayout2" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android">
<TextView android:text="@string/ssid" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/row_db_ssid" android:textSize="16dip"></TextView>
<TextView android:layout_height="wrap_content" android:layout_below="@+id/row_db_bssid" android:textSize="12dip" android:text="@string/lati" android:layout_width="wrap_content" android:id="@+id/row_db_latitude"></TextView>
<TextView android:text="@string/bssid" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/row_db_bssid" android:layout_below="@+id/row_db_ssid" android:textSize="14dip"></TextView>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:text="@string/rssi" android:textSize="16dip" android:id="@+id/row_db_rssi"></TextView>
<TextView android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_below="@+id/row_db_bssid" android:textSize="12dip" android:text="@string/longi" android:layout_width="wrap_content" android:id="@+id/row_db_longitude"></TextView>
</RelativeLayout>
After looking here: krysanify.wordpress.com/2010/11/24/… I have found a flaw in the SimpleCursorAdapter that just assumes the fields will be strings loosing the precision wanted
I extended the SimpleCursorAdapter to use Double on the rows I wanted here is the class.