Skip to content

Commit 853af58

Browse files
author
heaven7
committed
add nsfl_orientation attr for NestedScrollFrameLayout
1 parent 27d0e43 commit 853af58

File tree

4 files changed

+67
-42
lines changed

4 files changed

+67
-42
lines changed

Android-stick-navigation-layout/android-nestedscroll/build.gradle

Lines changed: 29 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,8 @@ apply plugin: 'com.android.library'
22
//apply plugin: 'com.novoda.bintray-release'
33
apply from: '../androidx_compat.gradle'
44

5-
/*
6-
ext {
7-
bintrayRepo = 'maven'
8-
bintrayName = 'android-nestedscroll' // Has to be same as your library module name
9-
10-
publishedGroupId = 'com.heaven7.android.scroll'
11-
libraryName = 'android-nestedscroll'
12-
artifact = 'android-nestedscroll' // Has to be same as your library module name
13-
14-
libraryDescription = 'Android Library to make handle nested scrolling easilier.'
15-
16-
// Your github repo link
17-
siteUrl = 'https://github.com/LightSun/Android-sticky-navigation-layout'
18-
gitUrl = 'https://github.com/LightSun/Android-sticky-navigation-layout.git'
19-
githubRepository= 'LightSun/Android-sticky-navigation-layout'
20-
21-
libraryVersion = '1.0.2'
22-
23-
developerId = 'Heaven7'
24-
developerName = 'Chenjun'
25-
developerEmail = 'donshine723@gmail.com'
26-
27-
licenseName = 'The Apache Software License, Version 2.0'
28-
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
29-
allLicenses = ["Apache-2.0"]
30-
}
31-
*/
32-
5+
group = 'com.github.LightSun.Android-sticky-navigation-layout'
6+
version = library_version
337

348
android {
359
compileSdkVersion 28
@@ -53,27 +27,41 @@ android {
5327
checkReleaseBuilds false
5428
}
5529
}
30+
//------------ multi lib >>> ------
31+
task sourcesJar(type: Jar) {
32+
//classifier = 'sources'
33+
getArchiveClassifier().set('sources')
34+
from android.sourceSets.main.javaDirectories
35+
}
36+
artifacts {
37+
archives sourcesJar
38+
}
39+
if (android.productFlavors.size() > 0) {
40+
android.libraryVariants.all { variant ->
41+
if (variant.name.toLowerCase().contains("debug")) {
42+
return
43+
}
44+
45+
def bundleTask = tasks["bundle${variant.name.capitalize()}"]
46+
47+
artifacts {
48+
archives(bundleTask.archivePath) {
49+
classifier variant.flavorName
50+
builtBy bundleTask
51+
name = project.name
52+
}
53+
}
5654

57-
/*publish {
58-
userOrg = 'lightsun'
59-
groupId = 'com.heaven7.android.scroll'
60-
artifactId = 'android-nestedscroll'
61-
desc = 'Android Library to make handle nested scrolling easilier.'
62-
website = 'https://github.com/LightSun/Android-sticky-navigation-layout'
63-
publishVersion = android.defaultConfig.versionName
64-
}*/
55+
}
56+
}
57+
//------------ multi lib <<< ------
6558

6659
dependencies {
6760
implementation fileTree(dir: 'libs', include: ['*.jar'])
6861
testImplementation 'junit:junit:4.12'
6962
//implementation 'com.android.support:appcompat-v7:26.1.0'
7063
}
7164

72-
//apply from: 'bintrayUpload.gradle'
73-
74-
// Place it at the end of the file
75-
//apply from: 'installv1.gradle'
76-
//apply from: 'bintrayv1.gradle'
7765
task javadoc(type: Javadoc) {
7866
options.encoding = "utf-8"
7967
}

Android-stick-navigation-layout/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4+
ext {
5+
library_version = "1.0.4"
6+
}
47
repositories {
58
google()
69
jcenter()

Android-stick-navigation-layout/sticky-navigation-layout/build.gradle

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
apply plugin: 'com.android.library'
22
apply from: '../androidx_compat.gradle'
33

4+
group = 'com.github.LightSun.Android-sticky-navigation-layout'
5+
version = library_version
6+
47
android {
58
compileSdkVersion 28
69
buildToolsVersion '28.0.3'
@@ -33,4 +36,33 @@ dependencies {
3336

3437
//implementation 'com.heaven7.android.scroll:android-nestedscroll:1.0'
3538
implementation project(":android-nestedscroll")
36-
}
39+
}
40+
41+
//------------ multi lib >>> ------
42+
task sourcesJar(type: Jar) {
43+
//classifier = 'sources'
44+
getArchiveClassifier().set('sources')
45+
from android.sourceSets.main.javaDirectories
46+
}
47+
artifacts {
48+
archives sourcesJar
49+
}
50+
if (android.productFlavors.size() > 0) {
51+
android.libraryVariants.all { variant ->
52+
if (variant.name.toLowerCase().contains("debug")) {
53+
return
54+
}
55+
56+
def bundleTask = tasks["bundle${variant.name.capitalize()}"]
57+
58+
artifacts {
59+
archives(bundleTask.archivePath) {
60+
classifier variant.flavorName
61+
builtBy bundleTask
62+
name = project.name
63+
}
64+
}
65+
66+
}
67+
}
68+
//------------ multi lib <<< ------

Android-stick-navigation-layout/sticky-navigation-layout/src/main/java/com/heaven7/android/StickyLayout/NestedScrollFrameLayout.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
* this is a a child of FrameLayout, but can nested as {@link NestedScrollingChild} or {@link NestedScrollingParent}.
2626
* it can scroll in vertical.
2727
* Created by heaven7 on 2016/11/14.
28+
* @attr ref R.styleable#NestedScrollFrameLayout_nsfl_max_percent
29+
* @attr ref R.styleable#NestedScrollFrameLayout_nsfl_orientation
2830
*/
2931
public class NestedScrollFrameLayout extends FrameLayout implements NestedScrollingChild,
3032
/* NestedScrollingChild2, NestedScrollingChild3,*/

0 commit comments

Comments
 (0)