SlideShare a Scribd company logo
Modern Android Development
Computas
24.09.2015
Khiem-Kim Ho Xuan
Agenda
• Code behind
• Material Design
• Pattern recommended to use
Code behind
• Libraries:
• ButterKnife
• Square Otto Event Bus
• Google Play Services
• Support libraries
• Material design
• Retrofit
• Dagger2
• Picasso
24.09.20153
ButterKnife v7.0.1
• Annotate fields with @Bind
• ButterKnife will find the binded ID to the component, layout or resource ids.
• Why?
• Slow reflection. ButterKnife makes sure that the code is generated to perform the view
lookups. Bind delegates to the generated code.
• Resource Binding
• Bind resources. You need to specify the Bind. For example @BindString,
@BindDrawable, @BindColor, @BindDimen
• Non-Activity Binding
• Use @Bind to connect the component or Array. But need to specify @Bind({,….})
• Listener
• Bind listeners for example annotate @OnClick({….}) or @OnItemSelected({…})
• Reset Bind
• Need to clean the bindings when destroying an Activity
or a Fragment using @UnBind.
24.09.20154
Square Otto Event Bus v1.3.8
• Decouple parts of the application for communication.
• Acts as a pub-sub.
• Publish
• Tell Subscribers that an action has occured
• Subscribe
• Receive notification that an event has occured
• Annotate method with @Subscribe
• Register to a bus
• Need to call bus.register(this). In order to receive events
24.09.20155
bus.post(new AnswerAvailableEvent(42));
@Subscribe public void answerAvailable(AnswerAvailableEvent event) { //
TODO: React to the event somehow! }
Retrofit v2.0
• Turns HTTP API into a Java interface
• Uses Annotations to describe HTTP request:
• URL parameter replacement and query parameter support
• Object convertsion to request body (JSON, protocol buffer)
• Multipart request body and file upload
• Request Method
• Request Body
• Multipart
• Header
24.09.20156
@GET("/group/{id}/users") List<User> groupList(@Path("id") int groupId);
@POST("/users/new") Call<User> createUser(@Body User user);
@Multipart @PUT("/user/photo") Call<User> updateUser(@Part("photo")
RequestBody photo, @Part("description") RequestBody description);
@Headers({ "Accept: application/vnd.github.v3.full+json", "User-Agent:
Retrofit-Sample-App" }) @GET("/users/{username}") Call<User>
getUser(@Path("username") String username);
Dagger2
24.09.20157
• Dependency Injection making application loosely coupled.
• Annotations:
• @Module: classes whose methods provide dependencies
• @Provides: methods within module classes
• @Inject: request a dependency (a constructor, field or a method)
• @Component: bridge interface between modules and injection
@Module
public class VehicleModule {
@Provides @Singleton
Motor provideMotor(){
return new Motor();
}
@Provides @Singleton
Vehicle provideVehicle(){
return new Vehicle(new Motor());
}
}
@Inject
public Vehicle(Motor motor){
this.motor = motor;
}
@Singleton
@Component(modules = {VehicleModule.class})
public interface VehicleComponent {
Vehicle provideVehicle();
} // connect @modules with @inject
Dagger2
24.09.20158
• When everything is ready
• Obtain instance of the interface and invoke its method.
• Do it inside onCreate method!
• Why Dagger2?
• No reflection: graph validation, configuration and precondition done at compile time.
• Performance gain
public class MainActivity extends ActionBarActivity {
Vehicle mVehicle;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
VehicleComponent component = Dagger_VehicleComponent.builder().vehicleModule(new VehicleModule()).build();
mVehicle = component.provideVehicle();
Toast.makeText(this, String.valueOf(vehicle.getSpeed()), Toast.LENGTH_SHORT).show();
}
}
Picasso v2.5.2
24.09.20159
• Load image into a view based on url or from memory
• Picasso handles:
• ImageView recycling and download cancelation in an adapter
• Complex image transformations with minimal memory usage
• Automatic memory and disk caching.
• Has placeholders in case of loading or failed loading image.
Picasso.with(context) .load(url)
.placeholder(R.drawable.user_placeholder)
.error(R.drawable.user_placeholder_error) .into(imageView);
Material Design
• Make all apps flat as paper,
• responsive animations!
• Right color and shadow depths
• Get inspired!
• http://www.materialup.com/
Material Design
• Use Androids Design library:
• com.android.support.design
• Snackbar!
• Like Toast, but shows a message at the bottom of
the screen
Snackbar.make(mDrawerLayout, "Your message", Snackbar.LENGTH_SHORT)
.setAction(getString(R.string.text_undo), this)
.show();
Shared Element Transition
24.09.201512
• Animate different UI states in an application.
• Built on
• Scene: Defines UI states in an application
• Transition: Defines the animated change between two scenes
• Need to define transition in style.xml and also
<transitionSet
xmlns:android="http://schemas.android.com/apk/res/android">
<changeBounds>
<targets>
<target android:targetId="@id/ivPosterImage" />
<target android:targetId="@id/detailed_image" />
</targets>
</changeBounds>
<changeImageTransform>
<targets>
<target android:targetId="@id/ivPosterImage" />
<target android:targetId="@id/detailed_image" />
</targets>
</changeImageTransform>
</transitionSet>
Shared Element Transition
24.09.201513
<style name="AppTheme" parent="AppTheme.Base">
<item name="android:windowContentTransitions">true</item>
<item name="android:windowAllowEnterTransitionOverlap">true</item>
<item name="android:windowAllowReturnTransitionOverlap">true</item>
<item name="android:windowIsTranslucent">true</item>
<!-- specify enter and exit transitions -->
<item name="android:windowEnterTransition">@transition/fade</item>
<item name="android:windowExitTransition">@transition/fade</item>
<!-- specify shared element transitions -->
<item name="android:windowSharedElementEnterTransition">
@transition/change_image_transform
</item><transitionSet xmlns:android="http://schemas.android.com/apk/res/android">
<changeBounds>
<targets>
<target android:targetId="@id/ivPosterImage" />
<target android:targetId="@id/detailed_image" />
</targets>
</changeBounds>
<changeImageTransform>
<targets>
<target android:targetId="@id/ivPosterImage" />
<target android:targetId="@id/detailed_image" />
</targets>
</changeImageTransform>
</transitionSet>
<item name="android:windowSharedElementExitTransition">
@transition/change_image_transform
</item>
</style>
Floating Action Button
24.09.201514
• fabSize: set the size of the button
• Normal: 56dp
• Mini: 40dp
• backgroundTint: set the background color of this instance
• rippleColor set color of the ripple effect when pressed
• src: set the icon displayed within the FAB
<android.support.design.widget.FloatingActionButton
android:id=”@+id/fab_normal”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content”
android:src=”@drawable/ic_plus”
app:fabSize=”normal” />
EditText Floating Labels
• Display floating labels above EditText fields.
• Gives focus or hint of float.
• Useful to use while data is being input
• You can also add Error message
24.09.201515
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/edit_text_email"
android:layout_width="match_parent"/>
</android.support.design.widget.TextInputLayout>
setErrorEnabled(true);
setError(getString(R.string.text_error_message));
Navigation View
• Placed within a DrawerLayout
24.09.201516
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<FrameLayout
android:id="@+id/main_content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<android.support.design.widget.NavigationView
android:id="@+id/navigation_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:headerLayout="@layout/navigation_header"
app:menu="@menu/drawer" />
</android.support.v4.widget.DrawerLayout>
TabLayout
• tabMode: set the layout to fixed or scrollable
• tabGravity: set gravity of the tab, either filled (distributed to all available space
between individual tabs) or centre (position tabs in the center of the TabLayout)
• setText() and setIcon()
• Listeners:
• OnTabSelectedListener
• TabLayoutOnPageChangeListener
• ViewPagerOnTabSelectedListener
24.09.201517
<android.support.design.widget.TabLayout
android:id="@+id/sliding_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="fixed"
app:tabGravity="fill" />
ViewPager pager = (ViewPager)
rootView.findViewById(R.id.viewPager);
pager.setAdapter(new MyPagerAdapter(getActivity().getSupportFragmentManager()));
TabLayout tabLayout = (TabLayout)
rootView.findViewById(R.id.sliding_tabs);tabLayout.addTab(tabLayout.newTab().setText("Tab One"));
tabLayout.addTab(tabLayout.newTab().setText("Tab Two"));
tabLayout.addTab(tabLayout.newTab().setText("Tab Three"));
tabLayout.setupWithViewPager(pager);
Coordinator Layout
• Super FrameLayout
• Adds transition view basedon motion of other components
• Lets us adapt layouts based on scroll events.
• Set the property layout_scrollFlags
• enterAlways – view will become visible when a downward scroll event occurs
• enterAlwaysCollapsed – if view has minHeight, it will only
enter at a that height and expand fully once the scrolling view
reached the top.
24.09.201518
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior=
"@string/appbar_scrolling_view_behavior" />
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.Toolbar
app:layout_scrollFlags="scroll|enterAlways" />
<android.support.design.widget.TabLayout
/> </android.support.design.widget.AppBarLayout>
</android.support.design.widget.CoordinatorLayout>
Support Toolbar
• Use
• com.android.support.appcompat-v7:<versionnumber>
• Remember to style the toolbar!
24.09.201519
<android.support.v7.widget.Toolbar
android:id=”@+id/my_awesome_toolbar”
android:layout_height=”wrap_content”
android:layout_width=”match_parent”
android:minHeight=”?attr/actionBarSize”
android:background=”?attr/colorPrimary” />
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.blah);
Toolbar toolbar = (Toolbar)
findViewById(R.id.my_awesome_toolbar);
setSupportActionBar(toolbar);
}
<style name="Theme.MyTheme"
parent="Theme.AppCompat.Light">
<!-- Set AppCompat’s actionBarStyle -->
<item name="actionBarStyle">@style/MyActionBarStyle</item>
<!-- Set AppCompat’s color theming attrs -->
<item name="colorPrimary">@color/my_awesome_red</item>
<item
name="colorPrimaryDark">@color/my_awesome_darker_red</item>
<!-- The rest of your attributes -->
</style>
Pattern recommended to use
• Model-View-Presenter (MVP)
• User interacts with the View.
• There is one-to-one relationship between View and Presenter means one View is mapped to
only one Presenter.
• View has a reference to Presenter but View has not reference to Model.
• Provides two way communication between View and Presenter.
24.09.201520
Firmu – The Cinema Locator App
• Google Play Store
• (Later on Windows Store and IOS).
• Highly inspired by Material Design and modern
mobile development.
• Feedback on the app please 
24.09.201521
Pitch (Beta version)
• Google Play Store
• (Later on Windows Store and IOS).
• Highly inspired by Material Design and modern
mobile development.
• Feedback on the app please 
24.09.201522
23 © Computas AS 24.09.2015
Questions?
Computas AS Tel +47 67 83 10 00
Lysaker Torg 45, pb 482 Fax +47 67 83 10 01
1327 Lysaker Org.nr: NO 986 352 325 MVA
Norway www.computas.com
Khiem-Kim Ho Xuan
Ad

