M Rajoy
M Rajoy

Reputation: 4094

Preference with in-line options

I've created a PReference Screen which lets the user manage a series of elements marked by himself as "favorites". I create a Preference category then fill it up with options dynamically, taking them from a sqlite database. This is a screencap:

enter image description here

And this is a screen mockup of what I want to achieve:

enter image description here

That is, I want for every preference item to add an in-line remove option that allows users to directly remove favorites.

The problem is I don't know how to do this, and I've seen no similar examples. Is it even possible?

Upvotes: 2

Views: 256

Answers (2)

Mukesh Kumar Singh
Mukesh Kumar Singh

Reputation: 4522

Android provides an easy means to implement preferences screen, but standard android ListPreference does not provide an easy way to display an image for each item if the list. To add the images to the Android ListPreference, we need to use a custom xml attribute

Here is some example that may help you

http://www.cmwmobile.com/index.php?option=com_content&view=article&id=4&Itemid=12

How to add icons to Preference

Upvotes: 1

Harish Godara
Harish Godara

Reputation: 2386

To delete prefrence from prefrence screen you you can refer this Link : How to determine which preference item from custom layout button click

Upvotes: 0

Related Questions