Compare commits

73 Commits
Author SHA1 Message Date
WMJ eda614dc98 更新gitignore 2017-05-13 19:13:09 +08:00
WMJ 91f8734233 自动通过server的models文件生成客户端的数据库模型 2017-05-13 17:47:00 +08:00
WMJ 96c982fa4b JAVA的数据库模型 2017-05-12 22:27:51 +08:00
WMJ aa682d95f4 Merge branch 'dev' of github.com:WeSayAll/TimeManager into dev 2017-05-11 16:41:36 +08:00
WMJ 9643bab212 重构数据表 2017-05-11 16:40:56 +08:00
TurnMeOn e8e74db756 'ig' 2017-05-11 15:22:06 +08:00
WMJ c53ba59241 update gitignore 2017-05-10 20:36:47 +08:00
WMJ 4965cc886c 更新TODO 2017-05-10 16:21:37 +08:00
WMJ 9ebd4d658f 完成从xml读入课程 2017-05-09 22:13:16 +08:00
WMJ e5a39044a8 个人日程表样例xml有变动 2017-05-09 20:20:56 +08:00
WMJ 3a4ba9b6da 就是提交一下 2017-05-09 19:58:06 +08:00
WMJ 3568381a34 完成POST和GET方法 2017-05-09 15:29:31 +08:00
WMJ c05e8e01fd 更新JDK至1.8 2017-05-09 14:26:26 +08:00
WMJ 24b2bab236 解决冲突 2017-05-09 14:19:41 +08:00
WMJ 5023946b85 从xml中读取时间表 2017-05-09 13:59:38 +08:00
TurnMeOn 04ad132e84 Time model 2017-05-09 12:54:33 +08:00
TurnMeOn eb455942c6 Update .ignore 2017-05-09 12:41:36 +08:00
TurnMeOn 4ac755af2c Update .ignore 2017-05-09 12:40:28 +08:00
TurnMeOn ab93cf45cc Fixed person_information.xml 2017-05-09 12:30:24 +08:00
WMJ 35592f8220 清理垃圾 2017-05-09 10:57:02 +08:00
WMJ 7d612453b8 update misc.xml 2017-05-09 10:23:05 +08:00
WMJ f219685919 解决冲突 2017-05-07 18:25:20 +08:00
WMJ 9edcb3f1ab 更新jdk 2017-05-07 18:23:58 +08:00
YouDad 16cd128395 Change background image 2017-05-07 17:23:24 +08:00
YouDad 4fb8bbe0b7 fix small bug 2017-05-07 17:08:40 +08:00
YouDad dc18ed1be4 无聊整理了一下ScheduleFragment的全部 2017-05-07 16:47:53 +08:00
YouDad a44e4126cc 无聊整理了一下ScheduleFragment的全局变量=_= 2017-05-07 12:09:24 +08:00
YouDad b56499685d 完成涂抹型添课 2017-05-07 12:01:15 +08:00
YouDad 3474b66b43 fix warning 2017-05-05 08:37:55 +08:00
WMJ 4b32f2ce12 分享和todo 2017-05-04 22:48:16 +08:00
YouDad f3984374c1 好了 2017-05-04 22:26:48 +08:00
YouDad 30df5f62e0 好了 2017-05-04 22:25:53 +08:00
WMJ 19360b9575 新的share接口 2017-05-04 22:06:31 +08:00
WMJ 22d11da345 再次合并 2017-05-04 22:01:30 +08:00
WMJ 5268c877eb 合并: 2017-05-04 21:59:21 +08:00
WMJ 00d97a164d 分享按钮 2017-05-04 21:57:05 +08:00
YouDad c9a922cf06 修改了一下app的style和标题栏的设置
标题栏的设置在MainActivity.java的OnCreate()方法中实现
在setContext之前
2017-05-04 21:54:17 +08:00
WMJ eb4a3728e6 我也不知道为什么提交 2017-05-02 20:24:35 +08:00
WMJ 4dee0c0fa8 烦 2017-05-02 20:20:12 +08:00
YouDad ba50737a76 Merge remote-tracking branch 'origin/dev' into dev 2017-05-02 20:15:52 +08:00
YouDad 7c88f49f51 同步了一下schedule fragment代码 2017-05-02 20:15:24 +08:00
TurnMeOn cd3515b712 ! 2017-05-02 17:34:38 +08:00
TurnMeOn ea53217fc5 Grouplist file 2017-05-02 17:33:23 +08:00
YouDad 74a145fd39 修正日期错误bug 2017-05-01 23:07:09 +08:00
WMJ bc5e86069a +添加活动的界面除了成员控制 2017-04-29 21:39:06 +08:00
WMJ da31e7b67e 我也不知道这是啥 2017-04-29 15:41:30 +08:00
WMJ 6ea89ab5b2 清除垃圾 2017-04-28 19:10:06 +08:00
WMJ 3391e7f8a6 = = 2017-04-28 19:09:17 +08:00
WMJ 03c26d5e68 active 2017-04-28 19:05:21 +08:00
TurnMeOn 4dc4f40457 ??? 2017-04-27 17:58:29 +08:00
TurnMeOn 0da69d8d12 Add group-query function 2017-04-27 17:57:23 +08:00
TurnMeOn 16d1564759 Fixed xml error 2017-04-27 17:00:25 +08:00
TurnMeOn a4df65bfc7 Change age to birthday in 'person-information.xml' 2017-04-27 16:32:45 +08:00
TurnMeOn 44bfa27176 ??? 2017-04-27 16:22:05 +08:00
TurnMeOn 77efca8d91 Improve age 2017-04-27 00:41:43 +08:00
TurnMeOn ffe914fccf lalala 2017-04-26 23:29:08 +08:00
TurnMeOn 29fa5a98f0 Merge branch 'dev' of https://github.com/WeSayAll/TimeManager into dev 2017-04-26 23:27:48 +08:00
TurnMeOn b707892e3c balabala 2017-04-26 23:27:36 +08:00
TurnMeOn 040248048b ~~~ 2017-04-26 23:02:53 +08:00
TurnMeOn de1272d665 ~~ 2017-04-26 23:02:16 +08:00
YouDad 141ccf0000 Update todo.md
just like this
2017-04-26 15:40:36 +08:00
WMJ a9f1d0fad9 更新plan 2017-04-25 20:03:55 +08:00
WMJ 47a5b06bf8 第一个次合并代码 2017-04-25 19:42:55 +08:00
WMJ 71d16852f7 修正Fragment为v4.Fragment 2017-04-25 19:40:37 +08:00
WMJ a90b5d6588 Merge branch 'dev' of github.com:WeSayAll/TimeManager into dev
必要性
2017-04-25 19:35:04 +08:00
WMJ a18899be35 加入课程对话框 2017-04-25 19:34:41 +08:00
YouDad 08aae655b2 Fix some warning. 2017-04-25 19:29:55 +08:00
YouDad 48ff81eb41 Merge Successed.
Don't forget the original data in the code before using.
The original data in the function:'initializing()'.
2017-04-25 18:52:03 +08:00
WMJ 9e78e26c42 合并代码成功 2017-04-24 20:40:11 +08:00
WMJ 93fb4b8e67 活动基础列表 2017-04-22 12:24:44 +08:00
WMJ a82412f1d4 xml文件模块完成 2017-04-21 11:52:50 +08:00
WMJ 3f6fe23eda test 2017-04-21 09:32:50 +08:00
WMJ 8dc2b70262 通用工具包 2017-04-21 08:51:15 +08:00
230 changed files with 11680 additions and 344 deletions
+6
View File
@@ -0,0 +1,6 @@
.directory
__pycache__
*.pyc
migrations/
db.sqlite3
.idea/
-6
View File
@@ -1,6 +0,0 @@
[Dolphin]
Timestamp=2017,4,18,16,56,55
Version=3
[Settings]
HiddenFilesShown=true
+1 -13
View File
@@ -27,19 +27,7 @@
</value>
</option>
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8 (1)" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" assert-keyword="true" jdk-15="true" project-jdk-name="1.8 (3)" project-jdk-type="JavaSDK" />
<component name="ProjectType">
<option name="id" value="Android" />
</component>
+50
View File
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<<<<<<< HEAD
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8 (3)" project-jdk-type="JavaSDK">
=======
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
>>>>>>> 16cd12839511359600c8b37f390fe09ca2e47d70
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>
-6
View File
@@ -1,6 +0,0 @@
[Dolphin]
Timestamp=2017,4,18,17,18,41
Version=3
[Settings]
HiddenFilesShown=true
+30 -11
View File
@@ -9,23 +9,42 @@ android {
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
jackOptions {
enabled true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
dexOptions {
incremental true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
sourceSets {
main {
res.srcDirs = [
'src/main/res',
'src/main/res/layouts',
'src/main/res/values/activities'
]
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// compile fileTree(include: ['*.jar'], dir: 'libs')
// androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
// exclude group: 'com.android.support', module: 'support-annotations'
// })
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.github.lzyzsd.randomcolor:library:1.0.0'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.android.support:percent:25.3.1'
//compile 'com.android.support.constraint:constraint-layout:1.0.2'
//testCompile 'junit:junit:4.12'
//compile 'com.google.code.findbugs:jsr305:2.0.1'
}
+263
View File
@@ -0,0 +1,263 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="module_app" default="compile.module.app">
<dirname property="module.app.basedir" file="${ant.file.module_app}"/>
<property name="module.jdk.home.app" value="${jdk.home.android_api_25_platform_(1)}"/>
<property name="module.jdk.bin.app" value="${jdk.bin.android_api_25_platform_(1)}"/>
<property name="module.jdk.classpath.app" value="jdk.classpath.android_api_25_platform_(1)"/>
<property name="compiler.args.app" value="-encoding UTF-8 -source 1.7 -target 1.7 ${compiler.args}"/>
<property name="app.output.dir" value="${module.app.basedir}/build/intermediates/classes/debug"/>
<property name="app.testoutput.dir" value="${module.app.basedir}/build/intermediates/classes/test/debug"/>
<path id="app.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="app.module.production.classpath">
<path refid="${module.jdk.classpath.app}"/>
<path refid="library.constraint-layout-1.0.2.classpath"/>
<path refid="library.transition-25.3.1.classpath"/>
<path refid="library.design-25.3.1.classpath"/>
<path refid="library.support-core-ui-25.3.1.classpath"/>
<path refid="library.jsr305-2.0.1.classpath"/>
<path refid="library.support-core-utils-25.3.1.classpath"/>
<path refid="library.support-fragment-25.3.1.classpath"/>
<path refid="library.constraint-layout-solver-1.0.2.classpath"/>
<path refid="library.support-v4-25.3.1.classpath"/>
<path refid="library.support-media-compat-25.3.1.classpath"/>
<path refid="library.recyclerview-v7-25.3.1.classpath"/>
<path refid="library.support-annotations-25.3.1.classpath"/>
<path refid="library.appcompat-v7-25.3.1.classpath"/>
<path refid="library.support-vector-drawable-25.3.1.classpath"/>
<path refid="library.support-compat-25.3.1.classpath"/>
<path refid="library.animated-vector-drawable-25.3.1.classpath"/>
</path>
<path id="app.runtime.production.module.classpath">
<pathelement location="${app.output.dir}"/>
<path refid="library.constraint-layout-1.0.2.classpath"/>
<path refid="library.transition-25.3.1.classpath"/>
<path refid="library.design-25.3.1.classpath"/>
<path refid="library.support-core-ui-25.3.1.classpath"/>
<path refid="library.jsr305-2.0.1.classpath"/>
<path refid="library.support-core-utils-25.3.1.classpath"/>
<path refid="library.support-fragment-25.3.1.classpath"/>
<path refid="library.constraint-layout-solver-1.0.2.classpath"/>
<path refid="library.support-v4-25.3.1.classpath"/>
<path refid="library.support-media-compat-25.3.1.classpath"/>
<path refid="library.recyclerview-v7-25.3.1.classpath"/>
<path refid="library.support-annotations-25.3.1.classpath"/>
<path refid="library.appcompat-v7-25.3.1.classpath"/>
<path refid="library.support-vector-drawable-25.3.1.classpath"/>
<path refid="library.support-compat-25.3.1.classpath"/>
<path refid="library.animated-vector-drawable-25.3.1.classpath"/>
</path>
<path id="app.module.classpath">
<path refid="${module.jdk.classpath.app}"/>
<pathelement location="${app.output.dir}"/>
<path refid="library.runner-0.5.classpath"/>
<path refid="library.espresso-idling-resource-2.2.2.classpath"/>
<path refid="library.constraint-layout-1.0.2.classpath"/>
<path refid="library.hamcrest-library-1.3.classpath"/>
<path refid="library.transition-25.3.1.classpath"/>
<path refid="library.hamcrest-integration-1.3.classpath"/>
<path refid="library.design-25.3.1.classpath"/>
<path refid="library.support-core-ui-25.3.1.classpath"/>
<path refid="library.jsr305-2.0.1.classpath"/>
<path refid="library.support-core-utils-25.3.1.classpath"/>
<path refid="library.support-fragment-25.3.1.classpath"/>
<path refid="library.espresso-core-2.2.2.classpath"/>
<path refid="library.exposed-instrumentation-api-publish-0.5.classpath"/>
<path refid="library.rules-0.5.classpath"/>
<path refid="library.constraint-layout-solver-1.0.2.classpath"/>
<path refid="library.javax.annotation-api-1.2.classpath"/>
<path refid="library.javax.inject-1.classpath"/>
<path refid="library.javawriter-2.1.1.classpath"/>
<path refid="library.support-v4-25.3.1.classpath"/>
<path refid="library.support-media-compat-25.3.1.classpath"/>
<path refid="library.hamcrest-core-1.3.classpath"/>
<path refid="library.junit-4.12.classpath"/>
<path refid="library.recyclerview-v7-25.3.1.classpath"/>
<path refid="library.support-annotations-25.3.1.classpath"/>
<path refid="library.appcompat-v7-25.3.1.classpath"/>
<path refid="library.support-vector-drawable-25.3.1.classpath"/>
<path refid="library.support-compat-25.3.1.classpath"/>
<path refid="library.animated-vector-drawable-25.3.1.classpath"/>
</path>
<path id="app.runtime.module.classpath">
<pathelement location="${app.testoutput.dir}"/>
<pathelement location="${app.output.dir}"/>
<path refid="library.runner-0.5.classpath"/>
<path refid="library.espresso-idling-resource-2.2.2.classpath"/>
<path refid="library.constraint-layout-1.0.2.classpath"/>
<path refid="library.hamcrest-library-1.3.classpath"/>
<path refid="library.transition-25.3.1.classpath"/>
<path refid="library.hamcrest-integration-1.3.classpath"/>
<path refid="library.design-25.3.1.classpath"/>
<path refid="library.support-core-ui-25.3.1.classpath"/>
<path refid="library.jsr305-2.0.1.classpath"/>
<path refid="library.support-core-utils-25.3.1.classpath"/>
<path refid="library.support-fragment-25.3.1.classpath"/>
<path refid="library.espresso-core-2.2.2.classpath"/>
<path refid="library.exposed-instrumentation-api-publish-0.5.classpath"/>
<path refid="library.rules-0.5.classpath"/>
<path refid="library.constraint-layout-solver-1.0.2.classpath"/>
<path refid="library.javax.annotation-api-1.2.classpath"/>
<path refid="library.javax.inject-1.classpath"/>
<path refid="library.javawriter-2.1.1.classpath"/>
<path refid="library.support-v4-25.3.1.classpath"/>
<path refid="library.support-media-compat-25.3.1.classpath"/>
<path refid="library.hamcrest-core-1.3.classpath"/>
<path refid="library.junit-4.12.classpath"/>
<path refid="library.recyclerview-v7-25.3.1.classpath"/>
<path refid="library.support-annotations-25.3.1.classpath"/>
<path refid="library.appcompat-v7-25.3.1.classpath"/>
<path refid="library.support-vector-drawable-25.3.1.classpath"/>
<path refid="library.support-compat-25.3.1.classpath"/>
<path refid="library.animated-vector-drawable-25.3.1.classpath"/>
</path>
<patternset id="excluded.from.module.app">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.app">
<patternset refid="excluded.from.module.app"/>
</patternset>
<path id="app.module.sourcepath">
<dirset dir="${module.app.basedir}">
<include name="build/generated/source/r/debug"/>
<include name="build/generated/source/aidl/debug"/>
<include name="build/generated/source/buildConfig/debug"/>
<include name="build/generated/source/rs/debug"/>
<include name="build/generated/source/apt/debug"/>
<include name="build/generated/res/rs/debug"/>
<include name="build/generated/res/resValues/debug"/>
<include name="src/main/res"/>
<include name="src/main/java"/>
</dirset>
</path>
<path id="app.module.test.sourcepath">
<dirset dir="${module.app.basedir}">
<include name="build/generated/source/r/androidTest/debug"/>
<include name="build/generated/source/aidl/androidTest/debug"/>
<include name="build/generated/source/buildConfig/androidTest/debug"/>
<include name="build/generated/source/rs/androidTest/debug"/>
<include name="build/generated/res/rs/androidTest/debug"/>
<include name="build/generated/res/resValues/androidTest/debug"/>
<include name="src/androidTest/java"/>
<include name="src/test/java"/>
</dirset>
</path>
<target name="compile.module.app" depends="compile.module.app.production,compile.module.app.tests" description="Compile module app"/>
<target name="compile.module.app.production" depends="register.custom.compilers" description="Compile module app; production classes">
<mkdir dir="${app.output.dir}"/>
<javac2 destdir="${app.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.app}/javac">
<compilerarg line="${compiler.args.app}"/>
<bootclasspath refid="app.module.bootclasspath"/>
<classpath refid="app.module.production.classpath"/>
<src refid="app.module.sourcepath"/>
<patternset refid="excluded.from.compilation.app"/>
</javac2>
<copy todir="${app.output.dir}">
<fileset dir="${module.app.basedir}/build/generated/source/r/debug">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.app.basedir}/build/generated/source/aidl/debug">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.app.basedir}/build/generated/source/buildConfig/debug">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.app.basedir}/build/generated/source/rs/debug">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.app.basedir}/build/generated/source/apt/debug">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.app.basedir}/build/generated/res/rs/debug">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.app.basedir}/build/generated/res/resValues/debug">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.app.basedir}/src/main/res">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.app.basedir}/src/main/java">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile.module.app.tests" depends="register.custom.compilers,compile.module.app.production" description="compile module app; test classes" unless="skip.tests">
<mkdir dir="${app.testoutput.dir}"/>
<javac2 destdir="${app.testoutput.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.app}/javac">
<compilerarg line="${compiler.args.app}"/>
<bootclasspath refid="app.module.bootclasspath"/>
<classpath refid="app.module.classpath"/>
<src refid="app.module.test.sourcepath"/>
<patternset refid="excluded.from.compilation.app"/>
</javac2>
<copy todir="${app.testoutput.dir}">
<fileset dir="${module.app.basedir}/build/generated/source/r/androidTest/debug">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.app.basedir}/build/generated/source/aidl/androidTest/debug">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.app.basedir}/build/generated/source/buildConfig/androidTest/debug">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.app.basedir}/build/generated/source/rs/androidTest/debug">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.app.basedir}/build/generated/res/rs/androidTest/debug">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.app.basedir}/build/generated/res/resValues/androidTest/debug">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.app.basedir}/src/androidTest/java">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.app.basedir}/src/test/java">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="clean.module.app" description="cleanup module">
<delete dir="${app.output.dir}"/>
<delete dir="${app.testoutput.dir}"/>
</target>
</project>
@@ -7,7 +7,7 @@ import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
/**
* Instrumentation test, which will execute on an Android device.
+10 -3
View File
@@ -2,22 +2,29 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="wesayallright.timemanager">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
>
android:theme="@style/AppTheme">
<activity android:name=".surface.MainActivity">
<activity android:name="wesayallright.timemanager.surface.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
</manifest>
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="wesayallright.timemanager">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
<<<<<<< HEAD
android:theme="@style/AppTheme"
>
=======
android:theme="@style/AppTheme">
>>>>>>> c9a922cf064797d1e97c964849b8d934f2b2141f
<activity android:name="wesayallright.timemanager.surface.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
@@ -0,0 +1,28 @@
package wesayallright.timemanager.InnerLayer.Activities;
import android.util.Log;
import java.util.ArrayList;
import wesayallright.timemanager.InnerLayer.Package;
/**
* Created by mj on 17-4-25.
* 活动列表
*/
public class ActivityList {
public ArrayList<String> activityList;
public ActivityList() {
if (Package.debug) {
for(int i = 0; i < 20; i++) {
activityList.add("A"+i);
}
}
else {
Log.e("ERROR", "还没写");
}
}
}
@@ -1,20 +1,38 @@
package wesayallright.timemanager.InnerLayer.Group;
import org.w3c.dom.Element;
import java.util.ArrayList;
import wesayallright.timemanager.InnerLayer.LocalFile.DOMParser;
/**
* Created by mj on 17-4-16.
* 群组类
*/
public class Group {
private enum Privilege {owner, manager, member}
public String name;
public String id;
public String[] members;
public String[] managers;
public ArrayList<String> members;
public ArrayList<String> managers;
public String owner;
public boolean visible;
public boolean fullDetail;
private Privilege whatsme;
public Group(String groupId) {
id = groupId;
}
static Group simpleAdd(Element n) {
DOMParser.printXML(n);
Group group = new Group(n.getAttribute("id"));
group.name = n.getAttribute("name");
group.visible = Boolean.valueOf(n.getAttribute("visible"));
group.whatsme = Privilege.valueOf(n.getAttribute("privilege"));
group.fullDetail = false;
return group;
}
}
@@ -1,10 +1,7 @@
package wesayallright.schedule.InnerLayer.Group;
package wesayallright.timemanager.InnerLayer.Group;
import java.util.Iterator;
import wesayallright.timemanager.InnerLayer.Group.Group;
import wesayallright.timemanager.InnerLayer.Group.GroupList;
/**
* Created by mj on 17-4-16.
* 群组类的迭代器
@@ -31,13 +28,13 @@ public class GroupIterator implements Iterator {
public void reset() {
index = 0;
max = g.groupList.length;
max = g.groupList.size();
lastChange = g.changedTimes;
}
public Group next() {
isAvailable();
return g.groupList[index++];
return g.groupList.get(index++);
}
public boolean hasNext() {
@@ -1,6 +1,19 @@
package wesayallright.timemanager.InnerLayer.Group;
import wesayallright.timemanager.InnerLayer.Group.Group;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Locale;
import wesayallright.timemanager.InnerLayer.LocalFile.DOMParser;
import wesayallright.timemanager.InnerLayer.Package;
import wesayallright.timemanager.InnerLayer.exception.NotThisUserException;
/**
* Created by mj on 17-4-16.
@@ -9,11 +22,27 @@ import wesayallright.timemanager.InnerLayer.Group.Group;
public class GroupList {
public Group[] groupList;
public ArrayList<Group> groupList;
public int changedTimes;
public Date updateTime;
public GroupList() {
public GroupList(Document groupXML) throws NotThisUserException, ParseException {
Element rootElement = groupXML.getDocumentElement();
DateFormat dateTimeFormat = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.CHINA);
// 设置修改时间
if (! Package.currentUser.userId.equals(rootElement.getAttribute("belongs"))) {
DOMParser.printXML(rootElement);
throw new NotThisUserException();
}
updateTime = dateTimeFormat.parse(rootElement.getAttribute("updateTime"));
// 循环添加每一个项目
NodeList groups = rootElement.getElementsByTagName("group");
groupList = new ArrayList<>();
for (int i = 0; i < groups.getLength(); i++) {
groupList.add(Group.simpleAdd((Element)groups.item(i)));
}
changedTimes = 0;
}
}
@@ -0,0 +1,36 @@
package wesayallright.timemanager.InnerLayer.Item;
/**
* Created by mj on 17-5-9.
* 每个项目
*/
public class Item {
public String week;
public int day;
public int starthour;
public int startmin;
public int endhour;
public int endmin;
public String name;
public String room;
public String teacher;
public int color;
public String id;
public int priority;//0:normal 1:course 2:alert
private static final String TAG = "Course";
Item(String week, int day, int starthour, int startmin, int endhour, int endmin, String name, String room, String teacher, int color, int priority) {
this.week = week;
this.day = day;
this.starthour = starthour;
this.startmin = startmin;
this.endhour = endhour;
this.endmin = endmin;
this.name = name;
this.room = room;
this.teacher = teacher;
this.color = color;
this.priority = priority;
}
}
@@ -0,0 +1,147 @@
package wesayallright.timemanager.InnerLayer.Item;
import android.support.v4.util.Pair;
import android.util.Log;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import wesayallright.timemanager.InnerLayer.ItemType;
import wesayallright.timemanager.InnerLayer.Package;
import static wesayallright.timemanager.InnerLayer.Package.*;
/**
* Created by mj on 17-5-9.
* 每一个日历项目
*/
public class ItemList {
ArrayList<Item> itemLsit = new ArrayList<>();
void readItem() {
try {
Calendar c = Calendar.getInstance();
ArrayList<Integer>[] expectWeekday = new ArrayList[7];
for (int i = 0; i < 7; i++)
expectWeekday[i] = new ArrayList<>();
Element rootElement = calendarXMLTree.getDocumentElement();
int schoolWeek = Integer.valueOf(rootElement.getAttribute("schoolWeek"));
NodeList items = rootElement.getElementsByTagName("item");
for (int i = 0; i < items.getLength(); i++) {
Element item = (Element) items.item(i);
ItemType type = ItemType.valueOf(item.getAttribute("type"));
String id = item.getAttribute("id");
String name = item.getAttribute("name");
int priority = Integer.valueOf(item.getAttribute("priority"));
String detail = item.getAttribute("details");
Date firstDate = dateFormatter.parse(item.getAttribute("firstDate"));
Date lastDate = dateFormatter.parse(item.getAttribute("lastDate"));
//first date and last date are both includes
// 获得起始和结束的星期(相对)
c.setTime(firstDate);
int firstWeek = c.get(Calendar.WEEK_OF_YEAR) - schoolWeek + 2; // 获得的week是从0开始
c.setTime(lastDate);
int lastWeek = c.get(Calendar.WEEK_OF_YEAR) - schoolWeek + 2;
if (type == ItemType.Course) {
detail = detail.split(":")[1]; // 教师: 小明
}
NodeList expectList = item.getElementsByTagName("expectTimes");
NodeList exTime = expectList.item(0).getChildNodes();
for (int ii = 0; ii < 7; ii++)
expectWeekday[ii].clear();
for (int k = 0; k < exTime.getLength(); k++) {
Element x = (Element) exTime.item(k);
c.setTime(dateFormatter.parse(x.getAttribute("time")));
int w = c.get(Calendar.WEEK_OF_YEAR) + 1;
int d = c.get(Calendar.DAY_OF_WEEK) - 1;
d = d == 0 ? 7 : d; // 这里获得的星期1-7分别对应日-六, 所以这样转换.
expectWeekday[d - 1].add(w);
}
for (int ii = 0; ii < 7; ii++) {
expectWeekday[ii].sort((e1, e2) -> e1.compareTo(e2));
}
NodeList timeList = item.getElementsByTagName("time");
for (int j = 0; j < timeList.getLength(); j++) {
Element time = (Element) timeList.item(j);
int day = Integer.valueOf(time.getAttribute("day"));
int startHour = Integer.valueOf(time.getAttribute("startTime").split("-")[0]);
int startMinute = Integer.valueOf(time.getAttribute("startTime").split("-")[1]);
int endHour = Integer.valueOf(time.getAttribute("endTime").split("-")[0]);
int endMinute = Integer.valueOf(time.getAttribute("endTime").split("-")[1]);
StringBuilder week = new StringBuilder();
for (int count = 0; count < expectWeekday[day - 1].size(); count++) {
if (expectWeekday[day - 1].get(count) < firstWeek)
continue;
if(expectWeekday[day - 1].get(count) > lastWeek)
break;
if (count == 0) {
if (expectWeekday[day - 1].get(0) != firstWeek) {
week.append(Integer.toString(firstWeek));
week.append(Integer.toString(expectWeekday[day - 1].get(0) - 1));
}
}
else if(expectWeekday[day - 1].get(count)-expectWeekday[day - 1].get(count - 1) != 1) {
week.append(expectWeekday[day - 1].get(count) - 1);
}
if (count != expectWeekday[day - 1].size() - 1 ) {
if (expectWeekday[day - 1].get(count + 1)-expectWeekday[day - 1].get(count) != 1)
week.append(expectWeekday[day - 1].get(count) + 1);
}
else {
if (expectWeekday[day - 1].get(count) < lastWeek) {
week.append(expectWeekday[day-1].get(count) + 1);
}
if (expectWeekday[day - 1].get(count) != lastWeek) {
week.append(Integer.toString(lastWeek));
}
}
}
itemLsit.add(
new Item(
week.toString(), //schoolWeek + j, TODO:星期为啥是String
day,
startHour,
startMinute,
endHour,
endMinute,
name,
time.getAttribute("place"),
detail,
0xffffffff,// TODO: color
priority
)
);
}
}
} catch (ParseException e) {
e.printStackTrace();
Log.e("读取ITEM", "解析日期错误");
}
}
}
@@ -0,0 +1,10 @@
package wesayallright.timemanager.InnerLayer;
/**
* Created by mj on 17-5-9.
* 每个项目的类型, 有课程, 活动, 目标
*/
public enum ItemType {
Course, Activity, Target
}
@@ -1,12 +1,23 @@
package wesayallright.timemanager.InnerLayer.LocalFile;
import android.util.Log;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
/**
* 用于解析xml文件
@@ -21,10 +32,38 @@ public class DOMParser {
//DOM parser instance
DocumentBuilder builder = BuildFactory.newDocumentBuilder();
//parse an XML file into a DOM tree
Log.i("ParseXML", f.getAbsolutePath());
document = builder.parse(f);
} catch (ParserConfigurationException|SAXException|IOException e) {
e.printStackTrace();
}
return document;
}
/**
* 输出完整xml文件
* @param e
*/
public static void printXML(Document e) {
try {
TransformerFactory tf = TransformerFactory.newInstance();
Transformer t = tf.newTransformer();
ByteArrayOutputStream bos = new ByteArrayOutputStream();
t.transform(new DOMSource(e), new StreamResult(bos));
System.out.println(bos.toString());
} catch (TransformerException e1) {
e1.printStackTrace();
}
}
public static void printXML(Element e) {
try {
TransformerFactory tf = TransformerFactory.newInstance();
Transformer t = tf.newTransformer();
ByteArrayOutputStream bos = new ByteArrayOutputStream();
t.transform(new DOMSource(e), new StreamResult(bos));
System.out.println(bos.toString());
} catch (TransformerException e1) {
e1.printStackTrace();
}
}
}
@@ -2,22 +2,22 @@ package wesayallright.timemanager.InnerLayer.LocalFile;
import org.w3c.dom.Document;
import wesayallright.timemanager.InnerLayer.exception.WrongID;
/**
* Created by mj on 17-4-16.
* 文件类,所有对文件的操作均通过此类实现
*/
public class LocalFile extends java.io.File{
private static String workPath; // 本程序执行时的位置,由MainActivity获取
private static String workPath;
// 本程序执行时的位置,由MainActivity获取
public LocalFile(String fname) {
super(workPath + "/" +
((fname.charAt(0) == 'U')?"User/":
(fname.charAt(0)=='G')?"Group/":
(fname.charAt(0) == 'C')?"Calendar/":"BadDir") + fname);
super(workPath + "/" + fname);
// holy shit。按编号分文件夹!
}
public void setCwd(String cwd) {
static public void setCwd(String cwd) {
workPath = cwd;
}
@@ -25,4 +25,32 @@ public class LocalFile extends java.io.File{
return new DOMParser().parse(this);
}
public static LocalFile loadUser(String userId) throws WrongID {
if (userId.charAt(0) != 'U') {
throw new WrongID(userId);
}
return new LocalFile("users" + "/" + "user_" + userId + ".xml");
}
public static LocalFile loadCalendar(String userId) throws WrongID {
if (userId.charAt(0) != 'U') {
throw new WrongID(userId);
}
return new LocalFile("calendars" + "/" + "cal_" + userId + ".xml");
}
public static LocalFile loadGroupList(String userId) throws WrongID {
if (userId.charAt(0) != 'U') {
throw new WrongID(userId);
}
return new LocalFile("groupList" + "/" + "gpl_" + userId + ".xml");
}
public static LocalFile loadGroup(String groupId) throws WrongID {
if (groupId.charAt(0) != 'G') {
throw new WrongID(groupId);
}
return new LocalFile("group/" + "gp_" + groupId + ".xml");
}
}
@@ -7,7 +7,7 @@ package wesayallright.timemanager.InnerLayer;
public class Location {
public String country;
//public String country;
public String province;
public String city;
public String zipCode;
@@ -23,6 +23,10 @@ public class Location {
city = sp[1];
}
public void setZipCode(String z) {
zipCode = z;
}
public String toString() {
return this.province + "-" + this.city;
}
@@ -1,36 +1,170 @@
package wesayallright.timemanager.InnerLayer.Network;
import android.accounts.NetworkErrorException;
import android.util.Log;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.Socket;
import java.net.URL;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
* Created by mj on 17-4-16.
* 与网络相关的一些操作
*/
public class NetWork {
private static String addr;
public class NetWork{
private static String host;
private static int port;
private static boolean connected;
public NetWork() {}
public boolean finished = false;
public String result;
public void setAddress(String s) {
addr = s;
NetWork.host = s;
}
public void setAddress() {
NetWork.host = "127.0.0.1";
NetWork.port = 9999;
}
// 登陆,登陆成功返回用户ID,失败抛异常
public String login(String identified, String password) {
return "P1234567";
return "U1234567";
}
public void downloadUserInformation(String userid) {
// TODO:下载
static public void downloadUserInformation(String userid) throws UnsupportedEncodingException {
request("user_" + userid + ".xml");
}
public void uploadUserInformation(String userid) {
static public void downlocaUserCalendar(String userid) throws UnsupportedEncodingException {
request("cal_" + userid + ".xml");
}
static public void downloadUserGroupList(String userid) throws UnsupportedEncodingException {
request("gpl" + userid + ".xml");
}
static public void request(String requestFile) throws UnsupportedEncodingException {
byte[] fnameBytes = new byte[128];
byte[] fnameLengthBytes = new byte[16];
byte[] fsizeBytes = new byte[8];
byte[] md5Bytes = new byte[32];
byte[] endSign = new byte[3];
try {
Socket sock = new Socket(NetWork.host, NetWork.port);
Log.i("Network", "Connected successful"); // 连接到服务器
DataInputStream is = new DataInputStream(sock.getInputStream()); // 创建读取数据流
DataOutputStream os =new DataOutputStream(sock.getOutputStream()); // 发送数据流
ByteBuffer requestFileBytes = ByteBuffer.allocate(128); // 要下载的文件名数据缓冲,128字节
requestFileBytes.put(requestFile.getBytes()); // 把文件名转化成字节数组
os.write(requestFileBytes.array()); // 发送数据
byte[] header = new byte[179];
// header长179字节, 128字节文件名, 8字节文件名长度, 8字节文件长度, 32字节MD5, 3字节EOS
//is.read(header); // 读取header
is.read(fnameBytes); // 读入文件名
is.read(fnameLengthBytes); // 读入文件名长度
is.read(fsizeBytes); // 读入 文件大小
is.read(md5Bytes); // 读入MD5
is.read(endSign); // 读入结束符
String fname = new String(fnameBytes, "utf8");
long fnameLength = toInteger(fnameLengthBytes, 8);
long fsize = toInteger(fsizeBytes, 8);
String md5 = new String(md5Bytes, "utf8");
if (!(new String(endSign, "utf8")).equals("EOS")) {
// 如果结束符不是EOS,说明传输遇到问题
throw new NetworkErrorException();
}
Log.i("文件Header:", "文件名:" + fname);
Log.i("文件Header:", "文件名长度:" + fnameLength);
Log.i("文件Header:", "文件大小:" + fsize);
Log.i("文件Header:", "md5:" + md5);
byte[] buffer = new byte[128];
long recvSize = 0;
File f = new File(requestFile);
if (!f.exists())
if (! f.createNewFile()) {
throw new UnknownError();
}
FileOutputStream of = new FileOutputStream(f);
while (recvSize < fsize) {
is.read(buffer);
of.write(buffer);
recvSize += 1024;
}
Log.i("接收文件", "接收文件" + requestFile + "成功");
of.close();
} catch (IOException | NetworkErrorException | UnknownError e) {
if(e.equals(new NetworkErrorException())) {
Log.e("网络错误", "接收文件header失败");
Log.e("文件Header:", "文件名:" + (new String(fnameBytes, "utf8")));
Log.e("文件Header:", "文件名长度:" + toInteger(fnameLengthBytes, 8));
Log.e("文件Header:", "文件大小:" + toInteger(fsizeBytes, 8));
Log.e("文件Header:", "md5:" + (new String(md5Bytes, "utf8")));
Log.e("文件Header:", "结束符:" + (new String(endSign, "utf8")));
}
e.printStackTrace();
}
}
static public void uploadUserInformation(String userid) {
// TODO: 上传
}
public Date remoteUserInformationUpdateTime(String userid) {
static public Date remoteUserInformationUpdateTime(String userid) {
// TODO: 远程个人信息更新时间
return null;
}
private static long toInteger(byte[] b, int n) {
long ans = 0;
/*
for (int i = 0; i < n; i++) {
for (int j = 0; j < 8; j++) {
if ((b[i] & (0x80 >> j)) != 0)
System.out.print('1');
else
System.out.print('0');
}
System.out.print(" ");
}
System.out.print('\n');
*/
ans = 0;
for (int i = n - 1; i >= 0; i--) {
ans |= b[i] << i * 8;
}
return ans;
}
}
@@ -0,0 +1,125 @@
package wesayallright.timemanager.InnerLayer.Network;
import android.annotation.TargetApi;
import android.content.res.Resources;
import android.os.Build;
import android.provider.Settings;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* Created by mj on 17-5-2.
* 发送POST请求
*/
public class SendPost extends Thread{
public boolean finish;
public String result;
private HashMap<String, String> params;
private String addr;
private String url;
public SendPost() {
params = new HashMap<>();
url = "127.0.0.1:8080";
}
public void setUri(String uri) {
switch (addr = url + '/' + uri) {
}
}
public void addParam(String key, String value) {
params.put(key, value);
}
public void addParam(HashMap<String, String> m) {
params.putAll(m);
}
@TargetApi(Build.VERSION_CODES.N)
private String makeRequestNew()
{
return params.entrySet().stream()
.map(e -> e.getKey() + " - " + e.getValue())
.collect(Collectors.joining("&"));
}
private String makeRequestOld()
{
StringBuilder request = new StringBuilder();
Iterator<Map.Entry<String, String>> entry = params.entrySet().iterator();
while(entry.hasNext()) {
Map.Entry i = entry.next();
request.append(i.getKey() + "=" + i.getValue());
if (entry.hasNext())
request.append("&");
}
return new String(request);
}
@Override
public void run() {
finish = false;
try {
String sd;
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) // API24以上才能使用joining方法
sd = makeRequestNew();
else
sd = makeRequestOld();
URL url = new URL(addr);
HttpURLConnection con = (HttpURLConnection)url.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("User-Agent", "Mozilla/5.0");
con.setRequestProperty("Accept-Language", "en-US,en;q=0.5");
con.setDoOutput(true);
con.setDoInput(true);
OutputStream o = con.getOutputStream();
o.write(sd.getBytes("UTF-8"));
o.flush();
o.close();
int responseCode = con.getResponseCode();
System.out.println("\nSending 'POST' request to URL : " + url);
System.out.println("Post parameters : " + addr);
System.out.println("Response Code : " + responseCode);
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
//打印结果
System.out.println(response.toString());
result = response.toString();
} catch (IOException e) {
result = "fail";
e.printStackTrace();
}
finish = true;
}
}
@@ -0,0 +1,117 @@
package wesayallright.timemanager.InnerLayer.Network;
import android.annotation.TargetApi;
import android.os.Build;
import android.text.AndroidCharacter;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.stream.Collector;
import java.util.stream.Collectors;
/**
* Created by mj on 17-5-9.
* 用于向服务器发送Get请求
*/
public class SentGet extends Thread{
public String result;
public boolean finish;
private HashMap<String, String> params;
private String addr;
private String url;
public SentGet() {
super();
params = new HashMap<>();
url = "127.0.0.1:8000";
}
public void addParam(String key, String value) {
params.put(key, value);
}
public void addParam(HashMap <String, String> m) {
params.putAll(m);
}
public void setUri(String u) {
addr = url + '/' + u;
}
@TargetApi(Build.VERSION_CODES.N)
private String makeRequestNew()
{
return params.entrySet().stream()
.map(e -> e.getKey() + " - " + e.getValue())
.collect(Collectors.joining("&"));
}
private String makeRequestOld()
{
StringBuilder request = new StringBuilder();
Iterator<Map.Entry<String, String>> entry = params.entrySet().iterator();
while(entry.hasNext()) {
Map.Entry i = entry.next();
request.append(i.getKey() + "=" + i.getValue());
if (entry.hasNext())
request.append("&");
}
return new String(request);
}
@Override
public void run() {
finish = false;
try {
String request;
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
request = makeRequestNew();
else
request = makeRequestOld();
URL url = new URL(addr + "?" + request);
HttpURLConnection con = (HttpURLConnection)url.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("User-Agent", "Mozilla/5.0");
con.setRequestProperty("Accept-Language", "en-US,en;q=0.5");
con.setDoInput(true);
int responseCode = con.getResponseCode();
System.out.println("\nSending 'POST' request to URL : " + url);
System.out.println("Post parameters : " + addr);
System.out.println("Response Code : " + responseCode);
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
//打印结果
System.out.println(response.toString());
result = response.toString();
} catch (IOException e) {
result = "fail";
e.printStackTrace();
}
finish = true;
}
}
@@ -0,0 +1,28 @@
package wesayallright.timemanager.InnerLayer;
import android.database.sqlite.SQLiteDatabase;
import org.w3c.dom.Document;
import java.text.DateFormat;
import java.util.Calendar;
/**
* Created by mj on 17-4-19.
* 全局变量类
*/
public class Package {
public static Document calendarXMLTree;
//public static GroupList groups;
public static User currentUser;
public static boolean debug;
public static DateFormat dateFormatter;
public static DateFormat timeFormatter;
public static DateFormat dateTimeFormatter;
public static Calendar today;
public static SQLiteDatabase db;
public static final String DB_NAME = "timeManager.db";
}
@@ -1,14 +1,23 @@
package wesayallright.timemanager.InnerLayer;
import android.provider.DocumentsContract;
import android.util.Log;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import java.io.UnsupportedEncodingException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import wesayallright.timemanager.InnerLayer.Group.GroupList;
import wesayallright.timemanager.InnerLayer.LocalFile.DOMParser;
import wesayallright.timemanager.InnerLayer.LocalFile.LocalFile;
import wesayallright.timemanager.InnerLayer.Network.NetWork;
import java.util.Date;
import wesayallright.timemanager.InnerLayer.Group.GroupList;
import wesayallright.timemanager.InnerLayer.exception.NotThisUserException;
import wesayallright.timemanager.InnerLayer.exception.WrongID;
/**
* Created by mj on 17-4-16.
@@ -17,7 +26,7 @@ import wesayallright.timemanager.InnerLayer.Group.GroupList;
public class User {
private enum Sex {male, female};
private enum Sex {male, female}
public Date updateTime;
@@ -28,51 +37,54 @@ public class User {
public int age;
public Sex sex;
public String studentId;
public String phone;
public String email;
public String schoolId;
public String schoolName;
public String major;
public int grade;
public Date enrollDate;
public GroupList groups;
//CalendarList calendar;
// CalendarList calendar;
// 空的构造函数
public User() {}
// 登陆
public static User signIn(String identified, String password) {
public static User signIn(String identified, String password) throws UnsupportedEncodingException {
User u = new User();
NetWork n = new NetWork();
try {
u.userId = n.login(identified, password);
} catch(Exception e) {
} catch (Exception e) {
// TODO:登陆失败重新登陆(继续向上抛异常,交给界面层处理)
e.printStackTrace();
}
u.update();// 更新这个人的信息
u.loadInformation(); // 读取和整理个人信息,包括群组列表
//u.update();// 更新这个人的信息
Package.currentUser = u;
return u;
}
// 注册
public static User signUp(String identified, String password, String email) {
public static User signUp(String identified, String password, String email) throws UnsupportedEncodingException {
// TODO: 注册
User u = new User();
return u;
return signIn(identified, password);
}
// 同步数据
public void update() {
NetWork n = new NetWork();
public void update() throws UnsupportedEncodingException {
if (updateTime == null) {
n.downloadUserInformation(userId);
NetWork.downloadUserInformation(userId);
} else {
Date remoteDate = n.remoteUserInformationUpdateTime(userId);
Date remoteDate = NetWork.remoteUserInformationUpdateTime(userId);
if (updateTime.before(remoteDate)) {
// 如果本地时间比远程时间早,则下载
n.downloadUserInformation(userId);
} else {
NetWork.downloadUserInformation(userId);
} else { // TODO:相等时间
// 本地比远程新,上传
n.uploadUserInformation(userId);
NetWork.uploadUserInformation(userId);
}
}
@@ -84,4 +96,88 @@ public class User {
public boolean save() {
return false;
}
// 读取个人信息
public void loadInformation() throws UnsupportedEncodingException {
Package.currentUser = this; // 把当前登陆的用户保存到Package中
// 从服务器上下载文件
// TODO:网络模块
// NetWork.downloadUserInformation(userId);
// NetWork.downlocaUserCalendar(userId);
// NetWork.downloadUserGroupList(userId);
// 在本地加载文件
try {
Log.i("User at here", userId);
LocalFile userInformation = LocalFile.loadUser(userId);
LocalFile userCalendar = LocalFile.loadCalendar(userId);
LocalFile userGroupList = LocalFile.loadGroupList(userId);
if (!userInformation.exists()) {
Log.e("FILE", "文件不存在");
}
// 解析XML成Document
Document userXML = (new DOMParser()).parse(userInformation);
Document calendarXML = (new DOMParser()).parse(userCalendar);
Document groupXML = (new DOMParser()).parse(userGroupList);
// 从XML中读入数据
Package.calendarXMLTree = calendarXML; // 陆文辉非要用course数组
setValue(userXML);
groups = new GroupList(groupXML);
} catch (WrongID e) {
Log.i("WrongID", "loadInformation: " + e.id);
e.printStackTrace();
} catch (ParseException | NotThisUserException e) {
e.printStackTrace();
}
}
/**
* 把xml中的内容读到user类的属性中
*/
private void setValue(Document userXML) throws NotThisUserException, ParseException {
Element rootElement = userXML.getDocumentElement();
DateFormat dateTimeFormat = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.CHINA);
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA);
updateTime = dateTimeFormat.parse(rootElement.getAttribute("updateTime"));
if(! userId.equals(rootElement.getAttribute("id"))) {
throw new NotThisUserException();
}
nickName = rootElement.getAttribute("nickname");
realName = rootElement.getAttribute("realname");
age = Integer.valueOf(rootElement.getAttribute("age"));
sex = Sex.valueOf(rootElement.getAttribute("sex")); // 厉害了,我的枚举
phone = rootElement.getAttribute("mobile");
email = rootElement.getAttribute("email");
schoolId = rootElement.getAttribute("schoolID");
schoolName = rootElement.getAttribute("schoolName");
location = new Location(rootElement.getAttribute("location"));
location.setZipCode(rootElement.getAttribute("zipCode"));
major = rootElement.getAttribute("major");
grade = Integer.valueOf(rootElement.getAttribute("grade"));
enrollDate = dateFormat.parse(rootElement.getAttribute("enrollDate"));
studentId = rootElement.getAttribute("studentID");
}
public void printClass() {
Log.i("PRINTUSER",
"nickname=" + nickName + "\n" +
"realName" + realName + "\n" +
"age" + age + "\n" +
//"sex" + sex.toString() + "\n" +
"phone" + phone + "\n" +
"email" + email + "\n" +
"schoolID" + schoolId + "\n" +
"schoolName" + schoolName + "\n" +
"major" + major + "\n" +
"grade" + grade + "\n");
}
}
@@ -0,0 +1,9 @@
package wesayallright.timemanager.InnerLayer.exception;
/**
* Created by mj on 17-4-19.
* 打开的文件不属于这个用户
*/
public class NotThisUserException extends Exception {
}
@@ -0,0 +1,13 @@
package wesayallright.timemanager.InnerLayer.exception;
/**
* Created by mj on 17-4-19.
* 错误id
*/
public class WrongID extends Exception {
public String id;
public WrongID (String id1) {
this.id = id1;
}
}
@@ -0,0 +1,173 @@
package wesayallright.timemanager.db;
import android.annotation.TargetApi;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.os.Build;
import android.util.Log;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
/**
* Created by mj on 17-5-11.
* 事务数据库模型
*/
public class DAO {
private SQLiteOpenHelper helper;
private String TABLE_NAME;
@TargetApi(Build.VERSION_CODES.KITKAT)
public DAO(Context c, Class helper, String TABLE_NAME) {
try {
Constructor helper_constructor = helper.getConstructor(Context.class);
this.helper = (SQLiteOpenHelper)helper_constructor.newInstance(c);
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException | InstantiationException e) {
e.printStackTrace();
}
this.TABLE_NAME = TABLE_NAME;
}
@TargetApi(19)
public Object[] where(Object o, Context context, String key, String operator, String value) {
try(SQLiteDatabase db = helper.getWritableDatabase()) {
Class c = o.getClass();
String sql = "Select * from " + TABLE_NAME + " where ? ? ? ";
try(Cursor cursor = db.rawQuery(sql, new String[]{key, operator, value})) {
int count = cursor.getCount();
Object[] ret = new Object[count];
for (int i = 0; i < count; i++) {
String name = cursor.getColumnName(i);
Constructor constructor = c.getDeclaredConstructor(Context.class);
Object affair = constructor.newInstance(context);
Field f = affair.getClass().getField(name);
f.setAccessible(true);
switch (cursor.getType(i)) {
case Cursor.FIELD_TYPE_BLOB:
f.set(affair, cursor.getBlob(i));
break;
case Cursor.FIELD_TYPE_FLOAT:
f.set(affair, cursor.getFloat(i));
break;
case Cursor.FIELD_TYPE_INTEGER:
f.set(affair, cursor.getInt(i));
break;
case Cursor.FIELD_TYPE_NULL:
f.set(affair, null);
break;
case Cursor.FIELD_TYPE_STRING:
f.set(affair, cursor.getString(i));
break;
}
ret[i] = affair;
}
return ret;
}
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
@TargetApi(19)
public void saveOrInsert(Object o) {
try (SQLiteDatabase db = helper.getWritableDatabase()){
Class c = o.getClass();
Field f = c.getField("id");
String sql = "Select * from " + TABLE_NAME + " Where id = ?";
try( Cursor cursor = db.rawQuery(sql, new String[]{String.valueOf(f.getInt(o))})) {
if (cursor.getCount() == 0) {
insert(o);
} else {
save(o);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
@TargetApi(19)
public void save(Object o) {
try (SQLiteDatabase db = helper.getWritableDatabase()){
Class c = o.getClass();
StringBuilder sql = new StringBuilder("update " + TABLE_NAME + "set ");
Field[] fields = c.getDeclaredFields();
Integer id = null;
for (Field f : fields) {
if (f.getModifiers() != Modifier.PUBLIC)
continue;
String name = f.getName();
Class type = f.getType();
Method valueOf = type.getDeclaredMethod("valueOf", String.class);
if (name.equals( "id")) {
id = (Integer)valueOf.invoke(type, String.class);
} else {
sql.append(name)
.append("=")
.append((String) valueOf.invoke(type, f.get(o)))
.append(" ");
}
}
if (id == null) throw new Exception("数据库写入失败:id为空");
sql.append(" where id = ").append(id);
Log.i("save", sql.toString());
db.rawQuery(sql.toString(), new String[]{});
} catch (Exception e) {
e.printStackTrace();
}
}
@TargetApi(19)
public void insert(Object o) {
try (SQLiteDatabase db = helper.getWritableDatabase()){
Class c = o.getClass();
String sql_head = "insert into " + TABLE_NAME + " ";
StringBuilder keys = new StringBuilder();
StringBuilder values = new StringBuilder();
StringBuilder tail = new StringBuilder();
Field[] fields = c.getDeclaredFields();
Integer id = null;
for (Field f : fields) {
if (f.getModifiers() != Modifier.PUBLIC)
continue;
String name = f.getName();
Class type = f.getType();
Method valueOf = type.getDeclaredMethod("valueOf", String.class);
if (name.equals( "id")) {
id = (Integer)valueOf.invoke(type, String.class);
} else {
keys.append(name).append(" ");
values.append((String) valueOf.invoke(type, f.get(o))).append(" ");
}
}
if (id == null) throw new Exception("数据库写入失败:id为空");
tail.append(" where id = ").append(id);
String sql = sql_head + " ( " + keys.toString() + " ) VALUES (" + values.toString() + " ) " + tail;
Log.i("save", sql);
db.rawQuery(sql, new String[]{});
} catch (Exception e) {
e.printStackTrace();
}
}
@TargetApi(19)
public void delete(Object o) {
try(SQLiteDatabase db = helper.getWritableDatabase()) {
Class c = o.getClass();
Field f = c.getDeclaredField("id");
db.rawQuery("delete from" + TABLE_NAME + "where id = ?" , new String[]{String.valueOf(f.getInt(o))});
} catch (Exception e) {
e.printStackTrace();
}
}
}
@@ -0,0 +1,50 @@
package wesayallright.timemanager.db.Models;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import java.util.Date;
import wesayallright.timemanager.db.DAO;
import wesayallright.timemanager.db.dbHelper.Affairs_migration;
/**
* MyModel 自动生成 at: 2017-05-13 17:46:14
*
*/
public class Affairs extends DAO {
private SQLiteDatabase db;
private Affairs_migration helper;
public String name;
public String place;
public String details;
public User organizer_index;
public Integer id;
public Affairs(Context c) {
super(c, Affairs_migration.class, Affairs_migration.TABLE_NAME);
helper = new Affairs_migration(c);
db = helper.getWritableDatabase();
}
public void save() {
super.saveOrInsert(this);
}
public void insert() {
super.insert(this);
}
public void delete() {
super.delete(this);
}
public int valueOf() {
return id;
}
}
@@ -0,0 +1,51 @@
package wesayallright.timemanager.db.Models;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import java.util.Date;
import wesayallright.timemanager.db.DAO;
import wesayallright.timemanager.db.dbHelper.Group_migration;
/**
* MyModel 自动生成 at: 2017-05-13 17:46:14
*
*/
public class Group extends DAO {
private SQLiteDatabase db;
private Group_migration helper;
public String group_id;
public String name;
public String introduction;
public Date establish_date;
public Date update_date;
public Integer id;
public Group(Context c) {
super(c, Group_migration.class, Group_migration.TABLE_NAME);
helper = new Group_migration(c);
db = helper.getWritableDatabase();
}
public void save() {
super.saveOrInsert(this);
}
public void insert() {
super.insert(this);
}
public void delete() {
super.delete(this);
}
public int valueOf() {
return id;
}
}
@@ -0,0 +1,50 @@
package wesayallright.timemanager.db.Models;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import java.util.Date;
import wesayallright.timemanager.db.DAO;
import wesayallright.timemanager.db.dbHelper.Group_User_migration;
/**
* MyModel 自动生成 at: 2017-05-13 17:46:14
*
*/
public class Group_User extends DAO {
private SQLiteDatabase db;
private Group_User_migration helper;
public Group group_index;
public User user_index;
public Boolean visible;
public Date update_time;
public Integer id;
public Group_User(Context c) {
super(c, Group_User_migration.class, Group_User_migration.TABLE_NAME);
helper = new Group_User_migration(c);
db = helper.getWritableDatabase();
}
public void save() {
super.saveOrInsert(this);
}
public void insert() {
super.insert(this);
}
public void delete() {
super.delete(this);
}
public int valueOf() {
return id;
}
}
@@ -0,0 +1,48 @@
package wesayallright.timemanager.db.Models;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import java.util.Date;
import wesayallright.timemanager.db.DAO;
import wesayallright.timemanager.db.dbHelper.HaveAffair_migration;
/**
* MyModel 自动生成 at: 2017-05-13 17:46:14
*
*/
public class HaveAffair extends DAO {
private SQLiteDatabase db;
private HaveAffair_migration helper;
public User user_index;
public Affairs affair_index;
public Integer id;
public HaveAffair(Context c) {
super(c, HaveAffair_migration.class, HaveAffair_migration.TABLE_NAME);
helper = new HaveAffair_migration(c);
db = helper.getWritableDatabase();
}
public void save() {
super.saveOrInsert(this);
}
public void insert() {
super.insert(this);
}
public void delete() {
super.delete(this);
}
public int valueOf() {
return id;
}
}
@@ -0,0 +1,49 @@
package wesayallright.timemanager.db.Models;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import java.util.Date;
import wesayallright.timemanager.db.DAO;
import wesayallright.timemanager.db.dbHelper.InGroup_migration;
/**
* MyModel 自动生成 at: 2017-05-13 17:46:14
*
*/
public class InGroup extends DAO {
private SQLiteDatabase db;
private InGroup_migration helper;
public User user_index;
public Group group_index;
public Group_User role_index;
public Integer id;
public InGroup(Context c) {
super(c, InGroup_migration.class, InGroup_migration.TABLE_NAME);
helper = new InGroup_migration(c);
db = helper.getWritableDatabase();
}
public void save() {
super.saveOrInsert(this);
}
public void insert() {
super.insert(this);
}
public void delete() {
super.delete(this);
}
public int valueOf() {
return id;
}
}
@@ -0,0 +1,50 @@
package wesayallright.timemanager.db.Models;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import java.util.Date;
import wesayallright.timemanager.db.DAO;
import wesayallright.timemanager.db.dbHelper.School_migration;
/**
* MyModel 自动生成 at: 2017-05-13 17:46:14
*
*/
public class School extends DAO {
private SQLiteDatabase db;
private School_migration helper;
public String school_id;
public String name;
public String province;
public String city;
public Integer id;
public School(Context c) {
super(c, School_migration.class, School_migration.TABLE_NAME);
helper = new School_migration(c);
db = helper.getWritableDatabase();
}
public void save() {
super.saveOrInsert(this);
}
public void insert() {
super.insert(this);
}
public void delete() {
super.delete(this);
}
public int valueOf() {
return id;
}
}
@@ -0,0 +1,47 @@
package wesayallright.timemanager.db.Models;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import java.util.Date;
import wesayallright.timemanager.db.DAO;
import wesayallright.timemanager.db.dbHelper.SingleAffairsTime_migration;
/**
* MyModel 自动生成 at: 2017-05-13 17:46:14
*
*/
public class SingleAffairsTime extends DAO {
private SQLiteDatabase db;
private SingleAffairsTime_migration helper;
public Affairs affair_index;
public Integer id;
public SingleAffairsTime(Context c) {
super(c, SingleAffairsTime_migration.class, SingleAffairsTime_migration.TABLE_NAME);
helper = new SingleAffairsTime_migration(c);
db = helper.getWritableDatabase();
}
public void save() {
super.saveOrInsert(this);
}
public void insert() {
super.insert(this);
}
public void delete() {
super.delete(this);
}
public int valueOf() {
return id;
}
}
@@ -0,0 +1,47 @@
package wesayallright.timemanager.db.Models;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import java.util.Date;
import wesayallright.timemanager.db.DAO;
import wesayallright.timemanager.db.dbHelper.SuccessiveAffairsTime_migration;
/**
* MyModel 自动生成 at: 2017-05-13 17:46:14
*
*/
public class SuccessiveAffairsTime extends DAO {
private SQLiteDatabase db;
private SuccessiveAffairsTime_migration helper;
public Affairs affair_index;
public Integer id;
public SuccessiveAffairsTime(Context c) {
super(c, SuccessiveAffairsTime_migration.class, SuccessiveAffairsTime_migration.TABLE_NAME);
helper = new SuccessiveAffairsTime_migration(c);
db = helper.getWritableDatabase();
}
public void save() {
super.saveOrInsert(this);
}
public void insert() {
super.insert(this);
}
public void delete() {
super.delete(this);
}
public int valueOf() {
return id;
}
}
@@ -0,0 +1,55 @@
package wesayallright.timemanager.db.Models;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import java.util.Date;
import wesayallright.timemanager.db.DAO;
import wesayallright.timemanager.db.dbHelper.User_migration;
/**
* MyModel 自动生成 at: 2017-05-13 17:46:14
*
*/
public class User extends DAO {
private SQLiteDatabase db;
private User_migration helper;
public String user_id;
public String password;
public String stu_id;
public String nickname;
public String realname;
public Date birthday;
public String mobile;
public String email;
public Date updatetime;
public Integer id;
public User(Context c) {
super(c, User_migration.class, User_migration.TABLE_NAME);
helper = new User_migration(c);
db = helper.getWritableDatabase();
}
public void save() {
super.saveOrInsert(this);
}
public void insert() {
super.insert(this);
}
public void delete() {
super.delete(this);
}
public int valueOf() {
return id;
}
}
@@ -0,0 +1,33 @@
package wesayallright.timemanager.db.dbHelper;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import wesayallright.timemanager.InnerLayer.Package;
/**
* MyModel 自动生成 at: 2017-05-13 17:46:14
*/
public class Affairs_migration extends SQLiteOpenHelper
{
private static final int DB_VERSION = 1;
public static final String TABLE_NAME = "Affairs";
public Affairs_migration(Context context) {
super(context, Package.DB_NAME, null, DB_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
String sql = " CREATE TABLE IF NOT EXISTS Affairs (name vchar(20) NOT NULL ,place vchar(30) NOT NULL ,details vchar(100) NOT NULL ,organizer_index_id integer NOT NULL REFERENCE User ,id INTEGER NOT NULL PRIMER KEY)";
db.execSQL(sql);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
String sql = "DROP TABLE IF EXISTS " + TABLE_NAME;
db.execSQL(sql);
onCreate(db);
}
}
@@ -0,0 +1,33 @@
package wesayallright.timemanager.db.dbHelper;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import wesayallright.timemanager.InnerLayer.Package;
/**
* MyModel 自动生成 at: 2017-05-13 17:46:14
*/
public class Group_User_migration extends SQLiteOpenHelper
{
private static final int DB_VERSION = 1;
public static final String TABLE_NAME = "Group_User";
public Group_User_migration(Context context) {
super(context, Package.DB_NAME, null, DB_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
String sql = " CREATE TABLE IF NOT EXISTS Group_User (group_index_id integer NOT NULL REFERENCE Group ,user_index_id integer NOT NULL REFERENCE User ,visible bool NOT NULL ,update_time datetime NOT NULL ,id INTEGER NOT NULL PRIMER KEY)";
db.execSQL(sql);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
String sql = "DROP TABLE IF EXISTS " + TABLE_NAME;
db.execSQL(sql);
onCreate(db);
}
}
@@ -0,0 +1,33 @@
package wesayallright.timemanager.db.dbHelper;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import wesayallright.timemanager.InnerLayer.Package;
/**
* MyModel 自动生成 at: 2017-05-13 17:46:14
*/
public class Group_migration extends SQLiteOpenHelper
{
private static final int DB_VERSION = 1;
public static final String TABLE_NAME = "Group";
public Group_migration(Context context) {
super(context, Package.DB_NAME, null, DB_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
String sql = " CREATE TABLE IF NOT EXISTS Group (group_id vchar(10) NOT NULL ,name vchar(50) NOT NULL ,introduction vchar(100) NOT NULL ,establish_date date NOT NULL ,update_date date NOT NULL ,id INTEGER NOT NULL PRIMER KEY)";
db.execSQL(sql);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
String sql = "DROP TABLE IF EXISTS " + TABLE_NAME;
db.execSQL(sql);
onCreate(db);
}
}
@@ -0,0 +1,33 @@
package wesayallright.timemanager.db.dbHelper;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import wesayallright.timemanager.InnerLayer.Package;
/**
* MyModel 自动生成 at: 2017-05-13 17:46:14
*/
public class HaveAffair_migration extends SQLiteOpenHelper
{
private static final int DB_VERSION = 1;
public static final String TABLE_NAME = "HaveAffair";
public HaveAffair_migration(Context context) {
super(context, Package.DB_NAME, null, DB_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
String sql = " CREATE TABLE IF NOT EXISTS HaveAffair (user_index_id integer NOT NULL REFERENCE User ,affair_index_id integer NOT NULL REFERENCE Affairs ,id INTEGER NOT NULL PRIMER KEY)";
db.execSQL(sql);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
String sql = "DROP TABLE IF EXISTS " + TABLE_NAME;
db.execSQL(sql);
onCreate(db);
}
}
@@ -0,0 +1,33 @@
package wesayallright.timemanager.db.dbHelper;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import wesayallright.timemanager.InnerLayer.Package;
/**
* MyModel 自动生成 at: 2017-05-13 17:46:14
*/
public class InGroup_migration extends SQLiteOpenHelper
{
private static final int DB_VERSION = 1;
public static final String TABLE_NAME = "InGroup";
public InGroup_migration(Context context) {
super(context, Package.DB_NAME, null, DB_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
String sql = " CREATE TABLE IF NOT EXISTS InGroup (user_index_id integer NOT NULL REFERENCE User ,group_index_id integer NOT NULL REFERENCE Group ,role_index_id integer NOT NULL REFERENCE Group_User ,id INTEGER NOT NULL PRIMER KEY)";
db.execSQL(sql);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
String sql = "DROP TABLE IF EXISTS " + TABLE_NAME;
db.execSQL(sql);
onCreate(db);
}
}
@@ -0,0 +1,33 @@
package wesayallright.timemanager.db.dbHelper;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import wesayallright.timemanager.InnerLayer.Package;
/**
* MyModel 自动生成 at: 2017-05-13 17:46:14
*/
public class School_migration extends SQLiteOpenHelper
{
private static final int DB_VERSION = 1;
public static final String TABLE_NAME = "School";
public School_migration(Context context) {
super(context, Package.DB_NAME, null, DB_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
String sql = " CREATE TABLE IF NOT EXISTS School (school_id vchar(10) NOT NULL ,name vchar(30) NOT NULL ,province vchar(20) NOT NULL ,city vchar(30) NOT NULL ,id INTEGER NOT NULL PRIMER KEY)";
db.execSQL(sql);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
String sql = "DROP TABLE IF EXISTS " + TABLE_NAME;
db.execSQL(sql);
onCreate(db);
}
}
@@ -0,0 +1,33 @@
package wesayallright.timemanager.db.dbHelper;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import wesayallright.timemanager.InnerLayer.Package;
/**
* MyModel 自动生成 at: 2017-05-13 17:46:14
*/
public class SingleAffairsTime_migration extends SQLiteOpenHelper
{
private static final int DB_VERSION = 1;
public static final String TABLE_NAME = "SingleAffairsTime";
public SingleAffairsTime_migration(Context context) {
super(context, Package.DB_NAME, null, DB_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
String sql = " CREATE TABLE IF NOT EXISTS SingleAffairsTime (affair_index_id integer NOT NULL REFERENCE Affairs ,id INTEGER NOT NULL PRIMER KEY)";
db.execSQL(sql);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
String sql = "DROP TABLE IF EXISTS " + TABLE_NAME;
db.execSQL(sql);
onCreate(db);
}
}
@@ -0,0 +1,33 @@
package wesayallright.timemanager.db.dbHelper;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import wesayallright.timemanager.InnerLayer.Package;
/**
* MyModel 自动生成 at: 2017-05-13 17:46:14
*/
public class SuccessiveAffairsTime_migration extends SQLiteOpenHelper
{
private static final int DB_VERSION = 1;
public static final String TABLE_NAME = "SuccessiveAffairsTime";
public SuccessiveAffairsTime_migration(Context context) {
super(context, Package.DB_NAME, null, DB_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
String sql = " CREATE TABLE IF NOT EXISTS SuccessiveAffairsTime (affair_index_id integer NOT NULL REFERENCE Affairs ,id INTEGER NOT NULL PRIMER KEY)";
db.execSQL(sql);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
String sql = "DROP TABLE IF EXISTS " + TABLE_NAME;
db.execSQL(sql);
onCreate(db);
}
}
@@ -0,0 +1,33 @@
package wesayallright.timemanager.db.dbHelper;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import wesayallright.timemanager.InnerLayer.Package;
/**
* MyModel 自动生成 at: 2017-05-13 17:46:14
*/
public class User_migration extends SQLiteOpenHelper
{
private static final int DB_VERSION = 1;
public static final String TABLE_NAME = "User";
public User_migration(Context context) {
super(context, Package.DB_NAME, null, DB_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
String sql = " CREATE TABLE IF NOT EXISTS User (user_id vchar(10) NOT NULL ,password vchar(64) NOT NULL ,stu_id vchar(20) NOT NULL ,nickname vchar(15) NOT NULL ,realname vchar(10) NOT NULL ,birthday date NOT NULL ,mobile vchar(21) NOT NULL ,email vchar NOT NULL ,updatetime date NOT NULL ,id INTEGER NOT NULL PRIMER KEY)";
db.execSQL(sql);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
String sql = "DROP TABLE IF EXISTS " + TABLE_NAME;
db.execSQL(sql);
onCreate(db);
}
}
@@ -1,110 +0,0 @@
package wesayallright.timemanager.surface;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import wesayallright.timemanager.R;
/**
* A simple {@link Fragment} subclass.
* Activities that contain this fragment must implement the
* {@link Calendar.OnFragmentInteractionListener} interface
* to handle interaction events.
* Use the {@link Calendar#newInstance} factory method to
* create an instance of this fragment.
*/
public class Calendar extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
private OnFragmentInteractionListener mListener;
public Calendar() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment Calendar.
*/
// TODO: Rename and change types and number of parameters
public static Calendar newInstance(String param1, String param2) {
Calendar fragment = new Calendar();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_calendar, container, false);
}
// TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof OnFragmentInteractionListener) {
mListener = (OnFragmentInteractionListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement OnFragmentInteractionListener");
}
}
@Override
public void onDetach() {
super.onDetach();
mListener = null;
}
/**
* This interface must be implemented by activities that contain this
* fragment to allow an interaction in this fragment to be communicated
* to the activity and potentially other fragments contained in that
* activity.
* <p>
* See the Android Training lesson <a href=
* "http://developer.android.com/training/basics/fragments/communicating.html"
* >Communicating with Other Fragments</a> for more information.
*/
public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
}
}
@@ -4,17 +4,25 @@ import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.BottomNavigationView;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.MenuItem;
import android.view.Window;
import android.widget.TextView;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Locale;
import wesayallright.timemanager.InnerLayer.LocalFile.LocalFile;
import wesayallright.timemanager.InnerLayer.Package;
import wesayallright.timemanager.R;
import wesayallright.timemanager.surface.activitiesFragment.Activities;
import wesayallright.timemanager.surface.scheduleFragment.ScheduleFragment;
public class MainActivity extends AppCompatActivity implements
Calendar.OnFragmentInteractionListener,
Activities.OnFragmentInteractionListener,
Groups.OnFragmentInteractionListener,
Me.OnFragmentInteractionListener {
@@ -28,7 +36,7 @@ public class MainActivity extends AppCompatActivity implements
// 保存每个fragment的实例对象,防止重复初始化
private Activities activities_fragment_instance;
private Calendar calendar_fragment_instance;
private ScheduleFragment calendar_fragment_instance;
private Groups groups_fragment_instance;
private Me me_fragment_instance;
@@ -46,10 +54,6 @@ public class MainActivity extends AppCompatActivity implements
showFragment(ACTIVITIES);
break;
case R.id.navigation_groups:
showFragment(GROUPS);
break;
case R.id.navigation_me:
showFragment(ME);
@@ -62,16 +66,36 @@ public class MainActivity extends AppCompatActivity implements
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//保证程序没有标题栏 start
requestWindowFeature(Window.FEATURE_NO_TITLE);
getSupportActionBar().hide();
//end
setContentView(R.layout.activity_main);
showFragment(CALENDAR);
// 设置程序路径
LocalFile.setCwd(getApplicationContext().getFilesDir().getAbsolutePath());
// Log.i("Path", getApplicationContext().getFilesDir().getAbsolutePath());
Log.i("Path", getApplicationContext().getFilesDir().getAbsolutePath());
// try {
// User u = User.signIn("rightID", "rightPassword");
// } catch (UnsupportedEncodingException e) {
// e.printStackTrace();
// }
Package.dateFormatter = new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA);
Package.timeFormatter = new SimpleDateFormat("hh:mm", Locale.CHINA);
Package.dateTimeFormatter = SimpleDateFormat.getDateTimeInstance();
Package.today = Calendar.getInstance();
BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation);
navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
}
private void hideFragments(FragmentTransaction ft) {
if (calendar_fragment_instance != null) {
ft.hide(calendar_fragment_instance);
ft.hide( calendar_fragment_instance);
}
if (activities_fragment_instance != null) {
ft.hide(activities_fragment_instance);
@@ -93,7 +117,7 @@ public class MainActivity extends AppCompatActivity implements
switch (fragmentIndex) {
case CALENDAR:
if (calendar_fragment_instance == null) {
calendar_fragment_instance = new Calendar();
calendar_fragment_instance = new ScheduleFragment();
ft.add(R.id.content, calendar_fragment_instance);
} else {
ft.show(calendar_fragment_instance);
@@ -0,0 +1,69 @@
package wesayallright.timemanager.surface;
/**
* Created by mj on 17-5-2.
*
* 把view保存成图片
*/
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.os.Environment;
import android.util.Log;
import android.view.View;
import android.view.View.MeasureSpec;
import java.io.File;
import java.io.FileOutputStream;
import static android.content.ContentValues.TAG;
public class SaveViewToImage {
public SaveViewToImage() {}
public void save(View v) {
// v.setDrawingCacheEnabled(true); // 打开view缓存
int width = View.MeasureSpec.makeMeasureSpec(0,View.MeasureSpec.UNSPECIFIED);
int height = View.MeasureSpec.makeMeasureSpec(0,View.MeasureSpec.UNSPECIFIED);
v.measure(width, height);
int h =v.getMeasuredHeight();
int w =v.getMeasuredWidth();
if (w == 0)
Log.e(TAG, "save: w == 0");
if (h == 0)
Log.e(TAG, "save: h == 0");
Bitmap b = Bitmap.createBitmap( w, h, Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(b);
v.layout(0, 0, v.getLayoutParams().width, v.getLayoutParams().height);
v.draw(c);
//b = Bitmap.createBitmap(v.getDrawingCache()); // 创建bitmap
FileOutputStream fos;
try {
// 判断手机设备是否有SD卡
boolean isHasSDCard = Environment.getExternalStorageState().equals(
android.os.Environment.MEDIA_MOUNTED);
if (isHasSDCard) {
// SD卡根目录
File sdRoot = Environment.getExternalStorageDirectory();
new File(sdRoot + "/DCIM/TimeManager").mkdir();
File file = new File(sdRoot, "/DCIM/TimeManager/test.PNG");
file.createNewFile();
fos = new FileOutputStream(file);
} else
throw new Exception("创建文件失败!");
b.compress(Bitmap.CompressFormat.PNG, 90, fos);
fos.flush();
fos.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
@@ -0,0 +1,18 @@
package wesayallright.timemanager.surface;
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import wesayallright.timemanager.R;
public class TargetFragment extends Fragment{
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.target_fragment, container, false);
return view;
}
}
@@ -1,12 +1,23 @@
package wesayallright.timemanager.surface;
package wesayallright.timemanager.surface.activitiesFragment;
import android.content.Context;
import android.graphics.Paint;
import android.media.Image;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.Toast;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import wesayallright.timemanager.R;
@@ -20,14 +31,10 @@ import wesayallright.timemanager.R;
* create an instance of this fragment.
*/
public class Activities extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
List<ActivityViewItem> activitiesData = new ArrayList<>();
private OnFragmentInteractionListener mListener;
@@ -51,14 +58,42 @@ public class Activities extends Fragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.i("活动界面", "进入onCreate方法");
// 测试
for (int i = 0; i < 20; i++) {
activitiesData.add(new ActivityViewItem("活动"+i, new Date(i + 3600), "A"+i));
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_activities, container, false);
Log.i("活动界面", "进入onCreateView方法");
View v = inflater.inflate(R.layout.fragment_activities, container, false);
final ListView activitiesList = (ListView)v.findViewById(R.id.fa_activityList);
// 首先用inflater取得相应的布局文件,然后再findview.
// 设置适配器
ActivityListAdapter ap = new ActivityListAdapter(this.getContext(), activitiesData);
activitiesList.setAdapter(ap);
// 监听点击事件
activitiesList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
JoinDialog.show(getActivity(), activitiesData.get(position));
}
});
ImageView plus = (ImageView)v.findViewById(R.id.nad_plus);
plus.setOnClickListener(new ImageView.OnClickListener() {
public void onClick(View v) {
NewActivityDialog.NewActivity(getActivity());
}
});
return v;
}
// TODO: Rename method, update argument and hook method into UI event
@@ -99,4 +134,7 @@ public class Activities extends Fragment {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
}
}
@@ -0,0 +1,76 @@
package wesayallright.timemanager.surface.activitiesFragment;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import java.util.List;
import wesayallright.timemanager.R;
/**
* Created by mj on 17-4-22.
* 活动列表的适配器
*/
public class ActivityListAdapter extends BaseAdapter {
private List<ActivityViewItem> list; // 数据源
private LayoutInflater inflater; // 布局装载器
public ActivityListAdapter(Context context, List<ActivityViewItem> l) {
list = l;
inflater = LayoutInflater.from(context);
}
@Override
public int getCount() {
return list.size();
}
@Override
public ActivityViewItem getItem(int position) {
return list.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder viewHolder;
if (convertView == null) {
// 第一次运行, 分配空间
convertView = inflater.inflate(R.layout.activities_item, null); // 创建一个新的Item
viewHolder = new ViewHolder();
viewHolder.name = (TextView)convertView.findViewById(R.id.ai_activityName);
viewHolder.data = (TextView)convertView.findViewById(R.id.ai_activityTime);
// 缓存view
convertView.setTag(viewHolder);
} else {
viewHolder = (ViewHolder)convertView.getTag();
}
ActivityViewItem item = list.get(position);
viewHolder.name.setText(item.name);
viewHolder.data.setText(item.date.toString());
// Log.i("时间", item.date.toString());
return convertView;
}
/**
* 用于缓存view,findViewByID是线性查找,在数据经常修改时效率低
*/
class ViewHolder {
TextView name;
TextView data;
}
}
@@ -0,0 +1,19 @@
package wesayallright.timemanager.surface.activitiesFragment;
import java.util.Date;
/**
* Created by mj on 17-4-22.
* 用于显示每一个活动
*/
public class ActivityViewItem {
public String name;
public Date date;
public String activityId;
public ActivityViewItem(String n, Date d, String i) {
name = n;
date = d;
activityId = i;
}
}
@@ -0,0 +1,45 @@
package wesayallright.timemanager.surface.activitiesFragment;
import android.app.Activity;
import android.support.v7.app.AlertDialog;
import android.view.View;
import android.widget.TextView;
import wesayallright.timemanager.R;
/**
* Created by mj on 17-4-24.
* 当点击加入一个活动的时候的对话框
*/
public class JoinDialog{
private static String authorities = "电话\n学号\n真实姓名\n";
static public AlertDialog.Builder show(Activity a, ActivityViewItem item) {
AlertDialog.Builder builder = new AlertDialog.Builder(a);
View v = View.inflate(a, R.layout.join_dialog, null);
builder.setTitle(item.name);
TextView date = (TextView)v.findViewById(R.id.jd_date);
TextView free = (TextView)v.findViewById(R.id.jd_free);
TextView detail = (TextView)v.findViewById(R.id.jd_detail);
TextView authority = (TextView) v.findViewById(R.id.jd_authority);
date.setText(item.date.toString());
free.setText("Free");
free.setTextColor(0xFF00ff2A);
detail.setText("签订契约吧!");
authority.setText(authorities);
builder.setView(v);
builder.setPositiveButton("加入", null);
builder.setNegativeButton("取消", null);
builder.show();
return builder;
}
}
@@ -0,0 +1,112 @@
package wesayallright.timemanager.surface.activitiesFragment;
import android.app.Activity;
import android.app.DatePickerDialog;
import android.app.Dialog;
import android.app.TimePickerDialog;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.support.v7.app.AlertDialog;
import android.util.Log;
import android.view.View;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.TimePicker;
import android.widget.Toast;
import org.w3c.dom.Text;
import wesayallright.timemanager.InnerLayer.Package;
import wesayallright.timemanager.R;
import java.text.ParseException;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import java.util.zip.Inflater;
/**
* Created by mj on 17-4-29.
* 添加新活动
*/
abstract public class NewActivityDialog{
static public void NewActivity(final Activity a) {
AlertDialog.Builder dialog = new AlertDialog.Builder(a);
View v = View.inflate(a, R.layout.new_activity_dialog, null);
TextView title = (TextView)v.findViewById(R.id.nad_top);
final TextView date = (TextView)v.findViewById(R.id.nad_date);
final TextView time = (TextView)v.findViewById(R.id.nad_time);
TextView limit = (TextView)v.findViewById(R.id.nad_limit);
EditText place = (EditText)v.findViewById(R.id.nad_placeBox);
EditText detail = (EditText)v.findViewById(R.id.nad_detail);
dialog.setTitle("发起一个活动");
// title.setText("添加新活动");
final Date today = (Calendar.getInstance()).getTime();
date.setText(Package.dateFormatter.format(today));
time.setText(Package.timeFormatter.format(today));
limit.setText("无限");
final int[] chosenTime = new int[5]; // 神TM指针 厉害了我的Java
final Calendar c = Package.today;// 获取今天的日期
chosenTime[0] = c.get(Calendar.YEAR);
chosenTime[1] = c.get(Calendar.MONTH);
chosenTime[2] = c.get(Calendar.DAY_OF_MONTH);
chosenTime[3] = c.get(Calendar.HOUR_OF_DAY);
chosenTime[4] = c.get(Calendar.MINUTE);
date.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// 直接创建一个DatePickerDialog对话框实例,并将它显示出来
DatePickerDialog datePicker = new DatePickerDialog(a,
// 绑定监听器
new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year,
int monthOfYear, int dayOfMonth) {
// 选择的日期
chosenTime[0] = year;
chosenTime[1] = monthOfYear + 1;
chosenTime[2] = dayOfMonth;
date.setText(String.format(Locale.CHINA, "%04d-%02d-%02d",
chosenTime[0], chosenTime[1], chosenTime[2]));
}
}
// 设置初始日期
, c.get(Calendar.YEAR), c.get(Calendar.MONTH), c
.get(Calendar.DAY_OF_MONTH));
datePicker.getDatePicker().setMinDate(System.currentTimeMillis() - 1000);
datePicker.show();
}
});
time.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
TimePickerDialog timePicker = new TimePickerDialog(a,
new TimePickerDialog.OnTimeSetListener() {
@Override
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
chosenTime[3] = hourOfDay;
chosenTime[4] = minute;
time.setText(String.format(Locale.CHINA, "%02d:%02d",
chosenTime[3], chosenTime[4]));
}
}, c.get(Calendar.HOUR), c.get(Calendar.MINUTE), true);
timePicker.show();
}
});
dialog.setView(v);
dialog.setNegativeButton("取消", null);
dialog.setPositiveButton("确定", null);
dialog.show();
}
}
@@ -0,0 +1,194 @@
package wesayallright.timemanager.surface.scheduleFragment;
import android.content.SharedPreferences;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.util.Log;
import com.github.lzyzsd.randomcolor.RandomColor;
import java.util.Objects;
class Course {
String week;
int day;
int starthour;
int startmin;
int endhour;
int endmin;
public String name;
String room;
String teacher;
public int color;
public String id;
int priority;//0:normal 1:course 2:alert
private static final String TAG = "Course";
Course(String week, int day, int starthour, int startmin, int endhour, int endmin, String name, String room, String teacher, int color, int priority) {
this.week = week;
this.day = day;
this.starthour = starthour;
this.startmin = startmin;
this.endhour = endhour;
this.endmin = endmin;
this.name = name;
this.room = room;
this.teacher = teacher;
this.color = color;
this.priority = priority;
}
Course(Course copy) {
this.week = copy.week;
this.day = copy.day;
this.starthour = copy.starthour;
this.startmin = copy.startmin;
this.endhour = copy.endhour;
this.endmin = copy.endmin;
this.name = copy.name;
this.room = copy.room;
this.teacher = copy.teacher;
this.color = copy.color;
this.priority = copy.priority;
}
Course(int pro) {
week = null;
day = -1;
starthour = -1;
startmin = -1;
endhour = -1;
endmin = -1;
name = "未填写";
room = "未填写";
teacher = "未填写";
color = (new RandomColor()).randomColor() - 0x30000000;
priority = pro;
}
Course() {
week = null;
day = -1;
starthour = -1;
startmin = -1;
endhour = -1;
endmin = -1;
name = "未填写";
room = "未填写";
teacher = "未填写";
color = (new RandomColor()).randomColor() - 0x30000000;
priority = 0;
}
void clone(Course copy) {
this.week = copy.week;
this.day = copy.day;
this.starthour = copy.starthour;
this.startmin = copy.startmin;
this.endhour = copy.endhour;
this.endmin = copy.endmin;
this.name = copy.name;
this.room = copy.room;
this.teacher = copy.teacher;
this.color = copy.color;
this.priority = copy.priority;
}
@Override
public boolean equals(Object obj) {
if (((Course) obj).day == -1)
return false;
Course c = new Course((Course) obj);
return c.week.equals(week) &&
c.day == day &&
c.starthour == starthour &&
c.startmin == startmin &&
c.endhour == endhour &&
c.endmin == endmin &&
c.name.equals(name) &&
c.room.equals(room) &&
c.teacher.equals(teacher) &&
c.color == color &&
c.priority == priority;
}
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
void addinfile(SharedPreferences sharedPreferences) {
SharedPreferences.Editor editor = sharedPreferences.edit();
int num;
for (num = 0; ; num++)
if (sharedPreferences.getString("week" + num, null) == null)
break;
this.removeinfile(sharedPreferences);
editor.putString("week" + num, week);
editor.putInt("day" + num, day);
editor.putInt("starthour" + num, starthour);
editor.putInt("startmin" + num, startmin);
editor.putInt("endhour" + num, endhour);
editor.putInt("endmin" + num, endmin);
editor.putString("name" + num, name);
editor.putString("room" + num, room);
editor.putString("teacher" + num, teacher);
editor.putInt("color" + num, color);
editor.putInt("priority" + num, priority);
editor.apply();
}
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
void removeinfile(SharedPreferences sharedPreferences) {
SharedPreferences.Editor editor = sharedPreferences.edit();
Log.i(TAG, "removeinfile: REMOVE FILE START!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
int num;
for (num = 0; ; num++)
if (sharedPreferences.getString("week" + num, null) == null)
break;
Log.i(TAG, "removeinfile: week=" + week + " day=" + day + " " + starthour + ":" + startmin + "-" + endhour + ":" + endmin + " name" + name + " room" + room + " teacher=" + teacher + " color" + color + " priority" + priority);
for (int i = 0; i < num; i++) {
Log.i(TAG, "removeinfile: week=" + sharedPreferences.getString("week" + i, null)
+ " day=" + sharedPreferences.getInt("day" + i, -1) + " " + sharedPreferences.getInt("starthour" + i, -1) + ":" +
sharedPreferences.getInt("startmin" + i, -1) + "-" + sharedPreferences.getInt("endhour" + i, -1)
+ ":" + sharedPreferences.getInt("endmin" + i, -1) + " name" + sharedPreferences.getString("name" + i, null)
+ " room" + sharedPreferences.getString("room" + i, null) + " teacher=" + sharedPreferences.getString("teacher" + i, null)
+ " color" + sharedPreferences.getInt("color" + i, -1) + " priority" + sharedPreferences.getInt("priority" + i, -1));
if (Objects.equals(sharedPreferences.getString("week" + i, null), week) &&
sharedPreferences.getInt("day" + i, -1) == day &&
sharedPreferences.getInt("starthour" + i, -1) == starthour &&
sharedPreferences.getInt("startmin" + i, -1) == startmin &&
sharedPreferences.getInt("endhour" + i, -1) == endhour &&
sharedPreferences.getInt("endmin" + i, -1) == endmin &&
Objects.equals(sharedPreferences.getString("name" + i, null), name) &&
Objects.equals(sharedPreferences.getString("room" + i, null), room) &&
Objects.equals(sharedPreferences.getString("teacher" + i, null), teacher) &&
sharedPreferences.getInt("color" + i, -1) == color &&
sharedPreferences.getInt("priority" + i, -1) == priority) {
Log.i(TAG, "removeinfile: DELETE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
editor.putString("week" + i, sharedPreferences.getString("week" + (num - 1), null));
editor.putInt("day" + i, sharedPreferences.getInt("day" + (num - 1), -1));
editor.putInt("starthour" + i, sharedPreferences.getInt("starthour" + (num - 1), -1));
editor.putInt("startmin" + i, sharedPreferences.getInt("startmin" + (num - 1), -1));
editor.putInt("endhour" + i, sharedPreferences.getInt("endhour" + (num - 1), -1));
editor.putInt("endmin" + i, sharedPreferences.getInt("endmin" + (num - 1), -1));
editor.putString("name" + i, sharedPreferences.getString("name" + (num - 1), null));
editor.putString("room" + i, sharedPreferences.getString("room" + (num - 1), null));
editor.putString("teacher" + i, sharedPreferences.getString("teacher" + (num - 1), null));
editor.putInt("color" + i, sharedPreferences.getInt("color" + (num - 1), -1));
editor.putInt("priority" + i, sharedPreferences.getInt("priority" + (num - 1), -1));
editor.apply();
editor.remove("week" + (num - 1));
editor.remove("day" + (num - 1));
editor.remove("starthour" + (num - 1));
editor.remove("startmin" + (num - 1));
editor.remove("endhour" + (num - 1));
editor.remove("endmin" + (num - 1));
editor.remove("name" + (num - 1));
editor.remove("room" + (num - 1));
editor.remove("teacher" + (num - 1));
editor.remove("color" + (num - 1));
editor.remove("priority" + (num - 1));
editor.commit();
break;
}
}
Log.i(TAG, "removeinfile: REMOVE FILE END!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
}
}
@@ -0,0 +1,52 @@
package wesayallright.timemanager.surface.scheduleFragment;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import java.util.List;
import wesayallright.timemanager.R;
class MyAdapter extends BaseAdapter {
private List<String> mList;
private Context mContext;
private int itemid;
MyAdapter(Context pContext, List<String> pList, int itemid) {
this.mContext = pContext;
this.mList = pList;
this.itemid = itemid;
}
@Override
public int getCount() {
return mList.size();
}
@Override
public Object getItem(int position) {
return mList.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater _LayoutInflater = LayoutInflater.from(mContext);
convertView = _LayoutInflater.inflate(R.layout.item_custom, null);
if (convertView != null) {
TextView _TextView1 = (TextView) convertView.findViewById(R.id.textView1);
_TextView1.setText(mList.get(position));
if (position == itemid)
_TextView1.setTextColor(0xffff0000);
}
return convertView;
}
}
@@ -0,0 +1,89 @@
package wesayallright.timemanager.surface.scheduleFragment;
import android.app.Activity;
import android.support.v7.app.AlertDialog;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import java.util.HashMap;
import wesayallright.timemanager.InnerLayer.Network.SendPost;
import wesayallright.timemanager.R;
/**
* Created by mj on 17-5-2.
* 分享对话框
*/
public class ShareDialog {
private HashMap<String, String> data;
public ShareDialog(){
data = new HashMap<>();
}
public void setCount(int count)
{
data.put("count",""+count);
}
public void setTime(String start,String end)
{
data.put("startAndEnd",start+"/"+end);
}
public void addPramas(String key, String value) {
data.put(key, value);
}
public void show(Activity a) {
AlertDialog.Builder d = new AlertDialog.Builder(a);
View v = View.inflate(a, R.layout.share_dialog, null);
TextView success = (TextView)v.findViewById(R.id.sd_success);
TextView url = (TextView)v.findViewById(R.id.sd_destination);
data.put("user", "super");
// data.put("count", "10");
// data.put("startAndEnd","7:00/16:00");
// data.put("1", "课1/1/7:00/10:00");
// data.put("2", "课2/2/7:00/8:00");
// data.put("3", "课3/3/8:00/9:30");
// data.put("4", "课4/4/7:00/8:00");
// data.put("5", "课5/5/11:00/13:00");
// data.put("6", "课6/4/10:00/15:00");
// data.put("7", "课7/6/7:00/9:00");
// data.put("8", "课8/7/7:00/8:00");
// data.put("9", "课9/2/10:00/13:00");
// data.put("10", "课10/3/10:00/12:00");
SendPost remote = new SendPost();
remote.addParam(data);
Thread t = new Thread(remote);
t.start();
while (!remote.finish)
;
Log.i("返回结果", "11" + remote.result);
if (!remote.result.equals("fail")) {
success.setText("成功");
success.setTextColor(0xff00ff0d);
url.setText(remote.result );
}
else {
success.setText("失败");
success.setTextColor(0xffff0000);
url.setText("(╯°Д°)╯︵ /(.□ . \\\\)");
}
d.setView(v);
d.setTitle("分享日程");
d.show();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:drawable="@drawable/edittext_normal" />
<item android:state_focused="true" android:drawable="@drawable/edittext_focused" />
</selector>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FFFFFF" />
<corners android:radius="3dip"/>
<stroke
android:width="1dip"
android:color="#0f9fff" />
</shape>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FFFFFF" />
<corners android:radius="3dip"/>
<stroke
android:width="1dip"
android:color="#7f7f7f" />
</shape>
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 B

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<color android:color="#ff808080"/>
</item>
<item android:state_pressed="false">
<color android:color="#ffffffff"/>
</item>
</selector>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:width="2dip" android:color="#00000000" />
<corners android:topLeftRadius="5dp"
android:topRightRadius="5dp"
android:bottomRightRadius="5dp"
android:bottomLeftRadius="5dp"/>
</shape>
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true"
android:drawable="@drawable/green" />
<item android:state_checked="false"
android:drawable="@drawable/white"/>
</selector>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ai_activitiesItem"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:minHeight="?android:attr/listPreferredItemHeight">
<TextView
android:id="@+id/ai_activityName"
android:layout_width="wrap_content"
android:layout_height="20dp" />
<TextView
android:id="@+id/ai_activityTime"
android:layout_width="wrap_content"
android:layout_height="20dp" />
</LinearLayout>
@@ -11,17 +11,11 @@
<FrameLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
</FrameLayout>
<TextView
android:id="@+id/asjdio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="66666">
</TextView>
<android.support.design.widget.BottomNavigationView
android:id="@+id/navigation"
android:layout_width="match_parent"
@@ -1,13 +1,41 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="wesayallright.timemanager.surface.Activities">
android:id="@+id/fa"
android:orientation="vertical"
<!-- TODO: Update blank fragment layout -->
<TextView
tools:context="wesayallright.timemanager.surface.activitiesFragment.Activities">
<FrameLayout
android:id="@+id/STrelative"
android:layout_width="match_parent"
android:layout_height="40dp"
android:orientation="horizontal"
android:background="#FFFFFF">
<ImageView
android:id="@+id/nad_icon"
android:layout_gravity="start"
android:paddingTop="3dp"
android:layout_width="40dp"
android:layout_height="match_parent"
android:background="@drawable/default_head"/>
<ImageView
android:id="@+id/nad_plus"
android:layout_width="33dp"
android:layout_height="33dp"
android:layout_gravity="end"
android:background="@drawable/plus"/>
</FrameLayout>
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="helloActivities" />
android:id="@+id/fa_activityList"
>
</FrameLayout>
</ListView>
</LinearLayout>
@@ -1,13 +0,0 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="wesayallright.timemanager.surface.Calendar">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="HelloCalendar" />
</FrameLayout>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
</LinearLayout>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="1dp"
android:paddingBottom="1dp"
android:textSize="20sp"
android:gravity="center_horizontal"/>
</LinearLayout>
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--时间 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<TextView
android:id="@+id/jd_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</TextView>
<TextView
android:id="@+id/jd_free"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<!-- 分割线 -->
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/listDivider"> </View>
<!-- 细节 -->
<TextView
android:id="@+id/jd_detail"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<!-- 分割线 -->
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/listDivider"> </View>
<!-- 权限-->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/jd_zzzjhd"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/jd_authority">
</TextView>
</LinearLayout>
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="1">
<TextView
android:id="@+id/nad_top"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<android.support.percent.PercentRelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/nad_date"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_widthPercent="50%" />
<TextView
android:id="@+id/nad_time"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_widthPercent="50%"
android:layout_toEndOf="@id/nad_date" />
</android.support.percent.PercentRelativeLayout>
<TextView android:id="@+id/nad_limit"
android:layout_height="wrap_content"
android:layout_width="match_parent"
/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textSize="20sp"
android:text="@string/nad_place"
android:visibility="visible"
android:paddingTop="8dp"/>
<EditText
android:id="@+id/nad_placeBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/nad_place"
/>
</LinearLayout>
<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textSize="20sp"
android:text="@string/nad_commit"
/>
<EditText
android:id="@+id/nad_detail"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:hint="@string/nad_commit"/>
</LinearLayout>
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff">
<LinearLayout
android:id="@+id/dialogLinear1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ffffff">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="25sp"
android:padding="4dp"
android:text="课名:"/>
<EditText
android:id="@+id/SCourseEditTextName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="25sp"
android:padding="4dp"
android:hint="未填写"
android:background="@drawable/edittext"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/dialogLinear2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/dialogLinear1"
android:background="#ffffff">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="25sp"
android:padding="4dp"
android:text="地点:"/>
<EditText
android:id="@+id/SCourseEditTextRoom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="25sp"
android:padding="4dp"
android:hint="未填写"
android:background="@drawable/edittext"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/dialogLinear3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/dialogLinear2"
android:background="#ffffff">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="25sp"
android:padding="4dp"
android:text="周数:"/>
<TextView
android:id="@+id/dialogweek"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="25sp"
android:padding="4dp"
android:text="1-20周"
android:background="@drawable/textview_be_gray"/>
</LinearLayout>
<LinearLayout
android:id="@+id/dialogLinear4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/dialogLinear3"
android:background="#ffffff">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="25sp"
android:padding="4dp"
android:text="时间:"/>
<TextView
android:id="@+id/dialogtime"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="25sp"
android:padding="4dp"
android:text="未填写"
android:background="@drawable/textview_be_gray"/>
</LinearLayout>
</LinearLayout>
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="是否要删除?"
android:textSize="40sp"
android:textColor="#ffff0000"
/>
</LinearLayout>
@@ -0,0 +1,336 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
android:id="@+id/Sframe"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/SImage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/backgroundimage3"
android:scaleType="fitXY"/>
<LinearLayout
android:id="@+id/SLinear"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/STrelative"
android:layout_width="match_parent"
android:layout_height="40dp"
android:orientation="horizontal"
android:background="#FFFFFF">
<ImageView
android:id="@+id/STLimageview"
android:paddingLeft="3dp"
android:paddingTop="3dp"
android:layout_width="40dp"
android:layout_height="match_parent"
android:background="@drawable/default_head"/>
<Spinner
android:id="@+id/STMspinner"
android:layout_width="100dp"
android:layout_height="33dp"
android:spinnerMode="dropdown"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"/>
<ImageView
android:id="@+id/STRimageview"
android:layout_width="33dp"
android:layout_height="33dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:background="@drawable/plus"/>
</RelativeLayout>
<LinearLayout
android:id="@+id/SMLinear"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#7fC3C7C0"
android:orientation="horizontal">
<TextView
android:id="@+id/SMmonth"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="match_parent"
android:maxEms="1"
android:text=" 4月"/>
<TextView
android:id="@+id/SMmon"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="match_parent"
android:maxEms="2"
android:text="周一 03日"/>
<TextView
android:id="@+id/SMtue"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="match_parent"
android:maxEms="2"
android:text="周二 04日"/>
<TextView
android:id="@+id/SMwed"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="match_parent"
android:maxEms="2"
android:text="周三 05日"/>
<TextView
android:id="@+id/SMthu"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="match_parent"
android:maxEms="2"
android:text="周四 06日"/>
<TextView
android:id="@+id/SMfri"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="match_parent"
android:maxEms="2"
android:text="周五 07日"/>
<TextView
android:id="@+id/SMsat"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="match_parent"
android:maxEms="2"
android:text="周六 08日"/>
<TextView
android:id="@+id/SMsun"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="match_parent"
android:maxEms="2"
android:text="周日 09日"/>
</LinearLayout>
<ScrollView
android:id="@+id/Sscroll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none">
<LinearLayout
android:id="@+id/SBlinear"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:baselineAligned="true">
<LinearLayout
android:id="@+id/SBlinear0"
android:layout_width="match_parent"
android:layout_height="860dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/t00"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_weight="1"
android:textSize="20sp"
android:textColor="#ffffffff"
android:text="7"/>
<TextView
android:id="@+id/t01"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_weight="1"
android:textSize="20sp"
android:textColor="#ffffffff"
android:text="8"/>
<TextView
android:id="@+id/t02"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_weight="1"
android:textSize="20sp"
android:textColor="#ffffffff"
android:text="9"/>
<TextView
android:id="@+id/t03"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_weight="1"
android:textSize="20sp"
android:textColor="#ffffffff"
android:text="10"/>
<TextView
android:id="@+id/t04"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_weight="1"
android:textSize="20sp"
android:textColor="#ffffffff"
android:text="11"/>
<TextView
android:id="@+id/t05"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_weight="1"
android:textSize="20sp"
android:textColor="#ffffffff"
android:text="12"/>
<TextView
android:id="@+id/t06"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_weight="1"
android:textSize="20sp"
android:textColor="#ffffffff"
android:text="13"/>
<TextView
android:id="@+id/t07"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_weight="1"
android:textSize="20sp"
android:textColor="#ffffffff"
android:text="14"/>
<TextView
android:id="@+id/t08"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_weight="1"
android:textSize="20sp"
android:textColor="#ffffffff"
android:text="15"/>
<TextView
android:id="@+id/t09"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_weight="1"
android:textSize="20sp"
android:textColor="#ffffffff"
android:text="16"/>
<TextView
android:id="@+id/t0A"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_weight="1"
android:textSize="20sp"
android:textColor="#ffffffff"
android:text="17"/>
<TextView
android:id="@+id/t0B"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_weight="1"
android:textSize="20sp"
android:textColor="#ffffffff"
android:text="18"/>
<TextView
android:id="@+id/t0C"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_weight="1"
android:textSize="20sp"
android:textColor="#ffffffff"
android:text="19"/>
<TextView
android:id="@+id/t0D"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_weight="1"
android:textSize="20sp"
android:textColor="#ffffffff"
android:text="20"/>
<TextView
android:id="@+id/t0E"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_weight="1"
android:textSize="20sp"
android:textColor="#ffffffff"
android:text="21"/>
<TextView
android:id="@+id/t0F"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_weight="1"
android:textSize="20sp"
android:textColor="#ffffffff"
android:text="22"/>
<TextView
android:id="@+id/ttt"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_weight="1"
android:textSize="20sp"
android:textColor="#ffffffff"
android:text="23"/>
</LinearLayout>
<RelativeLayout
android:id="@+id/SBrelative1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
</RelativeLayout>
<RelativeLayout
android:id="@+id/SBrelative2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
</RelativeLayout>
<RelativeLayout
android:id="@+id/SBrelative3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
</RelativeLayout>
<RelativeLayout
android:id="@+id/SBrelative4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
</RelativeLayout>
<RelativeLayout
android:id="@+id/SBrelative5"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
</RelativeLayout>
<RelativeLayout
android:id="@+id/SBrelative6"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
</RelativeLayout>
<RelativeLayout
android:id="@+id/SBrelative7"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
</RelativeLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</FrameLayout>
@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<TextView
android:text="@string/dayofcourse"
android:textColor="#7fff0000"
android:textSize="25sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<NumberPicker
android:id="@+id/daypicker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<TextView
android:text="@string/starttime"
android:textColor="#7f00afff"
android:textSize="25sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<NumberPicker
android:id="@+id/starthhpicker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<NumberPicker
android:id="@+id/startmmpicker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<TextView
android:text="@string/terminationtime"
android:textColor="#7f00afff"
android:textSize="25sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<NumberPicker
android:id="@+id/endhhpicker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<NumberPicker
android:id="@+id/endmmpicker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="38dp">
<Button
android:id="@+id/starthhplus"
android:layout_width="65dp"
android:layout_height="wrap_content"
android:text="+6H"
android:textSize="11sp"/>
<Button
android:id="@+id/startmmplus"
android:layout_width="65dp"
android:layout_height="wrap_content"
android:text="+15MIN"
android:textSize="11sp"/>
<Button
android:id="@+id/endhhplus"
android:layout_width="65dp"
android:layout_height="wrap_content"
android:text="6H"
android:textSize="11sp"/>
<Button
android:id="@+id/endmmplus"
android:layout_width="65dp"
android:layout_height="wrap_content"
android:text="+15MIN"
android:textSize="11sp"/>
</LinearLayout>
</LinearLayout>
@@ -0,0 +1,280 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ToggleButton
android:id="@+id/week_togglebutton1_5"
android:layout_width="40dp"
android:layout_height="40dp"
android:textOn="1-5"
android:textOff="1-5"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebutton1"
android:layout_width="40dp"
android:layout_height="40dp"
android:textOn="1"
android:textOff="1"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebutton2"
android:layout_width="40dp"
android:layout_height="40dp"
android:textOn="2"
android:textOff="2"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebutton3"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="3"
android:textOff="3"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebutton4"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="4"
android:textOff="4"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebutton5"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="5"
android:textOff="5"
android:background="@drawable/togglebutton_in_week_dialog"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<ToggleButton
android:id="@+id/week_togglebutton6_10"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="6-10"
android:textOff="6-10"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebutton6"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="6"
android:textOff="6"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebutton7"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="7"
android:textOff="7"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebutton8"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="8"
android:textOff="8"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebutton9"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="9"
android:textOff="9"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebutton10"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="10"
android:textOff="10"
android:background="@drawable/togglebutton_in_week_dialog"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<ToggleButton
android:id="@+id/week_togglebutton11_15"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="11-15"
android:textOff="11-15"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebutton11"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="11"
android:textOff="11"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebutton12"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="12"
android:textOff="12"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebutton13"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="13"
android:textOff="13"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebutton14"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="14"
android:textOff="14"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebutton15"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="15"
android:textOff="15"
android:background="@drawable/togglebutton_in_week_dialog"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<ToggleButton
android:id="@+id/week_togglebutton16_20"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="16-20"
android:textOff="16-20"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebutton16"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="16"
android:textOff="16"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebutton17"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="17"
android:textOff="17"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebutton18"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="18"
android:textOff="18"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebutton19"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="19"
android:textOff="19"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebutton20"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="20"
android:textOff="20"
android:background="@drawable/togglebutton_in_week_dialog"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<ToggleButton
android:id="@+id/week_togglebuttonsingle"
android:layout_width="60dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="单周"
android:textOff="单周"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebuttondouble"
android:layout_width="60dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="双周"
android:textOff="双周"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebuttonall"
android:layout_width="60dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="全选"
android:textOff="全选"
android:background="@drawable/togglebutton_in_week_dialog"/>
<ToggleButton
android:id="@+id/week_togglebuttonthis"
android:layout_width="60dp"
android:layout_height="40dp"
android:gravity="center"
android:textOn="本周"
android:textOff="本周"
android:background="@drawable/togglebutton_in_week_dialog"/>
</LinearLayout>
</LinearLayout>
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/sd_success"
android:layout_height="wrap_content"
android:layout_width="match_parent" />
<TextView
android:id="@+id/sd_destination"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autoLink="web"/>
</LinearLayout>
@@ -0,0 +1,660 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ScrollView
android:id="@+id/sc"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAAAA"/>
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
@@ -11,10 +11,6 @@
android:icon="@drawable/ic_dashboard_black_24dp"
android:title="@string/title_activities" />
<item
android:id="@+id/navigation_groups"
android:icon="@drawable/ic_notifications_black_24dp"
android:title="@string/title_groups" />
<item
android:id="@+id/navigation_me"
android:icon="@drawable/ic_home_black_24dp"
+14 -4
View File
@@ -1,10 +1,20 @@
<resources>
<string name="app_name">timeManager</string>
<string name="title_calendar">日程</string>
<string name="title_activities">活动</string>
<string name="title_groups">小组</string>
<string name="title_me">我</string>
<string name="title_me">陆文辉</string>
<string name="app_name">时间管理者</string>
<string name="title_home">Home</string>
<string name="title_dashboard">Dashboard</string>
<string name="title_notifications">Notifications</string>
<string name="STRItextview5">仅显示本周要上的课程</string>
<string name="STRIright"><![CDATA[>]]></string>
<string name="starttime">开始时间</string>
<string name="dayofcourse">上课日</string>
<string name="terminationtime">结束时间</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
<string name="joinDialogTitle"> 加入</string>
<string name="jd_zzzjhd">组织者将获得您的:</string>
<string name="nad_place">地点: </string>
<string name="nad_commit">请输入活动描述: </string>
</resources>
+2
View File
@@ -14,6 +14,8 @@ buildscript {
allprojects {
repositories {
maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}
jcenter()
}
}
+3
View File
@@ -0,0 +1,3 @@
jdk.home.android_api_25_platform_(1)=/home/mj/android-sdks
jdk.home.1.8_(1)=/usr/share/android-studio/jre
javac2.instrumentation.includeJavaRuntime=false
+246
View File
@@ -0,0 +1,246 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="client" default="all">
<property file="client.properties"/>
<!-- Uncomment the following property if no tests compilation is needed -->
<!--
<property name="skip.tests" value="true"/>
-->
<!-- Compiler options -->
<property name="compiler.debug" value="on"/>
<property name="compiler.generate.no.warnings" value="off"/>
<property name="compiler.args" value=""/>
<property name="compiler.max.memory" value="700m"/>
<patternset id="ignored.files">
<exclude name="**/*.hprof/**"/>
<exclude name="**/*.pyc/**"/>
<exclude name="**/*.pyo/**"/>
<exclude name="**/*.rbc/**"/>
<exclude name="**/*.yarb/**"/>
<exclude name="**/*~/**"/>
<exclude name="**/.DS_Store/**"/>
<exclude name="**/.git/**"/>
<exclude name="**/.hg/**"/>
<exclude name="**/.svn/**"/>
<exclude name="**/CVS/**"/>
<exclude name="**/RCS/**"/>
<exclude name="**/SCCS/**"/>
<exclude name="**/__pycache__/**"/>
<exclude name="**/_svn/**"/>
<exclude name="**/rcs/**"/>
<exclude name="**/vssver.scc/**"/>
<exclude name="**/vssver2.scc/**"/>
</patternset>
<patternset id="library.patterns">
<include name="*.war"/>
<include name="*.swc"/>
<include name="*.apk"/>
<include name="*.zip"/>
<include name="*.ear"/>
<include name="*.egg"/>
<include name="*.ane"/>
<include name="*.jar"/>
</patternset>
<patternset id="compiler.resources">
<exclude name="**/?*.java"/>
<exclude name="**/?*.form"/>
<exclude name="**/?*.class"/>
<exclude name="**/?*.groovy"/>
<exclude name="**/?*.scala"/>
<exclude name="**/?*.flex"/>
<exclude name="**/?*.kt"/>
<exclude name="**/?*.clj"/>
<exclude name="**/?*.aj"/>
</patternset>
<!-- JDK definitions -->
<property name="jdk.bin.1.8_(1)" value="${jdk.home.1.8_(1)}/bin"/>
<path id="jdk.classpath.1.8_(1)">
<fileset dir="${jdk.home.1.8_(1)}">
<include name="jre/lib/charsets.jar"/>
<include name="jre/lib/ext/cldrdata.jar"/>
<include name="jre/lib/ext/dnsns.jar"/>
<include name="jre/lib/ext/jaccess.jar"/>
<include name="jre/lib/ext/localedata.jar"/>
<include name="jre/lib/ext/nashorn.jar"/>
<include name="jre/lib/ext/sunec.jar"/>
<include name="jre/lib/ext/sunjce_provider.jar"/>
<include name="jre/lib/ext/sunpkcs11.jar"/>
<include name="jre/lib/ext/zipfs.jar"/>
<include name="jre/lib/jce.jar"/>
<include name="jre/lib/jsse.jar"/>
<include name="jre/lib/management-agent.jar"/>
<include name="jre/lib/resources.jar"/>
<include name="jre/lib/rt.jar"/>
</fileset>
</path>
<property name="project.jdk.home" value="${jdk.home.1.8_(1)}"/>
<property name="project.jdk.bin" value="${jdk.bin.1.8_(1)}"/>
<property name="project.jdk.classpath" value="jdk.classpath.1.8_(1)"/>
<!-- Project Libraries -->
<path id="library.animated-vector-drawable-25.3.1.classpath">
<pathelement location="${basedir}/../../../.android/build-cache/b28b5b0daad92cf4f753547e147c180ec5d988dc/output/res"/>
<pathelement location="${basedir}/../../../.android/build-cache/b28b5b0daad92cf4f753547e147c180ec5d988dc/output/jars/classes.jar"/>
</path>
<path id="library.appcompat-v7-25.3.1.classpath">
<pathelement location="${basedir}/../../../.android/build-cache/e989540b6106ad8b8da9482202d03f8d01153784/output/res"/>
<pathelement location="${basedir}/../../../.android/build-cache/e989540b6106ad8b8da9482202d03f8d01153784/output/jars/classes.jar"/>
</path>
<path id="library.constraint-layout-1.0.2.classpath">
<pathelement location="${basedir}/../../../.android/build-cache/1500463eb74fcecd689ef5523b3cdebe95200e69/output/res"/>
<pathelement location="${basedir}/../../../.android/build-cache/1500463eb74fcecd689ef5523b3cdebe95200e69/output/jars/classes.jar"/>
</path>
<path id="library.constraint-layout-solver-1.0.2.classpath">
<pathelement location="${basedir}/../../../android-sdks/extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.2/constraint-layout-solver-1.0.2.jar"/>
</path>
<path id="library.design-25.3.1.classpath">
<pathelement location="${basedir}/../../../.android/build-cache/c9fc9e8502a41cc8eb18061c2c0505d351b72b9a/output/res"/>
<pathelement location="${basedir}/../../../.android/build-cache/c9fc9e8502a41cc8eb18061c2c0505d351b72b9a/output/jars/classes.jar"/>
</path>
<path id="library.espresso-core-2.2.2.classpath">
<pathelement location="${basedir}/../../../.android/build-cache/d228ef95577cb482345707fd4aa6cbd11e10b39f/output/res"/>
<pathelement location="${basedir}/../../../.android/build-cache/d228ef95577cb482345707fd4aa6cbd11e10b39f/output/jars/classes.jar"/>
</path>
<path id="library.espresso-idling-resource-2.2.2.classpath">
<pathelement location="${basedir}/../../../.android/build-cache/92f5632a9fc62cb8c5988ad5c1fa76c75fbc4094/output/res"/>
<pathelement location="${basedir}/../../../.android/build-cache/92f5632a9fc62cb8c5988ad5c1fa76c75fbc4094/output/jars/classes.jar"/>
</path>
<path id="library.exposed-instrumentation-api-publish-0.5.classpath">
<pathelement location="${basedir}/../../../.android/build-cache/63a65d76f870f87da13c3ae6b18932a6d9b81bbc/output/res"/>
<pathelement location="${basedir}/../../../.android/build-cache/63a65d76f870f87da13c3ae6b18932a6d9b81bbc/output/jars/classes.jar"/>
</path>
<path id="library.hamcrest-core-1.3.classpath">
<pathelement location="${basedir}/../../../.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.3/42a25dc3219429f0e5d060061f71acb49bf010a0/hamcrest-core-1.3.jar"/>
</path>
<path id="library.hamcrest-integration-1.3.classpath">
<pathelement location="${basedir}/../../../.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-integration/1.3/5de0c73fef18917cd85d0ab70bb23818685e4dfd/hamcrest-integration-1.3.jar"/>
</path>
<path id="library.hamcrest-library-1.3.classpath">
<pathelement location="${basedir}/../../../.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-library/1.3/4785a3c21320980282f9f33d0d1264a69040538f/hamcrest-library-1.3.jar"/>
</path>
<path id="library.javawriter-2.1.1.classpath">
<pathelement location="${basedir}/../../../.gradle/caches/modules-2/files-2.1/com.squareup/javawriter/2.1.1/67ff45d9ae02e583d0f9b3432a5ebbe05c30c966/javawriter-2.1.1.jar"/>
</path>
<path id="library.javax.annotation-api-1.2.classpath">
<pathelement location="${basedir}/../../../.gradle/caches/modules-2/files-2.1/javax.annotation/javax.annotation-api/1.2/479c1e06db31c432330183f5cae684163f186146/javax.annotation-api-1.2.jar"/>
</path>
<path id="library.javax.inject-1.classpath">
<pathelement location="${basedir}/../../../.gradle/caches/modules-2/files-2.1/javax.inject/javax.inject/1/6975da39a7040257bd51d21a231b76c915872d38/javax.inject-1.jar"/>
</path>
<path id="library.jsr305-2.0.1.classpath">
<pathelement location="${basedir}/../../../.gradle/caches/modules-2/files-2.1/com.google.code.findbugs/jsr305/2.0.1/516c03b21d50a644d538de0f0369c620989cd8f0/jsr305-2.0.1.jar"/>
</path>
<path id="library.junit-4.12.classpath">
<pathelement location="${basedir}/../../../.gradle/caches/modules-2/files-2.1/junit/junit/4.12/2973d150c0dc1fefe998f834810d68f278ea58ec/junit-4.12.jar"/>
</path>
<path id="library.recyclerview-v7-25.3.1.classpath">
<pathelement location="${basedir}/../../../.android/build-cache/78e09e029eb7590f966efd46dbc2f7618b43f560/output/res"/>
<pathelement location="${basedir}/../../../.android/build-cache/78e09e029eb7590f966efd46dbc2f7618b43f560/output/jars/classes.jar"/>
</path>
<path id="library.rules-0.5.classpath">
<pathelement location="${basedir}/../../../.android/build-cache/acca583692febd24808694eee3d3b72b7798ecd1/output/res"/>
<pathelement location="${basedir}/../../../.android/build-cache/acca583692febd24808694eee3d3b72b7798ecd1/output/jars/classes.jar"/>
</path>
<path id="library.runner-0.5.classpath">
<pathelement location="${basedir}/../../../.android/build-cache/abc1d0fb48eab34b065196e899acd41e540cb17a/output/res"/>
<pathelement location="${basedir}/../../../.android/build-cache/abc1d0fb48eab34b065196e899acd41e540cb17a/output/jars/classes.jar"/>
</path>
<path id="library.support-annotations-25.3.1.classpath">
<pathelement location="${basedir}/../../../android-sdks/extras/android/m2repository/com/android/support/support-annotations/25.3.1/support-annotations-25.3.1.jar"/>
</path>
<path id="library.support-compat-25.3.1.classpath">
<pathelement location="${basedir}/../../../.android/build-cache/1863b0863c306f83740d464d320b703e4cb21c3b/output/res"/>
<pathelement location="${basedir}/../../../.android/build-cache/1863b0863c306f83740d464d320b703e4cb21c3b/output/jars/classes.jar"/>
</path>
<path id="library.support-core-ui-25.3.1.classpath">
<pathelement location="${basedir}/../../../.android/build-cache/5b3397d2eb82c293b00d40001d0ad508e386617b/output/res"/>
<pathelement location="${basedir}/../../../.android/build-cache/5b3397d2eb82c293b00d40001d0ad508e386617b/output/jars/classes.jar"/>
</path>
<path id="library.support-core-utils-25.3.1.classpath">
<pathelement location="${basedir}/../../../.android/build-cache/2d771226a757bd279f24bb6ae66df0cd43667b29/output/res"/>
<pathelement location="${basedir}/../../../.android/build-cache/2d771226a757bd279f24bb6ae66df0cd43667b29/output/jars/classes.jar"/>
</path>
<path id="library.support-fragment-25.3.1.classpath">
<pathelement location="${basedir}/../../../.android/build-cache/0417b9d79f7e1f6df77e56f122595b254323d12b/output/res"/>
<pathelement location="${basedir}/../../../.android/build-cache/0417b9d79f7e1f6df77e56f122595b254323d12b/output/jars/classes.jar"/>
</path>
<path id="library.support-media-compat-25.3.1.classpath">
<pathelement location="${basedir}/../../../.android/build-cache/e010e05b47b40e968afdaf00d8ef3eb00ddc274b/output/res"/>
<pathelement location="${basedir}/../../../.android/build-cache/e010e05b47b40e968afdaf00d8ef3eb00ddc274b/output/jars/classes.jar"/>
</path>
<path id="library.support-v4-25.3.1.classpath">
<pathelement location="${basedir}/../../../.android/build-cache/01889cc04e7420fbd1f82a76c2961b8e919fbb1c/output/res"/>
<pathelement location="${basedir}/../../../.android/build-cache/01889cc04e7420fbd1f82a76c2961b8e919fbb1c/output/jars/classes.jar"/>
</path>
<path id="library.support-vector-drawable-25.3.1.classpath">
<pathelement location="${basedir}/../../../.android/build-cache/639b980cecdbde820085d93e2511c6d4c899ae2b/output/res"/>
<pathelement location="${basedir}/../../../.android/build-cache/639b980cecdbde820085d93e2511c6d4c899ae2b/output/jars/classes.jar"/>
</path>
<path id="library.transition-25.3.1.classpath">
<pathelement location="${basedir}/../../../.android/build-cache/aceec83172c2c27c248873feade19e16024e2db6/output/res"/>
<pathelement location="${basedir}/../../../.android/build-cache/aceec83172c2c27c248873feade19e16024e2db6/output/jars/classes.jar"/>
</path>
<!-- Register Custom Compiler Taskdefs -->
<property name="javac2.home" value="${idea.home}/lib"/>
<path id="javac2.classpath">
<pathelement location="${javac2.home}/javac2.jar"/>
<pathelement location="${javac2.home}/jdom.jar"/>
<pathelement location="${javac2.home}/asm-all.jar"/>
<pathelement location="${javac2.home}/jgoodies-forms.jar"/>
</path>
<target name="register.custom.compilers">
<taskdef name="javac2" classname="com.intellij.ant.Javac2" classpathref="javac2.classpath"/>
<taskdef name="instrumentIdeaExtensions" classname="com.intellij.ant.InstrumentIdeaExtensions" classpathref="javac2.classpath"/>
</target>
<!-- Modules -->
<import file="${basedir}/app/module_app.xml"/>
<import file="${basedir}/module_client.xml"/>
<target name="init" description="Build initialization">
<!-- Perform any build initialization in this target -->
</target>
<target name="clean" depends="clean.module.app, clean.module.client" description="cleanup all"/>
<target name="build.modules" depends="init, clean, compile.module.app, compile.module.client" description="build all modules"/>
<target name="all" depends="build.modules" description="build all"/>
</project>
Vendored Executable → Regular
View File

Some files were not shown because too many files have changed in this diff Show More