More Related Content

What's hot (20)

Angular2 and TypeScript
Angular2 and TypeScriptAngular2 and TypeScript
Angular2 and TypeScript
David Giard
 
Building Universal Web Apps with React ForwardJS 2017
Building Universal Web Apps with React ForwardJS 2017Building Universal Web Apps with React ForwardJS 2017
Building Universal Web Apps with React ForwardJS 2017
Elyse Kolker Gordon
 
Angular Workshop_Sarajevo2
Angular Workshop_Sarajevo2Angular Workshop_Sarajevo2
Angular Workshop_Sarajevo2
Christoffer Noring
 
Creating lightweight JS Apps w/ Web Components and lit-html
Creating lightweight JS Apps w/ Web Components and lit-htmlCreating lightweight JS Apps w/ Web Components and lit-html
Creating lightweight JS Apps w/ Web Components and lit-html
Ilia Idakiev
 
Angular js
Angular jsAngular js
Angular js
Behind D Walls
 
Angular 9
Angular 9 Angular 9
Angular 9
Raja Vishnu
 
GWT Training - Session 1/3
GWT Training - Session 1/3GWT Training - Session 1/3
GWT Training - Session 1/3
Faiz Bashir
 
Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
Gaurav Agrawal
 
Angular Best Practices - Perfomatix
Angular Best Practices - PerfomatixAngular Best Practices - Perfomatix
Angular Best Practices - Perfomatix
Perfomatix Solutions
 
