SlideShare a Scribd company logo
1 of 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

More Related Content

Similar to Android Interface Beautification with 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 MarketTony Hillerson
 
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
 
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
 

Similar to Android Interface Beautification with 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
 

More from 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
 

More from 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
 

Recently uploaded

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 

Recently uploaded (20)

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 

Android Interface Beautification with 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