Skip to content
Snippets Groups Projects
Commit 0768b9a9 authored by Alexander Lussier-Cullen's avatar Alexander Lussier-Cullen
Browse files

frag_plugins_list_item: change to switch

change the appearance of the plugin on/off checkbox in calls and in the
settings to be a switch.

GitLab: #1493
Change-Id: I7c95ada46cd342be39c211b0789c7975609eafcf
parent 6c3388db
No related branches found
No related tags found
No related merge requests found
......@@ -17,10 +17,10 @@
package cx.ring.viewholders
import android.view.View
import android.widget.CheckBox
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.materialswitch.MaterialSwitch
import cx.ring.R
import cx.ring.settings.pluginssettings.PluginDetails
import cx.ring.settings.pluginssettings.PluginsListAdapter.PluginListItemListener
......@@ -28,7 +28,7 @@ import cx.ring.settings.pluginssettings.PluginsListAdapter.PluginListItemListene
class PluginSettingViewHolder(itemView: View, listener: PluginListItemListener) : RecyclerView.ViewHolder(itemView) {
private val pluginIcon: ImageView = itemView.findViewById(R.id.plugin_item_icon)
private val pluginNameTextView: TextView = itemView.findViewById(R.id.plugin_item_name)
private val pluginItemEnableCheckbox: CheckBox = itemView.findViewById(R.id.plugin_item_enable_checkbox)
private val pluginItemEnableCheckbox: MaterialSwitch = itemView.findViewById(R.id.plugin_item_enable_checkbox)
private var details: PluginDetails? = null
fun setDetails(details: PluginDetails) {
......
......@@ -17,10 +17,10 @@
package cx.ring.viewholders
import android.view.View
import android.widget.CheckBox
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.materialswitch.MaterialSwitch
import cx.ring.R
import cx.ring.settings.pluginssettings.PluginDetails
import cx.ring.adapters.PluginsAdapter.PluginListItemListener
......@@ -28,7 +28,7 @@ import cx.ring.adapters.PluginsAdapter.PluginListItemListener
class PluginViewHolder(itemView: View, listener: PluginListItemListener) : RecyclerView.ViewHolder(itemView) {
private val pluginIcon: ImageView = itemView.findViewById(R.id.plugin_item_icon)
private val pluginNameTextView: TextView = itemView.findViewById(R.id.plugin_item_name)
private val pluginItemEnableCheckbox: CheckBox = itemView.findViewById(R.id.plugin_item_enable_checkbox)
private val pluginItemEnableCheckbox: MaterialSwitch = itemView.findViewById(R.id.plugin_item_enable_checkbox)
private var details: PluginDetails? = null
fun setDetails(details: PluginDetails) {
......
......@@ -55,13 +55,14 @@ along with this program; if not, write to the Free Software
android:textSize="16sp"
tools:text="@tools:sample/full_names" />
<com.google.android.material.checkbox.MaterialCheckBox
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/plugin_item_enable_checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimary"
android:checked="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:checked="true" />
app:layout_constraintTop_toTopOf="parent" />
</LinearLayout>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment