You ve been told lies about Fragments.

Size: px
Start display at page:

Download "You ve been told lies about Fragments."

Transcription

1 You ve been told lies about Fragments.

2 Mateusz Herych Android Tech IG Google Developer Expert on Android GDG Kraków co-organizer Father of / github.com/partition

3 You ve been told lies about Fragments.

4 Custom Views are all you need.

5 Custom Views are all you need?

6 Goals of this talk

7 Agenda - First I will tell you why Fragments are bad

8 Agenda - First I will tell you why Fragments are bad Then that you can do nothing about it

9 Agenda - First I will tell you why Fragments are bad Then that you can do nothing about it Finally will tell you that ACTUALLY you can do something about it

10 Goals of this talk - For those of your who re locked to Fragments: perhaps teach you something new and share experience how to make your life easier.

11 Goals of this talk - For those of your who re locked to Fragments: perhaps teach you something new and share experience how to make your life easier. For those of you starting a new project: give an idea about alternative approaches that may possibly work for you (or not).

12 Fragments, the bad.

13 Lifecycle.

14 Advocating Against Android Fragments Pierre-Yves Ricau, Square

15 Finally getting rid of Android Fragments Sebastian Drygalski, SoftwareMill

16

17 Is that a problem though?

18 Too much drama about number of callbacks. Real issue = unexpected behavior.

19 Story of an app.

20 USFragment EuropeFragment AsiaFragment

21 USFragment { us : [ <us news go here> ], eu : [ <eu news go here>], asia : [ <asia news go here>] EuropeFragment } AsiaFragment

22 USFragment { us : [ <us news go here> ], eu : [ <eu news go here>], asia : [ <asia news go here>] EuropeFragment } AsiaFragment setusnews() Activity Presenter seteunews() setasianews()

23 USFragment { EuropeFragment us : [ <us news go here> ], eu : [ <eu news go here>], asia : [ <asia news go here>] findfragmentbytag( us ) + cast + setitems() } AsiaFragment setusnews() Activity Presenter seteunews() setasianews()

24 Response is cached in memory once done. USFragment { EuropeFragment us : [ <us news go here> ], eu : [ <eu news go here>], asia : [ <asia news go here>] findfragmentbytag( us ) + cast + setitems() } AsiaFragment setusnews() Activity Presenter seteunews() setasianews()

25 What s the problem?

26

27 Activity.onCreate() -> presenter.attachview(view)

28 Data is cached -> immediate call to Activity.setData()

29 Activity.setData() -> getfragment().setdata()

30

31 View is not yet created.

32 View is not yet created. NPE inside of the Fragment.

33 FragmentTransactions are asynchronous.

34

35 Quiz

36 Fragment.onAttach() Fragment.onCreate() Fragment.onCreateView() Activity.onCreate() Activity.onStart()

37 Activity.onCreate()

38 Activity.onCreate() Fragment.onAttach()

39 Activity.onCreate() Fragment.onAttach() Fragment.onCreate()

40 Activity.onCreate() Fragment.onAttach() Fragment.onCreate() Activity.onStart()

41 Activity.onCreate() Fragment.onAttach() Fragment.onCreate() Activity.onStart() Fragment.onCreateView()

42

43 commitnow() - added June 2016, Support Library

44

45 Changes nothing here.

46 However

47

48

49

50

51 This is pretty fundamentally WAI as things stand today. We don't create the view until we transition to the ACTIVITY_CREATED state, which is after the activity oncreate returns. This way a fragment's oncreateview can rely on its host activity having been fully created when it runs. If you commitnow() in oncreate, you haven't reached ACTIVITY_CREATED yet, so the view doesn't get created.

52 tl;dr - Works As Intended

53 Activity.onCreate() Fragment.onAttach() Fragment.onCreate() NestedFragment.onAttach() NestedFragment.onCreate()

54 Activity.onStart() Fragment.onCreateView() Fragment.onViewCreated() Fragment.onActivityCreated() performactivitycreated() NestedFragment.onCreateView() NestedFragment.onViewCreated() NestedFragment.onActivityCreated()

55 But...

56 Declaring Fragments in XML

57 Declaring Fragments in XML

58

59 LayoutInflater.Factory

60

61

62 Activity.onCreate() Fragment.onAttach() Fragment.onCreate() NestedFragment.onAttach() NestedFragment.onCreate()

63 Activity.onCreate() Fragment.onAttach() Fragment.onCreate() NestedFragment.onAttach() NestedFragment.onCreate()

64 In case your Fragment is inflated via XML, its View is created before setcontentview() returns.

65 Conclusions

66 Conclusions - The earliest Activity s callback in which you can rely on your Fragments views being created is onstart().

67 Conclusions - The earliest Activity s callback in which you can rely on your Fragments views being created is onstart(). The earliest Fragment s callback in which you can rely on your children Fragments views being created is onstart().

68 Conclusions - The earliest Activity s callback in which you can rely on your Fragments views being created is onstart(). The earliest Fragment s callback in which you can rely on your children Fragments views being created is onstart(). Oh, and in case you inflate Fragments via XML then it works completely different.

69 Move Presenter.attachView( ) to onstart()?

70 ViewPager

71 Problem: tracking screens to Google Analytics

72 setuservisiblehint()

73

74 setuservisiblehint() is unrelated to the regular lifecycle.

75 setuservisiblehint() can be called before or after your View is created.

76 setuservisiblehint() can be called before or after your Fragment is attached.

77

78 Problem: I have a heavy View, I don t want to destroy when I navigate.

79 Heavy Fragment A Fragment B

80 show() / hide() attach() / detach() add() / remove()

81 show() / hide()

82 Called when the fragment is visible to the user and actively running. This is generally tied to Activity.onResume of the containing Activity's lifecycle. ragment.html#onresume()

83 Called when the fragment is visible to the user and actively running. This is generally tied to Activity.onResume of the containing Activity's lifecycle. ragment.html#onresume()

84 Hidden Fragment is still in running state.

85 onhiddenchanged()

86 Beware: not called on configuration change, so you re left with ishidden().

87 Debugging

88

89 Lessons learned

