Skip to content

Instantly share code, notes, and snippets.

View RicardoBelchior's full-sized avatar
🏠
Working for Dice.fm

Ricardo Belchior RicardoBelchior

🏠
Working for Dice.fm
View GitHub Profile
@RicardoBelchior
RicardoBelchior / svg-to-android.sh
Last active December 8, 2017 21:32 — forked from deepankarb/svg-to-android.sh
A script to generate android assets from a SVG file. Requires inkscape to resize and convert.
#!/bin/bash
USAGE="Usage is: ./svg-to-android.sh <svg_file> <exported_png_name> <width_dp> <height_dp> [resources_dir] \n \
If 'resources_dir' is ommited, a new folder is created in the current directory, named after the svg name.\n \
Param 'exported_png_name' does not need extension.\n \
On Mac OS specify full path for svg file and resources directory.\n \
Exiting."
if [[ -z "$1" ]];
then
package com.ryanharter.android.util;
import android.content.Context;
import android.content.SharedPreferences;
/**
* Keeps track of the number of app launches, and days since first launch, and
* provides an easy way to determine whether you should show a rating prompt
* or not.
*/