This file contains hidden or 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
| @Composable | |
| fun DragDropList( | |
| items: List<ReorderItem>, | |
| onMove: (Int, Int) -> Unit, | |
| modifier: Modifier = Modifier | |
| ) { | |
| val scope = rememberCoroutineScope() | |
| var overscrollJob by remember { mutableStateOf<Job?>(null) } |
This file contains hidden or 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
| Update (2022): https://gist.github.com/atyachin/2f7c6054c4cd6945397165a23623987d | |
| Steps for installing the Android Emulator from EC2 console: | |
| ----------------------------------------------------------- | |
| sudo apt install default-jdk | |
| wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip | |
| unzip sdk-tools-linux-4333796.zip -d android-sdk | |
| sudo mv android-sdk /opt/ | |
| export ANDROID_SDK_ROOT=/opt/android-sdk |
This file contains hidden or 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
| @RunWith(AndroidJUnit4.class) | |
| public class MyActivityTest { | |
| @Rule public ActivityTestRule<MyActivity> activityTestRule = new ActivityTestRule<>(MyActivity.class, false, false); | |
| private MyApp myApp; | |
| @Before public void setup() { | |
| myApp = (MyApp) InstrumentationRegistry.getTargetContext().getApplicationContext(); | |
| } |
This file contains hidden or 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
| function curry() { | |
| exportfun=$1; shift | |
| fun=$1; shift | |
| params=$* | |
| cmd=$"function $exportfun() { | |
| more_params=\$*; | |
| $fun $params \$more_params; | |
| }" | |
| eval $cmd | |
| } |
This file contains hidden or 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 abstract class BaseStatelessBlackBoxEspressoTest<T extends Activity> extends ActivityInstrumentationTestCase2<T> { | |
| private SystemAnimations mSystemAnimations; | |
| public BaseStatelessBlackBoxEspressoTest(Class clazz) { | |
| super(clazz); | |
| } | |
| @Override | |
| protected void setUp() throws Exception { |
This file contains hidden or 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 | |
| function printit { | |
| echo "This is from an embedded function: $1" | |
| } | |
| function printthat { | |
| echo "This is the first line." | |
| $1 $2 | |
| echo "This is the third line." |