90 Lessons learned - Don t use Fragments in case they don t work on their own - i.e. their are being used as Views.

91 Lessons learned - Don t use Fragments in case they don t work on their own - i.e. their are being used as Views. E.g. they don t have their own Presenters, but rather wait for the data being dispatched from Activity / parent Fragment

92 Lessons learned - Don t use Fragments in case they don t work on their own - i.e. their are being used as Views. E.g. they don t have their own Presenters, but rather wait for the data being dispatched from Activity / parent Fragment If you need to talk to your Fragment from your Activity / parent Fragment give it a second thought.

93 Lessons learned - Don t use Fragments in case they don t work on their own - i.e. their are being used as Views. E.g. they don t have their own Presenters, but rather wait for the data being dispatched from Activity / parent Fragment If you need to talk to your Fragment from your Activity / parent Fragment give it a second thought. If any of the above is true, just go for custom views - in such cases they re equally reusable.

94 General rule of thumb - Casting getactivity() to some callback interface + invoking methods is more-or-less safe.

95 General rule of thumb - Casting getactivity() to some callback interface + invoking methods is more-or-less safe. (at least if you know what you re doing)

96 General rule of thumb - Casting getactivity() to some callback interface + invoking methods is more-or-less safe. (at least if you know what you re doing) Same for gettargetfragment() / getparentfragment()

97 General rule of thumb - Casting getactivity() to some callback interface + invoking methods is more-or-less safe. (at least if you know what you re doing) Same for gettargetfragment() / getparentfragment()

98 General rule of thumb - - Casting getactivity() to some callback interface + invoking methods is more-or-less safe. (at least if you know what you re doing) Same for gettargetfragment() / getparentfragment() Delegating calls from Activity / parent Fragment to Fragments stored within theirs FragmentManagers is less safe, as there s less certainty what state they re in.

99 Ok, but do we really need Fragments at all?

100 Fragments, the good.

101 Fragments, the good. - Backstack + animations

102 Fragments, the good. - Backstack + animations Retaining on configuration changes (and I m not talking about retained Fragments here)

103 Fragments, the good. - Backstack + animations Retaining on configuration changes (and I m not talking about retained Fragments here) requestpermissions / startactivityforresult - if started from Fragments, FragmentActivity/FragmentManager delegate them directly to the Fragment that needs them - no need for dispatching

104 Fragments, the good. - Backstack + animations Retaining on configuration changes (and I m not talking about retained Fragments here) requestpermissions / startactivityforresult - if started from Fragments, FragmentActivity/FragmentManager delegate them directly to the Fragment that needs them - no need for dispatching (finally!)

105 startactivityforresult() in Fragments Fragment.startActivityForResult(intent, 0)

106 startactivityforresult() in Fragments Fragment.startActivityForResult(intent, 0) Dispatched to Activity as Activity.startActivityForResult(intent, 65536)

107 startactivityforresult() in Fragments Fragment.startActivityForResult(intent, 0) Dispatched to Activity as Activity.startActivityForResult(intent, 65536) Then Activity.onActivityResult() is called, with requestcode =

108 startactivityforresult() in Fragments Fragment.startActivityForResult(intent, 0) Dispatched to Activity as Activity.startActivityForResult(intent, 65536) Then Activity.onActivityResult() is called, with requestcode = And delegated futher by Activity to a Fragment with requestcode = 0.

109 startactivityforresult() in Fragments Fragment.startActivityForResult(intent, 0) Dispatched to Activity as Activity.startActivityForResult(intent, 65536) Then Activity.onActivityResult() is called, with requestcode = And delegated futher by Activity to a Fragment with requestcode = 0. Half of the bits are used to identify target Fragment, the other half is actual requestcode requested by that Fragment.

110 Fragments, the good. - - Backstack + animations Retaining on configuration changes (and I m not talking about retained Fragments here) requestpermissions / startactivityforresult - if started from Fragments, FragmentActivity/FragmentManager delegate them directly to the Fragment that needs them - no need for dispatching (finally!) They re in supportlib, no need to deal with platform-bugs that will be there forever (as once something gets shipped in SDK, it ll stay there forever).

111 Fragments, the good. - - Backstack + animations Retaining on configuration changes (and I m not talking about retained Fragments here) requestpermissions / startactivityforresult - if started from Fragments, FragmentActivity/FragmentManager delegate them directly to the Fragment that needs them - no need for dispatching (finally!) They re in supportlib, no need to deal with platform-bugs that will be there forever (as once something gets shipped in SDK, it ll stay there forever). In case you get in trouble - there are other people in the same situation.

112 Fragments, the good. - - Backstack + animations Retaining on configuration changes (and I m not talking about retained Fragments here) requestpermissions / startactivityforresult - if started from Fragments, FragmentActivity/FragmentManager delegate them directly to the Fragment that needs them - no need for dispatching (finally!) They re in supportlib, no need to deal with platform-bugs that will be there forever (as once something gets shipped in SDK, it ll stay there forever). In case you get in trouble - there are other people in the same situation. Communication to parent / target - e.g. settargetfragment() is retained for you on configuration changes.

113 Fragments, the good - View-less Fragments - e.g. for the purposes of managing your options menu or Toolbar

114 Your current balance, streamed in real-time by WebSocket Some data, e.g. charts $ 12,500

115

116 Fragments, the good - View-less Fragments - e.g. for the purposes of managing your options menu or Toolbar Nested Fragments are sometimes helpful - imagine Activity with Bottom Bar tabs, where each tab has its own backstack. (vide Instagram)

117 Fragments, the good - View-less Fragments - e.g. for the purposes of managing your options menu or Toolbar Nested Fragments are sometimes helpful - imagine Activity with Bottom Bar tabs, where each tab has its own backstack. (vide Instagram) Better callbacks than just a View - you may not need them, but once you need them you end-up delegating lifecycle methods to your custom views.

118 tl;dr not something you should write on your own.

119 So I started to look for alternatives.

120 Requirements

121 Requirements - Supports backstack (including nested backstacks), together with backstack animations

122 Requirements - Supports backstack (including nested backstacks), together with backstack animations Synchronous transactions

