how to handle back button in my android device
<p>I have a problem with the "back" button that is on my device</p>

<p>in my project there are a few layout and class. Let's call them A, B, C, D.if I run the project starts from the layout "A" and then "B", "C", "D". on my layout position "D" and press the back button found on the device, I would go back to layout "C", and if pressed again will return to "B" and again to the "A".</p>

<p>I really want is if I hit "back" on my device, if I was in the layout "D" then I will remain on the layout of "D". if I was in the layout "C" then I'll stick to layout "C".
what should I add?</p>
