提交Android待办项目核心代码

main
陈宇欣 6 days ago
commit fd2db2f8f7

15
.gitignore vendored

@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties

3
.idea/.gitignore vendored

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AndroidProjectSystem">
<option name="providerId" value="com.android.tools.idea.GradleProjectSystem" />
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="1.8" />
</component>
</project>

@ -0,0 +1,461 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DBNavigator.Project.DataEditorManager">
<record-view-column-sorting-type value="BY_INDEX" />
<value-preview-text-wrapping value="false" />
<value-preview-pinned value="false" />
</component>
<component name="DBNavigator.Project.DataExportManager">
<export-instructions>
<create-header value="true" />
<friendly-headers value="false" />
<quote-values-containing-separator value="true" />
<quote-all-values value="false" />
<value-separator value="" />
<file-name value="" />
<file-location value="" />
<scope value="GLOBAL" />
<destination value="FILE" />
<format value="EXCEL" />
<charset value="GBK" />
</export-instructions>
</component>
<component name="DBNavigator.Project.DatabaseBrowserManager">
<autoscroll-to-editor value="false" />
<autoscroll-from-editor value="true" />
<show-object-properties value="false" />
<loaded-nodes />
</component>
<component name="DBNavigator.Project.DatabaseFileManager">
<open-files />
</component>
<component name="DBNavigator.Project.EditorStateManager">
<last-used-providers />
</component>
<component name="DBNavigator.Project.ExecutionManager">
<retain-sticky-names value="false" />
</component>
<component name="DBNavigator.Project.MethodExecutionManager">
<method-browser />
<execution-history>
<group-entries value="true" />
<execution-inputs />
</execution-history>
<argument-values-cache />
</component>
<component name="DBNavigator.Project.ObjectDependencyManager">
<last-used-dependency-type value="INCOMING" />
</component>
<component name="DBNavigator.Project.ObjectQuickFilterManager">
<last-used-operator value="EQUAL" />
<filters />
</component>
<component name="DBNavigator.Project.ParserDiagnosticsManager">
<diagnostics-history />
</component>
<component name="DBNavigator.Project.ScriptExecutionManager" clear-outputs="true">
<recently-used-interfaces />
</component>
<component name="DBNavigator.Project.Settings">
<connections />
<browser-settings>
<general>
<display-mode value="TABBED" />
<navigation-history-size value="100" />
<show-object-details value="false" />
</general>
<filters>
<object-type-filter>
<object-type name="SCHEMA" enabled="true" />
<object-type name="USER" enabled="true" />
<object-type name="ROLE" enabled="true" />
<object-type name="PRIVILEGE" enabled="true" />
<object-type name="CHARSET" enabled="true" />
<object-type name="TABLE" enabled="true" />
<object-type name="VIEW" enabled="true" />
<object-type name="MATERIALIZED_VIEW" enabled="true" />
<object-type name="NESTED_TABLE" enabled="true" />
<object-type name="COLUMN" enabled="true" />
<object-type name="INDEX" enabled="true" />
<object-type name="CONSTRAINT" enabled="true" />
<object-type name="DATASET_TRIGGER" enabled="true" />
<object-type name="DATABASE_TRIGGER" enabled="true" />
<object-type name="SYNONYM" enabled="true" />
<object-type name="SEQUENCE" enabled="true" />
<object-type name="PROCEDURE" enabled="true" />
<object-type name="FUNCTION" enabled="true" />
<object-type name="PACKAGE" enabled="true" />
<object-type name="TYPE" enabled="true" />
<object-type name="TYPE_ATTRIBUTE" enabled="true" />
<object-type name="ARGUMENT" enabled="true" />
<object-type name="DIMENSION" enabled="true" />
<object-type name="CLUSTER" enabled="true" />
<object-type name="DBLINK" enabled="true" />
</object-type-filter>
</filters>
<sorting>
<object-type name="COLUMN" sorting-type="NAME" />
<object-type name="FUNCTION" sorting-type="NAME" />
<object-type name="PROCEDURE" sorting-type="NAME" />
<object-type name="ARGUMENT" sorting-type="POSITION" />
</sorting>
<default-editors>
<object-type name="VIEW" editor-type="SELECTION" />
<object-type name="PACKAGE" editor-type="SELECTION" />
<object-type name="TYPE" editor-type="SELECTION" />
</default-editors>
</browser-settings>
<navigation-settings>
<lookup-filters>
<lookup-objects>
<object-type name="SCHEMA" enabled="true" />
<object-type name="USER" enabled="false" />
<object-type name="ROLE" enabled="false" />
<object-type name="PRIVILEGE" enabled="false" />
<object-type name="CHARSET" enabled="false" />
<object-type name="TABLE" enabled="true" />
<object-type name="VIEW" enabled="true" />
<object-type name="MATERIALIZED VIEW" enabled="true" />
<object-type name="INDEX" enabled="true" />
<object-type name="CONSTRAINT" enabled="true" />
<object-type name="DATASET TRIGGER" enabled="true" />
<object-type name="DATABASE TRIGGER" enabled="true" />
<object-type name="SYNONYM" enabled="false" />
<object-type name="SEQUENCE" enabled="true" />
<object-type name="PROCEDURE" enabled="true" />
<object-type name="FUNCTION" enabled="true" />
<object-type name="PACKAGE" enabled="true" />
<object-type name="TYPE" enabled="true" />
<object-type name="DIMENSION" enabled="false" />
<object-type name="CLUSTER" enabled="false" />
<object-type name="DBLINK" enabled="true" />
</lookup-objects>
<force-database-load value="false" />
<prompt-connection-selection value="true" />
<prompt-schema-selection value="true" />
</lookup-filters>
</navigation-settings>
<dataset-grid-settings>
<general>
<enable-zooming value="true" />
<enable-column-tooltip value="true" />
</general>
<sorting>
<nulls-first value="true" />
<max-sorting-columns value="4" />
</sorting>
<tracking-columns>
<columnNames value="" />
<visible value="true" />
<editable value="false" />
</tracking-columns>
</dataset-grid-settings>
<dataset-editor-settings>
<text-editor-popup>
<active value="false" />
<active-if-empty value="false" />
<data-length-threshold value="100" />
<popup-delay value="1000" />
</text-editor-popup>
<values-actions-popup>
<show-popup-button value="true" />
<element-count-threshold value="1000" />
<data-length-threshold value="250" />
</values-actions-popup>
<general>
<fetch-block-size value="100" />
<fetch-timeout value="30" />
<trim-whitespaces value="true" />
<convert-empty-strings-to-null value="true" />
<select-content-on-cell-edit value="true" />
<large-value-preview-active value="true" />
</general>
<filters>
<prompt-filter-dialog value="true" />
<default-filter-type value="BASIC" />
</filters>
<qualified-text-editor text-length-threshold="300">
<content-types>
<content-type name="Text" enabled="true" />
<content-type name="Properties" enabled="true" />
<content-type name="XML" enabled="true" />
<content-type name="DTD" enabled="true" />
<content-type name="HTML" enabled="true" />
<content-type name="XHTML" enabled="true" />
<content-type name="Java" enabled="true" />
<content-type name="SQL" enabled="true" />
<content-type name="PL/SQL" enabled="true" />
<content-type name="JSON" enabled="true" />
<content-type name="JSON5" enabled="true" />
<content-type name="Groovy" enabled="true" />
<content-type name="AIDL" enabled="true" />
<content-type name="YAML" enabled="true" />
<content-type name="Manifest" enabled="true" />
</content-types>
</qualified-text-editor>
<record-navigation>
<navigation-target value="VIEWER" />
</record-navigation>
</dataset-editor-settings>
<code-editor-settings>
<general>
<show-object-navigation-gutter value="false" />
<show-spec-declaration-navigation-gutter value="true" />
<enable-spellchecking value="true" />
<enable-reference-spellchecking value="false" />
</general>
<confirmations>
<save-changes value="false" />
<revert-changes value="true" />
</confirmations>
</code-editor-settings>
<code-completion-settings>
<filters>
<basic-filter>
<filter-element type="RESERVED_WORD" id="keyword" selected="true" />
<filter-element type="RESERVED_WORD" id="function" selected="true" />
<filter-element type="RESERVED_WORD" id="parameter" selected="true" />
<filter-element type="RESERVED_WORD" id="datatype" selected="true" />
<filter-element type="RESERVED_WORD" id="exception" selected="true" />
<filter-element type="OBJECT" id="schema" selected="true" />
<filter-element type="OBJECT" id="role" selected="true" />
<filter-element type="OBJECT" id="user" selected="true" />
<filter-element type="OBJECT" id="privilege" selected="true" />
<user-schema>
<filter-element type="OBJECT" id="table" selected="true" />
<filter-element type="OBJECT" id="view" selected="true" />
<filter-element type="OBJECT" id="materialized view" selected="true" />
<filter-element type="OBJECT" id="index" selected="true" />
<filter-element type="OBJECT" id="constraint" selected="true" />
<filter-element type="OBJECT" id="trigger" selected="true" />
<filter-element type="OBJECT" id="synonym" selected="false" />
<filter-element type="OBJECT" id="sequence" selected="true" />
<filter-element type="OBJECT" id="procedure" selected="true" />
<filter-element type="OBJECT" id="function" selected="true" />
<filter-element type="OBJECT" id="package" selected="true" />
<filter-element type="OBJECT" id="type" selected="true" />
<filter-element type="OBJECT" id="dimension" selected="true" />
<filter-element type="OBJECT" id="cluster" selected="true" />
<filter-element type="OBJECT" id="dblink" selected="true" />
</user-schema>
<public-schema>
<filter-element type="OBJECT" id="table" selected="false" />
<filter-element type="OBJECT" id="view" selected="false" />
<filter-element type="OBJECT" id="materialized view" selected="false" />
<filter-element type="OBJECT" id="index" selected="false" />
<filter-element type="OBJECT" id="constraint" selected="false" />
<filter-element type="OBJECT" id="trigger" selected="false" />
<filter-element type="OBJECT" id="synonym" selected="false" />
<filter-element type="OBJECT" id="sequence" selected="false" />
<filter-element type="OBJECT" id="procedure" selected="false" />
<filter-element type="OBJECT" id="function" selected="false" />
<filter-element type="OBJECT" id="package" selected="false" />
<filter-element type="OBJECT" id="type" selected="false" />
<filter-element type="OBJECT" id="dimension" selected="false" />
<filter-element type="OBJECT" id="cluster" selected="false" />
<filter-element type="OBJECT" id="dblink" selected="false" />
</public-schema>
<any-schema>
<filter-element type="OBJECT" id="table" selected="true" />
<filter-element type="OBJECT" id="view" selected="true" />
<filter-element type="OBJECT" id="materialized view" selected="true" />
<filter-element type="OBJECT" id="index" selected="true" />
<filter-element type="OBJECT" id="constraint" selected="true" />
<filter-element type="OBJECT" id="trigger" selected="true" />
<filter-element type="OBJECT" id="synonym" selected="true" />
<filter-element type="OBJECT" id="sequence" selected="true" />
<filter-element type="OBJECT" id="procedure" selected="true" />
<filter-element type="OBJECT" id="function" selected="true" />
<filter-element type="OBJECT" id="package" selected="true" />
<filter-element type="OBJECT" id="type" selected="true" />
<filter-element type="OBJECT" id="dimension" selected="true" />
<filter-element type="OBJECT" id="cluster" selected="true" />
<filter-element type="OBJECT" id="dblink" selected="true" />
</any-schema>
</basic-filter>
<extended-filter>
<filter-element type="RESERVED_WORD" id="keyword" selected="true" />
<filter-element type="RESERVED_WORD" id="function" selected="true" />
<filter-element type="RESERVED_WORD" id="parameter" selected="true" />
<filter-element type="RESERVED_WORD" id="datatype" selected="true" />
<filter-element type="RESERVED_WORD" id="exception" selected="true" />
<filter-element type="OBJECT" id="schema" selected="true" />
<filter-element type="OBJECT" id="user" selected="true" />
<filter-element type="OBJECT" id="role" selected="true" />
<filter-element type="OBJECT" id="privilege" selected="true" />
<user-schema>
<filter-element type="OBJECT" id="table" selected="true" />
<filter-element type="OBJECT" id="view" selected="true" />
<filter-element type="OBJECT" id="materialized view" selected="true" />
<filter-element type="OBJECT" id="index" selected="true" />
<filter-element type="OBJECT" id="constraint" selected="true" />
<filter-element type="OBJECT" id="trigger" selected="true" />
<filter-element type="OBJECT" id="synonym" selected="true" />
<filter-element type="OBJECT" id="sequence" selected="true" />
<filter-element type="OBJECT" id="procedure" selected="true" />
<filter-element type="OBJECT" id="function" selected="true" />
<filter-element type="OBJECT" id="package" selected="true" />
<filter-element type="OBJECT" id="type" selected="true" />
<filter-element type="OBJECT" id="dimension" selected="true" />
<filter-element type="OBJECT" id="cluster" selected="true" />
<filter-element type="OBJECT" id="dblink" selected="true" />
</user-schema>
<public-schema>
<filter-element type="OBJECT" id="table" selected="true" />
<filter-element type="OBJECT" id="view" selected="true" />
<filter-element type="OBJECT" id="materialized view" selected="true" />
<filter-element type="OBJECT" id="index" selected="true" />
<filter-element type="OBJECT" id="constraint" selected="true" />
<filter-element type="OBJECT" id="trigger" selected="true" />
<filter-element type="OBJECT" id="synonym" selected="true" />
<filter-element type="OBJECT" id="sequence" selected="true" />
<filter-element type="OBJECT" id="procedure" selected="true" />
<filter-element type="OBJECT" id="function" selected="true" />
<filter-element type="OBJECT" id="package" selected="true" />
<filter-element type="OBJECT" id="type" selected="true" />
<filter-element type="OBJECT" id="dimension" selected="true" />
<filter-element type="OBJECT" id="cluster" selected="true" />
<filter-element type="OBJECT" id="dblink" selected="true" />
</public-schema>
<any-schema>
<filter-element type="OBJECT" id="table" selected="true" />
<filter-element type="OBJECT" id="view" selected="true" />
<filter-element type="OBJECT" id="materialized view" selected="true" />
<filter-element type="OBJECT" id="index" selected="true" />
<filter-element type="OBJECT" id="constraint" selected="true" />
<filter-element type="OBJECT" id="trigger" selected="true" />
<filter-element type="OBJECT" id="synonym" selected="true" />
<filter-element type="OBJECT" id="sequence" selected="true" />
<filter-element type="OBJECT" id="procedure" selected="true" />
<filter-element type="OBJECT" id="function" selected="true" />
<filter-element type="OBJECT" id="package" selected="true" />
<filter-element type="OBJECT" id="type" selected="true" />
<filter-element type="OBJECT" id="dimension" selected="true" />
<filter-element type="OBJECT" id="cluster" selected="true" />
<filter-element type="OBJECT" id="dblink" selected="true" />
</any-schema>
</extended-filter>
</filters>
<sorting enabled="true">
<sorting-element type="RESERVED_WORD" id="keyword" />
<sorting-element type="RESERVED_WORD" id="datatype" />
<sorting-element type="OBJECT" id="column" />
<sorting-element type="OBJECT" id="table" />
<sorting-element type="OBJECT" id="view" />
<sorting-element type="OBJECT" id="materialized view" />
<sorting-element type="OBJECT" id="index" />
<sorting-element type="OBJECT" id="constraint" />
<sorting-element type="OBJECT" id="trigger" />
<sorting-element type="OBJECT" id="synonym" />
<sorting-element type="OBJECT" id="sequence" />
<sorting-element type="OBJECT" id="procedure" />
<sorting-element type="OBJECT" id="function" />
<sorting-element type="OBJECT" id="package" />
<sorting-element type="OBJECT" id="type" />
<sorting-element type="OBJECT" id="dimension" />
<sorting-element type="OBJECT" id="cluster" />
<sorting-element type="OBJECT" id="dblink" />
<sorting-element type="OBJECT" id="schema" />
<sorting-element type="OBJECT" id="role" />
<sorting-element type="OBJECT" id="user" />
<sorting-element type="RESERVED_WORD" id="function" />
<sorting-element type="RESERVED_WORD" id="parameter" />
</sorting>
<format>
<enforce-code-style-case value="true" />
</format>
</code-completion-settings>
<execution-engine-settings>
<statement-execution>
<fetch-block-size value="100" />
<execution-timeout value="20" />
<debug-execution-timeout value="600" />
<focus-result value="false" />
<prompt-execution value="false" />
</statement-execution>
<script-execution>
<command-line-interfaces />
<execution-timeout value="300" />
</script-execution>
<method-execution>
<execution-timeout value="30" />
<debug-execution-timeout value="600" />
<parameter-history-size value="10" />
</method-execution>
</execution-engine-settings>
<operation-settings>
<transactions>
<uncommitted-changes>
<on-project-close value="ASK" />
<on-disconnect value="ASK" />
<on-autocommit-toggle value="ASK" />
</uncommitted-changes>
<multiple-uncommitted-changes>
<on-commit value="ASK" />
<on-rollback value="ASK" />
</multiple-uncommitted-changes>
</transactions>
<session-browser>
<disconnect-session value="ASK" />
<kill-session value="ASK" />
<reload-on-filter-change value="false" />
</session-browser>
<compiler>
<compile-type value="KEEP" />
<compile-dependencies value="ASK" />
<always-show-controls value="false" />
</compiler>
<debugger>
<debugger-type value="ASK" />
<use-generic-runners value="true" />
</debugger>
</operation-settings>
<ddl-file-settings>
<extensions>
<mapping file-type-id="VIEW" extensions="vw" />
<mapping file-type-id="TRIGGER" extensions="trg" />
<mapping file-type-id="PROCEDURE" extensions="prc" />
<mapping file-type-id="FUNCTION" extensions="fnc" />
<mapping file-type-id="PACKAGE" extensions="pkg" />
<mapping file-type-id="PACKAGE_SPEC" extensions="pks" />
<mapping file-type-id="PACKAGE_BODY" extensions="pkb" />
<mapping file-type-id="TYPE" extensions="tpe" />
<mapping file-type-id="TYPE_SPEC" extensions="tps" />
<mapping file-type-id="TYPE_BODY" extensions="tpb" />
</extensions>
<general>
<lookup-ddl-files value="true" />
<create-ddl-files value="false" />
<synchronize-ddl-files value="true" />
<use-qualified-names value="false" />
<make-scripts-rerunnable value="true" />
</general>
</ddl-file-settings>
<general-settings>
<regional-settings>
<date-format value="MEDIUM" />
<number-format value="UNGROUPED" />
<locale value="SYSTEM_DEFAULT" />
<use-custom-formats value="false" />
</regional-settings>
<environment>
<environment-types>
<environment-type id="development" name="Development" description="Development environment" color="-2430209/-12296320" readonly-code="false" readonly-data="false" />
<environment-type id="integration" name="Integration" description="Integration environment" color="-2621494/-12163514" readonly-code="true" readonly-data="false" />
<environment-type id="production" name="Production" description="Productive environment" color="-11574/-10271420" readonly-code="true" readonly-data="true" />
<environment-type id="other" name="Other" description="" color="-1576/-10724543" readonly-code="false" readonly-data="false" />
</environment-types>
<visibility-settings>
<connection-tabs value="true" />
<dialog-headers value="true" />
<object-editor-tabs value="true" />
<script-editor-tabs value="false" />
<execution-result-tabs value="true" />
</visibility-settings>
</environment>
</general-settings>
</component>
<component name="DBNavigator.Project.StatementExecutionManager">
<execution-variables />
</component>
</project>

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetSelector">
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
</selectionStates>
</component>
</project>

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="CHOOSE_PER_TEST" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectMigrations">
<option name="MigrateToGradleLocalJavaHome">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</component>
</project>

