Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added text color selected parameter #306

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
6 changes: 3 additions & 3 deletions build.gradle
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -18,3 +16,5 @@ allprojects {
mavenCentral()
}
}


Empty file modified gradle.properties
100644 → 100755
Empty file.
Empty file modified gradle/wrapper/gradle-wrapper.jar
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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
Empty file modified gradlew
100644 → 100755
Empty file.
Empty file modified gradlew.bat
100644 → 100755
Empty file.
Empty file modified library/AndroidManifest.xml
100644 → 100755
Empty file.
6 changes: 3 additions & 3 deletions library/build.gradle
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Empty file modified library/gradle.properties
100644 → 100755
Empty file.
Empty file modified library/project.properties
100644 → 100755
Empty file.
Empty file modified library/res/drawable/background_tab.xml
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions library/res/values/attrs.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<declare-styleable name="PagerSlidingTabStrip">
<attr name="pstsIndicatorColor" format="color" />
<attr name="pstsUnderlineColor" format="color" />
<attr name="pstsTextColorSelected" format="color" />
<attr name="pstsDividerColor" format="color" />
<attr name="pstsIndicatorHeight" format="dimension" />
<attr name="pstsUnderlineHeight" format="dimension" />
Expand Down
Empty file modified library/res/values/colors.xml
100644 → 100755
Empty file.
13 changes: 11 additions & 2 deletions library/src/com/astuetz/PagerSlidingTabStrip.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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();

Expand All @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -384,7 +394,6 @@ public void onPageSelected(int position) {
delegatePageListener.onPageSelected(position);
}
}

}

public void setIndicatorColor(int indicatorColor) {
Expand Down
Empty file modified sample/AndroidManifest.xml
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion sample/build.gradle
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Empty file modified sample/ic_launcher-web.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/project.properties
100644 → 100755
Empty file.
Empty file modified sample/res/drawable-hdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/res/drawable-hdpi/ic_launcher_actionbar.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/res/drawable-mdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/res/drawable-mdpi/ic_launcher_actionbar.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/res/drawable-xhdpi/actionbar_bottom.9.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/res/drawable-xhdpi/background_card.9.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/res/drawable-xhdpi/contact.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/res/drawable-xhdpi/ic_action_user.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/res/drawable-xhdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/res/drawable-xhdpi/ic_launcher_actionbar.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/res/drawable-xhdpi/ic_launcher_chrome.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/res/drawable-xhdpi/ic_launcher_gmail.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/res/drawable-xhdpi/ic_launcher_gmaps.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/res/drawable-xhdpi/ic_launcher_gplus.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/res/drawable-xhdpi/tabs_pattern.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/res/drawable-xhdpi/tabs_pattern_diagonal.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/res/drawable-xxhdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/res/drawable-xxhdpi/ic_launcher_actionbar.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/res/drawable/background_tabs.xml
100644 → 100755
Empty file.
Empty file modified sample/res/drawable/background_tabs_diagonal.xml
100644 → 100755
Empty file.
Empty file modified sample/res/layout-land/fragment_quick_contact.xml
100644 → 100755
Empty file.
Empty file modified sample/res/layout/activity_main.xml
100644 → 100755
Empty file.
Empty file modified sample/res/layout/fragment_quick_contact.xml
100644 → 100755
Empty file.
Empty file modified sample/res/menu/main.xml
100644 → 100755
Empty file.
Empty file modified sample/res/values-sw600dp/dimens.xml
100644 → 100755
Empty file.
Empty file modified sample/res/values-sw720dp-land/dimens.xml
100644 → 100755
Empty file.
Empty file modified sample/res/values-v11/styles.xml
100644 → 100755
Empty file.
Empty file modified sample/res/values-v14/styles.xml
100644 → 100755
Empty file.
Empty file modified sample/res/values/colors.xml
100644 → 100755
Empty file.
Empty file modified sample/res/values/dimens.xml
100644 → 100755
Empty file.
Empty file modified sample/res/values/strings.xml
100644 → 100755
Empty file.
Empty file modified sample/res/values/styles.xml
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified settings.gradle
100644 → 100755
Empty file.