Skip to content

Commit df1c3f4

Browse files
author
Muhammed Emin Ayar
committed
v0.0.0.2
1 parent c04d79d commit df1c3f4

21 files changed

Lines changed: 3410 additions & 173 deletions

.idea/misc.xml

Lines changed: 1 addition & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 25
4+
compileSdkVersion 26
55
buildToolsVersion "25.0.2"
66
defaultConfig {
77
applicationId "eminayar.com.helpercards"
88
minSdkVersion 15
9-
targetSdkVersion 25
9+
targetSdkVersion 26
1010
versionCode 1
1111
versionName "1.0"
1212
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
@@ -20,12 +20,12 @@ android {
2020
}
2121

2222
dependencies {
23-
compile fileTree(include: ['*.jar'], dir: 'libs')
23+
implementation fileTree(include: ['*.jar'], dir: 'libs')
2424
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
2525
exclude group: 'com.android.support', module: 'support-annotations'
2626
})
27-
compile 'com.android.support:appcompat-v7:25.3.1'
28-
compile 'com.android.support.constraint:constraint-layout:1.0.2'
29-
testCompile 'junit:junit:4.12'
30-
compile project(':cardhelper')
27+
implementation 'com.android.support:appcompat-v7:26.+'
28+
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
29+
testImplementation 'junit:junit:4.12'
30+
implementation project(':cardhelper')
3131
}

app/src/main/res/layout/activity_main.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
android:layout_height="match_parent"
3434
app:back_icon="@drawable/helper_back"
3535
app:overlay_color="#000000"
36+
app:title_color="#bbffee"
3637
app:toolbar_title="Messages"
3738
/>
3839

