-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
81e1d7b
commit 981f1b9
Showing
57 changed files
with
20,764 additions
and
282 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
42 changes: 42 additions & 0 deletions
42
app/src/main/java/dev/arkbuilders/arkmemo/ui/dialogs/SaveNoteDialog.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package dev.arkbuilders.arkmemo.ui.dialogs | ||
|
||
import android.app.Dialog | ||
import android.os.Bundle | ||
import android.view.WindowManager | ||
import androidx.fragment.app.DialogFragment | ||
import dev.arkbuilders.arkmemo.R | ||
import dev.arkbuilders.arkmemo.databinding.DialogSaveNoteRemindBinding | ||
|
||
class SaveNoteDialog(private val onPositiveClick: (() -> Unit)? = null, | ||
private val onNegativeClicked: (() -> Unit)? = null): DialogFragment() { | ||
|
||
private lateinit var mBinding: DialogSaveNoteRemindBinding | ||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { | ||
mBinding = DialogSaveNoteRemindBinding.inflate(layoutInflater) | ||
val dialog = Dialog(requireContext(), R.style.MemoDialog) | ||
dialog.window?.setLayout( | ||
WindowManager.LayoutParams.MATCH_PARENT, | ||
WindowManager.LayoutParams.WRAP_CONTENT | ||
) | ||
dialog.setContentView(mBinding.root) | ||
initViewActions() | ||
return dialog | ||
} | ||
|
||
private fun initViewActions() { | ||
mBinding.ivClose.setOnClickListener { | ||
dismiss() | ||
} | ||
|
||
mBinding.tvSave.setOnClickListener { | ||
onPositiveClick?.invoke() | ||
dismiss() | ||
} | ||
|
||
mBinding.tvDiscard.setOnClickListener { | ||
onNegativeClicked?.invoke() | ||
dismiss() | ||
} | ||
} | ||
|
||
} |
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
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
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
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
Oops, something went wrong.