Skip to content

Instantly share code, notes, and snippets.

@Bencodes
Bencodes / Demo.txt
Created December 11, 2012 06:45
A little wrapper around android.util.Log that I usually use.
// Adb with your Logger TAG
adb logcat -s 'MyTag'
// Logging A Message
Logger.i("Tag1", "Something just happend!");
Logger.i("Tag1", "Blah");
Logger.i("Tag2", "Oh");
Logger.i("Tag1", "Hi");
@Bencodes
Bencodes / MyClass.java
Created December 11, 2012 06:13
A function I drag between projects to easily manage Fragments in Android.
public class MyClass extends FragmentActivity {
/**
*
* Simple Fragment management. Lets you easily add Fragments.
*
* @param fragment Fragments to be added on top of the stack
* @param tag The Fragments tag. Can be null.
* @param clearStack If true, it will clear all existing Fragments from the
* stack.
*/