Skip to content

Commit

Permalink
For mozilla-mobile#10525 - Remove tab tray item dividers.
Browse files Browse the repository at this point in the history
  • Loading branch information
person808 committed Jun 4, 2020
1 parent 42f58a1 commit 5eb0da1
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 37 deletions.
21 changes: 5 additions & 16 deletions app/src/main/java/org/mozilla/fenix/HomeActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import androidx.annotation.IdRes
import androidx.annotation.VisibleForTesting
import androidx.annotation.VisibleForTesting.PROTECTED
import androidx.appcompat.app.ActionBar
import androidx.appcompat.content.res.AppCompatResources
import androidx.appcompat.widget.Toolbar
import androidx.core.view.doOnPreDraw
import androidx.lifecycle.lifecycleScope
Expand All @@ -24,7 +23,6 @@ import androidx.navigation.NavDirections
import androidx.navigation.fragment.NavHostFragment
import androidx.navigation.ui.AppBarConfiguration
import androidx.navigation.ui.NavigationUI
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import kotlinx.android.synthetic.main.activity_home.*
import kotlinx.coroutines.CoroutineScope
Expand Down Expand Up @@ -54,17 +52,17 @@ import org.mozilla.fenix.browser.browsingmode.DefaultBrowsingModeManager
import org.mozilla.fenix.components.metrics.BreadcrumbsRecorder
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.exceptions.ExceptionsFragmentDirections
import org.mozilla.fenix.ext.alreadyOnDestination
import org.mozilla.fenix.ext.checkAndUpdateScreenshotPermission
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.nav
import org.mozilla.fenix.ext.alreadyOnDestination
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.home.HomeFragmentDirections
import org.mozilla.fenix.home.intent.CrashReporterIntentProcessor
import org.mozilla.fenix.home.intent.DeepLinkIntentProcessor
import org.mozilla.fenix.home.intent.OpenBrowserIntentProcessor
import org.mozilla.fenix.home.intent.StartSearchIntentProcessor
import org.mozilla.fenix.home.intent.CrashReporterIntentProcessor
import org.mozilla.fenix.home.intent.SpeechProcessingIntentProcessor
import org.mozilla.fenix.home.intent.StartSearchIntentProcessor
import org.mozilla.fenix.library.bookmarks.BookmarkFragmentDirections
import org.mozilla.fenix.library.history.HistoryFragmentDirections
import org.mozilla.fenix.perf.Performance
Expand Down Expand Up @@ -235,20 +233,11 @@ open class HomeActivity : LocaleAwareAppCompatActivity() {
}

val adapter = FenixTabsAdapter(context)
val decoration = DividerItemDecoration(
context,
DividerItemDecoration.VERTICAL
)
val drawable = AppCompatResources.getDrawable(context, R.drawable.tab_tray_divider)
drawable?.let {
decoration.setDrawable(it)
}
BrowserTabsTray(
context,
attrs,
tabsAdapter = adapter,
layout = layout,
itemDecoration = decoration
layout = layout
)
}
else -> super.onCreateView(parent, name, context, attrs)
Expand Down
12 changes: 0 additions & 12 deletions app/src/main/res/drawable/tab_tray_divider.xml

This file was deleted.

4 changes: 0 additions & 4 deletions app/src/main/res/values-ldrtl/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,4 @@
<resources>
<!-- Onboarding -->
<dimen name="onboarding_dual_pane_radio_button_translation_x">7dp</dimen>

<!-- Tabs Tray -->
<dimen name="tab_tray_divider_margin_start">0dp</dimen>
<dimen name="tab_tray_divider_margin_end">124dp</dimen>
</resources>
1 change: 0 additions & 1 deletion app/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
<attr name="tabTrayItemBackground" format="reference" />
<attr name="tabTrayItemSelectedBackground" format="reference" />
<attr name="tabTrayToolbarBackground" format="reference" />
<attr name="tabTrayItemDivider" format="reference" />
<attr name="tabTrayItemMediaBackground" format="reference" />
<attr name="tabTrayHeadingIcon" format="reference" />
<attr name="tabTrayHeadingIconInactive" format="reference" />
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@
<dimen name="addon_details_rating_view_margin_end">6dp</dimen>

<!-- Tabs Tray -->
<dimen name="tab_tray_divider_margin_start">124dp</dimen>
<dimen name="tab_tray_divider_margin_end">0dp</dimen>
<dimen name="tab_tray_top_offset">40dp</dimen>

<!-- Saved Logins Fragment -->
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
<item name="tabTrayItemBackground">@color/tab_tray_item_background_normal_theme</item>
<item name="tabTrayItemSelectedBackground">@color/tab_tray_item_selected_background_normal_theme</item>
<item name="tabTrayToolbarBackground">@color/tab_tray_toolbar_background_normal_theme</item>
<item name="tabTrayItemDivider">@color/tab_tray_item_divider_normal_theme</item>
<item name="tabTrayItemMediaBackground">@color/tab_tray_item_media_background_normal_theme</item>
<item name="tabTrayHeadingIcon">@color/tab_tray_heading_icon_normal_theme</item>
<item name="tabTrayHeadingIconInactive">@color/tab_tray_heading_icon_inactive_normal_theme</item>
Expand Down Expand Up @@ -203,7 +202,6 @@
<item name="tabTrayItemBackground">@color/tab_tray_item_background_normal_theme</item>
<item name="tabTrayItemSelectedBackground">@color/tab_tray_item_selected_background_private_theme</item>
<item name="tabTrayToolbarBackground">@color/tab_tray_toolbar_background_private_theme</item>
<item name="tabTrayItemDivider">@color/tab_tray_item_divider_private_theme</item>
<item name="tabTrayItemMediaBackground">@color/tab_tray_item_media_background_private_theme</item>
<item name="tabTrayHeadingIcon">@color/tab_tray_heading_icon_dark_theme</item>
<item name="tabTrayHeadingIconInactive">@color/tab_tray_heading_icon_inactive_dark_theme</item>
Expand Down

0 comments on commit 5eb0da1

Please sign in to comment.