FIXME
This commit is contained in:
parent
899f3a254d
commit
6a6a7bfa90
@ -83,10 +83,7 @@ public class HomeFragment extends Fragment {
|
||||
|
||||
private void handleSelectedNoteSheets(Uri... files) {
|
||||
SongEditorDialog songEditorDialog = new SongEditorDialog();
|
||||
|
||||
int width = getResources().getDisplayMetrics().widthPixels;
|
||||
|
||||
|
||||
songEditorDialog.setNoteSheetFiles(files);
|
||||
songEditorDialog.show(getParentFragmentManager(), "songEditorDialog");
|
||||
}
|
||||
}
|
@ -2,6 +2,7 @@ package com.stormtales.notevault.ui.songeditor;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.text.Layout;
|
||||
import android.widget.Button;
|
||||
@ -23,6 +24,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class SongEditorDialog extends DialogFragment {
|
||||
|
||||
Dialog dialog;
|
||||
private Uri[] noteSheetFiles;
|
||||
|
||||
public SongEditorDialog() {
|
||||
// Required empty public constructor
|
||||
@ -36,6 +38,7 @@ public class SongEditorDialog extends DialogFragment {
|
||||
View dialogView = inflater.inflate(R.layout.fragment_song_editor_dialog, null);
|
||||
|
||||
dialogView.findViewById(R.id.btnCancel).setOnClickListener(v-> onCancel());
|
||||
dialogView.findViewById(R.id.btnSave).setOnClickListener(v -> onSave());
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
|
||||
builder.setCancelable(false);
|
||||
@ -64,4 +67,8 @@ public class SongEditorDialog extends DialogFragment {
|
||||
dialog.dismiss();
|
||||
|
||||
}
|
||||
|
||||
public void setNoteSheetFiles(Uri[] noteSheetFiles) {
|
||||
this.noteSheetFiles = noteSheetFiles;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user