Commit a674c5df authored by Jeff Boek's avatar Jeff Boek
Browse files

For #10504 - cleans up tabLayout colors

parent 4e499e7a
......@@ -70,6 +70,7 @@ import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.IntentReceiverActivity
import org.mozilla.fenix.NavGraphDirections
import org.mozilla.fenix.R
import org.mozilla.fenix.browser.browsingmode.BrowsingMode
import org.mozilla.fenix.browser.readermode.DefaultReaderModeController
import org.mozilla.fenix.components.FenixSnackbar
import org.mozilla.fenix.components.FindInPageIntegration
......@@ -219,7 +220,8 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Session
tabTrayDialog.dismiss()
}
override fun onNewTabTapped() {
override fun onNewTabTapped(private: Boolean) {
(activity as HomeActivity).browsingModeManager.mode = BrowsingMode.fromBoolean(private)
tabTrayDialog.dismiss()
findNavController().navigate(BrowserFragmentDirections.actionGlobalHome())
}
......
......@@ -366,7 +366,8 @@ class HomeFragment : Fragment() {
(activity as HomeActivity).openToBrowser(BrowserDirection.FromHome)
}
override fun onNewTabTapped() {
override fun onNewTabTapped(private: Boolean) {
(activity as HomeActivity).browsingModeManager.mode = BrowsingMode.fromBoolean(private)
tabTrayDialog.dismiss()
}
}
......
......@@ -19,7 +19,7 @@ import org.mozilla.fenix.R
class TabTrayDialogFragment : AppCompatDialogFragment(), TabTrayInteractor {
interface Interactor {
fun onTabSelected(tab: Tab)
fun onNewTabTapped()
fun onNewTabTapped(private: Boolean)
}
private lateinit var tabTrayView: TabTrayView
......@@ -62,7 +62,7 @@ class TabTrayDialogFragment : AppCompatDialogFragment(), TabTrayInteractor {
}
override fun onNewTabTapped(private: Boolean) {
interactor?.onNewTabTapped()
interactor?.onNewTabTapped(private)
}
override fun onTabTrayDismissed() {
......
<?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/. -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?accent" android:state_selected="true" />
<item android:color="?secondaryText"/>
</selector>
\ No newline at end of file
......@@ -11,8 +11,8 @@
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_marginTop="40dp"
android:background="?foundation"
style="@style/BottomSheetModal"
android:backgroundTint="?foundation"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
<View
android:id="@+id/handle"
......@@ -28,7 +28,10 @@
android:id="@+id/tab_layout"
android:layout_width="0dp"
android:layout_height="80dp"
app:tabSelectedTextColor="?accent"
app:tabTextColor="?secondaryText"
app:tabIndicatorColor="?accent"
app:tabIconTint="@color/tab_icon"
app:tabRippleColor="@android:color/transparent"
app:layout_constraintWidth_percent="0.5"
app:layout_constraintTop_toBottomOf="@+id/handle"
......@@ -45,7 +48,7 @@
android:id="@+id/private_tab_item"
android:layout_height="match_parent"
android:layout_width="0dp"
android:icon="@drawable/private_browsing_button"
android:icon="@drawable/ic_private_browsing"
android:text="Private" />
</com.google.android.material.tabs.TabLayout>
<ImageButton
......@@ -69,7 +72,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tab_layout"
mozac:tabsTrayItemBackgroundColor="?tabTrayItemBackground"
mozac:tabsTrayItemBackgroundColor="?foundation"
mozac:tabsTrayItemTextColor="?tabTrayItemText"
mozac:tabsTraySelectedItemBackgroundColor="?tabTrayItemSelectedBackground"
mozac:tabsTraySelectedItemTextColor="?tabTrayItemText"
......
......@@ -11,7 +11,7 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:backgroundTint="@color/photonBlue50"
android:backgroundTint="?accent"
android:contentDescription="TODO: Changeme"
app:srcCompat="@drawable/ic_new"
app:tint="@color/photonWhite" />
......@@ -546,7 +546,9 @@
<item name="cornerFamily">rounded</item>
<item name="cornerSizeTopLeft">16dp</item>
<item name="cornerSizeTopRight">16dp</item>
<item name="colorSurface">?foundation</item>
<item name="colorSurface">@color/photonPurple50</item>
<item name="android:backgroundTint">@color/photonPurple50</item>
<item name="android:colorBackground">@color/photonPurple50</item>
</style>
<style name="BottomSheetModal" parent="Widget.Design.BottomSheet.Modal">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment