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

java.lang.IllegalStateException: SlantedTextView's width must equal to height, w: 96, h: 155 #9

Closed
sm-tester opened this issue Apr 25, 2017 · 3 comments

Comments

@sm-tester
Copy link

Hi, thanks for great library, I have a question : I can't use latest your library, always say width and height not equals, but its equal in layout:

 <com.haozhang.lib.SlantedTextView
    android:id="@+id/prStatusTV"
    android:layout_width="48dp"
    android:layout_height="48dp"
    android:layout_alignParentTop="true"
    android:layout_alignParentStart="true"
    android:layout_alignParentLeft="true"
    android:layout_above="@+id/productNameTV"
    android:gravity="center"
    android:text="@string/i_sold_this_pr_txt"
    android:textColor="@color/colorWhite"
    android:fontFamily="sans-serif-condensed"
    app:slantedBackgroundColor="@color/colorAccent"
    app:slantedMode="left_triangle"
    app:slantedText="IOS"
    app:slantedTextColor="@color/colorWhite"
    app:slantedLength="28dp"
    app:slantedTextSize="10sp"
    />

where problem?

@HeZaiJin
Copy link
Owner

HeZaiJin commented Apr 26, 2017

I can not see any problem in layout. Could you change SlantedTextView height in code ? Please check you usages.

@sm-tester
Copy link
Author

Hi @HeZaiJin!
I found my mistake yesterday, mistake in my code:

android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_above="@+id/productNameTV"

I need remove:
android:layout_above="@+id/productNameTV"

this a line, because it is changed layout height in parent RelativeLayout layout.
You can delete or close this is question, sorry my mistake. Thank you for great library! 👍

@HeZaiJin
Copy link
Owner

Thanks!

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

2 participants