Skip to content

Commit 5ce8b01

Browse files
committed
Content description for tests purpose
1 parent 0b80e76 commit 5ce8b01

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ In your app/build.gradle
3434

3535
```groovy
3636
dependencies {
37-
compile 'com.github.loregr:lgsnackbar:1.0.1'
37+
compile 'com.github.loregr:lgsnackbar:1.0.2'
3838
}
3939
```
4040

lgsnackbar/src/main/java/greco/lorenzo/com/lgsnackbar/core/LGSnackbarPresenter.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,16 @@ public LGSnackbarPresenter(@NonNull LGSnackbar lgSnackbar) {
3939

4040
public void show() {
4141
WindowManager.LayoutParams layoutParams = createDefaultLayoutParams(WindowManager.LayoutParams.TYPE_TOAST, null);
42-
windowManager.addView(new FrameLayout(appplicationContext) {
42+
FrameLayout rootFrame = new FrameLayout(appplicationContext) {
4343
@Override
4444
protected void onAttachedToWindow() {
4545
super.onAttachedToWindow();
4646
onRootViewAvailable(this);
4747
}
4848

49-
}, layoutParams);
49+
};
50+
rootFrame.setContentDescription("LGSnackbar");
51+
windowManager.addView(rootFrame, layoutParams);
5052
}
5153

5254
private void onRootViewAvailable(final FrameLayout rootView) {

0 commit comments

Comments
 (0)