Новинки в
support-library
Ждут своего часа.
Гончаров Степан
Android Developer
Android L
RecyclerView
CardView
Palette
Использование
Android Studio 0.8+, support lib 21.0.0rc1
compile 'com.android.support:cardview-v7:+'
compile 'com.android....
(Не)только для L
v7 || minSdkVersion 'L'
И так сойдет
New Manifest Merger
xmlns:tools="http://schemas.android.com/tools"
...
<uses-sdk tools:node="replace" />
Можно начинать
Recycler View
Layout Manager
Items Animator
Adapter Data set
В чем разница?
ListView <= RecyclerView + LinearLayoutManager
HORISONTAL || VERTICAL
В чем проблема?
Adapter
LinearLayoutManager
DefaultAnimator
…
PROFIT
Cursor Adapter
@Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v = LayoutInflater.fr...
View Holder
public static class ViewHolder extends RecyclerView.ViewHolder {
public TextView text;
public ViewHolder(View ...
Card View
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="...
Palette
6 цветов хватит всем
Vibrant(Normal, Light, Dark)
Muted(Normal, Light, Dark)
Где взять?
BitmapDrawable bitmapDrawable = (BitmapDrawable) getWallpaper();
Palette palette = Palette.generate(bitmapDrawa...
Спасибо за внимание!
Demo проект ищите здесь:
https://github.com/stepango/support_library_21_demo
Новинки в support-library
Upcoming SlideShare
Loading in...5
×

Новинки в support-library

688

Published on

Новинки в support-library

Published in: Mobile
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
688
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Новинки в support-library

  1. 1. Новинки в support-library Ждут своего часа. Гончаров Степан Android Developer
  2. 2. Android L RecyclerView CardView Palette
  3. 3. Использование Android Studio 0.8+, support lib 21.0.0rc1 compile 'com.android.support:cardview-v7:+' compile 'com.android.support:recyclerview-v7:+' compile 'com.android.support:palette-v7:+'
  4. 4. (Не)только для L v7 || minSdkVersion 'L'
  5. 5. И так сойдет New Manifest Merger xmlns:tools="http://schemas.android.com/tools" ... <uses-sdk tools:node="replace" />
  6. 6. Можно начинать Recycler View Layout Manager Items Animator Adapter Data set
  7. 7. В чем разница? ListView <= RecyclerView + LinearLayoutManager HORISONTAL || VERTICAL
  8. 8. В чем проблема? Adapter LinearLayoutManager DefaultAnimator … PROFIT
  9. 9. Cursor Adapter @Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View v = LayoutInflater.from(parent.getContext()).inflate(itemLayout, parent, false); return new ViewHolder(v, textViewId); } @Override public void onBindViewHolder(ViewHolder holder, int position) { if (cursor == null) return; cursor.moveToPosition(position); holder.text.setText(cursor.getString(columnIndex)); holder.itemView.setOnClickListener(this); }
  10. 10. View Holder public static class ViewHolder extends RecyclerView.ViewHolder { public TextView text; public ViewHolder(View itemView, int textViewId) { super(itemView); itemView.setTag(this); text = (TextView) itemView.findViewById(textViewId); } }
  11. 11. Card View <android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" card_view:cardCornerRadius="4dp" card_view:cardBackgroundColor="#ffffff" android:foreground="?android:attr/selectableItemBackground" >
  12. 12. Palette
  13. 13. 6 цветов хватит всем Vibrant(Normal, Light, Dark) Muted(Normal, Light, Dark)
  14. 14. Где взять? BitmapDrawable bitmapDrawable = (BitmapDrawable) getWallpaper(); Palette palette = Palette.generate(bitmapDrawable.getBitmap()); palette.getLightVibrantColor().getRgb(); palette.getDarkMutedColor().getHsl(); palette.getPallete();
  15. 15. Спасибо за внимание! Demo проект ищите здесь: https://github.com/stepango/support_library_21_demo
  1. Gostou de algum slide específico?

    Recortar slides é uma maneira fácil de colecionar informações para acessar mais tarde.

×