Skip to content

Instantly share code, notes, and snippets.

Hikaru Wada sugoi-wada

Block or report user

Report or block sugoi-wada

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ProgressRecyclerAdapter
import android.support.v7.widget.RecyclerView
import android.view.View
import android.view.ViewGroup
import android.widget.ProgressBar
import android.widget.RelativeLayout
abstract class ProgressRecyclerAdapter<T : RecyclerView.ViewHolder> : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
companion object {
private val VIEW_PROGRESS = 11
}
View SmoothScrollableLinearLayoutManager.kt
import android.content.Context
import android.graphics.PointF
import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.LinearSmoothScroller
import android.support.v7.widget.RecyclerView
class SmoothScrollableLinearLayoutManager @JvmOverloads constructor(context: Context, orientation: Int = LinearLayoutManager.VERTICAL, reverseLayout: Boolean = false) : LinearLayoutManager(context, orientation, reverseLayout) {
View ass.sh
FILENAME="screenshot_`date \"+%Y%m%d%H%M%S\"`.png"
while getopts n: opt
do
if test $opt = "n"
then
FILENAME=${OPTARG}
fi
done
adb shell screencap -p /sdcard/$FILENAME
adb pull /sdcard/$FILENAME
You can’t perform that action at this time.