hemanth kumar
hemanth kumar

Reputation: 3078

Tooltip creation in android

I am using ListView in my application. For each listitem I have to keep four images to its right side. When I click on each image it has to move to that particular page. Though the image specifies what it is meant for to know clearly I want to put a tooltip for each image. How can I create tooltip in android? Any help will be thankful to you.

Thank you

Upvotes: 1

Views: 1495

Answers (1)

Krishnabhadra
Krishnabhadra

Reputation: 34285

Normally tool tips are used when you hover over something using mouse..Tooltips are not a normal practice in touch screen devices..

If you want to do it, you can use a longClickListener and show a toast message with your tip string in it..

Toast viewToast = Toast.makeText(this, "Your tool tip", Toast.LENGTH_SHORT);
yourView.setOnLongClickListener(new OnLongClickListener() {
    @Override
    public void onLongClick(View v) {
        viewToast.show();
    }
});

well this is one way to do..Hope it helps..

Upvotes: 3

Related Questions