Skip to content

Commit c3d04e7

Browse files
theck130nko
authored andcommitted
Update advanced toolbar layout to stick ellipsis buttons right
1 parent 9f3ff46 commit c3d04e7

File tree

1 file changed

+159
-147
lines changed

1 file changed

+159
-147
lines changed

aztec/src/main/res/layout/aztec_format_bar_advanced.xml

Lines changed: 159 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -27,162 +27,175 @@
2727
android:paddingRight="@dimen/format_bar_right_margin"
2828
tools:ignore="RtlHardcoded,RtlSymmetry" >
2929

30-
<RelativeLayout
30+
<LinearLayout
3131
android:layout_height="match_parent"
32-
android:layout_width="wrap_content" >
32+
android:layout_width="wrap_content"
33+
android:orientation="horizontal" >
3334

34-
<LinearLayout
35-
android:id="@+id/format_bar_button_layout_expanded"
35+
<RelativeLayout
3636
android:layout_height="match_parent"
37-
android:layout_toRightOf="@+id/format_bar_button_layout_collapsed"
38-
android:layout_width="wrap_content"
39-
android:orientation="horizontal"
40-
tools:visibility="gone" >
41-
42-
<org.wordpress.aztec.toolbar.RippleToggleButton
43-
android:id="@+id/format_bar_button_link"
44-
android:background="@drawable/format_bar_button_link_selector"
45-
android:contentDescription="@string/format_bar_description_link"
46-
android:layout_height="fill_parent"
47-
android:layout_width="wrap_content"
48-
style="@style/FormatBarButton" >
49-
</org.wordpress.aztec.toolbar.RippleToggleButton>
50-
51-
<org.wordpress.aztec.toolbar.RippleToggleButton
52-
android:id="@+id/format_bar_button_underline"
53-
android:background="@drawable/format_bar_button_underline_selector"
54-
android:contentDescription="@string/format_bar_description_underline"
55-
android:layout_height="fill_parent"
56-
android:layout_width="wrap_content"
57-
style="@style/FormatBarButton" >
58-
</org.wordpress.aztec.toolbar.RippleToggleButton>
59-
60-
<org.wordpress.aztec.toolbar.RippleToggleButton
61-
android:id="@+id/format_bar_button_strikethrough"
62-
android:background="@drawable/format_bar_button_strikethrough_selector"
63-
android:contentDescription="@string/format_bar_description_strike"
64-
android:layout_height="fill_parent"
65-
android:layout_width="wrap_content"
66-
style="@style/FormatBarButton" >
67-
</org.wordpress.aztec.toolbar.RippleToggleButton>
68-
69-
<org.wordpress.aztec.toolbar.RippleToggleButton
70-
android:id="@+id/format_bar_button_horizontal_rule"
71-
android:background="@drawable/format_bar_button_horizontal_rule_selector"
72-
android:contentDescription="@string/format_bar_description_horizontal_rule"
73-
android:layout_height="fill_parent"
74-
android:layout_width="wrap_content"
75-
style="@style/FormatBarButton" >
76-
</org.wordpress.aztec.toolbar.RippleToggleButton>
77-
78-
<org.wordpress.aztec.toolbar.RippleToggleButton
79-
android:id="@+id/format_bar_button_more"
80-
android:background="@drawable/format_bar_button_more_selector"
81-
android:contentDescription="@string/format_bar_description_more"
82-
android:layout_height="fill_parent"
83-
android:layout_width="wrap_content"
84-
style="@style/FormatBarButton" >
85-
</org.wordpress.aztec.toolbar.RippleToggleButton>
86-
87-
<!--TODO: Remove android:visibility="gone" when Page Break is to be added back as a feature-->
88-
<org.wordpress.aztec.toolbar.RippleToggleButton
89-
android:id="@+id/format_bar_button_page"
90-
android:background="@drawable/format_bar_button_page_selector"
91-
android:contentDescription="@string/format_bar_description_page"
92-
android:layout_height="fill_parent"
93-
android:layout_width="wrap_content"
94-
android:visibility="gone"
95-
style="@style/FormatBarButton" >
96-
</org.wordpress.aztec.toolbar.RippleToggleButton>
97-
98-
<org.wordpress.aztec.toolbar.RippleToggleButton
99-
android:id="@+id/format_bar_button_html"
100-
android:background="@drawable/format_bar_button_html_selector"
101-
android:contentDescription="@string/format_bar_description_html"
102-
android:layout_height="fill_parent"
103-
android:layout_width="wrap_content"
104-
style="@style/FormatBarButton" >
105-
</org.wordpress.aztec.toolbar.RippleToggleButton>
106-
107-
</LinearLayout>
37+
android:layout_width="wrap_content" >
10838

