rating-system

How can I decrease the size of Ratingbar?

流过昼夜 提交于 2019-11-28 16:54:21
问题 In my activity I have some Rating bars. But the size of this bar is so big! How can I make it smaller? Edit Thanks to Gabriel Negut, I did it with the following style: <RatingBar style = "?android:attr/ratingBarStyleSmall" android:numStars = "5" android:rating = "4" /> Now, the size is reduced but number of stars and rating do not take effect!!! Why? I have 7 stars that 6 of them is selected. 回答1: The original link I posted is now broken (there's a good reason why posting links only is not

Ruby on Rails display half a star for a decimal rating, e.g. 4.5

依然范特西╮ 提交于 2019-11-28 13:09:17
I am able to view 5 asterisks for a rating of 5 for a product, and 4 asterisks for a rating of 4 etc. But what I would like to do is replace the asterisks with an image of a star that I have in my assets/images/ directory, and if a rating is of 4.5 then display half a star. Is there a way of doing this? Below is my current code in application_helper.rb and the view in index.html.erb. application_helper.rb: module ApplicationHelper def render_stars(value) output = '' if (1..5).include?(value.to_i) value.to_i.times { output += '*'} end output end end index.html.erb: <div id="star-rating"> <% if

Creating 5 Star Rating System With PHP , MySQL ,Jquery And Ajax

孤街浪徒 提交于 2019-11-27 16:52:54
问题 I've downloaded this tutorial http://megarush.net/5-star-rating-system-with-php-mysql-jquery-and-ajax/ but I'm getting these errors: Notice: Undefined variable: rat in C:\xampp\htdocs\rating\rating.php on line 37 Notice: Undefined variable: v in C:\xampp\htdocs\rating\rating.php on line 41 <?php include("settings.php"); connect(); $ids=array(1,2,3); ?> <html> <head> <script src="jquery.js" type="text/javascript"></script> <link rel="stylesheet" href="rating.css" /> <script type="text

Integrating CSS star rating into an HTML form

一笑奈何 提交于 2019-11-27 12:29:54
I've seen a tutorial online - http://www.htmldrive.net/items/show/402/CSS-Star-Rating-System - for making a CSS star rating system. On the page they have this code: <ul class="rating"> <li><a href="#" title="1 Star">1</a></li> <li><a href="#" title="2 Stars">2</a></li> <li><a href="#" title="3 Stars">3</a></li> <li><a href="#" title="4 Stars">4</a></li> <li><a href="#" title="5 Stars">5</a></li> </ul> From what I can tell, this is just a list. How would I integrate it into my form, so that the information from the star rating can be submitted to a database. My current code for the form is

Integrating CSS star rating into an HTML form

怎甘沉沦 提交于 2019-11-26 15:58:34
问题 I've seen a tutorial online - http://www.htmldrive.net/items/show/402/CSS-Star-Rating-System - for making a CSS star rating system. On the page they have this code: <ul class="rating"> <li><a href="#" title="1 Star">1</a></li> <li><a href="#" title="2 Stars">2</a></li> <li><a href="#" title="3 Stars">3</a></li> <li><a href="#" title="4 Stars">4</a></li> <li><a href="#" title="5 Stars">5</a></li> </ul> From what I can tell, this is just a list. How would I integrate it into my form, so that