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
/* Instructions | |
- Downlaod and install https://ui.vision/ | |
- Open the chrome extension | |
- On top left, click on the small folder with plus icon | |
- Select "Import JSON" | |
- Import this file | |
*/ | |
/* Running | |
- Select the "valencia cita automation" macro |
This file has been truncated, but you can view the full file.
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
[ | |
{ | |
"id": "3", | |
"year": 1978, | |
"target": "DEU", | |
"name": "Aachen Cathedral ", | |
"type": "Cultural", | |
"region": "EUR", | |
"regionLong": "Europe and North America", | |
"coordinates": "N50 46 28 E6 5 4", |
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
class SpannableTextView @JvmOverloads constructor( | |
context: Context, | |
attrs: AttributeSet? = null, | |
defStyle: Int = 0 | |
) : TextView(context, attrs, defStyle) { | |
fun setSpannableText(vararg texts: SpannableStyle) { | |
buildWith(breaker = " ", blocks = *texts) | |
} |
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 static Intent getCallingIntent(Context context, ArrayList<GalleryPhoto> imagesOnDevice) { | |
Intent intent = new Intent(context, GalleryActivity.class); | |
intent.putParcelableArrayListExtra(EXTRA_IMAGES_ON_DEVICE, imagesOnDevice); | |
return intent; | |
} | |
... | |
@Test | |
public void someTest() { |
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
@Test | |
public void shouldShareImageFromGallery() { | |
Instrumentation.ActivityResult result = new Instrumentation.ActivityResult(Activity.RESULT_OK, data); | |
intending(hasAction(Intent.ACTION_CHOOSER)).respondWith(result); | |
onView(withId(R.id.share)).perform(click()); | |
intended(allOf( | |
hasExtras(allOf( |
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 shareImage(String text, Uri imageUri) { | |
Intent shareIntent = new Intent(); | |
shareIntent.setAction(Intent.ACTION_SEND); | |
shareIntent.putExtra(Intent.EXTRA_STREAM, imageUri); | |
shareIntent.setType("image/*"); | |
activity.startActivity(Intent.createChooser(shareIntent, text)); | |
} |
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
@Test | |
public void shouldSelectImageOnCamera() { | |
Instrumentation.ActivityResult result = new Instrumentation.ActivityResult(Activity.RESULT_OK, data); | |
intending(hasAction(MediaStore.ACTION_IMAGE_CAPTURE)).respondWith(result); | |
onView(withId(R.id.camera)).perform(click()); | |
} |
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
@Test | |
public void someTest() { | |
Intents.init(); | |
onView(withId(R.id.some_id)).perform(click()); | |
Intents.release(); | |
} |
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
@Rule | |
public ActivityTestRule activityRule = new ActivityTestRule<>( | |
MainActivity.class, | |
true, // initialTouchMode | |
false); // launchActivity. False to set intent per method |
NewerOlder