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

Hard coded id in XML layout #9

Closed
tundebabzy opened this issue Dec 28, 2014 · 2 comments
Closed

Hard coded id in XML layout #9

tundebabzy opened this issue Dec 28, 2014 · 2 comments
Assignees

Comments

@tundebabzy
Copy link

mTv = (TextView) findViewById(R.id.expandable_text);
mButton = (ImageButton) findViewById(R.id.expand_collapse);

These lines in findViews mean that the id for the children of ExpandableTextView must be expandable_text and expandand_collapse for the TextView and ImageButton respectively.

I initially changed the ids in my XML layout and slammed into a null-pointer exception until i dug into the code. It will nice if this "limitation" is made known to users or better still, remove the hard coded ids. I can submit a pull request to remove the hard coded ids.

@Manabu-GT
Copy link
Owner

It will nice if this "limitation" is made known to users or better still, remove the hard coded ids.
-> sorry for confusion, I will clarify that fact on the README.

@Manabu-GT Manabu-GT self-assigned this Jan 5, 2015
@Manabu-GT
Copy link
Owner

README just updated to mention this limitation.

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