@ -0,0 +1,26 @@
<project version="4">
<component name="DesignSurface">
<option name="filePathToZoomLevelMap">
<map>
<entry key="..\:/Users/DELL/Desktop/AAA/app/src/main/res/drawable/btn_circle.xml" value="0.2045" />
<entry key="..\:/Users/DELL/Desktop/AAA/app/src/main/res/drawable/edit_background.xml" value="0.228" />
<entry key="..\:/Users/DELL/Desktop/AAA/app/src/main/res/layout/activity_add.xml" value="0.25" />
<entry key="..\:/Users/DELL/Desktop/AAA/app/src/main/res/layout/activity_detail.xml" value="0.25052083333333336" />
<entry key="..\:/Users/DELL/Desktop/AAA/app/src/main/res/layout/activity_login.xml" value="0.25052083333333336" />
<entry key="..\:/Users/DELL/Desktop/AAA/app/src/main/res/layout/activity_main.xml" value="0.25" />
<entry key="..\:/Users/DELL/Desktop/AAA/app/src/main/res/layout/activity_regist.xml" value="0.25" />
<entry key="..\:/Users/DELL/Desktop/AAA/app/src/main/res/layout/dialog_date.xml" value="0.28125" />
<entry key="..\:/Users/DELL/Desktop/AAA/app/src/main/res/layout/edit_background.xml" value="0.26666666666666666" />
<entry key="..\:/Users/DELL/Desktop/AAA/app/src/main/res/layout/item.xml" value="0.16" />
<entry key="..\:/Users/DELL/Desktop/AAA/app/src/main/res/layout/item_select.xml" value="0.2558876811594203" />
</map>
</option>
</component>
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" />
<option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" />
<option value="com.intellij.execution.junit.PatternConfigurationProducer" />
<option value="com.intellij.execution.junit.TestInClassConfigurationProducer" />
<option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" />
<option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" />
<option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" />
<option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" />
</set>
</option>
</component>
</project>

