This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// dial bgImage | |
switch (score.getMaxScore().intValue()) { | |
case Score.MAX_SCORE_3: | |
if (scoreValue < 2) { | |
mDialImageView.setImageResource(R.drawable.scale_3_1); | |
} else if (scoreValue < 3) { | |
mDialImageView.setImageResource(R.drawable.scale_3_2); | |
} else { | |
mDialImageView.setImageResource(R.drawable.scale_3_3); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ColorUtil { | |
private Product currentProduct; | |
private OnColorFoundListener mOnColorFoundListener; | |
public void getDarkVibrantColor(Context context, Product product, OnColorFoundListener listener) { | |
currentProduct = product; | |
if (currentProduct.color != 0) { | |
listener.onColorFound(currentProduct.color); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'nokogiri' | |
require 'json' | |
require 'watir-webdriver' | |
# define a utility method we'll need later | |
def collect_between(first, last) | |
first == last ? [first] : [first, *collect_between(first.next, last)] | |
end |