0

In an Android app I have a background image and two buttons on it.

This is a partial screenshot: enter image description here

I ask you for the best approach to click on the sinopsis button to show an overlay text, like this:

enter image description here

and also to click the fotos button to show an image slider, like this: enter image description here

I don't want you to show me any code. I only need recommendations to know what kind of layouts or overlay views I should use to obtain the shown behaviours. Thank you.

Community
  • 1
  • 1

2 Answers2

1

A simple TextView is enough. A TextView can have a background, translucent as in your case, or gradients, etc., and padding. You can fill it with Spanned Text so you could use hyperlinks, bold, colors, etc.. If you need scrolling, TextView also supports scrolling out of the box, but it'd be better to put it inside a ScrollView because the scroll will be smoother. In any case you don't need additional layouts.

rupps
  • 9,712
  • 4
  • 55
  • 95
  • Thank you rupees, and for the fotos button? – Modesto Vasco Dec 25 '14 at 19:00
  • 1
    http://stackoverflow.com/questions/9884202/custom-circle-button for the button, and an horizontal `LinearLayout` for the images. Again, if you need scroll for the images, embed the `LinearLayout`inside an `HorizontalScrollView` – rupps Dec 25 '14 at 19:03
1

You can just use a container layout (like LinearLayout. RelativeLayout, ScrollView, etc.. depending on what you want) and specify that to have a background image and then specify your drawable. You can then use TextView to display text. Don't forget though that you will have to create custom TextViews to achieve your design.

TextView can have transparent background and so, you can get the overlay effect.

ucsunil
  • 7,378
  • 1
  • 27
  • 32