Android SDK Download Android Studio from https developer
- Slides: 16
Android SDK Download Android Studio from https: //developer. android. com/studio/index. html File New Import (Folder of Note Project)
Java Class
Xml Layout
Android Manifest
Build. gradle
Basic parts of Android Studio Projects • Manifext. xml • Java Code • XML Layout
Manifest • Every Android application should contain a manifest file • It contains 1. Java Package Name 2. Components of the app: Activities, Services, Content Providers, Broadcast Receivers 3. Permissions for the app
Main. Activity. java package com. example. notetaker; import android. app. Activity; import android. os. Bundle; public class Hello. Activity extends Activity { /* Called when the activity is first created. */ @Override public void on. Create(Bundle saved. Instance. State) { super. on. Create(saved. Instance. State); set. Content. View(R. layout. main); } }
Layout Two ways to define the UI • Define the UI elements in XML • Instantiate the UI elements at runtime Different Types of Layout • • • Linear Layout Relative Layout Frame Layout Table Layout Absolute Layout Grid Layout
Linear Layout • Linear. Layout is a view group that aligns all children in a single direction, vertically or horizontally. • You can specify the layout direction with the android: orientation attribute. Horizontal Layout Vertical Layout
Relative Layout • View group that displays child views in relative positions • The position of each view can be specied as relative to sibling elements (left-of or below another view) • Or positions can be specied relative to the parent Relative. Layout area (aligned to the bottom, left of center).
Frame Layout • Generally meant for holding one child • Will happily stack up other elements with respect to the parent container i. e. itself • Generally used for manipulating the z-index of different elements (overlay elements)
Table Layout • Allows you to define the layout in terms of rows and columns like html
Directory Structrure manifest The manifest file describes the fundamental characteristics of the app and defines each of its components src/ Directory for your app's main source files. By default, it includes an Activity class that runs when your app is launched using the app icon. res/ Contains several sub-directories for app resources. Here are just a few: drawable/ A drawable resource is a general concept for a graphic that can be drawn to the screen layout/ Files that define your app's user interface. values/ Directory for other various XML files that contain a collection of resources, such as string and color definitions.
Questions ?
- Https developer android com studio index html
- Https developer android com studio index html
- Https developer android com studio index html
- Progress developer
- Microsoft robotics developer studio 4 download
- Microsoft robotics developer studio
- Google cast sdk developer console
- Visual studio install android emulator
- Android sdk windows xp
- Turn based multiplayer mobile games
- Oracle developer tools for visual studio 2017
- Office developer tools for visual studio 2017
- Tandy trower
- Progress developer studio
- Windows media encoder sdk
- Developer.android.com
- Amir naghavi