123 Requirements - Supports backstack (including nested backstacks), together with backstack animations Synchronous transactions Retaining states on configuration changes

124 Requirements - Supports backstack (including nested backstacks), together with backstack animations Synchronous transactions Retaining states on configuration changes Some settargetfragment() equalvement would be nice

125 Requirements - Supports backstack (including nested backstacks), together with backstack animations Synchronous transactions Retaining states on configuration changes Some settargetfragment() equalvement would be nice Fragment-like support for requestpermissions() and startactivityforresult()

126 Requirements - Supports backstack (including nested backstacks), together with backstack animations Synchronous transactions Retaining states on configuration changes Some settargetfragment() equalvement would be nice Fragment-like support for requestpermissions() and startactivityforresult Well maintained, reasonably big user-base.

127 Basically all I needed were Fragments, but synchronous.

128 Conductor

129

130 Controllers are your new Fragments

131

132 Controller.java oncreateview() onattach() ondetach() ondestroyview() ondestroy()

133 Controller.java sethasoptionsmenu() oncreateoptionsmenu() getactivity() startactivity() / startactivityforresult() / onactivityresult() requestpermissions() / onrequestpermissionsresult()

134

135 Whole transaction is executed & your Controller s view is created before this call returns.

136

137 Nested transactions are synchronous as well

138

139 D/ControllerRetaining:

140 D/ControllerRetaining: Then, after orientation change: D/ControllerRetaining:

141 Same behavior as for Fragments with setretaininstance(true)

142 Interestingly, Routers state is being kept in a retained Fragment.

143 Oh, irony!

144 You still need to save your controller s custom state in onsaveviewstate(). e.g. Don t Keep Activities

145

146

147

148

149

150

151

152 Target Controller can be in any Router - root or child routers.

153 Wait, what?

154 Conductor, by default, destroys Views once their Controllers get detached.

155 This is executed on a controller that has its View destroyed.

156

157 startactivityforresult

158 Each Controller has its own, unique instanceid (UUID generated during construction)

159

160

161 Goes recursively - looks up child Routers as well

162 ViewPager

163 You may ve noticed: no visibility callback in Controllers whatsoever.

164 Which means: N controllers are in attached state depending on Pager s offscreen page limit.

165 My first reaction: Damn, this is even worse than Fragments then!

166 Not really!

167

168

169 Disadvantages

170 Disadvantages - Controllers must have Views and need to be attached to some container.

171 Disadvantages - Controllers must have Views and need to be attached to some container. Using Fragments may still be necessary (or simply: easier) - e.g. SupportMapFragment.

172 Disadvantages - Controllers must have Views and need to be attached to some container. Using Fragments may still be necessary (or simply: easier) - e.g. SupportMapFragment. Doing Dialogs is bit hacky

173 Disadvantages - Controllers must have Views and need to be attached to some container. Using Fragments may still be necessary (or simply: easier) - e.g. SupportMapFragment. Doing Dialogs is bit hacky User base is still not even comparable to Fragments - it s quite hard to Google a solution if you step into something unexpected. (Though Conductor s author is super-responsive on Github)

174 Conclusions.

175 Conclusions - For majority of apps Fragments can t be exchanged for Custom Views

176 Conclusions - For majority of apps Fragments can t be exchanged for Custom Views I mean, they can, but then you start reinventing the wheel (e.g. backstack, delegation of onactivityresult/onpermissionsresult callbacks)

177 Conclusions - For majority of apps Fragments can t be exchanged for Custom Views I mean, they can, but then you start reinventing the wheel (e.g. backstack, delegation of onactivityresult/onpermissionsresult callbacks) Fragments are okay-ish if you use them carefully and understand how they work

178 Conclusions - For majority of apps Fragments can t be exchanged for Custom Views I mean, they can, but then you start reinventing the wheel (e.g. backstack, delegation of onactivityresult/onpermissionsresult callbacks) Fragments are okay-ish if you use them carefully and understand how they work Lots of issues in Fragments are caused by bugs that will eventually get fixed. Remember that no alternative is bug-free.

179 Conclusions - For majority of apps Fragments can t be exchanged for Custom Views I mean, they can, but then you start reinventing the wheel (e.g. backstack, delegation of onactivityresult/onpermissionsresult callbacks) Fragments are okay-ish if you use them carefully and understand how they work Lots of issues in Fragments are caused by bugs that will eventually get fixed. Remember that no alternative is bug-free. And the most important one...

180 Conclusions - For majority of apps Fragments can t be exchanged for Custom Views I mean, they can, but then you start reinventing the wheel (e.g. backstack, delegation of onactivityresult/onpermissionsresult callbacks) Fragments are okay-ish if you use them carefully and understand how they work Lots of issues in Fragments are caused by bugs that will eventually get fixed. Remember that no alternative is bug-free. And the most important one Don t follow blindly someone telling you that X sucks and you shouldn t use it. :-)

181 Thanks - Q & A

UI Fragment.

UI Fragment. UI Fragment 1 Contents Fragments Overviews Lifecycle of Fragments Creating Fragments Fragment Manager and Transactions Adding Fragment to Activity Fragment-to-Fragment Communication Fragment SubClasses

More information

Tablets have larger displays than phones do They can support multiple UI panes / user behaviors at the same time

Tablets have larger displays than phones do They can support multiple UI panes / user behaviors at the same time Tablets have larger displays than phones do They can support multiple UI panes / user behaviors at the same time The 1 activity 1 thing the user can do heuristic may not make sense for larger devices Application

More information

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi ACTIVITY, FRAGMENT, NAVIGATION Roberto Beraldi Introduction An application is composed of at least one Activity GUI It is a software component that stays behind a GUI (screen) Activity It runs inside the

More information

CS 4518 Mobile and Ubiquitous Computing Lecture 5: Rotating Device, Saving Data, Intents and Fragments Emmanuel Agu

CS 4518 Mobile and Ubiquitous Computing Lecture 5: Rotating Device, Saving Data, Intents and Fragments Emmanuel Agu CS 4518 Mobile and Ubiquitous Computing Lecture 5: Rotating Device, Saving Data, Intents and Fragments Emmanuel Agu Administrivia Moved back deadlines for projects 2, 3 and final project See updated schedule

