There is a dialog Fragment visible when my app is launched. When I press back, I want to launch another dialog fragment on top of the current dialog. But my previous dialog gets dismissed. I even overided onDimiss()
method to prevent it from dismissal. But still it gets dismissed.I tried with setOncancellable(false)
. But it makes the back button unresponsive. Is there any way to place a dialogFragment on top of another dialogue? Thanks in advance..
Asked
Active
Viewed 1,485 times
-1

Sangeetha Pinto
- 21
- 1
- 6
1 Answers
0
Take a look at both android:gravity
and android:layout_gravity
.
Their names should help you:
android:gravity
sets the gravity of the content of the View its used on.
android:layout_gravity
sets the gravity of the View or Layout in its parent.
Taken from Answer
-
I used layout gravity. But still its not centered. But if i use NetworkImageview, its perfectly aligned to the center. Why the circular Image is not aligned to the center? – Sangeetha Pinto Aug 05 '14 at 09:19
-
Did you define the circular layout yourself? – PKlumpp Aug 05 '14 at 09:22
-
Yes. i created a class which extends networkImageview of volley. It's in circular shape. The problem is that it aligns itself to the top of the layout. because of which, it doesnt look at center. But if i use network imageview, it is aligned to the center – Sangeetha Pinto Aug 05 '14 at 09:43
-
ok, maybe your problem is that in your rounded image, the actual center of the image is not in the center of the circle. – PKlumpp Aug 05 '14 at 11:07
-
Now i got the problem. But don't know how to solve it. Actually gave 20dp margin.But its taking only half(10dp) margin. Why that is happening..Why its taking less margin when compared to NetworkImageview.Both the imageviews are of same height & same width – Sangeetha Pinto Aug 05 '14 at 11:22