@ -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>

1
app/.gitignore vendored

@ -0,0 +1 @@
/build

@ -0,0 +1,39 @@
plugins {
id 'com.android.application'
}
android {
compileSdk 32
defaultConfig {
applicationId "com.example.aaa"
minSdk 25
targetSdk 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

@ -0,0 +1,26 @@
package com.example.aaa;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.aaa", appContext.getPackageName());
}
}

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.aaa">
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher_icon"
android:label="@string/app_name"
android:roundIcon="@drawable/ic_launcher_icon"
android:supportsRtl="true"
android:theme="@style/Theme.AAA">
<activity
android:name=".MainActivity"
android:exported="true" />
<receiver
android:name=".AlarmReceiver"
android:process=":remote" />
<activity
android:name=".AddActivity"
android:exported="false" />
<activity
android:name=".DetailActivity"
android:exported="false" />
<activity
android:name=".RegistActivity"
android:exported="true" />
<activity
android:name=".LoginActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

@ -0,0 +1,307 @@
package com.example.aaa;
import android.app.AlarmManager;
import android.app.DatePickerDialog;
import android.app.PendingIntent;
import android.app.TimePickerDialog;
import android.content.Intent;
import android.content.SharedPreferences;
import android.icu.util.Calendar;
import android.icu.util.TimeZone;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.TimePicker;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class AddActivity extends AppCompatActivity implements View.OnClickListener {
private Button back; //返回按钮
private CheckBox notif; //返回按钮
private EditText title; //标题
private EditText content; //内容
private ImageView BGTime;//开始时间
private ImageView FNTime;//结束时间
private TextView BG_Time_content;
private TextView FN_Time_content;
private Spinner sp_dropdown;
private String strBGTime;
private String strBGDate;
private String strBG;
private String strFNTime;
private String strFNDate;
private String strFN;
private int statu;
private int Hour;
private int Minute;
private String[] learingSiteArrar = {"学习", "工作", "日常", "生活", "社交", "购物"};
private int TongzhiId = 1;
private Button finish; //完成按钮
private String get_title;
private String get_content;
private String get_createTime;
private String get_finishTime;
private String get_statu;
private AdapterView.OnItemSelectedListener onItemSelectedListener = new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int postion, long I) {
switch (adapterView.getId()) {
case R.id.sp_dropdown:
//记住点击的选项
statu = postion;
break;
}
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add);
back = (Button) findViewById(R.id.back_add);
notif = (CheckBox) findViewById(R.id.notif);
title = (EditText) findViewById(R.id.title_add);
content = (EditText) findViewById(R.id.context_add);
finish = (Button) findViewById(R.id.finish);
BGTime = (ImageView) findViewById(R.id.BG_Time_Right_jv);
FNTime = (ImageView) findViewById(R.id.FN_Time_Right_jv);
BG_Time_content = (TextView) findViewById(R.id.BG_Time_content);
FN_Time_content = (TextView) findViewById(R.id.FN_Time_content);
sp_dropdown = (Spinner) findViewById(R.id.sp_dropdown);
finish.setOnClickListener(this);
back.setOnClickListener(this);
BGTime.setOnClickListener(this);
FNTime.setOnClickListener(this);
intiDropdownSpinner();
}
private void intiDropdownSpinner() {
//初始化AdapterView
Spinner sp_dropdown = (Spinner) findViewById(R.id.sp_dropdown);
sp_dropdown.setPrompt("请选择待办类型");
ArrayAdapter<String> learningSiteAdapter = new ArrayAdapter<String>(this,
R.layout.item_select, learingSiteArrar);
sp_dropdown.setAdapter(learningSiteAdapter);
sp_dropdown.setSelection(0);
sp_dropdown.setOnItemSelectedListener(onItemSelectedListener);
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.finish: {
NoteOperator noteOperator = new NoteOperator(AddActivity.this);
get_title = title.getText().toString().trim();
get_content = content.getText().toString().trim();
get_createTime = BG_Time_content.getText().toString();
get_finishTime = FN_Time_content.getText().toString();
get_statu = statu + "";
//判断输入是否有空项
if (TextUtils.isEmpty(get_title) || TextUtils.isEmpty(get_content) || TextUtils.isEmpty(strBG)
|| TextUtils.isEmpty(strFN) || TextUtils.isEmpty(get_statu)) {
Toast.makeText(AddActivity.this, "不能有空项", Toast.LENGTH_SHORT).show();
} else {
Note note = new Note();
note.title = get_title;
note.context = get_content;
note.createTime = get_createTime;
note.finishTime = get_finishTime;
note.statu = statu + "";
boolean add = noteOperator.insert(note);
//如果添加数据成功,跳到待办事项界面,并通过传值,让目标界面进行刷新
if (add) {
//Toast.makeText(AddActivity.this,"添加成功",Toast.LENGTH_SHORT).show();
Intent intent = new Intent();
intent.setClass(AddActivity.this, MainActivity.class);
intent.putExtra("Insert", 1);
Toast.makeText(AddActivity.this, "添加成功", Toast.LENGTH_SHORT).show();
startActivity(intent);
//将设置的标题和内容存入文件,待会通知会去取值
SharedPreferences sp = getSharedPreferences("notif", MODE_PRIVATE);
SharedPreferences.Editor editor = sp.edit();
editor.putString("Title", get_title);
editor.putString("Content", get_content);
editor.commit();
finish();
} else {
Toast.makeText(AddActivity.this, "添加失败", Toast.LENGTH_SHORT).show();
}
}
//通过判断是否选择来发送通知
if (notif.isChecked()) {
Intent intent = new Intent(AddActivity.this, AlarmReceiver.class);
AlarmReceiver.title = get_title;
AlarmReceiver.content = get_content;
startRemind();
}
}
break;
case R.id.BG_Time_Right_jv: {
strBGDate = null;
strBGTime = null;
strBG = "";
Calendar cal = Calendar.getInstance();
//得到小时
int hourOfDay = cal.get(Calendar.HOUR_OF_DAY);
//得到分钟
int minute = cal.get(Calendar.MINUTE);
new TimePickerDialog(AddActivity.this, new TimePickerDialog.OnTimeSetListener() {
@Override
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
Hour = hourOfDay;
Minute = minute;
strBGTime = " " + hourOfDay + ":" + minute;
if (strBGDate != null && strBGTime != null) {
strBG = strBGDate + strBGTime;
} else {
strBG = "";
}
//将选择的时间设置到TextView
BG_Time_content.setText(strBG);
}
}, hourOfDay, minute, true).show();
//得到年月日
int year = cal.get(Calendar.YEAR);
int month = cal.get(Calendar.MONTH);
int day = cal.get(Calendar.DAY_OF_MONTH);
new DatePickerDialog(AddActivity.this, new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker datePicker, int year, int month, int day) {
strBGDate = year + "/" + (month + 1) + "/" + day + "";
}
}, year, month, day).show();
}
break;
case R.id.FN_Time_Right_jv: {
strFNDate = null;
strFNTime = null;
strFN = null;
Calendar cal = Calendar.getInstance();
int hourOfDay = cal.get(Calendar.HOUR_OF_DAY); //得到小时
int minute = cal.get(Calendar.MINUTE); //得到分钟
new TimePickerDialog(AddActivity.this, new TimePickerDialog.OnTimeSetListener() {
@Override
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
strFNTime = " " + hourOfDay + ":" + minute;
if (strFNDate != null && strFNTime != null) {
strFN = strFNDate + strFNTime;
} else {
strFN = "";
}
FN_Time_content.setText(strFN);
}
}, hourOfDay, minute, true).show();
//得到年月日
int year = cal.get(Calendar.YEAR);
int month = cal.get(Calendar.MONTH);
int day = cal.get(Calendar.DAY_OF_MONTH);
new DatePickerDialog(AddActivity.this, new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker datePicker, int year, int month, int day) {
strFNDate = year + "/" + (month + 1) + "/" + day + "";
}
}, year, month, day).show();
}
break;
case R.id.back_add: {
//返回按钮,返回主页面
Intent intent = new Intent(AddActivity.this, MainActivity.class);
startActivity(intent);
finish();
}
break;
default:
break;
}
}
//启动定时通知方法
public void startRemind() {
Calendar mCalendar = Calendar.getInstance();
mCalendar.setTimeInMillis(System.currentTimeMillis());
//获取当前毫秒值
long systemTime = System.currentTimeMillis();
//是设置日历的时间,主要是让日历的年月日和当前同步
mCalendar.setTimeInMillis(System.currentTimeMillis());
// 这里时区需要设置一下不然可能个别手机会有8个小时的时间差
mCalendar.setTimeZone(TimeZone.getTimeZone("GMT+8"));
//设置在几点提醒 设置的为选定的Hour
mCalendar.set(Calendar.HOUR_OF_DAY, Hour);
//设置在几分提醒 设置的为选定的Minute分
mCalendar.set(Calendar.MINUTE, Minute);
mCalendar.set(Calendar.SECOND, 0);
mCalendar.set(Calendar.MILLISECOND, 0);
//上面设置的就是小时和分钟的时间点
//获取上面设置的时间
long selectTime = mCalendar.getTimeInMillis();
// 如果当前时间大于设置的时间,那么就从第二天的设定时间开始
if (systemTime > selectTime) {
mCalendar.add(Calendar.DAY_OF_MONTH, 1);
}
//AlarmReceiver.class为广播接受者
Intent intent = new Intent(AddActivity.this, AlarmReceiver.class);
PendingIntent pi = PendingIntent.getBroadcast(AddActivity.this, 0, intent, 0);
//得到AlarmManager实例
AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);
/**
*
* mCalendar.getTimeInMillis()
*/
am.set(AlarmManager.RTC_WAKEUP, mCalendar.getTimeInMillis(), pi);
}
}

