Skip to content

Commit e7f3798

Browse files
committed
solved snackbar problem
1 parent f5f60c6 commit e7f3798

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

source-code/app/src/main/java/org/buildmlearn/toolkit/activity/TemplateEditor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
370370
final Object object = selectedTemplate.deleteItem(TemplateEditor.this, selectedPosition);
371371
selectedPosition = -1;
372372
restoreSelectedView();
373-
Snackbar.make(getWindow().getDecorView(),
373+
Snackbar.make(findViewById(R.id.relative_layout),
374374
R.string.snackbar_deleted_message,Snackbar.LENGTH_LONG)
375375
.setAction(R.string.snackbar_undo, new View.OnClickListener() {
376376
@Override

source-code/app/src/main/res/layout/activity_template_editor.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
22
xmlns:fab="http://schemas.android.com/apk/res-auto"
33
xmlns:tools="http://schemas.android.com/tools"
4+
android:id="@+id/relative_layout"
45
android:layout_width="match_parent"
56
android:layout_height="match_parent"
67
tools:context="org.buildmlearn.toolkit.activity.TemplateEditor">

0 commit comments

Comments
 (0)