[−][src]Struct embedded_layout::layout::linear::LinearLayout
LinearLayout
LinearLayout
is used to arrange views along the horizontal or vertical axis.
A LinearLayout
object is not a View
, it does not have a location, instead it is used to
arrange a group of views into a ViewGroup
object using the arrange
method. It does have a
size
however.
For more information and examples see the module level documentation.
Implementations
impl LinearLayout<Horizontal<Bottom>, ChainTerminator>
[src]
pub fn horizontal() -> Self
[src]
Create a new, empty LinearLayout
that places views horizontally next to each other
impl LinearLayout<Vertical<Left>, ChainTerminator>
[src]
pub fn vertical() -> Self
[src]
Create a new, empty LinearLayout
that places views vertically next to each other
impl<S, VCE> LinearLayout<Horizontal<S>, VCE> where
S: SecondaryAlignment + VerticalAlignment,
VCE: ViewChainElement,
[src]
S: SecondaryAlignment + VerticalAlignment,
VCE: ViewChainElement,
pub fn with_alignment<Sec>(
self,
alignment: Sec
) -> LinearLayout<Horizontal<Sec>, VCE> where
Sec: SecondaryAlignment + VerticalAlignment,
[src]
self,
alignment: Sec
) -> LinearLayout<Horizontal<Sec>, VCE> where
Sec: SecondaryAlignment + VerticalAlignment,
Create a new, empty LinearLayout
that places views horizontally next to each other
impl<S, VCE> LinearLayout<Vertical<S>, VCE> where
S: SecondaryAlignment + HorizontalAlignment,
VCE: ViewChainElement,
[src]
S: SecondaryAlignment + HorizontalAlignment,
VCE: ViewChainElement,
pub fn with_alignment<Sec>(
self,
alignment: Sec
) -> LinearLayout<Vertical<Sec>, VCE> where
Sec: SecondaryAlignment + HorizontalAlignment,
[src]
self,
alignment: Sec
) -> LinearLayout<Vertical<Sec>, VCE> where
Sec: SecondaryAlignment + HorizontalAlignment,
Create a new, empty LinearLayout
that places views horizontally next to each other
impl<LD: LayoutDirection, VCE: ViewChainElement> LinearLayout<LD, VCE>
[src]
pub fn add_view<V: View>(self, view: V) -> LinearLayout<LD, ViewLink<V, VCE>>
[src]
Add a View
to the layout
Views will be laid out sequentially, keeping the order in which they were added to the layout.
impl<LD, VCE> LinearLayout<LD, VCE> where
LD: LayoutDirection,
VCE: ViewChainElement + LayoutOperation<LD>,
[src]
LD: LayoutDirection,
VCE: ViewChainElement + LayoutOperation<LD>,
pub fn arrange(self) -> ViewGroup<VCE>
[src]
Arrange the views according to the layout properties and return the views as a ViewGroup
.
Notes:
- the top right point is always (0, 0)
- for horizontal layouts, the elements will be vertically bottom aligned
- for vertical layouts, the elements will be horizontally left aligned
pub fn size(&self) -> Size
[src]
Returns the current size the layout will take up after arrange
.
Auto Trait Implementations
impl<LD, VC> RefUnwindSafe for LinearLayout<LD, VC> where
LD: RefUnwindSafe,
VC: RefUnwindSafe,
LD: RefUnwindSafe,
VC: RefUnwindSafe,
impl<LD, VC> Send for LinearLayout<LD, VC> where
LD: Send,
VC: Send,
LD: Send,
VC: Send,
impl<LD, VC> Sync for LinearLayout<LD, VC> where
LD: Sync,
VC: Sync,
LD: Sync,
VC: Sync,
impl<LD, VC> Unpin for LinearLayout<LD, VC> where
LD: Unpin,
VC: Unpin,
LD: Unpin,
VC: Unpin,
impl<LD, VC> UnwindSafe for LinearLayout<LD, VC> where
LD: UnwindSafe,
VC: UnwindSafe,
LD: UnwindSafe,
VC: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,