How to display Smileys over TextView using ImageSpan in android

by Mannar » Fri, 13 Mar 2009 17:46:03 GMT

Sponsored Links
i am implementing small messenger application,
In the chat conversation window i want to display the smileys along
with text in the textView.
Can anybody help for me regarding this issue.


Other Threads

1. java.lang.IllegalArgumentException: Invalid column

I am having a very hard time with updating my sqlite database.  I
added 2 new columns to my database: latitude and longitude.  When I
generated my cursor, it returned:
java.lang.IllegalArgumentException: Invalid column latitude

I am using the android emulator on Ubuntu Linux Jaunty.  I tried to
issue command emulator with -wipe-data directive, but it didn't help.
I also cleaned the eclipse project.  It didn't help either.

I tried to query sqlite, and the column in question, latitude is there
and has a value:
sqlite> .schema jobs
TEXT,report TEXT,address TEXT,assigned INTEGER,city TEXT,country
TEXT,description TEXT,dueDate INTEGER,end INTEGER,owner INTEGER,phone
TEXT,priority TEXT,start TEXT,status TEXT,zip TEXT,latitude
NUMERIC,longitude NUMERIC,created INTEGER,modified INTEGER);

select * from jobs
   ...> ;
1|1|Veggie Delivery|asdfasdf|5151 Main Street|1256332583140|
Vegetable Delivery Run to local Farmers Market|1256332583140|
(this is the latitute) 32.6679938434882|-97.7885007051725|

This is my code:
private static final String[] PROJECTION = new String[] {
                        Jobs._ID, // 0
                        Jobs.NAME, // 1
                        Jobs.JOB_ID, // 2
                        Jobs.ADDRESS, // 3
                        Jobs.CITY, // 4
                        Jobs.COUNTRY, // 5
                        Jobs.PHONE, // 6
                        Jobs.ZIP, // 7
                        Jobs.LATITUDE, // 8  This generates the exception.  It 
works fine
with this commented out.
                        Jobs.LONGITUDE // 9

        /** The index of the title column */
        private static final int COLUMN_INDEX_NAME = 1;
        private static final int COLUMN_INDEX_JOB_ID = 2;
        private static final int COLUMN_INDEX_ADDRESS = 3;
        private static final int COLUMN_INDEX_CITY = 4;
        private static final int COLUMN_INDEX_ZIP = 7;
        private static final int COLUMN_INDEX_COUNTRY = 5;
        private static final int COLUMN_INDEX_PHONE = 6;
        private static final int COLUMN_INDEX_LATITUDE = 8;
        private static final int COLUMN_INDEX_LONGITUDE = 9;

        public void onCreate(Bundle savedInstanceState) {

                final Intent intent = getIntent();
                mUri = intent.getData();

                mCursor = managedQuery(mUri, PROJECTION, null, null, null);

                // I don't think the cursor ever got here.
                if (mCursor != null) {
                        Log.d(TAG, Integer.toString(mCursor.getColumnIndex
                        latitude = mCursor.getDouble(COLUMN_INDEX_LATITUDE);
                        longitude = mCursor.getDouble(COLUMN_INDEX_LONGITUDE);

This is the error that I received:
E/AndroidRuntime(  842): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime(  842): java.lang.RuntimeException: Unable to start
activity ComponentInfo{}:
java.lang.IllegalArgumentException: Invalid column
E/AndroidRuntime(  842):        at
E/AndroidRuntime(  842):        at

Any hints or directions that you can give me on this would be much
appreciated.  Thank you for your kind assistance.


2. file chooser?

There's nothing like windows' FileOpenDialog if that's what you

On Oct 26, 7:34am, Jeffrey Blattman <>


3. How to create a ListView with different View/layout for each row

4. Linking checkout orders to devices

5. how to create sdk from source code

6. question on Android dev phone

7. ADC2 Tea-Party2