SlideShare a Scribd company logo
Android Development for iOS
Developers
Darryl Bayliss
@Dazindustries
Android development for iOS developers
Android development for iOS developers
Showing Content (iOS)
- Storyboards
- XIBs
- Code
Android development for iOS developers
Android development for iOS developers
override func viewDidLoad() {
super.viewDidLoad()
let textLabel = UILabel(frame: CGRectMake(40, 40, 200, 100))
textLabel.text = "Super amazing textlabel"
self.view.addSubview(textLabel)
let button = UIButton(frame: CGRectMake(50, 150, 50, 50))
button.titleLabel?.text = "Super amazing button"
self.view.addSubview(textLabel)
}
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
}
override func viewDidDisappear(animated: Bool) {
super.viewDidDisappear(animated)
}
Showing Content (Android)
- Navigation Editor Tool
- Layouts
- Code
Android development for iOS developers
Android development for iOS developers
Android development for iOS developers
@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);



LinearLayout linearLayout = new LinearLayout(this);



LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(

LinearLayout.LayoutParams.MATCH_PARENT,

LinearLayout.LayoutParams.MATCH_PARENT);



TextView textView = new TextView(this);

textView.setText("Super amazing TextView");

linearLayout.addView(textView);


Button button = new Button(this);

button.setText("Super amazing Button");

linearLayout.addView(button);



setContentView(linearLayout, layoutParams);

}



@Override

protected void onStart() {

super.onStart();

}



@Override

protected void onPause() {

super.onPause();

}
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
}
override func viewDidDisappear(animated: Bool) {
super.viewDidDisappear(animated)
}
@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

}



@Override

protected void onStart() {

super.onStart();

}



@Override

protected void onPause() {

super.onPause();

}
View Controller Lifecycles
TableViews (iOS)
- Implement the Data Source / Table View
Delegates
- Override the required methods
- Perform your logic
class tableViewController : UIViewController, UITableViewDataSource, UITableViewDelegate {
@IBOutlet var tableView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
tableView.dataSource = self
tableView.delegate = self
}
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 10
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = UITableViewCell(style: UITableViewCellStyle.Value2, reuseIdentifier: nil)
cell.textLabel?.text = "Super amazing cell text"
return cell
}
}
RecyclerViews (Android)
- Create a RecyclerView
- Set RecyclerView Layout Manager
- Set RecyclerView Adapter
@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);



recyclerView = (RecyclerView) findViewById(R.id.my_recycler_view);



LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);

recyclerView.setLayoutManager(linearLayoutManager);



recyclerView.setAdapter(new RecyclerAdapter());

}
public class RecyclerAdapter extends RecyclerView.Adapter<RecyclerAdapter.ViewHolder> {



public static class ViewHolder extends RecyclerView.ViewHolder {



public TextView textView;

public ViewHolder(TextView textView) {

super(textView);

textView = textView;

}

}



@Override

public RecyclerAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {



TextView v = (TextView) LayoutInflater.from(parent.getContext())

.inflate(R.layout.recycler_item_textview, parent, false);



RecyclerAdapter.ViewHolder vh = new RecyclerAdapter.ViewHolder(v);

return vh;

}



@Override

public void onBindViewHolder(ViewHolder viewHolder, int i) {

viewHolder.textView.setText("Super amazing textview");

}



@Override

public int getItemCount() {

return 10;

}
User Permissions (iOS)
- Attempt to access a feature at runtime
- Handle the result
class DetailViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
@IBAction func showCamera(sender: UIButton) {
AVCaptureDevice.requestAccessForMediaType(AVMediaTypeVideo, completionHandler: { granted in
if(granted) {
// Do camera stuff here
}
else {
// Handle user rejection
}
})
}
}
User Permissions (Android 6.0)
- Attempt to access a feature at runtime
- Handle the result
public class MainActivity extends Activity {



final int CAMERA_REQUEST_CODE = 0;

Button showCameraButton;



@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);