More information

CS 528 Mobile and Ubiquitous Computing Lecture 3b: Android Activity Lifecycle and Intents Emmanuel Agu

CS 528 Mobile and Ubiquitous Computing Lecture 3b: Android Activity Lifecycle and Intents Emmanuel Agu CS 528 Mobile and Ubiquitous Computing Lecture 3b: Android Activity Lifecycle and Intents Emmanuel Agu Android Activity LifeCycle Starting Activities Android applications don't start with a call to main(string[])

More information

CHAPTER 4. Fragments ActionBar Menus

CHAPTER 4. Fragments ActionBar Menus CHAPTER 4 Fragments ActionBar Menus Explore how to build applications that use an ActionBar and Fragments Understand the Fragment lifecycle Learn to configure the ActionBar Implement Fragments with Responsive

More information

Repairing crashes in Android Apps. Shin Hwei Tan Zhen Dong Xiang Gao Abhik Roychoudhury National University of Singapore

Repairing crashes in Android Apps. Shin Hwei Tan Zhen Dong Xiang Gao Abhik Roychoudhury National University of Singapore Repairing crashes in Android Apps Shin Hwei Tan Zhen Dong Xiang Gao Abhik Roychoudhury National University of Singapore Android Repair System Criteria for Android repair system: Could be used by any smartphone

More information

Building User Interface for Android Mobile Applications II

Building User Interface for Android Mobile Applications II Building User Interface for Android Mobile Applications II Mobile App Development 1 MVC 2 MVC 1 MVC 2 MVC Android redraw View invalidate Controller tap, key pressed update Model MVC MVC in Android View

More information

CS 528 Mobile and Ubiquitous Computing Lecture 4a: Fragments, Camera Emmanuel Agu

CS 528 Mobile and Ubiquitous Computing Lecture 4a: Fragments, Camera Emmanuel Agu CS 528 Mobile and Ubiquitous Computing Lecture 4a: Fragments, Camera Emmanuel Agu Fragments Recall: Fragments Sub-components of an Activity (screen) An activity can contain multiple fragments, organized

More information

Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting

Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting Slide 1: Cover Welcome to lesson 3 of the db2 on Campus lecture series. Today we're going to talk about tools and scripting, and this is part 1 of 2

More information

Fragments and the Maps API

Fragments and the Maps API Fragments and the Maps API Alexander Nelson October 6, 2017 University of Arkansas - Department of Computer Science and Computer Engineering Fragments Fragments Fragment A behavior or a portion of a user

More information

Programming in Android. Nick Bopp

Programming in Android. Nick Bopp Programming in Android Nick Bopp nbopp@usc.edu Types of Classes Activity This is the main Android class that you will be using. These are actively displayed on the screen and allow for user interaction.

More information

Programming with Android: Android for Tablets. Dipartimento di Scienze dell Informazione Università di Bologna

Programming with Android: Android for Tablets. Dipartimento di Scienze dell Informazione Università di Bologna Programming with Android: Android for Tablets Luca Bedogni Marco Di Felice Dipartimento di Scienze dell Informazione Università di Bologna Outline Android for Tablets: A Case Study Android for Tablets:

More information

Static Methods. Why use methods?

Static Methods. Why use methods? Static Methods A method is just a collection of code. They are also called functions or procedures. It provides a way to break a larger program up into smaller, reusable chunks. This also has the benefit

More information

CE881: Mobile & Social Application Programming

CE881: Mobile & Social Application Programming CE881: Mobile & Social Application Programming, s, s and s Jialin Liu Senior Research Officer Univerisity of Essex 6 Feb 2017 Recall of lecture 3 and lab 3 :) Please download Kahoot or open a bowser and

More information

Activities and Fragments

Activities and Fragments Activities and Fragments 21 November 2017 Lecture 5 21 Nov 2017 SE 435: Development in the Android Environment 1 Topics for Today Activities UI Design and handlers Fragments Source: developer.android.com

More information

MITOCW watch?v=w_-sx4vr53m

MITOCW watch?v=w_-sx4vr53m MITOCW watch?v=w_-sx4vr53m The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high-quality educational resources for free. To

More information

CS 4518 Mobile and Ubiquitous Computing Lecture 4: Data-Driven Views, Android Components & Android Activity Lifecycle Emmanuel Agu

CS 4518 Mobile and Ubiquitous Computing Lecture 4: Data-Driven Views, Android Components & Android Activity Lifecycle Emmanuel Agu CS 4518 Mobile and Ubiquitous Computing Lecture 4: Data-Driven Views, Android Components & Android Activity Lifecycle Emmanuel Agu Announcements Group formation: Projects 2, 3 and final project will be

More information

Fragments were added to the Android API in Honeycomb, API 11. The primary classes related to fragments are: android.app.fragment

Fragments were added to the Android API in Honeycomb, API 11. The primary classes related to fragments are: android.app.fragment FRAGMENTS Fragments An activity is a container for views When you have a larger screen device than a phone like a tablet it can look too simple to use phone interface here. Fragments Mini-activities, each

More information

Zello Quick Start Guide for Kyocera TORQUE

Zello Quick Start Guide for Kyocera TORQUE Zello Quick Start Guide for Kyocera TORQUE Install Zello Tap Zello in your apps screen then tap UPDATE to start install. When you miss Zello icon in your TORQUE, please search for Zello in Google Play

More information

Chapter One: Getting Started With IBM SPSS for Windows

Chapter One: Getting Started With IBM SPSS for Windows Chapter One: Getting Started With IBM SPSS for Windows Using Windows The Windows start-up screen should look something like Figure 1-1. Several standard desktop icons will always appear on start up. Note

More information

Multiple devices. Use wrap_content and match_parent Use RelativeLayout/ConstraintLayout Use configuration qualifiers

Multiple devices. Use wrap_content and match_parent Use RelativeLayout/ConstraintLayout Use configuration qualifiers Multiple devices Multiple devices Use wrap_content and match_parent Use RelativeLayout/ConstraintLayout Use configuration qualifiers Create a new directory in your project's res/ and name it using the

