Click here to Skip to main content
16,004,505 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

Am looking for a solution(in Android) similar to tooltip in windows. Actually am new to android.
Am having a TextView with a limited width and am limiting the text to be visible(which is longer than the TextView's width) with android's ellipsize property. And the problem is to show the entire text in the TextView as a tooltip when the mouse_hover event occurs.

Please suggest some ideas to achieve this.

Thank You
Yashwanth.
Posted

1 solution

I am not so sure,can QuickAction[^] help you a bit?

Or what about trying this type of code?
Java
View myView = (View)findViewById(R.id.my_view);

myView.setOnLongClickListener(new OnLongClickListener() {
    @Override
    public void onLongClick(View v) {
        EditText et=(EditText)v;
        Toast.makeText(this,et.getText().toString(), Toast.LENGTH_SHORT).show();
    }
});

N.B.OnLongClickListener is for the purpose that user will tap over the textbox for sometime & then the toast will show what's in it.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900