summaryrefslogtreecommitdiffstats
path: root/mobile/android/base/resources/layout/tabs_panel_default.xml
blob: a5ef871e86dfe8d00445011863fdb1cb658503a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?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/. -->

<merge xmlns:android="http://schemas.android.com/apk/res/android"
       xmlns:gecko="http://schemas.android.com/apk/res-auto">

    <!-- The layout_height value is used in TabsPanel.getTabsLayoutContainerHeight
         and as an offset in PrivateTabsPanel: if you change it here,
         change it there! -->
    <RelativeLayout android:id="@+id/tabs_panel_header"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/browser_toolbar_height">

        <view class="org.mozilla.gecko.tabs.TabsPanel$TabsPanelToolbar"
              android:layout_width="match_parent"
              android:layout_height="@dimen/browser_toolbar_height"
              android:background="@color/text_and_tabs_tray_grey">

            <org.mozilla.gecko.tabs.TabPanelBackButton
                android:id="@+id/nav_back"
                android:layout_width="@dimen/tabs_panel_button_width"
                android:layout_height="match_parent"
                android:minWidth="@dimen/tabs_panel_button_width"
                android:src="@drawable/tabs_panel_nav_back"
                android:contentDescription="@string/back"
                android:background="@drawable/action_bar_button_inverse"
                gecko:dividerVerticalPadding="@dimen/tab_panel_divider_vertical_padding"
                gecko:rightDivider="@drawable/tab_indicator_divider"/>

            <org.mozilla.gecko.widget.IconTabWidget android:id="@+id/tab_widget"
                                                    android:layout_width="wrap_content"
                                                    android:layout_height="match_parent"
                                                    android:tabStripEnabled="false"
                                                    android:divider="@drawable/tab_indicator_divider"
                                                    android:dividerPadding="@dimen/tab_panel_divider_vertical_padding"
                                                    android:layout="@layout/tabs_panel_indicator"/>

            <View android:layout_width="0dip"
                  android:layout_height="match_parent"
                  android:layout_weight="1.0"/>

            <ImageButton android:id="@+id/add_tab"
                         style="@style/UrlBar.ImageButton"
                         android:layout_width="@dimen/tabs_panel_button_width"
                         android:padding="@dimen/browser_toolbar_button_padding"
                         android:src="@drawable/tab_new"
                         android:contentDescription="@string/new_tab"
                         android:background="@drawable/action_bar_button_inverse"/>

            <FrameLayout android:id="@+id/menu"
                         style="@style/UrlBar.ImageButton"
                         android:layout_width="@dimen/tabs_panel_button_width"
                         android:background="@drawable/action_bar_button_inverse"
                         android:contentDescription="@string/menu">

                <ImageView
                        style="@style/UrlBar.ImageButton"
                        android:layout_width="wrap_content"
                        android:layout_height="@dimen/browser_toolbar_menu_icon_height"
                        android:layout_gravity="center"
                        android:scaleType="centerInside"
                        android:src="@drawable/menu"
                        android:tint="@color/tabs_tray_icon_grey"/>

            </FrameLayout>

        </view>

        <View android:layout_width="match_parent"
              android:layout_height="2dp"
              android:layout_alignParentBottom="true"
              android:background="#1A000000"/>

    </RelativeLayout>

    <FrameLayout
          android:id="@+id/tabs_container"
          android:layout_width="match_parent"
          android:layout_height="match_parent">

        <view class="org.mozilla.gecko.tabs.TabsPanel$TabsLayout"
              android:id="@+id/normal_tabs"
              style="@style/TabsLayout"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:choiceMode="singleChoice"
              android:visibility="gone"
              gecko:tabs="tabs_normal"/>

        <org.mozilla.gecko.tabs.PrivateTabsPanel
                android:id="@+id/private_tabs_panel"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:visibility="gone"/>

    </FrameLayout>

</merge>