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

wrap_content not working for IconTextView on v2.0.7 #110

Closed
jhavatar opened this issue Aug 21, 2015 · 4 comments
Closed

wrap_content not working for IconTextView on v2.0.7 #110

jhavatar opened this issue Aug 21, 2015 · 4 comments
Labels

Comments

@jhavatar
Copy link

wrap_content not working for IconTextView on v2.0.7. Works fine in v2.0.5.

@JoanZapata
Copy link
Owner

It seems to be working for me, can you show me some code showing that it's not working?

@jhavatar
Copy link
Author

Sure.

The chevron icon does not appear when I display the following xml layout:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="#FF00FF00"
                android:padding="8dp">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_alignParentLeft="true"
        android:text="Set address"
        android:textColor="#FF000000"
        android:textSize="16sp"/>

    <com.joanzapata.iconify.widget.IconTextView
        android:text="{md-chevron-right}"
        android:textSize="32dp"
        android:textColor="#FF666666"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_alignParentRight="true"/>

</RelativeLayout>

example1

The chevron icon does appear, but is not vertically centered as one would expect, when I change the IcontextView's layout_width and layout_height from wrap_content to 32dp and set gravity to center:

<com.joanzapata.iconify.widget.IconTextView
        android:text="{md-chevron-right}"
        android:textSize="32dp"
        android:textColor="#FF666666"
        android:layout_width="32dp"
        android:layout_height="32dp"
        android:gravity="center"
        android:layout_centerVertical="true"
        android:layout_alignParentRight="true"/>

example2

@JoanZapata
Copy link
Owner

Thanks for the code, I'll fix it ASAP.

@JoanZapata JoanZapata added the bug label Aug 24, 2015
@JoanZapata
Copy link
Owner

Fixed on 2.0.10, release soon.

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

No branches or pull requests

2 participants