View pull.sh
#!/bin/sh
# first argument pass the package name of the app
#echo $1
# the phone must be rooted for this to work
# this will dump the files directly in the location where this script is run
# ./pull.sh com.yourpackagename
adb shell "su -c 'chmod -R +rwx /data/data/$1;cp -r /data/data/$1/files /sdcard/;exit;'"
adb pull /sdcard/files
View SingleTon.java
public class DbManager {
static volatile DbManager singleton = null;
private DbManager() {
}
public static DbManager getInstance() {
if (singleton == null) {
synchronized (DbManager.class) {
if (singleton == null)
singleton = new DbManager();
View lib2_MainPlayer$PlayAllShorts.class
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package tw.com.android.singularsdk.lib2;
import android.media.AudioTrack;
import android.os.SystemClock;
import android.util.Log;
View ParcelableSparseArray.java
package com.zala.model;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.SparseArray;
/**
* https://gist.github.com/kaushikgopal/9eea148a2188dc58fe37
*/
public class ParcelableSparseArray<T>
View DetailDeserializer.java
package com.zala.utils.json;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.zala.model.base.Location;
import com.zala.model.base.Venue;
View ButtonProgress.java
package com.zala.widgets;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.Gravity;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.zala.R;
View ApiManager.java
import retrofit.RestAdapter;
/**
* Singleton class for Retrofit RestAdapter and API (Retrofit 1.9.0)
*/
public class ApiManager {
// interface containing HTTP methods as given by Retrofit
private static RegionApi regionApi;
// static adapter to be used in entire app
View Events.java
public class Events {
public abstract static class Event {
public String getTag() {
return this.getClass().getSimpleName();
}
}
public static class SearchResultEvent extends Event {
public int resultCount;
View SelectCurrentFragmentInViewPager.java
int id = viewPager.getCurrentItem();
System.out.println(id);
FragmentStatePagerAdapter adapter = (FragmentStatePagerAdapter) viewPager.getAdapter();
Fragment fragment = (Fragment) adapter.instantiateItem(viewPager, viewPager.getCurrentItem());
View tab_privacy_selector.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/blue" android:state_pressed="true" />
<item android:color="@color/blue" android:state_selected="true" />
<item android:color="@android:color/white" />
</selector>