Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vertically center text + icon on IconButton #195

Open
matthewkrueger opened this issue Feb 3, 2017 · 0 comments
Open

Vertically center text + icon on IconButton #195

matthewkrueger opened this issue Feb 3, 2017 · 0 comments

Comments

@matthewkrueger
Copy link

Hi there - I have an IconButton with an Icon on the left, and text on the right. The problem is that, even with gravity=center_vertical, the text and icon in the button don't align vertically to each other. Is there a trick to do this? I saw the "baseline" attribute you can add inside the {} but since the text and icon are different font sizes, this doesn't work.

    <com.joanzapata.iconify.widget.IconButton
        android:id="@+id/fairway"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:gravity="center_vertical"
        android:textSize="16sp"
        android:text="{fa-icon-name 24sp} Fairway"/>

androidiconify-verticalalignment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant