Skip to content

Commit 6f964d1

Browse files
Merge pull request #8 from mutualmobile/development
Development
2 parents f7c475c + 99f5fca commit 6f964d1

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Sample app APK - https://github.com/mutualmobile/CardStackUI/releases
2626
```
2727
dependencies {
2828
...
29-
compile 'com.mutualmobile.android:cardstack:0.1'
29+
compile 'com.mutualmobile.android:cardstack:0.2'
3030
}
3131
```
3232

build.gradle

Lines changed: 1 addition & 1 deletion
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:2.0.0-alpha7'
8+
classpath 'com.android.tools.build:gradle:2.0.0-beta4'
99
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
1010
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
1111

cardstack/build.gradle

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apply plugin: 'com.jfrog.bintray'
55
def siteUrl = 'https://github.com/mutualmobile/CardStackUI'
66
def gitUrl = 'https://github.com/mutualmobile/CardStackUI.git'
77
group = "com.mutualmobile.android"
8-
version = "0.1"
8+
version = "0.2"
99

1010
android {
1111
compileSdkVersion 23
@@ -14,7 +14,7 @@ android {
1414
defaultConfig {
1515
minSdkVersion 14
1616
targetSdkVersion 23
17-
versionCode 1
17+
versionCode 2
1818
versionName version
1919
}
2020
buildTypes {
@@ -74,7 +74,7 @@ artifacts {
7474
archives sourcesJar
7575
}
7676

77-
/* Fails in CI, un-comment only to deploy new binaries to Bintray
77+
// Fails in CI, un-comment only to deploy new binaries to Bintray
7878
Properties properties = new Properties()
7979
properties.load(project.rootProject.file('local.properties').newDataInputStream())
8080

@@ -95,5 +95,4 @@ bintray {
9595
publicDownloadNumbers = true
9696
}
9797
}
98-
apply plugin: 'maven'
99-
*/
98+
apply plugin: 'maven'

cardstack/src/main/java/com/mutualmobile/cardstack/CardStackLayout.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,28 @@ public CardStackLayout(Context context, AttributeSet attrs) {
4343
}
4444

4545
public CardStackLayout(Context context, AttributeSet attrs, int defStyleAttr) {
46-
this(context, attrs, defStyleAttr, 0);
46+
super(context, attrs, defStyleAttr);
47+
handleArgs(context, attrs, defStyleAttr, 0);
4748
}
4849

4950
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
5051
public CardStackLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
5152
super(context, attrs, defStyleAttr, defStyleRes);
53+
handleArgs(context, attrs, defStyleAttr, defStyleRes);
54+
}
55+
56+
private void handleArgs(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
5257
resetDefaults();
58+
5359
final TypedArray a = context.getTheme().obtainStyledAttributes(
5460
attrs, R.styleable.CardStackLayout, defStyleAttr, defStyleRes);
5561
mParallaxEnabled = a.getBoolean(R.styleable.CardStackLayout_parallax_enabled, PARALLAX_ENABLED_DEFAULT);
5662
mShowInitAnimation = a.getBoolean(R.styleable.CardStackLayout_showInitAnimation, SHOW_INIT_ANIMATION_DEFAULT);
5763
mParallaxScale = a.getInteger(R.styleable.CardStackLayout_parallax_scale, getResources().getInteger(R.integer.parallax_scale_default));
5864
mCardGap = a.getDimension(R.styleable.CardStackLayout_card_gap, getResources().getDimension(R.dimen.card_gap));
5965
mCardGapBottom = a.getDimension(R.styleable.CardStackLayout_card_gap_bottom, getResources().getDimension(R.dimen.card_gap_bottom));
60-
a.recycle();
6166

67+
a.recycle();
6268
}
6369

6470
public CardStackAdapter getAdapter() {

0 commit comments

Comments
 (0)