Skip to content

Instantly share code, notes, and snippets.

View ferdy182's full-sized avatar

Fernando F. Gallego ferdy182

View GitHub Profile
@ferdy182
ferdy182 / main.kt
Last active July 18, 2023 13:40
Create an android notification that contains the current time in the icon
private fun postCounter() {
val currentTime = LocalTime.now()
val formattedTime = currentTime.format(DateTimeFormatter.ofPattern("HH:mm"))
val icon = IconCompat.createWithBitmap(
textAsBitmap(
text = formattedTime,
textSize = 14f,
textColor = getCurrentThemeAttributeColor(R.attr.colorNextPrimary, context.theme)
)
@ferdy182
ferdy182 / CircularRevealingFragment.java
Created March 27, 2015 17:18
Make circular reveal animations on a fragment
/**
* Our demo fragment
*/
public static class CircularRevealingFragment extends Fragment {
OnFragmentTouched listener;
public CircularRevealingFragment() {
}
package com.aracem.utils.version;
import android.os.Build;
/**
* Util class to check if the current device is running some of the awesome Android versions.
*
* Created by Marcos Trujillo (─‿‿─) on 3/02/14.
*/
public class SupportVersion {