added licenses dialog
This commit is contained in:
@ -1,3 +1,25 @@
|
||||
/**
|
||||
* Teapod
|
||||
*
|
||||
* Copyright 2020 <seil0@mosad.xyz>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.mosad.teapod
|
||||
|
||||
import android.content.Intent
|
||||
|
@ -6,7 +6,8 @@ import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import de.psdev.licensesdialog.LicensesDialog
|
||||
import kotlinx.android.synthetic.main.fragment_account.*
|
||||
import org.mosad.teapod.BuildConfig
|
||||
import org.mosad.teapod.R
|
||||
@ -35,9 +36,19 @@ class AccountFragment : Fragment() {
|
||||
}
|
||||
|
||||
linear_about.setOnClickListener {
|
||||
MaterialDialog(requireContext())
|
||||
.title(R.string.info_about)
|
||||
.message(R.string.info_about_dialog)
|
||||
MaterialAlertDialogBuilder(requireContext())
|
||||
.setTitle(R.string.info_about)
|
||||
.setMessage(R.string.info_about_dialog)
|
||||
.show()
|
||||
}
|
||||
|
||||
text_licenses.setOnClickListener {
|
||||
LicensesDialog.Builder(requireContext())
|
||||
.setNotices(R.raw.notices)
|
||||
.setTitle(R.string.licenses)
|
||||
.setIncludeOwnLicense(true)
|
||||
.setThemeResourceId(R.style.AppTheme)
|
||||
.build()
|
||||
.show()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user