diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/build.gradle b/build.gradle old mode 100644 new mode 100755 index dd1baf4..6109c88 --- a/build.gradle +++ b/build.gradle @@ -1,15 +1,13 @@ buildscript { - repositories { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:0.6.+' + classpath 'com.android.tools.build:gradle:1.1.0' } } - allprojects { version = VERSION_NAME group = GROUP @@ -18,3 +16,5 @@ allprojects { mavenCentral() } } + + diff --git a/gradle.properties b/gradle.properties old mode 100644 new mode 100755 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar old mode 100644 new mode 100755 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties old mode 100644 new mode 100755 index 267440e..ba229bf --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Dec 12 22:57:22 CET 2013 +#Tue Dec 09 17:27:10 CET 2014 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/gradlew.bat b/gradlew.bat old mode 100644 new mode 100755 diff --git a/library/AndroidManifest.xml b/library/AndroidManifest.xml old mode 100644 new mode 100755 diff --git a/library/build.gradle b/library/build.gradle old mode 100644 new mode 100755 index 7379a89..fe76416 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,12 +1,12 @@ -apply plugin: 'android-library' +apply plugin: 'com.android.library' dependencies { - compile 'com.android.support:support-v4:19.0.0' + compile 'com.android.support:support-v4:21.0.3' } android { compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION) - buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION + buildToolsVersion '19.1.0' defaultConfig { minSdkVersion 8 diff --git a/library/gradle.properties b/library/gradle.properties old mode 100644 new mode 100755 diff --git a/library/project.properties b/library/project.properties old mode 100644 new mode 100755 diff --git a/library/res/drawable/background_tab.xml b/library/res/drawable/background_tab.xml old mode 100644 new mode 100755 diff --git a/library/res/values/attrs.xml b/library/res/values/attrs.xml old mode 100644 new mode 100755 index 18b6be8..ec492e9 --- a/library/res/values/attrs.xml +++ b/library/res/values/attrs.xml @@ -4,6 +4,7 @@ + diff --git a/library/res/values/colors.xml b/library/res/values/colors.xml old mode 100644 new mode 100755 diff --git a/library/src/com/astuetz/PagerSlidingTabStrip.java b/library/src/com/astuetz/PagerSlidingTabStrip.java old mode 100644 new mode 100755 index 87b671c..b2f4c02 --- a/library/src/com/astuetz/PagerSlidingTabStrip.java +++ b/library/src/com/astuetz/PagerSlidingTabStrip.java @@ -89,6 +89,7 @@ public interface IconTabProvider { private int tabTextSize = 12; private int tabTextColor = 0xFF666666; + private int tabTextColorSelected = 0xFF666666; private Typeface tabTypeface = null; private int tabTypefaceStyle = Typeface.BOLD; @@ -133,6 +134,7 @@ public PagerSlidingTabStrip(Context context, AttributeSet attrs, int defStyle) { tabTextSize = a.getDimensionPixelSize(0, tabTextSize); tabTextColor = a.getColor(1, tabTextColor); + tabTextColorSelected = tabTextColor; a.recycle(); @@ -143,6 +145,7 @@ public PagerSlidingTabStrip(Context context, AttributeSet attrs, int defStyle) { indicatorColor = a.getColor(R.styleable.PagerSlidingTabStrip_pstsIndicatorColor, indicatorColor); underlineColor = a.getColor(R.styleable.PagerSlidingTabStrip_pstsUnderlineColor, underlineColor); dividerColor = a.getColor(R.styleable.PagerSlidingTabStrip_pstsDividerColor, dividerColor); + tabTextColorSelected = a.getColor(R.styleable.PagerSlidingTabStrip_pstsTextColorSelected, tabTextColorSelected); indicatorHeight = a.getDimensionPixelSize(R.styleable.PagerSlidingTabStrip_pstsIndicatorHeight, indicatorHeight); underlineHeight = a.getDimensionPixelSize(R.styleable.PagerSlidingTabStrip_pstsUnderlineHeight, underlineHeight); dividerPadding = a.getDimensionPixelSize(R.styleable.PagerSlidingTabStrip_pstsDividerPadding, dividerPadding); @@ -291,7 +294,14 @@ private void scrollToChild(int position, int offset) { return; } - int newScrollX = tabsContainer.getChildAt(position).getLeft() + offset; + for (int i = 0; i < tabsContainer.getChildCount(); i++) { + TextView tab = (TextView) tabsContainer.getChildAt(i); + tab.setTextColor(tabTextColor); + } + + TextView tab = (TextView) tabsContainer.getChildAt(position); + tab.setTextColor(tabTextColorSelected); + int newScrollX = tab.getLeft() + offset; if (position > 0 || offset > 0) { newScrollX -= scrollOffset; @@ -384,7 +394,6 @@ public void onPageSelected(int position) { delegatePageListener.onPageSelected(position); } } - } public void setIndicatorColor(int indicatorColor) { diff --git a/sample/AndroidManifest.xml b/sample/AndroidManifest.xml old mode 100644 new mode 100755 diff --git a/sample/build.gradle b/sample/build.gradle old mode 100644 new mode 100755 index 60abe01..be657a0 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -6,7 +6,7 @@ dependencies { android { compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION) - buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION + buildToolsVersion '19.1.0' defaultConfig { minSdkVersion 8 diff --git a/sample/ic_launcher-web.png b/sample/ic_launcher-web.png old mode 100644 new mode 100755 diff --git a/sample/project.properties b/sample/project.properties old mode 100644 new mode 100755 diff --git a/sample/res/drawable-hdpi/ic_launcher.png b/sample/res/drawable-hdpi/ic_launcher.png old mode 100644 new mode 100755 diff --git a/sample/res/drawable-hdpi/ic_launcher_actionbar.png b/sample/res/drawable-hdpi/ic_launcher_actionbar.png old mode 100644 new mode 100755 diff --git a/sample/res/drawable-mdpi/ic_launcher.png b/sample/res/drawable-mdpi/ic_launcher.png old mode 100644 new mode 100755 diff --git a/sample/res/drawable-mdpi/ic_launcher_actionbar.png b/sample/res/drawable-mdpi/ic_launcher_actionbar.png old mode 100644 new mode 100755 diff --git a/sample/res/drawable-xhdpi/actionbar_bottom.9.png b/sample/res/drawable-xhdpi/actionbar_bottom.9.png old mode 100644 new mode 100755 diff --git a/sample/res/drawable-xhdpi/background_card.9.png b/sample/res/drawable-xhdpi/background_card.9.png old mode 100644 new mode 100755 diff --git a/sample/res/drawable-xhdpi/contact.png b/sample/res/drawable-xhdpi/contact.png old mode 100644 new mode 100755 diff --git a/sample/res/drawable-xhdpi/ic_action_user.png b/sample/res/drawable-xhdpi/ic_action_user.png old mode 100644 new mode 100755 diff --git a/sample/res/drawable-xhdpi/ic_launcher.png b/sample/res/drawable-xhdpi/ic_launcher.png old mode 100644 new mode 100755 diff --git a/sample/res/drawable-xhdpi/ic_launcher_actionbar.png b/sample/res/drawable-xhdpi/ic_launcher_actionbar.png old mode 100644 new mode 100755 diff --git a/sample/res/drawable-xhdpi/ic_launcher_chrome.png b/sample/res/drawable-xhdpi/ic_launcher_chrome.png old mode 100644 new mode 100755 diff --git a/sample/res/drawable-xhdpi/ic_launcher_gmail.png b/sample/res/drawable-xhdpi/ic_launcher_gmail.png old mode 100644 new mode 100755 diff --git a/sample/res/drawable-xhdpi/ic_launcher_gmaps.png b/sample/res/drawable-xhdpi/ic_launcher_gmaps.png old mode 100644 new mode 100755 diff --git a/sample/res/drawable-xhdpi/ic_launcher_gplus.png b/sample/res/drawable-xhdpi/ic_launcher_gplus.png old mode 100644 new mode 100755 diff --git a/sample/res/drawable-xhdpi/tabs_pattern.png b/sample/res/drawable-xhdpi/tabs_pattern.png old mode 100644 new mode 100755 diff --git a/sample/res/drawable-xhdpi/tabs_pattern_diagonal.png b/sample/res/drawable-xhdpi/tabs_pattern_diagonal.png old mode 100644 new mode 100755 diff --git a/sample/res/drawable-xxhdpi/ic_launcher.png b/sample/res/drawable-xxhdpi/ic_launcher.png old mode 100644 new mode 100755 diff --git a/sample/res/drawable-xxhdpi/ic_launcher_actionbar.png b/sample/res/drawable-xxhdpi/ic_launcher_actionbar.png old mode 100644 new mode 100755 diff --git a/sample/res/drawable/background_tabs.xml b/sample/res/drawable/background_tabs.xml old mode 100644 new mode 100755 diff --git a/sample/res/drawable/background_tabs_diagonal.xml b/sample/res/drawable/background_tabs_diagonal.xml old mode 100644 new mode 100755 diff --git a/sample/res/layout-land/fragment_quick_contact.xml b/sample/res/layout-land/fragment_quick_contact.xml old mode 100644 new mode 100755 diff --git a/sample/res/layout/activity_main.xml b/sample/res/layout/activity_main.xml old mode 100644 new mode 100755 diff --git a/sample/res/layout/fragment_quick_contact.xml b/sample/res/layout/fragment_quick_contact.xml old mode 100644 new mode 100755 diff --git a/sample/res/menu/main.xml b/sample/res/menu/main.xml old mode 100644 new mode 100755 diff --git a/sample/res/values-sw600dp/dimens.xml b/sample/res/values-sw600dp/dimens.xml old mode 100644 new mode 100755 diff --git a/sample/res/values-sw720dp-land/dimens.xml b/sample/res/values-sw720dp-land/dimens.xml old mode 100644 new mode 100755 diff --git a/sample/res/values-v11/styles.xml b/sample/res/values-v11/styles.xml old mode 100644 new mode 100755 diff --git a/sample/res/values-v14/styles.xml b/sample/res/values-v14/styles.xml old mode 100644 new mode 100755 diff --git a/sample/res/values/colors.xml b/sample/res/values/colors.xml old mode 100644 new mode 100755 diff --git a/sample/res/values/dimens.xml b/sample/res/values/dimens.xml old mode 100644 new mode 100755 diff --git a/sample/res/values/strings.xml b/sample/res/values/strings.xml old mode 100644 new mode 100755 diff --git a/sample/res/values/styles.xml b/sample/res/values/styles.xml old mode 100644 new mode 100755 diff --git a/sample/src/com/astuetz/viewpager/extensions/sample/MainActivity.java b/sample/src/com/astuetz/viewpager/extensions/sample/MainActivity.java old mode 100644 new mode 100755 diff --git a/sample/src/com/astuetz/viewpager/extensions/sample/QuickContactFragment.java b/sample/src/com/astuetz/viewpager/extensions/sample/QuickContactFragment.java old mode 100644 new mode 100755 diff --git a/sample/src/com/astuetz/viewpager/extensions/sample/SuperAwesomeCardFragment.java b/sample/src/com/astuetz/viewpager/extensions/sample/SuperAwesomeCardFragment.java old mode 100644 new mode 100755 diff --git a/settings.gradle b/settings.gradle old mode 100644 new mode 100755