SlideShare ist ein Scribd-Unternehmen logo
1 von 67
Downloaden Sie, um offline zu lesen
Suzanne Alexandra
Android
Motorola Mobility




                                         UI



MOTOROLA   Stylized M        Motorola Trademark Holdings, LLC.               .
                     . © 2011 Motorola Mobility, Inc. All rights reserved.
@suzalex
          #appsum11kr
developer.motorola.com



             1.0   2009   2   24
01


02


03


04
01




02



03
        ,       ,

04

     Fragment
?

alignParentLeft       alignParentRight
centerHorizontal="true"




                   <RelativeLayout>
layout_alignLeft   layout_alignRight
(   )
Android
Honeycomb
Notification.Builder




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




AlertDialog.Builder
builder.setSmallIcon(R.drawable.icon)
  .setContentTitle(title)
  .setContentText(text)
  .setContentIntent(pintent) // Pending Intent
  .setLargeIcon(myBitmap)
;
setLargeIcon()                        setSmallIcon()

          setContentTitle()
                              setContentText()
-




RemoteViews layout = new RemoteViews(
       getPackageName(), R.layout.notification);

layout.setTextViewText(R.id.notification_title,
       getString(R.string.app_name));

layout.setOnClickPendingIntent(R.id.notification_button,
   getDialogPendingIntent("Tapped") );

builder.setContent(layout);
private static boolean isHoneycomb =
      android.os.Build.VERSION.SDK_INT > 10;



if (!isHoneycomb)
      //       Activity Intent
else
     //       Activity Intent
01


02




03


04
.

     Brain Rules
Dr. John Medina
Android
?
                      ?
                  ?

    ?
–




32 MB
324 KB



23 MB
728 KB
.

.
BitmapFactory.Options options = new
      BitmapFactory.Options();

   options.inJustDecodeBounds = false;
   options.inSampleSize = 4;
   options.inScaled = true;
   options.inTargetDensity = screenDensity;

   Bitmap bitmap =
      BitmapFactory.decodeResource(
            getResources(),
            R.drawable.clover, options);
public View getView( int position,
       View convertView, ViewGroup parent) {

    ImageView i = new ImageView(mContext);
    i.setImageResource(mImageIds[position]);

    i.setLayoutParams(new Gallery.LayoutParams(
        300, 200));

    i.setScaleType(ImageView.ScaleType.FIT_XY);
    i.setBackgroundResource(
        mGalleryItemBackground);

    return i;
}
01



02



03
     ,   ,


04
Honeycomb




                           Theme.Holo




        Theme.Holo.Light
<application android:icon="@drawable/icon"
   android:label="@string/app_name"
   android:hardwareAccelerated="true" >




                     Honeycomb
Android




<uses-sdk android:minSdkVersion="8"
        android:targetSdkVersion="11"   />
Android




          <style … parent=
            "@android:style/Theme">

          <style … parent=
            "@android:style/Theme.Holo">
01



02



03



04

     Fragment
XOOM   ..
<item android:showAsAction="ifRoom" … >


               onCreateOptionsMenu()




android:actionLayout               onOptionsItemSelected()
android:actionViewClass
1     – API    11


    <uses-sdk android:minSdkVersion="8"
              android:targetSdkVersion="11" />
2      –




    <item android:id="@+id/favorite"
          android:title="@string/favorite"
          android:icon="@drawable/ic_menu_star"
          android:showAsAction="ifRoom" />
3        -




    @Override
    public boolean onOptionsItemSelected(MenuItem item) {

        switch (item.getItemId()) {
        case R.id.favorite:
            //
        return true;
    …
}
<style name="MyTheme"
       parent="android:style/Theme.Holo" >
   <item name="android:actionBarStyle">
              @style/ActionBar</item>
</style>


<style name="ActionBar"
       parent="android:style/Widget.Holo.ActionBar">
   <item name="android:background">
               @drawable/my_background</item>
</style>
AlertDialog.Builder

XML


DialogFragment
Honeycomb       Honeycomb




private static boolean isHoneycomb =
      android.os.Build.VERSION.SDK_INT > 10;


if (isHoneycomb) {
       //
} else
     //
}
Fragment
Fragment
Fragment
   Fragment