@ -0,0 +1,52 @@
package com.example.aaa;
import static android.content.Context.NOTIFICATION_SERVICE;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.BitmapFactory;
public class AlarmReceiver extends BroadcastReceiver {
//定义通知标题和内容,避免魔法字符串
public static String title = "ToDo";
public static String content = "content";
public static String news = "您设置的ToDo开始时间到啦";
@Override
public void onReceive(Context context, Intent intent) {
//将设置好的标题的内容取出来
SharedPreferences sp = context.getSharedPreferences("notif", context.MODE_PRIVATE);
title = (sp.getString("Title", title));
content = (sp.getString("Content", content));
//初始调用
NotificationManager manager = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE);
Notification.Builder builder = new Notification.Builder(context);
builder.setSmallIcon(R.drawable.notif);
builder.setContentTitle(title);
builder.setContentText(content);
builder.setTicker(news);
builder.setLargeIcon(BitmapFactory.decodeResource(context.getResources(), R.drawable.logo));
builder.setContentInfo("附加消息");
//全部效果展示(震动,铃声,呼吸灯)
builder.setDefaults(Notification.DEFAULT_ALL);
//点击页面跳转
intent = new Intent(context, MainActivity.class);
PendingIntent activity = PendingIntent.getActivity(context, 100, intent, PendingIntent.FLAG_ONE_SHOT);
builder.setContentIntent(activity);
//悬浮显示
builder.setFullScreenIntent(activity, true);
manager.notify(1, builder.build());
}
//传递通知
}

@ -0,0 +1,32 @@
package com.example.aaa;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import androidx.annotation.Nullable;
public class DBOpenHelper extends SQLiteOpenHelper {
public DBOpenHelper(@Nullable Context context) {
super(context, "todo.db", null, 4);
}
//创建数据库的方法,只有项目第一次运行时,会被调用
@Override
public void onCreate(SQLiteDatabase db) {
//创建USER表
String sql1 = "Create table user(account text primary key,password text,id text,phone text)";
String sql2 = "Create table todo(id integer primary key autoincrement, title text,context text,createTime text,finishTime text,statu text)";
db.execSQL(sql1);
db.execSQL(sql2);
}
// 数据库版本在更新时发生改变,会调用此方法
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("drop table if exists user");
db.execSQL("drop table if exists todo");
onCreate(db);
}
}

