Skip to content

Instantly share code, notes, and snippets.

@mobiRic
mobiRic / EmptyRecyclerView.java
Last active April 25, 2023 18:35 — forked from henningta/EmptyRecyclerView.java
RecyclerView doesn't have an emptyView support, we gotta fix that
/*
* Copyright (C) 2015 Glowworm Software
* Copyright (C) 2014 Nizamutdinov Adel
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@mobiRic
mobiRic / custom_rules.xml
Created February 22, 2015 16:04
Custom rules build file for Android to copy APK to different output folder
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (C) 2015 Glowworm Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@mobiRic
mobiRic / Foreground.java
Last active May 26, 2016 12:51 — forked from steveliles/Foreground.java
Class for detecting and eventing whether an Android app is currently foreground or background (requires API level 14+)
/*
* Copyright (C) 2014 Steve Liles
* Copyright (C) 2014 Glowworm Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@mobiRic
mobiRic / DialogHack.java
Last active August 29, 2015 14:10
Android hack to change the colour of the divider line in a Dialog
/*
* Copyright (C) 2014 Glowworm Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software

Keybase proof

I hereby claim:

  • I am mobiRic on github.
  • I am realrichard (https://keybase.io/realrichard) on keybase.
  • I have a public key whose fingerprint is BD64 06CF D25D AE04 0523 F2FA E7E2 1D47 BD70 3674

To claim this, I am signing this object:

@mobiRic
mobiRic / NoSkipSeekBar.java
Last active August 29, 2015 14:03
Custom Android SeekBar that allows for easy increment / decrement by touch.
package lib.widget;
import mobi.glowworm.example.R;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.widget.SeekBar;
@mobiRic
mobiRic / Subtitle Text-To-Speech demo.java
Last active September 14, 2023 11:30
Android Text-To-Speech demo showing how to display subtitles as the words are being spoken.
/**
* Author : James Elsey Date : 26/Feb/2011 Title : TextToSpeechDemo URL :
* Http://www.JamesElsey.co.uk
*
* Adapted by Richard Le Mesurier from original code by James Elsey at
* https://github.com/jameselsey/TextToSpeechDemo.
*
* As referenced on Stack Overflow answer by Richard Le Mesurier at
* http://stackoverflow.com/a/23792562/383414
*
@mobiRic
mobiRic / Boast.java
Last active January 25, 2022 07:23
Android Toast replacement allowing cancellation
/*
* Copyright (C) 2012 Glowworm Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@mobiRic
mobiRic / Dbug.java
Last active September 13, 2018 06:37
Debug logging class that enables ProGuard to remove all logging artifacts from the code
/*
* Copyright (C) 2011 Glowworm Software
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express