SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Trilha Android – Deixando sua
interface mais bonita com SHAPES

         Suelen Goularte Carvalho



                                    Globalcode – Open4education
Quem sou eu...




            @SuelenGC
                        Globalcode – Open4education
Objetivos:


   1. Entender o que são shapes
   2. Saber usar shapes
   3. Saber escrever shapes
   4. Quick Hands On




                              Globalcode – Open4education
App Resource

   Arquivos adicionais
   Conteúdo estático
   Imagens
   Definições de layout
   Strings
   etc...


                     Globalcode – Open4education
App Resource
 Existem muitos tipos de App Resources:


  Animation            String
  Color State List     Style
  Drawable             E muitos outros...
  Layout
  Menu




                                   Globalcode – Open4education
App Resource


Drawable Resource

   Imagem
   XML


                 Globalcode – Open4education
Drawable Resource
 Existem muitos tipos de Drawable Resources:

    BitmapDrawable         TransitionDrawable
    NinePatchDrawable      InsetDrawable
    LayerDrawable          ClipDrawable
    StateListDrawable      ScaleDrawable
    LevelListDrawable    ShapeDrawable



                                     Globalcode – Open4education
App Resource


Drawable Resource


    Shape
                 Globalcode – Open4education
Shape Resource
<?xml version="1.0" encoding="utf-8"?>
<shape
     xmlns:android=“http://schemas.android.com/apk/res/android”
     android:shape="rectangle">
     <gradient
          android:startColor="#FFFF0000"
          android:endColor=“#80FF00FF"
          android:angle="45” />
    <padding
          android:left="7dp"
          android:top="7dp"
          android:right=“7dp"
          android:bottom=“8dp" />
    <corners android:radius="8dp" />
</shape>
                                                     Globalcode – Open4education
Shape Resource
 MyProject/
    src/
         MyActivity.java
    res/
         drawable/
              icon.png
              myshape.xml
         layout/
              main.xml
         values/
              strings.xml
         ...

                            Globalcode – Open4education
Shape Resource pelo Eclipse      b




                        Globalcode – Open4education
Shape Resource pelo Eclipse      b




                        Globalcode – Open4education
Mas afinal... O que raios é um
         SHAPE???




                       Globalcode – Open4education
Objetivos:


   1. Entender o que são shapes
   2. Saber usar shapes
   3. Saber escrever shapes
   4. Quick Hands On




                              Globalcode – Open4education
<LinearLayout
   android:layout_height=“fill_parent”
   android:layout_width=“fill_parent”>
  …
   <TextView
      android:background="@drawable/myshape"
      android:layout_height="wrap_content“
      android:layout_width="wrap_content" />
   …
</LinearLayout>
                                 Globalcode – Open4education
Usamos SHAPES para
preencher backgrounds




                  Globalcode – Open4education
Objetivos:


   1. Entender o que são shapes
   2. Saber usar shapes
   3. Saber escrever shapes
   4. Quick Hands On




                            Globalcode – Open4education
Shape Retangular
<shape
   xmlns:android=“http://schemas.android.com/apk/res/android”
   android:shape=“rectangle”>

   <gradient
       android:startColor=“@color/Yellow"
       android:endColor=“@color/White"
       android:angle="270“ />

  <corners android:radius="0dp" />

</shape>




                                                            Globalcode – Open4education
Shape Retangular Radial
<shape
   xmlns:android=“http://schemas.android.com/apk/res/android”
   android:shape=“rectangle”>

  <gradient
      android:type="radial"
      android:startColor=“@color/Red"
      android:endColor=“@color/Yellow"
      android:gradientRadius="300"
      android:centerX="0.5"
      android:centerY="0.7” />

</shape>




                                                            Globalcode – Open4education
Shape Linear


    <shape
       xmlns:android=“http://schemas.android.com/apk/res/android”
       android:shape=“line”>

       <stroke
           android:width=“3dp"
           android:color=“@color/Pink" />

    </shape>




                                                     Globalcode – Open4education
