0

my application has a map and I'm monitoring some information, such as the distance traveled by the user.

I'm using android studio and fragments.

I would like to display this information in a panel on the map, to the left, but that does not occupy the full width of the screen.

I'm reading about cards and material design, but I do not know if it's the best option.

Basically, I need a box, with some labels, on the left in the screen. This box should have a solid color.

Any suggestions on how to implement this box?

EDIT: This is my screen, actually

My app

I'm using LinearLayout, but... how looks a box?

1 Answers1

1

You can add a LinearLayout inside your Fragment and all the textFields such as Planejado, Caminhado, and Restante into that. Keep the width and height of LinearLayout as wrap_content and wrap_content respectively. In order to have color you can add background color to the LinearLayout. If you want to use card view you can nest your LinearLayout inside the card view for better apperarance.

Raj
  • 2,997
  • 2
  • 12
  • 30
  • I forgot the background color of LinearLayout. Thank you all. Can I have any more effect, like a shadow? – Juliano Rodrigo Lamb Aug 11 '18 at 00:54
  • https://stackoverflow.com/questions/24095223/android-linearlayout-add-border-with-shadow-around-a-linearlayout . This will help you to add a shadow around the box. – Raj Aug 11 '18 at 08:18
  • If that helped plz accept my answer by checking the tick icon on left side of my answer @JulianoRodrigoLamb – Raj Aug 11 '18 at 08:20
  • I focused on setting the color of the components and forgot the color of LinearLayout – Juliano Rodrigo Lamb Aug 13 '18 at 11:48