More information

CS378 - Mobile Computing. Anatomy of an Android App and the App Lifecycle

CS378 - Mobile Computing. Anatomy of an Android App and the App Lifecycle CS378 - Mobile Computing Anatomy of an Android App and the App Lifecycle Application Components five primary components different purposes and different lifecycles Activity single screen with a user interface,

More information

CS371m - Mobile Computing. More UI Navigation, Fragments, and App / Action Bars

CS371m - Mobile Computing. More UI Navigation, Fragments, and App / Action Bars CS371m - Mobile Computing More UI Navigation, Fragments, and App / Action Bars EFFECTIVE ANDROID NAVIGATION 2 Clicker Question Have you heard of the terms Back and Up in the context of Android Navigation?

More information

Understanding Application

Understanding Application Introduction to Android Application Development, Android Essentials, Fifth Edition Chapter 4 Understanding Application Components Chapter 4 Overview Master important terminology Learn what the application

More information

Lifecycle-Aware Components Live Data ViewModel Room Library

Lifecycle-Aware Components Live Data ViewModel Room Library Lifecycle-Aware Components Live Data ViewModel Room Library Multiple entry points launched individually Components started in many different orders Android kills components on reconfiguration / low memory

More information

CS371m - Mobile Computing. More UI Action Bar, Navigation, and Fragments

CS371m - Mobile Computing. More UI Action Bar, Navigation, and Fragments CS371m - Mobile Computing More UI Action Bar, Navigation, and Fragments ACTION BAR 2 Options Menu and Action Bar prior to Android 3.0 / API level 11 Android devices required a dedicated menu button Pressing

More information

Math Dr. Miller - Constructing in Sketchpad (tm) - Due via by Friday, Mar. 18, 2016

Math Dr. Miller - Constructing in Sketchpad (tm) - Due via  by Friday, Mar. 18, 2016 Math 304 - Dr. Miller - Constructing in Sketchpad (tm) - Due via email by Friday, Mar. 18, 2016 As with our second GSP activity for this course, you will email the assignment at the end of this tutorial

More information

COLLEGE OF ENGINEERING, NASHIK-4

COLLEGE OF ENGINEERING, NASHIK-4 Pune Vidyarthi Griha s COLLEGE OF ENGINEERING, NASHIK-4 DEPARTMENT OF COMPUTER ENGINEERING 1) What is Android? Important Android Questions It is an open-sourced operating system that is used primarily

More information

Visualization Insider A Little Background Information

Visualization Insider A Little Background Information Visualization Insider A Little Background Information Visualization Insider 2 Creating Backgrounds for 3D Scenes Backgrounds are a critical part of just about every type of 3D scene. Although they are

More information

Android. The Toolbar

Android. The Toolbar Android The Toolbar Credits Lectures are heavily based of materials and examples from: Android Programming The Big Nerd Ranch Guides Bill Phillips and Brian Hardy April 7, 2013 ToDoList We re going to

More information

ORGANIZING YOUR ARTWORK WITH LAYERS

ORGANIZING YOUR ARTWORK WITH LAYERS 9 ORGANIZING YOUR ARTWORK WITH LAYERS Lesson overview In this lesson, you ll learn how to do the following: Work with the Layers panel. Create, rearrange, and lock layers and sublayers. Move objects between

More information

INTRODUCTION. 2

INTRODUCTION. 2 1 INTRODUCTION It is of no secret that Android is loved by millions of people around the world. Created and developed by Google, it would be most developers dream job. That being said, there are a lot

More information

15 Minute Traffic Formula. Contents HOW TO GET MORE TRAFFIC IN 15 MINUTES WITH SEO... 3

15 Minute Traffic Formula. Contents HOW TO GET MORE TRAFFIC IN 15 MINUTES WITH SEO... 3 Contents HOW TO GET MORE TRAFFIC IN 15 MINUTES WITH SEO... 3 HOW TO TURN YOUR OLD, RUSTY BLOG POSTS INTO A PASSIVE TRAFFIC SYSTEM... 4 HOW I USED THE GOOGLE KEYWORD PLANNER TO GET 11,908 NEW READERS TO

More information

Android Basics. Android UI Architecture. Android UI 1

Android Basics. Android UI Architecture. Android UI 1 Android Basics Android UI Architecture Android UI 1 Android Design Constraints Limited resources like memory, processing, battery à Android stops your app when not in use Primarily touch interaction à

More information

Oracle Cloud. Content and Experience Cloud ios Mobile Help E

Oracle Cloud. Content and Experience Cloud ios Mobile Help E Oracle Cloud Content and Experience Cloud ios Mobile Help E82090-01 February 2017 Oracle Cloud Content and Experience Cloud ios Mobile Help, E82090-01 Copyright 2017, 2017, Oracle and/or its affiliates.

More information

Mobile Computing Fragments

Mobile Computing Fragments Fragments APM@FEUP 1 Fragments (1) Activities are used to define a full screen interface and its functionality That s right for small screen devices (smartphones) In bigger devices we can have more interface

More information

Lab 1: Getting Started With Android Programming

Lab 1: Getting Started With Android Programming Islamic University of Gaza Faculty of Engineering Computer Engineering Dept. Eng. Jehad Aldahdooh Mobile Computing Android Lab Lab 1: Getting Started With Android Programming To create a new Android Project

More information

Interactive Tourist Map

Interactive Tourist Map Adobe Edge Animate Tutorial Mouse Events Interactive Tourist Map Lesson 2 Make click events In the last lesson you learned how to set up you stage and get your project ready for some interactivity. You

More information

Keyword research. Keywords. SEO for beginners training Module 2.1. What is a keyword? Head, mid tail and long tail keywords

Keyword research. Keywords. SEO for beginners training Module 2.1. What is a keyword? Head, mid tail and long tail keywords SEO for beginners training Module 2.1 Keyword research This lesson covers keyword research. We ll start by exploring what keywords are, and why they are important. Then, we ll dive into keyword research.

More information

Oracle Cloud. Content and Experience Cloud Android Mobile Help E

