public class

HorizontalLayout

extends LinearLayout
java.lang.Object
   ↳ com.neomades.ui.View
     ↳ com.neomades.ui.Layout
       ↳ com.neomades.ui.LinearLayout
         ↳ com.neomades.ui.HorizontalLayout

Class Overview

An HorizontalLayout represents a group of views arranged horizontally.

Default properties

By default, the following properties are applied to a new VerticalLayout:

    Content Stretch mode
  • width : MATCH_CONTENT
  • height : MATCH_PARENT
    Content alignment
  • VCENTER | LEFT : each child is aligned to VCENTER | LEFT
  • if he does not have a specific layout alignment

Summary

XML Attributes
Attribute Name Related Method Description
contentAlignment setContentAlignment(int) A combination of alignment values (eg: TOP|LEFT)  
[Expand]
Inherited XML Attributes
From class com.neomades.ui.View
[Expand]
Inherited Constants
From interface com.neomades.ui.Alignment
From interface com.neomades.ui.StretchMode
Public Constructors
HorizontalLayout()
Creates an horizontal layout.
Public Methods
void setContentAlignment(int anchor)
Sets the alignment about child views positions.
[Expand]
Inherited Methods
From class com.neomades.ui.LinearLayout
From class com.neomades.ui.Layout
From class com.neomades.ui.View
From class java.lang.Object

XML Attributes

contentAlignment

A combination of alignment values (eg: TOP|LEFT)

Related Methods

Public Constructors

public HorizontalLayout ()

Creates an horizontal layout.

Public Methods

public void setContentAlignment (int anchor)

Sets the alignment about child views positions.

The default value is VCENTER | LEFT. All the views without a specific layout alignment, will be alignment to VCENTER, and if the layout has extra space, children will be positioned at the LEFT of the layout.

If this layout has extra space for its content, child positions will be aligned with this anchor parameter.

Related XML Attributes
Parameters
anchor content alignment anchor