mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 21:25:35 +03:00
move template chooser to MaterialAlterDialog
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
5d84bfc2e4
commit
ee170a4e4c
1 changed files with 5 additions and 1 deletions
|
@ -35,6 +35,7 @@ import android.widget.Button
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import androidx.fragment.app.DialogFragment
|
import androidx.fragment.app.DialogFragment
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
import com.nextcloud.android.lib.resources.directediting.DirectEditingCreateFileRemoteOperation
|
import com.nextcloud.android.lib.resources.directediting.DirectEditingCreateFileRemoteOperation
|
||||||
import com.nextcloud.android.lib.resources.directediting.DirectEditingObtainListOfTemplatesRemoteOperation
|
import com.nextcloud.android.lib.resources.directediting.DirectEditingObtainListOfTemplatesRemoteOperation
|
||||||
import com.nextcloud.client.account.CurrentAccountProvider
|
import com.nextcloud.client.account.CurrentAccountProvider
|
||||||
|
@ -171,11 +172,14 @@ class ChooseTemplateDialogFragment : DialogFragment(), View.OnClickListener, Tem
|
||||||
binding.list.adapter = adapter
|
binding.list.adapter = adapter
|
||||||
|
|
||||||
// Build the dialog
|
// Build the dialog
|
||||||
val builder = AlertDialog.Builder(activity)
|
val builder = MaterialAlertDialogBuilder(activity)
|
||||||
builder.setView(view)
|
builder.setView(view)
|
||||||
.setPositiveButton(R.string.create, null)
|
.setPositiveButton(R.string.create, null)
|
||||||
.setNeutralButton(R.string.common_cancel, null)
|
.setNeutralButton(R.string.common_cancel, null)
|
||||||
.setTitle(title)
|
.setTitle(title)
|
||||||
|
|
||||||
|
viewThemeUtils.dialog.colorMaterialAlertDialogBackground(binding.list.context, builder)
|
||||||
|
|
||||||
val dialog: Dialog = builder.create()
|
val dialog: Dialog = builder.create()
|
||||||
val window = dialog.window
|
val window = dialog.window
|
||||||
window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE)
|
window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE)
|
||||||
|
|
Loading…
Reference in a new issue