Skip to content

Commit

Permalink
Content description for tests purpose
Browse files Browse the repository at this point in the history
  • Loading branch information
loregr committed Jul 30, 2017
1 parent 0b80e76 commit 5ce8b01
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -34,7 +34,7 @@ In your app/build.gradle

```groovy
dependencies {
compile 'com.github.loregr:lgsnackbar:1.0.1'
compile 'com.github.loregr:lgsnackbar:1.0.2'
}
```

Expand Down
Expand Up @@ -39,14 +39,16 @@ public LGSnackbarPresenter(@NonNull LGSnackbar lgSnackbar) {

public void show() {
WindowManager.LayoutParams layoutParams = createDefaultLayoutParams(WindowManager.LayoutParams.TYPE_TOAST, null);
windowManager.addView(new FrameLayout(appplicationContext) {
FrameLayout rootFrame = new FrameLayout(appplicationContext) {
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
onRootViewAvailable(this);
}

}, layoutParams);
};
rootFrame.setContentDescription("LGSnackbar");
windowManager.addView(rootFrame, layoutParams);
}

private void onRootViewAvailable(final FrameLayout rootView) {
Expand Down

0 comments on commit 5ce8b01

Please sign in to comment.