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
@Override | |
public Object instantiateItem(View container, int position) { | |
if (mCurTransaction == null) { | |
mCurTransaction = mFragmentManager.beginTransaction(); | |
} | |
// Do we already have this fragment? | |
String name = makeFragmentName(container.getId(), position); | |
Fragment fragment = mFragmentManager.findFragmentByTag(name); | |
if (fragment != null) { |
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
/** | |
* Return the Fragment associated with a specified position. | |
*/ | |
public abstract Fragment getItem(int position); |
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 String makeFragmentName(int viewId, int index) { | |
return "android:switcher:" + viewId + ":" + index; | |
} |
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 void useCaseExample() { | |
storageAbstraction.loadSomeData(); | |
filterData(); | |
doSomeComputation(); | |
uiAbstraction.presentDataToUser(); | |
} |
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 Activity1$$IntentBuilder<NEXT> { | |
protected Map<String, String> params = new HashMap<>(); | |
public Activity1FirstParam createActivity1() { | |
return new Activity1FirstParam(); | |
} | |
protected class Activity1FirstParam { | |
public AfterExtra1 extra1(String extra1) { |
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
buildscript { | |
repositories { | |
mavenCentral() | |
maven { | |
url "https://plugins.gradle.org/m2/" | |
} | |
maven { | |
url 'http://dl.bintray.com/jetbrains/intellij-plugin-service' | |
} | |
} |
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
<idea-plugin> | |
<id>com.example.plugin</id> | |
<name>ExamplePlugin</name> | |
<vendor email="test@example.com" url="http://www.example.com">Example</vendor> | |
<description><![CDATA[ | |
Some description of the plugin, what it does, so people can have a better idea if they want to use it | |
]]></description> | |
<change-notes><![CDATA[ |
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
package com.example.plugin; | |
import com.intellij.openapi.components.ProjectComponent; | |
import org.jetbrains.annotations.NotNull; | |
public class TestProjectComponent implements ProjectComponent { | |
private static final String TEST_PROJECT_COMPONENT_NAME = "TestProjectComponent"; | |
@Override |
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
... | |
intellij { | |
version '2017.1' | |
pluginName 'YOUR PLUGIN NAME HERE' | |
plugins 'android' | |
updateSinceUntilBuild false | |
alternativeIdePath "/Applications/Android Studio 3.0 Preview.app/Contents/" | |
} |
OlderNewer