@ -0,0 +1,14 @@
|
||||
*.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
|
@ -0,0 +1,8 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
@ -0,0 +1 @@
|
||||
Snack App
|
@ -0,0 +1,116 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<codeStyleSettings language="XML">
|
||||
<indentOptions>
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
||||
</indentOptions>
|
||||
<arrangement>
|
||||
<rules>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>xmlns:android</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>xmlns:.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*:id</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*:name</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>name</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>style</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>ANDROID_ATTRIBUTE_ORDER</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>.*</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
</rules>
|
||||
</arrangement>
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
||||
</component>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="13" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="OrderStore" uuid="f0146414-aa44-4dc9-8efb-984990e1cf79">
|
||||
<driver-ref>sqlite.xerial</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
|
||||
<jdbc-url>jdbc:sqlite:C:\Users\HP\AppData\Local\JetBrains\IntelliJIdea2021.3\device-explorer\Pixel_5_API_30 [emulator-5554]\data\data\com.shuyue.snack\databases\OrderStore.db</jdbc-url>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
<libraries>
|
||||
<library>
|
||||
<url>file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.36.0.3/sqlite-jdbc-3.36.0.3.jar</url>
|
||||
</library>
|
||||
</libraries>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,465 @@
|
||||
<?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="true" />
|
||||
<loaded-nodes />
|
||||
</component>
|
||||
<component name="DBNavigator.Project.DatabaseEditorStateManager">
|
||||
<last-used-providers />
|
||||
</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" />
|
||||
<object-type name="TYPE ATTRIBUTE" 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>
|
||||
<audit-columns>
|
||||
<column-names value="" />
|
||||
<visible value="true" />
|
||||
<editable value="false" />
|
||||
</audit-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,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<targetSelectedWithDropDown>
|
||||
<Target>
|
||||
<type value="QUICK_BOOT_TARGET" />
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="VIRTUAL_DEVICE_PATH" />
|
||||
<value value="D:\IntelliJ IDEA\.android\avd\Pixel_5_API_30.avd" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</targetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2022-05-11T06:10:28.721356400Z" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,10 @@
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="snow">
|
||||
<words>
|
||||
<w>fujian</w>
|
||||
<w>gson</w>
|
||||
<w>guangxi</w>
|
||||
<w>shuyue</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
@ -0,0 +1,20 @@
|
||||
<?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="GRADLE" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="13" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven" />
|
||||
<option name="name" value="maven" />
|
||||
<option name="url" value="https://mirrors.huaweicloud.com/repository/maven/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="BintrayJCenter" />
|
||||
<option name="name" value="BintrayJCenter" />
|
||||
<option name="url" value="https://jcenter.bintray.com/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="Google" />
|
||||
<option name="name" value="Google" />
|
||||
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven2" />
|
||||
<option name="name" value="maven2" />
|
||||
<option name="url" value="https://jitpack.io" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DesignSurface">
|
||||
<option name="filePathToZoomLevelMap">
|
||||
<map>
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/drawable/button_shape.xml" value="0.21296296296296297" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/drawable/editext_shape.xml" value="0.21296296296296297" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/activity_add_address.xml" value="0.21025641025641026" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/activity_address_set.xml" value="0.2222222222222222" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/activity_change_address.xml" value="0.2247863247863248" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/activity_delete_address.xml" value="0.136" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/activity_detail.xml" value="0.25833333333333336" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/activity_forget_password.xml" value="0.21025641025641026" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/activity_login.xml" value="0.2" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/activity_main.xml" value="0.176" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/activity_order.xml" value="0.2" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/activity_register.xml" value="0.21025641025641026" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/activity_welcome.xml" value="0.25833333333333336" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/dialog_view.xml" value="0.2222222222222222" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/empty_cart_view.xml" value="0.21196581196581196" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/empty_order_view.xml" value="0.21196581196581196" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/footer_no_item.xml" value="0.21196581196581196" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/fragment_home.xml" value="0.21196581196581196" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/fragment_my.xml" value="0.1" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/fragment_place.xml" value="0.2222222222222222" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/fragment_snack.xml" value="0.2222222222222222" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/head_home_image.xml" value="0.2" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/item_address.xml" value="0.22136752136752136" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/item_address_set.xml" value="0.22136752136752136" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/item_home_snack.xml" value="0.18704710144927536" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/item_order.xml" value="0.2222222222222222" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/item_place_order.xml" value="0.2222222222222222" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/item_snack_left.xml" value="0.2222222222222222" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/layout/item_snack_right.xml" value="0.2222222222222222" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/menu/activity_list_view.xml" value="0.2341880341880342" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/menu/bottom_nav_menu.xml" value="0.2341880341880342" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/menu/left.xml" value="0.2341880341880342" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/menu/main.xml" value="0.2341880341880342" />
|
||||
<entry key="..\:/IntelliJ IDEA/AndroidProjects/snack-app-master/app/src/main/res/menu/right.xml" value="0.2341880341880342" />
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<file type="web" url="file://$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_13" 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,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,29 @@
|
||||
@startuml
|
||||
|
||||
title __SNACK APP's Component Diagram__\n
|
||||
|
||||
component "Snack_App.app.unitTest" {
|
||||
[Snack_App.app.main]
|
||||
component "Snack_App.app.main" {
|
||||
[Snack_App.app.androidTest]
|
||||
component "Snack_App.app.androidTest" {
|
||||
[Snack_App.app]
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
right footer
|
||||
|
||||
|
||||
PlantUML diagram generated by SketchIt! (https://bitbucket.org/pmesmeur/sketch.it)
|
||||
For more information about this tool, please contact philippe.mesmeur@gmail.com
|
||||
endfooter
|
||||
|
||||
@enduml
|
@ -0,0 +1 @@
|
||||
/build
|
@ -0,0 +1,59 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion "29.0.3"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.shuyue.snack"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 29
|
||||
versionCode 2
|
||||
versionName '1.1'
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
// ButterKnife requires Java 8.
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'com.google.android.material:material:1.1.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
implementation 'androidx.navigation:navigation-fragment:2.3.0'
|
||||
implementation 'androidx.navigation:navigation-ui:2.3.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'androidx.mediarouter:mediarouter:1.1.0'
|
||||
testImplementation 'junit:junit:4.13'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
|
||||
// 引入ButterKnife依赖
|
||||
implementation 'com.jakewharton:butterknife:10.2.1'
|
||||
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'
|
||||
|
||||
// 引入BaseRecyclerViewAdapterHelper库
|
||||
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4'
|
||||
|
||||
// 引入CircleImageView照片库
|
||||
implementation 'de.hdodenhof:circleimageview:3.1.0'
|
||||
|
||||
// 引入Gson库
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
//引入地址
|
||||
implementation 'liji.library.dev:citypickerview:1.1.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.shuyue.snack;
|
||||
|
||||
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.shuyue.snack", appContext.getPackageName());
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.shuyue.snack">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<application
|
||||
android:name=".MyApplication"
|
||||
android:icon="@mipmap/momo"
|
||||
android:label="@string/app_name"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
tools:ignore="AllowBackup"
|
||||
tools:targetApi="n">
|
||||
<activity
|
||||
android:name=".activity.Register"
|
||||
android:exported="true"/>
|
||||
<activity
|
||||
android:name=".activity.Login"
|
||||
android:exported="true"/>
|
||||
<activity
|
||||
android:name=".activity.OrderActivity"
|
||||
android:parentActivityName=".MainActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".MainActivity"/>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.LoginActivity"
|
||||
android:parentActivityName=".MainActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".MainActivity"/>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.DetailActivity"
|
||||
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
|
||||
<activity
|
||||
android:name=".activity.WelcomeActivity"
|
||||
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTask"/>
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -0,0 +1,47 @@
|
||||
package com.shuyue.snack;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.navigation.NavController;
|
||||
import androidx.navigation.Navigation;
|
||||
import androidx.navigation.ui.AppBarConfiguration;
|
||||
import androidx.navigation.ui.NavigationUI;
|
||||
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||
import com.shuyue.snack.dao.UserDao;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
BottomNavigationView navView = findViewById(R.id.nav_view);
|
||||
|
||||
AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(
|
||||
R.id.navigation_home, R.id.navigation_snack, R.id.navigation_place, R.id.navigation_my)
|
||||
.build();
|
||||
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
|
||||
NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration);
|
||||
NavigationUI.setupWithNavController(navView, navController);
|
||||
|
||||
// 检查登录状态
|
||||
checkLogin();
|
||||
}
|
||||
/**
|
||||
* 检查是否有登录信息
|
||||
*/
|
||||
private void checkLogin() {
|
||||
// 检查持久化的数据
|
||||
if (UserDao.isLogin()) {
|
||||
// 已登录
|
||||
MyApplication.isLogin(true);
|
||||
MyApplication.setUser(UserDao.getUser());
|
||||
} else {
|
||||
// 未登录
|
||||
MyApplication.isLogin(false);
|
||||
MyApplication.setUser(null);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
package com.shuyue.snack;
|
||||
|
||||
import android.app.Application;
|
||||
|
||||
import com.shuyue.snack.model.Snack;
|
||||
import com.shuyue.snack.model.User;
|
||||
import com.shuyue.snack.utils.Utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MyApplication extends Application {
|
||||
|
||||
/**
|
||||
* Application类上下文
|
||||
*/
|
||||
private static MyApplication appContext;
|
||||
|
||||
/**
|
||||
* 购物车的小吃
|
||||
*/
|
||||
private static List<Snack> cartSnacks;
|
||||
private static List<Snack> spsc;
|
||||
|
||||
/**
|
||||
* 登录用户
|
||||
*/
|
||||
private static User user;
|
||||
|
||||
/**
|
||||
* 登录状态
|
||||
*/
|
||||
private static boolean isLogin;
|
||||
|
||||
public static MyApplication getInstance() {
|
||||
return appContext;
|
||||
}
|
||||
|
||||
public static List<Snack> getCartSnacks() {
|
||||
return cartSnacks;
|
||||
}
|
||||
|
||||
public static List<Snack> getSC() {
|
||||
return spsc;
|
||||
}
|
||||
public static User getUser() {
|
||||
return user;
|
||||
}
|
||||
|
||||
public static void setUser(User user) {
|
||||
MyApplication.user = user;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否登录
|
||||
*
|
||||
* @return <tt>true</tt>: 已经登录, <tt>false</tt>: 未登录
|
||||
*/
|
||||
public static boolean isLogin() {
|
||||
return isLogin;
|
||||
}
|
||||
|
||||
public static void isLogin(boolean isLogin) {
|
||||
MyApplication.isLogin = isLogin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
appContext = this;
|
||||
// 初始化购物车集合
|
||||
cartSnacks = new ArrayList<>();
|
||||
|
||||
// 初始化工具类
|
||||
Utils.init(this);
|
||||
}
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
package com.shuyue.snack.activity;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.service.autofill.Dataset;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.shuyue.snack.MyApplication;
|
||||
import com.shuyue.snack.R;
|
||||
import com.shuyue.snack.adaptor.OrderAdapter;
|
||||
import com.shuyue.snack.dao.OrderDao;
|
||||
import com.shuyue.snack.data.DataServer;
|
||||
import com.shuyue.snack.model.Order;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
public class OrderActivity extends AppCompatActivity {
|
||||
|
||||
@BindView(R.id.orderRecyclerView)
|
||||
RecyclerView orderRecyclerView;
|
||||
Button check;
|
||||
EditText query;
|
||||
//
|
||||
public static void actionStart(Context context) {
|
||||
Intent intent = new Intent(context, OrderActivity.class);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_order);
|
||||
/////
|
||||
query=findViewById(R.id.query);
|
||||
String name=query.getText().toString();
|
||||
check=findViewById(R.id.check);
|
||||
setTitle("我的订单");
|
||||
|
||||
ButterKnife.bind(this);
|
||||
|
||||
orderRecyclerView.setLayoutManager(new LinearLayoutManager(OrderActivity.this));
|
||||
|
||||
initAdapter();
|
||||
}
|
||||
////////////
|
||||
|
||||
//////////////
|
||||
|
||||
/**
|
||||
* 初始化订单页面
|
||||
*/
|
||||
private void initAdapter() {
|
||||
// 获取数据库数据
|
||||
List<Order> orders = OrderDao.findAllByUsername(MyApplication.getUser().getUsername());
|
||||
|
||||
OrderAdapter adapter = new OrderAdapter(orders);
|
||||
|
||||
// 设置空布局
|
||||
adapter.setEmptyView(getEmptyView());
|
||||
|
||||
orderRecyclerView.setAdapter(adapter);
|
||||
}
|
||||
|
||||
|
||||
public View getEmptyView() {
|
||||
return getLayoutInflater().inflate(R.layout.empty_order_view, orderRecyclerView, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取查询结果
|
||||
*/
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.shuyue.snack.activity;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.shuyue.snack.MainActivity;
|
||||
import com.shuyue.snack.R;
|
||||
|
||||
public class WelcomeActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_welcome);
|
||||
|
||||
View decorView = getWindow().getDecorView();
|
||||
// Hide the status bar.
|
||||
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
|
||||
decorView.setSystemUiVisibility(uiOptions);
|
||||
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Intent intent = new Intent(WelcomeActivity.this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
|
||||
finish();
|
||||
}
|
||||
}, 800);
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.shuyue.snack.adaptor;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
|
||||
import com.shuyue.snack.R;
|
||||
import com.shuyue.snack.model.Snack;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class HomeAdapter extends BaseQuickAdapter<Snack, BaseViewHolder> {
|
||||
|
||||
public HomeAdapter(List<Snack> snacks) {
|
||||
super(R.layout.item_home_snack, snacks);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(@NotNull BaseViewHolder baseViewHolder, Snack snack) {
|
||||
baseViewHolder.setImageResource(R.id.homeSnackImage, snack.getImage());
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.shuyue.snack.adaptor;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
|
||||
import com.shuyue.snack.R;
|
||||
import com.shuyue.snack.model.Order;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
public class OrderAdapter extends BaseQuickAdapter<Order, BaseViewHolder> {
|
||||
|
||||
public OrderAdapter(List<Order> orders) {
|
||||
|
||||
super(R.layout.item_order, orders);
|
||||
|
||||
/////
|
||||
|
||||
/////
|
||||
}
|
||||
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
@Override
|
||||
protected void convert(@NotNull BaseViewHolder baseViewHolder, Order order) {
|
||||
baseViewHolder.setText(R.id.orderName, order.getName());
|
||||
baseViewHolder.setImageResource(R.id.orderImage, order.getImage());
|
||||
baseViewHolder.setText(R.id.orderTime, "下单时间: " + order.getTime());
|
||||
baseViewHolder.setText(R.id.orderMoney, "总付款: ¥" + order.getMoney());
|
||||
baseViewHolder.setText(R.id.button,"删除订单");
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.shuyue.snack.adaptor;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
|
||||
import com.shuyue.snack.R;
|
||||
import com.shuyue.snack.model.Snack;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 下单页面购物车列表适配器
|
||||
*/
|
||||
public class PlaceOrderAdapter extends BaseQuickAdapter<Snack, BaseViewHolder> {
|
||||
|
||||
public PlaceOrderAdapter(List<Snack> snacks) {
|
||||
super(R.layout.item_place_order, snacks);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(@NotNull BaseViewHolder baseViewHolder, Snack snack) {
|
||||
baseViewHolder.setImageResource(R.id.placeOrderImage, snack.getImage())
|
||||
.setText(R.id.placeOrderName, snack.getName())
|
||||
.setText(R.id.placeOrderPrice, "¥" + snack.getPrice())
|
||||
.setText(R.id.orderCountBtn, String.valueOf(snack.getCount()));
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.shuyue.snack.adaptor;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
|
||||
import com.shuyue.snack.R;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SnackLeftAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
|
||||
|
||||
public SnackLeftAdapter(List<String> types) {
|
||||
super(R.layout.item_snack_left, types);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置item数据
|
||||
*/
|
||||
@Override
|
||||
protected void convert(@NotNull BaseViewHolder baseViewHolder, String s) {
|
||||
// 第一个item默认选中状态
|
||||
if (baseViewHolder.getLayoutPosition() == 0) {
|
||||
baseViewHolder.setBackgroundResource(R.id.snackLeftType, R.color.colorBgWhite);
|
||||
}
|
||||
baseViewHolder.setText(R.id.snackLeftType, s);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.shuyue.snack.adaptor;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
|
||||
import com.shuyue.snack.R;
|
||||
import com.shuyue.snack.model.Snack;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SnackRightAdapter extends BaseQuickAdapter<Snack, BaseViewHolder> {
|
||||
|
||||
public SnackRightAdapter(List<Snack> snacks) {
|
||||
super(R.layout.item_snack_right, snacks);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(@NotNull BaseViewHolder baseViewHolder, Snack snack) {
|
||||
baseViewHolder.setImageResource(R.id.snackRightImage, snack.getImage())
|
||||
.setText(R.id.snackRightName, snack.getName())
|
||||
.setText(R.id.snackRightPrice, "¥" + snack.getPrice());
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.shuyue.snack.animator;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.view.View;
|
||||
import android.view.animation.DecelerateInterpolator;
|
||||
|
||||
import com.chad.library.adapter.base.animation.BaseAnimation;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class MyAnimation implements BaseAnimation {
|
||||
@NotNull
|
||||
@Override
|
||||
public Animator[] animators(@NotNull View view) {
|
||||
Animator scaleY = ObjectAnimator.ofFloat(view, "scaleY", 1.3f, 1);
|
||||
Animator scaleX = ObjectAnimator.ofFloat(view, "scaleX", 1.3f, 1);
|
||||
Animator alpha = ObjectAnimator.ofFloat(view, "alpha", 0, 1f);
|
||||
|
||||
scaleY.setDuration(350);
|
||||
scaleX.setDuration(350);
|
||||
alpha.setDuration(350);
|
||||
|
||||
scaleY.setInterpolator(new DecelerateInterpolator());
|
||||
scaleX.setInterpolator(new DecelerateInterpolator());
|
||||
|
||||
return new Animator[]{scaleY, scaleX, alpha};
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.shuyue.snack.animator;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.view.View;
|
||||
import android.view.animation.Interpolator;
|
||||
|
||||
import com.chad.library.adapter.base.animation.BaseAnimation;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import static java.lang.Math.PI;
|
||||
import static java.lang.Math.pow;
|
||||
import static java.lang.Math.sin;
|
||||
|
||||
public class MyAnimation2 implements BaseAnimation {
|
||||
|
||||
static class MyInterpolator2 implements Interpolator {
|
||||
@Override
|
||||
public float getInterpolation(float input) {
|
||||
float factor = 0.7f;
|
||||
return (float) (pow(2.0, -10.0 * input) * sin((input - factor / 4) * (2 * PI) / factor) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Animator[] animators(@NotNull View view) {
|
||||
Animator translationX =
|
||||
ObjectAnimator.ofFloat(view, "translationX", -view.getRootView().getWidth(), 0f);
|
||||
|
||||
translationX.setDuration(800);
|
||||
translationX.setInterpolator(new MyInterpolator2());
|
||||
|
||||
return new Animator[]{translationX};
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.shuyue.snack.animator;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.view.View;
|
||||
import android.view.animation.DecelerateInterpolator;
|
||||
|
||||
import com.chad.library.adapter.base.animation.BaseAnimation;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class MyAnimation3 implements BaseAnimation {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Animator[] animators(@NotNull View view) {
|
||||
Animator alpha = ObjectAnimator.ofFloat(view, "alpha", 0, 1f);
|
||||
alpha.setDuration(450);
|
||||
|
||||
Animator translationY =
|
||||
ObjectAnimator.ofFloat(view, "translationY", view.getRootView().getHeight(), 0f);
|
||||
translationY.setDuration(450);
|
||||
translationY.setInterpolator(new DecelerateInterpolator(1.2f));
|
||||
|
||||
return new Animator[]{alpha, translationY};
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.shuyue.snack.dao;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public class DatabaseHelper extends SQLiteOpenHelper {
|
||||
public DatabaseHelper(@Nullable Context context, int version) {
|
||||
super(context, "OrderStore.db", null, version);
|
||||
}
|
||||
@Override
|
||||
public void onCreate(SQLiteDatabase db) {
|
||||
// 创建数据库表
|
||||
// 创建orders表
|
||||
String createOrders = "create table orders (" +
|
||||
"id integer primary key autoincrement," +
|
||||
"name text," +
|
||||
"image integer," +
|
||||
"money real," +
|
||||
"time text," +
|
||||
"username text)";
|
||||
db.execSQL(createOrders);
|
||||
// 创建address表
|
||||
String createAddress = "create table address(id integer primary key autoincrement, username text, cosignee text,phone number,address text)";
|
||||
db.execSQL(createAddress);
|
||||
// 创建 user表
|
||||
String createUsers = "create table IF NOT EXISTS user(username text,password text,password2 text,phone text)";
|
||||
db.execSQL(createUsers);
|
||||
}
|
||||
@Override
|
||||
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.shuyue.snack.dao;
|
||||
import android.content.Context;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
|
||||
public class DbContect extends SQLiteOpenHelper {
|
||||
private static final int VERSION=1;
|
||||
private static final String DBNAME="OrderStore.db"; // 创建数据库名叫 Users
|
||||
private Context mContext;
|
||||
public DbContect(Context context){super(context,DBNAME,null,VERSION);
|
||||
mContext = context;
|
||||
}
|
||||
//创建数据库
|
||||
public void onCreate(SQLiteDatabase db){
|
||||
// 创建orders表
|
||||
String createOrders = "create table orders (" +
|
||||
"id integer primary key autoincrement," +
|
||||
"name text," +
|
||||
"image integer," +
|
||||
"money real," +
|
||||
"time text," +
|
||||
"username text)";
|
||||
db.execSQL(createOrders);
|
||||
// 创建address表
|
||||
String createAddress = "create table address(id integer primary key autoincrement, username text, cosignee text,phone number,address text)";
|
||||
db.execSQL(createAddress);
|
||||
// 创建 user表
|
||||
String createUsers = "create table IF NOT EXISTS user(username text,password text,password2 text,phone text)";
|
||||
db.execSQL(createUsers);
|
||||
}
|
||||
//数据库版本更新
|
||||
public void onUpgrade(SQLiteDatabase db,int oldVersion,int newVersion)
|
||||
{
|
||||
db.execSQL("drop table if exists user");
|
||||
db.execSQL("drop table if exists orders");
|
||||
db.execSQL("drop table if exists address");
|
||||
onCreate(db);
|
||||
}
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
package com.shuyue.snack.dao;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
|
||||
import com.shuyue.snack.model.Order;
|
||||
import com.shuyue.snack.utils.Utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class OrderDao {
|
||||
|
||||
private static DatabaseHelper dbHelper = new DatabaseHelper(Utils.getContext(), 1);
|
||||
|
||||
static {
|
||||
dbHelper.getWritableDatabase();
|
||||
}
|
||||
// * 保存订单数据
|
||||
public static void saveOrder(List<Order> orders) {
|
||||
SQLiteDatabase db = dbHelper.getWritableDatabase();
|
||||
for (Order order : orders) {
|
||||
ContentValues values = new ContentValues();
|
||||
values.put("name", order.getName());
|
||||
values.put("image", order.getImage());
|
||||
values.put("money", order.getMoney());
|
||||
values.put("time", order.getTime());
|
||||
values.put("username", order.getUsername());
|
||||
|
||||
db.insert("orders", null, values);
|
||||
}
|
||||
}
|
||||
// * 通过用户名查询订单数据
|
||||
public static List<Order> findAllByUsername(String username) {
|
||||
SQLiteDatabase db = dbHelper.getWritableDatabase();
|
||||
List<Order> orders = new ArrayList<>();
|
||||
// 查询指定用户名订单
|
||||
Cursor cursor = db.query("orders", null, "username=?", new String[]{username}, null, null, "time desc");
|
||||
if (cursor.moveToFirst()) {
|
||||
do {
|
||||
String name = cursor.getString(cursor.getColumnIndex("name"));
|
||||
int image = cursor.getInt(cursor.getColumnIndex("image"));
|
||||
double money = cursor.getDouble(cursor.getColumnIndex("money"));
|
||||
String time = cursor.getString(cursor.getColumnIndex("time"));
|
||||
|
||||
Order order = new Order(name, image, money, time);
|
||||
orders.add(order);
|
||||
} while (cursor.moveToNext());
|
||||
}
|
||||
cursor.close();
|
||||
return orders;
|
||||
}
|
||||
|
||||
// * 通过商品名称查询订单
|
||||
public static List<Order> findAllByName(String names) {
|
||||
SQLiteDatabase db = dbHelper.getWritableDatabase();
|
||||
List<Order> orders1 = new ArrayList<>();
|
||||
|
||||
// 查询指定用户名订单
|
||||
Cursor cursor = db.query("orders", null, "name=?", new String[]{names}, null, null, "time desc");
|
||||
if (cursor.moveToFirst()) {
|
||||
do {
|
||||
String name = cursor.getString(cursor.getColumnIndex("name"));
|
||||
int image = cursor.getInt(cursor.getColumnIndex("image"));
|
||||
double money = cursor.getDouble(cursor.getColumnIndex("money"));
|
||||
String time = cursor.getString(cursor.getColumnIndex("time"));
|
||||
|
||||
Order order = new Order(name, image, money, time);
|
||||
orders1.add(order);
|
||||
} while (cursor.moveToNext());
|
||||
}
|
||||
cursor.close();
|
||||
return orders1;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.shuyue.snack.dao;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.shuyue.snack.model.User;
|
||||
import com.shuyue.snack.utils.Utils;
|
||||
|
||||
public class UserDao {
|
||||
|
||||
// 实例化SharedPreferences对象
|
||||
private static SharedPreferences data = Utils.getContext().getSharedPreferences("data", Context.MODE_PRIVATE);
|
||||
|
||||
// Gson对象
|
||||
private static Gson gson = new Gson();
|
||||
|
||||
public static boolean isLogin() {
|
||||
return data.getBoolean("isLogin", false);
|
||||
}
|
||||
|
||||
public static void isLogin(boolean bool) {
|
||||
SharedPreferences.Editor edit = data.edit();
|
||||
edit.putBoolean("isLogin", bool);
|
||||
edit.apply();
|
||||
}
|
||||
// 获取已登录用户对象
|
||||
public static User getUser() {
|
||||
String userJson = data.getString("user", "");
|
||||
return gson.fromJson(userJson, User.class);
|
||||
}
|
||||
|
||||
public static void saveUser(User user) {
|
||||
String userJson = gson.toJson(user);
|
||||
SharedPreferences.Editor edit = data.edit();
|
||||
edit.putString("user", userJson);
|
||||
edit.apply();
|
||||
}
|
||||
//* 清除登录用户信息和登录状态
|
||||
public static void removeUserAndLoginStatus() {
|
||||
SharedPreferences.Editor edit = data.edit();
|
||||
edit.remove("user");
|
||||
edit.remove("isLogin");
|
||||
edit.apply();
|
||||
}
|
||||
|
||||
public static void removeAll() {
|
||||
SharedPreferences.Editor edit = data.edit();
|
||||
edit.clear();
|
||||
edit.apply();
|
||||
}
|
||||
// * 保存账号
|
||||
public static void saveUsername(String username) {
|
||||
SharedPreferences.Editor editor = data.edit();
|
||||
editor.putString("username", username);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
public static String getUsername() {
|
||||
return data.getString("username", "");
|
||||
}
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
package com.shuyue.snack.model;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
public class Order implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String name;
|
||||
|
||||
private int image;
|
||||
|
||||
private double money;
|
||||
|
||||
private String time;
|
||||
|
||||
private String username;
|
||||
|
||||
public Order() {
|
||||
}
|
||||
|
||||
public Order(String name, int image, double money, String time) {
|
||||
this.name = name;
|
||||
this.image = image;
|
||||
this.money = money;
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
public Order(Snack snack) {
|
||||
this.name = snack.getName();
|
||||
this.image = snack.getImage();
|
||||
// 计算金额
|
||||
BigDecimal money = BigDecimal.valueOf(snack.getPrice()).multiply(BigDecimal.valueOf(snack.getCount()));
|
||||
this.money = money.doubleValue();
|
||||
// 订单产生时间(格式化)
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
|
||||
this.time = simpleDateFormat.format(new Date());
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setImage(int image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public double getMoney() {
|
||||
return money;
|
||||
}
|
||||
|
||||
public void setMoney(double money) {
|
||||
this.money = money;
|
||||
}
|
||||
|
||||
public String getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(String time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Order{" +
|
||||
"name='" + name + '\'' +
|
||||
", image='" + image + '\'' +
|
||||
", money=" + money +
|
||||
", time=" + time +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
package com.shuyue.snack.model;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
public class Snack implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
private String name;
|
||||
|
||||
private double price;
|
||||
|
||||
|
||||
private int image;
|
||||
|
||||
|
||||
private String detail;
|
||||
|
||||
|
||||
private int count;
|
||||
|
||||
public Snack() {
|
||||
}
|
||||
|
||||
public Snack(String name, double price, int image, String detail) {
|
||||
this.name = name;
|
||||
this.price = price;
|
||||
this.image = image;
|
||||
this.detail = detail;
|
||||
this.count = 1;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public double getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(double price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public int getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setImage(int image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public String getDetail() {
|
||||
return detail;
|
||||
}
|
||||
|
||||
public void setDetail(String detail) {
|
||||
this.detail = detail;
|
||||
}
|
||||
|
||||
public int getCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
public void setCount(int count) {
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
Snack snack = (Snack) o;
|
||||
return Objects.equals(name, snack.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Snack{" +
|
||||
"name='" + name + '\'' +
|
||||
", price=" + price +
|
||||
", image=" + image +
|
||||
", detail='" + detail + '\'' +
|
||||
", count=" + count +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
package com.shuyue.snack.model;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
public class User implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private int id;
|
||||
|
||||
private String username;
|
||||
|
||||
private String password;
|
||||
|
||||
private String nickname;
|
||||
|
||||
private int headImage;
|
||||
|
||||
public User() {
|
||||
}
|
||||
|
||||
public User(String username, String password) {
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public User(String username, String password, String nickname, int headImage) {
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
this.nickname = nickname;
|
||||
this.headImage = headImage;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
|
||||
public int getHeadImage() {
|
||||
return headImage;
|
||||
}
|
||||
|
||||
public void setHeadImage(int headImage) {
|
||||
this.headImage = headImage;
|
||||
}
|
||||
|
||||
/**
|
||||
* 用于登录比较用户账号密码
|
||||
*
|
||||
* @param o 待比较用户
|
||||
* @return 比较结果
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
User user = (User) o;
|
||||
return Objects.equals(username, user.username) &&
|
||||
Objects.equals(password, user.password);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(username, password);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return "User{" +
|
||||
"id=" + id +
|
||||
", username='" + username + '\'' +
|
||||
", password='" + password + '\'' +
|
||||
", nickname='" + nickname + '\'' +
|
||||
", headImage='" + headImage + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
package com.shuyue.snack.ui.home;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProviders;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.StaggeredGridLayoutManager;
|
||||
|
||||
import com.shuyue.snack.R;
|
||||
import com.shuyue.snack.activity.DetailActivity;
|
||||
import com.shuyue.snack.adaptor.HomeAdapter;
|
||||
import com.shuyue.snack.animator.MyAnimation3;
|
||||
import com.shuyue.snack.data.DataServer;
|
||||
import com.shuyue.snack.model.Snack;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
public class HomeFragment extends Fragment {
|
||||
|
||||
private HomeViewModel homeViewModel;
|
||||
|
||||
@BindView(R.id.homeRecyclerView)
|
||||
RecyclerView homeRecyclerView;
|
||||
|
||||
public View onCreateView(@NonNull LayoutInflater inflater,
|
||||
ViewGroup container, Bundle savedInstanceState) {
|
||||
homeViewModel =
|
||||
ViewModelProviders.of(this).get(HomeViewModel.class);
|
||||
View root = inflater.inflate(R.layout.fragment_home, container, false);
|
||||
// 绑定资源
|
||||
ButterKnife.bind(this, root);
|
||||
return root;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
// 首页瀑布流列表
|
||||
homeRecyclerView.setLayoutManager(new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL));
|
||||
initHomeAdapter();
|
||||
}
|
||||
|
||||
private void initHomeAdapter() {
|
||||
// 实例化购物车列表适配器对象
|
||||
HomeAdapter adapter = new HomeAdapter(DataServer.getHomeList());
|
||||
// 设置动画效果
|
||||
adapter.setAnimationEnable(true);
|
||||
// adapter.setAnimationFirstOnly(false);
|
||||
// adapter.setAnimationWithDefault(BaseQuickAdapter.AnimationType.SlideInBottom);
|
||||
adapter.setAdapterAnimation(new MyAnimation3());
|
||||
// 设置头部
|
||||
adapter.setHeaderView(getHeadView(), 1);
|
||||
// 设置尾部
|
||||
adapter.setFooterView(getFooterView(), 1);
|
||||
|
||||
// 点击事件监听器
|
||||
adapter.setOnItemClickListener((adapter1, view, position) -> {
|
||||
Snack snack = (Snack) adapter1.getItem(position);
|
||||
DetailActivity.actionStart(getContext(), snack);
|
||||
});
|
||||
|
||||
// 设置适配器
|
||||
homeRecyclerView.setAdapter(adapter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页RecyclerView头部View
|
||||
*/
|
||||
private View getHeadView() {
|
||||
return getLayoutInflater().inflate(R.layout.head_home_image, homeRecyclerView, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页RecyclerView尾部View
|
||||
*/
|
||||
private View getFooterView() {
|
||||
return getLayoutInflater().inflate(R.layout.footer_no_item, homeRecyclerView, false);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.shuyue.snack.ui.home;
|
||||
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
public class HomeViewModel extends ViewModel {
|
||||
|
||||
private MutableLiveData<String> mText;
|
||||
|
||||
public HomeViewModel() {
|
||||
mText = new MutableLiveData<>();
|
||||
mText.setValue("首页页面");
|
||||
}
|
||||
|
||||
public LiveData<String> getText() {
|
||||
return mText;
|
||||
}
|
||||
}
|
@ -0,0 +1,152 @@
|
||||
package com.shuyue.snack.ui.my;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProviders;
|
||||
|
||||
import com.shuyue.snack.MyApplication;
|
||||
import com.shuyue.snack.R;
|
||||
import com.shuyue.snack.activity.LoginActivity;
|
||||
import com.shuyue.snack.activity.OrderActivity;
|
||||
import com.shuyue.snack.adaptor.PlaceOrderAdapter;
|
||||
import com.shuyue.snack.dao.UserDao;
|
||||
import com.shuyue.snack.model.User;
|
||||
import com.shuyue.snack.utils.Tips;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
import de.hdodenhof.circleimageview.CircleImageView;
|
||||
|
||||
import static android.database.sqlite.SQLiteDatabase.openOrCreateDatabase;
|
||||
|
||||
public class MyFragment extends Fragment {
|
||||
|
||||
private MyViewModel myViewModel;
|
||||
PlaceOrderAdapter orderAdapter;
|
||||
// 头像
|
||||
@BindView(R.id.myUserHead)
|
||||
CircleImageView image;
|
||||
// 用户名
|
||||
@BindView(R.id.myUserNickName)
|
||||
TextView nickname;
|
||||
// 账号
|
||||
@BindView(R.id.myUserName)
|
||||
TextView username;
|
||||
// 我的订单
|
||||
|
||||
// 待付款
|
||||
@BindView(R.id.Obligation)
|
||||
LinearLayout Obligation;
|
||||
// 待评价
|
||||
@BindView(R.id.Evaluate)
|
||||
LinearLayout Evaluate;
|
||||
// 退款
|
||||
@BindView(R.id.Refund)
|
||||
LinearLayout Refund;
|
||||
|
||||
|
||||
// 设置部分
|
||||
|
||||
// 地址管理
|
||||
|
||||
|
||||
public View onCreateView(@NonNull LayoutInflater inflater,
|
||||
ViewGroup container, Bundle savedInstanceState) {
|
||||
myViewModel =
|
||||
ViewModelProviders.of(this).get(MyViewModel.class);
|
||||
View root = inflater.inflate(R.layout.fragment_my, container, false);
|
||||
|
||||
// 绑定资源
|
||||
ButterKnife.bind(this, root);
|
||||
return root;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
|
||||
initView();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
initView();
|
||||
}
|
||||
|
||||
|
||||
// 获取当前用户名
|
||||
@SuppressLint("SetTextI18n")
|
||||
private void initView() {
|
||||
if (MyApplication.isLogin()) {
|
||||
User user = MyApplication.getUser();
|
||||
//image.setImageResource(user.getHeadImage());
|
||||
image.setImageResource(R.mipmap.momo);
|
||||
nickname.setText("用户名: " +user.getUsername());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击头像
|
||||
*/
|
||||
@OnClick(R.id.myUserHead)
|
||||
void clickImage() {
|
||||
if (MyApplication.isLogin()) {
|
||||
Tips.show("已登录");
|
||||
} else {
|
||||
LoginActivity.actionStart(getActivity());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 点击我的订单
|
||||
*/
|
||||
@OnClick(R.id.myOrderView)
|
||||
void clickOrder() {
|
||||
if (MyApplication.isLogin()) {
|
||||
OrderActivity.actionStart(getContext());
|
||||
} else {
|
||||
Tips.show("请先登录");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 点击退出登录
|
||||
*/
|
||||
@OnClick(R.id.logoutBtn)
|
||||
void clickLogout() {
|
||||
if (MyApplication.isLogin()) {
|
||||
// 清除持久化数据
|
||||
UserDao.removeUserAndLoginStatus();
|
||||
// 清除全局数据
|
||||
MyApplication.isLogin(false);
|
||||
MyApplication.setUser(null);
|
||||
nickname.setText("登录/注册");
|
||||
username.setText("");
|
||||
image.setImageResource(R.mipmap.momo);
|
||||
} else {
|
||||
Tips.show("还没有登录,请先登录");
|
||||
}
|
||||
}
|
||||
//
|
||||
public static void actionStartP(Context context) {
|
||||
Intent intent = new Intent(context, LoginActivity.class);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.shuyue.snack.ui.my;
|
||||
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
public class MyViewModel extends ViewModel {
|
||||
|
||||
private MutableLiveData<String> mText;
|
||||
|
||||
public MyViewModel() {
|
||||
mText = new MutableLiveData<>();
|
||||
mText.setValue("我的页面");
|
||||
}
|
||||
|
||||
public LiveData<String> getText() {
|
||||
return mText;
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.shuyue.snack.ui.place;
|
||||
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
public class PlaceViewModel extends ViewModel {
|
||||
|
||||
private MutableLiveData<String> mText;
|
||||
|
||||
public PlaceViewModel() {
|
||||
mText = new MutableLiveData<>();
|
||||
mText.setValue("下单页面");
|
||||
}
|
||||
|
||||
public LiveData<String> getText() {
|
||||
return mText;
|
||||
}
|
||||
}
|
@ -0,0 +1,171 @@
|
||||
package com.shuyue.snack.ui.snack;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProviders;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.listener.OnItemClickListener;
|
||||
import com.shuyue.snack.MyApplication;
|
||||
import com.shuyue.snack.R;
|
||||
import com.shuyue.snack.activity.DetailActivity;
|
||||
import com.shuyue.snack.adaptor.SnackLeftAdapter;
|
||||
import com.shuyue.snack.adaptor.SnackRightAdapter;
|
||||
import com.shuyue.snack.data.DataServer;
|
||||
import com.shuyue.snack.model.Snack;
|
||||
import com.shuyue.snack.utils.Tips;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
public class SnackFragment extends Fragment {
|
||||
|
||||
private SnackViewModel snackViewModel;
|
||||
|
||||
// 小吃页面左边列表已选择的Position
|
||||
private int leftSelectPosition = 0;
|
||||
|
||||
@BindView(R.id.snackLeftRecyclerView)
|
||||
RecyclerView leftRecyclerview;
|
||||
|
||||
@BindView(R.id.snackRightRecyclerView)
|
||||
RecyclerView rightRecyclerView;
|
||||
|
||||
// 右边适配器
|
||||
private SnackRightAdapter rightAdapter;
|
||||
|
||||
public static SnackFragment newInstance() {
|
||||
return new SnackFragment();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
snackViewModel = ViewModelProviders.of(this).get(SnackViewModel.class);
|
||||
View root = inflater.inflate(R.layout.fragment_snack, container, false);
|
||||
// 绑定资源
|
||||
ButterKnife.bind(this, root);
|
||||
return root;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
|
||||
leftRecyclerview.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
rightRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
|
||||
initLeftAdapter();
|
||||
initRightAdapter();
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化左边适配器
|
||||
*/
|
||||
@SuppressLint("ResourceAsColor")
|
||||
private void initLeftAdapter() {
|
||||
// 实例化左边适配器对象
|
||||
SnackLeftAdapter leftAdapter = new SnackLeftAdapter(DataServer.getSnackOrderList());
|
||||
// 设置动画效果
|
||||
leftAdapter.setAnimationEnable(true);
|
||||
leftAdapter.setAnimationFirstOnly(false);
|
||||
leftAdapter.setAnimationWithDefault(BaseQuickAdapter.AnimationType.SlideInLeft);
|
||||
|
||||
// 触发点击按钮
|
||||
leftAdapter.setOnItemClickListener((adapter, view, position) -> {
|
||||
if (position != leftSelectPosition) {
|
||||
String item = (String) adapter.getItem(position);
|
||||
|
||||
// 原本选中的item变成未选中颜色
|
||||
Objects.requireNonNull(adapter.getViewByPosition(leftSelectPosition, R.id.snackLeftType)).setBackgroundResource(R.color.colorContent);
|
||||
// 当前item变成选中颜色
|
||||
Objects.requireNonNull(adapter.getViewByPosition(position, R.id.snackLeftType)).setBackgroundResource(R.color.colorBgWhite);
|
||||
leftSelectPosition = position;
|
||||
|
||||
// 刷新右边列表
|
||||
// rightAdapter.setAnimationWithDefault(BaseQuickAdapter.AnimationType.SlideInBottom);
|
||||
rightAdapter.setAnimationEnable(false);
|
||||
switch (position) {
|
||||
case 1:
|
||||
rightAdapter.setNewInstance(DataServer.getGuangxiList());
|
||||
break;
|
||||
case 2:
|
||||
rightAdapter.setNewInstance(DataServer.getGuangzhouList());
|
||||
break;
|
||||
case 3:
|
||||
rightAdapter.setNewInstance(DataServer.getBeijingList());
|
||||
break;
|
||||
case 4:
|
||||
rightAdapter.setNewInstance(DataServer.getChongqingList());
|
||||
break;
|
||||
default:
|
||||
rightAdapter.setNewInstance(DataServer.getFujianList());
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 设置左边列表适配器
|
||||
leftRecyclerview.setAdapter(leftAdapter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化右边适配器
|
||||
*/
|
||||
public void initRightAdapter() {
|
||||
// 实例化右边适配器对象
|
||||
rightAdapter = new SnackRightAdapter(DataServer.getFujianList());
|
||||
// 设置动画效果
|
||||
rightAdapter.setAnimationEnable(true);
|
||||
// rightAdapter.setAnimationFirstOnly(false);
|
||||
rightAdapter.setAnimationWithDefault(BaseQuickAdapter.AnimationType.SlideInRight);
|
||||
// 设置尾部
|
||||
rightAdapter.addFooterView(getFooterView());
|
||||
|
||||
// 点击item事件
|
||||
rightAdapter.setOnItemClickListener(new OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
|
||||
Snack snack = (Snack) adapter.getItem(position);
|
||||
DetailActivity.actionStart(getContext(), snack);
|
||||
}
|
||||
});
|
||||
|
||||
// 左边列表加入购物车点击事件
|
||||
rightAdapter.addChildClickViewIds(R.id.snackRightAddBtn);
|
||||
rightAdapter.setOnItemChildClickListener((adapter, view, position) -> {
|
||||
Snack snack = (Snack) adapter.getItem(position);
|
||||
if (view.getId() == R.id.snackRightAddBtn) {
|
||||
if (!MyApplication.getCartSnacks().contains(snack)) {
|
||||
// 添加到购物车
|
||||
snack.setCount(1);
|
||||
MyApplication.getCartSnacks().add(snack);
|
||||
Tips.show("已添加" + snack.getName() + "到购物车");
|
||||
} else {
|
||||
Tips.show("已在购物车中,不能重复添加");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 设置右边列表适配器
|
||||
rightRecyclerView.setAdapter(rightAdapter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 小吃页面右边RecyclerView尾部View
|
||||
*/
|
||||
private View getFooterView() {
|
||||
return getLayoutInflater().inflate(R.layout.footer_no_item, rightRecyclerView, false);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.shuyue.snack.ui.snack;
|
||||
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.lifecycle.MediatorLiveData;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
public class SnackViewModel extends ViewModel {
|
||||
|
||||
private MediatorLiveData<String> mText;
|
||||
|
||||
public SnackViewModel() {
|
||||
mText = new MediatorLiveData<>();
|
||||
mText.setValue("点单页面");
|
||||
}
|
||||
|
||||
public LiveData<String> getText() {
|
||||
return mText;
|
||||
}
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
package com.shuyue.snack.utils;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.drawable.ShapeDrawable;
|
||||
import android.graphics.drawable.shapes.RoundRectShape;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
public class Tips {
|
||||
|
||||
/**
|
||||
* 显示Toast
|
||||
*
|
||||
* @param message 显示的文本消息
|
||||
*/
|
||||
public static void show(String message) {
|
||||
show(message, Toast.LENGTH_SHORT);
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示Toast
|
||||
*
|
||||
* @param message 显示的文本消息
|
||||
* @param duration 显示时间长度
|
||||
*/
|
||||
public static void show(String message, int duration) {
|
||||
Toast toast = new Toast(Utils.getContext());
|
||||
toast.setDuration(duration);
|
||||
toast.setGravity(Gravity.CENTER, 0, 0);
|
||||
toast.setView(createToastView(message));
|
||||
toast.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建Toast自定义View
|
||||
*
|
||||
* @param message 显示的文本消息
|
||||
* @return 自定义View
|
||||
*/
|
||||
private static View createToastView(String message) {
|
||||
// 构建圆角矩形背景
|
||||
float radius = dp2px(6);
|
||||
RoundRectShape shape = new RoundRectShape(new float[]{radius, radius, radius, radius, radius, radius, radius, radius}, null, null);
|
||||
ShapeDrawable drawable = new ShapeDrawable(shape);
|
||||
drawable.getPaint().setColor(Color.argb(225, 240, 240, 240));
|
||||
drawable.getPaint().setStyle(Paint.Style.FILL);
|
||||
drawable.getPaint().setAntiAlias(true);
|
||||
drawable.getPaint().setFlags(Paint.ANTI_ALIAS_FLAG);
|
||||
|
||||
// 创建View
|
||||
FrameLayout layout = new FrameLayout(Utils.getContext());
|
||||
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
layout.setLayoutParams(layoutParams);
|
||||
layout.setPadding(dp2px(16), dp2px(12), dp2px(16), dp2px(12));
|
||||
layout.setBackground(drawable);
|
||||
|
||||
TextView textView = new TextView(Utils.getContext());
|
||||
textView.setLayoutParams(new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, FrameLayout.LayoutParams.WRAP_CONTENT));
|
||||
textView.setTextSize(15);
|
||||
textView.setText(message);
|
||||
textView.setLineSpacing(dp2px(4), 1f);
|
||||
textView.setTextColor(Color.BLACK);
|
||||
|
||||
layout.addView(textView);
|
||||
|
||||
return layout;
|
||||
}
|
||||
|
||||
/**
|
||||
* dp转px
|
||||
*
|
||||
* @param dp dp的值
|
||||
* @return 转换后的px
|
||||
*/
|
||||
private static int dp2px(float dp) {
|
||||
final float scale = Utils.getContext().getResources().getDisplayMetrics().density;
|
||||
return (int) (dp * scale + 0.5f);
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.shuyue.snack.utils;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
|
||||
public class Utils {
|
||||
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
private static Context context;
|
||||
|
||||
private Utils() {
|
||||
throw new UnsupportedOperationException("我是需要实例化的啦!!!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化工具类
|
||||
*
|
||||
* @param context 上下文
|
||||
*/
|
||||
public static void init(Context context) {
|
||||
Utils.context = context.getApplicationContext();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取应用的ApplicationContext
|
||||
*
|
||||
* @return ApplicationContext
|
||||
*/
|
||||
public static Context getContext() {
|
||||
if (context != null) {
|
||||
return context;
|
||||
}
|
||||
throw new NullPointerException("上下文为空啊!!!");
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<translate
|
||||
android:duration="1000"
|
||||
android:fromXDelta="100%p"
|
||||
android:toXDelta="0" />
|
||||
|
||||
</set>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<translate
|
||||
android:duration="1000"
|
||||
android:fromXDelta="0"
|
||||
android:toXDelta="-100%p"/>
|
||||
|
||||
</set>
|
@ -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>
|
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 368 B |
After Width: | Height: | Size: 231 B |
After Width: | Height: | Size: 233 B |
After Width: | Height: | Size: 353 B |
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="#4D000000" />
|
||||
<corners android:radius="10dp" />
|
||||
</shape>
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid
|
||||
android:color="#00BCD4"></solid>
|
||||
<corners
|
||||
android:radius="25dp">
|
||||
|
||||
</corners>
|
||||
|
||||
|
||||
</shape>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="@color/colorBgWhite" />
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="12dp"
|
||||
android:bottomRightRadius="12dp" />
|
||||
</shape>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
android:shape="rectangle">
|
||||
<solid
|
||||
android:color="#EDF4F0"></solid>
|
||||
<corners
|
||||
android:radius="25dp">
|
||||
|
||||
</corners>
|
||||
</shape>
|
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 47 KiB |
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19,3h-4.18C14.4,1.84 13.3,1 12,1c-1.3,0 -2.4,0.84 -2.82,2L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM12,3c0.55,0 1,0.45 1,1s-0.45,1 -1,1 -1,-0.45 -1,-1 0.45,-1 1,-1zM14,17L7,17v-2h7v2zM17,13L7,13v-2h10v2zM17,9L7,9L7,7h10v2z"/>
|
||||
</vector>
|
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19,3h-4.18C14.4,1.84 13.3,1 12,1c-1.3,0 -2.4,0.84 -2.82,2L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM12,3c0.55,0 1,0.45 1,1s-0.45,1 -1,1 -1,-0.45 -1,-1 0.45,-1 1,-1zM10,17l-4,-4 1.41,-1.41L10,14.17l6.59,-6.59L18,9l-8,8z"/>
|
||||
</vector>
|
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
|
||||
</vector>
|
@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#F56C6C"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M12,21.35l-1.45,-1.32C5.4,15.36 2,12.28 2,8.5 2,5.42 4.42,3 7.5,3c1.74,0 3.41,0.81 4.5,2.09C13.09,3.81 14.76,3 16.5,3 19.58,3 22,5.42 22,8.5c0,3.78 -3.4,6.86 -8.55,11.54L12,21.35z"/>
|
||||
</vector>
|
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M16.5,3c-1.74,0 -3.41,0.81 -4.5,2.09C10.91,3.81 9.24,3 7.5,3 4.42,3 2,5.42 2,8.5c0,3.78 3.4,6.86 8.55,11.54L12,21.35l1.45,-1.32C18.6,15.36 22,12.28 22,8.5 22,5.42 19.58,3 16.5,3zM12.1,18.55l-0.1,0.1 -0.1,-0.1C7.14,14.24 4,11.39 4,8.5 4,6.5 5.5,5 7.5,5c1.54,0 3.04,0.99 3.57,2.36h1.87C13.46,5.99 14.96,5 16.5,5c2,0 3.5,1.5 3.5,3.5 0,2.89 -3.14,5.74 -7.9,10.05z"/>
|
||||
</vector>
|
@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M15.41,7.41L14,6l-6,6 6,6 1.41,-1.41L10.83,12z"/>
|
||||
</vector>
|
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M21,6h-2v9L6,15v2c0,0.55 0.45,1 1,1h11l4,4L22,7c0,-0.55 -0.45,-1 -1,-1zM17,12L17,3c0,-0.55 -0.45,-1 -1,-1L3,2c-0.55,0 -1,0.45 -1,1v14l4,-4h10c0.55,0 1,-0.45 1,-1z"/>
|
||||
</vector>
|
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M15.73,3L8.27,3L3,8.27v7.46L8.27,21h7.46L21,15.73L21,8.27L15.73,3zM12,17.3c-0.72,0 -1.3,-0.58 -1.3,-1.3 0,-0.72 0.58,-1.3 1.3,-1.3 0.72,0 1.3,0.58 1.3,1.3 0,0.72 -0.58,1.3 -1.3,1.3zM13,13h-2L11,7h2v6z"/>
|
||||
</vector>
|
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7,18c-1.1,0 -1.99,0.9 -1.99,2S5.9,22 7,22s2,-0.9 2,-2 -0.9,-2 -2,-2zM1,2v2h2l3.6,7.59 -1.35,2.45c-0.16,0.28 -0.25,0.61 -0.25,0.96 0,1.1 0.9,2 2,2h12v-2L7.42,15c-0.14,0 -0.25,-0.11 -0.25,-0.25l0.03,-0.12 0.9,-1.63h7.45c0.75,0 1.41,-0.41 1.75,-1.03l3.58,-6.49c0.08,-0.14 0.12,-0.31 0.12,-0.48 0,-0.55 -0.45,-1 -1,-1L5.21,4l-0.94,-2L1,2zM17,18c-1.1,0 -1.99,0.9 -1.99,2s0.89,2 1.99,2 2,-0.9 2,-2 -0.9,-2 -2,-2z"/>
|
||||
</vector>
|
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z"/>
|
||||
</vector>
|
@ -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>
|
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"/>
|
||||
</vector>
|
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13.41,18.09L13.41,20h-2.67v-1.93c-1.71,-0.36 -3.16,-1.46 -3.27,-3.4h1.96c0.1,1.05 0.82,1.87 2.65,1.87 1.96,0 2.4,-0.98 2.4,-1.59 0,-0.83 -0.44,-1.61 -2.67,-2.14 -2.48,-0.6 -4.18,-1.62 -4.18,-3.67 0,-1.72 1.39,-2.84 3.11,-3.21L10.74,4h2.67v1.95c1.86,0.45 2.79,1.86 2.85,3.39L14.3,9.34c-0.05,-1.11 -0.64,-1.87 -2.22,-1.87 -1.5,0 -2.4,0.68 -2.4,1.64 0,0.84 0.65,1.39 2.67,1.91s4.18,1.39 4.18,3.91c-0.01,1.83 -1.38,2.83 -3.12,3.16z"/>
|
||||
</vector>
|
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M8.1,13.34l2.83,-2.83L3.91,3.5c-1.56,1.56 -1.56,4.09 0,5.66l4.19,4.18zM14.88,11.53c1.53,0.71 3.68,0.21 5.27,-1.38 1.91,-1.91 2.28,-4.65 0.81,-6.12 -1.46,-1.46 -4.2,-1.1 -6.12,0.81 -1.59,1.59 -2.09,3.74 -1.38,5.27L3.7,19.87l1.41,1.41L12,14.41l6.88,6.88 1.41,-1.41L13.41,13l1.47,-1.47z"/>
|
||||
</vector>
|
After Width: | Height: | Size: 649 B |
After Width: | Height: | Size: 252 B |
After Width: | Height: | Size: 144 B |
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="#1A409EFF" />
|
||||
<corners android:bottomLeftRadius="12sp" android:bottomRightRadius="12sp"/>
|
||||
</shape>
|
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.2 KiB |
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#F56" />
|
||||
<corners android:radius="50dp" />
|
||||
</shape>
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_selected="false" />
|
||||
|
||||
</selector>
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#fff" />
|
||||
<corners android:radius="16dp" />
|
||||
</shape>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="@color/colorBgWhite"/>
|
||||
|
||||
<corners android:radius="12dp"/>
|
||||
</shape>
|
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 14 KiB |
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/colorContent" />
|
||||
<corners android:radius="14sp" />
|
||||
</shape>
|
After Width: | Height: | Size: 799 B |