Page 1 of 2

how to get a listview item highlight when clicked?

Posted: Wed Jun 19, 2013 1:12 am
by John Herdean

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?


how to get a listview item highlight when clicked?

Posted: Wed Jun 19, 2013 1:18 am
by Alena Prykhodko

Hello John!

Check please the reference https://getsatisfaction.com/apperyio/...


how to get a listview item highlight when clicked?

Posted: Wed Jun 19, 2013 1:34 am
by John Herdean

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


how to get a listview item highlight when clicked?

Posted: Wed Jun 19, 2013 2:12 am
by Alena Prykhodko

I'll test and update asap.


how to get a listview item highlight when clicked?

Posted: Wed Jun 19, 2013 9:09 am
by Maryna Brodina

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

Is that what you mean?


how to get a listview item highlight when clicked?

Posted: Thu Jun 20, 2013 4:12 pm
by John Herdean

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??


how to get a listview item highlight when clicked?

Posted: Thu Jun 20, 2013 7:07 pm
by Kateryna Grynko

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 {}


how to get a listview item highlight when clicked?

Posted: Sun Jul 13, 2014 11:08 pm
by Oliver Fisk

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


how to get a listview item highlight when clicked?

Posted: Mon Jul 14, 2014 9:25 am
by Evgene Karachevtsev

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


how to get a listview item highlight when clicked?

Posted: Mon Jul 14, 2014 10:11 am
by Oliver Fisk

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.