Skip to content

Instantly share code, notes, and snippets.

View chihung93's full-sized avatar
🏠
Working from home

Henry chihung93

🏠
Working from home
  • Ho Chi Minh City, Vietnam
  • 21:59 (UTC +07:00)
View GitHub Profile
@rahul01
rahul01 / RoundedBackgroundColorSpan.kt
Created February 19, 2020 09:17
RoundedBackgroundColorSpan
package com.test.util
import android.graphics.Canvas
import android.graphics.Paint
import android.graphics.Path
import android.graphics.RectF
import android.text.style.LineBackgroundSpan
import kotlin.math.abs
import kotlin.math.sign
@steveliles
steveliles / Foreground.java
Last active January 22, 2024 18:06
Class for detecting and eventing whether an Android app is currently foreground or background (requires API level 14+)
package com.sjl.util;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import java.util.List;