Skip to content

Instantly share code, notes, and snippets.

View john1jan's full-sized avatar

John Francis john1jan

View GitHub Profile
@john1jan
john1jan / sample.js
Last active March 20, 2017 12:47
Binding Method using React.createClass
var Sample = React.createClass({
getInitialState() {
return { message: 'Hello world' };
},
print() {
console.log(this.state.message);
},
render() {
@john1jan
john1jan / PrefKeys.java
Last active February 16, 2022 23:45
Utils class for storing and retrieving data from SharedPreference in Android
/**
* Created by john.francis on 24/05/16.
*/
public class PrefKeys {
public static final String USER_INCOME = "USER_INCOME";
public static final String USER_MARITAL_STATUS = "USER_MARITAL_STATUS";
public static final String USER_SALARY_FLOAT= "USER_SALARY_FLOAT";
public static final String USER_SALARY_LONG= "USER_SALARY_LONG";
public static final String USER_AGE= "USER_AGE";
}
@john1jan
john1jan / RupeeTextView.java
Last active June 12, 2019 12:08
RupeeTextView . Which Prefixes ₹ symbol and adds commas separated amount value
import android.content.Context;
import android.util.AttributeSet;
import android.widget.TextView;
import com.billion.grow.logger.Log;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Locale;