Skip to content

Commit 1882b2d

Browse files
author
jacob-tabak
committed
Merge branch 'emanuelet-master'
2 parents 72b7a2e + 213c711 commit 1882b2d

File tree

9 files changed

+26
-23
lines changed

9 files changed

+26
-23
lines changed

build.gradle

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:1.1.0'
8+
classpath 'com.android.tools.build:gradle:1.5.0'
99

1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files
@@ -19,10 +19,11 @@ allprojects {
1919
}
2020

2121
ext {
22-
compileSdkVersion = 22
23-
buildToolsVersion = '22.0.1'
22+
compileSdkVersion = 23
23+
buildToolsVersion = '23.0.2'
24+
supportLibsVersion = '23.1.1'
2425
targetSdkVersion = 22
25-
minSdkVersion = 14
26+
minSdkVersion = 11
2627
versionCode = 12
2728
versionName = "0.4.2"
28-
}
29+
}

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.9-all.zip

library/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ android {
1717
}
1818

1919
dependencies {
20-
compile 'com.android.support:recyclerview-v7:22.2.0'
20+
compile 'com.android.support:recyclerview-v7:23.1.1'
2121
}
2222

2323
apply from: 'gradle-maven-push.gradle'

library/src/main/java/com/timehop/stickyheadersrecyclerview/StickyRecyclerHeadersDecoration.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,6 @@ public View getHeaderView(RecyclerView parent, int position) {
154154
*/
155155
public void invalidateHeaders() {
156156
mHeaderProvider.invalidate();
157+
mHeaderRects.clear();
157158
}
158159
}

sample/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
apply plugin: 'com.android.application'
22

3+
34
android {
45
compileSdkVersion rootProject.ext.compileSdkVersion as Integer
56
buildToolsVersion rootProject.ext.buildToolsVersion as String
67

8+
79
defaultConfig {
810
applicationId "com.timehop.stickyheadersrecyclerview.sample"
911
minSdkVersion rootProject.ext.minSdkVersion as Integer
@@ -19,4 +21,5 @@ android {
1921

2022
dependencies {
2123
compile project(':library')
24+
compile "com.android.support:appcompat-v7:${rootProject.supportLibsVersion}"
2225
}

sample/src/main/java/com/timehop/stickyheadersrecyclerview/sample/MainActivity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package com.timehop.stickyheadersrecyclerview.sample;
22

3-
import android.app.Activity;
43
import android.content.pm.ActivityInfo;
54
import android.graphics.Color;
65
import android.os.Bundle;
76
import android.os.Handler;
87
import android.os.Looper;
8+
import android.support.v7.app.AppCompatActivity;
99
import android.support.v7.widget.LinearLayoutManager;
1010
import android.support.v7.widget.RecyclerView;
1111
import android.view.LayoutInflater;
@@ -22,7 +22,7 @@
2222

2323
import java.security.SecureRandom;
2424

25-
public class MainActivity extends Activity {
25+
public class MainActivity extends AppCompatActivity {
2626

2727
@Override
2828
protected void onCreate(Bundle savedInstanceState) {
@@ -76,7 +76,7 @@ public void run() {
7676
@Override
7777
public void onHeaderClick(View header, int position, long headerId) {
7878
Toast.makeText(MainActivity.this, "Header position: " + position + ", id: " + headerId,
79-
Toast.LENGTH_SHORT).show();
79+
Toast.LENGTH_SHORT).show();
8080
}
8181
});
8282
recyclerView.addOnItemTouchListener(touchListener);
Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
<RelativeLayout
2-
xmlns:android="http://schemas.android.com/apk/res/android"
1+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
32
xmlns:tools="http://schemas.android.com/tools"
43
android:layout_width="match_parent"
54
android:layout_height="match_parent"
6-
tools:context=".MainActivity"
7-
android:paddingTop="18dp">
5+
tools:context=".MainActivity">
86

97
<LinearLayout
108
android:id="@+id/buttons_container"
119
android:layout_width="match_parent"
1210
android:layout_height="wrap_content"
13-
android:orientation="horizontal">
11+
android:orientation="horizontal"
12+
android:paddingBottom="18dp"
13+
android:paddingTop="18dp">
1414

1515
<Button
1616
android:id="@+id/button_update"
1717
android:layout_width="0dp"
1818
android:layout_height="wrap_content"
1919
android:layout_weight="1"
20-
android:text="@string/button_update"/>
20+
android:text="@string/button_update" />
2121

2222
<ToggleButton
2323
android:id="@+id/button_is_reverse"
2424
android:layout_width="0dp"
2525
android:layout_height="wrap_content"
2626
android:layout_weight="1"
2727
android:textOff="@string/button_reverse"
28-
android:textOn="@string/button_reverse"/>
28+
android:textOn="@string/button_reverse" />
2929

3030
</LinearLayout>
3131

@@ -34,11 +34,9 @@
3434
android:layout_width="match_parent"
3535
android:layout_height="match_parent"
3636
android:layout_below="@id/buttons_container"
37-
android:layout_margin="18dp"
38-
android:padding="16dp"
3937
android:background="#ffbef0ff"
40-
android:saveEnabled="false"
4138
android:clipToPadding="true"
42-
/>
39+
android:padding="16dp"
40+
android:saveEnabled="false" />
4341

4442
</RelativeLayout>

sample/src/main/res/layout/view_header.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
android:layout_height="wrap_content"
99
android:padding="16dp"
1010
android:background="#001F3F"
11-
android:textSize="32sp"
11+
android:textSize="28sp"
1212
android:textStyle="bold"
1313
android:textColor="@android:color/white"
1414
tools:text="Animals starting with A"

sample/src/main/res/values/styles.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<resources>
22

33
<!-- Base application theme. -->
4-
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
4+
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
55
<!-- Customize your theme here. -->
66
</style>
77

0 commit comments

Comments
 (0)