Angular js
Angular jsAngular js
Angular js
Knoldus Inc.
 
GWT Training - Session 2/3
GWT Training - Session 2/3GWT Training - Session 2/3
GWT Training - Session 2/3
Faiz Bashir
 
Working with AngularJS
Working with AngularJSWorking with AngularJS
Working with AngularJS
André Vala
 
Vaadin Components @ Angular U
Vaadin Components @ Angular UVaadin Components @ Angular U
Vaadin Components @ Angular U
Joonas Lehtinen
 
Understanding router state in angular 7 passing data through angular router s...
Understanding router state in angular 7 passing data through angular router s...Understanding router state in angular 7 passing data through angular router s...
Understanding router state in angular 7 passing data through angular router s...
Katy Slemon
 
Angular introduction students
Angular introduction studentsAngular introduction students
Angular introduction students
Christian John Felix
 
Start Developing Apps for Magnolia CMS
Start Developing Apps for Magnolia CMSStart Developing Apps for Magnolia CMS
Start Developing Apps for Magnolia CMS
Magnolia
 
Angular2 + rxjs
Angular2 + rxjsAngular2 + rxjs
Angular2 + rxjs
Christoffer Noring
 
Building maintainable app
Building maintainable appBuilding maintainable app
Building maintainable app
Kristijan Jurković
 
Angular js 1.3 presentation for fed nov 2014
Angular js 1.3 presentation for fed   nov 2014Angular js 1.3 presentation for fed   nov 2014
Angular js 1.3 presentation for fed nov 2014
Sarah Hudson
 
