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 (9)

PDF
JQuery UI
Gary Yeh
 
PDF
Why SOLID matters - even for JavaScript
martinlippert
 
PPTX
Swift Tableview iOS App Development
Ketan Raval
 
PDF
Databases and NodeJS
Riza Fahmi
 
ODP
Android query
Michal Pavlasek
 
PDF
Oracle helpdesk database shema
Murat Gülci
 
PDF
Dominando o Data Binding no Android
Nelson Glauber Leal
 
PPT
Jquery ui
adm_exoplatform
 
PPTX
Android accessibility
Puneet Kumar
 
JQuery UI
Gary Yeh
 
Why SOLID matters - even for JavaScript
martinlippert
 
Swift Tableview iOS App Development
Ketan Raval
 
Databases and NodeJS
Riza Fahmi
 
Android query
Michal Pavlasek
 
Oracle helpdesk database shema
Murat Gülci
 
Dominando o Data Binding no Android
Nelson Glauber Leal
 
Jquery ui
adm_exoplatform
 
Android accessibility
Puneet Kumar
 

Similar to Android development for iOS developers (20)

PDF
From iOS to Android
Jose Manuel Ortega Candel
 
PPTX
Lecture_On_AndroidApp_UserInterface.pptx
ridzah12
 
PPTX
Android crash course
Showmax Engineering
 
PDF
Ch4 creating user interfaces
Shih-Hsiang Lin
 
PDF
[PBO] Pertemuan 12 - Pemrograman Android
rizki adam kurniawan
 
PDF
iOS Development For Android Developers
Darryl Bayliss
 
PDF
Introducing Honeycomb
CommonsWare
 
PPTX
Ui 5
Michael Shrove
 
PPTX
Unit 2 part for information technology1 4.pptx
shambelworku8
 
PPTX
Performance #3 layout&amp;animation
Vitali Pekelis
 
PPTX
UNIT5newpart2pptx__2024_11_13_09_52_11 (1).pptx
LeeroyMugadza
 
PPT
Beginning Native Android Apps
Gil Irizarry
 
PDF
Introduction to Andriod Studio Lecture note: Android Development Lecture 1.pdf
AliyuIshaq2
 
PDF
Droidcon 2013 multidevice nightmare
Droidcon Berlin
 
PPTX
Android apps development
Monir Zzaman
 
PPTX
W1_Lec01_Lec02_Layouts.pptx
ssuserc1e786
 
PPTX
Droidcon 2013 Multidevice Nightmare
Hasan Hosgel
 
PDF
1.static int HORIZONTAL_WRAP2. Container view controllers are most.pdf
anonaeon
 
PPTX
Session #7 rich and responsive layouts
Vitali Pekelis
 
PPTX
Android apps development
Raman Pandey
 
From iOS to Android
Jose Manuel Ortega Candel
 
Lecture_On_AndroidApp_UserInterface.pptx
ridzah12
 
Android crash course
Showmax Engineering
 
Ch4 creating user interfaces
Shih-Hsiang Lin
 
[PBO] Pertemuan 12 - Pemrograman Android
rizki adam kurniawan
 
iOS Development For Android Developers
Darryl Bayliss
 
Introducing Honeycomb
CommonsWare
 
Unit 2 part for information technology1 4.pptx
shambelworku8
 
Performance #3 layout&amp;animation
Vitali Pekelis
 
UNIT5newpart2pptx__2024_11_13_09_52_11 (1).pptx
LeeroyMugadza
 
Beginning Native Android Apps
Gil Irizarry
 
Introduction to Andriod Studio Lecture note: Android Development Lecture 1.pdf
AliyuIshaq2
 
Droidcon 2013 multidevice nightmare
Droidcon Berlin
 
Android apps development
Monir Zzaman
 
W1_Lec01_Lec02_Layouts.pptx
ssuserc1e786
 
Droidcon 2013 Multidevice Nightmare
Hasan Hosgel
 
1.static int HORIZONTAL_WRAP2. Container view controllers are most.pdf
anonaeon
 
Session #7 rich and responsive layouts
Vitali Pekelis
 
Android apps development
Raman Pandey
 
Ad

Recently uploaded (20)

PDF
Simplify React app login with asgardeo-sdk
vaibhav289687
 
PDF
UITP Summit Meep Pitch may 2025 MaaS Rebooted
campoamor1
 
PPTX
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PDF
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
PPTX
prodad heroglyph crack 2.0.214.2 Full Free Download
cracked shares
 
PDF
Salesforce Experience Cloud Consultant.pdf
VALiNTRY360
 
PDF
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
PPTX
UI5con_2025_Accessibility_Ever_Evolving_
gerganakremenska1
 
PDF
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
PDF
Everything you need to know about pricing & licensing Microsoft 365 Copilot f...
Q-Advise
 
PPTX
iaas vs paas vs saas :choosing your cloud strategy
CloudlayaTechnology
 
PDF
Ready Layer One: Intro to the Model Context Protocol
mmckenna1
 
PDF
Best Web development company in india 2025
Greenusys
 
PPTX
Build a Custom Agent for Agentic Testing.pptx
klpathrudu
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PDF
IObit Driver Booster Pro 12.4.0.585 Crack Free Download
henryc1122g
 
PDF
NPD Software -Omnex systems
omnex systems
 
Simplify React app login with asgardeo-sdk
vaibhav289687
 
UITP Summit Meep Pitch may 2025 MaaS Rebooted
campoamor1
 
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
prodad heroglyph crack 2.0.214.2 Full Free Download
cracked shares
 
Salesforce Experience Cloud Consultant.pdf
VALiNTRY360
 
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
UI5con_2025_Accessibility_Ever_Evolving_
gerganakremenska1
 
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
Everything you need to know about pricing & licensing Microsoft 365 Copilot f...
Q-Advise
 
iaas vs paas vs saas :choosing your cloud strategy
CloudlayaTechnology
 
Ready Layer One: Intro to the Model Context Protocol
mmckenna1
 
Best Web development company in india 2025
Greenusys
 
Build a Custom Agent for Agentic Testing.pptx
klpathrudu
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
IObit Driver Booster Pro 12.4.0.585 Crack Free Download
henryc1122g
 
NPD Software -Omnex systems
omnex systems
 
Ad

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?