|
|
@ -18,9 +18,10 @@ import kotlinx.android.synthetic.main.item_log.view.* |
|
|
|
class TextListDialog : BaseDialogFragment() { |
|
|
|
class TextListDialog : BaseDialogFragment() { |
|
|
|
|
|
|
|
|
|
|
|
companion object { |
|
|
|
companion object { |
|
|
|
fun show(fragmentManager: FragmentManager, values: ArrayList<String>) { |
|
|
|
fun show(fragmentManager: FragmentManager, title: String, values: ArrayList<String>) { |
|
|
|
TextListDialog().apply { |
|
|
|
TextListDialog().apply { |
|
|
|
val bundle = Bundle() |
|
|
|
val bundle = Bundle() |
|
|
|
|
|
|
|
bundle.putString("title", title) |
|
|
|
bundle.putStringArrayList("values", values) |
|
|
|
bundle.putStringArrayList("values", values) |
|
|
|
arguments = bundle |
|
|
|
arguments = bundle |
|
|
|
}.show(fragmentManager, "textListDialog") |
|
|
|
}.show(fragmentManager, "textListDialog") |
|
|
@ -46,8 +47,8 @@ class TextListDialog : BaseDialogFragment() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) { |
|
|
|
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) { |
|
|
|
tool_bar.title = getString(R.string.log) |
|
|
|
|
|
|
|
arguments?.let { |
|
|
|
arguments?.let { |
|
|
|
|
|
|
|
tool_bar.title = it.getString("title") |
|
|
|
values = it.getStringArrayList("values") |
|
|
|
values = it.getStringArrayList("values") |
|
|
|
} |
|
|
|
} |
|
|
|
recycler_view.layoutManager = LinearLayoutManager(requireContext()) |
|
|
|
recycler_view.layoutManager = LinearLayoutManager(requireContext()) |
|
|
|