public abstract class

Layout

extends View
java.lang.Object
   ↳ com.neomades.ui.View
     ↳ com.neomades.ui.Layout
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Abstract layout.

Note : You cannot override a Container in order to customize an UI element

Summary

[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 Methods
void addView(View view, int atIndex)
Inserts a view at a specified position in the layout.
final void addView(View child)
Adds a child view to this container.
int getViewsCount()
Returns the number of views inside this container.
void removeAllViews()
Remove all views from this container.
void removeIndex(int index)
Remove a view from this list at the specified index.
void removeView(View child)
Remove a child view from this container.
[Expand]
Inherited Methods
From class com.neomades.ui.View
From class java.lang.Object

Public Methods

public void addView (View view, int atIndex)

Inserts a view at a specified position in the layout. Note that views cannot be added after the last view of the layout using this method. Use addView(View) instead.

Parameters
view the view to insert
atIndex the position index
Throws
CrossThreadException
IllegalArgumentException if the index is negative or bigger than the number of views in the layout
CrossThreadException

public final void addView (View child)

Adds a child view to this container.

Parameters
child the child view to add
Throws
CrossThreadException if the method is called from outside the UI-Thread
IllegalStateException if the child view has already a parent, or if the child view is this layout
NullPointerException if the child view is null

public int getViewsCount ()

Returns the number of views inside this container.

Returns
  • the number of views

public void removeAllViews ()

Remove all views from this container.

Throws
CrossThreadException if the method is called from outside the UI-Thread

public void removeIndex (int index)

Remove a view from this list at the specified index.

public void removeView (View child)

Remove a child view from this container. if the view is not a child of this Layout, an IllegalStateException is thrown.

Parameters
child the child view
Throws
CrossThreadException if the method is called from outside the UI-Thread
IllegalStateException if the child view is not a child of this layout
NullPointerException if the child view is null