Oracle Cloud. Content and Experience Cloud Android Mobile Help E Oracle Cloud Content and Experience Cloud Android Mobile Help E82091-01 Februrary 2017 Oracle Cloud Content and Experience Cloud Android Mobile Help, E82091-01 Copyright 2017, Oracle and/or its affiliates.

More information

Eventually, you'll be returned to the AVD Manager. From there, you'll see your new device.

Eventually, you'll be returned to the AVD Manager. From there, you'll see your new device. Let's get started! Start Studio We might have a bit of work to do here Create new project Let's give it a useful name Note the traditional convention for company/package names We don't need C++ support

More information

Client Code - the code that uses the classes under discussion. Coupling - code in one module depends on code in another module

Client Code - the code that uses the classes under discussion. Coupling - code in one module depends on code in another module Basic Class Design Goal of OOP: Reduce complexity of software development by keeping details, and especially changes to details, from spreading throughout the entire program. Actually, the same goal as

More information

Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed. Preface Here are my online notes for my Algebra course that I teach here at Lamar University, although I have to admit that it s been years since I last taught this course. At this point in my career I

More information

Lesson 9 Transcript: Backup and Recovery

Lesson 9 Transcript: Backup and Recovery Lesson 9 Transcript: Backup and Recovery Slide 1: Cover Welcome to lesson 9 of the DB2 on Campus Lecture Series. We are going to talk in this presentation about database logging and backup and recovery.

More information

For Volunteers An Elvanto Guide

For Volunteers An Elvanto Guide For Volunteers An Elvanto Guide www.elvanto.com Volunteers are what keep churches running! This guide is for volunteers who use Elvanto. If you re in charge of volunteers, why not check out our Volunteer

More information

Lesson 4 Transcript: DB2 Architecture

Lesson 4 Transcript: DB2 Architecture Lesson 4 Transcript: DB2 Architecture Slide 1: Cover Welcome to Lesson 4 of the DB2 on campus series. Today we are going to talk about the DB2 architecture. My name is Raul Chong and I am the DB2 on Campus

More information

Arduino IDE Friday, 26 October 2018

Arduino IDE Friday, 26 October 2018 Arduino IDE Friday, 26 October 2018 12:38 PM Looking Under The Hood Of The Arduino IDE FIND THE ARDUINO IDE DOWNLOAD First, jump on the internet with your favorite browser, and navigate to www.arduino.cc.

More information

Syllabus- Java + Android. Java Fundamentals

Syllabus- Java + Android. Java Fundamentals Introducing the Java Technology Syllabus- Java + Android Java Fundamentals Key features of the technology and the advantages of using Java Using an Integrated Development Environment (IDE) Introducing

More information

EMBEDDED SYSTEMS PROGRAMMING UI and Android

EMBEDDED SYSTEMS PROGRAMMING UI and Android EMBEDDED SYSTEMS PROGRAMMING 2016-17 UI and Android STANDARD GESTURES (1/2) UI classes inheriting from View allow to set listeners that respond to basic gestures. Listeners are defined by suitable interfaces.

More information

Connecting your Plugin Control Panel to your BT Plugin Code

Connecting your Plugin Control Panel to your BT Plugin Code Connecting your Plugin Control Panel to your BT Plugin Code A Quick Guide on getting User Variables into your project. With BT v3 comes a slightly different method in connecting your user defined options

More information

Excel programmers develop two basic types of spreadsheets: spreadsheets

Excel programmers develop two basic types of spreadsheets: spreadsheets Bonus Chapter 1 Creating Excel Applications for Others In This Chapter Developing spreadsheets for yourself and for other people Knowing what makes a good spreadsheet application Using guidelines for developing

More information

Using PowerPoint - 1

Using PowerPoint - 1 Using PowerPoint - 1 Introduction to the course. Before we start, we need to know what power point is. I m sure most of you know about ppt, but for those of you who may be new to this: [1a-c] When you

More information

Google Maps Troubleshooting

Google Maps Troubleshooting Google Maps Troubleshooting Before you go through the troubleshooting guide below, make sure that you ve consulted the class FAQ, Google s Map Activity Tutorial, as well as these helpful resources from

More information

Minds-on: Android. Session 2

Minds-on: Android. Session 2 Minds-on: Android Session 2 Paulo Baltarejo Sousa Instituto Superior de Engenharia do Porto 2016 Outline Activities UI Events Intents Practice Assignment 1 / 33 2 / 33 Activities Activity An activity provides

More information

How to Improve Your Campaign Conversion Rates

How to Improve Your  Campaign Conversion Rates How to Improve Your Email Campaign Conversion Rates Chris Williams Author of 7 Figure Business Models How to Exponentially Increase Conversion Rates I'm going to teach you my system for optimizing an email

More information

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2002

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2002 CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2002 Lecture 6: Synchronization 6.0 Main points More concurrency examples Synchronization primitives 6.1 A Larger Concurrent

More information

Introduction To JAVA Programming Language

Introduction To JAVA Programming Language Introduction To JAVA Programming Language JAVA is a programming language which is used in Android App Development. It is class based and object oriented programming whose syntax is influenced by C++. The

More information

Foundations, Reasoning About Algorithms, and Design By Contract CMPSC 122

Foundations, Reasoning About Algorithms, and Design By Contract CMPSC 122 Foundations, Reasoning About Algorithms, and Design By Contract CMPSC 122 I. Logic 101 In logic, a statement or proposition is a sentence that can either be true or false. A predicate is a sentence in

More information

HCA Tech Note 120. Configuring the Control UI Home Page. Option 1: HCA constructs the home page

HCA Tech Note 120. Configuring the Control UI Home Page. Option 1: HCA constructs the home page Configuring the Control UI Home Page HCA contains two different user interfaces: One interface called the Development UI - where all design elements and tools are available and you can make changes, and

More information

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology Mobile Application Development Produced by David Drohan (ddrohan@wit.ie) Department of Computing & Mathematics Waterford Institute of Technology http://www.wit.ie Android Google Services" Part 1 Google+

More information

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch Purpose: We will take a look at programming this week using a language called Scratch. Scratch is a programming language that was developed

More information

The SD-WAN security guide

The SD-WAN security guide The SD-WAN security guide How a flexible, software-defined WAN can help protect your network, people and data SD-WAN security: Separating fact from fiction For many companies, the benefits of SD-WAN are

More information

Activities. https://developer.android.com/guide/components/activities.html Repo: https://github.com/karlmorris/basicactivities

Activities. https://developer.android.com/guide/components/activities.html Repo: https://github.com/karlmorris/basicactivities Activities https://developer.android.com/guide/components/activities.html Repo: https://github.com/karlmorris/basicactivities Overview What is an Activity Starting and stopping activities The Back Stack

More information

Keep Track of Your Passwords Easily

Keep Track of Your Passwords Easily Keep Track of Your Passwords Easily K 100 / 1 The Useful Free Program that Means You ll Never Forget a Password Again These days, everything you do seems to involve a username, a password or a reference

More information

Guide - The limitations in screen layout using the Item Placement Tool

Guide - The limitations in screen layout using the Item Placement Tool Guide - The limitations in screen layout using the Item Placement Tool 1/8 Guide - The limitations in screen layout using the Item Placement Tool I the B1 Usability Package we have the Item Placement Tool

More information

MITOCW watch?v=flgjisf3l78

MITOCW watch?v=flgjisf3l78 MITOCW watch?v=flgjisf3l78 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high-quality educational resources for free. To

More information

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi ACTIVITY, FRAGMENT, NAVIGATION Roberto Beraldi View System A system for organizing GUI Screen = tree of views. View = rectangular shape on the screen that knows how to draw itself wrt to the containing

More information

SLACK. What is it? How do I use It?

SLACK. What is it? How do I use It? SLACK What is it? How do I use It? What is Slack? It s a chat room for our whole chapter. If you ve heard of Internet Relay Chat (IRC) or WhatsApp before, it s fairly similar. The chapter s Slack is divided

More information

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology Mobile Application Development Produced by David Drohan (ddrohan@wit.ie) Department of Computing & Mathematics Waterford Institute of Technology http://www.wit.ie User Interface Design" & Development -

More information

Without further ado, let s go over and have a look at what I ve come up with.

Without further ado, let s go over and have a look at what I ve come up with. JIRA Integration Transcript VLL Hi, my name is Jonathan Wilson and I m the service management practitioner with NHS Digital based in the United Kingdom. NHS Digital is the provider of services to the National

More information

Data structures. Priority queues, binary heaps. Dr. Alex Gerdes DIT961 - VT 2018

Data structures. Priority queues, binary heaps. Dr. Alex Gerdes DIT961 - VT 2018 Data structures Priority queues, binary heaps Dr. Alex Gerdes DIT961 - VT 2018 Announcements Course representatives - Mohamad Qutbuddin Habib - Carl Agrell - Gunnar Stenlund Kunsulttid: jag är på kontor

More information

Your . A setup guide. Last updated March 7, Kingsford Avenue, Glasgow G44 3EU

Your  . A setup guide. Last updated March 7, Kingsford Avenue, Glasgow G44 3EU fuzzylime WE KNOW DESIGN WEB DESIGN AND CONTENT MANAGEMENT 19 Kingsford Avenue, Glasgow G44 3EU 0141 416 1040 hello@fuzzylime.co.uk www.fuzzylime.co.uk Your email A setup guide Last updated March 7, 2017

More information

P1_L3 Operating Systems Security Page 1

P1_L3 Operating Systems Security Page 1 P1_L3 Operating Systems Security Page 1 that is done by the operating system. systems. The operating system plays a really critical role in protecting resources in a computer system. Resources such as

More information

Mobile Computing Professor Pushpedra Singh Indraprasth Institute of Information Technology Delhi Andriod Development Lecture 09

Mobile Computing Professor Pushpedra Singh Indraprasth Institute of Information Technology Delhi Andriod Development Lecture 09 Mobile Computing Professor Pushpedra Singh Indraprasth Institute of Information Technology Delhi Andriod Development Lecture 09 Hello, today we will create another application called a math quiz. This

More information

GUI Design for Android Applications

GUI Design for Android Applications GUI Design for Android Applications SE3A04 Tutorial Jason Jaskolka Department of Computing and Software Faculty of Engineering McMaster University Hamilton, Ontario, Canada jaskolj@mcmaster.ca November

More information

Intro To Excel Spreadsheet for use in Introductory Sciences

Intro To Excel Spreadsheet for use in Introductory Sciences INTRO TO EXCEL SPREADSHEET (World Population) Objectives: Become familiar with the Excel spreadsheet environment. (Parts 1-5) Learn to create and save a worksheet. (Part 1) Perform simple calculations,

More information

LECTURE NOTES OF APPLICATION ACTIVITIES

LECTURE NOTES OF APPLICATION ACTIVITIES Department of Information Networks The University of Babylon LECTURE NOTES OF APPLICATION ACTIVITIES By College of Information Technology, University of Babylon, Iraq Samaher@inet.uobabylon.edu.iq The

More information

CS378 -Mobile Computing. Anatomy of and Android App and the App Lifecycle

CS378 -Mobile Computing. Anatomy of and Android App and the App Lifecycle CS378 -Mobile Computing Anatomy of and Android App and the App Lifecycle Hello Android Tutorial http://developer.android.com/resources/tutorials/hello-world.html Important Files src/helloandroid.java Activity

More information

Clickteam Fusion 2.5 Creating a Debug System - Guide

Clickteam Fusion 2.5 Creating a Debug System - Guide INTRODUCTION In this guide, we will look at how to create your own 'debug' system in Fusion 2.5. Sometimes when you're developing and testing a game, you want to see some of the real-time values of certain

More information

Introduction. Watch the video below to learn more about getting started with PowerPoint. Getting to know PowerPoint

Introduction. Watch the video below to learn more about getting started with PowerPoint. Getting to know PowerPoint PowerPoint 2016 Getting Started With PowerPoint Introduction PowerPoint is a presentation program that allows you to create dynamic slide presentations. These presentations can include animation, narration,

More information

Rsyslog: going up from 40K messages per second to 250K. Rainer Gerhards

