Adding Data to a ListView

by nbadal » Thu, 25 Jun 2009 01:37:02 GMT


Sponsored Links
 Is there any way to add data to a listview, outside of a cursor? In my
application, I have a SQL database that I use to store data for each
list entry, but one of the numbers I need to show is not directly
derived from the database, but is instead calculated from a number
from the database. (Database stores a date, but I want to show the
number of days until that date)
I know the formula to get this number, but how would I insert it into
the list without putting it into my SQL database?

--~--~---------~--~----~------------~-------~--~----~



Adding Data to a ListView

by nbadal » Thu, 25 Jun 2009 02:20:40 GMT


 Never mind, I hadn't realized I posted this to the android-developers
group at:


Sponsored Links


Other Threads

1. URLConnection.getOutputStream() working fine in java main but not in android activity (Urgent plz)

URLConnection conn = url.openConnection();

in debug stack the value of conn is like this

debug stack:---------------------------------------
when i click on conn, it shows me this value

org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection:http://
www.myweb.com/api/bin/validate.php

some of the childs of conn are as below

chunklength=-1
connected= false
connection= null
host address= null
httversion=1
----------------------------------------------------------

java code:

URLConnection conn = url.openConnection();
String boundary = "myboundary";
        conn.setDoOutput(true);
        conn.setDoInput(true);
        conn.setUseCaches(false);
        conn.setRequestProperty("Connection","Keep-Alive");
        conn.setRequestProperty("Content-Type","multipart/form-data;
boundary=" + boundary);
        DataOutputStream wr = new DataOutputStream
(conn.getOutputStream());// here is the exception




when compiler comes at conn.getOutputStream() it shows me this class
file editor

// Compiled from StringBuilder.java (version 1.5 : 49.0, super bit)
public final class java.lang.StringBuilder extends
java.lang.AbstractStringBuilder implements java.lang.Appendable,
java.lang.CharSequence, java.io.Serializable {

  // Method descriptor #14 ()V
  // Stack: 3, Locals: 1
  public StringBuilder();
     0  aload_0 [this]
     1  invokespecial java.lang.AbstractStringBuilder() [1]
     4  new java.lang.RuntimeException [2]
     7  dup
     8  ldc <String "Stub!"> [3]
    10  invokespecial java.lang.RuntimeException(java.lang.String) [4]
    13  athrow
      Line numbers:
        [pc: 0, line: 6]
      Local variable table:
        [pc: 0, pc: 14] local: this index: 0 type:
java.lang.StringBuilder

  // Method descriptor #20 (I)V
  // Stack: 3, Locals: 2
  public StringBuilder(int capacity);
     0  aload_0 [this]
     1  invokespecial java.lang.AbstractStringBuilder() [1]
     4  new java.lang.RuntimeException [2]
     7  dup
     8  ldc <String "Stub!"> [3]
    10  invokespecial java.lang.RuntimeException(java.lang.String) [4]
    13  athrow
      Line numbers:
        [pc: 0, line: 7]
      Local variable table:
        [pc: 0, pc: 14] local: this index: 0 type:
java.lang.StringBuilder
        [pc: 0, pc: 14] local: capacity index: 1 type: int
.....
.....
.....


the same program workes fine when i use in java main class but problem
if i use the same class in android activity

please help me out , i am really stuck on this
your help would be appreciated, thanks in advance




--~--~---------~--~----~------------~-------~--~----~

2. Accessing Revert Key inDPad

Hi Friends,

         Am new to Android, I want to Access Revert Button( Like Back
button <- ) in DPad.. can anyone help me.


--~--~---------~--~----~------------~-------~--~----~

3. How To Custom Horizontal Scroll?

4. WebView for "Form" based "Local AJAX" application

5. Native music playlist format

6. When can the bug in the bug report be fixed?

7. Interesting Question