diff --git a/jami-android/app/src/main/java/cx/ring/viewholders/PluginSettingViewHolder.kt b/jami-android/app/src/main/java/cx/ring/viewholders/PluginSettingViewHolder.kt index 6f55f5428f6d7eb1d723fafb170d72e08af1468d..d42a8a4267694f307a65c5c7d7661b704bdae2b0 100644 --- a/jami-android/app/src/main/java/cx/ring/viewholders/PluginSettingViewHolder.kt +++ b/jami-android/app/src/main/java/cx/ring/viewholders/PluginSettingViewHolder.kt @@ -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) { diff --git a/jami-android/app/src/main/java/cx/ring/viewholders/PluginViewHolder.kt b/jami-android/app/src/main/java/cx/ring/viewholders/PluginViewHolder.kt index b6b1829454db57bff9ddabc5723fa9beae03687c..ec007df2394531c3bf9eb501a7a806bdfb444c9c 100644 --- a/jami-android/app/src/main/java/cx/ring/viewholders/PluginViewHolder.kt +++ b/jami-android/app/src/main/java/cx/ring/viewholders/PluginViewHolder.kt @@ -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) { diff --git a/jami-android/app/src/main/res/layout/frag_plugins_list_item.xml b/jami-android/app/src/main/res/layout/frag_plugins_list_item.xml index a25eb2a0ae51d120db2a968830c8be735c6e6a5e..8faeee5810e16223b39fe1fe0a4180331c157c61 100644 --- a/jami-android/app/src/main/res/layout/frag_plugins_list_item.xml +++ b/jami-android/app/src/main/res/layout/frag_plugins_list_item.xml @@ -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