Skip to content

Instantly share code, notes, and snippets.

View uddyami's full-sized avatar

uddyami agrawal uddyami

  • Raise Marketplace
  • United States
View GitHub Profile
@uddyami
uddyami / README.md
Created September 6, 2018 19:04 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

All hex value from 100% to 0% alpha:

@uddyami
uddyami / XDecimalPointYInputFilter
Created July 17, 2017 16:57
Currency InputFilter with digit restriction before and after decimal point. #Android #Java #EditText #Filter #Currency #Float
et = (EditText) vw.findViewById(R.id.tx_edittext);
et.setFilters(new InputFilter[] {
new DigitsKeyListener(Boolean.FALSE, Boolean.TRUE) {
int beforeDecimal = 5, afterDecimal = 2;
@Override
public CharSequence filter(CharSequence source, int start, int end,
Spanned dest, int dstart, int dend) {
String temp = et.getText() + source.toString();