Loading app/src/main/java/org/mozilla/fenix/addons/InstalledAddonDetailsFragment.kt +5 −1 Original line number Diff line number Diff line Loading @@ -9,9 +9,11 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.Switch import androidx.core.view.isVisible import androidx.fragment.app.Fragment import androidx.navigation.Navigation import androidx.navigation.findNavController import kotlinx.android.synthetic.main.activity_addons.view.* import kotlinx.android.synthetic.main.fragment_installed_add_on_details.view.* import mozilla.components.feature.addons.Addon import mozilla.components.feature.addons.ui.translate Loading Loading @@ -64,6 +66,7 @@ class InstalledAddonDetailsFragment : Fragment() { runIfFragmentIsAttached { switch.isClickable = true switch.setText(R.string.mozac_feature_addons_settings_on) view.settings.isVisible = true this.addon = it showSnackBar( view, Loading Loading @@ -94,6 +97,7 @@ class InstalledAddonDetailsFragment : Fragment() { runIfFragmentIsAttached { switch.isClickable = true switch.setText(R.string.mozac_feature_addons_settings_off) view.settings.isVisible = false this.addon = it showSnackBar( view, Loading Loading @@ -123,7 +127,7 @@ class InstalledAddonDetailsFragment : Fragment() { private fun bindSettings(view: View) { view.settings.apply { isEnabled = addon.installedState?.optionsPageUrl != null isVisible = !addon.installedState?.optionsPageUrl.isNullOrEmpty() setOnClickListener { val directions = InstalledAddonDetailsFragmentDirections.actionInstalledAddonFragmentToAddonInternalSettingsFragment( Loading app/src/main/res/layout/fragment_installed_add_on_details.xml +2 −2 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ <!-- This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" Loading Loading @@ -79,4 +79,4 @@ android:text="@string/mozac_feature_addons_remove" android:textColor="@color/photonRed50" /> </RelativeLayout> </ScrollView> </FrameLayout> Loading
app/src/main/java/org/mozilla/fenix/addons/InstalledAddonDetailsFragment.kt +5 −1 Original line number Diff line number Diff line Loading @@ -9,9 +9,11 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.Switch import androidx.core.view.isVisible import androidx.fragment.app.Fragment import androidx.navigation.Navigation import androidx.navigation.findNavController import kotlinx.android.synthetic.main.activity_addons.view.* import kotlinx.android.synthetic.main.fragment_installed_add_on_details.view.* import mozilla.components.feature.addons.Addon import mozilla.components.feature.addons.ui.translate Loading Loading @@ -64,6 +66,7 @@ class InstalledAddonDetailsFragment : Fragment() { runIfFragmentIsAttached { switch.isClickable = true switch.setText(R.string.mozac_feature_addons_settings_on) view.settings.isVisible = true this.addon = it showSnackBar( view, Loading Loading @@ -94,6 +97,7 @@ class InstalledAddonDetailsFragment : Fragment() { runIfFragmentIsAttached { switch.isClickable = true switch.setText(R.string.mozac_feature_addons_settings_off) view.settings.isVisible = false this.addon = it showSnackBar( view, Loading Loading @@ -123,7 +127,7 @@ class InstalledAddonDetailsFragment : Fragment() { private fun bindSettings(view: View) { view.settings.apply { isEnabled = addon.installedState?.optionsPageUrl != null isVisible = !addon.installedState?.optionsPageUrl.isNullOrEmpty() setOnClickListener { val directions = InstalledAddonDetailsFragmentDirections.actionInstalledAddonFragmentToAddonInternalSettingsFragment( Loading
app/src/main/res/layout/fragment_installed_add_on_details.xml +2 −2 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ <!-- This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" Loading Loading @@ -79,4 +79,4 @@ android:text="@string/mozac_feature_addons_remove" android:textColor="@color/photonRed50" /> </RelativeLayout> </ScrollView> </FrameLayout>