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...
 http://developer.android.com/reference/android/widget/EditText.html 

----------------------------------------------------------------------
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
need.

--



Other Threads

1. How to make an activity destory when user presses 'Back button?

Hi,

When I currently have my activity on the font of the screen, how can I
make Android to 'destory' my activity when user clicks 'back' button?
(i.e. onDestory of my Activity gets called)?

Thank you.

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

2. Why are the save/restore lifecycle events called twice when switching the emulator from landscape to portrait?

This is with the 1.6 & 1.5 SDKs, not tried earlier ones. When you
switch from portrait to landscape the onSaveInstanceState()/
onRestoreInstanceState() pair are called once, but when going back
from landscape to portrait they are called twice, unless I've missed
something.
To test, see the log after creating a default Hello World app and
change the main class like this:

public class MainActivity extends Activity {
    private static final String TAG = "activity";

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(new MainView(this));
    }

        @Override
        protected void onRestoreInstanceState(Bundle savedInstanceState) {
                super.onRestoreInstanceState(savedInstanceState);
                Log.d(TAG, "onRestoreInstanceState()");
        }

        @Override
        protected void onSaveInstanceState(Bundle outState) {
                Log.d(TAG, "onSaveInstanceState()");
                super.onSaveInstanceState(outState);
        }

        public class MainView extends LinearLayout {
            public MainView(Context context) {
                super(context);
                inflate(context, R.layout.main, this);
            }
        }
}

--
http://www.androidacademy.com
--~--~---------~--~----~------------~-------~--~----~

3. How to make an activity destory when user presses 'Back button?

4. Issue with multiple child views created programmatically

5. Ethernet / IP over USB connection?

6. Jiwa Baru Sang Jagon

7. <WTA> Minta tutor Root Magic dalam bahasa indonesia n penjelasan yang jelas dong.hee