Skip to content
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
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.0.0"
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' }
Expand All @@ -15,6 +15,7 @@ buildscript {
allprojects {
repositories {
jcenter()
google()
}
}

Expand Down
24 changes: 14 additions & 10 deletions coordinatortablayout/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ apply plugin: 'com.jfrog.bintray'
version = "1.2.2"

android {
compileSdkVersion 25
buildToolsVersion '26.0.2'
compileSdkVersion 27
buildToolsVersion '27.0.3'

defaultConfig {
minSdkVersion 15
targetSdkVersion 25
targetSdkVersion 27
versionCode 10
versionName "1.2.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand All @@ -25,13 +25,17 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
testCompile 'junit:junit:4.12'
implementation fileTree(dir: 'libs', include: ['*.jar'])
def supportLibraries_version = '27.1.1'

// support libraries
implementation "com.android.support:appcompat-v7:$supportLibraries_version"
implementation "com.android.support:design:$supportLibraries_version"

// testing libraries
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations' })
testImplementation 'junit:junit:4.12'
}

def siteUrl = 'https://github.com/hugeterry/CoordinatorTabLayout'
Expand Down
68 changes: 38 additions & 30 deletions coordinatortablayout/coordinatortablayout.iml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/attr" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check-manifest" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
Expand All @@ -96,42 +94,52 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/packaged-aidl" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/packagedAssets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/packaged_res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/public_res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/tmp" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
<orderEntry type="jdk" jdkName="Android API 27 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="TEST" name="com.android.support.test:exposed-instrumentation-api-publish-0.5" level="project" />
<orderEntry type="library" scope="TEST" name="junit:junit:4.12@jar" level="project" />
<orderEntry type="library" scope="TEST" name="javax.inject:javax.inject:1@jar" level="project" />
<orderEntry type="library" name="com.android.support:support-core-ui-25.3.1" level="project" />
<orderEntry type="library" scope="TEST" name="com.squareup:javawriter:2.1.1@jar" level="project" />
<orderEntry type="library" name="com.android.support:support-compat-25.3.1" level="project" />
<orderEntry type="library" name="com.android.support:support-core-utils-25.3.1" level="project" />
<orderEntry type="library" name="com.android.support:support-v4-25.3.1" level="project" />
<orderEntry type="library" name="com.android.support:support-fragment-25.3.1" level="project" />
<orderEntry type="library" name="com.android.support:support-media-compat-25.3.1" level="project" />
<orderEntry type="library" scope="TEST" name="com.google.code.findbugs:jsr305:2.0.1@jar" level="project" />
<orderEntry type="library" scope="TEST" name="org.hamcrest:hamcrest-core:1.3@jar" level="project" />
<orderEntry type="library" scope="TEST" name="com.android.support.test.espresso:espresso-core-2.2.2" level="project" />
<orderEntry type="library" name="com.android.support:animated-vector-drawable-25.3.1" level="project" />
<orderEntry type="library" scope="TEST" name="com.android.support.test:rules-0.5" level="project" />
<orderEntry type="library" name="com.android.support:transition-25.3.1" level="project" />
<orderEntry type="library" name="com.android.support:design-25.3.1" level="project" />
<orderEntry type="library" scope="TEST" name="org.hamcrest:hamcrest-library:1.3@jar" level="project" />
<orderEntry type="library" scope="TEST" name="org.hamcrest:hamcrest-integration:1.3@jar" level="project" />
<orderEntry type="library" scope="TEST" name="com.android.support.test:runner-0.5" level="project" />
<orderEntry type="library" name="com.android.support:appcompat-v7-25.3.1" level="project" />
<orderEntry type="library" scope="TEST" name="com.android.support.test.espresso:espresso-idling-resource-2.2.2" level="project" />
<orderEntry type="library" scope="TEST" name="javax.annotation:javax.annotation-api:1.2@jar" level="project" />
<orderEntry type="library" name="com.android.support:support-vector-drawable-25.3.1" level="project" />
<orderEntry type="library" name="com.android.support:recyclerview-v7-25.3.1" level="project" />
<orderEntry type="library" name="com.android.support:support-annotations:25.3.1@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:transition-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-v4-27.1.1" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.android.support.test.espresso:espresso-idling-resource-2.2.2" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:common:1.1.0@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-annotations:27.1.1@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:animated-vector-drawable-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-compat-27.1.1" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: javax.annotation:javax.annotation-api:1.2@jar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:viewmodel-1.1.0" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.android.support.test.espresso:espresso-core-2.2.2" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:recyclerview-v7-27.1.1" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.squareup:javawriter:2.1.1@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-vector-drawable-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-media-compat-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-core-ui-27.1.1" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.android.support.test:rules-0.5" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-core-utils-27.1.1" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.google.code.findbugs:jsr305:2.0.1@jar" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: javax.inject:javax.inject:1@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-fragment-27.1.1" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: junit:junit:4.12@jar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.core:runtime-1.1.0" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: org.hamcrest:hamcrest-core:1.3@jar" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.android.support.test:runner-0.5" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:design-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:appcompat-v7-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:livedata-core-1.1.0" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.android.support.test:exposed-instrumentation-api-publish-0.5" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: org.hamcrest:hamcrest-library:1.3@jar" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: org.hamcrest:hamcrest-integration:1.3@jar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.core:common:1.1.0@jar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:runtime-1.1.0" level="project" />
<orderEntry type="library" name="Gradle: android-android-27" level="project" />
</component>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ public CoordinatorTabLayout(Context context, AttributeSet attrs, int defStyleAtt
private void initView(Context context) {
LayoutInflater.from(context).inflate(R.layout.view_coordinatortablayout, this, true);
initToolbar();
mCollapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.collapsingtoolbarlayout);
mTabLayout = (TabLayout) findViewById(R.id.tabLayout);
mImageView = (ImageView) findViewById(R.id.imageview);
mCollapsingToolbarLayout = findViewById(R.id.collapsingtoolbarlayout);
mTabLayout = findViewById(R.id.tabLayout);
mImageView = findViewById(R.id.imageview);
}

private void initWidget(Context context, AttributeSet attrs) {
Expand All @@ -94,7 +94,7 @@ private void initWidget(Context context, AttributeSet attrs) {
}

private void initToolbar() {
mToolbar = (Toolbar) findViewById(R.id.toolbar);
mToolbar = findViewById(R.id.toolbar);
((AppCompatActivity) mContext).setSupportActionBar(mToolbar);
mActionbar = ((AppCompatActivity) mContext).getSupportActionBar();
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Dec 31 16:08:46 CST 2017
#Tue Jul 10 15:12:21 EET 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
28 changes: 17 additions & 11 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion '26.0.2'
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "cn.hugeterry.coordinatortablayout"
minSdkVersion 15
targetSdkVersion 25
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand All @@ -20,13 +20,19 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
testCompile 'junit:junit:4.12'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':coordinatortablayout')
def supportLibraries_version = '27.1.1'

compile project(':coordinatortablayout')
compile 'com.github.bumptech.glide:glide:3.7.0'
// support
implementation "com.android.support:appcompat-v7:$supportLibraries_version"
implementation "com.android.support:design:$supportLibraries_version"

// glide
implementation 'com.github.bumptech.glide:glide:3.7.0'

// testing libraries
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations' })
testImplementation 'junit:junit:4.12'
}
1 change: 1 addition & 0 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".LoadHeaderImageFromNetworkActivity" />
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected void onCreate(Bundle savedInstanceState) {
android.R.color.holo_orange_light,
android.R.color.holo_green_light};

mCoordinatorTabLayout = (CoordinatorTabLayout) findViewById(R.id.coordinatortablayout);
mCoordinatorTabLayout = findViewById(R.id.coordinatortablayout);
mCoordinatorTabLayout.setTranslucentStatusBar(this)
.setTitle("Demo")
.setBackEnable(true)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package cn.hugeterry.coordinatortablayoutdemo;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

Expand Down Expand Up @@ -38,7 +38,7 @@ protected void onCreate(Bundle savedInstanceState) {
android.R.color.holo_orange_light,
android.R.color.holo_green_light};

mCoordinatorTabLayout = (CoordinatorTabLayout) findViewById(R.id.coordinatortablayout);
mCoordinatorTabLayout = findViewById(R.id.coordinatortablayout);
mCoordinatorTabLayout.setTranslucentStatusBar(this)
.setTitle("Demo")
.setBackEnable(true)
Expand All @@ -54,7 +54,7 @@ private void initFragments() {
}

private void initViewPager() {
mViewPager = (ViewPager) findViewById(R.id.vp);
mViewPager = findViewById(R.id.vp);
mViewPager.setOffscreenPageLimit(4);
mViewPager.setAdapter(new MyPagerAdapter(getSupportFragmentManager(), mFragments, mTitles));
}
Expand Down