Skip to content

Instantly share code, notes, and snippets.

View ssmiech's full-sized avatar

Slawomir Smiechura ssmiech

View GitHub Profile
@ssmiech
ssmiech / include_list_viewpager.xml
Created May 27, 2016 20:10 — forked from iPaulPro/include_list_viewpager.xml
CollapsingToolbarLayout with TabLayout
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
@ssmiech
ssmiech / Readme.md
Created June 10, 2016 18:53 — forked from gabrielemariotti/Readme.md
A SimpleSectionedRecyclerViewAdapter: use this class to realize a simple sectioned `RecyclerView.Adapter`.

You can use this class to realize a simple sectioned RecyclerView.Adapter without changing your code.

The RecyclerView should use a LinearLayoutManager. You can use this code also with the TwoWayView with the ListLayoutManager (https://github.com/lucasr/twoway-view)

This is a porting of the class SimpleSectionedListAdapter provided by Google

Screen

Example:

@ssmiech
ssmiech / GIF-Screencast-OSX.md
Created October 14, 2016 18:34 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@ssmiech
ssmiech / dumpRunningThreads.java
Created January 17, 2018 15:21
If I ever need to figure out which threads are running when testing with Espresso
private void dumpThreads() {
int activeCount = Thread.activeCount();
Thread[] threads = new Thread[activeCount];
Thread.enumerate(threads);
for (Thread thread : threads) {
System.err.println(thread.getName() + ": " + thread.getState());
for (StackTraceElement stackTraceElement : thread.getStackTrace()) {
System.err.println("\t" + stackTraceElement);
}
}
@ssmiech
ssmiech / dumpRunningThreads.java
Created January 17, 2018 15:21
If I ever need to figure out which threads are running when testing with Espresso
private void dumpThreads() {
int activeCount = Thread.activeCount();
Thread[] threads = new Thread[activeCount];
Thread.enumerate(threads);
for (Thread thread : threads) {
System.err.println(thread.getName() + ": " + thread.getState());
for (StackTraceElement stackTraceElement : thread.getStackTrace()) {
System.err.println("\t" + stackTraceElement);
}
}