Skip to content

Commit fbd5f2e

Browse files
author
dongjunkun
committed
add qrCode
1 parent dc86b96 commit fbd5f2e

File tree

27 files changed

+196
-5
lines changed

27 files changed

+196
-5
lines changed

app/app.iml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,6 @@
9393
<orderEntry type="library" exported="" name="support-v4-23.1.1" level="project" />
9494
<orderEntry type="library" exported="" name="appcompat-v7-23.1.1" level="project" />
9595
<orderEntry type="library" exported="" name="butterknife-6.1.0" level="project" />
96+
<orderEntry type="module" module-name="library" exported="" />
9697
</component>
9798
</module>

app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ dependencies {
2323
compile fileTree(dir: 'libs', include: ['*.jar'])
2424
compile 'com.android.support:appcompat-v7:23.1.1'
2525
compile 'com.jakewharton:butterknife:6.1.0'
26+
compile project(':library')
2627
}

app/build/outputs/apk/app-debug.apk

8.27 KB
Binary file not shown.

app/src/main/java/com/yyy/djk/dropdownmenu/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import android.support.v7.app.AppCompatActivity;
55
import android.util.TypedValue;
66
import android.view.Gravity;
7-
import android.view.MotionEvent;
87
import android.view.View;
98
import android.view.ViewGroup;
109
import android.widget.AdapterView;
@@ -13,6 +12,7 @@
1312
import android.widget.TextView;
1413

1514
import com.yyy.djk.multipledropdownmenu.R;
15+
import com.yyydjk.library.DropDownMenu;
1616

1717
import java.util.ArrayList;
1818
import java.util.Arrays;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<com.yyy.djk.dropdownmenu.DropDownMenu
1+
<com.yyydjk.library.DropDownMenu
22
android:id="@+id/dropDownMenu"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
xmlns:android="http://schemas.android.com/apk/res/android"

library/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

library/build.gradle

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
apply plugin: 'com.android.library'
2+
apply plugin: 'com.github.dcendents.android-maven'
3+
4+
group='com.github.dongjunkun'
5+
6+
7+
android {
8+
compileSdkVersion 23
9+
buildToolsVersion "23.0.2"
10+
11+
defaultConfig {
12+
minSdkVersion 14
13+
targetSdkVersion 23
14+
versionCode 1
15+
versionName "1.0"
16+
}
17+
buildTypes {
18+
release {
19+
minifyEnabled false
20+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
21+
}
22+
}
23+
}
24+
25+
dependencies {
26+
compile fileTree(dir: 'libs', include: ['*.jar'])
27+
testCompile 'junit:junit:4.12'
28+
compile 'com.android.support:appcompat-v7:23.1.1'
29+
}

library/library.iml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module external.linked.project.id=":library" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="com.github.dongjunkun" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
3+
<component name="FacetManager">
4+
<facet type="android-gradle" name="Android-Gradle">
5+
<configuration>
6+
<option name="GRADLE_PROJECT_PATH" value=":library" />
7+
</configuration>
8+
</facet>
9+
<facet type="android" name="Android">
10+
<configuration>
11+
<option name="SELECTED_BUILD_VARIANT" value="debug" />
12+
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
13+
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
14+
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
15+
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
16+
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
17+
<afterSyncTasks>
18+
<task>generateDebugAndroidTestSources</task>
19+
<task>generateDebugSources</task>
20+
</afterSyncTasks>
21+
<option name="ALLOW_USER_CONFIGURATION" value="false" />
22+
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
23+
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
24+
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
25+
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
26+
<option name="LIBRARY_PROJECT" value="true" />
27+
</configuration>
28+
</facet>
29+
</component>
30+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
31+
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
32+
<exclude-output />
33+
<content url="file://$MODULE_DIR$">
34+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
35+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
36+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
37+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
38+
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
39+
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
40+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
41+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
42+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
43+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
44+
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
45+
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
46+
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
47+
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
48+
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
49+
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
50+
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
51+
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
52+
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
53+
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
54+
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
55+
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
56+
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
57+
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
58+
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
59+
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
60+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
61+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
62+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
63+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
64+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
65+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
66+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
67+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations" />
68+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
69+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
70+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
71+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
72+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
73+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
74+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
75+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
76+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
77+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/restart-dex" />
78+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
79+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
80+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
81+
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
82+
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
83+
</content>
84+
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
85+
<orderEntry type="sourceFolder" forTests="false" />
86+
<orderEntry type="library" exported="" name="support-annotations-23.1.1" level="project" />
87+
<orderEntry type="library" exported="" name="support-v4-23.1.1" level="project" />
88+
<orderEntry type="library" exported="" name="appcompat-v7-23.1.1" level="project" />
89+
</component>
90+
</module>

library/proguard-rules.pro

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in D:\Android\sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.yyydjk.library;
2+
3+
import android.app.Application;
4+
import android.test.ApplicationTestCase;
5+
6+
/**
7+
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
8+
*/
9+
public class ApplicationTest extends ApplicationTestCase<Application> {
10+
public ApplicationTest() {
11+
super(Application.class);
12+
}
13+
}

library/src/main/AndroidManifest.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<manifest package="com.yyydjk.library"
2+
xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
<application android:allowBackup="true"
5+
android:label="@string/app_name"
6+
android:supportsRtl="true"
7+
>
8+
9+
</application>
10+
11+
</manifest>

app/src/main/java/com/yyy/djk/dropdownmenu/DropDownMenu.java renamed to library/src/main/java/com/yyydjk/library/DropDownMenu.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.yyy.djk.dropdownmenu;
1+
package com.yyydjk.library;
22

33
import android.content.Context;
44
import android.content.res.TypedArray;
@@ -15,8 +15,6 @@
1515
import android.widget.LinearLayout;
1616
import android.widget.TextView;
1717

18-
import com.yyy.djk.multipledropdownmenu.R;
19-
2018
import java.util.List;
2119

2220

3.34 KB
Loading
2.15 KB
Loading
Loading
Loading
Loading
Loading
Loading
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="white">#ffffff</color>
4+
<color name="gray">#cccccc</color>
5+
6+
<color name="drop_down_selected">#7B1FA2</color>
7+
<color name="drop_down_unselected">#111111</color>
8+
9+
<color name="mask_color">#88888888</color>
10+
<color name="check_bg">#f2f2f2</color>
11+
<color name="un_press_color">#9C27B0</color>
12+
</resources>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<resources>
2+
<string name="app_name">Library</string>
3+
</resources>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.yyydjk.library;
2+
3+
import org.junit.Test;
4+
5+
import static org.junit.Assert.*;
6+
7+
/**
8+
* To work on unit tests, switch the Test Artifact in the Build Variants view.
9+
*/
10+
public class ExampleUnitTest {
11+
@Test
12+
public void addition_isCorrect() throws Exception {
13+
assertEquals(4, 2 + 2);
14+
}
15+
}

0 commit comments

Comments
 (0)