Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

How to disable user interaction with a parent layout when a child layout has been inflated in Android Programming?

First let me explain what I am doing. I want to customize my alert dialogs in my application and not use alert dialog. What I have done was to create a layout that contains my popup warning (my alert dialog) with a dismiss button inside. When I inflate the popup warning xml layout from my activity, the popup shows when and where I want, but the parent view can still be clicked on and interacted with. I have tried setting the parent layout a variety of ways when the popup layout is in focus. I have .setClickable(false); .setEnabled(false); setFocusable(false); setActivated(false). I would appreciate any suggestions. Thanks In Advance!