Fragment
Fragment
   Activity   Fragment




Fragment gridFrag =
      getFragmentManager().
      findFragmentById(R.id.photogrid);

Fragment photoFrag =
      getFragmentManager().
      findFragmentById(R.id.the_frag);
Fragment




private boolean photoInline = false;

photoInline = (photoFrag != null &&
        getResources().getConfiguration().orientation
        == Configuration.ORIENTATION_LANDSCAPE);

if (photoInline) {
    //
} else if ( photoFrag != null) {
    gridFrag.getView().setVisibility(View.GONE);
}
Fragment
Fragment
                – Fragment
                   (1 )


<set>
  <objectAnimator
       xmlns:android=
       http://schemas.android.com/apk/res/android

    android:propertyName="x"
    android:valueType="floatType"
    android:valueFrom="-1280"
    android:valueTo="0"
    android:duration="500"   />
</set>
Fragment
                – Fragment
                   (2 )



FragmentTransaction ft =
       getFragmentManager().beginTransaction();

ft.setCustomAnimations( R.anim.slide_in_left,
       R.anim.slide_out_right );

DetailsFragment newFrag = DetailsFragment.newInstance();

ft.replace(R.id.details_fragment_container, newFrag,
       "detailFragment");
ft.commit();
ACTION_DRAG_STARTED




ACTION_DRAG_ENTERED
ACTION_DROP
ACTION_DRAG_ENDED
Fragment
startDrag()


                                       -         ?
                       – OnLongClickListener()
  ClipData      DragShadowBuilder



public boolean onLongClick(View v) {
 ClipData data = ClipData.newPlainText("foo","bar");
 DragShadowBuilder shadowBuilder = new DragShadowBuilder(v);
 v.startDrag(data, shadowBuilder, v, 0);
 return true;
}
onDrag()



              (OnDragListener    )
    onDrag


class BoxDragListener implements OnDragListener {

    public boolean onDrag(View self, DragEvent event) {
      if (event.getAction() ==
           DragEvent.ACTION_DRAG_STARTED) {
           //
      }
          //
}
?
@suzalex | @motodev
Motorola Mobility Inc.                                                                                  .
Copyright © 2010-2011, Motorola, Inc. All rights reserved(                                       ).
                            2                                                                                       .
                                             ,                                                                  .
2                                               ,                                                                       /                               .

                                                                                                 Motorola, Inc.                                     .

                                                  "               "                                         (
                                    )              .                                                                                ,       ,   ,           ,
                             (                                ,       ,                  ,                                              )
          ,                             (                                 )                                                                                     ,



