Skip to content

Instantly share code, notes, and snippets.

View yogen-p's full-sized avatar
🤯
Coding

Yogen P yogen-p

🤯
Coding
View GitHub Profile
@lopspower
lopspower / README.md
Last active June 28, 2024 13:35
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.

Download This sample on Google Play Store

@sevar83
sevar83 / VarColumnGridLayoutManager
Last active July 7, 2022 10:37
GridLayoutManager with variable number of columns calculated based on the measured view width
final VarColumnGridLayoutManager layoutManager
= new VarColumnGridLayoutManager(getContext(), OrientationHelper.VERTICAL, false);
VarColumnGridLayoutManager.ColumnCountProvider columnProvider
= new VarColumnGridLayoutManager.DefaultColumnCountProvider(getContext());
layoutManager.setColumnCountProvider(columnProvider);
mRecyclerView.setLayoutManager(layoutManager);