const animationPage = require('./animation');
const peoplePage = require('./people');
const trayPage = require('./tray');
const {Button, NavigationView, Page, ui} = require('tabris');

const MARGIN = 8;

let navigationView = new NavigationView({
  left: 0, top: 0, right: 0, bottom: 0
}).appendTo(ui.contentView);

let mainPage = new Page({
  title: 'Animation Examples'
}).appendTo(navigationView);

[animationPage, peoplePage, trayPage].forEach((page) => {
  new Button({
    left: MARGIN, top: ['prev()', MARGIN],
    text: page.title
  }).on('select', () => page.appendTo(navigationView))
    .appendTo(mainPage);
});

const animationPage = require('./animation');
const peoplePage = require('./people');
const trayPage = require('./tray');
const {Button, NavigationView, Page, ui} = require('tabris');

let navigationView = new NavigationView({
  left: 0, top: 0, right: 0, bottom: 0
}).appendTo(ui.contentView);

let mainPage = new Page({
  title: 'Animation Examples'
}).appendTo(navigationView);

[animationPage, peoplePage, trayPage].forEach((page) => {
  new Button({
    left: 8, top: 'prev() 8', right: 8,
    text: page.title
  }).on('select', () => page.appendTo(navigationView))
    .appendTo(mainPage);
});

Improve layout of animation example index page
Improve layout of animation example index page

Make buttons full-width to make them easier to tap. Inline MARGIN
constants, since extracting sizes to constants in snippets and examples
may be introducing unnecessary complexity and making layout harder to
understand.

Change-Id: I05faec4e7bcc132dfbc5926eb3026af764581f9c