@ -0,0 +1,233 @@
package com.example.aaa;
import android.app.DatePickerDialog;
import android.app.TimePickerDialog;
import android.content.Intent;
import android.icu.util.Calendar;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.TimePicker;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class DetailActivity extends AppCompatActivity implements View.OnClickListener {
private Button back;
private Button save;
private EditText title;
private EditText context;
private TextView BG_content;
private TextView FN_content;
private int note_id = 0;
private String get_title;//获取标题字符串
private String get_context;//获取内容字符串
private Spinner sp_dropdown;
private String strBGDate;
private String strFNDate;
private String strFNTime;
private String strBGTime;
private String strBG;
private String strFN;
private String statu;
private String[] learingSiteArrar = {"学习", "工作", "日常", "生活", "社交", "购物"};
private int Hour;
private int Minute;
private String get_statu;
private ImageView BGTime;//开始时间
private ImageView FNTime;//结束时间
private String get_BG_Time;
private String get_FN_Time;
private AdapterView.OnItemSelectedListener onItemSelectedListener = new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int postion, long I) {
switch (adapterView.getId()) {
case R.id.sp_dropdown_2:
statu = postion + "";
break;
}
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_detail);
title = (EditText) findViewById(R.id.title_detail);
context = (EditText) findViewById(R.id.context_detail);
BG_content = (TextView) findViewById(R.id.BG_Time_content);
FN_content = (TextView) findViewById(R.id.FN_Time_content);
back = (Button) findViewById(R.id.back_detail);
save = (Button) findViewById(R.id.save_detail);
BGTime = (ImageView) findViewById(R.id.BG_Time_Right_jv);
FNTime = (ImageView) findViewById(R.id.FN_Time_Right_jv);
sp_dropdown = (Spinner) findViewById(R.id.sp_dropdown_2);
back.setOnClickListener(this);
save.setOnClickListener(this);
BGTime.setOnClickListener(this);
FNTime.setOnClickListener(this);
//接收listView中点击item传来的note_id,
Intent intent = getIntent();
note_id = intent.getIntExtra("note_id", 0);
NoteOperator noteOperator = new NoteOperator(this);
Note note = noteOperator.getNoteById(note_id);
title.setText(String.valueOf(note.title));
context.setText(String.valueOf(note.context));
BG_content.setText(String.valueOf(note.createTime));
FN_content.setText(String.valueOf(note.finishTime));
sp_dropdown.setSelection(Integer.parseInt(note.statu));//此处存疑
intiDropdownSpinner(Integer.parseInt(note.statu));
}
private void intiDropdownSpinner(int statu) {
Spinner sp_dropdown = (Spinner) findViewById(R.id.sp_dropdown_2);
ArrayAdapter<String> learningSiteAdapter = new ArrayAdapter<String>(this,
R.layout.item_select, learingSiteArrar);
sp_dropdown.setAdapter(learningSiteAdapter);
sp_dropdown.setSelection(statu);
sp_dropdown.setOnItemSelectedListener(onItemSelectedListener);
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.back_detail: {
Intent intent = new Intent(DetailActivity.this, MainActivity.class);
startActivity(intent);
finish();
}
break;
case R.id.save_detail: {
get_title = title.getText().toString().trim();
get_context = context.getText().toString().trim();
get_statu = statu;
if (TextUtils.isEmpty(get_title) || TextUtils.isEmpty(get_context)) {
Toast.makeText(this, "修改内容不能为空", Toast.LENGTH_SHORT).show();
} else {
Note note = new Note();
note.note_id = note_id;
note.title = get_title;
note.context = get_context;
note.createTime = BG_content.toString();
note.finishTime = FN_content.toString();
note.statu = statu;
NoteOperator noteOperator = new NoteOperator(DetailActivity.this);
noteOperator.update(note);
Toast.makeText(this, "修改成功", Toast.LENGTH_SHORT).show();
Intent intent = new Intent();
intent.setClass(DetailActivity.this, MainActivity.class);
startActivity(intent);
finish();
}
}
break;
case R.id.BG_Time_Right_jv: {
strBGDate = null;
strBGTime = null;
strBG = "";
Calendar cal = Calendar.getInstance();
int hourOfDay = cal.get(Calendar.HOUR_OF_DAY); //得到小时
int minute = cal.get(Calendar.MINUTE); //得到分钟
new TimePickerDialog(DetailActivity.this, new TimePickerDialog.OnTimeSetListener() {
@Override
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
Hour = hourOfDay;
Minute = minute;
strBGTime = " " + hourOfDay + ":" + minute;
if (strBGDate != null && strBGTime != null) {
strBG = strBGDate + strBGTime;
} else {
strBG = "";
}
BG_content.setText(strBG);
}
}, hourOfDay, minute, true).show();
int year = cal.get(Calendar.YEAR);
int month = cal.get(Calendar.MONTH);
int day = cal.get(Calendar.DAY_OF_MONTH);
new DatePickerDialog(DetailActivity.this, new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker datePicker, int year, int month, int day) {
strBGDate = year + "/" + (month + 1) + "/" + day + "";
}
}, year, month, day).show();
}
break;
case R.id.FN_Time_Right_jv: {
strFNDate = null;
strFNTime = null;
strFN = null;
Calendar cal = Calendar.getInstance();
int hourOfDay = cal.get(Calendar.HOUR_OF_DAY); //得到小时
int minute = cal.get(Calendar.MINUTE); //得到分钟
new TimePickerDialog(DetailActivity.this, new TimePickerDialog.OnTimeSetListener() {
@Override
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
strFNTime = " " + hourOfDay + ":" + minute;
if (strFNDate != null && strFNTime != null) {
strFN = strFNDate + strFNTime;
} else {
strFN = "";
}
FN_content.setText(strFN);
}
}, hourOfDay, minute, true).show();
int year = cal.get(Calendar.YEAR);
int month = cal.get(Calendar.MONTH);
int day = cal.get(Calendar.DAY_OF_MONTH);
new DatePickerDialog(DetailActivity.this, new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker datePicker, int year, int month, int day) {
strFNDate = year + "/" + (month + 1) + "/" + day + "";
}
}, year, month, day).show();
}
break;
}
}
}

@ -0,0 +1,122 @@
package com.example.aaa;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class LoginActivity extends AppCompatActivity implements View.OnClickListener {
EditText ed_name;
EditText ed_password;
Button btn_login;
Button btn_reg;
String userName;
String IdInput;
String PhoneInput;
String Password;
RadioGroup radioGroup;
RadioButton rb_phone;
RadioButton rb_id;
SQLiteDatabase db;
DBOpenHelper helper;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
helper = new DBOpenHelper(this);
//控件获取
ed_name = findViewById(R.id.ed_Name);
ed_password = findViewById(R.id.ed_Password);
btn_login = findViewById(R.id.btn_login);
btn_reg = findViewById(R.id.btn_reg);
radioGroup = findViewById(R.id.radioGroup);
rb_phone = findViewById(R.id.rb_phone);
rb_id = findViewById(R.id.rb_id);
btn_login.setOnClickListener(this);
btn_reg.setOnClickListener(this);
}
//记住登录信息
@Override
protected void onResume() {
super.onResume();
SharedPreferences sp = getSharedPreferences("loginInfo", MODE_PRIVATE);
ed_name.setText(sp.getString("account", ""));
ed_password.setText(sp.getString("password", ""));
}
@SuppressLint("Range")
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.btn_login:
String name = ed_name.getText().toString();
String password = ed_password.getText().toString();
if (name.isEmpty()) {
Toast.makeText(LoginActivity.this, "请输入用户名", Toast.LENGTH_SHORT).show();
return;
}
if (password.isEmpty()) {
Toast.makeText(LoginActivity.this, "请输入密码", Toast.LENGTH_SHORT).show();
return;
}
//从数据库中获取信息
db = helper.getReadableDatabase();
//通过判断是学号登陆还是手机号登录来获取不同的信息比对
if (rb_phone.isChecked()) {
Cursor cursor = db.query("user", null, "phone=?", new String[]{name}, null, null, null);
if (cursor.getCount() > 0) {
cursor.moveToNext();//结果集中的指针指向下一个位置
PhoneInput = cursor.getString(cursor.getColumnIndex("phone"));
Password = cursor.getString(cursor.getColumnIndex("password"));
}
userName = PhoneInput;
}
if (rb_id.isChecked()) {
Cursor cursor = db.query("user", null, "id=?", new String[]{name}, null, null, null);
if (cursor.getCount() > 0) {
cursor.moveToNext();//结果集中的指针指向下一个位置
IdInput = cursor.getString(cursor.getColumnIndex("id"));
Password = cursor.getString(cursor.getColumnIndex("password"));
}
userName = IdInput;
}
db.close();
//如果密码和账号都正确的话可以登录,并且记住密码
if (name.equals(userName) && password.equals(Password)) {
Toast.makeText(LoginActivity.this, "登陆成功", Toast.LENGTH_SHORT).show();
Intent intent = new Intent(LoginActivity.this, MainActivity.class);
startActivity(intent);
SharedPreferences sp = getSharedPreferences("loginInfo", MODE_PRIVATE);
SharedPreferences.Editor editor = sp.edit();
editor.putString("account", name);
editor.putString("password", password);
editor.commit();
finish();
} else {
Toast.makeText(LoginActivity.this, "账号或密码错误", Toast.LENGTH_SHORT).show();
}
break;
//跳转到注册界面
case R.id.btn_reg:
Intent intent = new Intent(LoginActivity.this, RegistActivity.class);
startActivity(intent);
finish();
break;
}
}
}

@ -0,0 +1,166 @@
package com.example.aaa;
import android.app.AlarmManager;
import android.app.AlertDialog;
import android.app.PendingIntent;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.icu.util.Calendar;
import android.icu.util.TimeZone;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.Toast;
import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
ListView listView;
Button add;//添加按钮
Button btnok;//完成按钮
ArrayList<HashMap<String, String>> list;
private List<String> data;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
listView = (ListView) findViewById(R.id.listView);
add = (Button) findViewById(R.id.add);
btnok = (Button) findViewById(R.id.btnok);
add.setOnClickListener(this);
//通过list获取数据库表中的所有id和title通过ListAdapter给listView赋值
final NoteOperator noteOperator = new NoteOperator(MainActivity.this);
list = noteOperator.getNoteList();
final ListAdapter listAdapter = new SimpleAdapter(MainActivity.this, list, R.layout.item,
new String[]{"id", "title"}, new int[]{R.id.note_id, R.id.note_title});
listView.setAdapter(listAdapter);
data = new ArrayList<>();
data=noteOperator.getTitleList();
MyAdapter myAdapter=new MyAdapter(data);
listView.setAdapter(myAdapter);
//通过添加界面传来的值判断是否要刷新listView
Intent intent = getIntent();
int flag = intent.getIntExtra("Insert", 0);
if (flag == 1) {
list = noteOperator.getNoteList();
listView.setAdapter(listAdapter);
}
if (list.size() != 0) {
//点击listView的任何一项跳到详情页面
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int position, long i) {
String id = list.get(position).get("id");
Intent intent = new Intent();
intent.setClass(MainActivity.this, DetailActivity.class);
intent.putExtra("note_id", Integer.parseInt(id));
startActivity(intent);
finish();
}
});
//长按实现对列表的删除
listView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
@Override
public boolean onItemLongClick(final AdapterView<?> adapterView, View view, final int position, long l) {
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
builder.setMessage("确定删除?");
builder.setTitle("提示");
//添加AlterDialog.Builder对象的setPositiveButton()方法
builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int which) {
String id = list.get(position).get("id");
noteOperator.delete(Integer.parseInt(id));
list.remove(position);
//listAdapter.notify();
listView.setAdapter(listAdapter);
Toast.makeText(MainActivity.this, "已删除待办", Toast.LENGTH_SHORT).show();
}
});
//添加AlterDialog.Builder对象的setNegativeButton()方法
builder.setNegativeButton("取消", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
}
});
builder.create().show();
return true;
}
});
}
}
@RequiresApi(api = Build.VERSION_CODES.O)
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.add: {
//添加待办按钮事件,跳转到添加页面
Intent intent = new Intent();
intent.setClass(MainActivity.this, AddActivity.class);
startActivity(intent);
finish();
break;
}
}
}
//
public void refresh() {
//通过list获取数据库表中的所有id和title通过ListAdapter给listView赋值
final NoteOperator noteOperator = new NoteOperator(MainActivity.this);
list = noteOperator.getNoteList();
final ListAdapter listAdapter = new SimpleAdapter(MainActivity.this, list, R.layout.item,
new String[]{"id", "title"}, new int[]{R.id.note_id, R.id.note_title});
listView.setAdapter(listAdapter);
}
}

