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

Problem using Lollipop #32

Closed
carmelo-ruota opened this issue May 19, 2015 · 8 comments
Closed

Problem using Lollipop #32

carmelo-ruota opened this issue May 19, 2015 · 8 comments
Assignees
Labels

Comments

@carmelo-ruota
Copy link

On Lollipop, using IconicsButton, only the normal text "Button" is displayed.

 <IconicsButton
        android:text="{faw-adjust} Button"
        android:layout_width="120dp"
        android:layout_height="60dp"/>

Same code, on Kitkat shows both icon and text.

@mikepenz mikepenz added the bug label May 19, 2015
@mikepenz mikepenz self-assigned this May 19, 2015
@mikepenz
Copy link
Owner

@carmelo-ruota just tried on my Nexus 5. The sample activity shows the icon for the IconicsButton. Not if you try to style it via code.

Any additional information?

@carmelo-ruota
Copy link
Author

The same code:

    <IconicsButton
                    android:id="@+id/buttonAdd"
                    android:layout_height="36dp"
                    android:layout_width="36dp"
                    android:text="{faw-plus}"/>

Works fine with a fragment and shows nothing in Activity.

@mikepenz
Copy link
Owner

@carmelo-ruota first please update to the latest version. and then make sure you don't do different things with this button between fragment and activity

@carmelo-ruota
Copy link
Author

Just update to latest version and still not works. The only difference between fragment and activity is that in fragment IconicsButton is contained in TableRow, while in Activity IconicsButton is inside a LinearLayout (Horizontal):

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content" 
        android:gravity="center_vertical"  
        android:orientation="horizontal">
        <it.myapp.view.MaterialSpinner
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/spinnerProprietario"
            app:ms_floatingLabelText="Proprietario"
            android:layout_weight="1"/>


        <com.mikepenz.iconics.view.IconicsButton
            android:id="@+id/buttonAddProprietario"
            android:layout_width="36dp"
            android:layout_height="36dp"
            android:text="{faw-plus}"/>
        <com.mikepenz.iconics.view.IconicsButton
            android:id="@+id/buttonEditProprietario"
            android:layout_width="36dp"
            android:layout_height="36dp"
            android:text="{gmd-create}"/>

    </LinearLayout>

@mikepenz
Copy link
Owner

Do you use any font modifying library?

@carmelo-ruota
Copy link
Author

Yes I do! This:
https://github.com/chrisjenx/Calligraphy

@mikepenz
Copy link
Owner

@carmelo-ruota i assume this one overwrites the typeface for the view. try to disable it, to check my assumption.

@carmelo-ruota
Copy link
Author

Now, without Calligraphy, seem it works fine! :-)

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