This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.vaughandroid.test.espresso.idlingresources; | |
import android.app.Activity; | |
import android.os.Handler; | |
import android.support.annotation.IdRes; | |
import android.support.annotation.NonNull; | |
import android.support.test.espresso.*; | |
import android.view.View; | |
import java.lang.ref.WeakReference; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.util.SparseArray; | |
import android.widget.AbsListView; | |
/** | |
* Helper class for calculating relative scroll offsets in a ListView or GridView by tracking the | |
* position of child views. | |
*/ | |
public class ListViewScrollTracker { | |
private AbsListView mListView; | |
private SparseArray<Integer> mPositions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.benli.app.utils.net; | |
import com.android.volley.AuthFailureError; | |
import com.android.volley.Request; | |
import com.android.volley.toolbox.HttpStack; | |
import org.apache.http.HttpEntity; | |
import org.apache.http.HttpResponse; | |
import org.apache.http.ProtocolVersion; | |
import org.apache.http.StatusLine; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onBackPressed() { | |
if (!returnBackStackImmediate(getSupportFragmentManager())) { | |
super.onBackPressed(); | |
} | |
} | |
// HACK: propagate back button press to child fragments. | |
// This might not work properly when you have multiple fragments adding multiple children to the backstack. | |
// (in our case, only one child fragments adds fragments to the backstack, so we're fine with this) |
NewerOlder