John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to get a listview item highlight when clicked?

Hi, I tested my apps on both the Android and iPhone now and in regards to the listviews: how can i get the selected item to highlight when clicked?

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to get a listview item highlight when clicked?

Hi, it seems that I might have to play with my theme file that I got from theme roller to implement a code like this:

$(document).ready(function() {
$("li.ui-li-static").removeClass("ui-li-static").addClass('ui-btn').data('theme', 'a').attr('data-theme', 'a');
});

is that right? If so, where would I insert this code because the theme file is huge...? Thanks

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

how to get a listview item highlight when clicked?

I'll test and update asap.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

how to get a listview item highlight when clicked?

Hello! try to create CSS asset with this code:
codeli.ui-focus {
background: red;
}/code

Is that what you mean?

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to get a listview item highlight when clicked?

No. That code will just give a shadow border around the element(s) regardless of an item is clicked or not.

My buttons will change colors on click, but my listview item when click doesnt do anything except for going to the wherever its supposed to go.

Im trying to get all my Listview items when clicked it will change color. Just the item that is clicked. But I want this applied to all my listviews in my entire project. Im guessing I might add some code to my theme file??

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

how to get a listview item highlight when clicked?

Hi John,

This is a styles generator for framework jQueryMobile: http://jquerymobile.com/themeroller/i...

Here you can see how to solve the problem of a single style for user interface design.

What you want is solved by interference with a common design theme. That is, If you change the color of the button then color of another group of elements will be changed.

On list item click, you would need to add the particular class to this item, for example awesomeSelectedItem. Make sure you remove the class from the other elements of this class (if the logic of your application assumes that you can only have one selected item in the list). Next, create a CSS style (not a theme), where define the settings for your particular class .awesomeSelectedItem {}

Oliver Fisk
Posts: 0
Joined: Wed Jul 09, 2014 10:02 pm

how to get a listview item highlight when clicked?

A tutorial showing how to highlight the selected list item would be really useful.
I'm sure its quite a common requirement.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

how to get a listview item highlight when clicked?

Hello Oliver,

Sorry, I'm not sure I understand correctly what do you want to do. Could you please clarify? You can customize any item with the help of ccs/js

Oliver Fisk
Posts: 0
Joined: Wed Jul 09, 2014 10:02 pm

how to get a listview item highlight when clicked?

Most people who use Appery are probably doing so because they don't yet have very high coding skills.

The tutorials are very useful for beginners like me who want to see how do do things and then apply them to their projects. One that showed how to implement the highlighted list item would be very useful.

Return to “Issues”