SlideShare une entreprise Scribd logo
1  sur  42
Android 3.0: Introdução
ao uso de Fragmentos e
    dicas de Layout
       Por Igor Novais
        17/06/2011


                         Sessão Técnica
Índice
•   Mercado Android
•   Dispositivos com Android 3.0
•   Introdução a Fragmentos
•   Atualizando e Desenvolvendo um App
    para Tablet
•   Layout Android 3.0 e recursos
•   O que rolou no MOTODEV 2011?



                                         3
Mercado Android
•   2011 é o ano dos Tablets!
       •   Cerca de 400 mil tablets serão vendidos esse ano no Brasil, diz IDC (Tudo
           Celular)

       •    Motorola Xoom, o primeiro tablet com Android Honeycomb (Tech Tudo)

       •    Panasonic anuncia o tablet Toughbook, para usuários corporativos
           (TechTudo)

       •    Veja qual o plano de internet 3G é o mais adequado para seu tablet (G1)

       •    Conheça alguns aplicativos que não podem faltar no seu tablet (G1)

       •    Dell vai lançar novo tablet com Android na China (Extra)



                                                                                       4
Mercado Android
•   Android aumentou a liderança de mercado de smartphones com uma cota de
    35% (Canalys – especializada em serviços de assessoria contínua (04/05/2011)




                                                                    Nielsen
                                                                 (31/05/2011)




                                                                                   5
Mercado Android
•   Nos estados unidos 1 em cada 2 smartphones vendidos é Android.



•   Aumento do poder de consumo dos brasileiros



•   Pesquisa da ChangeWare Resarch Nov 2010 – Satisfação por marcas.



•   Softwares voltado para o público local




                                                                       6
Dispositivos Com Android 3.0

     Motorola Xoom         Samsung Tab 10.1




                                              7
Dispositivos Com Android 3.0

     Acer 10.1           Olipad 110 (Olivetti) 3.1




                                                     8
Dispositivos Com Android 3.0

 DreamBook ePad P10+ (Pionner)

                                 Panasonic Toughbook *

                                 Samsung Tab 8.9

                                 Google TV




                                                         9
Como desenvolver layouts que sejam facilmente
    portados de Smartphone para Tablet?
Como desenvolver facilmente
     subcomponente?
Como desenvolver layouts separados e
    depois juntar rapidamente?
Fragments
Fragments

• Conceito:
   “Um fragmento representa um comportamento ou uma parte da
     interface de usuário em uma atividade.” - Android Developer



   Combinar múltiplos fragmentos

   Atividade dentro de Atividade?

   Próprio ciclo de vida, próprios eventos de entrada




                                                                   14
Fragments
•   Design mais dinâmico e flexível em telas largas




                                               Fonte: Android Developer




                                                                          15
Ciclo de Vida do Fragment




                            16
Fragments
onAttach () - Chamado quando o fragmento tem sido associado com a
   atividade.

onCreateView () - Chamado para criar a hierarquia de visão associada com
   o fragmento.

onActivityCreated () - Chamado quando o método da atividade onCreate ()
   retornou.

onDestroyView () - Chamado quando a hierarquia visão associada com o
   fragmento está sendo removido.

onDetach () - Chamado quando o fragmento está sendo dissociadas da
   atividade.



                                                                           17
Fragments
•   Smartphone X Tablet

•   Retrato X Paisagem

•   Use qualificador de configuração (drawable e layout)
     – xhdpi, hdpi, mdpi, ldpi
     – xlarge, large, normal, small
     – land, port




                                                           18
Fragments




  Android 3.0 SDK




                    19
Fragments
        Pacote de Compatibilidade do Android




                                               20
Fragments
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:orientation="horizontal"
   android:layout_width="match_parent"
   android:layout_height="match_parent">
   <fragment android:name=“irt.google.TestFragment"
        android:id="@+id/test"
        android:layout_weight="1"
        android:layout_width="0dp"
        android:layout_height="match_parent" />
   <fragment android:name=“irt.google.Test2Fragment"
        android:id="@+id/test2"
        android:layout_weight="2"
        android:layout_width="0dp"
        android:layout_height="match_parent" />
 </LinearLayout>




                                                                            21
Fragments
        package irt.google;

        public class TestFragment extends Fragment{
             @Override
             public void onAttach(Activity activity) {
                  super.onAttach(activity);
                  Log.i("Fragment", "onAttach");
             }

            @Override
            public void onCreate(Bundle savedInstanceState) {
                 super.onCreate(savedInstanceState);
                 Log.i("Fragment", "onCreate");
            }

            @Override
            public void onDestroy() {
                 super.onDestroy();
                 Log.i("Fragment", "onDestroy");
            }
        }
                                                                22
Fragments
•   Inflate em View Group

    public static class ExampleFragment extends Fragment {
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
          Bundle savedInstanceState) {
         // Inflate the layout for this fragment
         return inflater.inflate(R.layout.example_fragment, container, false);
      }
    }




                                                                                 23
