Infinum Android talks 2013-11-28 - GridView

403 views
300 views

Published on

One of the presentations from Android talks lectures, done by employees of Infinum Ltd.

GridView
Short overview of what can be done by using GridView component, as well as when and for what it should be used. (by Mirko Jurić Kavelj)

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

  • Be the first to like this

No Downloads
Views
Total views
403
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Infinum Android talks 2013-11-28 - GridView

  1. 1. GridView i CAB
  2. 2. Što i kako? ● Poopćenje ListView-a – Slaže kolekciju itema u tablicu (za 1 stupac dobijemo ListView) ● Kao i ListView – Implementira – Postavi se adapter se adapter nad GridViewom ● Omogućava bolju iskoristivost ekrana kod tableta ● Varijabilan broj stupaca
  3. 3. Bitni atributi ● android:numColumns="auto_fit" ● android:columnWidth="150dp" ● android:verticalSpacing="15dp" ● android:horizontalSpacing="10dp" ● android:smoothScrollbar="true" ● android:stretchMode="spacingWidth" ● android:choiceMode="multipleChoiceModal"
  4. 4. CAB Omogućava izvršavanje iste akcije nad više elemenata odjednom ● ● Aktivira se dugim klikom na item ChoiceMode treba biti postavljen na MultipleChoiceModal (programatski ili u xml-u) ● ● gridView.setMultiChoiceModeListener() Potrebno implementirati AbsListView.MultiChoiceModeListener() ● ● Dobar primjer: Gallery
  5. 5. Materijali i reference GridView ● – http://developer.android.com/guide/topics/ui/layout/gridview.html – http://developer.android.com/reference/android/widget/GridView.html/ – http://www.technotalkative.com/android-gridview-1001-attributes-to-keepin-mind/ ActionBar ● – http://developer.android.com/guide/topics/ui/actionbar.html – http://jgilfelt.github.io/android-actionbarstylegenerator/ Menus ● – http://developer.android.com/guide/topics/ui/menus.html#CAB

×