                                                                                             .
Apache 2.0
Copyright © 2010, Android Open Source Project. All rights reserved(                                         ).
Apache                               ,   2.0("                ");                                                           .
  http://www.apache.org/licenses/LICENSE-2.0                                         .
                                                                                                                                                                    "
          "             .                                                                                       .

Creative Commons 3.0
                              Google                                          (http://code.google.com/policies.html) Creative Commons 3.0
              (http://creativecommons.org/licenses/by/3.0/)                                   .

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (7)

Discover the Opportunity with Android
Discover the Opportunity with AndroidDiscover the Opportunity with Android
Discover the Opportunity with Android
 
Using the Motorola MOTODEV i1 SDK add-on
Using the Motorola MOTODEV i1 SDK add-onUsing the Motorola MOTODEV i1 SDK add-on
Using the Motorola MOTODEV i1 SDK add-on
 
Designing Apps for Motorla Xoom Tablet
Designing Apps for Motorla Xoom TabletDesigning Apps for Motorla Xoom Tablet
Designing Apps for Motorla Xoom Tablet
 
Beyond English - Make Your Android App a Global Success
Beyond English - Make Your Android App a Global SuccessBeyond English - Make Your Android App a Global Success
Beyond English - Make Your Android App a Global Success
 
Migrating JavaME Apps to Android
Migrating JavaME Apps to AndroidMigrating JavaME Apps to Android
Migrating JavaME Apps to Android
 
HTML5 vs Native Android: Smart Enterprises for the Future
HTML5 vs Native Android: Smart Enterprises for the FutureHTML5 vs Native Android: Smart Enterprises for the Future
HTML5 vs Native Android: Smart Enterprises for the Future
 
Getting Your App Discovered: Android Market & Beyond
Getting Your App Discovered: Android Market & BeyondGetting Your App Discovered: Android Market & Beyond
Getting Your App Discovered: Android Market & Beyond
 

Ähnlich wie Top Tips for Android UIs

Workshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideWorkshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideVisual Engineering
 
Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2Filippo Matteo Riggio
 
Building Modern Apps using Android Architecture Components
Building Modern Apps using Android Architecture ComponentsBuilding Modern Apps using Android Architecture Components
Building Modern Apps using Android Architecture ComponentsHassan Abid
 
Android & Kotlin - The code awakens #01
Android & Kotlin - The code awakens #01Android & Kotlin - The code awakens #01
Android & Kotlin - The code awakens #01Omar Miatello
 
Developer Student Clubs NUK - Flutter for Beginners
Developer Student Clubs NUK - Flutter for BeginnersDeveloper Student Clubs NUK - Flutter for Beginners
Developer Student Clubs NUK - Flutter for BeginnersJiaxuan Lin
 
Android por onde começar? Mini Curso Erbase 2015
Android por onde começar? Mini Curso Erbase 2015 Android por onde começar? Mini Curso Erbase 2015
Android por onde começar? Mini Curso Erbase 2015 Mario Jorge Pereira
 
Capture image on eye blink
Capture image on eye blinkCapture image on eye blink
Capture image on eye blinkInnovationM
 
Android architecture
Android architecture Android architecture
Android architecture Trong-An Bui
 
From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)Jose Manuel Pereira Garcia
 
PhoneGap, Backbone & Javascript
PhoneGap, Backbone & JavascriptPhoneGap, Backbone & Javascript
PhoneGap, Backbone & Javascriptnatematias
 
Slightly Advanced Android Wear ;)
Slightly Advanced Android Wear ;)Slightly Advanced Android Wear ;)
Slightly Advanced Android Wear ;)Alfredo Morresi
 
Ionic tabs template explained
Ionic tabs template explainedIonic tabs template explained
Ionic tabs template explainedRamesh BN
 
Responsive mobile design in practice
Responsive mobile design in practiceResponsive mobile design in practice
Responsive mobile design in practiceKirill Grouchnikov
 
Mobile HTML, CSS, and JavaScript
Mobile HTML, CSS, and JavaScriptMobile HTML, CSS, and JavaScript
Mobile HTML, CSS, and JavaScriptfranksvalli
 
What's New in Android
What's New in AndroidWhat's New in Android
What's New in AndroidRobert Cooper
 
Mobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhoneMobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhoneMohammad Shaker
 
Vaadin 7 CN
Vaadin 7 CNVaadin 7 CN
Vaadin 7 CNjojule
 
There's more than web
There's more than webThere's more than web
There's more than webMatt Evans
 
Sharper Better Faster Dagger ‡ - Droidcon SF
Sharper Better Faster Dagger ‡ - Droidcon SFSharper Better Faster Dagger ‡ - Droidcon SF
Sharper Better Faster Dagger ‡ - Droidcon SFPierre-Yves Ricau
 

Ähnlich wie Top Tips for Android UIs (20)

Workshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideWorkshop 26: React Native - The Native Side
Workshop 26: React Native - The Native Side
 
Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2
 
