Skip to content

Instantly share code, notes, and snippets.

View hoajb's full-sized avatar

Hoa Nguyen hoajb

  • EPAM Systems
  • Ho Chi Minh City, Viet Nam
  • 02:37 (UTC +07:00)
View GitHub Profile
https://proandroiddev.com/android-full-screen-ui-with-transparent-status-bar-ef52f3adde63
https://proandroiddev.com/kotlin-sealed-classes-enums-with-swag-d3c4b799bcd4
https://link.medium.com/YKHMiRnqE4
https://developer.android.com/guide/navigation/navigation-navigate#pop
https://androidexample365.com
WarSyndrome
4 months ago
Sub InsertQR()
Dim xHttp: Set xHttp = CreateObject("Microsoft.XMLHTTP")
Dim bStrm: Set bStrm = CreateObject("Adodb.Stream")
Dim Size: Size = 500 'dalam Pixels
Dim QR, Name, val, MyArray
Dim Invalid: Invalid = "\/:*?" & """" & "<>|"
For Each val In Selection
// Tapping the Notification will open up MainActivity
Intent i = new Intent(this, MainActivity.class);
// an action to use later
// defined as an app constant:
// public static final String MESSAGE_CONSTANT = "com.example.myapp.notification";
i.setAction(MainActivity.MESSAGE_CONSTANT);
// you can use extras as well
i.putExtra("some_extra", "testValue");
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 19.3b0
@hoajb
hoajb / homebrew-permissions-issue.md
Created February 15, 2020 04:13 — forked from irazasyed/homebrew-permissions-issue.md
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*

ImageView iv = (ImageView) findViewById(R.id.my_imageview);
ObjectAnimator scaleDown = ObjectAnimator.ofPropertyValuesHolder(
iv,
PropertyValuesHolder.ofFloat("scaleX", 1.2f),
PropertyValuesHolder.ofFloat("scaleY", 1.2f));
scaleDown.setDuration(310);
scaleDown.setRepeatCount(ObjectAnimator.INFINITE);
scaleDown.setRepeatMode(ObjectAnimator.REVERSE);
@hoajb
hoajb / DebouncedOnClickListener.java
Created November 18, 2019 07:15 — forked from rfreedman/DebouncedOnClickListener.java
A debounced onClickListener for Android
import android.os.SystemClock;
import android.view.View;
import java.util.Map;
import java.util.WeakHashMap;
/**
* A Debounced OnClickListener
* Rejects clicks that are too close together in time.
* This class is safe to use as an OnClickListener for multiple views, and will debounce each one separately.
-------------------------------
Dear Ms. Wade,
Thank you for your consideration and the invitation to interview for the Social Media Manager role at XYZ Company. I am available this Wednesday at 1:30pm and can meet you at your office.
Please let me know if I can provide any additional information prior to our meeting.
I look forward to meeting with you to discuss this position in more detail.
Yours sincerely,
android:fontFamily="sans-serif" // roboto regular
android:fontFamily="sans-serif-light" // roboto light
android:fontFamily="sans-serif-condensed" // roboto condensed
android:fontFamily="sans-serif-black" // roboto black
android:fontFamily="sans-serif-thin" // roboto thin (android 4.2)
android:fontFamily="sans-serif-medium" // roboto medium (android 5.0)
In the styles.xml file in the application I'm working on somebody listed this as the font family, and I'm pretty sure it's wrong:
@hoajb
hoajb / ImageButton
Last active August 24, 2019 16:51
Apply Material Design Touch Ripple to ImageButton?
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/ic_button"
android:background="?attr/selectableItemBackgroundBorderless"
/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"