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

Feature Request: Gracefully handle xml rendering #404

Open
Derpalus opened this issue Apr 6, 2017 · 3 comments
Open

Feature Request: Gracefully handle xml rendering #404

Derpalus opened this issue Apr 6, 2017 · 3 comments

Comments

@Derpalus
Copy link
Contributor

Derpalus commented Apr 6, 2017

Just a simple suggestion to add functionality so TileViews can be added in xml without having an xml compilation error in Android Studio.

I think it's as easy as adding

if (isInEditMode())
    return;

just after the super call in the constructors of TileView and ZoomPanLayout.
But I have never made my own custom view in Android so I don't know if that is all that is required. Perhaps some sort of basic rendering placeholder has to be handled as well?

@moagrius
Copy link
Owner

is this specific to that layout preview in AS?

@Derpalus
Copy link
Contributor Author

Derpalus commented Apr 19, 2017

I don't quite understand what you mean. All I know is I get a render exception when I add a TileView to my view xml and that Android Studio suggests using View.isInEditMode() for custom views to avoid the problem.

@moagrius
Copy link
Owner

Ok thanks

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

2 participants