build.gradle

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
buildscript {
44
repositories {
55
jcenter()
6+
maven {
7+
url 'https://maven.google.com/'
8+
name 'Google'
9+
}
610
}
711
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.3.0'
9-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
10-
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
12+
classpath 'com.android.tools.build:gradle:3.2.1'
13+
classpath 'com.novoda:bintray-release:0.9'
14+
1115
// NOTE: Do not place your application dependencies here; they belong
1216
// in the individual module build.gradle files
1317
}
@@ -16,6 +20,13 @@ buildscript {
1620
allprojects {
1721
repositories {
1822
jcenter()
23+
maven {
24+
url "https://jitpack.io"
25+
}
26+
maven {
27+
url 'https://maven.google.com/'
28+
name 'Google'
29+
}
1930
}
2031
}
2132

cardhelper/build.gradle

Lines changed: 24 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'com.novoda.bintray-release'
3+
4+
publish {
5+
def groupProjectID = 'com.eminayar.interactioncards'
6+
def artifactProjectID = 'cardhelper'
7+
def publishVersionID = '0.0.0.2'
8+
9+
userOrg = 'kngfrhzs'
10+
repoName = 'interaction_cards'
11+
groupId = groupProjectID
12+
artifactId = artifactProjectID
13+
publishVersion = publishVersionID
14+
desc = 'Interaction Cards Layout will help users to show cool cards on bottom of screen'
15+
website = 'https://github.com/kngfrhzs/Interaction-Cards-Layout'
16+
}
217

318
android {
4-
compileSdkVersion 25
19+
compileSdkVersion 26
520
buildToolsVersion "25.0.2"
621

722
defaultConfig {
823
minSdkVersion 15
9-
targetSdkVersion 25
24+
targetSdkVersion 26
1025
versionCode 1
1126
versionName "1.0"
1227

@@ -17,6 +32,9 @@ android {
1732
minifyEnabled false
1833
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1934
}
35+
debug {
36+
minifyEnabled false
37+
}
2038
}
2139
}
2240

@@ -25,142 +43,8 @@ dependencies {
2543
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
2644
exclude group: 'com.android.support', module: 'support-annotations'
2745
})
28-
compile 'com.android.support:appcompat-v7:25.3.1'
29-
compile 'com.nineoldandroids:library:2.4.0'
30-
compile 'com.github.ksoichiro:android-observablescrollview:1.6.0'
31-
testCompile 'junit:junit:4.12'
32-
}
33-
34-
ext {
35-
// Where you will see your artifact in Bintray's web interface
36-
// The "bintrayName" should match the name of the Bintray repro.
37-
bintrayRepo = 'maven'
38-
bintrayName = 'interaction_cards'
39-
40-
// Maven metadata
41-
publishedGroupId = 'com.eminayar.interactioncards'
42-
libraryName = 'Interaction Cards Layout'
43-
// Save yourself a head ache, and set this equal to the name of the Android Studio library
44-
// module. The artifact name needs to match the name of the library.
45-
artifact = 'cardhelper'
46-
47-
licenseName = 'The Apache Software License, Version 2.0'
48-
licenseUrl = 'http://www.apache.org/licenses'
49-
allLicenses = ["Apache-2.0"]
50-
51-
siteUrl = 'https://github.com/kngfrhzs/panter-dialog'
52-
gitUrl = 'https://github.com/kngfrhzs/Interaction-Cards-Layout.git'
53-
54-
libraryDescription = 'Interaction Cards Layout will help users to show cool cards on bottom of screen'
55-
libraryVersion = '0.0.0.1'
56-
57-
developerId = 'kngfrhzs'
58-
developerName = 'Muhammed Emin Ayar'
59-
developerEmail = 'ayarmuhammedemin@gmail.com'
60-
}
61-
apply plugin: 'com.github.dcendents.android-maven'
62-
63-
group = publishedGroupId // Maven Group ID for the artifact
64-
65-
install {
66-
repositories.mavenInstaller {
67-
// This generates POM.xml with proper parameters
68-
pom {
69-
project {
70-
packaging 'aar'
71-
groupId publishedGroupId
72-
artifactId artifact
73-
74-
// Add your description here
75-
name libraryName
76-
description libraryDescription
77-
url siteUrl
78-
79-
// Set your license
80-
licenses {
81-
license {
82-
name licenseName
83-
url licenseUrl
84-
}
85-
}
86-
developers {
87-
developer {
88-
id developerId
89-
name developerName
90-
email developerEmail
91-
}
92-
}
93-
scm {
94-
connection gitUrl
95-
developerConnection gitUrl
96-
url siteUrl
97-
98-
}
99-
}
100-
}
101-
}
46+
implementation 'com.android.support:appcompat-v7:26.+'
47+
implementation 'com.android.support:recyclerview-v7:26.+'
48+
implementation 'com.nineoldandroids:library:2.4.0'
49+
testImplementation 'junit:junit:4.12'
10250
}
103-
apply plugin: 'com.jfrog.bintray'
104-
105-
version = libraryVersion
106-
if (project.hasProperty("android")) { // Android libraries
107-
task sourcesJar(type: Jar) {
108-
classifier = 'sources'
109-
from android.sourceSets.main.java.srcDirs
110-
}
111-
112-
task javadoc(type: Javadoc) {
113-
source = android.sourceSets.main.java.srcDirs
114-
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
115-
}
116-
} else { // Java libraries
117-
task sourcesJar(type: Jar, dependsOn: classes) {
118-
classifier = 'sources'
119-
from sourceSets.main.allSource
120-
}
121-
}
122-
123-
artifacts {
124-
archives sourcesJar
125-
}
126-
127-
// Bintray
128-
Properties properties = new Properties()
129-
if (project.rootProject.file('local.properties').exists()) {
130-
properties.load(project.rootProject.file('local.properties').newDataInputStream())
131-
132-
bintray {
133-
user = properties.getProperty("bintray.user")
134-
key = properties.getProperty("bintray.apikey")
135-
136-
configurations = ['archives']
137-
pkg {
138-
repo = bintrayRepo
139-
name = bintrayName
140-
desc = libraryDescription
141-
websiteUrl = siteUrl
142-
vcsUrl = gitUrl
143-
licenses = allLicenses
144-
publish = true
145-
publicDownloadNumbers = true
146-
version {
147-
desc = libraryDescription
148-
gpg {
149-
sign = true //Determines whether to GPG sign the files. The default is false
150-
passphrase = properties.getProperty("bintray.gpg.password")
151-
//Optional. The passphrase for GPG signing'
152-
}
153-
}
154-
}
155-
}
156-
}
157-
158-
apply plugin: 'maven'
159-
160-
uploadArchives {
161-
repositories {
162-
mavenDeployer {
163-
repository(url: "/Users/macbookpro/StudioProjects/HelperCards")
164-
}
165-
}
166-
}