Shape Ovalado
<shape
   xmlns:android=“http://schemas.android.com/apk/res/android”
   android:shape=“oval”>

   <solid android:color=“@color/Black“ />

   <stroke
        android:width="4dp"
        android:color=“@color/Blue"
        android:dashWidth="4dp"
        android:dashGap="2dp" />

  <padding
       android:left="7dp"
       android:top="7dp"
       android:right="7dp"
       android:bottom="7dp" />

</shape>
                                                            Globalcode – Open4education
Shape Anelado
<shape
   xmlns:android=“http://schemas.android.com/apk/res/android”
   android:shape=“ring”
   android:innerRadiusRatio="3"
   android:thicknessRatio="8"
   android:useLevel="false">

  <size
       android:width="48dip"
       android:height="48dip" />

  <gradient
       android:type="sweep"
       android:useLevel="false"
       android:startColor="#737373"
       android:endColor="#ffd300"
       android:centerColor="#737373"
       android:centerY="0.50“ />
</shape>
                                                            Globalcode – Open4education
Podemos definir...

        Curvas (<corners>)
        Gradiente (<gradient>)
        Padding (<padding>)
        Tamanho (<size>)
        Cor (<solid>)
        Borda (<stroke>)




                                  Globalcode – Open4education
Objetivos:


   1. Entender o que são shapes
   2. Saber usar shapes
   3. Saber escrever shapes
   4. Quick Hands On



                            Globalcode – Open4education
Sem shapes   Com shapes




                     Globalcode – Open4education
shape_button.xml
<?xml version="1.0" encoding="utf-8"?>
<shape
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:shape="rectangle">

  <size
    android:width="100dp"
    android:height="45dp” />

  <corners android:radius="10dp" />

  <solid android:color="@color/Violet" />

  <stroke
     android:width="2dp"
     android:color="@color/White” />
</shape>



                                                           Globalcode – Open4education
shape_fields.xml
<?xml version="1.0" encoding="utf-8"?>
<shape
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:shape="rectangle">

  <size android:height="45dp“ />

  <corners android:radius="10dp" />

  <solid android:color="@color/White" />

  <stroke
    android:width="1dp"
    android:color="@color/Violet“ />

</shape>




                                                           Globalcode – Open4education
shape_0_border.xml
<?xml version="1.0" encoding="utf-8"?>
<shape
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:shape="rectangle">

  <solid android:color=“@color/White" />

  <stroke android:width="0dp"/>
</shape>




                                                               Globalcode – Open4education
https://github.com/SuelenGC/TDC2012-Shapes




                                Globalcode – Open4education
Outros exemplos...




                     Globalcode – Open4education
Bibliografia
 • Resource
   http://developer.android.com/guide/topics/resources/index.html

 • Drawable Resource
   http://developer.android.com/guide/topics/resources/drawable-resource.html

 • Shape
   http://developer.android.com/guide/topics/resources/drawable-
   resource.html#Shape

 • Shape Drawable
   http://developer.android.com/reference/android/graphics/drawable/ShapeDra
   wable.html

 • Exemplos de shapes
   http://escomic.net/217


                                                           Globalcode – Open4education
Dúvidas?


               Obrigada!

           @SuelenGC

           www.suelengc.com.br

           suelengcarvalho@gmail.com


                     Globalcode – Open4education

Weitere ähnliche Inhalte

Ähnlich wie TDC2012 Android - Deixando Sua Interface mais Bonita com Shapes

Intro to PhoneGap and PhoneGap Build
Intro to PhoneGap and PhoneGap BuildIntro to PhoneGap and PhoneGap Build
Intro to PhoneGap and PhoneGap BuildChris Griffith
 
Android Workshop
Android WorkshopAndroid Workshop
Android WorkshopJunda Ong
 
