Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1821430 - Update strings in the ETP settings screen part 2. Use t…
…he new strings and update the layout (#1213) Co-authored-by: t-p-white <t-p-white> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
e83ae92
commit 4ea5308
Showing
13 changed files
with
386 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
fenix/app/src/main/java/org/mozilla/fenix/settings/FenixSwitchPreference.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* 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/. */ | ||
|
||
package org.mozilla.fenix.settings | ||
|
||
import android.content.Context | ||
import android.util.AttributeSet | ||
import androidx.preference.CheckBoxPreference | ||
import androidx.preference.SwitchPreference | ||
import org.mozilla.fenix.R | ||
|
||
/** | ||
* Switch Preference that adheres to Fenix styling. | ||
* | ||
* **Note:** The [SwitchPreference] layout internal id "switch_widget" has a min API of 24, so we use | ||
* [CheckBoxPreference] instead and use the layout internal id "checkbox". | ||
*/ | ||
class FenixSwitchPreference @JvmOverloads constructor( | ||
context: Context, | ||
attrs: AttributeSet? = null, | ||
) : CheckBoxPreference(context, attrs) { | ||
init { | ||
layoutResource = R.layout.preference_widget_switch_fenix_style | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.