Building Modern Apps using Android Architecture Components
Building Modern Apps using Android Architecture ComponentsBuilding Modern Apps using Android Architecture Components
Building Modern Apps using Android Architecture Components
 
Android & Kotlin - The code awakens #01
Android & Kotlin - The code awakens #01Android & Kotlin - The code awakens #01
Android & Kotlin - The code awakens #01
 
Developer Student Clubs NUK - Flutter for Beginners
Developer Student Clubs NUK - Flutter for BeginnersDeveloper Student Clubs NUK - Flutter for Beginners
Developer Student Clubs NUK - Flutter for Beginners
 
Android por onde começar? Mini Curso Erbase 2015
Android por onde começar? Mini Curso Erbase 2015 Android por onde começar? Mini Curso Erbase 2015
Android por onde começar? Mini Curso Erbase 2015
 
Android 3
Android 3Android 3
Android 3
 
Capture image on eye blink
Capture image on eye blinkCapture image on eye blink
Capture image on eye blink
 
Android architecture
Android architecture Android architecture
Android architecture
 
From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)
 
PhoneGap, Backbone & Javascript
PhoneGap, Backbone & JavascriptPhoneGap, Backbone & Javascript
PhoneGap, Backbone & Javascript
 
Slightly Advanced Android Wear ;)
Slightly Advanced Android Wear ;)Slightly Advanced Android Wear ;)
Slightly Advanced Android Wear ;)
 
Ionic tabs template explained
Ionic tabs template explainedIonic tabs template explained
Ionic tabs template explained
 
Responsive mobile design in practice
Responsive mobile design in practiceResponsive mobile design in practice
Responsive mobile design in practice
 
Mobile HTML, CSS, and JavaScript
Mobile HTML, CSS, and JavaScriptMobile HTML, CSS, and JavaScript
Mobile HTML, CSS, and JavaScript
 
What's New in Android
What's New in AndroidWhat's New in Android
What's New in Android
 
Mobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhoneMobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhone
 
Vaadin 7 CN
Vaadin 7 CNVaadin 7 CN
Vaadin 7 CN
 
There's more than web
There's more than webThere's more than web
There's more than web
 
Sharper Better Faster Dagger ‡ - Droidcon SF
Sharper Better Faster Dagger ‡ - Droidcon SFSharper Better Faster Dagger ‡ - Droidcon SF
Sharper Better Faster Dagger ‡ - Droidcon SF
 

Mehr von Motorola Mobility - MOTODEV

Gráficos cada vez más rápidos. Cómo usar NDK y RenderScript
Gráficos cada vez más rápidos. Cómo usar NDK y RenderScript Gráficos cada vez más rápidos. Cómo usar NDK y RenderScript
Gráficos cada vez más rápidos. Cómo usar NDK y RenderScript Motorola Mobility - MOTODEV
 
Consejos principales para Android UI Cómo alcanzar la magia en los tablets
Consejos principales para Android UI Cómo alcanzar la magia en los tabletsConsejos principales para Android UI Cómo alcanzar la magia en los tablets
Consejos principales para Android UI Cómo alcanzar la magia en los tabletsMotorola Mobility - MOTODEV
 
Cómo agregar calidad a sus aplicaciones mediante pruebas
Cómo agregar calidad a sus aplicaciones mediante pruebas Cómo agregar calidad a sus aplicaciones mediante pruebas
Cómo agregar calidad a sus aplicaciones mediante pruebas Motorola Mobility - MOTODEV
 
Cómo aprovechar Webtop Cómo HTML5 mejora la experiencia del usuario
Cómo aprovechar Webtop Cómo HTML5 mejora la experiencia del usuarioCómo aprovechar Webtop Cómo HTML5 mejora la experiencia del usuario
Cómo aprovechar Webtop Cómo HTML5 mejora la experiencia del usuarioMotorola Mobility - MOTODEV
 