Rsyslog: going up from 40K messages per second to 250K. Rainer Gerhards Rsyslog: going up from 40K messages per second to 250K Rainer Gerhards What's in it for you? Bad news: will not teach you to make your kernel component five times faster Perspective user-space application

More information

Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi.

Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi. Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture 18 Tries Today we are going to be talking about another data

More information

Part 1: Understanding Windows XP Basics

Part 1: Understanding Windows XP Basics 542362 Ch01.qxd 9/18/03 9:54 PM Page 1 Part 1: Understanding Windows XP Basics 1: Starting Up and Logging In 2: Logging Off and Shutting Down 3: Activating Windows 4: Enabling Fast Switching between Users

More information

Ackworth Howard Church of England (VC) Junior and Infant School. Child-friendly GDPR privacy notice

Ackworth Howard Church of England (VC) Junior and Infant School. Child-friendly GDPR privacy notice Child-friendly GDPR privacy notice Child-friendly GDPR privacy notice What s this about? A new law has been made that keeps your information safe things like your address, date of birth and phone number.

More information

learn programming the right way

learn programming the right way Coding 101 learn programming the right way 1 INTRODUCTION Before you begin learning how to code, it s first useful to discuss why you would want to learn web development. There are lots of good reasons

More information

This is a separate window in the software so if you wish to return to the main screen, just close this window by clicking X in the upper right corner.

This is a separate window in the software so if you wish to return to the main screen, just close this window by clicking X in the upper right corner. Following is a basic overview of the Wishon Golf Shaft Bend Profile software program. The program contains an ever increasing data base of the full length stiffness measurements with weight and balance

More information

We re working full time this summer alongside 3 UCOSP (project course) students (2 from Waterloo: Mark Rada & Su Zhang, 1 from UofT: Angelo Maralit)

We re working full time this summer alongside 3 UCOSP (project course) students (2 from Waterloo: Mark Rada & Su Zhang, 1 from UofT: Angelo Maralit) We re working full time this summer alongside 3 UCOSP (project course) students (2 from Waterloo: Mark Rada & Su Zhang, 1 from UofT: Angelo Maralit) Our supervisors: Karen: heads project, which has been

More information

Understand applications and their components. activity service broadcast receiver content provider intent AndroidManifest.xml

Understand applications and their components. activity service broadcast receiver content provider intent AndroidManifest.xml Understand applications and their components activity service broadcast receiver content provider intent AndroidManifest.xml Android Application Written in Java (it s possible to write native code) Good

More information

Replication. Feb 10, 2016 CPSC 416

Replication. Feb 10, 2016 CPSC 416 Replication Feb 10, 2016 CPSC 416 How d we get here? Failures & single systems; fault tolerance techniques added redundancy (ECC memory, RAID, etc.) Conceptually, ECC & RAID both put a master in front

More information

KTH Royal Institute of Technology SEMINAR 2-29 March Simone Stefani -

KTH Royal Institute of Technology SEMINAR 2-29 March Simone Stefani - KTH Royal Institute of Technology SEMINAR 2-29 March 2017 Simone Stefani - sstefani@kth.se WHAT IS THIS SEMINAR ABOUT Branching Merging and rebasing Git team workflows Pull requests and forks WHAT IS THIS

More information

IPv6: Are we really ready to turn off IPv4? Geoff Huston APNIC

IPv6: Are we really ready to turn off IPv4? Geoff Huston APNIC IPv6: Are we really ready to turn off IPv4? Geoff Huston APNIC The IPv6 Timeline 1990 2000 2010 2020 The IPv6 Timeline Yes, we ve been working on this for close to 30 years! 1990 2000 2010 2020 In-situ

More information

IMPORTANT: Review the Quick Start Guide on page 3 of this document. Steps 1 15 are critical to ensure the security of this application.

IMPORTANT: Review the Quick Start Guide on page 3 of this document. Steps 1 15 are critical to ensure the security of this application. Reflector 2 Reflector 2 is a program that runs on the teacher laptop. Reflector 2 allows the teacher laptop to act as a receiver for wireless devices on the same network to connect and mirror to the teacher

More information

I CALCULATIONS WITHIN AN ATTRIBUTE TABLE

I CALCULATIONS WITHIN AN ATTRIBUTE TABLE Geology & Geophysics REU GPS/GIS 1-day workshop handout #4: Working with data in ArcGIS You will create a raster DEM by interpolating contour data, create a shaded relief image, and pull data out of the

More information

This chapter is intended to take you through the basic steps of using the Visual Basic

This chapter is intended to take you through the basic steps of using the Visual Basic CHAPTER 1 The Basics This chapter is intended to take you through the basic steps of using the Visual Basic Editor window and writing a simple piece of VBA code. It will show you how to use the Visual

More information

Taskbar: Working with Several Windows at Once

Taskbar: Working with Several Windows at Once Taskbar: Working with Several Windows at Once Your Best Friend at the Bottom of the Screen How to Make the Most of Your Taskbar The taskbar is the wide bar that stretches across the bottom of your screen,

More information

Flash offers a way to simplify your work, using symbols. A symbol can be

Flash offers a way to simplify your work, using symbols. A symbol can be Chapter 7 Heavy Symbolism In This Chapter Exploring types of symbols Making symbols Creating instances Flash offers a way to simplify your work, using symbols. A symbol can be any object or combination

More information

More About WHILE Loops

More About WHILE Loops More About WHILE Loops http://people.sc.fsu.edu/ jburkardt/isc/week04 lecture 07.pdf... ISC3313: Introduction to Scientific Computing with C++ Summer Semester 2011... John Burkardt Department of Scientific

More information

UXD. using the elements: structure

UXD. using the elements: structure using the elements: structure defining structure you are here structure essentially defines how users get to a given screen and where they can go when they re done. structure also defines categories of

More information

CheckBook Pro 2 Help

CheckBook Pro 2 Help Get started with CheckBook Pro 9 Introduction 9 Create your Accounts document 10 Name your first Account 11 Your Starting Balance 12 Currency 13 We're not done yet! 14 AutoCompletion 15 Descriptions 16

More information