Skip to content

Instantly share code, notes, and snippets.

View billyjoker's full-sized avatar

Guillermo billyjoker

View GitHub Profile
@billyjoker
billyjoker / CountdownExtended.java
Last active July 1, 2019 11:43
CountdownTimerPausable
public class CountDownExtended extends CountdownTimerPausable {
private static final String TAG = "CountDownExtended";
private static final String BAD_COUNTDOWN_LISTENER_MESSAGE = "countDownListener is null";
CountDownListener countDownListener;
public long getMillisUntilFinished() {
return millisUntilFinished;
}
@billyjoker
billyjoker / height.java
Created November 14, 2018 16:27 — forked from hamakn/height.java
Android: Get height of status, action, navigation bar (pixels)
// status bar height
int statusBarHeight = 0;
int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
if (resourceId > 0) {
statusBarHeight = getResources().getDimensionPixelSize(resourceId);
}
// action bar height
int actionBarHeight = 0;
final TypedArray styledAttributes = getActivity().getTheme().obtainStyledAttributes(