summaryrefslogtreecommitdiff
path: root/app/src/main/java/foundation/e
diff options
context:
space:
mode:
authorAmit Kumar <amitkma@e.email>2021-05-17 17:02:35 +0530
committerAmit Kumar <amitkma@e.email>2021-05-17 17:02:35 +0530
commitfafd978342abb8332fcf3ed45cdc3b7d437576ba (patch)
treed951b14909c2dc4aab9908edea9da2122550c59d /app/src/main/java/foundation/e
parentbf2276efe67cd653717daf1b9e7b8b582379f6d0 (diff)
Use string resources for titles
Diffstat (limited to 'app/src/main/java/foundation/e')
-rw-r--r--app/src/main/java/foundation/e/privacycentralapp/features/dashboard/DashboardFragment.kt4
-rw-r--r--app/src/main/java/foundation/e/privacycentralapp/features/dashboard/QuickProtectionFragment.kt2
-rw-r--r--app/src/main/java/foundation/e/privacycentralapp/features/internetprivacy/InternetPrivacyFragment.kt2
-rw-r--r--app/src/main/java/foundation/e/privacycentralapp/features/location/FakeLocationFragment.kt5
-rw-r--r--app/src/main/java/foundation/e/privacycentralapp/features/permissions/PermissionAppsFragment.kt2
-rw-r--r--app/src/main/java/foundation/e/privacycentralapp/features/permissions/PermissionsFragment.kt2
6 files changed, 7 insertions, 10 deletions
diff --git a/app/src/main/java/foundation/e/privacycentralapp/features/dashboard/DashboardFragment.kt b/app/src/main/java/foundation/e/privacycentralapp/features/dashboard/DashboardFragment.kt
index 4164fea..c57e6cc 100644
--- a/app/src/main/java/foundation/e/privacycentralapp/features/dashboard/DashboardFragment.kt
+++ b/app/src/main/java/foundation/e/privacycentralapp/features/dashboard/DashboardFragment.kt
@@ -113,10 +113,10 @@ class DashboardFragment :
}
}
- override fun getTitle(): String = "My Privacy Dashboard"
+ override fun getTitle(): String = getString(R.string.privacy_dashboard)
private fun addClickToMore(textView: TextView) {
- val clickToMore = SpannableString("Click to learn more")
+ val clickToMore = SpannableString(getString(R.string.click_to_learn_more))
clickToMore.setSpan(
ForegroundColorSpan(Color.parseColor("#007fff")),
0,
diff --git a/app/src/main/java/foundation/e/privacycentralapp/features/dashboard/QuickProtectionFragment.kt b/app/src/main/java/foundation/e/privacycentralapp/features/dashboard/QuickProtectionFragment.kt
index 442cfd2..727afa9 100644
--- a/app/src/main/java/foundation/e/privacycentralapp/features/dashboard/QuickProtectionFragment.kt
+++ b/app/src/main/java/foundation/e/privacycentralapp/features/dashboard/QuickProtectionFragment.kt
@@ -27,7 +27,7 @@ class QuickProtectionFragment : NavToolbarFragment(R.layout.fragment_quick_prote
private val viewModel: DashboardViewModel by activityViewModels()
- override fun getTitle(): String = "Quick protection"
+ override fun getTitle(): String = getString(R.string.quick_protection)
override fun onAttach(context: Context) {
super.onAttach(context)
diff --git a/app/src/main/java/foundation/e/privacycentralapp/features/internetprivacy/InternetPrivacyFragment.kt b/app/src/main/java/foundation/e/privacycentralapp/features/internetprivacy/InternetPrivacyFragment.kt
index 1844129..5baae81 100644
--- a/app/src/main/java/foundation/e/privacycentralapp/features/internetprivacy/InternetPrivacyFragment.kt
+++ b/app/src/main/java/foundation/e/privacycentralapp/features/internetprivacy/InternetPrivacyFragment.kt
@@ -65,7 +65,7 @@ class InternetPrivacyFragment :
bindClickListeners(view)
}
- override fun getTitle(): String = "My Internet Activity Privacy"
+ override fun getTitle(): String = getString(R.string.internet_activity_privacy)
private fun bindClickListeners(fragmentView: View) {
fragmentView.let {
diff --git a/app/src/main/java/foundation/e/privacycentralapp/features/location/FakeLocationFragment.kt b/app/src/main/java/foundation/e/privacycentralapp/features/location/FakeLocationFragment.kt
index 2d174f0..7281afc 100644
--- a/app/src/main/java/foundation/e/privacycentralapp/features/location/FakeLocationFragment.kt
+++ b/app/src/main/java/foundation/e/privacycentralapp/features/location/FakeLocationFragment.kt
@@ -178,9 +178,7 @@ class FakeLocationFragment :
Mapbox.getInstance(requireContext(), getString(R.string.mapbox_key))
}
- override fun getTitle(): String {
- return getString(R.string.my_location_title)
- }
+ override fun getTitle(): String = getString(R.string.my_location_title)
private fun displayToast(message: String) {
Toast.makeText(requireContext(), message, Toast.LENGTH_SHORT)
@@ -315,7 +313,6 @@ class FakeLocationFragment :
}
override fun render(state: FakeLocationFeature.State) {
- Log.d("FakeMyLocation", "State: $state")
latEditText.text =
Editable.Factory.getInstance().newEditable(state.location.latitude.toString())
longEditText.text =
diff --git a/app/src/main/java/foundation/e/privacycentralapp/features/permissions/PermissionAppsFragment.kt b/app/src/main/java/foundation/e/privacycentralapp/features/permissions/PermissionAppsFragment.kt
index 374a430..72d8b0c 100644
--- a/app/src/main/java/foundation/e/privacycentralapp/features/permissions/PermissionAppsFragment.kt
+++ b/app/src/main/java/foundation/e/privacycentralapp/features/permissions/PermissionAppsFragment.kt
@@ -64,7 +64,7 @@ class PermissionAppsFragment :
.show()
}
- override fun getTitle(): String = "My Apps Permission"
+ override fun getTitle(): String = getString(R.string.apps_permissions)
override fun render(state: PermissionsFeature.State) {
state.currentPermission?.let { permission ->
diff --git a/app/src/main/java/foundation/e/privacycentralapp/features/permissions/PermissionsFragment.kt b/app/src/main/java/foundation/e/privacycentralapp/features/permissions/PermissionsFragment.kt
index 0b03343..be84e31 100644
--- a/app/src/main/java/foundation/e/privacycentralapp/features/permissions/PermissionsFragment.kt
+++ b/app/src/main/java/foundation/e/privacycentralapp/features/permissions/PermissionsFragment.kt
@@ -51,7 +51,7 @@ class PermissionsFragment :
super.onViewCreated(view, savedInstanceState)
}
- override fun getTitle(): String = "My Apps Permission"
+ override fun getTitle(): String = getString(R.string.apps_permissions)
override fun render(state: PermissionsFeature.State) {
view?.findViewById<RecyclerView>(R.id.recylcer_view_permissions)?.apply {