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 DialogFragmentViewBindingDelegate<out T : ViewBinding>( | |
val fragment: DialogFragment, | |
val viewBindingFactory: (LayoutInflater, ViewGroup?, Boolean) -> T | |
) : ReadOnlyProperty<DialogFragment, T> { | |
private var binding: T? = null | |
init { | |
fragment.lifecycle.addObserver(object : DefaultLifecycleObserver { | |
override fun onDestroy(owner: LifecycleOwner) { | |
Timber.d("Removing viewbinder") |
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
# /wordpress-docker/docker-compose.yml | |
--- | |
version: '3.8' | |
services: | |
db: | |
container_name: 'local-wordpress-db' | |
image: 'mysql:5.7' | |
volumes: | |
- './data/mysql:/var/lib/mysql' | |
ports: |
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 CustomMatchers { | |
/** | |
* Check that {@link Snackbar} is displayed, with correct message | |
* @param message Expected message ressourceId | |
* @return ViewInteraction that checks if {@link Snackbar} is displayed, with correct message | |
*/ | |
public static ViewInteraction assertSnackbarWithMessage(@StringRes int message) { | |
return onView(withSnackbar()) | |
.check(matches(allOf( | |
withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE), |
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 class SnackbarDismissed<T extends BaseActivity> extends Instruction { | |
private final T mActivity; | |
SnackbarDismissed(T activity) { | |
mActivity = activity; | |
} | |
@Override | |
public String getDescription() { |