expandedTitleGravity="center_horizontal" not working.
See original GitHub issuexml:
` <android.support.design.widget.AppBarLayout android:id=“@+id/app_bar” android:layout_width=“match_parent” android:layout_height=“wrap_content” android:fitsSystemWindows=“true” android:theme=“@style/AppTheme.AppBarOverlay”>
<android.support.design.widget.SubtitleCollapsingToolbarLayout
android:id="@+id/toolbar_layout"
android:layout_width="match_parent"
android:minHeight="@dimen/contact_profile_toolbar_min_height"
app:contentScrim="?colorPrimary"
app:expandedTitleMarginTop="@dimen/contact_profile_toolbar_lyt_ext_title_margin_top"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:expandedTitleMargin="@dimen/contact_profile_toolbar_lyt_ext_title_margin"
android:layout_height="@dimen/contact_profile_toolbar_lyt_height"
app:subtitle="CollapsingToolbarLayout"
app:title="Subtitle"
android:fitsSystemWindows="true"
app:expandedTitleGravity="center_horizontal">
<View
android:id="@+id/background"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_collapseMode="parallax"
android:scaleType="centerCrop"
android:background="@color/colorPrimary" />
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:popupTheme="@style/AppTheme.PopupOverlay">
<Space
android:id="@+id/circle_collapsed_target"
android:layout_width="@dimen/contact_profile_circle_collapsed"
android:layout_height="@dimen/contact_profile_circle_collapsed"/>
</android.support.v7.widget.Toolbar>
<!--</android.support.design.widget.CollapsingToolbarLayout>-->
</android.support.design.widget.SubtitleCollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout> `
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
android - Collapsing Toolbar title not centered - Stack Overflow
The title is centerend when it is expanded and should stay centered when it is collapsing. With my layout which is below, my...
Read more >LinearLayout | Android Developers
A layout that arranges other views either horizontally in a single column or vertically ... For example, the snippet above sets android:gravity to...
Read more >Alignment and alignment guides - a free Hacking with iOS
SwiftUI gives us a number of valuable ways of controlling the way views are aligned, and I want to walk you through each...
Read more >Using DialogFragment | CodePath Android Cliffnotes
setTitle(title); // Show soft keyboard automatically and request focus to field ... and showing the dialog in an Activity extending AppCompatActivity :
Read more >Grid system - Bootstrap
Use flexbox alignment utilities to vertically and horizontally align columns. Internet Explorer 10-11 do not support vertical alignment of flex items when the ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@michael-snow Version 0.4.5 is out to specifically address this issue. Title and subtitle now has separate x points for text centering with
center_horizontal
gravity. It should also support other gravities but too be honest I’m too lazy to test them all.Version 0.4.1 is out, it now supports
center_horizontal
gravity, but unfortunately not much else. I will need couple of days to test the remaining gravity.In the meantime, please try it and let me know if it works for you.