Skip to content

Commit

Permalink
library
Browse files Browse the repository at this point in the history
  • Loading branch information
wanglu1209 committed Sep 3, 2016
1 parent bb0d5f3 commit 2d1856c
Show file tree
Hide file tree
Showing 18 changed files with 105 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.1.1'
compile project(':bannerlibrary')
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import android.view.View;
import android.widget.ImageView;

import com.github.wanglu1209.banner.BannerPagerAdapter;
import com.github.wanglu1209.banner.R;
import com.github.wanglu1209.bannerlibrary.BannerPagerAdapter;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import android.support.v7.app.AppCompatActivity;
import android.widget.Toast;

import com.github.wanglu1209.banner.Banner;
import com.github.wanglu1209.banner.BannerPagerAdapter;
import com.github.wanglu1209.banner.R;
import com.github.wanglu1209.bannerlibrary.Banner;
import com.github.wanglu1209.bannerlibrary.BannerPagerAdapter;

import java.util.ArrayList;
import java.util.List;
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
tools:context=".demo.MainActivity">


<com.github.wanglu1209.banner.Banner
<com.github.wanglu1209.bannerlibrary.Banner
android:id="@+id/banner"
android:layout_width="match_parent"
android:layout_height="200dp"></com.github.wanglu1209.banner.Banner>
android:layout_height="200dp"></com.github.wanglu1209.bannerlibrary.Banner>
</RelativeLayout>
1 change: 1 addition & 0 deletions bannerlibrary/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
25 changes: 25 additions & 0 deletions bannerlibrary/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 24
buildToolsVersion "24.0.1"

defaultConfig {
minSdkVersion 19
targetSdkVersion 24
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:24.1.1'
}
17 changes: 17 additions & 0 deletions bannerlibrary/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/WangLu/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
@@ -0,0 +1,13 @@
package com.github.wanglu1209.bannerlibrary;

import android.app.Application;
import android.test.ApplicationTestCase;

/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
11 changes: 11 additions & 0 deletions bannerlibrary/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.wanglu1209.bannerlibrary">

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

</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.wanglu1209.banner;
package com.github.wanglu1209.bannerlibrary;

import android.content.Context;
import android.support.v4.view.ViewPager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.wanglu1209.banner;
package com.github.wanglu1209.bannerlibrary;

import android.content.Context;
import android.support.v4.view.PagerAdapter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.wanglu1209.banner;
package com.github.wanglu1209.bannerlibrary;

import android.content.Context;
import android.os.Handler;
Expand Down
3 changes: 3 additions & 0 deletions bannerlibrary/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<resources>
<string name="app_name">BannerLibrary</string>
</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.github.wanglu1209.bannerlibrary;

import org.junit.Test;

import static org.junit.Assert.*;

/**
* To work on unit tests, switch the Test Artifact in the Build Variants view.
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include ':app'
include ':app', ':bannerlibrary'

0 comments on commit 2d1856c

Please sign in to comment.