@ -0,0 +1,110 @@
package com.example.aaa;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.sqlite.SQLiteDatabase;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import java.util.List;
public class MyAdapter extends BaseAdapter implements View.OnClickListener {
private Context context;
private List<String> data;
private int position;
final NoteOperator noteOperator = new NoteOperator(context);
private DBOpenHelper DBOpenHelper=new DBOpenHelper(context);
public void NoteOperator(Context context) {
DBOpenHelper = new DBOpenHelper(context);
}
public MyAdapter(List<String> data){
this.data = data;
}
@Override
public int getCount() {
return data == null ? 0 : data.size();
}
@Override
public Object getItem(int i) {
return data.get(i);
}
@Override
public long getItemId(int i) {
return i;
}
@Override
public View getView(int i, View view, ViewGroup viewGroup) {
ViewHolder viewHolder = null;
if(context == null)
context = viewGroup.getContext();
if(view == null){
view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item,null);
viewHolder = new ViewHolder();
viewHolder.mTv = (TextView)view.findViewById(R.id.note_title);
viewHolder.mBtn = (Button)view.findViewById(R.id.btnok);
view.setTag(viewHolder);
}
viewHolder = (ViewHolder)view.getTag();
//设置tag标记
viewHolder.mBtn.setTag(R.id.btnok,i);//添加此代码
// viewHolder.mBtn.setText("点我点我"+ i);
viewHolder.mBtn.setOnClickListener(this);
viewHolder.mTv.setText(data.get(i));
//设置tag标记
viewHolder.mTv.setTag(R.id.note_title,i);//添加此代码
return view;
}
@Override
public void onClick(View view) {
switch (view.getId()){
case R.id.btnok:
ViewHolder viewHolder = null;
int b = (int) view.getTag(R.id.btnok);
// Toast.makeText(context,"我是按钮 " + b,Toast.LENGTH_SHORT).show();
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setMessage("确定完成并删除该待办吗?");
builder.setTitle("提示");
//添加AlterDialog.Builder对象的setPositiveButton()方法
builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int which) {
NoteOperator noteOperator = new NoteOperator(context);
noteOperator.btn_delete(data.get(b));
Intent intent = new Intent(context, MainActivity.class);
context.startActivity(intent);
}
});
//添加AlterDialog.Builder对象的setNegativeButton()方法
builder.setNegativeButton("取消", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
}
});
builder.create().show();
break;
}
}
static class ViewHolder{
TextView mTv;
Button mBtn;
}
}

@ -0,0 +1,22 @@
package com.example.aaa;
public class Note {
//表名
public static final String TABLE = "todo";
//列名
public static final String KEY_id = "id";
public static final String KEY_title = "title";
public static final String KEY_context = "context";
public static final String KEY_createTime = "createTime";
public static final String KEY_finishTime = "finishTime";
public static final String KEY_statu = "statu";
public int note_id;
public String title;
public String context;
public String createTime;
public String finishTime;
public String statu;
}

@ -0,0 +1,143 @@
package com.example.aaa;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import java.util.ArrayList;
import java.util.HashMap;
public class NoteOperator {
private DBOpenHelper DBOpenHelper;
public NoteOperator(Context context) {
DBOpenHelper = new DBOpenHelper(context);
}
public boolean insert(Note note) {
//与数据库建立连接
SQLiteDatabase db = DBOpenHelper.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put(Note.KEY_title, note.title);
contentValues.put(Note.KEY_context, note.context);
contentValues.put(Note.KEY_createTime, note.createTime);
contentValues.put(Note.KEY_finishTime, note.finishTime);
contentValues.put(Note.KEY_statu, note.statu);
//插入每一行数据
long note_id = db.insert(Note.TABLE, null, contentValues);
db.close();
if (note_id != -1)
return true;
else
return false;
}
/**
*
*
* @param note_id
*/
public void delete(int note_id) {
//与数据库建立连接
SQLiteDatabase db = DBOpenHelper.getWritableDatabase();
db.delete(Note.TABLE, Note.KEY_id + "=?", new String[]{String.valueOf(note_id)});
db.close();
}
public void btn_delete(String title) {
//与数据库建立连接
SQLiteDatabase db = DBOpenHelper.getWritableDatabase();
db.delete(Note.TABLE, Note.KEY_title + "=?", new String[]{String.valueOf(title)});
db.close();
}
/**
* idtitlecontext,createTime,finishTimestatus
*
* @return ArrayList
*/
public ArrayList<HashMap<String, String>> getNoteList() {
//与数据库建立连接
SQLiteDatabase db = DBOpenHelper.getReadableDatabase();
String sql = "select " + Note.KEY_id + "," + Note.KEY_title + "," + Note.KEY_context + ","
+ Note.KEY_createTime + "," + Note.KEY_finishTime + "," + Note.KEY_statu + " from " + Note.TABLE;
//通过游标将每一条数据放进ArrayList中
ArrayList<HashMap<String, String>> noteList = new ArrayList<HashMap<String, String>>();
Cursor cursor = db.rawQuery(sql, null);
while (cursor.moveToNext()) {
HashMap<String, String> note = new HashMap<String, String>();
note.put("id", cursor.getString(cursor.getColumnIndex(Note.KEY_id)));
note.put("title", cursor.getString(cursor.getColumnIndex(Note.KEY_title)));
noteList.add(note);
}
cursor.close();
db.close();
return noteList;
}
/**
* idtitlecontext,createTime,finishTimestatus
*
* @return ArrayList
*/
public ArrayList<String> getTitleList() {
//与数据库建立连接
SQLiteDatabase db = DBOpenHelper.getReadableDatabase();
String sql = "select " + Note.KEY_id + "," + Note.KEY_title + "," + Note.KEY_context + ","
+ Note.KEY_createTime + "," + Note.KEY_finishTime + "," + Note.KEY_statu + " from " + Note.TABLE;
//通过游标将每一条数据放进ArrayList中
ArrayList<String> noteList = new ArrayList<String>();
Cursor cursor = db.rawQuery(sql, null);
while (cursor.moveToNext()) {
noteList.add(cursor.getString(cursor.getColumnIndex(Note.KEY_title)));
}
cursor.close();
db.close();
return noteList;
}
/**
* idNote
*
* @param id
* @return note
*/
public Note getNoteById(int id) {
//与数据库建立连接
SQLiteDatabase db = DBOpenHelper.getReadableDatabase();
String sql = "select " + Note.KEY_title + "," + Note.KEY_context +
"," + Note.KEY_createTime + "," + Note.KEY_finishTime + "," + Note.KEY_statu + " from " + Note.TABLE + " where " + Note.KEY_id + "=?";
Note note = new Note();
Cursor cursor = db.rawQuery(sql, new String[]{String.valueOf(id)});
while (cursor.moveToNext()) {
note.title = cursor.getString(cursor.getColumnIndex(Note.KEY_title));
note.context = cursor.getString(cursor.getColumnIndex(Note.KEY_context));
note.createTime = cursor.getString(cursor.getColumnIndex(Note.KEY_createTime));
note.finishTime = cursor.getString(cursor.getColumnIndex(Note.KEY_finishTime));
note.statu = cursor.getString(cursor.getColumnIndex(Note.KEY_statu));
}
cursor.close();
db.close();
return note;
}
/**
*
*
* @param note
*/
public void update(Note note) {
SQLiteDatabase db = DBOpenHelper.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put(Note.KEY_title, note.title);
contentValues.put(Note.KEY_context, note.context);
db.update(Note.TABLE, contentValues, Note.KEY_id + "=?", new String[]{String.valueOf(note.note_id)});
db.close();
}
}

