pub struct Activity { /* private fields */ }Expand description
Represents a GUI Activity (window)
Implementations§
Source§impl Activity
impl Activity
Sourcepub fn new(dialog: bool) -> Result<Self>
pub fn new(dialog: bool) -> Result<Self>
Create a new Activity
§Arguments
dialog- If true, creates a dialog-style window; if false, creates a full-screen activity
Sourcepub fn event_stream(&mut self) -> &mut UnixStream
pub fn event_stream(&mut self) -> &mut UnixStream
Get mutable reference to event stream
Sourcepub fn create_linear_layout(
&mut self,
parent: Option<i64>,
) -> Result<LinearLayout>
pub fn create_linear_layout( &mut self, parent: Option<i64>, ) -> Result<LinearLayout>
Create a LinearLayout
Sourcepub fn create_linear_layout_horizontal(
&mut self,
parent: Option<i64>,
) -> Result<LinearLayout>
pub fn create_linear_layout_horizontal( &mut self, parent: Option<i64>, ) -> Result<LinearLayout>
Create a LinearLayout with specified orientation
Sourcepub fn create_nested_scroll_view(
&mut self,
parent: Option<i64>,
) -> Result<NestedScrollView>
pub fn create_nested_scroll_view( &mut self, parent: Option<i64>, ) -> Result<NestedScrollView>
Create a NestedScrollView
Sourcepub fn create_text_view(
&mut self,
text: &str,
parent: Option<i64>,
) -> Result<TextView>
pub fn create_text_view( &mut self, text: &str, parent: Option<i64>, ) -> Result<TextView>
Create a TextView
Create a Button
Sourcepub fn create_edit_text(
&mut self,
text: &str,
parent: Option<i64>,
) -> Result<EditText>
pub fn create_edit_text( &mut self, text: &str, parent: Option<i64>, ) -> Result<EditText>
Create an EditText
Sourcepub fn create_edit_text_multiline(
&mut self,
text: &str,
parent: Option<i64>,
) -> Result<EditText>
pub fn create_edit_text_multiline( &mut self, text: &str, parent: Option<i64>, ) -> Result<EditText>
Create a multi-line EditText
Sourcepub fn create_checkbox(
&mut self,
text: &str,
parent: Option<i64>,
) -> Result<Checkbox>
pub fn create_checkbox( &mut self, text: &str, parent: Option<i64>, ) -> Result<Checkbox>
Create a Checkbox
Sourcepub fn create_checkbox_checked(
&mut self,
text: &str,
parent: Option<i64>,
checked: bool,
) -> Result<Checkbox>
pub fn create_checkbox_checked( &mut self, text: &str, parent: Option<i64>, checked: bool, ) -> Result<Checkbox>
Create a Checkbox with initial checked state
Sourcepub fn create_switch(
&mut self,
text: &str,
parent: Option<i64>,
) -> Result<Switch>
pub fn create_switch( &mut self, text: &str, parent: Option<i64>, ) -> Result<Switch>
Create a Switch
Sourcepub fn create_switch_checked(
&mut self,
text: &str,
parent: Option<i64>,
checked: bool,
) -> Result<Switch>
pub fn create_switch_checked( &mut self, text: &str, parent: Option<i64>, checked: bool, ) -> Result<Switch>
Create a Switch with specified checked state
Create a RadioButton
Create a RadioButton with specified checked state
Sourcepub fn create_radio_group(&mut self, parent: Option<i64>) -> Result<RadioGroup>
pub fn create_radio_group(&mut self, parent: Option<i64>) -> Result<RadioGroup>
Create a RadioGroup
Sourcepub fn create_image_view(&mut self, parent: Option<i64>) -> Result<ImageView>
pub fn create_image_view(&mut self, parent: Option<i64>) -> Result<ImageView>
Create an ImageView
Sourcepub fn create_progress_bar(
&mut self,
parent: Option<i64>,
) -> Result<ProgressBar>
pub fn create_progress_bar( &mut self, parent: Option<i64>, ) -> Result<ProgressBar>
Create a ProgressBar
Create a ToggleButton
Create a ToggleButton with specified checked state
Sourcepub fn create_space(&mut self, parent: Option<i64>) -> Result<Space>
pub fn create_space(&mut self, parent: Option<i64>) -> Result<Space>
Create a Space (empty space for layout)
Sourcepub fn create_frame_layout(
&mut self,
parent: Option<i64>,
) -> Result<FrameLayout>
pub fn create_frame_layout( &mut self, parent: Option<i64>, ) -> Result<FrameLayout>
Create a FrameLayout
Sourcepub fn create_grid_layout(
&mut self,
rows: i32,
cols: i32,
parent: Option<i64>,
) -> Result<GridLayout>
pub fn create_grid_layout( &mut self, rows: i32, cols: i32, parent: Option<i64>, ) -> Result<GridLayout>
Create a GridLayout with specified rows and columns
Sourcepub fn create_horizontal_scroll_view(
&mut self,
parent: Option<i64>,
) -> Result<HorizontalScrollView>
pub fn create_horizontal_scroll_view( &mut self, parent: Option<i64>, ) -> Result<HorizontalScrollView>
Create a HorizontalScrollView
Sourcepub fn create_horizontal_scroll_view_with_params(
&mut self,
parent: Option<i64>,
fillviewport: bool,
snapping: bool,
nobar: bool,
) -> Result<HorizontalScrollView>
pub fn create_horizontal_scroll_view_with_params( &mut self, parent: Option<i64>, fillviewport: bool, snapping: bool, nobar: bool, ) -> Result<HorizontalScrollView>
Create a HorizontalScrollView with custom parameters
Sourcepub fn create_swipe_refresh_layout(
&mut self,
parent: Option<i64>,
) -> Result<SwipeRefreshLayout>
pub fn create_swipe_refresh_layout( &mut self, parent: Option<i64>, ) -> Result<SwipeRefreshLayout>
Create a SwipeRefreshLayout