Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - How to set the cursor to the end of a selected EditText?

How to set the cursor to the end of a selected EditText?

Put your problem here if it does not fit any of the other categories.

How to set the cursor to the end of a selected EditText?

Postby sjtcool » Wed Dec 19, 2007 4:10 am

I mean, when I select a EditText, I want to show the cursor at the end
of the editing string, then I can edit it from the end, not from the
begining, who knows how to set it to the end? THX!
sjtcool
Junior Developer
Junior Developer
 
Posts: 11
Joined: Wed Dec 19, 2007 3:18 am
Location: Nanjing

Top

Postby plusminus » Wed Dec 19, 2007 5:57 pm

Hello sjtcool,

do the following:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. EditText tx = new EditText(this);
  2.  
  3. et.setSelection(et.getText.length());
Parsed in 0.011 seconds, using GeSHi 1.0.8.4


Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby sjtcool » Thu Dec 20, 2007 2:26 am

hi, plusminus.

setSelection(int) works well, thx

plusminus wrote:Hello sjtcool,

do the following:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. EditText tx = new EditText(this);
  2. et.setSelection(et.getText.length());
Parsed in 0.010 seconds, using GeSHi 1.0.8.4


Regards,
plusminus
sjtcool
Junior Developer
Junior Developer
 
Posts: 11
Joined: Wed Dec 19, 2007 3:18 am
Location: Nanjing

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 12 guests