This gist has graduated to a full-fledged repo @ https://github.com/JakeWharton/ProcessPhoenix
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
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:orientation="vertical"> | |
<ImageView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:id="@+id/group_image" |
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
public class QuickReturn { | |
private final static int ANIMATION_DURATION_MILLIS = 250; | |
private final ListView listView; | |
private final View quickReturnView; | |
private final View headerPlaceholder; | |
private int itemCount; | |
private int itemOffsetY[]; |
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
/* | |
* Copyright (c) 2013 Alex Curran | |
* | |
* 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 |
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
FROM ubuntu | |
RUN apt-get install -y x11-apps | |
ENV USER=myuser UID=1000 GID=1000 | |
RUN addgroup --gid ${GID} ${USER} | |
RUN adduser --home /home/${USER} --shell /bin/bash --uid ${UID} --gid ${GID} --disabled-password ${USER} | |
RUN echo "${USER} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/${USER} | |
RUN chmod 0440 /etc/sudoers.d/${USER} |
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
// your code | |
apply from: "build-plugins/idea-gradle-sources.gradle" |
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.SharedPreferences; | |
import org.junit.Before; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.robolectric.Robolectric; | |
import org.robolectric.RobolectricTestRunner; | |
import static org.junit.Assert.assertEquals; | |
@RunWith(RobolectricTestRunner.class) | |
public class TheLastSyncTimestamp { |
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
private static final int PEEK_DRAWER_TIME_SECONDS = 2; | |
private long downTime; | |
private long eventTime; | |
private float x = 0.0f; | |
private float y = 100.0f; | |
private int metaState = 0; | |
protected void peekDrawer() { | |
downTime = SystemClock.uptimeMillis(); | |
eventTime = SystemClock.uptimeMillis() + 100; |
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
#!/bin/bash | |
# How to install: | |
# exo-open "http://developer.android.com/sdk/index.html#Other" | |
# sudo apt-get install libav-tools imagemagick | |
# wget https://gist.githubusercontent.com/lorenzos/e8a97c1992cddf9c1142/raw/android-screen-to-gif.sh | |
# chmod a+x android-screen-to-gif.sh | |
# Help message | |
function usage() { |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
Copyright 2016 Google Inc. | |
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 |
OlderNewer