- Open Android Studio
- Go to: Tools > Create Command-line Launcher
- Leave as default, Press OK
- Add the following lines to your
.gitconfig
| public abstract class BaseStatelessBlackBoxEspressoTest<T extends Activity> extends ActivityInstrumentationTestCase2<T> { | |
| private SystemAnimations mSystemAnimations; | |
| public BaseStatelessBlackBoxEspressoTest(Class clazz) { | |
| super(clazz); | |
| } | |
| @Override | |
| protected void setUp() throws Exception { |
| #Android and CI and Gradle (A How-To) | |
| There are tech stacks in this world that make it dead simple to integrate a <abbr title="Continuous Integration">CI</abbr> build system. <br> | |
| The Android platform is not one of them. | |
| Although Gradle is getting better, it's still a bit non-deterministic, and some of the fixes you'll need will start to feel more like black magic than any sort of programming. | |
| But fear not! It can be done! | |
| Before we embark on our journey, you'll need a few things to run locally: |
| /* | |
| * Copyright 2014 Johannes Homeier | |
| * | |
| * 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 |
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
Example:
| public class MainActivity extends Activity { | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.layoutfab); | |
| //Outline | |
| int size = getResources().getDimensionPixelSize(R.dimen.fab_size); | |
| Outline outline = new Outline(); |
| apply plugin: 'android-library' | |
| buildscript { | |
| repositories { | |
| mavenCentral() | |
| } | |
| } | |
| configurations { |
| /** | |
| * An example of adding these transitions to a Fragment. This simple | |
| * version just applies opposite transitions to any Fragment whether it is | |
| * entering or exiting view. You can also inspect the transit mode parameter | |
| * (i.e. TRANSIT_FRAGMENT_OPEN, TRANSIT_FRAGMENT_CLOSE) in combination to do | |
| * different animations for, say, adding a fragment versus popping the back stack. | |
| * | |
| * Transactions without an explicit transit mode set, in this example, will not | |
| * animate. Allowing the initial fragment add, for example, to simply appear. | |
| */ |
| /* | |
| * Copyright 2014 Chris Banes | |
| * | |
| * 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 |