Table Of Contents:
U - undoes all changes to the line
| package some.awesome.package; | |
| import it.sephiroth.android.library.imagezoom.ImageViewTouch; | |
| import android.content.Context; | |
| import android.support.v4.view.ViewPager; | |
| import android.util.AttributeSet; | |
| import android.util.Log; | |
| import android.view.View; | |
| public class ImageViewTouchViewPager extends ViewPager { |
| <?xml version="1.0" encoding="utf-8"?> | |
| <!-- | |
| Copyright (C) 2012 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 |
##Table of Contents: 1 - Intro: Android Studio & Genymotion
#1 - Intro: Android Studio & Genymotion
[Android Studio][1] is a new Android development environment based on IntelliJ IDEA. It bundles all the essential Android SDK and Android IntelliJ plugins.
| package com.weddingwire.android.learninggroup.session1; | |
| import android.app.Activity; | |
| import android.os.Bundle; | |
| import android.view.View; | |
| import android.widget.Button; | |
| import android.widget.TextView; | |
| /** | |
| * Activity to increment a textfield on button press. |
| <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| android:paddingLeft="@dimen/activity_horizontal_margin" | |
| android:paddingRight="@dimen/activity_horizontal_margin" | |
| android:paddingTop="@dimen/activity_vertical_margin" | |
| android:paddingBottom="@dimen/activity_vertical_margin" | |
| tools:context="com.weddingwire.android.learninggroup.session1.MainActivity"> |
| /** Hook into existing tasks. */ | |
| tasks.whenTaskAdded { theTask -> | |
| excludeEspressoFilesIfNecessary(theTask) | |
| } | |
| /** | |
| * This excludes Espresso tests from Robolectric. http://stackoverflow.com/a/24706452/413254 | |
| * | |
| * This was needed when using double-espresso. I couldn't get Robolectric to exclude them | |
| * normally unless doing this. Double-espresso is used to fix a conflicting Dagger 1.2 dependency |
New View/Activity/Fragment animation
private void setupAnimation(View view) {
if (view.getViewTreeObserver().isAlive()) {
ViewTreeObserver observer = view.getViewTreeObserver();
observer.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
if (view.getViewTreeObserver().isAlive()) {| package com.my.utility; | |
| import com.fasterxml.jackson.databind.util.ISO8601Utils; | |
| import com.google.gson.TypeAdapter; | |
| import com.google.gson.stream.JsonReader; | |
| import com.google.gson.stream.JsonToken; | |
| import com.google.gson.stream.JsonWriter; | |
| import java.io.IOException; | |
| import java.text.DateFormat; |
| defmodule FakeAle.Gpio do | |
| use GenServer | |
| @moduledoc """ | |
| This is a fake Elixir interface to ElixirALE.GPIO. | |
| Each "GPIO" is an independent GenServer. | |
| """ | |
| defmodule State do | |
| @moduledoc false |