public class ItemOffsetDecoration extends RecyclerView.ItemDecoration {
private int mItemOffset;
public ItemOffsetDecoration(int itemOffset) {
mItemOffset = itemOffset;
}
This file contains hidden or 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
| // get download directory | |
| File imgFile = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS); | |
| if(imgFile.exists()) { | |
| Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getPath() + "/ovo.jpg"); | |
| ivImagem.setImageBitmap(myBitmap); | |
| } | |
| } |
This file contains hidden or 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
| #!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby | |
| # SET YOUR_HOME TO THE ABSOLUTE PATH OF YOUR HOME DIRECTORY | |
| # chmod +x install.rb | |
| # ./install.rb | |
| YOUR_HOME = '' | |
| HOMEBREW_PREFIX = "#{YOUR_HOME}/usr/local" | |
| HOMEBREW_CACHE = '/Library/Caches/Homebrew' | |
| HOMEBREW_REPO = 'https://github.com/Homebrew/homebrew' |
This file contains hidden or 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
| Loaded 7643 mappings | |
| gradle/topics/gradle-signing-with-incorrect-key maps to topic 5227 | |
| gradle/topics/how_do_you_use_variables_on_the_eclipse_plugin_to_generate_the_classpath maps to topic 3175 | |
| gradle/topics/why-are-replace-tokens-and-expand-properties-not-part-of-the-inputs-of-the-copy-task maps to topic 5232 | |
| mapping missing for Showing an example of running Selenium2 WebDriver on Groovy using Gradle 245 | |
| gradle/topics/remove-native-build-tasks maps to topic 5231 | |
| gradle/topics/friendlier_way_to_customize_a_generated_pom maps to topic 4968 | |
| gradle/topics/copy_w_duplicatesstrategy_exclude_overwrites_files maps to topic 1945 | |
| mapping missing for Compile groovy with debugging information 5226 | |
| gradle/topics/can-i-tell-which-tasks-were-explicitly-run-i-e-tell-primary-tasks-from-dependencies maps to topic 5228 |
This file contains hidden or 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.content.res.TypedArray; | |
| import android.text.TextUtils; | |
| import android.util.AttributeSet; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | |
| import android.view.ViewTreeObserver; | |
| import android.view.ViewTreeObserver.OnGlobalLayoutListener; | |
| import android.widget.FrameLayout; | |
| import android.widget.TextView; |
This file contains hidden or 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
| public Bitmap getScreenshotFromRecyclerView(RecyclerView view) { | |
| RecyclerView.Adapter adapter = view.getAdapter(); | |
| Bitmap bigBitmap = null; | |
| if (adapter != null) { | |
| int size = adapter.getItemCount(); | |
| int height = 0; | |
| Paint paint = new Paint(); | |
| int iHeight = 0; | |
| final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024); |
This file contains hidden or 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.Intent; | |
| import android.os.Bundle; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.view.View; | |
| import android.widget.ArrayAdapter; | |
| import android.widget.Button; | |
| import android.widget.ListView; | |
| public class TransitionThemeActivity extends AppCompatActivity implements View.OnClickListener { |
This file contains hidden or 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
| public class RestServiceMockUtils { | |
| public static String convertStreamToString(InputStream is) throws Exception { | |
| BufferedReader reader = new BufferedReader(new InputStreamReader(is)); | |
| StringBuilder sb = new StringBuilder(); | |
| String line = null; | |
| while ((line = reader.readLine()) != null) { | |
| sb.append(line).append("\n"); | |
| } | |
| reader.close(); |