Mobile-App-Programming-2(NEw)
Mobile-App-Programming-2(NEw)
HANDOUT 1
FUNDAMENTALS
• The process of software development is called the Software Development Lifecycle (SDLC).
5 Phases of Mobile Software Development Cycle
1. Inception
• That idea is usually refined into a solid basis for an application.
2. Design
• Consists of defining the app’s User Experience (UX).
• Turning the UX into a proper User Interface (UI) design.
3. Development
• Most resource-intensive phase
• Actual building of the application
4. Stabilization
• Quality Assurance (QA)
• Testing the application and bugs are fixed.
• Given a chance to use it, provide feedback, and inform changes.
5. Deployment
• Applications and updates are delivered from developers to users.
.NET Multi-platform App UI (. NET MAUI)
• Cross-platform framework
• Creating native mobile and desktop apps with C# and XAML
• Allows to develop apps that can run on Android, iOS, macOS and Windows.
HANDOUT 2
Visual Controls
BUILDING BLOCKS
1. MauiProgram.cs file
• Contains the code for creating
• Configuring the Application object.
2. App.xaml and App.xaml.cs files
• Provide UI resources
• Create the initial window for the application.
3. AppShell.xaml and AppShell.xaml.cs files
• Specify initial page for app
• Handle the registration of pages for navigation routing.
4. MainPage.xaml and MainPage.xaml.cs files
• Define the layput and Ui logic for the page displayed
.NET MAUI project
• Contains resources such as images, icons, fonts, and default bootstrap code for each platform.
The Application Class
NAVIGATION STRUCTURES
Shell
1. ContentView
• Default view for a content page, which displays items as-is.
• If the view is shrunk, items may disappear from the display until the view is resized.
2. ScrollView
• Enables the display of items in a scrolling window
• If the window is shrunk, items will be displayed by scrolling up and down.
3. CarouselView
• Scrollable view that lets the user swipe through a collection of items.
4. CollectionView
• Can retrieve data from a named data source.
• Present each item using a template as a format.
Controls and Layouts
• A view can contain a single control, such as a button, label, or text box.
• View is also a control so it can contain another view.
Layout
• Defines the rules by which the controls are displayed relative to each other.
• Also, a control so it can be added to a view.
• VerticalStackLayout element - enables fine-tuning the layout of other controls
HANDOUT 3
User Interface with XAML
Fundamentals
Markup language
• computer language that is used to introduce various elements in a document. Elements are
described using predefined tags.
• The tags have specific meaning in the context of the domain where the document is used.
• Hypertext Markup Language (HTML) to create a webpage that you can display in a web
browser
Extensible Application Markup Language (XAML)
• Declarative language
• Created by Microsoft
• Based on XML. XAML was designed to simplify the process of creating the UI in
applications.
1. Division of labor
• Does not require programming knowledge.
• Designers can focus on XAML and programmers can focus on writing the code.
2. Tooling friendly
• Possible to use a design tool to create the XAML layout for you.
• Can drag and drop controls onto a design surface using a graphical experience.
Object Element Syntax
• Used to specify the location of the information needed to instantiate the XAML elements that
you declare.
• Namespaces are defined by adding the xmlns attribute to the root element
• Root element of a XAML document is ContentPage.
Type Converter
• When the user either clicks the search button or presses the enter key.
TextChanged
HANDOUT 4
XAML PAGES
LAYOUT
Layout Panel
• A Container that holds a collection of child views and determines their size and position
LayoutOptions
• Sets the position of a view
• Encapsulates 2 layout preference
1. Alignment – Determines its position and size within its parent layout.
2. Expansion – Indicates if the view should use extra space if available
2 Types of LayoutOptions
1. VerticalOptions
2. HorizontalOptions
LayoutAlignment
• Controls how the child view is positioned
4 LayoutAlignment Values
1. Start
• Positions the view from left to right.
2. Center
• Horizontally or vertically centers the view.
3. End
• Positions the view from right to left.
4. Fill
• The view fills the width or height of the parent layout
StackLayout
• Organizes child views in a one-dimensional stack, either horizontally or vertically.
• Can also be used as parent layout that contains other child layouts.
Expands Property
• Designed specifically for StackLayout.
• Allows a child view to request extra space if available.
• Extra space is divided equally for each view.