Gráficos cada vez mais rápidos utilização de NDK e Renderscript
Gráficos cada vez mais rápidos utilização de NDK e RenderscriptGráficos cada vez mais rápidos utilização de NDK e Renderscript
Gráficos cada vez mais rápidos utilização de NDK e RenderscriptMotorola Mobility - MOTODEV
 
Como integrar qualidade aos seus aplicativos através de testes
Como integrar qualidade aos seus aplicativos através de testesComo integrar qualidade aos seus aplicativos através de testes
Como integrar qualidade aos seus aplicativos através de testesMotorola Mobility - MOTODEV
 
Tirando vantagem do webtop como o html5 aprimora a experiência do usuário de ...
Tirando vantagem do webtop como o html5 aprimora a experiência do usuário de ...Tirando vantagem do webtop como o html5 aprimora a experiência do usuário de ...
Tirando vantagem do webtop como o html5 aprimora a experiência do usuário de ...Motorola Mobility - MOTODEV
 
Desenvolvimento de aplicativos para o tablet Motorola XOOM
Desenvolvimento de aplicativos para o tablet Motorola XOOMDesenvolvimento de aplicativos para o tablet Motorola XOOM
Desenvolvimento de aplicativos para o tablet Motorola XOOMMotorola Mobility - MOTODEV
 

Mehr von Motorola Mobility - MOTODEV (20)

The Enterprise Dilemma: Native vs. Web
The Enterprise Dilemma: Native vs. WebThe Enterprise Dilemma: Native vs. Web
The Enterprise Dilemma: Native vs. Web
 
Kill the Laptop!
Kill the Laptop!Kill the Laptop!
Kill the Laptop!
 
MOTODEV App Validator
MOTODEV App ValidatorMOTODEV App Validator
MOTODEV App Validator
 
Beautifully Usable, Multiple Screens Too
Beautifully Usable, Multiple Screens TooBeautifully Usable, Multiple Screens Too
Beautifully Usable, Multiple Screens Too
 
Introducing Fragments
Introducing FragmentsIntroducing Fragments
Introducing Fragments
 
Taking Advantage of Webtop
Taking Advantage of WebtopTaking Advantage of Webtop
Taking Advantage of Webtop
 
Building Quality Into Your Apps Through Testing
Building Quality Into Your Apps Through TestingBuilding Quality Into Your Apps Through Testing
Building Quality Into Your Apps Through Testing
 
Diseñando aplicaciones para el Motorola XOOM
Diseñando aplicaciones para el Motorola XOOM Diseñando aplicaciones para el Motorola XOOM
Diseñando aplicaciones para el Motorola XOOM
 
Presentación de los fragmentos
Presentación de los fragmentos Presentación de los fragmentos
Presentación de los fragmentos
 
Gráficos cada vez más rápidos. Cómo usar NDK y RenderScript
Gráficos cada vez más rápidos. Cómo usar NDK y RenderScript Gráficos cada vez más rápidos. Cómo usar NDK y RenderScript
Gráficos cada vez más rápidos. Cómo usar NDK y RenderScript
 
Consejos principales para Android UI Cómo alcanzar la magia en los tablets
Consejos principales para Android UI Cómo alcanzar la magia en los tabletsConsejos principales para Android UI Cómo alcanzar la magia en los tablets
Consejos principales para Android UI Cómo alcanzar la magia en los tablets
 
Cómo agregar calidad a sus aplicaciones mediante pruebas
Cómo agregar calidad a sus aplicaciones mediante pruebas Cómo agregar calidad a sus aplicaciones mediante pruebas
Cómo agregar calidad a sus aplicaciones mediante pruebas
 
Cómo aprovechar Webtop Cómo HTML5 mejora la experiencia del usuario
Cómo aprovechar Webtop Cómo HTML5 mejora la experiencia del usuarioCómo aprovechar Webtop Cómo HTML5 mejora la experiencia del usuario
Cómo aprovechar Webtop Cómo HTML5 mejora la experiencia del usuario
 
