Skip to content

Instantly share code, notes, and snippets.

@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;

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 / 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
@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 / MyCrypto.java
Last active October 12, 2015 09:28 — forked from upsuper/LICENSE
A Java implementation of SHA-224 message digest algorithm with Provider
/*
* Copyright (c) 2012 Xidorn Quan
* <p/>
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* <p/>
@mobiRic
mobiRic / DividerItemDecoration.java
Created March 14, 2016 12:53 — forked from zokipirlo/DividerItemDecoration.java
DividerItemDecoration. RecyclerView.ItemDecoration simple implementation
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.View;
@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 / DummyContent.java
Last active September 16, 2016 11:04
Timeline Adapter
package mobi.glowworm.demo.timeline.dummy;
import android.support.annotation.Nullable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import mobi.glowworm.demo.timeline.TimelineItem;
@mobiRic
mobiRic / DelayFilter.java
Created October 5, 2016 15:17
This is a direct copy of the {@link android.widget.Filter} class from API 23, with the hidden delay functionality made available.
/*
* Copyright (C) 2007 The Android Open Source Project
*
* 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 / CircleImageView.java
Created January 29, 2018 12:21
Yet another circle ImageView for Android
/*
* Copyright (C) 2018 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