Skip to content

Instantly share code, notes, and snippets.

View tarekahsan709's full-sized avatar
:octocat:

Tarek Ahsan tarekahsan709

:octocat:
View GitHub Profile
@theanam
theanam / regex.txt
Created September 4, 2019 10:08
Regular Expression to match Bangladeshi Phone number
/^(?:\+88|88)?(01[3-9]\d{8})$/
@gotoark
gotoark / Pop-Up Menu With Icon
Created February 27, 2017 05:49
Show Pop-Up Menu With Icon in Android
public void showPopupMenuWithIcon(View view) {
PopupMenu popup = new PopupMenu(SavingDatainSQLDB.this, view);
try {
Field[] fields = popup.getClass().getDeclaredFields();
for (Field field : fields) {
if ("mPopup".equals(field.getName())) {
field.setAccessible(true);
Object menuPopupHelper = field.get(popup);
Class<?> classPopupHelper = Class.forName(menuPopupHelper.getClass().getName());
Method setForceIcons = classPopupHelper.getMethod("setForceShowIcon",boolean.class);
@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