Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxr1998 committed Mar 1, 2016
2 parents 0803a67 + b422511 commit dcac485
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
material-intro
=======================

[![Android Arsenal][23]][24]
[![jitpack.io][18]][4]
[![Build Status][19]][20]
[![Apache License 2.0][21]][22]
Expand Down Expand Up @@ -191,3 +192,5 @@ License
[20]: https://travis-ci.org/HeinrichReimer/material-intro
[21]: https://img.shields.io/github/license/HeinrichReimer/material-intro.svg
[22]: https://www.apache.org/licenses/LICENSE-2.0.html
[23]: https://img.shields.io/badge/Android%20Arsenal-material--intro-green.svg?style=true
[24]: https://android-arsenal.com/details/1/3206
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':library')
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:support-v4:23.2.0'
}
2 changes: 1 addition & 1 deletion library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:appcompat-v7:23.2.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ private class PagerAdapterWrapper extends PagerAdapter{

private PagerAdapterWrapper(PagerAdapter adapter) {
this.adapter = adapter;
adapter.registerDataSetObserver(new DataSetObserver() {
@Override
public void onChanged() {
notifyDataSetChanged();
}

@Override
public void onInvalidated() {
notifyDataSetChanged();
}
});
}

public PagerAdapter getAdapter() {
Expand Down Expand Up @@ -186,11 +197,6 @@ public int getItemPosition(Object object) {
return POSITION_NONE;
}

@Override
public void notifyDataSetChanged() {
adapter.notifyDataSetChanged();
}

@Override
public void registerDataSetObserver(DataSetObserver observer) {
adapter.registerDataSetObserver(observer);
Expand Down
3 changes: 2 additions & 1 deletion library/src/main/res/layout/fragment_simple_slide.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical"
android:padding="@dimen/mi_baseline">
android:padding="@dimen/mi_baseline"
android:clipToPadding="false">

<TextView
android:id="@id/mi_title"
Expand Down

0 comments on commit dcac485

Please sign in to comment.