Atualizando e Desenvolvendo um App para Tablet
•   Declare a versão mínima do sistema
    <manifest ... >
      <uses-sdk android:minSdkVersion="11" />
      <application ... >
         ...
      <application>
    </manifest>

•   Use a Action Bar




                                                 24
Atualizando e Desenvolvendo um App para Tablet
•   Use a nova API de animações para transições

•   Habilite a aceleração de hardware
     – android:hardwareAccelerated="true“

•   Melhore sua aplicação com widgets
     – ListView
     – GridView
     – StackView

•   Outras APIs
     – Drag And Drop
     – Nova API de Bluetooth




                                                  25
Atualizando e Desenvolvendo um App para Tablet
    <manifest ... >
      ...
      <supports-screens android:smallScreens="false"
                   android:normalScreens="false"
                   android:largeScreens="false"
                   android:xlargeScreens="true" />
      <application ... >
          ...
      <application>
    </manifest>

•   Uso do recurso de telefone é variável de aparelho
    <uses-feature android:name="android.hardware.telephony"
    android:required="false" />
                     PackageManager pm = getPackageManager();
                     boolean hasTelephony =
                     pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY);


                                                                              26
Layout Android 3.0
Layout




 “Nós estamos em um lugar totalmente novo. Leve as
 coisas certas a bordo.” - Suzanne Alexandra




                                                     28
Layout

•   Barra de Sistema




                       29
Layout

•   Efeito Oceano




                    Imagem de
                    Suzanne
                    Alexandra




                                30
Layout

•   Use Fragmentos

•   Ícone pode ser clicado

•   Use melhor o espaço em tela (Otimize a experiência)

•   Novas View android.widget.PopupMenu

•   Textos mostrados acima de 18sp.




                                                          31
Layout

•   Imagens de Tamanho compatível com o espaço que será usado na tela.
     – Dimensionamento automático
         • 324 KB de tamanho
         • 32 MB de memória
     – Conjuntos de imagens
         • 728 KB de tamanho
         • 23 MB de memória


•   options.inSampleSize = 4

•   Sensibilidade ao toque (imagens e ícones acessíveis)




                                                                         32
Layout

•   Impacte com design

•   Use os novos temas holográficos do Android 3.0
     – @android:style/Theme.Holo.Light
     – @android:style/Theme.Holo


•   Hardware Accelerated=“true”

•   Use Drag and Drop




                                                     33
Layout
•   Notificação Elaborada

    Notification.Builder builder = new Notification.Builder( this );

    Como AlertDialog.Builder

    Você pode desenvolver o layout da notificação

•   Uso de Open GL ES 2.0

•   android.Animation




                                                                       34
Layout
•   Estratégia de compatibilidade de código

    private static boolean isHoneycomb =
    android.os.Build.VERSION.SDK_INT > 10;
         if(!isHoneycomb)
              // iniciar intent de activity
         Else
              // iniciar outro




                                              35
Layout

•   Media Support – foi desenvolvido o Media/Picture Transport Protocol
    (MTP/PTP) que auxilia na transferência dos arquivos de mídia digital.

•   JSON utilities (JsonReader e JsonWrite)

•   Suporte a Dual Camera (2.3)

•   android.hardware.touchscreen.multitouch.jazzhands – 10 toques (2.3)




                                                                            36
O que roulou mais no MOTODEV 2011?
•   Api RenderScript

•   Exemplos de empresas que portaram aplicativos de Smartphone para
    Tablet.

•   Uso de HTML5 para dispositivos móveis

•   Uso do Adobe Air

•   Chamadas de idéias e aplicativos para o Tablet Xoom e Motorola Atrix




                                                                           37
Android 3.1

•   USB API

