Anúncio
Anúncio

Mais conteúdo relacionado

Anúncio

Android - Day3.pptx

  1. Presentation by Mrs.P.V.Kavitha Assistant Professor (Sr.Gr)/ IT SRI RAMAKRISHNA ENGINEERING COLLEGE [Educational Service : SNR Sons Charitable Trust] [Autonomous Institution, Accredited by NAAC with ‘A’ Grade] [Approved by AICTE and Permanently Affiliated to Anna University, Chennai] [ISO 9001:2015 Certified and all Eligible Programmes Accredited by NBA] VATTAMALAIPALAYAM, N.G.G.O. COLONY POST, COIMBATORE – 641 022. 16IT2E43 – ANDROID APPLICATION DEVELOPMENT OPEN ELECTIVE Department of Information Technology
  2. Syllabus  Introduction to Mobile Application Development  Mobility Landscape  Mobile Platforms  Mobile App development  Overview of Android platform  Setting up the Mobile App Development along with Emulator  A case study on Mobile App Development 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 2 MODULE 1 : GETTING STARTED WITH MOBILITY
  3. Agenda  Android Project App Structure  Building My First App in Emulator  Building My First App in Mobile Device  Hands-on – Building My First App  UI Resources – Layouts 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 3
  4. App Project Structure 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 4
  5. Exploring the folders and files in the Android App 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 5 Java Folder ◦ This folder contains the java source code (.java) files created during the application development ◦ MainActivity.java will be created automatically
  6. Exploring the folders and files in the Android App res(Resources) Folder ◦ It contains all non-code resources, such as bitmap images, UI strings, XML layouts 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 6
  7. Exploring the folders and files in the Android App Drawable (res/drawable) Folder It contains the different types of images as per the requirement of application Layout folder It contains all XML layout files which we used to define the user interface of our application 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 7
  8. Exploring the folders and files in the Android App Mipmap Folder (res/mipmap) This folder contains app / launcher icons that are used to show on the home screen 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 8
  9. Exploring the folders and files in the Android App Values Folder (res/values) This folder contains various XML files, such as strings, colors, style definitions and a static array of strings or integers 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 9
  10. Exploring the folders and files in the Android App Manifests Folder This folder contains a manifest file (AndroidManifest.xml) for our android application. This manifest file contains information about the application such as android version, access permissions, etc. of the application and its components. The manifest file will act as an intermediate between android OS and our application 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 10
  11. Exploring the folders and files in the Android App Gradle Scripts In android, Gradle means automated build system and by using this we can define a build configuration that applies to all modules in our application In Gradle build.gradle (Project), and build.gradle (Module) files are useful to build configurations that apply to all our app modules or specific to one app module 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 11
  12. Exploring the folders and files in the Android App Android Layout File (activity_main.xml) The UI of our application will be designed in this file and it will contain Design and Text modes. 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 12
  13. Exploring the folders and files in the Android App Android Main Activity File (MainActivity.java) The main activity file in the android application is MainActivity.java and it exists in the java folder The MainActivity.java file contains the java code to handle all the activities related to our app. 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 13
  14. My First Android App in Emulator 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 14
  15. My First Android App in Emulator 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 15
  16. My First Android App in Emulator 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 16
  17. My First Android App in Emulator 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 17
  18. My First Android App in Emulator 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 18
  19. My First Android App in Emulator 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 19
  20. My First Android App in Emulator 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 20
  21. My First Android App in Emulator 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 21
  22. My First Android App in Emulator 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 22
  23. My First Android App in Emulator 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 23
  24. My First Android App in Emulator 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 24
  25. My First Android App in Mobile device ◦ Connect your Mobile device with Laptop using USB cable ◦ Perform the following steps to enable USB debugging in the Developer options window: ◦ Open the Settings app. ◦ If your device uses Android v8.0 or higher, select System. Otherwise, proceed to the next step. ◦ Scroll to the bottom and select About phone. ◦ Scroll to the bottom and tap Build number seven times. ◦ Return to the previous screen, scroll to the bottom, and tap Developer options. ◦ In the Developer options window, scroll down to find and enable USB debugging. ◦ Run the app on your device as follows: ◦ In Android Studio, select your app from the run/debug configurations drop-down menu in the toolbar. ◦ In the toolbar, select the device that you want to run your app on from the target device drop- down menu. 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 25
  26. My First Android App in Mobile device 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 26
  27. UI Layouts Commonly used Attributes of UI Layout: android :id This is the ID which uniquely identifies the layout android : layout_width = match_parent Adjusts the width of the layout to the mobile screen android: layout_height = match_parent Adjusts the height of the layout to the mobile screen android:gravity This specifies how an object should position its content, on both the X and Y axes. Possible values are top, bottom, left, right, center, center_vertical, center_horizontal etc. android:orientation This specifies the direction of arrangement and you will use "horizontal" for a row, "vertical" for a column. The default is horizontal 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 27
  28. UI Controls/Components/Widgets 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 28 • Input controls are the interactive components in app's user interface • Android provides a wide variety of controls such as buttons, text fields, edit text, check box, radio button, toggle buttons, and many more Some of the UI controls are:
  29. UI Controls/Components/Widgets TextView : This control is used to display text to the user EditText : This control is used to get the input from the user Button : A push-button that can be pressed, or clicked, by the user to perform an action RadioButton: The RadioButton has two states: either checked or unchecked. CheckBox: An on/off switch that can be toggled by the user. You should use check box when presenting users with a group of selectable options that are not mutually exclusive. ToggleButton: An on/off button with a light indicator RadioGroup : A RadioGroup is used to group together one or more RadioButtons ListView: It contains the group of items and displays in a scrollable list 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 29
  30. Event Handling model Event Handling Model Events are a useful way to collect data about a user's interaction with interactive components of applications 27-03-2023 ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 30
  31. ANDROID APPLICATION DEVELOPMENT - P.V.KAVITHA 27-03-2023 31
Anúncio