How to create APP-like clock layout

Asked

Viewed 481 times

2

Good morning to you all. Could someone give me a help on how to create a layout similar to the Android clock APP? I would like to do something very similar with these screens. If you can help me with XML code or links to blogs and websites, I’d be grateful. I would mainly like this list effect with several items that can be expanded, but I believe that this is not Expandable list view.

It seems to be a list with several items. You click to expand the item, it has no other sub-items but the same, only more information appears.

Uma lista de itens que são expandidos Item da lista expandido.

1 answer

1

To do this, you can use a list view but you will need to make a custom Adapter to popular this list view with a custom layout made by yourself. Already the tabs of this watch app I believe are made with material design, with a Toolbar and hiding the action bar. Probably use a fragmentStatePagerAdapter and every tab of this app, it’s obviously a Fragment. You’ll have a little bit of work to be able to do that. But nothing that’s impossible. To make the effect of expanding and showing the additional contents, you have to make an internal layout, within what you use in your custom Adapter that when you click the icon to expand you arrow that layout as visible with:

layout.setVisibility(View.VISIBLE);

And when the user clicks to decrease the information, you do:

layout.setVisibility(View.GONE);

Some links:

To get an idea of Custom Adapter

To make tabs with material designs

  • My main question is to do this expansion on Adapter. The rest I don’t even want to do. Listview with custom Adapter I know how to do. I will try to implement here and return. Thanks for the help.

  • Okay, this you can do by setting the visibility even. Good luck!

  • I managed to do with Setvisibility and animateLayoutChanges. A little different but the effect itself desired I managed. Thank you.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.