•   MTP/PTP API (Media Transfer Protocol)
     – Auxilia às aplicações no recebimento de notificações (Anexado e
       removido, gerencia de arquivos e armazenamento nesses dispositivos)
     – android.mtp
         • MtpStorageInfo
         • MtpDeviceInfo
         • MtpObjectInfo
         • MtpConstants


•   RTP API (Real-time Transport Protocol) android.net.rtp (Audio somente)
     – Gerencia por demanda
     – Interatividade de dados por streaming

                                                                             38
Links Apresentações Motodev
•   Design para Tablet - http://www.slideshare.net/motodev/desenvolvimento-de-
    aplicativos-para-o-tablet-motorola-xoom

•   Fragmentos - http://www.slideshare.net/motodev/introduo-a-fragmentos

•   Renderscript - http://www.slideshare.net/motodev/grficos-cada-vez-mais-
    rpidos-utilizao-de-ndk-e-renderscript

•   Dicas de UI - http://www.slideshare.net/motodev/principais-dicas-para-uis-do-
    android

•   Teste - http://www.slideshare.net/motodev/como-integrar-qualidade-aos-seus-
    aplicativos-atravs-de-testes

•   WebTop e HTML5 - http://www.slideshare.net/motodev/tirando-vantagem-do-
    webtop-como-o-html5-aprimora-a-experincia-do-usurio-de-dispositivos-mveis


                                                                                    39
Referências
•   http://www.tudocelular.com/Economia-e-Mercado/noticias/n24360/400-mil-
    tablets-brasil.html

•   http://developer.android.com/guide/topics/fundamentals/fragments.html

•   http://developer.android.com/guide/topics/ui/actionbar.html

•   http://www.samsung.com/global/microsite/galaxytab/10.1/images.html

•   http://www.techtudo.com.br/lancamentos/noticia/2011/06/olipad-110-o-tablet-
    honeycomb-da-olivetti.html

•   http://www.techtudo.com.br/lancamentos/noticia/2011/06/pioneer-anuncia-
    tablet-dreambook-epad-p10-com-android-30.html

•   http://www.androidtablets.net/


                                                                                  40
Referências
•   http://www.canalys.com/pr/2011/r2011051.html

•   http://extra.globo.com/noticias/celular-e-tecnologia/dell-vai-lancar-novo-tablet-
    com-android-na-china-2011363.html

•   http://g1.globo.com/tecnologia/noticia/2011/06/conheca-alguns-aplicativos-
    que-nao-podem-faltar-no-seu-tablet.html

•   http://g1.globo.com/tecnologia/noticia/2011/06/veja-qual-o-plano-de-internet-
    3g-e-o-mais-adequado-para-seu-tablet.html

•   http://www.techtudo.com.br/lancamentos/noticia/2011/06/panasonic-anuncia-
    o-tablet-toughbook-para-usuarios-corporativos.html

•   http://blog.nielsen.com/nielsenwire/consumer/android-leads-u-s-in-
    smartphone-market-share-and-data-usage/


                                                                                        41
Android 3.0: Fragments e Layout

Contenu connexe