Angular tutorial
Angular tutorialAngular tutorial
Angular tutorial
Rohit Gupta
 
Angular2 and TypeScript
Angular2 and TypeScriptAngular2 and TypeScript
Angular2 and TypeScript
David Giard
 
Building Universal Web Apps with React ForwardJS 2017
Building Universal Web Apps with React ForwardJS 2017Building Universal Web Apps with React ForwardJS 2017
Building Universal Web Apps with React ForwardJS 2017
Elyse Kolker Gordon
 
Creating lightweight JS Apps w/ Web Components and lit-html
Creating lightweight JS Apps w/ Web Components and lit-htmlCreating lightweight JS Apps w/ Web Components and lit-html
Creating lightweight JS Apps w/ Web Components and lit-html
Ilia Idakiev
 
GWT Training - Session 1/3
GWT Training - Session 1/3GWT Training - Session 1/3
GWT Training - Session 1/3
Faiz Bashir
 
Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
Gaurav Agrawal
 
Angular Best Practices - Perfomatix
Angular Best Practices - PerfomatixAngular Best Practices - Perfomatix
Angular Best Practices - Perfomatix
Perfomatix Solutions
 
GWT Training - Session 2/3
GWT Training - Session 2/3GWT Training - Session 2/3
GWT Training - Session 2/3
Faiz Bashir
 
Working with AngularJS
Working with AngularJSWorking with AngularJS
Working with AngularJS
André Vala
 
Vaadin Components @ Angular U
Vaadin Components @ Angular UVaadin Components @ Angular U
Vaadin Components @ Angular U
Joonas Lehtinen
 
Understanding router state in angular 7 passing data through angular router s...
Understanding router state in angular 7 passing data through angular router s...Understanding router state in angular 7 passing data through angular router s...
Understanding router state in angular 7 passing data through angular router s...
Katy Slemon
 
Start Developing Apps for Magnolia CMS
Start Developing Apps for Magnolia CMSStart Developing Apps for Magnolia CMS
Start Developing Apps for Magnolia CMS
Magnolia
 
Angular js 1.3 presentation for fed nov 2014
Angular js 1.3 presentation for fed   nov 2014Angular js 1.3 presentation for fed   nov 2014
Angular js 1.3 presentation for fed nov 2014
Sarah Hudson
 
Angular tutorial
Angular tutorialAngular tutorial
Angular tutorial
Rohit Gupta
 

Viewers also liked (12)

Poteri di autentica dell'avvocato - Cittadella 18.03.16
Poteri di autentica dell'avvocato - Cittadella 18.03.16Poteri di autentica dell'avvocato - Cittadella 18.03.16
Poteri di autentica dell'avvocato - Cittadella 18.03.16
Edoardo Ferraro
 
Trabajos de mates
Trabajos de matesTrabajos de mates
Trabajos de mates
idasou
 
Rodriguez ruiz
Rodriguez ruizRodriguez ruiz
Rodriguez ruiz
Leonardo Rodriguez Ruiz
 
Trabajo 3
Trabajo 3Trabajo 3
Trabajo 3
Bachillerato Loscatorce
 
Energia solar 01
Energia solar 01Energia solar 01
Energia solar 01
Lucelio Santos
 
4.Evaluación de Proyectos y Aplicaciones Computarizadas
4.Evaluación de Proyectos y Aplicaciones Computarizadas4.Evaluación de Proyectos y Aplicaciones Computarizadas
4.Evaluación de Proyectos y Aplicaciones Computarizadas
Selene Orozco
 
Mtaylor Get Acquainted Presentation 1 Safe One!
Mtaylor Get Acquainted Presentation 1 Safe One!Mtaylor Get Acquainted Presentation 1 Safe One!
Mtaylor Get Acquainted Presentation 1 Safe One!
morgan_taylor
 
Đèn LED chiếu sáng khu vực mua bán chung trong siêu thị, trung tâm thương mại
Đèn LED chiếu sáng khu vực mua bán chung trong siêu thị, trung tâm thương mạiĐèn LED chiếu sáng khu vực mua bán chung trong siêu thị, trung tâm thương mại
Đèn LED chiếu sáng khu vực mua bán chung trong siêu thị, trung tâm thương mại
RANGDONG LIGHT SOURCE & VACUUM FLASK JOINT STOCK COMPANY
 
Defolu Spot Buzdolabı Alanlar İstanbul
Defolu Spot Buzdolabı Alanlar İstanbulDefolu Spot Buzdolabı Alanlar İstanbul
Defolu Spot Buzdolabı Alanlar İstanbul
Eskici eşya alanlar
 
Trabajo 1
Trabajo 1Trabajo 1
Trabajo 1
Bachillerato Loscatorce
 
