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

How to style item texts? #510

Closed
155martinmoreno opened this issue Jul 26, 2015 · 6 comments
Closed

How to style item texts? #510

155martinmoreno opened this issue Jul 26, 2015 · 6 comments
Assignees
Labels

Comments

@155martinmoreno
Copy link

I'm trying to style the text items... any idea how?

@mikepenz
Copy link
Owner

@155martinmoreno can you be a bit more specific? how do you want to style the text? of which items?

@mikepenz mikepenz self-assigned this Jul 26, 2015
@155martinmoreno
Copy link
Author

I'm trying to apply a style to the PrimaryDrawerItem name

@mikepenz
Copy link
Owner

Please be a bit more specific. Which style? Color? Size? Typeface?

Martín Moreno notifications@github.com schrieb am Mo., 27. Juli 2015
00:11:

I'm trying to apply a style to the PrimaryDrawerItem name


Reply to this email directly or view it on GitHub
#510 (comment)
.

@155martinmoreno
Copy link
Author

ok, something like this:

<style name="H1" parent="@android:style/TextAppearance.Medium"> 24sp sans-serif-thin normal </style>

@mikepenz
Copy link
Owner

@155martinmoreno the typeface can be set via the api. setting the textSize can be done by overwriting the default dimen value via resource.

I would suggest if you need a custom drawerItem with custom style (which follows not the Android Design Guidelines) that you create a CustomDrawerItem by implementing the IDrawerItem interface (you can look at the PrimaryDrawerItem and modify it to your needs)

@douglasjunior
Copy link

To change textSize I created a item on my dimens.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>
     <dimen name="material_drawer_item_primary_text">20sp</dimen>
</resources>

Works for me.

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

3 participants