@ -0,0 +1,113 @@
package com.example.aaa;
import android.content.ContentValues;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class RegistActivity extends AppCompatActivity implements View.OnClickListener {
EditText ed_username, ed_userpwd, ed_userpwdr, ed_id, ed_phone;
Button btn_submit, btn_back;
SQLiteDatabase db;
DBOpenHelper helper;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_regist);
initView();
helper = new DBOpenHelper(this);
}
private void initView() {
ed_username = findViewById(R.id.UserNameEdit);
ed_userpwd = findViewById(R.id.PassWordEdit);
ed_userpwdr = findViewById(R.id.PassWordAgainEdit);
ed_id = findViewById(R.id.IdEdit);
ed_phone = findViewById(R.id.PhoneEdit);
btn_submit = findViewById(R.id.SignUpButton);
btn_back = findViewById(R.id.BackLoginButton);
btn_back.setOnClickListener(this);
btn_submit.setOnClickListener(this);
}
@Override
public void onClick(View view) {
String userName = ed_username.getText().toString();
String userPsd = ed_userpwd.getText().toString();
String confirPsd = ed_userpwdr.getText().toString();
String userId = ed_id.getText().toString();
String userPhone = ed_phone.getText().toString();
switch (view.getId()) {
//通过判断哪一项为空来提示输入
case R.id.SignUpButton:
String name = ed_username.getText().toString();
String pwd = ed_userpwd.getText().toString();
String id = ed_id.getText().toString();
String phone = ed_phone.getText().toString();
if (name.isEmpty()) {
Toast.makeText(RegistActivity.this, "请输入用户名", Toast.LENGTH_SHORT).show();
return;
}
if (pwd.isEmpty()) {
Toast.makeText(RegistActivity.this, "请输入密码", Toast.LENGTH_SHORT).show();
return;
}
if (id.isEmpty()) {
Toast.makeText(RegistActivity.this, "请输入学号", Toast.LENGTH_SHORT).show();
return;
}
if (phone.isEmpty()) {
Toast.makeText(RegistActivity.this, "请输入手机号", Toast.LENGTH_SHORT).show();
return;
}
//判断两次密码是否一致
if (!userPsd.equals(confirPsd)) {
Toast.makeText(RegistActivity.this, "两次输入的密码不一致,注册失败", Toast.LENGTH_SHORT).show();
} else {
//密码一致注册成功并且存入数据库
SharedPreferences sp = getSharedPreferences("regInfo", MODE_PRIVATE);
SharedPreferences.Editor editor = sp.edit();
editor.putString("account", userName);
editor.putString("password", userPsd);
editor.putString("id", userId);
editor.putString("phone", userPhone);
editor.commit();
//获取创建的数据库对象
db = helper.getWritableDatabase();
ContentValues values = new ContentValues();
values.put("account", userName);
values.put("password", userPsd);
values.put("id", userId);
values.put("phone", userPhone);
db.insert("user", null, values);
db.close();
//获取创建的数据库对象
Toast.makeText(RegistActivity.this, "注册成功", Toast.LENGTH_SHORT).show();
//注册成功后跳转到登陆界面
Intent intent = new Intent(RegistActivity.this, LoginActivity.class);
startActivity(intent);
finish();
}
break;
case R.id.BackLoginButton:
//返回到登陆界面
Intent intent = new Intent(RegistActivity.this, LoginActivity.class);
startActivity(intent);
finish();
break;
}
}
}

@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<!-- 填充颜色 -->
<solid android:color="#30CCF3" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="360dip" />
<!-- padding: Button 里面的文字与Button边界的间隔 -->
</shape>

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape
android:shape="rectangle">
<solid android:color="#efefef"/>
<corners android:radius="5dp"/>
<stroke
android:width="1dp"
android:color="#505050"/>
</shape>
</item>
</layer-list>

@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

@ -0,0 +1,175 @@
<?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"
android:background="@color/blue"
android:layout_marginBottom="40dp">
<Button
android:id="@+id/back_add"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/back"
android:textSize="20dp"
android:background="@null"
android:layout_weight="1"
android:textColor="@color/white">
</Button>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/add_title"
android:textSize="20dp"
android:gravity="center"
android:layout_weight="1"
android:textColor="@color/white">
</TextView>
<Button
android:id="@+id/finish"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/finish"
android:textSize="20dp"
android:background="@null"
android:layout_weight="1"
android:textColor="@color/white">
</Button>
</LinearLayout>
<EditText
android:id="@+id/title_add"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="10dp"
android:background="@drawable/edit_background"
android:gravity="top|left"
android:paddingLeft="10dp"
android:hint="@string/title_input" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textSize="15dp"
android:gravity="center"
android:text="@string/add_choice"/>
<Spinner
android:id="@+id/sp_dropdown"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:spinnerMode="dropdown" />
<EditText
android:id="@+id/context_add"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginTop="30dp"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:paddingLeft="10dp"
android:hint="@string/content_input"
android:background="@drawable/edit_background"
android:gravity="top|left">
</EditText>
<LinearLayout
android:id="@+id/BeginTime"
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center_vertical"
android:layout_marginTop="30dp"
android:orientation="horizontal">
<TextView
android:id="@+id/BG_Time_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:textColor="@color/black"
android:textSize="20dp"
android:text="@string/start_time" />
<TextView
android:id="@+id/BG_Time_content"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@null"
android:gravity="center_vertical|end"
android:text="@string/select"
android:singleLine="true"
android:paddingStart="10dp"
android:textColor="@color/black"
android:textSize="20dp" />
<!--点击跳转或者弹出选择框-->
<ImageView
android:id="@+id/BG_Time_Right_jv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="7dp"
android:padding="8dp"
android:scaleType="centerCrop"
android:src="@drawable/rightiv" />
</LinearLayout>
<LinearLayout
android:id="@+id/FinishTime"
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/FN_Time_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:textColor="@color/black"
android:textSize="20dp"
android:text="@string/end_time" />
<TextView
android:id="@+id/FN_Time_content"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@null"
android:gravity="center_vertical|end"
android:text="@string/select"
android:singleLine="true"
android:paddingStart="10dp"
android:textColor="@color/black"
android:textSize="20dp" />
<!--点击跳转或者弹出选择框-->
<ImageView
android:id="@+id/FN_Time_Right_jv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="7dp"
android:padding="8dp"
android:scaleType="centerCrop"
android:src="@drawable/rightiv" />
</LinearLayout>
<CheckBox
android:id="@+id/notif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:checked="true"
android:text="@string/notif" />
</LinearLayout>

@ -0,0 +1,165 @@
<?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"
android:background="@color/blue"
android:layout_marginBottom="40dp">
<Button
android:id="@+id/back_detail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/back"
android:textSize="20dp"
android:background="@null"
android:layout_weight="1"
android:textColor="@color/white">
</Button>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/detail"
android:textSize="20dp"
android:gravity="center"
android:layout_weight="1"
android:textColor="@color/white">
</TextView>
<Button
android:id="@+id/save_detail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/save"
android:textSize="20dp"
android:background="@null"
android:layout_weight="1"
android:textColor="@color/white">
</Button>
</LinearLayout>
<EditText
android:id="@+id/title_detail"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="10dp"
android:paddingLeft="10dp"
android:background="@drawable/edit_background"
android:gravity="start"></EditText>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textSize="15dp"
android:gravity="center"
android:text="@string/add_choice"/>
<Spinner
android:id="@+id/sp_dropdown_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:spinnerMode="dropdown" />
<EditText
android:id="@+id/context_detail"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginTop="30dp"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:paddingLeft="10dp"
android:background="@drawable/edit_background"
android:gravity="start">
</EditText>
<LinearLayout
android:id="@+id/BeginTime"
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center_vertical"
android:layout_marginTop="30dp"
android:orientation="horizontal">
<TextView
android:id="@+id/BG_Time_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:textColor="@color/black"
android:textSize="20dp"
android:text="@string/start_time" />
<TextView
android:id="@+id/BG_Time_content"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@null"
android:gravity="center_vertical|end"
android:text=""
android:singleLine="true"
android:paddingStart="10dp"
android:textColor="@color/black"
android:textSize="20dp" />
<!--点击跳转或者弹出选择框-->
<ImageView
android:id="@+id/BG_Time_Right_jv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="7dp"
android:padding="8dp"
android:scaleType="centerCrop"
android:src="@drawable/rightiv" />
</LinearLayout>
<LinearLayout
android:id="@+id/FinishTime"
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/FN_Time_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:textColor="@color/black"
android:textSize="20dp"
android:text="@string/end_time" />
<TextView
android:id="@+id/FN_Time_content"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@null"
android:gravity="center_vertical|end"
android:text=""
android:singleLine="true"
android:paddingStart="10dp"
android:textColor="@color/black"
android:textSize="20dp" />
<!--点击跳转或者弹出选择框-->
<ImageView
android:id="@+id/FN_Time_Right_jv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="7dp"
android:padding="8dp"
android:scaleType="centerCrop"
android:src="@drawable/rightiv" />
</LinearLayout>
</LinearLayout>