109-
<LinearLayout
110-
android:id="@+id/format_bar_button_layout_collapsed"
111-
android:background="@color/format_bar_background"
112-
android:layout_height="match_parent"
113-
android:layout_width="wrap_content"
114-
android:orientation="horizontal" >
115-
116-
<org.wordpress.aztec.toolbar.RippleToggleButton
117-
android:id="@+id/format_bar_button_media"
118-
android:background="@drawable/format_bar_button_media_selector"
119-
android:contentDescription="@string/format_bar_description_media"
120-
android:layout_height="fill_parent"
121-
android:layout_width="wrap_content"
122-
style="@style/FormatBarButton" >
123-
</org.wordpress.aztec.toolbar.RippleToggleButton>
124-
125-
<View
126-
android:id="@+id/format_bar_vertical_divider"
127-
android:layout_height="fill_parent"
128-
android:layout_width="@dimen/format_bar_horizontal_divider_height"
129-
style="@style/DividerVertical" >
130-
</View>
131-
132-
<org.wordpress.aztec.toolbar.RippleToggleButton
133-
android:id="@+id/format_bar_button_heading"
134-
android:background="@drawable/format_bar_button_heading_selector"
135-
android:contentDescription="@string/format_bar_description_heading"
136-
android:layout_height="fill_parent"
137-
android:layout_marginLeft="@dimen/format_bar_left_margin"
138-
android:layout_width="wrap_content"
139-
style="@style/FormatBarButton" >
140-
</org.wordpress.aztec.toolbar.RippleToggleButton>
141-
142-
<org.wordpress.aztec.toolbar.RippleToggleButton
143-
android:id="@+id/format_bar_button_list"
144-
android:background="@drawable/format_bar_button_ul_selector"
145-
android:contentDescription="@string/format_bar_description_list"
146-
android:layout_height="fill_parent"
39+
<LinearLayout
40+
android:id="@+id/format_bar_button_layout_expanded"
41+
android:layout_height="match_parent"
42+
android:layout_toRightOf="@+id/format_bar_button_layout_collapsed"
14743
android:layout_width="wrap_content"
148-
style="@style/FormatBarButton" >
149-
</org.wordpress.aztec.toolbar.RippleToggleButton>
150-
151-
<org.wordpress.aztec.toolbar.RippleToggleButton
152-
android:id="@+id/format_bar_button_quote"
153-
android:background="@drawable/format_bar_button_quote_selector"
154-
android:contentDescription="@string/format_bar_description_quote"
155-
android:layout_height="fill_parent"
44+
android:orientation="horizontal"
45+
tools:visibility="gone" >
46+
47+
<org.wordpress.aztec.toolbar.RippleToggleButton
48+
android:id="@+id/format_bar_button_link"
49+
android:background="@drawable/format_bar_button_link_selector"
50+
android:contentDescription="@string/format_bar_description_link"
51+
android:layout_height="fill_parent"
52+
android:layout_width="wrap_content"
53+
style="@style/FormatBarButton" >
54+
</org.wordpress.aztec.toolbar.RippleToggleButton>
55+
56+
<org.wordpress.aztec.toolbar.RippleToggleButton
57+
android:id="@+id/format_bar_button_underline"
58+
android:background="@drawable/format_bar_button_underline_selector"
59+
android:contentDescription="@string/format_bar_description_underline"
60+
android:layout_height="fill_parent"
61+
android:layout_width="wrap_content"
62+
style="@style/FormatBarButton" >
63+
</org.wordpress.aztec.toolbar.RippleToggleButton>
64+
65+
<org.wordpress.aztec.toolbar.RippleToggleButton
66+
android:id="@+id/format_bar_button_strikethrough"
67+
android:background="@drawable/format_bar_button_strikethrough_selector"
68+
android:contentDescription="@string/format_bar_description_strike"
69+
android:layout_height="fill_parent"
70+
android:layout_width="wrap_content"
71+
style="@style/FormatBarButton" >
72+
</org.wordpress.aztec.toolbar.RippleToggleButton>
73+
74+
<org.wordpress.aztec.toolbar.RippleToggleButton
75+
android:id="@+id/format_bar_button_horizontal_rule"
76+
android:background="@drawable/format_bar_button_horizontal_rule_selector"
77+
android:contentDescription="@string/format_bar_description_horizontal_rule"
78+
android:layout_height="fill_parent"
79+
android:layout_width="wrap_content"
80+
style="@style/FormatBarButton" >
81+
</org.wordpress.aztec.toolbar.RippleToggleButton>
82+
83+
<org.wordpress.aztec.toolbar.RippleToggleButton
84+
android:id="@+id/format_bar_button_more"
85+
android:background="@drawable/format_bar_button_more_selector"
86+
android:contentDescription="@string/format_bar_description_more"
87+
android:layout_height="fill_parent"
88+
android:layout_width="wrap_content"
89+
style="@style/FormatBarButton" >
90+
</org.wordpress.aztec.toolbar.RippleToggleButton>
91+
92+
<!--TODO: Remove android:visibility="gone" when Page Break is to be added back as a feature-->
93+
<org.wordpress.aztec.toolbar.RippleToggleButton
94+
android:id="@+id/format_bar_button_page"
95+
android:background="@drawable/format_bar_button_page_selector"
96+
android:contentDescription="@string/format_bar_description_page"
97+
android:layout_height="fill_parent"
98+
android:layout_width="wrap_content"
99+
android:visibility="gone"
100+
style="@style/FormatBarButton" >
101+
</org.wordpress.aztec.toolbar.RippleToggleButton>
102+
103+
<org.wordpress.aztec.toolbar.RippleToggleButton
104+
android:id="@+id/format_bar_button_html"
105+
android:background="@drawable/format_bar_button_html_selector"
106+
android:contentDescription="@string/format_bar_description_html"
107+
android:layout_height="fill_parent"
108+
android:layout_width="wrap_content"
109+
style="@style/FormatBarButton" >
110+
</org.wordpress.aztec.toolbar.RippleToggleButton>
111+
112+
</LinearLayout>
113+
114+
<LinearLayout
115+
android:id="@+id/format_bar_button_layout_collapsed"
116+
android:background="@color/format_bar_background"
117+
android:layout_height="match_parent"
156118
android:layout_width="wrap_content"
157-
style="@style/FormatBarButton" >
158-
</org.wordpress.aztec.toolbar.RippleToggleButton>
159-
160-
<org.wordpress.aztec.toolbar.RippleToggleButton
161-
android:id="@+id/format_bar_button_bold"
162-
android:background="@drawable/format_bar_button_bold_selector"
163-
android:contentDescription="@string/format_bar_description_bold"
164-
android:layout_height="fill_parent"
165-
android:layout_width="wrap_content"
166-
style="@style/FormatBarButton" >
167-
</org.wordpress.aztec.toolbar.RippleToggleButton>
168-
169-
<org.wordpress.aztec.toolbar.RippleToggleButton
170-
android:id="@+id/format_bar_button_italic"
171-
android:background="@drawable/format_bar_button_italic_selector"
172-
android:contentDescription="@string/format_bar_description_italic"
173-
android:layout_height="fill_parent"
174-
android:layout_width="wrap_content"
175-
style="@style/FormatBarButton" >
176-
</org.wordpress.aztec.toolbar.RippleToggleButton>
177-
178-
</LinearLayout>
119+
android:orientation="horizontal" >
120+
121+
<org.wordpress.aztec.toolbar.RippleToggleButton
122+
android:id="@+id/format_bar_button_media"
123+
android:background="@drawable/format_bar_button_media_selector"
124+
android:contentDescription="@string/format_bar_description_media"
125+
android:layout_height="fill_parent"
126+
android:layout_width="wrap_content"
127+
style="@style/FormatBarButton" >
128+
</org.wordpress.aztec.toolbar.RippleToggleButton>
129+
130+
<View
131+
android:id="@+id/format_bar_vertical_divider"
132+
android:layout_height="fill_parent"
133+
android:layout_width="@dimen/format_bar_horizontal_divider_height"
134+
style="@style/DividerVertical" >
135+
</View>
136+
137+
<org.wordpress.aztec.toolbar.RippleToggleButton
138+
android:id="@+id/format_bar_button_heading"
139+
android:background="@drawable/format_bar_button_heading_selector"
140+
android:contentDescription="@string/format_bar_description_heading"
141+
android:layout_height="fill_parent"
142+
android:layout_marginLeft="@dimen/format_bar_left_margin"
143+
android:layout_width="wrap_content"
144+
style="@style/FormatBarButton" >
145+
</org.wordpress.aztec.toolbar.RippleToggleButton>
146+
147+
<org.wordpress.aztec.toolbar.RippleToggleButton
148+
android:id="@+id/format_bar_button_list"
149+
android:background="@drawable/format_bar_button_ul_selector"
150+
android:contentDescription="@string/format_bar_description_list"
151+
android:layout_height="fill_parent"
152+
android:layout_width="wrap_content"
153+
style="@style/FormatBarButton" >
154+
</org.wordpress.aztec.toolbar.RippleToggleButton>
155+
156+
<org.wordpress.aztec.toolbar.RippleToggleButton
157+
android:id="@+id/format_bar_button_quote"
158+
android:background="@drawable/format_bar_button_quote_selector"
159+
android:contentDescription="@string/format_bar_description_quote"
160+
android:layout_height="fill_parent"
161+
android:layout_width="wrap_content"
162+
style="@style/FormatBarButton" >
163+
</org.wordpress.aztec.toolbar.RippleToggleButton>
164+
165+
<org.wordpress.aztec.toolbar.RippleToggleButton
166+
android:id="@+id/format_bar_button_bold"
167+
android:background="@drawable/format_bar_button_bold_selector"
168+
android:contentDescription="@string/format_bar_description_bold"
169+
android:layout_height="fill_parent"
170+
android:layout_width="wrap_content"
171+
style="@style/FormatBarButton" >
172+
</org.wordpress.aztec.toolbar.RippleToggleButton>
173+
174+
<org.wordpress.aztec.toolbar.RippleToggleButton
175+
android:id="@+id/format_bar_button_italic"
176+
android:background="@drawable/format_bar_button_italic_selector"
177+
android:contentDescription="@string/format_bar_description_italic"
178+
android:layout_height="fill_parent"
179+
android:layout_width="wrap_content"
180+
style="@style/FormatBarButton" >
181+
</org.wordpress.aztec.toolbar.RippleToggleButton>
182+
183+
</LinearLayout>
184+
185+
</RelativeLayout>
186+
187+
<!-- Hidden view used to force ellipsis icons to layout right/end -->
188+
<View
189+
android:layout_height="fill_parent"
190+
android:layout_weight="1"
191+
android:layout_width="0dp"
192+
android:visibility="invisible" >
193+
</View>
179194

180195
<org.wordpress.aztec.toolbar.RippleToggleButton
181196
android:id="@+id/format_bar_button_ellipsis_expand"
182197
android:background="@drawable/format_bar_button_ellipsis_horizontal_selector"
183198
android:contentDescription="@string/format_bar_description_ellipsis_expand"
184-
android:layout_alignParentRight="true"
185-
android:layout_alignRight="@+id/format_bar_button_layout_expanded"
186199
android:layout_height="fill_parent"
187200
android:layout_width="wrap_content"
188201
style="@style/FormatBarButton" >
@@ -193,13 +206,12 @@
193206
android:background="@drawable/format_bar_button_ellipsis_vertical_selector"
194207
android:contentDescription="@string/format_bar_description_ellipsis_collapse"
195208
android:layout_height="fill_parent"
196-
android:layout_toRightOf="@+id/format_bar_button_layout_expanded"
197209
android:layout_width="wrap_content"
198210
android:visibility="gone"
199211
style="@style/FormatBarButton" >
200212
</org.wordpress.aztec.toolbar.RippleToggleButton>
201213

202-
</RelativeLayout>
214+
</LinearLayout>
203215

204216
</HorizontalScrollView>
205217

0 commit comments

Comments
 (0)