showCameraButton = (Button) findViewById(R.id.show_camera_button);

showCameraButton.setOnClickListener(new View.OnClickListener() {

@Override

public void onClick(View v) {

showCamera();

}

});

}



public void showCamera() {



if (checkSelfPermission(Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {

requestPermissions(new String[]{Manifest.permission.CAMERA}, CAMERA_REQUEST_CODE);



} else {

// ... Show camera

}

}
@Override

public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {


if (requestCode == CAMERA_REQUEST_CODE && grantResults[0] == PackageManager.PERMISSION_GRANTED) {

// ... Show Camera

}

}
}
- Android is a mess of disparate OEMs and legacy versions
- Fragmentation is a headache for developers
- Fragmentation presents a lot of problems for enterprise…
there aren’t many good solutions
The Internet Said…
Quotes from The Next Web, Open Signal & Tech Target
OS Fragmentation
AndroidiOS
Stats from Apple Developer, Android Developer
Android development for iOS developers
Device Screen Sizes
AndroidiOS
Screen Sizes (iOS)
- Autolayout
- Setup constraints on views to
accommodate multiple screen sizes
- Use Size Classes for fine grained
constraint control
Screen Sizes (Android)
- Views & layouts can be designed to be
pixel independent
- Android resizes layouts based on device
screen
- Can design multiple variants of the same
layout for specific device dimensions
Android development for iOS developers
Android development for iOS developers
OS Fragmentation (iOS)
- Encourage users to update for new
features
- Encourage developers to support new
features unavailable on older iOS versions
- Runtime detection of OS version in code
using Availability attributes
OS Fragmentation (Android)
- Android Support Libraries
- Provides features that are backwards
compatible to devices running old versions
of Android
- Ability to support devices running Android
1.6 (Donut)
Material Design
- Androids iOS 7 moment
- A visual language based on paper / ink
Material Design
Build Targets / Gradle
Localization
Unit Testing
UI Testing
Extensions / Intents
App Content Searching
Android development for iOS developers
Quiz Question #1
• Layout?
• Activity?
• Controller?
What is the Android equivalent of a UIViewController?
Quiz Question #2
• Themes?
• Styles?
• Layouts?
In Android, what are the files that hold your user interface

elements for each screen called?
Quiz Question #3
• onCreate()?
• onAppear()?
• onStart()?
What is Androids equivalent of a viewDidLoad lifecycle call?

More Related Content

What's hot

JQuery UI
JQuery UIJQuery UI
JQuery UI
Gary Yeh
 
Why SOLID matters - even for JavaScript
Why SOLID matters - even for JavaScriptWhy SOLID matters - even for JavaScript
Why SOLID matters - even for JavaScript
martinlippert
 
Swift Tableview iOS App Development
Swift Tableview iOS App DevelopmentSwift Tableview iOS App Development
Swift Tableview iOS App Development
Ketan Raval
 
Databases and NodeJS
Databases and NodeJSDatabases and NodeJS
Databases and NodeJS
Riza Fahmi
 
Android query
Android queryAndroid query
Android query
Michal Pavlasek
 
Oracle helpdesk database shema
Oracle helpdesk database shemaOracle helpdesk database shema
Oracle helpdesk database shema
Murat Gülci
 
Dominando o Data Binding no Android
Dominando o Data Binding no AndroidDominando o Data Binding no Android
Dominando o Data Binding no Android
Nelson Glauber Leal
 
Jquery ui
Jquery uiJquery ui
Jquery ui
adm_exoplatform
 
Android accessibility
Android accessibilityAndroid accessibility
Android accessibility
Puneet Kumar
 

What's hot (9)

JQuery UI
JQuery UIJQuery UI
JQuery UI
 
Why SOLID matters - even for JavaScript
Why SOLID matters - even for JavaScriptWhy SOLID matters - even for JavaScript
Why SOLID matters - even for JavaScript
 
Swift Tableview iOS App Development
Swift Tableview iOS App DevelopmentSwift Tableview iOS App Development
Swift Tableview iOS App Development
 
Databases and NodeJS
Databases and NodeJSDatabases and NodeJS
Databases and NodeJS
 
Android query
Android queryAndroid query
Android query
 
Oracle helpdesk database shema
Oracle helpdesk database shemaOracle helpdesk database shema
Oracle helpdesk database shema
 
Dominando o Data Binding no Android
Dominando o Data Binding no AndroidDominando o Data Binding no Android
Dominando o Data Binding no Android
 
Jquery ui
Jquery uiJquery ui
Jquery ui
 
Android accessibility
Android accessibilityAndroid accessibility
Android accessibility
 

Similar to Android development for iOS developers

Compose In Practice
Compose In PracticeCompose In Practice
Compose In Practice
Kelvin Harron
 
Building Modern Apps using Android Architecture Components
Building Modern Apps using Android Architecture ComponentsBuilding Modern Apps using Android Architecture Components
Building Modern Apps using Android Architecture Components
Hassan Abid
 
07_UIAndroid.pdf
07_UIAndroid.pdf07_UIAndroid.pdf
07_UIAndroid.pdf
ImranS18
 
MOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app developmentMOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app development
anistar sung
 
What's New in Android
What's New in AndroidWhat's New in Android
What's New in Android
Robert Cooper
 
iOS Development For Android Developers
iOS Development For Android DevelopersiOS Development For Android Developers
iOS Development For Android Developers
Darryl Bayliss
 
Connect.js - Exploring React.Native
Connect.js - Exploring React.NativeConnect.js - Exploring React.Native
Connect.js - Exploring React.Native
joshcjensen
 
Android Custom views
Android Custom views   Android Custom views
Android Custom views
Matej Vukosav
 
What's new in android: jetpack compose 2024
What's new in android: jetpack compose 2024What's new in android: jetpack compose 2024
What's new in android: jetpack compose 2024
Toru Wonyoung Choi
 
Android development with Scala and SBT
Android development with Scala and SBTAndroid development with Scala and SBT
Android development with Scala and SBT
Anton Yalyshev
 
Responsive mobile design in practice
Responsive mobile design in practiceResponsive mobile design in practice
Responsive mobile design in practice
Kirill Grouchnikov
 
Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recievers
Utkarsh Mankad
 
Android por onde começar? Mini Curso Erbase 2015
Android por onde começar? Mini Curso Erbase 2015 Android por onde começar? Mini Curso Erbase 2015
Android por onde começar? Mini Curso Erbase 2015
Mario Jorge Pereira
 
Application Development - Overview on Android OS
Application Development - Overview on Android OSApplication Development - Overview on Android OS
Application Development - Overview on Android OS
Pankaj Maheshwari
 
Embracing the Lollipop
Embracing the LollipopEmbracing the Lollipop
Embracing the Lollipop
Sonja Kesic
 
ButterKnife
ButterKnifeButterKnife
ButterKnife
Himanshu Dudhat
 
Top Tips for Android UIs - Getting the Magic on Tablets
Top Tips for Android UIs - Getting the Magic on TabletsTop Tips for Android UIs - Getting the Magic on Tablets
Top Tips for Android UIs - Getting the Magic on Tablets
Motorola Mobility - MOTODEV
 
Workshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideWorkshop 26: React Native - The Native Side
Workshop 26: React Native - The Native Side
Visual Engineering
 
Android App Development - 04 Views and layouts
Android App Development - 04 Views and layoutsAndroid App Development - 04 Views and layouts
Android App Development - 04 Views and layouts
Diego Grancini
 
Optimize CollectionView Scrolling
Optimize CollectionView ScrollingOptimize CollectionView Scrolling
Optimize CollectionView Scrolling
Andrea Prearo
 

Similar to Android development for iOS developers (20)

Compose In Practice
Compose In PracticeCompose In Practice
Compose In Practice
 
Building Modern Apps using Android Architecture Components
Building Modern Apps using Android Architecture ComponentsBuilding Modern Apps using Android Architecture Components
Building Modern Apps using Android Architecture Components
 
07_UIAndroid.pdf
07_UIAndroid.pdf07_UIAndroid.pdf
07_UIAndroid.pdf
 
MOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app developmentMOPCON 2014 - Best software architecture in app development
MOPCON 2014 - Best software architecture in app development
 
What's New in Android
What's New in AndroidWhat's New in Android
What's New in Android
 
iOS Development For Android Developers
iOS Development For Android DevelopersiOS Development For Android Developers
iOS Development For Android Developers
 
Connect.js - Exploring React.Native
Connect.js - Exploring React.NativeConnect.js - Exploring React.Native
Connect.js - Exploring React.Native
 
Android Custom views
Android Custom views   Android Custom views
Android Custom views
 
What's new in android: jetpack compose 2024
What's new in android: jetpack compose 2024What's new in android: jetpack compose 2024
What's new in android: jetpack compose 2024
 
Android development with Scala and SBT
Android development with Scala and SBTAndroid development with Scala and SBT
Android development with Scala and SBT
 
Responsive mobile design in practice
Responsive mobile design in practiceResponsive mobile design in practice
Responsive mobile design in practice
 
Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recievers
 
Android por onde começar? Mini Curso Erbase 2015
Android por onde começar? Mini Curso Erbase 2015 Android por onde começar? Mini Curso Erbase 2015
Android por onde começar? Mini Curso Erbase 2015
 
Application Development - Overview on Android OS
Application Development - Overview on Android OSApplication Development - Overview on Android OS
Application Development - Overview on Android OS
 
Embracing the Lollipop
Embracing the LollipopEmbracing the Lollipop
Embracing the Lollipop
 
ButterKnife
ButterKnifeButterKnife
ButterKnife
 
Top Tips for Android UIs - Getting the Magic on Tablets
Top Tips for Android UIs - Getting the Magic on TabletsTop Tips for Android UIs - Getting the Magic on Tablets
Top Tips for Android UIs - Getting the Magic on Tablets
 
Workshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideWorkshop 26: React Native - The Native Side
Workshop 26: React Native - The Native Side
 
Android App Development - 04 Views and layouts
Android App Development - 04 Views and layoutsAndroid App Development - 04 Views and layouts
Android App Development - 04 Views and layouts
 
Optimize CollectionView Scrolling
Optimize CollectionView ScrollingOptimize CollectionView Scrolling
Optimize CollectionView Scrolling
 

Recently uploaded

Wired_2.0_Create_AmsterdamJUG_09072024.pptx
Wired_2.0_Create_AmsterdamJUG_09072024.pptxWired_2.0_Create_AmsterdamJUG_09072024.pptx
Wired_2.0_Create_AmsterdamJUG_09072024.pptx
SimonedeGijt
 
Verified Girls Call Mumbai 👀 9820252231 👀 Cash Payment With Room DeliveryDeli...
Verified Girls Call Mumbai 👀 9820252231 👀 Cash Payment With Room DeliveryDeli...Verified Girls Call Mumbai 👀 9820252231 👀 Cash Payment With Room DeliveryDeli...
Verified Girls Call Mumbai 👀 9820252231 👀 Cash Payment With Room DeliveryDeli...
87tomato
 
Busty Girls Call Mumbai 9930245274 Unlimited Short Providing Girls Service Av...
Busty Girls Call Mumbai 9930245274 Unlimited Short Providing Girls Service Av...Busty Girls Call Mumbai 9930245274 Unlimited Short Providing Girls Service Av...
Busty Girls Call Mumbai 9930245274 Unlimited Short Providing Girls Service Av...
revolutionary575
 
Odoo E-commerce website development guides
Odoo E-commerce website development guidesOdoo E-commerce website development guides
Odoo E-commerce website development guides
jhkdigitalmarketing
 
Top Chinese Government-backed APT Groups
Top Chinese Government-backed APT GroupsTop Chinese Government-backed APT Groups
Top Chinese Government-backed APT Groups
SOCRadar
 
Maximizing Efficiency and Profitability: Optimizing Data Systems, Enhancing C...
Maximizing Efficiency and Profitability: Optimizing Data Systems, Enhancing C...Maximizing Efficiency and Profitability: Optimizing Data Systems, Enhancing C...
Maximizing Efficiency and Profitability: Optimizing Data Systems, Enhancing C...
OnePlan Solutions
 
How To Fill Timesheet in TaskSprint: Quick Guide 2024
How To Fill Timesheet in TaskSprint: Quick Guide 2024How To Fill Timesheet in TaskSprint: Quick Guide 2024
How To Fill Timesheet in TaskSprint: Quick Guide 2024
TaskSprint | Employee Efficiency Software
 
GT degree offer diploma Transcript
GT degree offer diploma TranscriptGT degree offer diploma Transcript
GT degree offer diploma Transcript
attueb
 
ThaiPy meetup - Indexes and Django
ThaiPy meetup - Indexes and DjangoThaiPy meetup - Indexes and Django
ThaiPy meetup - Indexes and Django
akshesh doshi
 
AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.
AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.
AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.
Srinivas Dukka
 
Celebrity Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Servic...
Celebrity Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Servic...Celebrity Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Servic...
Celebrity Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Servic...
45unexpected
 
Mobile App Development Company in Noida - Drona Infotech.
Mobile App Development Company in Noida - Drona Infotech.Mobile App Development Company in Noida - Drona Infotech.
Mobile App Development Company in Noida - Drona Infotech.
Mobile App Development Company in Noida - Drona Infotech
 
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
ThousandEyes
 
Il Data Streaming per un’AI real-time di nuova generazione
Il Data Streaming per un’AI real-time di nuova generazioneIl Data Streaming per un’AI real-time di nuova generazione
Il Data Streaming per un’AI real-time di nuova generazione
confluent
 
Celebrity Girls Call Mumbai 🛵🚡9910780858 💃 Choose Best And Top Girl Service A...
Celebrity Girls Call Mumbai 🛵🚡9910780858 💃 Choose Best And Top Girl Service A...Celebrity Girls Call Mumbai 🛵🚡9910780858 💃 Choose Best And Top Girl Service A...
Celebrity Girls Call Mumbai 🛵🚡9910780858 💃 Choose Best And Top Girl Service A...
norina2645
 
Private Girls Call Navi Mumbai 🛵🚡9820252231 💃 Choose Best And Top Girl Servic...
Private Girls Call Navi Mumbai 🛵🚡9820252231 💃 Choose Best And Top Girl Servic...Private Girls Call Navi Mumbai 🛵🚡9820252231 💃 Choose Best And Top Girl Servic...
Private Girls Call Navi Mumbai 🛵🚡9820252231 💃 Choose Best And Top Girl Servic...
902basic
 
Introduction to Cloud computing for Internet of Things
Introduction to Cloud computing for Internet of ThingsIntroduction to Cloud computing for Internet of Things
Introduction to Cloud computing for Internet of Things
NachuSubramanian1
 
High Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 ...
High Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 ...High Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 ...
High Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 ...
singhlata50dh
 
Mumbai Girls Call Mumbai 🎈🔥9930687706 🔥💋🎈 Provide Best And Top Girl Service A...
Mumbai Girls Call Mumbai 🎈🔥9930687706 🔥💋🎈 Provide Best And Top Girl Service A...Mumbai Girls Call Mumbai 🎈🔥9930687706 🔥💋🎈 Provide Best And Top Girl Service A...
Mumbai Girls Call Mumbai 🎈🔥9930687706 🔥💋🎈 Provide Best And Top Girl Service A...
3610stuck
 
Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...
Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...
Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...
bhumivarma35300
 

Recently uploaded (20)

Wired_2.0_Create_AmsterdamJUG_09072024.pptx
Wired_2.0_Create_AmsterdamJUG_09072024.pptxWired_2.0_Create_AmsterdamJUG_09072024.pptx
Wired_2.0_Create_AmsterdamJUG_09072024.pptx
 
Verified Girls Call Mumbai 👀 9820252231 👀 Cash Payment With Room DeliveryDeli...
Verified Girls Call Mumbai 👀 9820252231 👀 Cash Payment With Room DeliveryDeli...Verified Girls Call Mumbai 👀 9820252231 👀 Cash Payment With Room DeliveryDeli...
Verified Girls Call Mumbai 👀 9820252231 👀 Cash Payment With Room DeliveryDeli...
 
Busty Girls Call Mumbai 9930245274 Unlimited Short Providing Girls Service Av...
Busty Girls Call Mumbai 9930245274 Unlimited Short Providing Girls Service Av...Busty Girls Call Mumbai 9930245274 Unlimited Short Providing Girls Service Av...
Busty Girls Call Mumbai 9930245274 Unlimited Short Providing Girls Service Av...
 
Odoo E-commerce website development guides
Odoo E-commerce website development guidesOdoo E-commerce website development guides
Odoo E-commerce website development guides
 
Top Chinese Government-backed APT Groups
Top Chinese Government-backed APT GroupsTop Chinese Government-backed APT Groups
Top Chinese Government-backed APT Groups
 
Maximizing Efficiency and Profitability: Optimizing Data Systems, Enhancing C...
Maximizing Efficiency and Profitability: Optimizing Data Systems, Enhancing C...Maximizing Efficiency and Profitability: Optimizing Data Systems, Enhancing C...
Maximizing Efficiency and Profitability: Optimizing Data Systems, Enhancing C...
 
How To Fill Timesheet in TaskSprint: Quick Guide 2024
How To Fill Timesheet in TaskSprint: Quick Guide 2024How To Fill Timesheet in TaskSprint: Quick Guide 2024
How To Fill Timesheet in TaskSprint: Quick Guide 2024
 
GT degree offer diploma Transcript
GT degree offer diploma TranscriptGT degree offer diploma Transcript
GT degree offer diploma Transcript
 
ThaiPy meetup - Indexes and Django
ThaiPy meetup - Indexes and DjangoThaiPy meetup - Indexes and Django
ThaiPy meetup - Indexes and Django
 
AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.
AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.
AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.
 
Celebrity Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Servic...
Celebrity Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Servic...Celebrity Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Servic...
Celebrity Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Servic...
 
Mobile App Development Company in Noida - Drona Infotech.
Mobile App Development Company in Noida - Drona Infotech.Mobile App Development Company in Noida - Drona Infotech.
Mobile App Development Company in Noida - Drona Infotech.
 
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
 
Il Data Streaming per un’AI real-time di nuova generazione
Il Data Streaming per un’AI real-time di nuova generazioneIl Data Streaming per un’AI real-time di nuova generazione
Il Data Streaming per un’AI real-time di nuova generazione
 
Celebrity Girls Call Mumbai 🛵🚡9910780858 💃 Choose Best And Top Girl Service A...
Celebrity Girls Call Mumbai 🛵🚡9910780858 💃 Choose Best And Top Girl Service A...Celebrity Girls Call Mumbai 🛵🚡9910780858 💃 Choose Best And Top Girl Service A...
Celebrity Girls Call Mumbai 🛵🚡9910780858 💃 Choose Best And Top Girl Service A...
 
Private Girls Call Navi Mumbai 🛵🚡9820252231 💃 Choose Best And Top Girl Servic...
Private Girls Call Navi Mumbai 🛵🚡9820252231 💃 Choose Best And Top Girl Servic...Private Girls Call Navi Mumbai 🛵🚡9820252231 💃 Choose Best And Top Girl Servic...
Private Girls Call Navi Mumbai 🛵🚡9820252231 💃 Choose Best And Top Girl Servic...
 
Introduction to Cloud computing for Internet of Things
Introduction to Cloud computing for Internet of ThingsIntroduction to Cloud computing for Internet of Things
Introduction to Cloud computing for Internet of Things
 
High Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 ...
High Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 ...High Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 ...
High Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 ...
 
Mumbai Girls Call Mumbai 🎈🔥9930687706 🔥💋🎈 Provide Best And Top Girl Service A...
Mumbai Girls Call Mumbai 🎈🔥9930687706 🔥💋🎈 Provide Best And Top Girl Service A...Mumbai Girls Call Mumbai 🎈🔥9930687706 🔥💋🎈 Provide Best And Top Girl Service A...
Mumbai Girls Call Mumbai 🎈🔥9930687706 🔥💋🎈 Provide Best And Top Girl Service A...
 
Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...
Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...
Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...
 

Android development for iOS developers

  • 1. Android Development for iOS Developers Darryl Bayliss @Dazindustries
  • 4. Showing Content (iOS) - Storyboards - XIBs - Code
  • 7. override func viewDidLoad() { super.viewDidLoad() let textLabel = UILabel(frame: CGRectMake(40, 40, 200, 100)) textLabel.text = "Super amazing textlabel" self.view.addSubview(textLabel) let button = UIButton(frame: CGRectMake(50, 150, 50, 50)) button.titleLabel?.text = "Super amazing button" self.view.addSubview(textLabel) } override func viewDidAppear(animated: Bool) { super.viewDidAppear(animated) } override func viewDidDisappear(animated: Bool) { super.viewDidDisappear(animated) }
  • 8. Showing Content (Android) - Navigation Editor Tool - Layouts - Code
  • 12. @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 
 LinearLayout linearLayout = new LinearLayout(this);
 
 LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(
 LinearLayout.LayoutParams.MATCH_PARENT,
 LinearLayout.LayoutParams.MATCH_PARENT);
 
 TextView textView = new TextView(this);
 textView.setText("Super amazing TextView");
 linearLayout.addView(textView); 
 Button button = new Button(this);
 button.setText("Super amazing Button");
 linearLayout.addView(button);
 
 setContentView(linearLayout, layoutParams);
 }
 
 @Override
 protected void onStart() {
 super.onStart();
 }
 
 @Override
 protected void onPause() {
 super.onPause();
 }
  • 13. override func viewDidLoad() { super.viewDidLoad() } override func viewDidAppear(animated: Bool) { super.viewDidAppear(animated) } override func viewDidDisappear(animated: Bool) { super.viewDidDisappear(animated) } @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 }
 
 @Override
 protected void onStart() {
 super.onStart();
 }
 
 @Override
 protected void onPause() {
 super.onPause();
 } View Controller Lifecycles
  • 14. TableViews (iOS) - Implement the Data Source / Table View Delegates - Override the required methods - Perform your logic
  • 15. class tableViewController : UIViewController, UITableViewDataSource, UITableViewDelegate { @IBOutlet var tableView: UITableView! override func viewDidLoad() { super.viewDidLoad() tableView.dataSource = self tableView.delegate = self } func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 10 } func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell = UITableViewCell(style: UITableViewCellStyle.Value2, reuseIdentifier: nil) cell.textLabel?.text = "Super amazing cell text" return cell } }
  • 16. RecyclerViews (Android) - Create a RecyclerView - Set RecyclerView Layout Manager - Set RecyclerView Adapter
  • 17. @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_main);
 
 recyclerView = (RecyclerView) findViewById(R.id.my_recycler_view);
 
 LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
 recyclerView.setLayoutManager(linearLayoutManager);
 
 recyclerView.setAdapter(new RecyclerAdapter());
 }
  • 18. public class RecyclerAdapter extends RecyclerView.Adapter<RecyclerAdapter.ViewHolder> {
 
 public static class ViewHolder extends RecyclerView.ViewHolder {
 
 public TextView textView;
 public ViewHolder(TextView textView) {
 super(textView);
 textView = textView;
 }
 }
 
 @Override
 public RecyclerAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
 
 TextView v = (TextView) LayoutInflater.from(parent.getContext())
 .inflate(R.layout.recycler_item_textview, parent, false);
 
 RecyclerAdapter.ViewHolder vh = new RecyclerAdapter.ViewHolder(v);
 return vh;
 }
 
 @Override
 public void onBindViewHolder(ViewHolder viewHolder, int i) {
 viewHolder.textView.setText("Super amazing textview");
 }
 
 @Override
 public int getItemCount() {
 return 10;
 }
  • 19. User Permissions (iOS) - Attempt to access a feature at runtime - Handle the result
  • 20. class DetailViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() } @IBAction func showCamera(sender: UIButton) { AVCaptureDevice.requestAccessForMediaType(AVMediaTypeVideo, completionHandler: { granted in if(granted) { // Do camera stuff here } else { // Handle user rejection } }) } }
  • 21. User Permissions (Android 6.0) - Attempt to access a feature at runtime - Handle the result
  • 22. public class MainActivity extends Activity {
 
 final int CAMERA_REQUEST_CODE = 0;
 Button showCameraButton;
 
 @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_main); 
 showCameraButton = (Button) findViewById(R.id.show_camera_button);
 showCameraButton.setOnClickListener(new View.OnClickListener() {
 @Override
 public void onClick(View v) {
 showCamera();
 }
 });
 }
 
 public void showCamera() {
 
 if (checkSelfPermission(Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
 requestPermissions(new String[]{Manifest.permission.CAMERA}, CAMERA_REQUEST_CODE);
 
 } else {
 // ... Show camera
 }
 } @Override
 public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { 
 if (requestCode == CAMERA_REQUEST_CODE && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
 // ... Show Camera
 }
 } }
  • 23. - Android is a mess of disparate OEMs and legacy versions - Fragmentation is a headache for developers - Fragmentation presents a lot of problems for enterprise… there aren’t many good solutions The Internet Said… Quotes from The Next Web, Open Signal & Tech Target
  • 24. OS Fragmentation AndroidiOS Stats from Apple Developer, Android Developer
  • 27. Screen Sizes (iOS) - Autolayout - Setup constraints on views to accommodate multiple screen sizes - Use Size Classes for fine grained constraint control
  • 28. Screen Sizes (Android) - Views & layouts can be designed to be pixel independent - Android resizes layouts based on device screen - Can design multiple variants of the same layout for specific device dimensions
  • 31. OS Fragmentation (iOS) - Encourage users to update for new features - Encourage developers to support new features unavailable on older iOS versions - Runtime detection of OS version in code using Availability attributes
  • 32. OS Fragmentation (Android) - Android Support Libraries - Provides features that are backwards compatible to devices running old versions of Android - Ability to support devices running Android 1.6 (Donut)
  • 33. Material Design - Androids iOS 7 moment - A visual language based on paper / ink
  • 35. Build Targets / Gradle Localization Unit Testing UI Testing Extensions / Intents App Content Searching
  • 37. Quiz Question #1 • Layout? • Activity? • Controller? What is the Android equivalent of a UIViewController?
  • 38. Quiz Question #2 • Themes? • Styles? • Layouts? In Android, what are the files that hold your user interface
 elements for each screen called?
  • 39. Quiz Question #3 • onCreate()? • onAppear()? • onStart()? What is Androids equivalent of a viewDidLoad lifecycle call?