Phobias A Presentation by Mr Allah Dad Khan Former DG Agri Extension /Visiti...
Phobias  A Presentation by Mr Allah Dad Khan Former DG Agri Extension /Visiti...Phobias  A Presentation by Mr Allah Dad Khan Former DG Agri Extension /Visiti...
Phobias A Presentation by Mr Allah Dad Khan Former DG Agri Extension /Visiti...
Mr.Allah Dad Khan
 
Sentenza su ammissione gratuito patrocinio per procedimenti mediazione
Sentenza su ammissione gratuito patrocinio per procedimenti mediazioneSentenza su ammissione gratuito patrocinio per procedimenti mediazione
Sentenza su ammissione gratuito patrocinio per procedimenti mediazione
GRATUITO PATROCINIO e ART 24. - Associazione per la Tutela del Diritto di Difesa
 
Ad

Similar to Modern android development (20)

Introduction to Backbone.js for Rails developers
Introduction to Backbone.js for Rails developersIntroduction to Backbone.js for Rails developers
Introduction to Backbone.js for Rails developers
AoteaStudios
 
Building Modern Websites with ASP.NET by Rachel Appel
Building Modern Websites with ASP.NET by Rachel AppelBuilding Modern Websites with ASP.NET by Rachel Appel
Building Modern Websites with ASP.NET by Rachel Appel
.NET Conf UY
 
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023
Nicolas HAAN
 
Unit 2 - Data Binding.pptx
Unit 2 - Data Binding.pptxUnit 2 - Data Binding.pptx
Unit 2 - Data Binding.pptx
Malla Reddy University
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
Matt Raible
 
Asp.Net MVC 5 in Arabic
Asp.Net MVC 5 in ArabicAsp.Net MVC 5 in Arabic
Asp.Net MVC 5 in Arabic
Haitham Shaddad
 
Spring first in Magnolia CMS - Spring I/O 2015
Spring first in Magnolia CMS - Spring I/O 2015Spring first in Magnolia CMS - Spring I/O 2015
Spring first in Magnolia CMS - Spring I/O 2015
Tobias Mattsson
 
Adding custom ui controls to your application (1)
Adding custom ui controls to your application (1)Adding custom ui controls to your application (1)
Adding custom ui controls to your application (1)
Oro Inc.
 
Using and contributing to the next Guice
Using and contributing to the next GuiceUsing and contributing to the next Guice
Using and contributing to the next Guice
Adrian Cole
 
Angular JS2 Training Session #2
Angular JS2 Training Session #2Angular JS2 Training Session #2
Angular JS2 Training Session #2
Paras Mendiratta
 
Developing maintainable Cordova applications
Developing maintainable Cordova applicationsDeveloping maintainable Cordova applications
Developing maintainable Cordova applications
Ivano Malavolta
 
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
 
Android architecture
Android architecture Android architecture
Android architecture
Trong-An Bui
 
Angular - Chapter 4 - Data and Event Handling
 Angular - Chapter 4 - Data and Event Handling Angular - Chapter 4 - Data and Event Handling
Angular - Chapter 4 - Data and Event Handling
WebStackAcademy
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
Mike Wilcox
 
Rp 6 session 2 naresh bhatia
Rp 6  session 2 naresh bhatiaRp 6  session 2 naresh bhatia
Rp 6 session 2 naresh bhatia
sapientindia
 
MVVM & Data Binding Library
MVVM & Data Binding Library MVVM & Data Binding Library
MVVM & Data Binding Library
10Clouds
 
MVP Community Camp 2014 - How to use enhanced features of Windows 8.1 Store ...
MVP Community Camp 2014 - How to useenhanced features of Windows 8.1 Store ...MVP Community Camp 2014 - How to useenhanced features of Windows 8.1 Store ...
MVP Community Camp 2014 - How to use enhanced features of Windows 8.1 Store ...
Akira Hatsune
 
8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated
8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated
8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated
dioduong345
 
Introduction to Polymer and Firebase - Simon Gauvin
Introduction to Polymer and Firebase - Simon GauvinIntroduction to Polymer and Firebase - Simon Gauvin
Introduction to Polymer and Firebase - Simon Gauvin
Simon Gauvin
 
Introduction to Backbone.js for Rails developers
Introduction to Backbone.js for Rails developersIntroduction to Backbone.js for Rails developers
Introduction to Backbone.js for Rails developers
AoteaStudios
 
Building Modern Websites with ASP.NET by Rachel Appel
Building Modern Websites with ASP.NET by Rachel AppelBuilding Modern Websites with ASP.NET by Rachel Appel
Building Modern Websites with ASP.NET by Rachel Appel
.NET Conf UY
 
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023
Nicolas HAAN
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
Matt Raible
 
Spring first in Magnolia CMS - Spring I/O 2015
Spring first in Magnolia CMS - Spring I/O 2015Spring first in Magnolia CMS - Spring I/O 2015
Spring first in Magnolia CMS - Spring I/O 2015
Tobias Mattsson
 
