Skip to content

Commit

Permalink
add recyclerView support:refresh,load more and onItemClick
Browse files Browse the repository at this point in the history
  • Loading branch information
captain-miao committed Mar 23, 2016
1 parent a74c543 commit 227623f
Show file tree
Hide file tree
Showing 58 changed files with 3,053 additions and 32 deletions.
1 change: 1 addition & 0 deletions GrantAndroidPermission/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
26 changes: 26 additions & 0 deletions GrantAndroidPermission/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
}
apply from: './gradle-mvn-push.gradle'
138 changes: 138 additions & 0 deletions GrantAndroidPermission/gradle-mvn-push.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
apply plugin: 'maven'
apply plugin: 'signing'


def isReleaseBuild() {
return VERSION_NAME.contains("SNAPSHOT") == false
}


def getReleaseRepositoryUrl() {
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
}


def getSnapshotRepositoryUrl() {
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
: "https://oss.sonatype.org/content/repositories/snapshots/"
}


def getRepositoryUsername() {
return hasProperty('OSS_USERNAME') ? OSS_USERNAME : ''
}


def getRepositoryPassword() {
return hasProperty('OSS_PWD') ? OSS_PWD : ''
}


afterEvaluate { project ->
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }


pom.groupId = POM_GROUP
pom.artifactId = POM_ARTIFACT_ID
pom.version = VERSION_NAME


repository(url: getReleaseRepositoryUrl()) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}
snapshotRepository(url: getSnapshotRepositoryUrl()) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}


pom.project {
name POM_NAME
packaging POM_PACKAGING
description POM_DESCRIPTION
url POM_URL


scm {
url POM_SCM_URL
connection POM_SCM_CONNECTION
developerConnection POM_SCM_DEV_CONNECTION
}


licenses {
license {
name POM_LICENCE_NAME
url POM_LICENCE_URL
distribution POM_LICENCE_DIST
}
}


issueManagement {
system POM_ISSUE_SYSTEM
url POM_ISSUE_URL
}


developers {
developer {
id POM_DEVELOPER_ID
name POM_DEVELOPER_NAME
}
}
}
}
}
}


signing {
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}


task apklib(type: Zip) {


appendix = extension = 'apklib'


from 'AndroidManifest.xml'
into('res') {
from 'res'
}
into('src') {
from 'src'
}
}


// task androidJavadocs(type: Javadoc) {
// source = android.sourceSets.main.java.srcDirs
// classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
// }


// task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
// classifier = 'javadoc'
// from androidJavadocs.destinationDir
// }


task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}


artifacts {
archives androidSourcesJar
//archives androidJavadocsJar
archives apklib
}
}
32 changes: 32 additions & 0 deletions GrantAndroidPermission/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#VERSION_NAME=1.0.0-SNAPSHOT
VERSION_NAME=1.0.0-SNAPSHOT
VERSION_CODE=100-SNAPSHOT

POM_GROUP=com.github.captain-miao
POM_ARTIFACT_ID=grantap
POM_PACKAGING=aar


#OSS_USERNAME=
#OSS_PWD=


POM_NAME=grant Android Permission for Android L
POM_DESCRIPTION=grant Android Permission for Android L


POM_URL=https://github.com/captain-miao/SwipeRefreshAndLoadMore
POM_SCM_URL=https://github.com/captain-miao/SwipeRefreshAndLoadMore
POM_SCM_CONNECTION=scm:https://github.com/captain-miao/SwipeRefreshAndLoadMore.git
POM_SCM_DEV_CONNECTION=scm:https://github.com/captain-miao/SwipeRefreshAndLoadMore.git


POM_LICENCE_NAME=MIT
POM_LICENCE_URL=http://opensource.org/licenses/MIT
POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=yanlu
POM_DEVELOPER_NAME=yanlu


POM_ISSUE_SYSTEM=GitHub Issues
POM_ISSUE_URL=https://github.com/captain-miao/SwipeRefreshAndLoadMore/issues
17 changes: 17 additions & 0 deletions GrantAndroidPermission/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/captain_miao/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.learn.swiperefreshandload;
package com.example.captain_miao.grantap;

import android.app.Application;
import android.test.ApplicationTestCase;
Expand Down
18 changes: 18 additions & 0 deletions GrantAndroidPermission/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<manifest package="com.example.captain_miao.grantap"
xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true"
>

<activity
android:name=".ShadowPermissionActivity"
android:label="@string/app_name"
android:theme="@style/Theme.Transparent">
</activity>

</application>

</manifest>
Loading

0 comments on commit 227623f

Please sign in to comment.