TDC2012 Android - Deixando Sua Interface mais Bonita com Shapes
Upcoming SlideShare
Loading in...5
×
 

TDC2012 Android - Deixando Sua Interface mais Bonita com Shapes

on

  • 1,328 views

Minha apresentação no TDC2012 na trilha de Android.

Minha apresentação no TDC2012 na trilha de Android.

Statistics

Views

Total Views
1,328
Views on SlideShare
1,319
Embed Views
9

Actions

Likes
1
Downloads
22
Comments
0

1 Embed 9

http://www.linkedin.com 9

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    TDC2012 Android - Deixando Sua Interface mais Bonita com Shapes TDC2012 Android - Deixando Sua Interface mais Bonita com Shapes Presentation Transcript

    • Trilha Android – Deixando suainterface 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 ResourceDrawable 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 ResourceDrawable 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 parapreencher 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