cardhelper/src/main/java/eminayar/com/cardhelper/DisabledScrollView.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import android.content.Context;
44
import android.util.AttributeSet;
55
import android.view.MotionEvent;
6-
import com.github.ksoichiro.android.observablescrollview.ObservableScrollView;
6+
7+
import eminayar.com.cardhelper.observablescrollview.ObservableScrollView;
78

89
public class DisabledScrollView extends ObservableScrollView {
910

cardhelper/src/main/java/eminayar/com/cardhelper/HelperCardsLayout.java

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@
1818
import android.widget.FrameLayout;
1919
import android.widget.ImageView;
2020
import android.widget.LinearLayout;
21-
import android.widget.RelativeLayout;
2221
import android.widget.TextView;
23-
import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks;
24-
import com.github.ksoichiro.android.observablescrollview.ScrollState;
25-
import com.github.ksoichiro.android.observablescrollview.ScrollUtils;
22+
2623
import com.nineoldandroids.view.ViewHelper;
27-
import eminayar.com.cardhelper.models.CardItem;
24+
2825
import java.util.List;
2926

27+
import eminayar.com.cardhelper.models.CardItem;
28+
import eminayar.com.cardhelper.observablescrollview.ObservableScrollViewCallbacks;
29+
import eminayar.com.cardhelper.observablescrollview.ScrollState;
30+
import eminayar.com.cardhelper.observablescrollview.ScrollUtils;
31+
3032
/**
3133
* Created by EminAyar on 3.09.2017.
3234
*/
@@ -52,6 +54,7 @@ public class HelperCardsLayout extends FrameLayout
5254
private CardClickListener cardClickListener;
5355
private CardClickLongListener cardClickLongListener;
5456
private int mOverlayColor;
57+
private int mTitleColor;
5558
private Drawable mBackButtonImage;
5659
private View rootView;
5760

@@ -67,6 +70,7 @@ public HelperCardsLayout(Context context, AttributeSet attrs, int defStyle) {
6770
try {
6871
mToolbarTitle = ta.getString(R.styleable.HelperCardsLayout_toolbar_title);
6972
mOverlayColor = ta.getColor(R.styleable.HelperCardsLayout_overlay_color, Color.BLACK);
73+
mTitleColor = ta.getColor(R.styleable.HelperCardsLayout_title_color, Color.WHITE);
7074
mBackButtonImage =
7175
ta.getDrawable(R.styleable.HelperCardsLayout_back_icon);
7276
} finally {
@@ -83,6 +87,7 @@ public HelperCardsLayout(Context context, AttributeSet attrs) {
8387
try {
8488
mToolbarTitle = ta.getString(R.styleable.HelperCardsLayout_toolbar_title);
8589
mOverlayColor = ta.getColor(R.styleable.HelperCardsLayout_overlay_color, Color.BLACK);
90+
mTitleColor = ta.getColor(R.styleable.HelperCardsLayout_title_color, Color.WHITE);
8691
mBackButtonImage =
8792
ta.getDrawable(R.styleable.HelperCardsLayout_back_icon);
8893
} finally {
@@ -136,6 +141,9 @@ public void init() {
136141
mRootBackground.setBackgroundColor(mOverlayColor);
137142
mToolBarView.setBackgroundColor(mOverlayColor);
138143

144+
//Set title color
145+
mTitleView.setTextColor(mTitleColor);
146+
139147
//Set back button image resource
140148
((ImageView)mBackButton).setImageDrawable(mBackButtonImage);
141149

0 commit comments

Comments
 (0)