Upgrade to Pro — share decks privately, control downloads, hide ads and more …

GDG - Android Support Design Library

GDG - Android Support Design Library

Android Support Design Library

Avatar for Miller Barrera

Miller Barrera

July 22, 2015

Other Decks in Programming

Transcript

  1. En el inicio de Android, no existían guidelines, de esta

    forma, las grandes aplicaciones dictaban las normas.
  2. Sin embargo, Google se dio cuenta de que no podía

    seguir dependiendo de soluciones de terceros.
  3. De ahí surgió la oportunidad para que Google desarrollada una

    librería compatible con sus versiones de APIs mas antiguas de Android.
  4. <android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width= "match_parent" android:layout_height= "wrap_content" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" > <android.support.v7.widget.Toolbar android:id="@+id/toolbar"

    android:layout_width= "match_parent" android:layout_height= "?attr/actionBarSize" android:background= "?attr/colorPrimary" app:popupTheme= "@style/ThemeOverlay.AppCompat.Light" app:layout_scrollFlags= "scroll|enterAlways" /> </android.support.design.widget.AppBarLayout> ../layout/your_main_layout.xml <android.support.design.widget.CoordinatorLayout> ... </android.support.design.widget.CoordinatorLayout>
  5. CoordinatorLayout rootLayout = (CoordinatorLayout) findViewById(R.id. rootLayout); Snackbar.make( rootLayout, "Hello. I

    am Snackbar!" , Snackbar.LENGTH_SHORT) .setAction( "Undo", new View.OnClickListener() { @Override public void onClick(View v) { // Perform anything for the action selected } }) .show() ; } .../src/MainActivity.java