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
String subject = "Subject"; | |
String destinationEmail = "[email protected]"; | |
Intent intent = new Intent(Intent.ACTION_SENDTO); | |
intent.setData(Uri.parse("mailto:")); // only email apps should handle this | |
intent.putExtra(Intent.EXTRA_SUBJECT, subject); | |
intent.putExtra(Intent.EXTRA_EMAIL, destinationEmail); | |
Intent mailer = Intent.createChooser(intent, 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
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | | |
Intent.FLAG_ACTIVITY_CLEAR_TASK | | |
Intent.FLAG_ACTIVITY_NEW_TASK); |
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
... | |
android { | |
... | |
sourceSets { | |
String sharedTestDir = 'src/testCommon/java' | |
androidTest { | |
java.srcDirs += sharedTestDir | |
} |
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
// If you need to add more flavors, consider using flavor dimensions. | |
productFlavors { | |
mock { | |
applicationIdSuffix = ".mock" | |
} | |
prod { | |
} | |
} |
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
/* | |
Resolves dependency versions across test and production APKs, specifically, transitive | |
dependencies. This is required since Espresso internally has a dependency on support-annotations. | |
*/ | |
configurations.all { | |
resolutionStrategy.force "com.android.support:support-annotations:23.1.1" | |
} |
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
dexOptions{ | |
maxProcessCount 2 | |
javaMaxHeapSize "2g" | |
} |
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
onView(withText(R.string.sort_by_popularity)).check(doesNotExist()); |
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 za.co.riggaroo.retrofittestexample; | |
import android.content.Context; | |
import java.io.BufferedReader; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
/** | |
* @author rebeccafranks |
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.listhi.features.discos; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import com.google.firebase.database.Query; | |
import java.lang.reflect.Constructor; |
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
final Drawable divider = ContextCompat.getDrawable(context, R.drawable.last_events_divider); | |
previousEventsRecycler.addItemDecoration(new RecyclerView.ItemDecoration() { | |
/** | |
* Draws a divider (1dp-line) inside (over) the child. | |
* Applies to all elements except the first one. | |
* @param c | |
* @param parent | |
* @param state | |
*/ |
OlderNewer