Designing and implementing_android_uis_for_phones_and_tablets
Designing and implementing_android_uis_for_phones_and_tabletsDesigning and implementing_android_uis_for_phones_and_tablets
Designing and implementing_android_uis_for_phones_and_tabletsTeddy Koornia
 
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...Ted Chien
 
From Idea to App (or “How we roll at Small Town Heroes”)
From Idea to App (or “How we roll at Small Town Heroes”)From Idea to App (or “How we roll at Small Town Heroes”)
From Idea to App (or “How we roll at Small Town Heroes”)Bramus Van Damme
 
Android JetPack: easy navigation with the new Navigation Controller
Android JetPack: easy navigation with the new Navigation ControllerAndroid JetPack: easy navigation with the new Navigation Controller
Android JetPack: easy navigation with the new Navigation ControllerLeonardo Pirro
 
Android 2D Drawing and Animation Framework
Android 2D Drawing and Animation FrameworkAndroid 2D Drawing and Animation Framework
Android 2D Drawing and Animation FrameworkJussi Pohjolainen
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User InterfaceMarko Gargenta
 
android level 3
android level 3android level 3
android level 3DevMix
 
Phpforandroid en
Phpforandroid enPhpforandroid en
Phpforandroid enivmos
 
Android Fragment-Awesome
Android Fragment-AwesomeAndroid Fragment-Awesome
Android Fragment-AwesomeGauntFace
 
Designing an App: From Idea to Market
Designing an App: From Idea to MarketDesigning an App: From Idea to Market
Designing an App: From Idea to MarketEffectiveUI
 
Designing an Android App: From Idea to Market
Designing an Android App: From Idea to MarketDesigning an Android App: From Idea to Market
Designing an Android App: From Idea to MarketEffective
 
Designing an Android App from Idea to Market
Designing an Android App from Idea to MarketDesigning an Android App from Idea to Market
Designing an Android App from Idea to MarketTony Hillerson
 
Session #7 rich and responsive layouts
Session #7  rich and responsive layoutsSession #7  rich and responsive layouts
Session #7 rich and responsive layoutsVitali Pekelis
 
Introduction phonegap
Introduction phonegapIntroduction phonegap
Introduction phonegapRakesh Jha
 
Advanced programing in phonegap
Advanced programing in phonegapAdvanced programing in phonegap
Advanced programing in phonegapRakesh Jha
 

Ähnlich wie TDC2012 Android - Deixando Sua Interface mais Bonita com Shapes (20)

Intro to PhoneGap and PhoneGap Build
Intro to PhoneGap and PhoneGap BuildIntro to PhoneGap and PhoneGap Build
Intro to PhoneGap and PhoneGap Build
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
 
Designing and implementing_android_uis_for_phones_and_tablets
Designing and implementing_android_uis_for_phones_and_tabletsDesigning and implementing_android_uis_for_phones_and_tablets
Designing and implementing_android_uis_for_phones_and_tablets
 
Chapter 5 - Layouts
Chapter 5 - LayoutsChapter 5 - Layouts
Chapter 5 - Layouts
 
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
 
From Idea to App (or “How we roll at Small Town Heroes”)
From Idea to App (or “How we roll at Small Town Heroes”)From Idea to App (or “How we roll at Small Town Heroes”)
From Idea to App (or “How we roll at Small Town Heroes”)
 
Android JetPack: easy navigation with the new Navigation Controller
Android JetPack: easy navigation with the new Navigation ControllerAndroid JetPack: easy navigation with the new Navigation Controller
Android JetPack: easy navigation with the new Navigation Controller
 
Android 2D Drawing and Animation Framework
Android 2D Drawing and Animation FrameworkAndroid 2D Drawing and Animation Framework
Android 2D Drawing and Animation Framework
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User Interface
 
android level 3
android level 3android level 3
android level 3
 
Phpforandroid en
Phpforandroid enPhpforandroid en
Phpforandroid en
 