Principais dicas para UIs do Android
Principais dicas para UIs do AndroidPrincipais dicas para UIs do Android
Principais dicas para UIs do Android
 
Gráficos cada vez mais rápidos utilização de NDK e Renderscript
Gráficos cada vez mais rápidos utilização de NDK e RenderscriptGráficos cada vez mais rápidos utilização de NDK e Renderscript
Gráficos cada vez mais rápidos utilização de NDK e Renderscript
 
Como integrar qualidade aos seus aplicativos através de testes
Como integrar qualidade aos seus aplicativos através de testesComo integrar qualidade aos seus aplicativos através de testes
Como integrar qualidade aos seus aplicativos através de testes
 
Tirando vantagem do webtop como o html5 aprimora a experiência do usuário de ...
Tirando vantagem do webtop como o html5 aprimora a experiência do usuário de ...Tirando vantagem do webtop como o html5 aprimora a experiência do usuário de ...
Tirando vantagem do webtop como o html5 aprimora a experiência do usuário de ...
 
Introdução a fragmentos
Introdução a fragmentosIntrodução a fragmentos
Introdução a fragmentos
 
Desenvolvimento de aplicativos para o tablet Motorola XOOM
Desenvolvimento de aplicativos para o tablet Motorola XOOMDesenvolvimento de aplicativos para o tablet Motorola XOOM
Desenvolvimento de aplicativos para o tablet Motorola XOOM
 
Using the NDK and Renderscript
Using the NDK and RenderscriptUsing the NDK and Renderscript
Using the NDK and Renderscript
 

Kürzlich hochgeladen

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
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 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
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
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
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
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
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
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
 
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
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 

