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

Some rules in SRelativeLayout.LayoutParams should take an anchor #5

Closed
PkmX opened this Issue Jan 13, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@PkmX
Contributor

PkmX commented Jan 13, 2013

Some of the methods such as above, below, leftOf and rightOf in SRelativeLayout.LayoutParams should take another view as anchor, so that android knows how to place views relative to each other.

Since our programmatically created views do not have an id (v.id returns -1) unless explicitly assigned, and addRule(verb: Int, anchor: Int) takes id of our view, I'm not sure how to solve this elegantly without resorting back to manually assigning id's.

I guess some sort of automatic counter trait would work?

@pocorall

This comment has been minimized.

Show comment
Hide comment
@pocorall

pocorall Jan 13, 2013

Owner

After a short search, I found these things:

http://stackoverflow.com/a/11615356/1036450
http://stackoverflow.com/a/6790714/1036450

I will add the feature related to assigning unique ID soon.

Owner

pocorall commented Jan 13, 2013

After a short search, I found these things:

http://stackoverflow.com/a/11615356/1036450
http://stackoverflow.com/a/6790714/1036450

I will add the feature related to assigning unique ID soon.

@ghost ghost assigned pocorall Jan 13, 2013

pocorall added a commit that referenced this issue Jan 22, 2013

@pocorall

This comment has been minimized.

Show comment
Hide comment
@pocorall

pocorall Jan 22, 2013

Owner

above, below, leftOf and rightOf are now take another view as an anchor. If the ID of the anchor is not allocated, Scaloid automatically assigns it.

Owner

pocorall commented Jan 22, 2013

above, below, leftOf and rightOf are now take another view as an anchor. If the ID of the anchor is not allocated, Scaloid automatically assigns it.

@pocorall pocorall closed this Jan 22, 2013

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