Hierarchy viewer
Hierarchy viewerHierarchy viewer
Hierarchy viewer
 
Android Fragment-Awesome
Android Fragment-AwesomeAndroid Fragment-Awesome
Android Fragment-Awesome
 
Designing an App: From Idea to Market
Designing an App: From Idea to MarketDesigning an App: From Idea to Market
Designing an App: From Idea to Market
 
Designing an Android App: From Idea to Market
Designing an Android App: From Idea to MarketDesigning an Android App: From Idea to Market
Designing an Android App: From Idea to Market
 
Designing an Android App from Idea to Market
Designing an Android App from Idea to MarketDesigning an Android App from Idea to Market
Designing an Android App from Idea to Market
 
Android networking-2
Android networking-2Android networking-2
Android networking-2
 
Session #7 rich and responsive layouts
Session #7  rich and responsive layoutsSession #7  rich and responsive layouts
Session #7 rich and responsive layouts
 
Introduction phonegap
Introduction phonegapIntroduction phonegap
Introduction phonegap
 
Advanced programing in phonegap
Advanced programing in phonegapAdvanced programing in phonegap
Advanced programing in phonegap
 

Mehr von Suelen Carvalho

Porque Métodos Ágeis não é pra você!
Porque Métodos Ágeis não é pra você!Porque Métodos Ágeis não é pra você!
Porque Métodos Ágeis não é pra você!Suelen Carvalho
 
Scrum: Relembrando os por quês?
Scrum: Relembrando os por quês?Scrum: Relembrando os por quês?
Scrum: Relembrando os por quês?Suelen Carvalho
 
Techtrends xp desafios da agilidade com trabalho remoto
Techtrends xp   desafios da agilidade com trabalho remotoTechtrends xp   desafios da agilidade com trabalho remoto
Techtrends xp desafios da agilidade com trabalho remotoSuelen Carvalho
 
Introdução a Android Instant Apps
Introdução a Android Instant AppsIntrodução a Android Instant Apps
Introdução a Android Instant AppsSuelen Carvalho
 
Construindo Times de Alta Performance - Produtos & Engenharia
Construindo Times de Alta Performance - Produtos & EngenhariaConstruindo Times de Alta Performance - Produtos & Engenharia
Construindo Times de Alta Performance - Produtos & EngenhariaSuelen Carvalho
 
Git Merge e Rebase - The goal and differences
Git Merge e Rebase - The goal and differencesGit Merge e Rebase - The goal and differences
Git Merge e Rebase - The goal and differencesSuelen Carvalho
 
Dynamic Programming and Reinforcement Learning applied to Tetris Game
Dynamic Programming and Reinforcement Learning applied to Tetris GameDynamic Programming and Reinforcement Learning applied to Tetris Game
Dynamic Programming and Reinforcement Learning applied to Tetris GameSuelen Carvalho
 
Desenvolvimento de Novos Líderes - Paidéia Educação
Desenvolvimento de Novos Líderes - Paidéia EducaçãoDesenvolvimento de Novos Líderes - Paidéia Educação
Desenvolvimento de Novos Líderes - Paidéia EducaçãoSuelen Carvalho
 
Supporting Coding and Testing
Supporting Coding and TestingSupporting Coding and Testing
Supporting Coding and TestingSuelen Carvalho
 
Intercon Android 2014 - Google Play In App Billing
Intercon Android 2014 - Google Play In App BillingIntercon Android 2014 - Google Play In App Billing
Intercon Android 2014 - Google Play In App BillingSuelen Carvalho
 
Semana da Computação USP São Carlos 2014 - Carreira Mobile
Semana da Computação USP São Carlos 2014 - Carreira MobileSemana da Computação USP São Carlos 2014 - Carreira Mobile
Semana da Computação USP São Carlos 2014 - Carreira MobileSuelen Carvalho
 