Adding custom ui controls to your application (1)
Adding custom ui controls to your application (1)Adding custom ui controls to your application (1)
Adding custom ui controls to your application (1)
Oro Inc.
 
Using and contributing to the next Guice
Using and contributing to the next GuiceUsing and contributing to the next Guice
Using and contributing to the next Guice
Adrian Cole
 
Angular JS2 Training Session #2
Angular JS2 Training Session #2Angular JS2 Training Session #2
Angular JS2 Training Session #2
Paras Mendiratta
 
Developing maintainable Cordova applications
Developing maintainable Cordova applicationsDeveloping maintainable Cordova applications
Developing maintainable Cordova applications
Ivano Malavolta
 
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
 
Android architecture
Android architecture Android architecture
Android architecture
Trong-An Bui
 
Angular - Chapter 4 - Data and Event Handling
 Angular - Chapter 4 - Data and Event Handling Angular - Chapter 4 - Data and Event Handling
Angular - Chapter 4 - Data and Event Handling
WebStackAcademy
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
Mike Wilcox
 
Rp 6 session 2 naresh bhatia
Rp 6  session 2 naresh bhatiaRp 6  session 2 naresh bhatia
Rp 6 session 2 naresh bhatia
sapientindia
 
MVVM & Data Binding Library
MVVM & Data Binding Library MVVM & Data Binding Library
MVVM & Data Binding Library
10Clouds
 
MVP Community Camp 2014 - How to use enhanced features of Windows 8.1 Store ...
MVP Community Camp 2014 - How to useenhanced features of Windows 8.1 Store ...MVP Community Camp 2014 - How to useenhanced features of Windows 8.1 Store ...
MVP Community Camp 2014 - How to use enhanced features of Windows 8.1 Store ...
Akira Hatsune
 
8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated
8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated
8-9-10. ASP_updated8-9-10. ASP_updated8-9-10. ASP_updated
dioduong345
 
Introduction to Polymer and Firebase - Simon Gauvin
Introduction to Polymer and Firebase - Simon GauvinIntroduction to Polymer and Firebase - Simon Gauvin
Introduction to Polymer and Firebase - Simon Gauvin
Simon Gauvin
 
Ad

Recently uploaded (20)

some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
ELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdfELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdf
Shiju Jacob
 
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptxExplainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
MahaveerVPandit
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Journal of Soft Computing in Civil Engineering
 
railway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forgingrailway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forging
Javad Kadkhodapour
 
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Journal of Soft Computing in Civil Engineering
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
IntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdfIntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdf
Luiz Carneiro
 
15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...
IJCSES Journal
 
Smart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineeringSmart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineering
rushikeshnavghare94
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)
rccbatchplant
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
ELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdfELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdf
Shiju Jacob
 
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptxExplainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
MahaveerVPandit
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
railway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forgingrailway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forging
Javad Kadkhodapour
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
IntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdfIntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdf
Luiz Carneiro
 
15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...
IJCSES Journal
 
Smart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineeringSmart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineering
rushikeshnavghare94
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)
rccbatchplant
 

