Fixes existing lint errors
This commit is contained in:
parent
aeb0205ea5
commit
4d348dd26a
|
@ -39,7 +39,7 @@ class TabCounter @JvmOverloads constructor(
|
||||||
counter_root.contentDescription = if (count == 1) {
|
counter_root.contentDescription = if (count == 1) {
|
||||||
context?.getString(R.string.open_tab_tray_single)
|
context?.getString(R.string.open_tab_tray_single)
|
||||||
} else {
|
} else {
|
||||||
context?.getString(R.string.open_tab_tray_plural, count.toString())
|
String.format(context.getString(R.string.open_tab_tray_plural), count.toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,7 +191,8 @@ class TabCounter @JvmOverloads constructor(
|
||||||
ONE_DIGIT_SIZE_RATIO
|
ONE_DIGIT_SIZE_RATIO
|
||||||
}
|
}
|
||||||
|
|
||||||
val counterBoxWidth = context.resources.getDimensionPixelSize(R.dimen.tab_counter_box_width_height)
|
val counterBoxWidth =
|
||||||
|
context.resources.getDimensionPixelSize(R.dimen.tab_counter_box_width_height)
|
||||||
val textSize = newRatio * counterBoxWidth
|
val textSize = newRatio * counterBoxWidth
|
||||||
counter_text.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize)
|
counter_text.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize)
|
||||||
counter_text.setTypeface(null, Typeface.BOLD)
|
counter_text.setTypeface(null, Typeface.BOLD)
|
||||||
|
|
|
@ -25,6 +25,7 @@ import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.ext.getStringWithArgSafe
|
import org.mozilla.fenix.ext.getStringWithArgSafe
|
||||||
import org.mozilla.fenix.ext.settings
|
import org.mozilla.fenix.ext.settings
|
||||||
import org.mozilla.fenix.theme.ThemeManager
|
import org.mozilla.fenix.theme.ThemeManager
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the toolbar object used with the 3-dot menu in the custom tab browser fragment.
|
* Builds the toolbar object used with the 3-dot menu in the custom tab browser fragment.
|
||||||
|
@ -121,7 +122,11 @@ class CustomTabToolbarMenu(
|
||||||
BrowserMenuDivider(),
|
BrowserMenuDivider(),
|
||||||
menuToolbar
|
menuToolbar
|
||||||
)
|
)
|
||||||
if (shouldReverseItems) { menuItems.reversed() } else { menuItems }
|
if (shouldReverseItems) {
|
||||||
|
menuItems.reversed()
|
||||||
|
} else {
|
||||||
|
menuItems
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private val desktopMode = BrowserMenuImageSwitch(
|
private val desktopMode = BrowserMenuImageSwitch(
|
||||||
|
@ -161,7 +166,8 @@ class CustomTabToolbarMenu(
|
||||||
}
|
}
|
||||||
|
|
||||||
private val poweredBy = BrowserMenuCategory(
|
private val poweredBy = BrowserMenuCategory(
|
||||||
label = context.getStringWithArgSafe(R.string.browser_menu_powered_by, appName).toUpperCase(),
|
label = context.getStringWithArgSafe(R.string.browser_menu_powered_by, appName)
|
||||||
|
.toUpperCase(Locale.getDefault()),
|
||||||
textSize = CAPTION_TEXT_SIZE,
|
textSize = CAPTION_TEXT_SIZE,
|
||||||
textColorResource = primaryTextColor(),
|
textColorResource = primaryTextColor(),
|
||||||
textStyle = Typeface.NORMAL
|
textStyle = Typeface.NORMAL
|
||||||
|
|
|
@ -24,8 +24,7 @@ class DataChoicesFragment : PreferenceFragmentCompat() {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
val context = requireContext()
|
val context = requireContext()
|
||||||
preferenceManager.sharedPreferences.registerOnSharedPreferenceChangeListener(this) {
|
preferenceManager.sharedPreferences.registerOnSharedPreferenceChangeListener(this) { _, key ->
|
||||||
_, key ->
|
|
||||||
if (key == getPreferenceKey(R.string.pref_key_telemetry)) {
|
if (key == getPreferenceKey(R.string.pref_key_telemetry)) {
|
||||||
if (context.settings().isTelemetryEnabled) {
|
if (context.settings().isTelemetryEnabled) {
|
||||||
context.components.analytics.metrics.start(MetricServiceType.Data)
|
context.components.analytics.metrics.start(MetricServiceType.Data)
|
||||||
|
@ -63,7 +62,10 @@ class DataChoicesFragment : PreferenceFragmentCompat() {
|
||||||
isChecked = context.settings().isMarketingTelemetryEnabled
|
isChecked = context.settings().isMarketingTelemetryEnabled
|
||||||
|
|
||||||
val appName = context.getString(R.string.app_name)
|
val appName = context.getString(R.string.app_name)
|
||||||
summary = context.getString(R.string.preferences_marketing_data_description, appName)
|
summary = String.format(
|
||||||
|
context.getString(R.string.preferences_marketing_data_description),
|
||||||
|
appName
|
||||||
|
)
|
||||||
|
|
||||||
onPreferenceChangeListener = SharedPreferenceUpdater()
|
onPreferenceChangeListener = SharedPreferenceUpdater()
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,6 @@ package org.mozilla.fenix.settings
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import androidx.core.content.res.TypedArrayUtils
|
|
||||||
import androidx.core.content.withStyledAttributes
|
|
||||||
import androidx.preference.PreferenceViewHolder
|
import androidx.preference.PreferenceViewHolder
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
|
|
||||||
|
@ -32,29 +30,6 @@ class RadioButtonInfoPreference @JvmOverloads constructor(
|
||||||
|
|
||||||
init {
|
init {
|
||||||
layoutResource = R.layout.preference_widget_radiobutton_with_info
|
layoutResource = R.layout.preference_widget_radiobutton_with_info
|
||||||
|
|
||||||
context.withStyledAttributes(
|
|
||||||
attrs,
|
|
||||||
androidx.preference.R.styleable.Preference,
|
|
||||||
TypedArrayUtils.getAttr(
|
|
||||||
context,
|
|
||||||
androidx.preference.R.attr.preferenceStyle,
|
|
||||||
android.R.attr.preferenceStyle
|
|
||||||
),
|
|
||||||
0
|
|
||||||
) {
|
|
||||||
val defaultValue = when {
|
|
||||||
hasValue(androidx.preference.R.styleable.Preference_defaultValue) ->
|
|
||||||
getBoolean(androidx.preference.R.styleable.Preference_defaultValue, false)
|
|
||||||
hasValue(androidx.preference.R.styleable.Preference_android_defaultValue) ->
|
|
||||||
getBoolean(
|
|
||||||
androidx.preference.R.styleable.Preference_android_defaultValue,
|
|
||||||
false
|
|
||||||
)
|
|
||||||
else -> false
|
|
||||||
}
|
|
||||||
setDefaultValue(defaultValue)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
||||||
|
|
|
@ -403,8 +403,8 @@ class AccountSettingsFragment : PreferenceFragmentCompat() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
is LastSyncTime.Success -> getString(
|
is LastSyncTime.Success -> String.format(
|
||||||
R.string.sync_last_synced_summary,
|
getString(R.string.sync_last_synced_summary),
|
||||||
DateUtils.getRelativeTimeSpanString(state.lastSyncedDate.lastSync)
|
DateUtils.getRelativeTimeSpanString(state.lastSyncedDate.lastSync)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,8 +50,10 @@ class SignOutFragment : BottomSheetDialogFragment() {
|
||||||
): View? {
|
): View? {
|
||||||
accountManager = requireComponents.backgroundServices.accountManager
|
accountManager = requireComponents.backgroundServices.accountManager
|
||||||
val view = inflater.inflate(R.layout.fragment_sign_out, container, false)
|
val view = inflater.inflate(R.layout.fragment_sign_out, container, false)
|
||||||
view.sign_out_message.text = view.context.getString(
|
view.sign_out_message.text = String.format(
|
||||||
R.string.sign_out_confirmation_message_2,
|
view.context.getString(
|
||||||
|
R.string.sign_out_confirmation_message_2
|
||||||
|
),
|
||||||
view.context.getString(R.string.app_name)
|
view.context.getString(R.string.app_name)
|
||||||
)
|
)
|
||||||
return view
|
return view
|
||||||
|
|
|
@ -155,8 +155,9 @@ class AddSearchEngineFragment : Fragment(R.layout.fragment_add_search_engine),
|
||||||
.map { it.toLowerCase(Locale.ROOT) }
|
.map { it.toLowerCase(Locale.ROOT) }
|
||||||
|
|
||||||
if (existingIdentifiers.contains(name.toLowerCase(Locale.ROOT))) {
|
if (existingIdentifiers.contains(name.toLowerCase(Locale.ROOT))) {
|
||||||
custom_search_engine_name_field.error = resources
|
custom_search_engine_name_field.error = String.format(
|
||||||
.getString(R.string.search_add_custom_engine_error_existing_name, name)
|
resources.getString(R.string.search_add_custom_engine_error_existing_name), name
|
||||||
|
)
|
||||||
hasError = true
|
hasError = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,6 +85,7 @@ class EditCustomSearchEngineFragment : Fragment(R.layout.fragment_add_search_eng
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("LongMethod")
|
||||||
private fun saveCustomEngine() {
|
private fun saveCustomEngine() {
|
||||||
custom_search_engine_name_field.error = ""
|
custom_search_engine_name_field.error = ""
|
||||||
custom_search_engine_search_string_field.error = ""
|
custom_search_engine_search_string_field.error = ""
|
||||||
|
@ -108,24 +109,30 @@ class EditCustomSearchEngineFragment : Fragment(R.layout.fragment_add_search_eng
|
||||||
val nameHasChanged = name != args.searchEngineIdentifier
|
val nameHasChanged = name != args.searchEngineIdentifier
|
||||||
|
|
||||||
if (existingIdentifiers.contains(name.toLowerCase(Locale.ROOT)) && nameHasChanged) {
|
if (existingIdentifiers.contains(name.toLowerCase(Locale.ROOT)) && nameHasChanged) {
|
||||||
custom_search_engine_name_field.error = resources
|
custom_search_engine_name_field.error = String.format(
|
||||||
.getString(R.string.search_add_custom_engine_error_existing_name, name)
|
resources
|
||||||
|
.getString(R.string.search_add_custom_engine_error_existing_name), name
|
||||||
|
)
|
||||||
hasError = true
|
hasError = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if (searchString.isEmpty()) {
|
if (searchString.isEmpty()) {
|
||||||
custom_search_engine_search_string_field
|
custom_search_engine_search_string_field
|
||||||
.error = resources.getString(R.string.search_add_custom_engine_error_empty_search_string)
|
.error =
|
||||||
|
resources.getString(R.string.search_add_custom_engine_error_empty_search_string)
|
||||||
hasError = true
|
hasError = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!searchString.contains("%s")) {
|
if (!searchString.contains("%s")) {
|
||||||
custom_search_engine_search_string_field
|
custom_search_engine_search_string_field
|
||||||
.error = resources.getString(R.string.search_add_custom_engine_error_missing_template)
|
.error =
|
||||||
|
resources.getString(R.string.search_add_custom_engine_error_missing_template)
|
||||||
hasError = true
|
hasError = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasError) { return }
|
if (hasError) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
viewLifecycleOwner.lifecycleScope.launch(Main) {
|
viewLifecycleOwner.lifecycleScope.launch(Main) {
|
||||||
val result = withContext(IO) {
|
val result = withContext(IO) {
|
||||||
|
@ -166,8 +173,4 @@ class EditCustomSearchEngineFragment : Fragment(R.layout.fragment_add_search_eng
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
|
||||||
private const val DPS_TO_INCREASE = 20
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -581,7 +581,7 @@ class TabTrayView(
|
||||||
view.tab_layout.getTabAt(0)?.contentDescription = if (count == 1) {
|
view.tab_layout.getTabAt(0)?.contentDescription = if (count == 1) {
|
||||||
view.context?.getString(R.string.open_tab_tray_single)
|
view.context?.getString(R.string.open_tab_tray_single)
|
||||||
} else {
|
} else {
|
||||||
view.context?.getString(R.string.open_tab_tray_plural, count.toString())
|
String.format(view.context.getString(R.string.open_tab_tray_plural), count.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
view.tabsTray.accessibilityDelegate = object : View.AccessibilityDelegate() {
|
view.tabsTray.accessibilityDelegate = object : View.AccessibilityDelegate() {
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@android:id/icon"
|
android:id="@android:id/icon"
|
||||||
|
android:importantForAccessibility="no"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
|
|
@ -3,30 +3,34 @@
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- 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/. -->
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/linear_layout"
|
android:id="@+id/linear_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/custom_amo_user"
|
android:id="@+id/custom_amo_user"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/customize_addon_collection_user_hint"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:textColor="?primaryText"/>
|
android:layout_marginEnd="16dp"
|
||||||
|
android:autofillHints="false"
|
||||||
|
android:hint="@string/customize_addon_collection_user_hint"
|
||||||
|
android:inputType="number"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="?primaryText" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/custom_amo_collection"
|
android:id="@+id/custom_amo_collection"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/customize_addon_collection_hint"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:textColor="?primaryText"/>
|
android:autofillHints="false"
|
||||||
|
android:hint="@string/customize_addon_collection_hint"
|
||||||
|
android:inputType="text"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="?primaryText" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?><!-- This Source Code Form is subject to the terms of the Mozilla Public
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- 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
|
- 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/. -->
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
@ -14,6 +15,7 @@
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/copy"
|
android:id="@+id/copy"
|
||||||
|
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?selectableItemBackground"
|
android:background="?selectableItemBackground"
|
||||||
|
@ -26,6 +28,7 @@
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/paste"
|
android:id="@+id/paste"
|
||||||
|
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?selectableItemBackground"
|
android:background="?selectableItemBackground"
|
||||||
|
@ -38,6 +41,7 @@
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/paste_and_go"
|
android:id="@+id/paste_and_go"
|
||||||
|
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?selectableItemBackground"
|
android:background="?selectableItemBackground"
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:background="?selectableItemBackgroundBorderless"
|
android:background="?selectableItemBackgroundBorderless"
|
||||||
android:contentDescription="@string/create_collection_close"
|
android:contentDescription="@string/create_collection_close"
|
||||||
android:tint="@color/primary_text_dark_theme"
|
app:tint="@color/primary_text_dark_theme"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:srcCompat="@drawable/ic_close" />
|
app:srcCompat="@drawable/ic_close" />
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:importantForAccessibility="no"
|
android:importantForAccessibility="no"
|
||||||
app:srcCompat="@drawable/ic_tab_collection"
|
app:srcCompat="@drawable/ic_tab_collection"
|
||||||
android:tint="@null"
|
app:tint="@null"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
|
@ -14,53 +14,55 @@
|
||||||
android:id="@+id/back_button"
|
android:id="@+id/back_button"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:drawablePadding="8dp"
|
||||||
|
android:gravity="start|center_vertical"
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
android:paddingTop="16dp"
|
android:paddingTop="16dp"
|
||||||
android:paddingEnd="8dp"
|
android:paddingEnd="8dp"
|
||||||
android:paddingBottom="16dp"
|
android:paddingBottom="16dp"
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
|
||||||
app:drawableStartCompat="@drawable/mozac_ic_back"
|
|
||||||
android:drawablePadding="8dp"
|
|
||||||
app:drawableTint="@color/neutral_text"
|
|
||||||
android:gravity="start|center_vertical"
|
|
||||||
android:text="@string/create_collection_select_tabs"
|
android:text="@string/create_collection_select_tabs"
|
||||||
android:textAppearance="@style/HeaderTextStyle"
|
android:textAppearance="@style/HeaderTextStyle"
|
||||||
android:textColor="@color/neutral_text"
|
android:textColor="@color/neutral_text"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
|
app:drawableStartCompat="@drawable/mozac_ic_back"
|
||||||
|
app:drawableTint="@color/neutral_text"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/guideline"
|
app:layout_constraintEnd_toStartOf="@+id/guideline"
|
||||||
app:layout_constraintHorizontal_bias="0"
|
app:layout_constraintHorizontal_bias="0"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintWidth_default="wrap"/>
|
app:layout_constraintWidth_default="wrap"
|
||||||
|
tools:ignore="ButtonStyleXmlDetector" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/select_all_button"
|
android:id="@+id/select_all_button"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:fontFamily="@font/metropolis_bold"
|
||||||
|
android:gravity="start|center_vertical"
|
||||||
android:paddingStart="8dp"
|
android:paddingStart="8dp"
|
||||||
android:paddingTop="16dp"
|
android:paddingTop="16dp"
|
||||||
android:paddingEnd="16dp"
|
android:paddingEnd="16dp"
|
||||||
android:paddingBottom="16dp"
|
android:paddingBottom="16dp"
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
|
||||||
android:gravity="start|center_vertical"
|
|
||||||
android:text="@string/create_collection_select_all"
|
android:text="@string/create_collection_select_all"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/neutral_text"
|
android:textColor="@color/neutral_text"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:fontFamily="@font/metropolis_bold"
|
app:layout_constraintBottom_toBottomOf="@id/back_button"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="1"
|
app:layout_constraintHorizontal_bias="1"
|
||||||
app:layout_constraintStart_toEndOf="@+id/guideline"
|
app:layout_constraintStart_toEndOf="@+id/guideline"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/back_button"
|
app:layout_constraintWidth_default="wrap"
|
||||||
app:layout_constraintWidth_default="wrap"/>
|
tools:ignore="ButtonStyleXmlDetector" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Guideline
|
<androidx.constraintlayout.widget.Guideline
|
||||||
android:id="@+id/guideline"
|
android:id="@+id/guideline"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintGuide_percent="0.5"/>
|
app:layout_constraintGuide_percent="0.5" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/collections_list"
|
android:id="@+id/collections_list"
|
||||||
|
@ -106,8 +108,8 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="102dp"
|
android:layout_height="102dp"
|
||||||
android:background="@drawable/simple_dark_grey_gradient"
|
android:background="@drawable/simple_dark_grey_gradient"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:focusable="false"
|
||||||
android:focusable="false"/>
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/name_collection_edittext"
|
android:id="@+id/name_collection_edittext"
|
||||||
|
@ -117,6 +119,7 @@
|
||||||
android:autofillHints="false"
|
android:autofillHints="false"
|
||||||
android:background="?foundation"
|
android:background="?foundation"
|
||||||
android:focusedByDefault="true"
|
android:focusedByDefault="true"
|
||||||
|
android:hint="@string/collection_name_hint"
|
||||||
android:imeOptions="actionDone"
|
android:imeOptions="actionDone"
|
||||||
android:importantForAutofill="no"
|
android:importantForAutofill="no"
|
||||||
android:inputType="textCapSentences"
|
android:inputType="textCapSentences"
|
||||||
|
@ -136,9 +139,9 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
android:foreground="@drawable/rounded_ripple"
|
|
||||||
android:background="@drawable/add_tabs_to_collection_background"
|
android:background="@drawable/add_tabs_to_collection_background"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
|
android:foreground="@drawable/rounded_ripple"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent">
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
@ -147,24 +150,24 @@
|
||||||
android:id="@+id/bottom_bar_icon_button"
|
android:id="@+id/bottom_bar_icon_button"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="16dp"
|
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:contentDescription="@string/create_collection_close"
|
android:contentDescription="@string/create_collection_close"
|
||||||
app:srcCompat="@drawable/mozac_ic_close"
|
android:padding="16dp"
|
||||||
android:tint="?neutral"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:srcCompat="@drawable/mozac_ic_close"
|
||||||
|
app:tint="?neutral" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/bottom_bar_text"
|
android:id="@+id/bottom_bar_text"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
android:fontFamily="@font/metropolis_semibold"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:text="@string/create_collection_save_to_collection_empty"
|
android:text="@string/create_collection_save_to_collection_empty"
|
||||||
android:textColor="?neutral"
|
android:textColor="?neutral"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:fontFamily="@font/metropolis_semibold"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/save_button"
|
app:layout_constraintEnd_toStartOf="@id/save_button"
|
||||||
app:layout_constraintStart_toEndOf="@id/bottom_bar_icon_button"
|
app:layout_constraintStart_toEndOf="@id/bottom_bar_icon_button"
|
||||||
|
|
|
@ -16,16 +16,17 @@
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
app:drawableStartCompat="@drawable/mozac_ic_back"
|
|
||||||
android:drawablePadding="8dp"
|
android:drawablePadding="8dp"
|
||||||
app:drawableTint="@color/neutral_text"
|
|
||||||
android:gravity="start|center_vertical"
|
android:gravity="start|center_vertical"
|
||||||
android:text="@string/create_collection_name_collection"
|
android:text="@string/create_collection_name_collection"
|
||||||
android:textAppearance="@style/HeaderTextStyle"
|
android:textAppearance="@style/HeaderTextStyle"
|
||||||
android:textColor="@color/neutral_text"
|
android:textColor="@color/neutral_text"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
|
app:drawableStartCompat="@drawable/mozac_ic_back"
|
||||||
|
app:drawableTint="@color/neutral_text"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:ignore="ButtonStyleXmlDetector" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/select_all_button"
|
android:id="@+id/select_all_button"
|
||||||
|
@ -40,7 +41,8 @@
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:ignore="ButtonStyleXmlDetector" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/collections_list"
|
android:id="@+id/collections_list"
|
||||||
|
@ -60,6 +62,7 @@
|
||||||
android:autofillHints="false"
|
android:autofillHints="false"
|
||||||
android:background="?foundation"
|
android:background="?foundation"
|
||||||
android:focusedByDefault="true"
|
android:focusedByDefault="true"
|
||||||
|
android:hint="@string/collection_name_hint"
|
||||||
android:imeOptions="actionDone"
|
android:imeOptions="actionDone"
|
||||||
android:importantForAutofill="no"
|
android:importantForAutofill="no"
|
||||||
android:inputType="textCapSentences"
|
android:inputType="textCapSentences"
|
||||||
|
@ -121,11 +124,11 @@
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:contentDescription="@string/create_collection_close"
|
android:contentDescription="@string/create_collection_close"
|
||||||
app:srcCompat="@drawable/mozac_ic_close"
|
|
||||||
android:tint="?neutral"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:srcCompat="@drawable/mozac_ic_close"
|
||||||
|
app:tint="?neutral" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/bottom_bar_text"
|
android:id="@+id/bottom_bar_text"
|
||||||
|
@ -154,6 +157,7 @@
|
||||||
android:textColor="?neutral"
|
android:textColor="?neutral"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:ignore="ButtonStyleXmlDetector" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
@ -16,16 +16,17 @@
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
app:drawableStartCompat="@drawable/mozac_ic_back"
|
|
||||||
android:drawablePadding="8dp"
|
android:drawablePadding="8dp"
|
||||||
android:gravity="start|center_vertical"
|
android:gravity="start|center_vertical"
|
||||||
app:drawableTint="@color/neutral_text"
|
|
||||||
android:text="@string/create_collection_select_collection"
|
android:text="@string/create_collection_select_collection"
|
||||||
android:textAppearance="@style/HeaderTextStyle"
|
android:textAppearance="@style/HeaderTextStyle"
|
||||||
android:textColor="@color/neutral_text"
|
android:textColor="@color/neutral_text"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
|
app:drawableStartCompat="@drawable/mozac_ic_back"
|
||||||
|
app:drawableTint="@color/neutral_text"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:ignore="ButtonStyleXmlDetector" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/select_all_button"
|
android:id="@+id/select_all_button"
|
||||||
|
@ -40,7 +41,8 @@
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:ignore="ButtonStyleXmlDetector" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/collections_list"
|
android:id="@+id/collections_list"
|
||||||
|
@ -64,6 +66,7 @@
|
||||||
android:autofillHints="false"
|
android:autofillHints="false"
|
||||||
android:background="?foundation"
|
android:background="?foundation"
|
||||||
android:focusedByDefault="true"
|
android:focusedByDefault="true"
|
||||||
|
android:hint="@string/collection_name_hint"
|
||||||
android:imeOptions="actionDone"
|
android:imeOptions="actionDone"
|
||||||
android:importantForAutofill="no"
|
android:importantForAutofill="no"
|
||||||
android:inputType="textCapSentences"
|
android:inputType="textCapSentences"
|
||||||
|
@ -124,12 +127,12 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
app:srcCompat="@drawable/ic_new"
|
|
||||||
android:tint="?neutral"
|
|
||||||
android:importantForAccessibility="no"
|
android:importantForAccessibility="no"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:srcCompat="@drawable/ic_new"
|
||||||
|
app:tint="?neutral" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/bottom_bar_text"
|
android:id="@+id/bottom_bar_text"
|
||||||
|
@ -137,10 +140,10 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
|
android:fontFamily="@font/metropolis"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="@string/create_collection_add_new_collection"
|
android:text="@string/create_collection_add_new_collection"
|
||||||
android:fontFamily="@font/metropolis"
|
|
||||||
android:textColor="?neutral"
|
android:textColor="?neutral"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
@ -161,6 +164,7 @@
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:ignore="ButtonStyleXmlDetector" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:importantForAccessibility="no"
|
android:importantForAccessibility="no"
|
||||||
android:scaleType="center"
|
android:scaleType="center"
|
||||||
android:tint="?primaryText"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:srcCompat="@drawable/mozac_feature_download_ic_download_complete" />
|
app:srcCompat="@drawable/mozac_feature_download_ic_download_complete"
|
||||||
|
app:tint="?primaryText" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/download_dialog_title"
|
android:id="@+id/download_dialog_title"
|
||||||
|
@ -48,10 +48,10 @@
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:contentDescription="@string/mozac_feature_downloads_button_close"
|
android:contentDescription="@string/mozac_feature_downloads_button_close"
|
||||||
android:tint="?primaryText"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:srcCompat="@drawable/mozac_ic_close" />
|
app:srcCompat="@drawable/mozac_ic_close"
|
||||||
|
app:tint="?primaryText" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/download_dialog_filename"
|
android:id="@+id/download_dialog_filename"
|
||||||
|
@ -69,6 +69,7 @@
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/download_dialog_action_button"
|
android:id="@+id/download_dialog_action_button"
|
||||||
|
style="@style/PositiveButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
|
@ -76,9 +77,9 @@
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:background="@drawable/rounded_all_corners"
|
android:background="@drawable/rounded_all_corners"
|
||||||
android:backgroundTint="?accent"
|
android:backgroundTint="?accent"
|
||||||
|
android:padding="16dp"
|
||||||
android:text="@string/mozac_feature_downloads_button_open"
|
android:text="@string/mozac_feature_downloads_button_open"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:padding="16dp"
|
|
||||||
android:textColor="?contrastText"
|
android:textColor="?contrastText"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
app:layout_constraintWidth_percent="0.9" />
|
app:layout_constraintWidth_percent="0.9" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
style="@style/PositiveButton"
|
||||||
android:id="@+id/restoreTabButton"
|
android:id="@+id/restoreTabButton"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
|
@ -66,7 +67,6 @@
|
||||||
android:fontFamily="Sharp Sans"
|
android:fontFamily="Sharp Sans"
|
||||||
android:text="@string/tab_crash_restore"
|
android:text="@string/tab_crash_restore"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="?contrastText"
|
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
@ -74,6 +74,7 @@
|
||||||
app:layout_constraintWidth_percent="0.4" />
|
app:layout_constraintWidth_percent="0.4" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
style="@style/NeutralButton"
|
||||||
android:id="@+id/closeTabButton"
|
android:id="@+id/closeTabButton"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:importantForAccessibility="no"
|
android:importantForAccessibility="no"
|
||||||
app:srcCompat="@drawable/ic_tab_collection"
|
app:srcCompat="@drawable/ic_tab_collection"
|
||||||
android:tint="@null"
|
app:tint="@null"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="parent"/>
|
app:layout_constraintTop_toBottomOf="parent"/>
|
||||||
|
|
|
@ -25,7 +25,9 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="24dp"
|
android:layout_marginStart="24dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
|
android:autofillHints="false"
|
||||||
android:backgroundTint="?neutral"
|
android:backgroundTint="?neutral"
|
||||||
|
android:hint="@string/collection_name_hint"
|
||||||
android:inputType="textCapSentences"
|
android:inputType="textCapSentences"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textAlignment="viewStart" />
|
android:textAlignment="viewStart" />
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/fxa_sign_in_button"
|
android:id="@+id/fxa_sign_in_button"
|
||||||
|
style="@style/NeutralButton"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
|
@ -37,5 +38,4 @@
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:backgroundTint="@color/onboarding_card_button_background_dark" />
|
app:backgroundTint="@color/onboarding_card_button_background_dark" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -57,9 +57,9 @@
|
||||||
android:id="@+id/vertical_divider"
|
android:id="@+id/vertical_divider"
|
||||||
android:layout_width="1dp"
|
android:layout_width="1dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
android:background="?neutralFaded"
|
||||||
android:paddingStart="1dp"
|
android:paddingStart="1dp"
|
||||||
android:paddingEnd="1dp"
|
android:paddingEnd="1dp"
|
||||||
android:background="?neutralFaded"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/info_button"
|
app:layout_constraintEnd_toStartOf="@id/info_button"
|
||||||
app:layout_constraintStart_toEndOf="@+id/title"
|
app:layout_constraintStart_toEndOf="@+id/title"
|
||||||
|
@ -71,11 +71,12 @@
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:layout_marginStart="6dp"
|
android:layout_marginStart="6dp"
|
||||||
android:layout_marginEnd="6dp"
|
android:layout_marginEnd="6dp"
|
||||||
|
android:contentDescription="@string/radio_preference_info_content_description"
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
app:srcCompat="@drawable/ic_info"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/vertical_divider"
|
app:layout_constraintStart_toEndOf="@+id/vertical_divider"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:srcCompat="@drawable/ic_info" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
@ -2,21 +2,21 @@
|
||||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
<!-- 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
|
- 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/. -->
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@id/button_search_widget_new_tab"
|
android:id="@id/button_search_widget_new_tab"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:background="@drawable/rounded_search_widget_background"
|
android:layout_gravity="center"
|
||||||
android:layout_gravity="center">
|
android:background="@drawable/rounded_search_widget_background">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/button_search_widget_new_tab_icon"
|
android:id="@+id/button_search_widget_new_tab_icon"
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:contentDescription="@string/search_widget_content_description"
|
||||||
android:scaleType="centerInside"
|
android:scaleType="centerInside"
|
||||||
tools:src="@drawable/ic_launcher_foreground"
|
tools:src="@drawable/ic_launcher_foreground" />
|
||||||
android:layout_gravity="center"/>
|
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
|
@ -2,20 +2,20 @@
|
||||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
<!-- 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
|
- 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/. -->
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@id/button_search_widget_new_tab"
|
android:id="@id/button_search_widget_new_tab"
|
||||||
android:layout_width="64dp"
|
android:layout_width="64dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:background="@drawable/rounded_search_widget_background"
|
android:layout_gravity="center"
|
||||||
android:layout_gravity="center">
|
android:background="@drawable/rounded_search_widget_background">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/button_search_widget_new_tab_icon"
|
android:id="@+id/button_search_widget_new_tab_icon"
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:scaleType="centerInside"
|
android:layout_gravity="center"
|
||||||
tools:src="@drawable/ic_launcher_foreground"
|
android:contentDescription="@string/search_widget_content_description"
|
||||||
android:layout_gravity="center"/>
|
android:scaleType="centerInside"
|
||||||
|
tools:src="@drawable/ic_launcher_foreground" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?><!-- This Source Code Form is subject to the terms of the Mozilla Public
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- 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
|
- 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/. -->
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -11,33 +11,33 @@
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/button_search_widget_new_tab_icon"
|
android:id="@+id/button_search_widget_new_tab_icon"
|
||||||
android:contentDescription="@string/browser_menu_new_tab"
|
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
|
android:contentDescription="@string/search_widget_content_description"
|
||||||
android:scaleType="centerInside" />
|
android:scaleType="centerInside" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/button_search_widget_new_tab"
|
android:id="@+id/button_search_widget_new_tab"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_alignEnd="@id/button_search_widget_voice"
|
||||||
android:layout_marginStart="9dp"
|
android:layout_marginStart="9dp"
|
||||||
android:layout_toEndOf="@id/button_search_widget_new_tab_icon"
|
android:layout_toEndOf="@id/button_search_widget_new_tab_icon"
|
||||||
android:layout_alignEnd="@id/button_search_widget_voice"
|
|
||||||
android:gravity="start|center_vertical"
|
android:gravity="start|center_vertical"
|
||||||
android:letterSpacing="-0.025"
|
android:letterSpacing="-0.025"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:textColor="@color/search_widget_text"
|
android:textColor="@color/search_widget_text"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
tools:text="Search the web"/>
|
tools:text="Search the web" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/button_search_widget_voice"
|
android:id="@+id/button_search_widget_voice"
|
||||||
android:contentDescription="@string/search_widget_voice"
|
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginEnd="1dp"
|
android:layout_marginEnd="1dp"
|
||||||
android:background="@drawable/ic_microphone_widget_padded" />
|
android:background="@drawable/ic_microphone_widget_padded"
|
||||||
|
android:contentDescription="@string/search_widget_voice" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/button_search_widget_new_tab_icon"
|
android:id="@+id/button_search_widget_new_tab_icon"
|
||||||
android:contentDescription="@string/browser_menu_new_tab"
|
android:contentDescription="@string/search_widget_content_description"
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- 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/. -->
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="100dp"
|
android:layout_width="100dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:background="@drawable/rounded_search_widget_background"
|
android:background="@drawable/rounded_search_widget_background"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
@ -13,13 +13,15 @@
|
||||||
android:id="@+id/button_search_widget_new_tab_icon"
|
android:id="@+id/button_search_widget_new_tab_icon"
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
|
android:contentDescription="@string/search_widget_content_description"
|
||||||
android:scaleType="centerInside" />
|
android:scaleType="centerInside" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/button_search_widget_voice"
|
android:id="@+id/button_search_widget_voice"
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
|
android:contentDescription="@string/search_widget_voice"
|
||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
app:srcCompat="@drawable/ic_microphone_widget"
|
android:scaleType="centerInside"
|
||||||
android:scaleType="centerInside" />
|
app:srcCompat="@drawable/ic_microphone_widget" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -2,18 +2,18 @@
|
||||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
<!-- 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
|
- 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/. -->
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@id/button_search_widget_new_tab"
|
android:id="@id/button_search_widget_new_tab"
|
||||||
android:layout_width="100dp"
|
android:layout_width="100dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:background="@drawable/rounded_search_widget_background"
|
android:layout_gravity="center"
|
||||||
android:layout_gravity="center"
|
android:background="@drawable/rounded_search_widget_background"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/button_search_widget_new_tab_icon"
|
android:id="@+id/button_search_widget_new_tab_icon"
|
||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:layout_gravity="center"/>
|
android:layout_gravity="center"
|
||||||
|
android:contentDescription="@string/search_widget_content_description" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
|
@ -39,7 +39,7 @@
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
android:contentDescription="@string/tabs_menu_close_all_tabs"
|
android:contentDescription="@string/tabs_menu_close_all_tabs"
|
||||||
app:srcCompat="@drawable/ic_delete"
|
app:srcCompat="@drawable/ic_delete"
|
||||||
android:tint="?primaryText"
|
app:tint="?primaryText"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/tabs_overflow_button"
|
app:layout_constraintEnd_toStartOf="@+id/tabs_overflow_button"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
android:layout_marginStart="12dp"
|
android:layout_marginStart="12dp"
|
||||||
android:paddingBottom="12dp"
|
android:paddingBottom="12dp"
|
||||||
android:importantForAccessibility="no"
|
android:importantForAccessibility="no"
|
||||||
android:tint="@color/primary_text_dark_theme"
|
app:tint="@color/primary_text_dark_theme"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/learn_more"
|
app:layout_constraintBottom_toBottomOf="@id/learn_more"
|
||||||
app:layout_constraintStart_toEndOf="@id/learn_more"
|
app:layout_constraintStart_toEndOf="@id/learn_more"
|
||||||
app:layout_constraintTop_toTopOf="@id/learn_more"
|
app:layout_constraintTop_toTopOf="@id/learn_more"
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/Header16TextStyle"
|
style="@style/Header16TextStyle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginTop="60dp"
|
android:layout_marginTop="60dp"
|
||||||
|
|
|
@ -211,6 +211,8 @@
|
||||||
<string name="search_suggestions_onboarding_learn_more_link">Learn more</string>
|
<string name="search_suggestions_onboarding_learn_more_link">Learn more</string>
|
||||||
|
|
||||||
<!-- Search Widget -->
|
<!-- Search Widget -->
|
||||||
|
<!-- Content description for searching with a widget. Firefox is intentionally hardcoded.-->
|
||||||
|
<string name="search_widget_content_description">Open a new Firefox tab</string>
|
||||||
<!-- Text preview for smaller sized widgets -->
|
<!-- Text preview for smaller sized widgets -->
|
||||||
<string name="search_widget_text_short">Search</string>
|
<string name="search_widget_text_short">Search</string>
|
||||||
<!-- Text preview for larger sized widgets -->
|
<!-- Text preview for larger sized widgets -->
|
||||||
|
@ -615,6 +617,8 @@
|
||||||
<string name="collection_rename">Rename collection</string>
|
<string name="collection_rename">Rename collection</string>
|
||||||
<!-- Text for the button to open tabs of the selected collection -->
|
<!-- Text for the button to open tabs of the selected collection -->
|
||||||
<string name="collection_open_tabs">Open tabs</string>
|
<string name="collection_open_tabs">Open tabs</string>
|
||||||
|
<!-- Hint for adding name of a collection -->
|
||||||
|
<string name="collection_name_hint">Collection name</string>
|
||||||
<!-- Text for the menu button to remove a top site -->
|
<!-- Text for the menu button to remove a top site -->
|
||||||
<string name="remove_top_site">Remove</string>
|
<string name="remove_top_site">Remove</string>
|
||||||
<!-- Text for the menu button to delete a top site from history -->
|
<!-- Text for the menu button to delete a top site from history -->
|
||||||
|
@ -1587,6 +1591,9 @@
|
||||||
The first parameter is the name of the app (e.g. Firefox Preview) -->
|
The first parameter is the name of the app (e.g. Firefox Preview) -->
|
||||||
<string name="onboarding_firefox_account_header">Get the most out of %s.</string>
|
<string name="onboarding_firefox_account_header">Get the most out of %s.</string>
|
||||||
|
|
||||||
|
<!-- Content description radio buttons with a link to more information -->
|
||||||
|
<string name="radio_preference_info_content_description">Click for more details</string>
|
||||||
|
|
||||||
<!-- Deprecated: No Open Tabs Message Header -->
|
<!-- Deprecated: No Open Tabs Message Header -->
|
||||||
<string name="no_collections_header1">Collect the things that matter to you</string>
|
<string name="no_collections_header1">Collect the things that matter to you</string>
|
||||||
<!-- Deprecated: Label to describe what collections are to a new user without any collections -->
|
<!-- Deprecated: Label to describe what collections are to a new user without any collections -->
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
package org.mozilla.fenix.lintrules
|
package org.mozilla.fenix.lintrules
|
||||||
|
|
||||||
import com.android.SdkConstants
|
import com.android.SdkConstants
|
||||||
|
import com.android.SdkConstants.ATTR_STYLE
|
||||||
import com.android.resources.ResourceFolderType
|
import com.android.resources.ResourceFolderType
|
||||||
import com.android.tools.lint.detector.api.Category
|
import com.android.tools.lint.detector.api.Category
|
||||||
import com.android.tools.lint.detector.api.Implementation
|
import com.android.tools.lint.detector.api.Implementation
|
||||||
|
@ -20,8 +21,6 @@ import org.w3c.dom.Element
|
||||||
*/
|
*/
|
||||||
class ButtonStyleXmlDetector : ResourceXmlDetector() {
|
class ButtonStyleXmlDetector : ResourceXmlDetector() {
|
||||||
companion object {
|
companion object {
|
||||||
const val SCHEMA = "http://schemas.android.com/apk/res-auto"
|
|
||||||
|
|
||||||
const val ERROR_MESSAGE =
|
const val ERROR_MESSAGE =
|
||||||
"All buttons must have a style, try using NeutralButton or similar."
|
"All buttons must have a style, try using NeutralButton or similar."
|
||||||
|
|
||||||
|
@ -53,7 +52,7 @@ class ButtonStyleXmlDetector : ResourceXmlDetector() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun visitElement(context: XmlContext, element: Element) {
|
override fun visitElement(context: XmlContext, element: Element) {
|
||||||
if (element.hasAttributeNS(SCHEMA, SdkConstants.ATTR_STYLE)) { return }
|
if (element.hasAttribute(ATTR_STYLE)) { return }
|
||||||
|
|
||||||
context.report(
|
context.report(
|
||||||
issue = ISSUE_XML_STYLE,
|
issue = ISSUE_XML_STYLE,
|
||||||
|
|
Loading…
Reference in New Issue