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 colorize the divider? #6

Closed
DragonSpirit opened this issue Nov 27, 2015 · 5 comments
Closed

How to colorize the divider? #6

DragonSpirit opened this issue Nov 27, 2015 · 5 comments
Assignees

Comments

@DragonSpirit
Copy link

Hello! Does library can colorize divider or make it transperent?
android:divider and .setDividerDrawable won't work at all
Thanks!

@ISchwarz23 ISchwarz23 self-assigned this Jan 6, 2016
@ISchwarz23
Copy link
Owner

Hi DragonSpirit,
your issue is a good point. It is infact a missing feature which is now available in the new version 0.9.6. It supports now the adaptation posibilities like the ListView via the layout file. To use it just update your dependency to the new version.

dependencies {
    compile 'de.codecrafters.tableview:tableview:0.9.6'
    ...
}

@ahmadalibaloch
Copy link

How do you actually add a divider for rows of your choice color? I give color to rows based on my business logic. Now there are some rows with same color. I need a divder of 1dp at the bottom of each row view.

@ISchwarz23
Copy link
Owner

You can do so by specifying divider and dividerHeight in the layout xml. Se this example:

<de.codecrafters.tableview.TableView
    android:id="@+id/tableView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:divider="@color/black"
    android:dividerHeight="1dip"
    ...  />  

@ahmadalibaloch
Copy link

ahmadalibaloch commented May 18, 2016

Why the documentation is not complete, like for example the case of divider. I have been searching for minutes. Thanks for the information too, it works 👍 , Can I do it programmatically using setDividerDrawable(). it was not working before ?

@ISchwarz23
Copy link
Owner

No, unfortunatelly there is no programatical way to do so. But the documentation will be extended with the divider xml tags.

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

No branches or pull requests

3 participants