TDC 2014 - Tudo sobre GCM Push Notifications
TDC 2014 - Tudo sobre GCM Push NotificationsTDC 2014 - Tudo sobre GCM Push Notifications
TDC 2014 - Tudo sobre GCM Push NotificationsSuelen Carvalho
 
Mobile Conf 2014 - Sua carreira e o que o desenvolvimento mobile tem a ver co...
Mobile Conf 2014 - Sua carreira e o que o desenvolvimento mobile tem a ver co...Mobile Conf 2014 - Sua carreira e o que o desenvolvimento mobile tem a ver co...
Mobile Conf 2014 - Sua carreira e o que o desenvolvimento mobile tem a ver co...Suelen Carvalho
 
Conexao Java - Sua primeira app Android
Conexao Java - Sua primeira app AndroidConexao Java - Sua primeira app Android
Conexao Java - Sua primeira app AndroidSuelen Carvalho
 
A história do surgimento da plataforma móvel Android.
A história do surgimento da plataforma móvel Android.A história do surgimento da plataforma móvel Android.
A história do surgimento da plataforma móvel Android.Suelen Carvalho
 
O fantástico mundo de Android
O fantástico mundo de AndroidO fantástico mundo de Android
O fantástico mundo de AndroidSuelen Carvalho
 

Mehr von Suelen Carvalho (20)

Porque Métodos Ágeis não é pra você!
Porque Métodos Ágeis não é pra você!Porque Métodos Ágeis não é pra você!
Porque Métodos Ágeis não é pra você!
 
Scrum: Relembrando os por quês?
Scrum: Relembrando os por quês?Scrum: Relembrando os por quês?
Scrum: Relembrando os por quês?
 
Techtrends xp desafios da agilidade com trabalho remoto
Techtrends xp   desafios da agilidade com trabalho remotoTechtrends xp   desafios da agilidade com trabalho remoto
Techtrends xp desafios da agilidade com trabalho remoto
 
Introdução a Kotlin
Introdução a KotlinIntrodução a Kotlin
Introdução a Kotlin
 
Introdução a Android Instant Apps
Introdução a Android Instant AppsIntrodução a Android Instant Apps
Introdução a Android Instant Apps
 
Google IO'17
Google IO'17Google IO'17
Google IO'17
 
Construindo Times de Alta Performance - Produtos & Engenharia
Construindo Times de Alta Performance - Produtos & EngenhariaConstruindo Times de Alta Performance - Produtos & Engenharia
Construindo Times de Alta Performance - Produtos & Engenharia
 
Git Merge e Rebase - The goal and differences
Git Merge e Rebase - The goal and differencesGit Merge e Rebase - The goal and differences
Git Merge e Rebase - The goal and differences
 
Dynamic Programming and Reinforcement Learning applied to Tetris Game
Dynamic Programming and Reinforcement Learning applied to Tetris GameDynamic Programming and Reinforcement Learning applied to Tetris Game
Dynamic Programming and Reinforcement Learning applied to Tetris Game
 
Desenvolvimento de Novos Líderes - Paidéia Educação
Desenvolvimento de Novos Líderes - Paidéia EducaçãoDesenvolvimento de Novos Líderes - Paidéia Educação
Desenvolvimento de Novos Líderes - Paidéia Educação
 
Go lang
Go langGo lang
Go lang
 
Supporting Coding and Testing
Supporting Coding and TestingSupporting Coding and Testing
Supporting Coding and Testing
 
Intercon Android 2014 - Google Play In App Billing
Intercon Android 2014 - Google Play In App BillingIntercon Android 2014 - Google Play In App Billing
Intercon Android 2014 - Google Play In App Billing
 
Semana da Computação USP São Carlos 2014 - Carreira Mobile
Semana da Computação USP São Carlos 2014 - Carreira MobileSemana da Computação USP São Carlos 2014 - Carreira Mobile
Semana da Computação USP São Carlos 2014 - Carreira Mobile
 