Modern android development

  • 2. Agenda • Code behind • Material Design • Pattern recommended to use
  • 3. Code behind • Libraries: • ButterKnife • Square Otto Event Bus • Google Play Services • Support libraries • Material design • Retrofit • Dagger2 • Picasso 24.09.20153
  • 4. ButterKnife v7.0.1 • Annotate fields with @Bind • ButterKnife will find the binded ID to the component, layout or resource ids. • Why? • Slow reflection. ButterKnife makes sure that the code is generated to perform the view lookups. Bind delegates to the generated code. • Resource Binding • Bind resources. You need to specify the Bind. For example @BindString, @BindDrawable, @BindColor, @BindDimen • Non-Activity Binding • Use @Bind to connect the component or Array. But need to specify @Bind({,….}) • Listener • Bind listeners for example annotate @OnClick({….}) or @OnItemSelected({…}) • Reset Bind • Need to clean the bindings when destroying an Activity or a Fragment using @UnBind. 24.09.20154
  • 5. Square Otto Event Bus v1.3.8 • Decouple parts of the application for communication. • Acts as a pub-sub. • Publish • Tell Subscribers that an action has occured • Subscribe • Receive notification that an event has occured • Annotate method with @Subscribe • Register to a bus • Need to call bus.register(this). In order to receive events 24.09.20155 bus.post(new AnswerAvailableEvent(42)); @Subscribe public void answerAvailable(AnswerAvailableEvent event) { // TODO: React to the event somehow! }
  • 6. Retrofit v2.0 • Turns HTTP API into a Java interface • Uses Annotations to describe HTTP request: • URL parameter replacement and query parameter support • Object convertsion to request body (JSON, protocol buffer) • Multipart request body and file upload • Request Method • Request Body • Multipart • Header 24.09.20156 @GET("/group/{id}/users") List<User> groupList(@Path("id") int groupId); @POST("/users/new") Call<User> createUser(@Body User user); @Multipart @PUT("/user/photo") Call<User> updateUser(@Part("photo") RequestBody photo, @Part("description") RequestBody description); @Headers({ "Accept: application/vnd.github.v3.full+json", "User-Agent: Retrofit-Sample-App" }) @GET("/users/{username}") Call<User> getUser(@Path("username") String username);
  • 7. Dagger2 24.09.20157 • Dependency Injection making application loosely coupled. • Annotations: • @Module: classes whose methods provide dependencies • @Provides: methods within module classes • @Inject: request a dependency (a constructor, field or a method) • @Component: bridge interface between modules and injection @Module public class VehicleModule { @Provides @Singleton Motor provideMotor(){ return new Motor(); } @Provides @Singleton Vehicle provideVehicle(){ return new Vehicle(new Motor()); } } @Inject public Vehicle(Motor motor){ this.motor = motor; } @Singleton @Component(modules = {VehicleModule.class}) public interface VehicleComponent { Vehicle provideVehicle(); } // connect @modules with @inject
  • 8. Dagger2 24.09.20158 • When everything is ready • Obtain instance of the interface and invoke its method. • Do it inside onCreate method! • Why Dagger2? • No reflection: graph validation, configuration and precondition done at compile time. • Performance gain public class MainActivity extends ActionBarActivity { Vehicle mVehicle; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); VehicleComponent component = Dagger_VehicleComponent.builder().vehicleModule(new VehicleModule()).build(); mVehicle = component.provideVehicle(); Toast.makeText(this, String.valueOf(vehicle.getSpeed()), Toast.LENGTH_SHORT).show(); } }
  • 9. Picasso v2.5.2 24.09.20159 • Load image into a view based on url or from memory • Picasso handles: • ImageView recycling and download cancelation in an adapter • Complex image transformations with minimal memory usage • Automatic memory and disk caching. • Has placeholders in case of loading or failed loading image. Picasso.with(context) .load(url) .placeholder(R.drawable.user_placeholder) .error(R.drawable.user_placeholder_error) .into(imageView);
  • 10. Material Design • Make all apps flat as paper, • responsive animations! • Right color and shadow depths • Get inspired! • http://www.materialup.com/
  • 11. Material Design • Use Androids Design library: • com.android.support.design • Snackbar! • Like Toast, but shows a message at the bottom of the screen Snackbar.make(mDrawerLayout, "Your message", Snackbar.LENGTH_SHORT) .setAction(getString(R.string.text_undo), this) .show();
  • 12. Shared Element Transition 24.09.201512 • Animate different UI states in an application. • Built on • Scene: Defines UI states in an application • Transition: Defines the animated change between two scenes • Need to define transition in style.xml and also <transitionSet xmlns:android="http://schemas.android.com/apk/res/android"> <changeBounds> <targets> <target android:targetId="@id/ivPosterImage" /> <target android:targetId="@id/detailed_image" /> </targets> </changeBounds> <changeImageTransform> <targets> <target android:targetId="@id/ivPosterImage" /> <target android:targetId="@id/detailed_image" /> </targets> </changeImageTransform> </transitionSet>
  • 13. Shared Element Transition 24.09.201513 <style name="AppTheme" parent="AppTheme.Base"> <item name="android:windowContentTransitions">true</item> <item name="android:windowAllowEnterTransitionOverlap">true</item> <item name="android:windowAllowReturnTransitionOverlap">true</item> <item name="android:windowIsTranslucent">true</item> <!-- specify enter and exit transitions --> <item name="android:windowEnterTransition">@transition/fade</item> <item name="android:windowExitTransition">@transition/fade</item> <!-- specify shared element transitions --> <item name="android:windowSharedElementEnterTransition"> @transition/change_image_transform </item><transitionSet xmlns:android="http://schemas.android.com/apk/res/android"> <changeBounds> <targets> <target android:targetId="@id/ivPosterImage" /> <target android:targetId="@id/detailed_image" /> </targets> </changeBounds> <changeImageTransform> <targets> <target android:targetId="@id/ivPosterImage" /> <target android:targetId="@id/detailed_image" /> </targets> </changeImageTransform> </transitionSet> <item name="android:windowSharedElementExitTransition"> @transition/change_image_transform </item> </style>
  • 14. Floating Action Button 24.09.201514 • fabSize: set the size of the button • Normal: 56dp • Mini: 40dp • backgroundTint: set the background color of this instance • rippleColor set color of the ripple effect when pressed • src: set the icon displayed within the FAB <android.support.design.widget.FloatingActionButton android:id=”@+id/fab_normal” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:src=”@drawable/ic_plus” app:fabSize=”normal” />
  • 15. EditText Floating Labels • Display floating labels above EditText fields. • Gives focus or hint of float. • Useful to use while data is being input • You can also add Error message 24.09.201515 <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText android:id="@+id/edit_text_email" android:layout_width="match_parent"/> </android.support.design.widget.TextInputLayout> setErrorEnabled(true); setError(getString(R.string.text_error_message));
  • 16. Navigation View • Placed within a DrawerLayout 24.09.201516 <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <FrameLayout android:id="@+id/main_content_frame" android:layout_width="match_parent" android:layout_height="match_parent" /> <android.support.design.widget.NavigationView android:id="@+id/navigation_view" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start" app:headerLayout="@layout/navigation_header" app:menu="@menu/drawer" /> </android.support.v4.widget.DrawerLayout>
  • 17. TabLayout • tabMode: set the layout to fixed or scrollable • tabGravity: set gravity of the tab, either filled (distributed to all available space between individual tabs) or centre (position tabs in the center of the TabLayout) • setText() and setIcon() • Listeners: • OnTabSelectedListener • TabLayoutOnPageChangeListener • ViewPagerOnTabSelectedListener 24.09.201517 <android.support.design.widget.TabLayout android:id="@+id/sliding_tabs" android:layout_width="match_parent" android:layout_height="wrap_content" app:tabMode="fixed" app:tabGravity="fill" /> ViewPager pager = (ViewPager) rootView.findViewById(R.id.viewPager); pager.setAdapter(new MyPagerAdapter(getActivity().getSupportFragmentManager())); TabLayout tabLayout = (TabLayout) rootView.findViewById(R.id.sliding_tabs);tabLayout.addTab(tabLayout.newTab().setText("Tab One")); tabLayout.addTab(tabLayout.newTab().setText("Tab Two")); tabLayout.addTab(tabLayout.newTab().setText("Tab Three")); tabLayout.setupWithViewPager(pager);
  • 18. Coordinator Layout • Super FrameLayout • Adds transition view basedon motion of other components • Lets us adapt layouts based on scroll events. • Set the property layout_scrollFlags • enterAlways – view will become visible when a downward scroll event occurs • enterAlwaysCollapsed – if view has minHeight, it will only enter at a that height and expand fully once the scrolling view reached the top. 24.09.201518 <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v7.widget.RecyclerView android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior= "@string/appbar_scrolling_view_behavior" /> <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.v7.widget.Toolbar app:layout_scrollFlags="scroll|enterAlways" /> <android.support.design.widget.TabLayout /> </android.support.design.widget.AppBarLayout> </android.support.design.widget.CoordinatorLayout>
  • 19. Support Toolbar • Use • com.android.support.appcompat-v7:<versionnumber> • Remember to style the toolbar! 24.09.201519 <android.support.v7.widget.Toolbar android:id=”@+id/my_awesome_toolbar” android:layout_height=”wrap_content” android:layout_width=”match_parent” android:minHeight=”?attr/actionBarSize” android:background=”?attr/colorPrimary” /> @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.blah); Toolbar toolbar = (Toolbar) findViewById(R.id.my_awesome_toolbar); setSupportActionBar(toolbar); } <style name="Theme.MyTheme" parent="Theme.AppCompat.Light"> <!-- Set AppCompat’s actionBarStyle --> <item name="actionBarStyle">@style/MyActionBarStyle</item> <!-- Set AppCompat’s color theming attrs --> <item name="colorPrimary">@color/my_awesome_red</item> <item name="colorPrimaryDark">@color/my_awesome_darker_red</item> <!-- The rest of your attributes --> </style>
  • 20. Pattern recommended to use • Model-View-Presenter (MVP) • User interacts with the View. • There is one-to-one relationship between View and Presenter means one View is mapped to only one Presenter. • View has a reference to Presenter but View has not reference to Model. • Provides two way communication between View and Presenter. 24.09.201520
  • 21. Firmu – The Cinema Locator App • Google Play Store • (Later on Windows Store and IOS). • Highly inspired by Material Design and modern mobile development. • Feedback on the app please  24.09.201521
  • 22. Pitch (Beta version) • Google Play Store • (Later on Windows Store and IOS). • Highly inspired by Material Design and modern mobile development. • Feedback on the app please  24.09.201522
  • 23. 23 © Computas AS 24.09.2015 Questions? Computas AS Tel +47 67 83 10 00 Lysaker Torg 45, pb 482 Fax +47 67 83 10 01 1327 Lysaker Org.nr: NO 986 352 325 MVA Norway www.computas.com Khiem-Kim Ho Xuan