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
# -*- coding: utf-8 -*- | |
# | |
# Copyright 2020 Google LLC | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# https://www.apache.org/licenses/LICENSE-2.0 | |
# |
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.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 | |
} |
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.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) { |
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
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 |