Kürzlich hochgeladen (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
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 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...
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
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
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
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
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
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
 
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.
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 

Top Tips for Android UIs

  • 1. Suzanne Alexandra Android Motorola Mobility UI MOTOROLA Stylized M Motorola Trademark Holdings, LLC. . . © 2011 Motorola Mobility, Inc. All rights reserved.
  • 2. @suzalex #appsum11kr developer.motorola.com 1.0 2009 2 24
  • 3.
  • 5. 01 02 03 , , 04 Fragment
  • 6.
  • 7.
  • 8.
  • 9. ? alignParentLeft alignParentRight
  • 10.
  • 11. centerHorizontal="true" <RelativeLayout> layout_alignLeft layout_alignRight
  • 12.
  • 13.
  • 14. ( )
  • 16.
  • 18. Notification.Builder Notification.Builder builder = new Notification.Builder( this ); AlertDialog.Builder
  • 19. builder.setSmallIcon(R.drawable.icon) .setContentTitle(title) .setContentText(text) .setContentIntent(pintent) // Pending Intent .setLargeIcon(myBitmap) ;
  • 20. setLargeIcon() setSmallIcon() setContentTitle() setContentText()
  • 21. - RemoteViews layout = new RemoteViews( getPackageName(), R.layout.notification); layout.setTextViewText(R.id.notification_title, getString(R.string.app_name)); layout.setOnClickPendingIntent(R.id.notification_button, getDialogPendingIntent("Tapped") ); builder.setContent(layout);
  • 22. private static boolean isHoneycomb = android.os.Build.VERSION.SDK_INT > 10; if (!isHoneycomb) // Activity Intent else // Activity Intent
  • 24. . Brain Rules Dr. John Medina
  • 25.
  • 26.
  • 27. Android ? ? ? ?
  • 28. – 32 MB 324 KB 23 MB 728 KB
  • 29. . .
  • 30. BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = false; options.inSampleSize = 4; options.inScaled = true; options.inTargetDensity = screenDensity; Bitmap bitmap = BitmapFactory.decodeResource( getResources(), R.drawable.clover, options);
  • 31.
  • 32.
  • 33. public View getView( int position, View convertView, ViewGroup parent) { ImageView i = new ImageView(mContext); i.setImageResource(mImageIds[position]); i.setLayoutParams(new Gallery.LayoutParams( 300, 200)); i.setScaleType(ImageView.ScaleType.FIT_XY); i.setBackgroundResource( mGalleryItemBackground); return i; }
  • 34. 01 02 03 , , 04
  • 35.
  • 36. Honeycomb Theme.Holo Theme.Holo.Light
  • 37. <application android:icon="@drawable/icon" android:label="@string/app_name" android:hardwareAccelerated="true" > Honeycomb
  • 38. Android <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="11" />
  • 39. Android <style … parent= "@android:style/Theme"> <style … parent= "@android:style/Theme.Holo">
  • 40. 01 02 03 04 Fragment
  • 41.
  • 42. XOOM ..
  • 43. <item android:showAsAction="ifRoom" … > onCreateOptionsMenu() android:actionLayout onOptionsItemSelected() android:actionViewClass
  • 44. 1 – API 11 <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="11" />
  • 45. 2 – <item android:id="@+id/favorite" android:title="@string/favorite" android:icon="@drawable/ic_menu_star" android:showAsAction="ifRoom" />
  • 46. 3 - @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.favorite: // return true; … }
  • 47. <style name="MyTheme" parent="android:style/Theme.Holo" > <item name="android:actionBarStyle"> @style/ActionBar</item> </style> <style name="ActionBar" parent="android:style/Widget.Holo.ActionBar"> <item name="android:background"> @drawable/my_background</item> </style>
  • 49. Honeycomb Honeycomb private static boolean isHoneycomb = android.os.Build.VERSION.SDK_INT > 10; if (isHoneycomb) { // } else // }
  • 52. Fragment Fragment
  • 54. Fragment Activity Fragment Fragment gridFrag = getFragmentManager(). findFragmentById(R.id.photogrid); Fragment photoFrag = getFragmentManager(). findFragmentById(R.id.the_frag);
  • 55. Fragment private boolean photoInline = false; photoInline = (photoFrag != null && getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE); if (photoInline) { // } else if ( photoFrag != null) { gridFrag.getView().setVisibility(View.GONE); }
  • 57. Fragment – Fragment (1 ) <set> <objectAnimator xmlns:android= http://schemas.android.com/apk/res/android android:propertyName="x" android:valueType="floatType" android:valueFrom="-1280" android:valueTo="0" android:duration="500" /> </set>
  • 58. Fragment – Fragment (2 ) FragmentTransaction ft = getFragmentManager().beginTransaction(); ft.setCustomAnimations( R.anim.slide_in_left, R.anim.slide_out_right ); DetailsFragment newFrag = DetailsFragment.newInstance(); ft.replace(R.id.details_fragment_container, newFrag, "detailFragment"); ft.commit();
  • 59.
  • 63. startDrag() - ? – OnLongClickListener() ClipData DragShadowBuilder public boolean onLongClick(View v) { ClipData data = ClipData.newPlainText("foo","bar"); DragShadowBuilder shadowBuilder = new DragShadowBuilder(v); v.startDrag(data, shadowBuilder, v, 0); return true; }
  • 64. onDrag() (OnDragListener ) onDrag class BoxDragListener implements OnDragListener { public boolean onDrag(View self, DragEvent event) { if (event.getAction() == DragEvent.ACTION_DRAG_STARTED) { // } // }
  • 66.
  • 67. Motorola Mobility Inc. . Copyright © 2010-2011, Motorola, Inc. All rights reserved( ). 2 . , . 2 , / . Motorola, Inc. . " " ( ) . , , , , ( , , , ) , ( ) , . Apache 2.0 Copyright © 2010, Android Open Source Project. All rights reserved( ). Apache , 2.0(" "); . http://www.apache.org/licenses/LICENSE-2.0 . " " . . Creative Commons 3.0 Google (http://code.google.com/policies.html) Creative Commons 3.0 (http://creativecommons.org/licenses/by/3.0/) .