android:id="@+id/sliding_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginLeft="@dimen/dashboard_header_margin_left"
+ android:layout_marginRight="@dimen/dashboard_header_margin_right"
android:background="?android:attr/colorPrimary"/>
android:id="@+id/main_content"
android:layout_height="match_parent"
android:layout_width="match_parent"
+ android:background="@color/material_grey_300"
/>
limitations under the License.
-->
-<Space
+<View
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/support_spacer_height"
<dimen name="settings_side_margin">112dp</dimen>
<!-- Dashboard padding in its container -->
- <dimen name="dashboard_padding_start">128dp</dimen>
- <dimen name="dashboard_padding_end">128dp</dimen>
+ <dimen name="dashboard_padding_start">160dp</dimen>
+ <dimen name="dashboard_padding_end">160dp</dimen>
+
+ <!-- Dashboard Header margin in its container -->
+ <dimen name="dashboard_header_margin_right">304dp</dimen>
+ <dimen name="dashboard_header_margin_left">304dp</dimen>
<!-- ActionBar contentInsetStart -->
<dimen name="actionbar_contentInsetStart">128dp</dimen>
<dimen name="dashboard_padding_start">80dp</dimen>
<dimen name="dashboard_padding_end">80dp</dimen>
+ <!-- Dashboard Header margin in its container -->
+ <dimen name="dashboard_header_margin_right">176dp</dimen>
+ <dimen name="dashboard_header_margin_left">176dp</dimen>
+
<!-- Dashboard category padding start / end -->
<dimen name="dashboard_category_padding_start">24dp</dimen>
<dimen name="dashboard_category_padding_end">24dp</dimen>
<dimen name="dashboard_padding_top">0dp</dimen>
<dimen name="dashboard_padding_bottom">0dp</dimen>
+ <!-- Dashboard Header margin in its container -->
+ <dimen name="dashboard_header_margin_right">0dp</dimen>
+ <dimen name="dashboard_header_margin_left">0dp</dimen>
+
<!-- Dashboard category padding start / end -->
<dimen name="dashboard_category_padding_start">0dp</dimen>
<dimen name="dashboard_category_padding_end">0dp</dimen>
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
if (mTitleView.getChildCount() > 0) {
- mTitleView.layout(0, 0, mTitleView.getMeasuredWidth(), mTitleView.getMeasuredHeight());
final int indicatorBottom = getMeasuredHeight();
final int indicatorHeight = mIndicatorView.getMeasuredHeight();
final int indicatorWidth = mIndicatorView.getMeasuredWidth();
final int totalWidth = getMeasuredWidth();
+ final int leftPadding = getPaddingLeft();
+ final int rightPadding = getPaddingRight();
+ mTitleView.layout(leftPadding, 0, mTitleView.getMeasuredWidth() + rightPadding,
+ mTitleView.getMeasuredHeight());
// IndicatorView should start on the right when RTL mode is enabled
if (isRtlMode()) {
mIndicatorView.layout(totalWidth - indicatorWidth,
indicatorBottom - indicatorHeight, totalWidth,
indicatorBottom);
} else {
-
mIndicatorView.layout(0, indicatorBottom - indicatorHeight,
indicatorWidth, indicatorBottom);
}