TDC 2014 - Tudo sobre GCM Push Notifications
TDC 2014 - Tudo sobre GCM Push NotificationsTDC 2014 - Tudo sobre GCM Push Notifications
TDC 2014 - Tudo sobre GCM Push Notifications
 
Mobile Conf 2014 - Sua carreira e o que o desenvolvimento mobile tem a ver co...
Mobile Conf 2014 - Sua carreira e o que o desenvolvimento mobile tem a ver co...Mobile Conf 2014 - Sua carreira e o que o desenvolvimento mobile tem a ver co...
Mobile Conf 2014 - Sua carreira e o que o desenvolvimento mobile tem a ver co...
 
Conexao Java - Sua primeira app Android
Conexao Java - Sua primeira app AndroidConexao Java - Sua primeira app Android
Conexao Java - Sua primeira app Android
 
7 Masters sobre Android
7 Masters sobre Android7 Masters sobre Android
7 Masters sobre Android
 
A história do surgimento da plataforma móvel Android.
A história do surgimento da plataforma móvel Android.A história do surgimento da plataforma móvel Android.
A história do surgimento da plataforma móvel Android.
 
O fantástico mundo de Android
O fantástico mundo de AndroidO fantástico mundo de Android
O fantástico mundo de Android
 

Kürzlich hochgeladen

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Kürzlich hochgeladen (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

TDC2012 Android - Deixando Sua Interface mais Bonita com Shapes

  • 1. Trilha Android – Deixando sua interface mais bonita com SHAPES Suelen Goularte Carvalho Globalcode – Open4education
  • 2. Quem sou eu... @SuelenGC Globalcode – Open4education
  • 3. Objetivos: 1. Entender o que são shapes 2. Saber usar shapes 3. Saber escrever shapes 4. Quick Hands On Globalcode – Open4education
  • 4. App Resource  Arquivos adicionais  Conteúdo estático  Imagens  Definições de layout  Strings  etc... Globalcode – Open4education
  • 5. App Resource Existem muitos tipos de App Resources:  Animation  String  Color State List  Style  Drawable  E muitos outros...  Layout  Menu Globalcode – Open4education
  • 6. App Resource Drawable Resource  Imagem  XML Globalcode – Open4education
  • 7. Drawable Resource Existem muitos tipos de Drawable Resources:  BitmapDrawable  TransitionDrawable  NinePatchDrawable  InsetDrawable  LayerDrawable  ClipDrawable  StateListDrawable  ScaleDrawable  LevelListDrawable  ShapeDrawable Globalcode – Open4education
  • 8. App Resource Drawable Resource Shape Globalcode – Open4education
  • 9. Shape Resource <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android=“http://schemas.android.com/apk/res/android” android:shape="rectangle"> <gradient android:startColor="#FFFF0000" android:endColor=“#80FF00FF" android:angle="45” /> <padding android:left="7dp" android:top="7dp" android:right=“7dp" android:bottom=“8dp" /> <corners android:radius="8dp" /> </shape> Globalcode – Open4education
  • 10. Shape Resource MyProject/ src/ MyActivity.java res/ drawable/ icon.png myshape.xml layout/ main.xml values/ strings.xml ... Globalcode – Open4education
  • 11. Shape Resource pelo Eclipse b Globalcode – Open4education
  • 12. Shape Resource pelo Eclipse b Globalcode – Open4education
  • 13. Mas afinal... O que raios é um SHAPE??? Globalcode – Open4education
  • 14. Objetivos: 1. Entender o que são shapes 2. Saber usar shapes 3. Saber escrever shapes 4. Quick Hands On Globalcode – Open4education
  • 15. <LinearLayout android:layout_height=“fill_parent” android:layout_width=“fill_parent”> … <TextView android:background="@drawable/myshape" android:layout_height="wrap_content“ android:layout_width="wrap_content" /> … </LinearLayout> Globalcode – Open4education
  • 16. Usamos SHAPES para preencher backgrounds Globalcode – Open4education
  • 17. Objetivos: 1. Entender o que são shapes 2. Saber usar shapes 3. Saber escrever shapes 4. Quick Hands On Globalcode – Open4education
  • 18. Shape Retangular <shape xmlns:android=“http://schemas.android.com/apk/res/android” android:shape=“rectangle”> <gradient android:startColor=“@color/Yellow" android:endColor=“@color/White" android:angle="270“ /> <corners android:radius="0dp" /> </shape> Globalcode – Open4education
  • 19. Shape Retangular Radial <shape xmlns:android=“http://schemas.android.com/apk/res/android” android:shape=“rectangle”> <gradient android:type="radial" android:startColor=“@color/Red" android:endColor=“@color/Yellow" android:gradientRadius="300" android:centerX="0.5" android:centerY="0.7” /> </shape> Globalcode – Open4education
  • 20. Shape Linear <shape xmlns:android=“http://schemas.android.com/apk/res/android” android:shape=“line”> <stroke android:width=“3dp" android:color=“@color/Pink" /> </shape> Globalcode – Open4education
  • 21. Shape Ovalado <shape xmlns:android=“http://schemas.android.com/apk/res/android” android:shape=“oval”> <solid android:color=“@color/Black“ /> <stroke android:width="4dp" android:color=“@color/Blue" android:dashWidth="4dp" android:dashGap="2dp" /> <padding android:left="7dp" android:top="7dp" android:right="7dp" android:bottom="7dp" /> </shape> Globalcode – Open4education
  • 22. Shape Anelado <shape xmlns:android=“http://schemas.android.com/apk/res/android” android:shape=“ring” android:innerRadiusRatio="3" android:thicknessRatio="8" android:useLevel="false"> <size android:width="48dip" android:height="48dip" /> <gradient android:type="sweep" android:useLevel="false" android:startColor="#737373" android:endColor="#ffd300" android:centerColor="#737373" android:centerY="0.50“ /> </shape> Globalcode – Open4education
  • 23. Podemos definir...  Curvas (<corners>)  Gradiente (<gradient>)  Padding (<padding>)  Tamanho (<size>)  Cor (<solid>)  Borda (<stroke>) Globalcode – Open4education
  • 24. Objetivos: 1. Entender o que são shapes 2. Saber usar shapes 3. Saber escrever shapes 4. Quick Hands On Globalcode – Open4education
  • 25. Sem shapes Com shapes Globalcode – Open4education
  • 26. shape_button.xml <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <size android:width="100dp" android:height="45dp” /> <corners android:radius="10dp" /> <solid android:color="@color/Violet" /> <stroke android:width="2dp" android:color="@color/White” /> </shape> Globalcode – Open4education
  • 27. shape_fields.xml <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <size android:height="45dp“ /> <corners android:radius="10dp" /> <solid android:color="@color/White" /> <stroke android:width="1dp" android:color="@color/Violet“ /> </shape> Globalcode – Open4education
  • 28. shape_0_border.xml <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color=“@color/White" /> <stroke android:width="0dp"/> </shape> Globalcode – Open4education
  • 29. https://github.com/SuelenGC/TDC2012-Shapes Globalcode – Open4education
  • 30. Outros exemplos... Globalcode – Open4education
  • 31. Bibliografia • Resource http://developer.android.com/guide/topics/resources/index.html • Drawable Resource http://developer.android.com/guide/topics/resources/drawable-resource.html • Shape http://developer.android.com/guide/topics/resources/drawable- resource.html#Shape • Shape Drawable http://developer.android.com/reference/android/graphics/drawable/ShapeDra wable.html • Exemplos de shapes http://escomic.net/217 Globalcode – Open4education
  • 32. Dúvidas? Obrigada! @SuelenGC www.suelengc.com.br suelengcarvalho@gmail.com Globalcode – Open4education