android development 2 - groups.tecnico.ulisboa.pt · to start you need to… • install java...
TRANSCRIPT
Android Development First steps for Android devs
What is Android?
Where is Android now?
• Phones and Tablets
• Wearables
• TVs
• VR
• Laptops
• Cars
On Android version 7.1.1
● Code name Nougat ● API 25
Starting a Project
To start you need to…
• Install Java Development Kit (JDK)
• Install IDE, Android Studio
And a computer of course…
Manifest
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.dfl.myawesomeapp"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
Gradle
build.gradle (Module)
Activity
Resources
Layout activity_main.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context="com.dfl.myawesomeapp.MainActivity"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" /> </RelativeLayout>
View
Intent
Service
Also good to explore…
• Fragments
• Broadcast Receiver
• Content Provider