parent
72d8dfb976
commit
c6c827f693
|
@ -54,7 +54,7 @@ import org.mozilla.fenix.library.bookmarks.BookmarkFragmentDirections
|
|||
import org.mozilla.fenix.library.history.HistoryFragmentDirections
|
||||
import org.mozilla.fenix.perf.HotStartPerformanceMonitor
|
||||
import org.mozilla.fenix.search.SearchFragmentDirections
|
||||
import org.mozilla.fenix.settings.AboutFragmentDirections
|
||||
import org.mozilla.fenix.settings.about.AboutFragmentDirections
|
||||
import org.mozilla.fenix.settings.DefaultBrowserSettingsFragmentDirections
|
||||
import org.mozilla.fenix.settings.SettingsFragmentDirections
|
||||
import org.mozilla.fenix.settings.TrackingProtectionFragmentDirections
|
||||
|
|
|
@ -1,95 +0,0 @@
|
|||
/* 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.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.os.Build
|
||||
import android.os.Build.VERSION.SDK_INT
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.core.content.pm.PackageInfoCompat
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
|
||||
import kotlinx.android.synthetic.main.fragment_about.*
|
||||
import org.mozilla.fenix.BrowserDirection
|
||||
import org.mozilla.fenix.BuildConfig
|
||||
import org.mozilla.fenix.HomeActivity
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.components.metrics.Event
|
||||
import org.mozilla.fenix.ext.metrics
|
||||
import org.mozilla.fenix.whatsnew.WhatsNew
|
||||
import org.mozilla.geckoview.BuildConfig as GeckoViewBuildConfig
|
||||
|
||||
/**
|
||||
* Displays the logo and information about the app, including library versions.
|
||||
*/
|
||||
class AboutFragment : Fragment(R.layout.fragment_about) {
|
||||
|
||||
/**
|
||||
* Sets the activity title, displays library version strings, and sets up the [view_licenses_button].
|
||||
*/
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
val appName = getString(R.string.app_name)
|
||||
activity?.title = getString(R.string.preferences_about, appName)
|
||||
|
||||
val aboutText = try {
|
||||
val packageInfo = requireContext().packageManager.getPackageInfo(requireContext().packageName, 0)
|
||||
val versionCode = PackageInfoCompat.getLongVersionCode(packageInfo).toString()
|
||||
val componentsVersion = mozilla.components.Build.version + ", " + mozilla.components.Build.gitHash
|
||||
val maybeGecko = if (SDK_INT >= Build.VERSION_CODES.N) GECKO_EMOJI else "GV"
|
||||
val geckoVersion = GeckoViewBuildConfig.MOZ_APP_VERSION + "-" + GeckoViewBuildConfig.MOZ_APP_BUILDID
|
||||
|
||||
String.format(
|
||||
"%s (Build #%s)\n%s: %s\n%s: %s",
|
||||
packageInfo.versionName,
|
||||
versionCode,
|
||||
COMPONENTS_EMOJI,
|
||||
componentsVersion,
|
||||
maybeGecko,
|
||||
geckoVersion
|
||||
)
|
||||
} catch (e: PackageManager.NameNotFoundException) {
|
||||
""
|
||||
}
|
||||
|
||||
val content = getString(R.string.about_content, appName)
|
||||
val buildDate = BuildConfig.BUILD_DATE
|
||||
|
||||
about_text.text = aboutText
|
||||
about_content.text = content
|
||||
build_date.text = buildDate
|
||||
|
||||
view_licenses_button.setOnClickListener {
|
||||
startActivity(Intent(context, OssLicensesMenuActivity::class.java))
|
||||
OssLicensesMenuActivity.setActivityTitle(getString(R.string.open_source_licenses_title, appName))
|
||||
}
|
||||
|
||||
with(whats_new_button) {
|
||||
text = getString(R.string.about_whats_new, getString(R.string.app_name))
|
||||
setOnClickListener {
|
||||
context.metrics.track(Event.WhatsNewTapped(Event.WhatsNewTapped.Source.ABOUT))
|
||||
WhatsNew.userViewedWhatsNew(context!!)
|
||||
(activity as HomeActivity).openToBrowserAndLoad(
|
||||
searchTermOrURL = SupportUtils.getSumoURLForTopic(
|
||||
context!!,
|
||||
SupportUtils.SumoTopic.WHATS_NEW
|
||||
),
|
||||
newTab = true,
|
||||
from = BrowserDirection.FromAbout
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val COMPONENTS_EMOJI = "\uD83D\uDCE6"
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
private const val GECKO_EMOJI = "\uD83E\uDD8E"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,168 @@
|
|||
/* 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.about
|
||||
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.content.pm.PackageInfoCompat
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.recyclerview.widget.DividerItemDecoration
|
||||
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
|
||||
import kotlinx.android.synthetic.main.fragment_about.*
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import org.mozilla.fenix.BuildConfig
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.components.metrics.Event
|
||||
import org.mozilla.fenix.ext.requireComponents
|
||||
import org.mozilla.fenix.lib.Do
|
||||
import org.mozilla.fenix.settings.SupportUtils
|
||||
import org.mozilla.fenix.settings.about.AboutItemType.LICENSING_INFO
|
||||
import org.mozilla.fenix.settings.about.AboutItemType.PRIVACY_NOTICE
|
||||
import org.mozilla.fenix.settings.about.AboutItemType.RIGHTS
|
||||
import org.mozilla.fenix.settings.about.AboutItemType.SUPPORT
|
||||
import org.mozilla.fenix.settings.about.AboutItemType.WHATS_NEW
|
||||
import org.mozilla.fenix.whatsnew.WhatsNew
|
||||
import org.mozilla.geckoview.BuildConfig as GeckoViewBuildConfig
|
||||
|
||||
/**
|
||||
* Displays the logo and information about the app, including library versions.
|
||||
*/
|
||||
class AboutFragment : Fragment(), AboutPageListener {
|
||||
private lateinit var appName: String
|
||||
private val aboutPageAdapter: AboutPageAdapter = AboutPageAdapter(this)
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
val rootView = inflater.inflate(R.layout.fragment_about, container, false)
|
||||
appName = getString(R.string.app_name)
|
||||
activity?.title = getString(R.string.preferences_about, appName)
|
||||
|
||||
return rootView
|
||||
}
|
||||
|
||||
@ExperimentalCoroutinesApi
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
about_list.run {
|
||||
adapter = aboutPageAdapter
|
||||
addItemDecoration(
|
||||
DividerItemDecoration(
|
||||
context,
|
||||
DividerItemDecoration.VERTICAL
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
populateAboutHeader()
|
||||
aboutPageAdapter.updateData(populateAboutList())
|
||||
}
|
||||
|
||||
private fun populateAboutHeader() {
|
||||
val aboutText = try {
|
||||
val packageInfo = requireContext().packageManager.getPackageInfo(requireContext().packageName, 0)
|
||||
val versionCode = PackageInfoCompat.getLongVersionCode(packageInfo).toString()
|
||||
val componentsVersion = mozilla.components.Build.version + ", " + mozilla.components.Build.gitHash
|
||||
val maybeGecko = getString(R.string.gecko_view_abbreviation)
|
||||
val geckoVersion = GeckoViewBuildConfig.MOZ_APP_VERSION + "-" + GeckoViewBuildConfig.MOZ_APP_BUILDID
|
||||
|
||||
String.format(
|
||||
"%s (Build #%s)\n%s\n%s: %s",
|
||||
packageInfo.versionName,
|
||||
versionCode,
|
||||
componentsVersion,
|
||||
maybeGecko,
|
||||
geckoVersion
|
||||
)
|
||||
} catch (e: PackageManager.NameNotFoundException) {
|
||||
""
|
||||
}
|
||||
|
||||
val content = getString(R.string.about_content, appName)
|
||||
val buildDate = BuildConfig.BUILD_DATE
|
||||
|
||||
about_text.text = aboutText
|
||||
about_content.text = content
|
||||
build_date.text = buildDate
|
||||
}
|
||||
|
||||
private fun populateAboutList(): List<AboutPageItem> {
|
||||
val context = requireContext()
|
||||
|
||||
return listOf(
|
||||
AboutPageItem.Item(
|
||||
AboutItem.ExternalLink(
|
||||
WHATS_NEW,
|
||||
SupportUtils.getSumoURLForTopic(context, SupportUtils.SumoTopic.WHATS_NEW)
|
||||
), getString(R.string.about_whats_new, getString(R.string.app_name))
|
||||
),
|
||||
AboutPageItem.Item(
|
||||
AboutItem.ExternalLink(
|
||||
SUPPORT,
|
||||
SupportUtils.getSumoURLForTopic(context, SupportUtils.SumoTopic.HELP)
|
||||
), getString(R.string.about_support)
|
||||
),
|
||||
AboutPageItem.Item(
|
||||
AboutItem.ExternalLink(
|
||||
PRIVACY_NOTICE,
|
||||
SupportUtils.getPrivacyNoticeUrl()
|
||||
), getString(R.string.about_privacy_notice)
|
||||
),
|
||||
AboutPageItem.Item(
|
||||
AboutItem.ExternalLink(
|
||||
RIGHTS,
|
||||
SupportUtils.getSumoURLForTopic(context, SupportUtils.SumoTopic.YOUR_RIGHTS)
|
||||
), getString(R.string.about_know_your_rights)
|
||||
),
|
||||
AboutPageItem.Item(
|
||||
AboutItem.ExternalLink(LICENSING_INFO, ABOUT_LICENSE_URL),
|
||||
getString(R.string.about_licensing_information)
|
||||
),
|
||||
AboutPageItem.Item(
|
||||
AboutItem.Libraries,
|
||||
getString(R.string.about_other_open_source_libraries)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private fun openLinkInCustomTab(url: String) {
|
||||
context?.let { context ->
|
||||
val intent = SupportUtils.createCustomTabIntent(context, url)
|
||||
startActivity(intent)
|
||||
}
|
||||
}
|
||||
|
||||
private fun openLibrariesPage() {
|
||||
startActivity(Intent(context, OssLicensesMenuActivity::class.java))
|
||||
OssLicensesMenuActivity.setActivityTitle(getString(R.string.open_source_licenses_title, appName))
|
||||
}
|
||||
|
||||
override fun onAboutItemClicked(item: AboutItem) {
|
||||
Do exhaustive when (item) {
|
||||
is AboutItem.ExternalLink -> {
|
||||
if (item.type == WHATS_NEW) {
|
||||
WhatsNew.userViewedWhatsNew(requireContext())
|
||||
requireComponents.analytics.metrics.track(Event.WhatsNewTapped(Event.WhatsNewTapped.Source.ABOUT))
|
||||
}
|
||||
|
||||
openLinkInCustomTab(item.url)
|
||||
}
|
||||
is AboutItem.Libraries -> {
|
||||
openLibrariesPage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val ABOUT_LICENSE_URL = "about:license"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
/* 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.about
|
||||
|
||||
sealed class AboutItem {
|
||||
data class ExternalLink(val type: AboutItemType, val url: String) : AboutItem()
|
||||
object Libraries : AboutItem()
|
||||
}
|
||||
|
||||
enum class AboutItemType {
|
||||
WHATS_NEW, SUPPORT, PRIVACY_NOTICE, RIGHTS, LICENSING_INFO
|
||||
}
|
||||
|
||||
sealed class AboutPageItem {
|
||||
data class Item(val type: AboutItem, val title: String) : AboutPageItem()
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
/* 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.about
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import org.mozilla.fenix.settings.about.viewholders.AboutItemViewHolder
|
||||
|
||||
class AboutPageAdapter(private val listener: AboutPageListener) : RecyclerView.Adapter<AboutItemViewHolder>() {
|
||||
|
||||
private var aboutList: List<AboutPageItem>? = null
|
||||
|
||||
fun updateData(items: List<AboutPageItem>) {
|
||||
this.aboutList = items
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AboutItemViewHolder {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(AboutItemViewHolder.LAYOUT_ID, parent, false)
|
||||
|
||||
return AboutItemViewHolder(view, listener)
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = aboutList?.size ?: 0
|
||||
|
||||
override fun onBindViewHolder(holder: AboutItemViewHolder, position: Int) {
|
||||
(aboutList?.get(position) as AboutPageItem.Item).also {
|
||||
holder.bind(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface AboutPageListener {
|
||||
fun onAboutItemClicked(item: AboutItem)
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
/* 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.about.viewholders
|
||||
|
||||
import android.view.View
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import kotlinx.android.synthetic.main.about_list_item.view.*
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.settings.about.AboutPageItem
|
||||
import org.mozilla.fenix.settings.about.AboutPageListener
|
||||
|
||||
class AboutItemViewHolder(
|
||||
view: View,
|
||||
listener: AboutPageListener
|
||||
) : RecyclerView.ViewHolder(view) {
|
||||
|
||||
private val title = view.about_item_title
|
||||
private lateinit var item: AboutPageItem.Item
|
||||
|
||||
init {
|
||||
itemView.setOnClickListener {
|
||||
listener.onAboutItemClicked(item.type)
|
||||
}
|
||||
}
|
||||
|
||||
fun bind(item: AboutPageItem.Item) {
|
||||
this.item = item
|
||||
title.text = item.title
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val LAYOUT_ID = R.layout.about_list_item
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
<?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
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/about_list_item_height"
|
||||
android:background="?android:attr/selectableItemBackground">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_item_title"
|
||||
style="@style/AboutItemText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="What's new in Firefox Preview" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -2,100 +2,111 @@
|
|||
<!-- 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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="org.mozilla.fenix.settings.AboutFragment">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/about_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
tools:context="org.mozilla.fenix.settings.about.AboutFragment">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/wordmark"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="80dp"
|
||||
android:contentDescription="@string/app_name"
|
||||
android:importantForAccessibility="no"
|
||||
app:srcCompat="?fenixLogo"
|
||||
app:layout_constraintWidth_percent="0.75"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
android:id="@+id/wordmark"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/about_header_fenix_logo_height"
|
||||
android:layout_marginStart="@dimen/about_header_icon_margin_start_end"
|
||||
android:layout_marginTop="@dimen/about_header_icon_margin_top"
|
||||
android:layout_marginEnd="@dimen/about_header_icon_margin_start_end"
|
||||
android:contentDescription="@string/app_name"
|
||||
android:importantForAccessibility="no"
|
||||
android:src="?fenixLogo"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.75" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
android:textIsSelectable="true"
|
||||
android:layout_marginTop="24dp"
|
||||
app:layout_constraintWidth_percent="0.8"
|
||||
app:layout_constraintTop_toBottomOf="@id/wordmark"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:text="1.0.x (Build #x)\nGV: 69.x-x\nAC: 1.0.0"
|
||||
android:textAlignment="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintWidth_percent="0.8"
|
||||
app:layout_constraintTop_toBottomOf="@id/about_text"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:text="@string/about_content"
|
||||
android:textAlignment="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/build_date"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:textSize="16sp"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintWidth_percent="0.8"
|
||||
app:layout_constraintTop_toBottomOf="@id/about_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:text="Monday 1/2 @ 5:00 PM"
|
||||
android:textAlignment="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/view_licenses_button"
|
||||
android:layout_margin="16dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/about_open_source_licenses"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?accent"
|
||||
android:textStyle="bold"
|
||||
android:textAllCaps="false"
|
||||
app:layout_constraintTop_toBottomOf="@id/build_date"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/whats_new_button"
|
||||
android:layout_margin="16dp"
|
||||
android:id="@+id/about_content"
|
||||
style="@style/Header16TextStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/about_whats_new"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?accent"
|
||||
android:textStyle="bold"
|
||||
android:textAllCaps="false"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_licenses_button"
|
||||
android:layout_marginTop="@dimen/about_header_title_margin_top"
|
||||
android:paddingStart="@dimen/about_header_title_padding_start_end"
|
||||
android:paddingEnd="@dimen/about_header_title_padding_start_end"
|
||||
android:textAlignment="center"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
app:layout_constraintTop_toBottomOf="@id/wordmark"
|
||||
app:layout_constraintWidth_percent="0.8"
|
||||
tools:text="@string/about_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_text"
|
||||
style="@style/AboutHeaderContentText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/about_header_build_info_margin_top"
|
||||
android:textAlignment="center"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/about_content"
|
||||
app:layout_constraintWidth_percent="0.8"
|
||||
tools:text="1.0.x (Build #x)\nGV: 69.x-x\nAC: 1.0.0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/build_date"
|
||||
style="@style/AboutHeaderContentText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/about_header_build_date_margin_top"
|
||||
android:textAlignment="center"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/about_text"
|
||||
app:layout_constraintWidth_percent="0.8"
|
||||
tools:text="Monday 1/2 @ 5:00 PM" />
|
||||
|
||||
<Space
|
||||
android:id="@+id/space"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/divider"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/build_date"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="@dimen/about_list_margin_top"
|
||||
android:background="?android:attr/listDivider"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/space"
|
||||
app:layout_constraintBottom_toTopOf="@+id/about_list"/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/about_list"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:nestedScrollingEnabled="false"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/divider"
|
||||
tools:listitem="@layout/about_list_item" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</ScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
|
|
@ -456,7 +456,7 @@
|
|||
|
||||
<fragment
|
||||
android:id="@+id/aboutFragment"
|
||||
android:name="org.mozilla.fenix.settings.AboutFragment"
|
||||
android:name="org.mozilla.fenix.settings.about.AboutFragment"
|
||||
android:label="AboutFragment">
|
||||
<action
|
||||
android:id="@+id/action_aboutFragment_to_browserFragment"
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
<color name="toolbar_divider_color_normal_theme">@color/toolbar_divider_color_dark_theme</color>
|
||||
<color name="fill_link_from_clipboard_normal_theme">@color/accent_on_dark_background_normal_theme</color>
|
||||
<color name="menu_category_normal_theme">@color/primary_text_normal_theme</color>
|
||||
<color name="about_content_text_normal_theme">@color/about_content_text_dark_theme</color>
|
||||
|
||||
|
||||
<!-- Collection icons-->
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
<color name="toolbar_end_gradient_light_theme">@color/foundation_light_theme</color>
|
||||
<color name="toolbar_divider_color_light_theme">#CDCCCF</color>
|
||||
<color name="fill_link_from_clipboard_light_theme">@color/accent_light_theme</color>
|
||||
<color name="about_content_text_light_theme">#232749</color>
|
||||
|
||||
<!-- Dark theme color palette -->
|
||||
<color name="primary_text_dark_theme">#FBFBFE</color>
|
||||
|
@ -62,6 +63,7 @@
|
|||
<color name="toolbar_end_gradient_dark_theme">@color/foundation_dark_theme</color>
|
||||
<color name="toolbar_divider_color_dark_theme">@color/neutral_faded_dark_theme</color>
|
||||
<color name="fill_link_from_clipboard_dark_theme">@color/accent_on_dark_background_normal_theme</color>
|
||||
<color name="about_content_text_dark_theme">#FBFBFE</color>
|
||||
|
||||
<!-- Private theme color palette -->
|
||||
<color name="primary_text_private_theme">#FBFBFE</color>
|
||||
|
@ -117,7 +119,7 @@
|
|||
<color name="toolbar_divider_color_normal_theme">@color/toolbar_divider_color_light_theme</color>
|
||||
<color name="fill_link_from_clipboard_normal_theme">@color/fill_link_from_clipboard_light_theme</color>
|
||||
<color name="menu_category_normal_theme">@color/accent_light_theme</color>
|
||||
|
||||
<color name="about_content_text_normal_theme">@color/about_content_text_light_theme</color>
|
||||
|
||||
<!-- Bookmark buttons -->
|
||||
<color name="bookmark_favicon_background">#DFDFE3</color>
|
||||
|
|
|
@ -79,6 +79,18 @@
|
|||
<dimen name="search_fragment_shortcuts_label_text_size">12sp</dimen>
|
||||
<dimen name="search_fragment_clipboard_title_text_size">15sp</dimen>
|
||||
|
||||
|
||||
<!-- About Fragment -->
|
||||
<dimen name="about_list_item_height">56dp</dimen>
|
||||
<dimen name="about_list_item_text_padding">8dp</dimen>
|
||||
<dimen name="about_header_fenix_logo_height">80dp</dimen>
|
||||
<dimen name="about_header_icon_margin_top">36dp</dimen>
|
||||
<dimen name="about_header_icon_margin_start_end">84dp</dimen>
|
||||
<dimen name="about_header_title_margin_top">16dp</dimen>
|
||||
<dimen name="about_header_title_padding_start_end">84dp</dimen>
|
||||
<dimen name="about_header_build_info_margin_top">24dp</dimen>
|
||||
<dimen name="about_header_build_date_margin_top">24dp</dimen>
|
||||
<dimen name="about_list_margin_top">36dp</dimen>
|
||||
<dimen name="about_items_text_size">16sp</dimen>
|
||||
<dimen name="about_header_text_line_spacing_extra">4dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -24,4 +24,7 @@
|
|||
|
||||
<!--suppress CheckTagEmptyBody This is a default value for places where we don't want a string set-->
|
||||
<string name="empty_string" translatable="false"></string>
|
||||
|
||||
<!-- GeckoView abbreviation used in AboutFragment -->
|
||||
<string name="gecko_view_abbreviation" translatable="false">GV</string>
|
||||
</resources>
|
||||
|
|
|
@ -941,6 +941,17 @@
|
|||
The first parameter is the app name -->
|
||||
<string name="open_source_licenses_title">%s | OSS Libraries</string>
|
||||
|
||||
<!-- About page link text to open support link -->
|
||||
<string name="about_support">Support</string>
|
||||
<!-- About page link text to open privacy notice link -->
|
||||
<string name="about_privacy_notice">Privacy notice</string>
|
||||
<!-- About page link text to open know your rights link -->
|
||||
<string name="about_know_your_rights">Know your rights</string>
|
||||
<!-- About page link text to open licensing information link -->
|
||||
<string name="about_licensing_information">Licensing information</string>
|
||||
<!-- About page link text to open a screen with libraries that are used -->
|
||||
<string name="about_other_open_source_libraries">Libraries that we use</string>
|
||||
|
||||
<!-- Content description of the tab counter toolbar button when one tab is open -->
|
||||
<string name="tab_counter_content_description_one_tab">1 tab</string>
|
||||
<!-- Content description of the tab counter toolbar button when multiple tabs are open. First parameter will be replaced with the number of tabs (always more than one) -->
|
||||
|
|
|
@ -355,7 +355,24 @@
|
|||
|
||||
<style name="ShareDialogStyle" parent="DialogStyleBase"/>
|
||||
|
||||
<style name="AboutItemText" parent="TextAppearance.MaterialComponents.Body2">
|
||||
<item name="android:textColor">?accentBright</item>
|
||||
<item name="android:textSize">@dimen/about_items_text_size</item>
|
||||
<item name="android:paddingStart">@dimen/about_list_item_text_padding</item>
|
||||
<item name="android:paddingEnd">@dimen/about_list_item_text_padding</item>
|
||||
<item name="android:ellipsize">end</item>
|
||||
<item name="android:maxLines">1</item>
|
||||
<item name="android:minLines">1</item>
|
||||
<item name="fontFamily">sans-serif-medium</item>
|
||||
</style>
|
||||
|
||||
<style name="AboutHeaderContentText" parent="TextAppearance.MaterialComponents.Subtitle1">
|
||||
<item name="android:textColor">@color/about_content_text_normal_theme</item>
|
||||
<item name="android:lineSpacingExtra">@dimen/about_header_text_line_spacing_extra</item>
|
||||
</style>
|
||||
|
||||
<style name="EngineTextField" parent="TextAppearance.AppCompat">
|
||||
<item name="android:textSize">14sp</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -88,9 +88,6 @@
|
|||
android:icon="@drawable/ic_data_collection"
|
||||
android:key="@string/pref_key_data_choices"
|
||||
android:title="@string/preferences_data_collection" />
|
||||
<androidx.preference.Preference
|
||||
android:key="@string/pref_key_privacy_link"
|
||||
android:title="@string/preferences_privacy_link" />
|
||||
<androidx.preference.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:icon="@drawable/ic_info"
|
||||
|
@ -112,10 +109,6 @@
|
|||
<androidx.preference.PreferenceCategory
|
||||
android:title="@string/preferences_category_about"
|
||||
app:iconSpaceReserved="false">
|
||||
<androidx.preference.Preference
|
||||
android:icon="@drawable/ic_help"
|
||||
android:key="@string/pref_key_help"
|
||||
android:title="@string/preferences_help" />
|
||||
<androidx.preference.Preference
|
||||
android:icon="@drawable/ic_bookmark_outline"
|
||||
android:key="@string/pref_key_rate"
|
||||
|
|
Loading…
Reference in New Issue