Skip to content

Instantly share code, notes, and snippets.

View ongakuer's full-sized avatar

relex ongakuer

  • Beijing , China
  • 03:40 (UTC +08:00)
View GitHub Profile
@shawnlinboy
shawnlinboy / SmartBarUtils.java
Last active November 3, 2016 03:37
一个扩展后的魅族SmartBar工具类,增加三种隐藏SmartBar的方法,过期一种方法。
package in.mobilelin.smartbar;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import android.app.ActionBar;
import android.content.Context;
import android.content.res.Configuration;
import android.os.Build;
@wobbals
wobbals / AvcEncoder.java
Created October 31, 2012 22:46
MediaCodec encoder sample
package com.opentok.media.avc;
import java.io.IOException;
import java.nio.ByteBuffer;
import android.media.MediaCodec;
import android.media.MediaCodecInfo;
import android.media.MediaFormat;
public class AvcEncoder {
@JakeWharton
JakeWharton / BaseActivity.java
Created July 6, 2012 01:17
Scoped event bus which automatically registers and unregisters with the lifecycle.
package com.squareup.example;
public abstract BaseActivity extends SherlockActivity {
private final ScopedBus scopedBus = new ScopedBus();
protected ScopedBus getBus() {
return scopedBus;
}
@Override public void onPause() {