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

Adding child view to club.cred.synth.views.ElevatedView #10

Closed
ashwath20 opened this issue Aug 30, 2021 · 2 comments
Closed

Adding child view to club.cred.synth.views.ElevatedView #10

ashwath20 opened this issue Aug 30, 2021 · 2 comments

Comments

@ashwath20
Copy link

ashwath20 commented Aug 30, 2021

Hi ,

I tried to add child view to ElevatedView and PitView but getting below error .

club.cred.synth.views.ElevatedView cannot be cast to android.view.ViewGroup
    Caused by: java.lang.ClassCastException: club.cred.synth.views.ElevatedView cannot be cast to android.view.ViewGroup****

How to add views to Elevated and PitView

@nikhilpanju
Copy link
Contributor

PitView and ElevatedView are not ViewGroups and hence you can't add any view to them. They serve as pure aesthetic views.

You can create your ViewGroup as per your requirement and constrain PitView/ElevatedView to that ViewGroup. Also, do take a look at the sample app as it has some examples.

@ashwath20
Copy link
Author

Got it . Thank you :)

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