manage curosr in edit text...

by chitacan » Wed, 21 Apr 2010 14:31:24 GMT

Sponsored Links
 hi all

im developing small text editor for android device.

in this app, i need to manage cursor in edit text view.

is there any method to get(or set... ) current cursor's position in
edit text???


manage curosr in edit text...

by Justin Anderson » Wed, 21 Apr 2010 15:54:25 GMT

 Not sure,  but you could look at the docs as well as I could to find out... 

There are only 10 types of people in the world...
Those who know binary and those who don't.


Sponsored Links

manage curosr in edit text...

by chitacan » Wed, 21 Apr 2010 16:44:21 GMT

 Thanx for your reply

i found 'selection' class, i think this class can implement what i


Other Threads

1. How to transfer Image bytes from MediaStore.Image ContentProvider to byte [] array


I am puzzled how best to copy a JPEG image data bytes held by the
MediaStore.Images ContentProvider to a byte []  within an Activity. I
am not certain about how the
Classses fit into my scenario...

So a sketch of the code might look something like ...

import android.provider.MediaStore.Images;
import android.database.Cursor;


Uri extImagesUri = Images.Media.EXTERNAL_CONTENT_URI; // Images on SD
// Obtain a  Cursor
Cursor cur = managedQuery(extImagesUri, null, null, null, null);
int rowIndex = cur.getColumnIndexOrThrow(Images.ImageColumns._ID);
Uri imageUri = null;
byte [] imageBytes = null;
String rowStr = null;
InputStream inStream=null;
OutputStream outStream = null;

// Iterate through cursor rows
while ( cur.moveToNext()  )  {

    // Get RowID
    long rowID = cur.getLong( rowIndex );

    // Image URI
    rowStr = (new Long(rowID)).toString();
    imageUri = Uri.withAppendedPath(extImagesUri, rowStr) ;

   // Now open an InputStream or OutputStream or a File ??
   <Please Help Here !!>
   inStream = getContentResolver().openInputStream( imageUri );
      // OR ??
   outStream = getContentResolver().openOutputStream( imageUri );
      // OR ??
    ParcelFiledescriptor pFD = getContentResolver().
openFileDescriptor(imageUri, "r");
    // then open a FileInputStream ??

   // transfer (copy) image content bytes  to imageBytes array
   < Please help here !!>

   // do something with imageBytes ...


Can someone please give me some pointers. I am rather a Java newbie
am notclear about which of the classes to leverage.


2. Android for visually impared


Is anyone using Android for the development of mobile applications for
the visually impaired?

Many thanks,


3. Api Android??

4. Adding "standard" "More" icon in submenu

5. MediaMetadataRetriever works?

6. ServiceTestCase instrumentation and remote callbacks

7. Mock Location Provider [SOLVED]