Skip to content

Instantly share code, notes, and snippets.

View mluedke2's full-sized avatar

Matt Luedke mluedke2

View GitHub Profile
@mluedke2
mluedke2 / DialView.java
Created August 31, 2015 20:30
logic for dial bg image
// 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);
}
@mluedke2
mluedke2 / ColorUtil.java
Created August 31, 2015 17:58
This is a Utility you can use to customize the UI for a Product Detail Page. Call ColorUtil.getDarkVibrantColor in your PDP and define what to do when color is found.
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);
@mluedke2
mluedke2 / american_legal_scraper
Last active December 19, 2015 23:19
in progress of scraping site for Administrative Code of San Francisco at request of City Hall