-3

How can I do diagonal layout? please help me.

enter image description here

rafsanahmad007
  • 23,683
  • 6
  • 47
  • 62

3 Answers3

1

You can use TranslateAnimation with images. Use Transparent color as background and put 2 image views to display images. on click of any image use left and right TranslateAnimation on images to exit from the screen.

One more thing from image i can say it is using view overlay pattern. I mean background view is already there it just show/hide functionality with type of data (male/female) passed when user click.

For animation check this SO question.

Community
  • 1
  • 1
Wasim K. Memon
  • 5,979
  • 4
  • 40
  • 55
0

to give you an idea:
1. create two pngs with alpha (red)
2. stack them on each other with any layout
3. adjust paddings/ margins
4. add sliding animations

see this picture with alphas

Max
  • 146
  • 2
  • 9
0

My Perference is Relative Layout

RelativeLayout is a layout manager that helps you arrange your UI elements based on some rule. You can specify things like: align this to parents left edge, place this to the left/right of this elements etc.

sivaprakash
  • 528
  • 6
  • 15