@ -0,0 +1,169 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".LoginActivity">
<!--使用线性布局-->
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<!--Logo-->
<ImageView
android:id="@+id/LogoImage"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_marginTop="10dp"
android:src="@drawable/logo" />
<!--标题-->
<TextView
android:id="@+id/TitleText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="25dp"
android:gravity="center"
android:text="@string/login"
android:textColor="@color/gray"
android:textSize="30dp"
android:textStyle="italic" />
<!--嵌套线性布局-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!--嵌套线性布局-->
<LinearLayout
android:id="@+id/UserNameLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--用户名输入-->
<EditText
android:id="@+id/ed_Name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="15dp"
android:background="@drawable/edit_background"
android:hint="@string/login_input"
android:padding="15dp"
android:singleLine="true"
android:textSize="24dp" />
</LinearLayout>
<!--嵌套线性布局-->
<LinearLayout
android:id="@+id/PassWordLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!--密码输入-->
<EditText
android:id="@+id/ed_Password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="15dp"
android:background="@drawable/edit_background"
android:hint="@string/login_pwd"
android:inputType="textPassword"
android:maxLength="16"
android:padding="15dp"
android:singleLine="true"
android:textSize="24dp" />
</LinearLayout>
<CheckBox
android:id="@+id/checkBox2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:checked="true"
android:text="@string/login_rember" />
<RadioGroup
android:id="@+id/radioGroup"
android:layout_width="match_parent"
android:layout_height="44dp"
android:orientation="horizontal"
android:paddingLeft="20dp">
<RadioButton
android:id="@+id/rb_phone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:checked="true"
android:text="@string/login_phone" />
<RadioButton
android:id="@+id/rb_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/login_id" />
</RadioGroup>
<!--嵌套线性布局-->
<LinearLayout
android:id="@+id/LayoutButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!--登录按钮-->
<Button
android:id="@+id/btn_login"
android:layout_width="90dp"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="15dp"
android:layout_weight="1"
android:background="@color/blue"
android:padding="15dp"
android:text="登 录"
android:textColor="@color/white"
android:textSize="24dp" />
<!--注册按钮-->
<Button
android:id="@+id/btn_reg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="15dp"
android:layout_marginRight="30dp"
android:layout_weight="1"
android:background="@color/blue"
android:padding="15dp"
android:text="注 册"
android:textColor="@color/white"
android:textSize="24dp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -0,0 +1,43 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/main_title"
android:textSize="20dp"
android:layout_gravity="center"
android:background="@color/blue"
android:textColor="@color/white"
android:paddingTop="10dp"
android:paddingBottom="10dp"/>
<ListView
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
</ListView>
<Button
android:id="@+id/add"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:text="+"
android:gravity="center"
android:textSize="30dp"
android:textColor="@color/white"
android:layout_marginBottom="30dp"
android:background="@drawable/btn_circle">
</Button>
</LinearLayout>

@ -0,0 +1,210 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".RegistActivity">
<!--使用线性布局-->
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/LogoImage"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginTop="10dp"
android:src="@drawable/logo" />
<!--标题-->
<TextView
android:id="@+id/TitleText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:gravity="center"
android:text="@string/regist_title"
android:textColor="@color/gray2"
android:textSize="30dp"
android:textStyle="italic" />
<!--嵌套线性布局-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!--嵌套线性布局-->
<LinearLayout
android:id="@+id/UserNameLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<!--用户名输入-->
<EditText
android:id="@+id/UserNameEdit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="10dp"
android:background="@drawable/edit_background"
android:hint="输入用户名"
android:padding="15dp"
android:singleLine="true"
android:textSize="24dp" />
</LinearLayout>
<!--嵌套线性布局-->
<LinearLayout
android:id="@+id/PassWordLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!--密码输入-->
<EditText
android:id="@+id/PassWordEdit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="10dp"
android:background="@drawable/edit_background"
android:hint="输入密码"
android:inputType="textPassword"
android:maxLength="16"
android:padding="15dp"
android:singleLine="true"
android:textSize="24dp" />
</LinearLayout>
<!--嵌套线性布局-->
<LinearLayout
android:id="@+id/PasswordAgainLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!--二次密码输入-->
<EditText
android:id="@+id/PassWordAgainEdit"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="10dp"
android:background="@drawable/edit_background"
android:hint="再次输入密码"
android:inputType="textPassword"
android:maxLength="16"
android:padding="15dp"
android:singleLine="true"
android:textSize="24dp" />
</LinearLayout>
<!--嵌套线性布局-->
<LinearLayout
android:id="@+id/IdLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!--邮箱输入-->
<EditText
android:id="@+id/IdEdit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="10dp"
android:background="@drawable/edit_background"
android:hint="输入学号"
android:maxLength="16"
android:padding="15dp"
android:singleLine="true"
android:textSize="24dp" />
</LinearLayout>
<!--嵌套线性布局-->
<LinearLayout
android:id="@+id/PhoneLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!--邮箱输入-->
<EditText
android:id="@+id/PhoneEdit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="10dp"
android:background="@drawable/edit_background"
android:hint="输入电话号码"
android:maxLength="16"
android:padding="15dp"
android:singleLine="true"
android:textSize="24dp" />
</LinearLayout>
<!--嵌套线性布局-->
<LinearLayout
android:id="@+id/ButtonLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!--立即注册按钮-->
<Button
android:id="@+id/SignUpButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:layout_weight="1"
android:background="@color/blue"
android:padding="15dp"
android:text="@string/regist"
android:textColor="@color/white"
android:textSize="24dp" />
<!--返回登录按钮-->
<Button
android:id="@+id/BackLoginButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:layout_weight="1"
android:background="@color/blue"
android:padding="15dp"
android:text="@string/regist_back_login"
android:textColor="@color/white"
android:textSize="24dp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -0,0 +1,15 @@
<?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="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical">
<DatePicker
android:id="@+id/datePicker"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:calendarViewShown="false"
android:endYear="2099"
android:startYear="2020" />
</LinearLayout>

@ -0,0 +1,43 @@
<?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:id="@+id/BeginTime"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginLeft="30dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/note_id"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:textSize="15dp"
android:layout_marginRight="30dp"
android:visibility="gone"/>
<TextView
android:id="@+id/note_title"
android:layout_width="match_parent"
android:layout_weight="3"
android:textSize="20dp"
android:textColor="@color/black"
android:layout_height="wrap_content"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btnok"
android:layout_weight="2"
android:layout_gravity="center"
android:backgroundTint="@color/blue"
android:text="√"
android:focusable="false"
android:textSize="25sp"
android:textColor="@color/white" />
</LinearLayout>
</LinearLayout>

@ -0,0 +1,8 @@
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tv_name"
android:layout_width="match_parent"
android:layout_height="30dp"
android:singleLine="true"
android:textSize="17sp"
android:gravity="center"
android:textColor="@color/black" />

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

@ -0,0 +1,16 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.AAA" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/black</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_200</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="gray">#DDDDDD</color>
<color name="gray2">#808080</color>
<color name="blue">#30CCF3</color>
<color name="green">#72F877</color>
</resources>

@ -0,0 +1,33 @@
<resources>
<string name="app_name">ToDo</string>
<string name="back">返回</string>
<string name="add_title">添加事项</string>
<string name="finish">完成</string>
<string name="title_input">请输入标题</string>
<string name="content_input">请输入详细内容</string>
<string name="start_time">开始时间:</string>
<string name="end_time">结束时间:</string>
<string name="select">请选择</string>
<string name="detail">详细内容</string>
<string name="save">保存</string>
<string name="login">ToDO·登录</string>
<string name="login_input">请输入手机号或学号</string>
<string name="login_pwd">输入用户密码</string>
<string name="login_rember">记住登录信息</string>
<string name="login_phone">手机号登录</string>
<string name="login_id">学号登录</string>
<string name="login_btn">登 录</string>
<string name="login_creat_btn">注 册</string>
<string name="main_title">代办清单</string>
<string name="regist_title">ToDo·注册</string>
<string name="regist_username">输入用户名</string>
<string name="regist_pwd">输入密码</string>
<string name="regist_pwd2">再次输入密码</string>
<string name="regist_id">输入学号</string>
<string name="regist_phone">输入电话号码</string>
<string name="regist_back_login">返回登录</string>
<string name="regist">立即注册</string>
<string name="add_choice">请选择待办类型</string>
<string name="notif">是否启用定时通知</string>
</resources>

@ -0,0 +1,17 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.AAA" parent="Theme.MaterialComponents.DayNight.NoActionBar.Bridge">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>

@ -0,0 +1,17 @@
package com.example.aaa;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}

@ -0,0 +1,9 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.1.2' apply false
id 'com.android.library' version '7.1.2' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}

@ -0,0 +1,21 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true

Binary file not shown.

@ -0,0 +1,6 @@
#Wed Jun 08 16:37:53 CST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-7.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

185
gradlew vendored

@ -0,0 +1,185 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"

89
gradlew.bat vendored

@ -0,0 +1,89 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

@ -0,0 +1,16 @@
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "AAA"
include ':app'
Loading…
Cancel
Save