En vedette

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Android 3.0: Fragments e Layout

  • 1.
  • 2. Android 3.0: Introdução ao uso de Fragmentos e dicas de Layout Por Igor Novais 17/06/2011 Sessão Técnica
  • 3. Índice • Mercado Android • Dispositivos com Android 3.0 • Introdução a Fragmentos • Atualizando e Desenvolvendo um App para Tablet • Layout Android 3.0 e recursos • O que rolou no MOTODEV 2011? 3
  • 4. Mercado Android • 2011 é o ano dos Tablets! • Cerca de 400 mil tablets serão vendidos esse ano no Brasil, diz IDC (Tudo Celular) • Motorola Xoom, o primeiro tablet com Android Honeycomb (Tech Tudo) • Panasonic anuncia o tablet Toughbook, para usuários corporativos (TechTudo) • Veja qual o plano de internet 3G é o mais adequado para seu tablet (G1) • Conheça alguns aplicativos que não podem faltar no seu tablet (G1) • Dell vai lançar novo tablet com Android na China (Extra) 4
  • 5. Mercado Android • Android aumentou a liderança de mercado de smartphones com uma cota de 35% (Canalys – especializada em serviços de assessoria contínua (04/05/2011) Nielsen (31/05/2011) 5
  • 6. Mercado Android • Nos estados unidos 1 em cada 2 smartphones vendidos é Android. • Aumento do poder de consumo dos brasileiros • Pesquisa da ChangeWare Resarch Nov 2010 – Satisfação por marcas. • Softwares voltado para o público local 6
  • 7. Dispositivos Com Android 3.0 Motorola Xoom Samsung Tab 10.1 7
  • 8. Dispositivos Com Android 3.0 Acer 10.1 Olipad 110 (Olivetti) 3.1 8
  • 9. Dispositivos Com Android 3.0 DreamBook ePad P10+ (Pionner) Panasonic Toughbook * Samsung Tab 8.9 Google TV 9
  • 10. Como desenvolver layouts que sejam facilmente portados de Smartphone para Tablet?
  • 11. Como desenvolver facilmente subcomponente?
  • 12. Como desenvolver layouts separados e depois juntar rapidamente?
  • 14. Fragments • Conceito: “Um fragmento representa um comportamento ou uma parte da interface de usuário em uma atividade.” - Android Developer Combinar múltiplos fragmentos Atividade dentro de Atividade? Próprio ciclo de vida, próprios eventos de entrada 14
  • 15. Fragments • Design mais dinâmico e flexível em telas largas Fonte: Android Developer 15
  • 16. Ciclo de Vida do Fragment 16
  • 17. Fragments onAttach () - Chamado quando o fragmento tem sido associado com a atividade. onCreateView () - Chamado para criar a hierarquia de visão associada com o fragmento. onActivityCreated () - Chamado quando o método da atividade onCreate () retornou. onDestroyView () - Chamado quando a hierarquia visão associada com o fragmento está sendo removido. onDetach () - Chamado quando o fragmento está sendo dissociadas da atividade. 17
  • 18. Fragments • Smartphone X Tablet • Retrato X Paisagem • Use qualificador de configuração (drawable e layout) – xhdpi, hdpi, mdpi, ldpi – xlarge, large, normal, small – land, port 18
  • 19. Fragments Android 3.0 SDK 19
  • 20. Fragments Pacote de Compatibilidade do Android 20
  • 21. Fragments <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent"> <fragment android:name=“irt.google.TestFragment" android:id="@+id/test" android:layout_weight="1" android:layout_width="0dp" android:layout_height="match_parent" /> <fragment android:name=“irt.google.Test2Fragment" android:id="@+id/test2" android:layout_weight="2" android:layout_width="0dp" android:layout_height="match_parent" /> </LinearLayout> 21
  • 22. Fragments package irt.google; public class TestFragment extends Fragment{ @Override public void onAttach(Activity activity) { super.onAttach(activity); Log.i("Fragment", "onAttach"); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.i("Fragment", "onCreate"); } @Override public void onDestroy() { super.onDestroy(); Log.i("Fragment", "onDestroy"); } } 22
  • 23. Fragments • Inflate em View Group public static class ExampleFragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.example_fragment, container, false); } } 23
  • 24. Atualizando e Desenvolvendo um App para Tablet • Declare a versão mínima do sistema <manifest ... > <uses-sdk android:minSdkVersion="11" /> <application ... > ... <application> </manifest> • Use a Action Bar 24
  • 25. Atualizando e Desenvolvendo um App para Tablet • Use a nova API de animações para transições • Habilite a aceleração de hardware – android:hardwareAccelerated="true“ • Melhore sua aplicação com widgets – ListView – GridView – StackView • Outras APIs – Drag And Drop – Nova API de Bluetooth 25
  • 26. Atualizando e Desenvolvendo um App para Tablet <manifest ... > ... <supports-screens android:smallScreens="false" android:normalScreens="false" android:largeScreens="false" android:xlargeScreens="true" /> <application ... > ... <application> </manifest> • Uso do recurso de telefone é variável de aparelho <uses-feature android:name="android.hardware.telephony" android:required="false" /> PackageManager pm = getPackageManager(); boolean hasTelephony = pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY); 26
  • 28. Layout “Nós estamos em um lugar totalmente novo. Leve as coisas certas a bordo.” - Suzanne Alexandra 28
  • 29. Layout • Barra de Sistema 29
  • 30. Layout • Efeito Oceano Imagem de Suzanne Alexandra 30
  • 31. Layout • Use Fragmentos • Ícone pode ser clicado • Use melhor o espaço em tela (Otimize a experiência) • Novas View android.widget.PopupMenu • Textos mostrados acima de 18sp. 31
  • 32. Layout • Imagens de Tamanho compatível com o espaço que será usado na tela. – Dimensionamento automático • 324 KB de tamanho • 32 MB de memória – Conjuntos de imagens • 728 KB de tamanho • 23 MB de memória • options.inSampleSize = 4 • Sensibilidade ao toque (imagens e ícones acessíveis) 32
  • 33. Layout • Impacte com design • Use os novos temas holográficos do Android 3.0 – @android:style/Theme.Holo.Light – @android:style/Theme.Holo • Hardware Accelerated=“true” • Use Drag and Drop 33
  • 34. Layout • Notificação Elaborada Notification.Builder builder = new Notification.Builder( this ); Como AlertDialog.Builder Você pode desenvolver o layout da notificação • Uso de Open GL ES 2.0 • android.Animation 34
  • 35. Layout • Estratégia de compatibilidade de código private static boolean isHoneycomb = android.os.Build.VERSION.SDK_INT > 10; if(!isHoneycomb) // iniciar intent de activity Else // iniciar outro 35
  • 36. Layout • Media Support – foi desenvolvido o Media/Picture Transport Protocol (MTP/PTP) que auxilia na transferência dos arquivos de mídia digital. • JSON utilities (JsonReader e JsonWrite) • Suporte a Dual Camera (2.3) • android.hardware.touchscreen.multitouch.jazzhands – 10 toques (2.3) 36
  • 37. O que roulou mais no MOTODEV 2011? • Api RenderScript • Exemplos de empresas que portaram aplicativos de Smartphone para Tablet. • Uso de HTML5 para dispositivos móveis • Uso do Adobe Air • Chamadas de idéias e aplicativos para o Tablet Xoom e Motorola Atrix 37
  • 38. Android 3.1 • USB API • MTP/PTP API (Media Transfer Protocol) – Auxilia às aplicações no recebimento de notificações (Anexado e removido, gerencia de arquivos e armazenamento nesses dispositivos) – android.mtp • MtpStorageInfo • MtpDeviceInfo • MtpObjectInfo • MtpConstants • RTP API (Real-time Transport Protocol) android.net.rtp (Audio somente) – Gerencia por demanda – Interatividade de dados por streaming 38
  • 39. Links Apresentações Motodev • Design para Tablet - http://www.slideshare.net/motodev/desenvolvimento-de- aplicativos-para-o-tablet-motorola-xoom • Fragmentos - http://www.slideshare.net/motodev/introduo-a-fragmentos • Renderscript - http://www.slideshare.net/motodev/grficos-cada-vez-mais- rpidos-utilizao-de-ndk-e-renderscript • Dicas de UI - http://www.slideshare.net/motodev/principais-dicas-para-uis-do- android • Teste - http://www.slideshare.net/motodev/como-integrar-qualidade-aos-seus- aplicativos-atravs-de-testes • WebTop e HTML5 - http://www.slideshare.net/motodev/tirando-vantagem-do- webtop-como-o-html5-aprimora-a-experincia-do-usurio-de-dispositivos-mveis 39
  • 40. Referências • http://www.tudocelular.com/Economia-e-Mercado/noticias/n24360/400-mil- tablets-brasil.html • http://developer.android.com/guide/topics/fundamentals/fragments.html • http://developer.android.com/guide/topics/ui/actionbar.html • http://www.samsung.com/global/microsite/galaxytab/10.1/images.html • http://www.techtudo.com.br/lancamentos/noticia/2011/06/olipad-110-o-tablet- honeycomb-da-olivetti.html • http://www.techtudo.com.br/lancamentos/noticia/2011/06/pioneer-anuncia- tablet-dreambook-epad-p10-com-android-30.html • http://www.androidtablets.net/ 40
  • 41. Referências • http://www.canalys.com/pr/2011/r2011051.html • http://extra.globo.com/noticias/celular-e-tecnologia/dell-vai-lancar-novo-tablet- com-android-na-china-2011363.html • http://g1.globo.com/tecnologia/noticia/2011/06/conheca-alguns-aplicativos- que-nao-podem-faltar-no-seu-tablet.html • http://g1.globo.com/tecnologia/noticia/2011/06/veja-qual-o-plano-de-internet- 3g-e-o-mais-adequado-para-seu-tablet.html • http://www.techtudo.com.br/lancamentos/noticia/2011/06/panasonic-anuncia- o-tablet-toughbook-para-usuarios-corporativos.html • http://blog.nielsen.com/nielsenwire/consumer/android-leads-u-s-in- smartphone-market-share-and-data-usage/ 41