@ -0,0 +1,15 @@
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/caches
|
||||
/.idea/libraries
|
||||
/.idea/modules.xml
|
||||
/.idea/workspace.xml
|
||||
/.idea/navEditor.xml
|
||||
/.idea/assetWizardSettings.xml
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
||||
@ -0,0 +1,3 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
@ -0,0 +1 @@
|
||||
XC
|
||||
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="11" />
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,420 @@
|
||||
<?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="true" />
|
||||
<value-preview-pinned value="false" />
|
||||
</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.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>
|
||||
</project>
|
||||
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="testRunner" value="GRADLE" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DesignSurface">
|
||||
<option name="filePathToZoomLevelMap">
|
||||
<map>
|
||||
<entry key="..\:/XC2/app/src/main/res/drawable/ic_launcher_foreground.xml" value="0.1" />
|
||||
<entry key="..\:/XC2/app/src/main/res/layout/activity_main.xml" value="0.25" />
|
||||
<entry key="..\:/XC2/app/src/main/res/layout/new_fragment.xml" value="0.1787037037037037" />
|
||||
<entry key="..\:/XC2/app/src/main/res/layout/new_item.xml" value="0.1" />
|
||||
<entry key="..\:/XC2/app/src/main/res/layout/productleft_item.xml" value="0.25" />
|
||||
<entry key="..\:/XC2/app/src/main/res/layout/productright_item.xml" value="0.1" />
|
||||
<entry key="..\:/XC2/app/src/main/res/layout/products_fragment.xml" value="0.1787037037037037" />
|
||||
<entry key="..\:/XC2/app/src/main/res/layout/settlement_fragment.xml" value="0.1787037037037037" />
|
||||
<entry key="..\:/XC2/app/src/main/res/layout/settlement_item.xml" value="0.1" />
|
||||
<entry key="..\:/XC2/app/src/main/res/layout/user_fragment.xml" value="0.1" />
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="Android Studio default JDK" 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 @@
|
||||
/build
|
||||
@ -0,0 +1,39 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdk 32
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.example.xc"
|
||||
minSdk 21
|
||||
targetSdk 32
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.3.0'
|
||||
implementation 'com.google.android.material:material:1.4.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
@ -0,0 +1,26 @@
|
||||
package com.example.xc;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
assertEquals("com.example.xc", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
<?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.example.xc">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:name="com.example.data.AppData"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.XC"
|
||||
tools:replace="android:theme"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".Reigester"
|
||||
android:label="@string/app_name"/>
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@ -0,0 +1,80 @@
|
||||
package com.example.adapter;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.xc.R;
|
||||
|
||||
public class NewAdapter extends RecyclerView.Adapter<NewAdapter.ViewHolder> {
|
||||
private FragmentActivity activity;
|
||||
private int[] image;
|
||||
private String[] text;
|
||||
|
||||
|
||||
|
||||
public NewAdapter(FragmentActivity activity, int[] image, String[] text){
|
||||
this.activity=activity;
|
||||
this.image=image;
|
||||
this.text=text;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
|
||||
View view= LayoutInflater.from(parent.getContext()).inflate(R.layout.new_item,parent,false);
|
||||
ViewHolder holder=new ViewHolder(view); //调用内部类ViewHolder
|
||||
return holder;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, @SuppressLint("RecyclerView") int position) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if((image.length!=0)&&(text.length!=0)){
|
||||
holder.iv.setImageResource(image[position]);
|
||||
holder.tv.setText(text[position]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return image.length;
|
||||
}
|
||||
|
||||
public static class ViewHolder extends RecyclerView.ViewHolder{
|
||||
ImageView iv;
|
||||
TextView tv;
|
||||
|
||||
|
||||
public ViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
iv=itemView.findViewById(R.id.newImage); //获得列表选项图片控件
|
||||
tv=itemView.findViewById(R.id.newText);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
package com.example.adapter;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.graphics.Color;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.fragment.ProductsFragment;
|
||||
import com.example.xc.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ProductLeftAdapter extends RecyclerView.Adapter<ProductLeftAdapter.ViewHolder> {
|
||||
|
||||
private FragmentActivity activity;
|
||||
private String[] text;
|
||||
private List<ViewHolder> items=new ArrayList<>(); //存放列表所有选项ViewHolder对象
|
||||
|
||||
public ProductLeftAdapter(FragmentActivity activity, String[] text){
|
||||
this.activity=activity;
|
||||
this.text=text;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view= LayoutInflater.from(parent.getContext()).inflate(R.layout.productleft_item,parent,false);
|
||||
ViewHolder holder=new ViewHolder(view); //调用内部类ViewHolder
|
||||
return holder;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder,@SuppressLint("RecyclerView") int position) {
|
||||
items.add(holder); //添加选项对象到集合
|
||||
holder.tv.setText(text[position]); //设置选项小吃分类名
|
||||
//设置默认时的选项颜色
|
||||
if(position==0){ //默认选中的选项颜色
|
||||
holder.tv.setTextColor(Color.rgb(84,136,142));
|
||||
holder.tv.setBackgroundColor(Color.rgb(223,247,250));
|
||||
}else { //默认没有选中的选项颜色
|
||||
holder.tv.setTextColor(Color.rgb(148,148,148));
|
||||
holder.tv.setBackgroundColor(Color.rgb(252,253,253));
|
||||
}
|
||||
//点击选项时的操作
|
||||
holder.tv.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
//没有被点击的选项颜色
|
||||
for (int i=0;i<items.size();i++){
|
||||
items.get(i).tv.setTextColor(Color.rgb(148,148,148));
|
||||
items.get(i).tv.setBackgroundColor(Color.rgb(252,253,253));
|
||||
}
|
||||
//被点击的选项颜色
|
||||
holder.tv.setTextColor(Color.rgb(84,136,142));
|
||||
holder.tv.setBackgroundColor(Color.rgb(223,247,250));
|
||||
//点击左列表选项,加载对应右列表数据。
|
||||
ProductsFragment.rightrv.setAdapter(new ProductRightAdapter(activity, ProductsFragment.list.get(position)));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return text.length;
|
||||
}
|
||||
|
||||
public static class ViewHolder extends RecyclerView.ViewHolder{
|
||||
TextView tv;
|
||||
|
||||
public ViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
tv=itemView.findViewById(R.id.leftText); //获得列表选项文本控件对象
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,108 @@
|
||||
package com.example.adapter;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.data.AppData;
|
||||
import com.example.entity.Product;
|
||||
import com.example.xc.R;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ProductRightAdapter extends RecyclerView.Adapter<ProductRightAdapter.ViewHolder> {
|
||||
|
||||
private FragmentActivity activity;
|
||||
private List<Product> list;
|
||||
private AppData app;
|
||||
|
||||
|
||||
public ProductRightAdapter(FragmentActivity activity, List<Product> list){
|
||||
this.activity=activity;
|
||||
this.list=list;
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
app=(AppData) parent.getContext().getApplicationContext(); //获得全局类
|
||||
//获得选项布局对象
|
||||
View view= LayoutInflater.from(parent.getContext()).inflate(R.layout.productright_item,parent,false);
|
||||
ViewHolder holder=new ViewHolder(view); //调用内部类ViewHolder
|
||||
return holder;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, @SuppressLint("RecyclerView") int position) {
|
||||
Product product=list.get(position); //获得选项数据集合
|
||||
//异步加载选项数据
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if((list.size()!=0)){
|
||||
holder.iv.setImageResource(product.getImage());
|
||||
holder.nametv.setText(product.getName());
|
||||
holder.pricetv.setText(" "+product.getPrice());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
//点击选项里的添加按钮要执行的操作
|
||||
holder.bt.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
//如果已选的小吃数据集合里没有该小吃
|
||||
if(!app.selectedproduct.contains(list.get(position))){
|
||||
product.setNumber(1); //设置数量
|
||||
app.selectedproduct.add(product); //添加当前选项数据到集合
|
||||
//添加当前选项价格到总价
|
||||
app.countprice +=Double.parseDouble(product.getPrice());
|
||||
Toast.makeText(activity,"添加成功",Toast.LENGTH_SHORT).show();
|
||||
}else{ //如果已选的小吃数据集合里已有该小吃
|
||||
Toast.makeText(activity,"已经有了",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
public static class ViewHolder extends RecyclerView.ViewHolder{
|
||||
ImageView iv;
|
||||
TextView nametv;
|
||||
TextView pricetv;
|
||||
Button bt;
|
||||
|
||||
|
||||
public ViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
iv=itemView.findViewById(R.id.rightImage); //获得选项放小吃图片的控件
|
||||
nametv=itemView.findViewById(R.id.rightName); //获得选项放小吃名称的控件
|
||||
pricetv=itemView.findViewById(R.id.rightPrice); //获得选项放小吃价格的控件
|
||||
bt=itemView.findViewById(R.id.addProduct); //获得选项添加按钮控件
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,150 @@
|
||||
package com.example.adapter;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.data.AppData;
|
||||
import com.example.entity.Product;
|
||||
import com.example.xc.R;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SettlementAdapter extends RecyclerView.Adapter<SettlementAdapter.ViewHolder>{
|
||||
|
||||
private FragmentActivity activity;
|
||||
private List<Product> list;
|
||||
private AppData app;
|
||||
private TextView counttv;
|
||||
private TextView noproduct;
|
||||
private ScrollView scrollView;
|
||||
|
||||
|
||||
public SettlementAdapter(FragmentActivity activity, List<Product> list){
|
||||
this.activity=activity;
|
||||
this.list=list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
app=(AppData) parent.getContext().getApplicationContext(); //获得全局类
|
||||
counttv= activity.findViewById(R.id.countPirce); //获得总价控件对象
|
||||
noproduct=activity.findViewById(R.id.noProduct); //获得没点菜控件对象
|
||||
scrollView=activity.findViewById(R.id.scrollView); //获得ScrollView控件对象
|
||||
//关联列表选项布局
|
||||
View view= LayoutInflater.from(parent.getContext()).inflate(R.layout.settlement_item,parent,false);
|
||||
ViewHolder holder=new ViewHolder(view); //调用内部类ViewHolder
|
||||
|
||||
return holder;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, @SuppressLint("RecyclerView") int position) {
|
||||
Product product=list.get(position); //获得当前选项数据集合
|
||||
//异步加载选项数据
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if((list.size()!=0)){
|
||||
holder.ivimage.setImageResource(product.getImage());
|
||||
holder.tvname.setText(product.getName());
|
||||
holder.tvnumber.setText(product.getNumber()+""); holder.tvprice.setText(product.getPrice()+"元/份");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
|
||||
//点击【+】按钮
|
||||
holder.btnadd.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
int num=product.getNumber()+1; //每点一次数量加1
|
||||
product.setNumber(num); //设置当前数量
|
||||
holder.tvnumber.setText(num+""); //显示当前数量
|
||||
//添加当前价格到总价
|
||||
app.countprice +=Double.parseDouble(product.getPrice()); counttv.setText(app.countprice+""); //显示当前总价
|
||||
}
|
||||
});
|
||||
//点击【-】按钮
|
||||
holder.btnsubtract.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if(product.getNumber()>1){ //如果数量大于1
|
||||
int num=product.getNumber()-1; //每点一次数量减1
|
||||
product.setNumber(num); //设置当前数量
|
||||
holder.tvnumber.setText(num+""); //显示当前数量
|
||||
//从总价里减去当前价格
|
||||
app.countprice -=Double.parseDouble(product.getPrice());
|
||||
counttv.setText(app.countprice+""); //显示当前总价
|
||||
}
|
||||
else if(product.getNumber()==1){ //如果数量等于1
|
||||
int num=product.getNumber()-1; //每点一次数量减1
|
||||
product.setNumber(num); //设置当前数量
|
||||
//从已选小吃集合里删除当前选项数据
|
||||
app.selectedproduct.remove(position);
|
||||
//从总价里减去当前价格
|
||||
app.countprice -=Double.parseDouble(product.getPrice());
|
||||
counttv.setText(app.countprice+""); //显示当前总价
|
||||
notifyDataSetChanged(); //刷新列表数据
|
||||
}
|
||||
if(app.selectedproduct.size()==0){ //如果已选小吃集合长度等于0
|
||||
noproduct.setVisibility(View.VISIBLE); //就显示没点菜界面
|
||||
scrollView.setVisibility(View.GONE); //就隐藏已点菜界面
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
public static class ViewHolder extends RecyclerView.ViewHolder{
|
||||
ImageView ivimage;
|
||||
TextView tvname;
|
||||
TextView tvprice;
|
||||
Button btnsubtract;
|
||||
TextView tvnumber;
|
||||
Button btnadd;
|
||||
EditText etremarks;
|
||||
|
||||
|
||||
|
||||
public ViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
ivimage=itemView.findViewById(R.id.selectedImage); //获得小吃图片控件对象
|
||||
tvname=itemView.findViewById(R.id.selectedName); //获得小吃名称控件对象
|
||||
tvprice=itemView.findViewById(R.id.selectedPrice); //获得小吃价格控件对象
|
||||
btnsubtract=itemView.findViewById(R.id.subtractButton); //获得【-】按钮控件对象
|
||||
tvnumber=itemView.findViewById(R.id.selectedNumber); //获得小吃数量控件对象
|
||||
btnadd=itemView.findViewById(R.id.addButton); //获得【+】按钮控件对象
|
||||
etremarks=itemView.findViewById(R.id.remarksText); //获得小吃备注对象
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.example.data;
|
||||
|
||||
import android.app.Application;
|
||||
|
||||
import com.example.entity.Product;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AppData extends Application {
|
||||
|
||||
public List<Product> selectedproduct=new ArrayList<>(); //用于存放已选小吃
|
||||
public double countprice; //用于存放总价
|
||||
public String countremarks; //用于存放总备注
|
||||
|
||||
/**
|
||||
* 初始化方法
|
||||
*/
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package com.example.entity;
|
||||
|
||||
public class Product {
|
||||
private int image; //图片
|
||||
private String name; //名称
|
||||
private String price; //价格
|
||||
private int number; //数量
|
||||
private String remarks; //备注
|
||||
|
||||
public int getImage() {
|
||||
return image;
|
||||
}
|
||||
public void setImage(int image) {
|
||||
this.image = image;
|
||||
}
|
||||
public int getNumber() {
|
||||
return number;
|
||||
}
|
||||
public void setNumber(int number) {
|
||||
this.number = number;
|
||||
}
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public String getPrice() {
|
||||
return price;
|
||||
}
|
||||
public void setPrice(String price) {
|
||||
this.price = price;
|
||||
}
|
||||
public String getRemarks() {
|
||||
return remarks;
|
||||
}
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.example.fragment;
|
||||
|
||||
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.recyclerview.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.StaggeredGridLayoutManager;
|
||||
|
||||
import com.example.adapter.NewAdapter;
|
||||
import com.example.xc.IndexActivty;
|
||||
import com.example.xc.MainActivity;
|
||||
import com.example.xc.R;
|
||||
|
||||
public class NewFragment extends Fragment {
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle
|
||||
savedInstanceState) {
|
||||
View view=inflater.inflate(R.layout.new_fragment,container,false);
|
||||
initRecyclerView(view);
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
IndexActivty.initHomeBtnColor();
|
||||
|
||||
}
|
||||
|
||||
private void initRecyclerView(View view){
|
||||
RecyclerView rv=view.findViewById(R.id.newRecycler); //获得RecyclerView控件对象 //设置为StaggeredGridLayout流式布局
|
||||
rv.setLayoutManager(new StaggeredGridLayoutManager(2,RecyclerView.VERTICAL)); //定义新品小吃图片数组
|
||||
int[] image={R.drawable.bf11,R.drawable.bf3,R.drawable.om1,R.drawable.om7,R.drawable.yc1,
|
||||
R.drawable.nf10,R.drawable.nf8}; //定义新品小吃说明数组
|
||||
String[] text={"嘎嘣脆香煎饼果子","鲜嫩多汁小笼包","薯条鸡肉丸组合","北欧蜜汁奶粉果",
|
||||
"什锦串串烤","川味凉面","自贡脆脆兔"};
|
||||
|
||||
NewAdapter adapter=new NewAdapter(getActivity(),image,text); //调用适配器
|
||||
|
||||
rv.setAdapter(adapter);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,133 @@
|
||||
package com.example.fragment;
|
||||
|
||||
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.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.adapter.ProductLeftAdapter;
|
||||
import com.example.adapter.ProductRightAdapter;
|
||||
import com.example.entity.Product;
|
||||
import com.example.xc.IndexActivty;
|
||||
import com.example.xc.MainActivity;
|
||||
import com.example.xc.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ProductsFragment extends Fragment {
|
||||
public static List<List<Product>> list=new ArrayList<>(); //定义存放右边列表所有选项数据的集合
|
||||
public static RecyclerView rightrv;
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle
|
||||
savedInstanceState) {
|
||||
View view=inflater.inflate(R.layout.products_fragment,container,false);
|
||||
initRecyclerView(view);
|
||||
return view;
|
||||
}
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
IndexActivty.initProductBtnColor();
|
||||
}
|
||||
|
||||
private void initRecyclerView(View view){
|
||||
RecyclerView leftrv=view.findViewById(R.id.leftRecycler); //获得左边列表控件对象
|
||||
//设置为上下结构的LinearLayout布局
|
||||
leftrv.setLayoutManager(new LinearLayoutManager(getActivity(),RecyclerView.VERTICAL,false));
|
||||
//小吃分类名
|
||||
String[] classname={"南方小吃","北方小吃","原创小吃","亚洲小吃","欧美小吃"};
|
||||
//调用左边列表适配器类
|
||||
ProductLeftAdapter leftAdapter=new ProductLeftAdapter(getActivity(),classname);
|
||||
|
||||
leftrv.setAdapter(leftAdapter);
|
||||
//定义五组小吃图片
|
||||
int[] nfimage={R.drawable.nf1,R.drawable.nf2,R.drawable.nf3,R.drawable.nf4,R.drawable.nf5,R.drawable.nf6,
|
||||
R.drawable.nf7,R.drawable.nf8,R.drawable.nf9,R.drawable.nf10,R.drawable.nf11};
|
||||
int[] bfimage={R.drawable.bf1,R.drawable.bf2,R.drawable.bf3,R.drawable.bf4,R.drawable.bf5,
|
||||
R.drawable.bf6,R.drawable.bf7,R.drawable.bf8,R.drawable.bf9,R.drawable.bf10,R.drawable.bf11};
|
||||
int[] ycimage={R.drawable.yc1,R.drawable.yc2,R.drawable.yc3,R.drawable.yc4,R.drawable.yc5,
|
||||
R.drawable.yc6,R.drawable.yc7,R.drawable.yc8,R.drawable.yc9,R.drawable.yc10};
|
||||
int[] yzimage={R.drawable.yz1,R.drawable.yz2,R.drawable.yz3,R.drawable.yz4,R.drawable.yz5,
|
||||
R.drawable.yz6,R.drawable.yz7,R.drawable.yz8,R.drawable.yz9,R.drawable.yz10,R.drawable.yz11,};
|
||||
int[] omimage={R.drawable.om1,R.drawable.om2,R.drawable.om3,R.drawable.om4,R.drawable.om5,
|
||||
R.drawable.om6,R.drawable.om7,R.drawable.om8,R.drawable.om9,R.drawable.om10,};
|
||||
//定义5组小吃名称
|
||||
String[] nfname={"南方小吃1","南方小吃2","南方小吃3","南方小吃4","南方小吃5","南方小吃6",
|
||||
"南方小吃7","南方小吃8","南方小吃9","南方小吃10","南方小吃11"};
|
||||
String[] bfname={"北方小吃1","北方小吃2","北方小吃3","北方小吃4","北方小吃5","北方小吃6",
|
||||
"北方小吃7","北方小吃8","北方小吃9","北方小吃10","北方小吃11"};
|
||||
String[] ycname={"原创小吃1","原创小吃2","原创小吃3","原创小吃4","原创小吃5","原创小吃6",
|
||||
"原创小吃7","原创小吃8","原创小吃9","原创小吃10"};
|
||||
String[] yzname={"亚洲小吃1","亚洲小吃2","亚洲小吃3","亚洲小吃4","亚洲小吃5","亚洲小吃6",
|
||||
"亚洲小吃7","亚洲小吃8","亚洲小吃9","亚洲小吃10","亚洲小吃11"};
|
||||
String[] omname={"欧美小吃1","欧美小吃2","欧美小吃3","欧美小吃4","欧美小吃5","欧美小吃6",
|
||||
"欧美小吃7","欧美小吃8","欧美小吃9","欧美小吃10"};
|
||||
//定义5组小吃价格
|
||||
String[] nfprice={"4.5","5.5","6.5","3.0","4.0","5.0","6.0","2.0","7.0","7.5","8.0"};
|
||||
String[] bfprice={"4.5","5.5","6.5","3.0","4.0","5.0","6.0","2.0","7.0","7.5","8.0"};
|
||||
String[] ycprice={"4.5","5.5","6.5","3.0","4.0","5.0","6.0","2.0","7.0","7.5"};
|
||||
String[] yzprice={"4.5","5.5","6.5","3.0","4.0","5.0","6.0","2.0","7.0","7.5","8.0"};
|
||||
String[] omprice={"4.5","5.5","6.5","3.0","4.0","5.0","6.0","2.0","7.0","7.5"};
|
||||
|
||||
List<Product> listright1=getList(nfimage, nfname, nfprice);
|
||||
list.add(listright1);
|
||||
//获取北方小吃分类数据,并添加的集合里。
|
||||
List<Product> listright2=getList(bfimage, bfname, bfprice);
|
||||
list.add(listright2);
|
||||
//获取原创小吃分类数据,并添加的集合里。
|
||||
List<Product> listright3=getList(ycimage, ycname, ycprice);
|
||||
list.add(listright3);
|
||||
//获取亚洲小吃分类数据,并添加的集合里。
|
||||
List<Product> listright4=getList(yzimage, yzname, yzprice);
|
||||
list.add(listright4);
|
||||
//获取欧美小吃分类数据,并添加的集合里。
|
||||
List<Product> listright5=getList(omimage, omname, omprice);
|
||||
list.add(listright5);
|
||||
|
||||
rightrv=view.findViewById(R.id.rightRecycler); //获得右边列表控件对象
|
||||
//设置为上下结构的LinearLayout布局
|
||||
rightrv.setLayoutManager(new LinearLayoutManager(getActivity(),RecyclerView.VERTICAL,false));
|
||||
//调用右边列表适配器类
|
||||
ProductRightAdapter rightAdapter=new ProductRightAdapter(getActivity(),listright1);
|
||||
|
||||
rightrv.setAdapter(rightAdapter); //把适配器设置给右边列表控件
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 本方法用于生成右边列表选项数据集合
|
||||
* @param iamges 传入一组小吃图片
|
||||
* @param names 传入一组小吃名称
|
||||
* @param prices 传入一组小吃价格
|
||||
* @return 返回一个分类的所有小吃数据集合
|
||||
*/
|
||||
public List<Product> getList(int[] iamges, String[] names, String[] prices){
|
||||
List<Product> listright=new ArrayList<>(); //存放右边列表所有数据
|
||||
Product product; //用于存放一个选项数据
|
||||
for(int i=0;i<iamges.length;i++){
|
||||
product=new Product();
|
||||
product.setImage(iamges[i]);
|
||||
product.setName(names[i]);
|
||||
product.setPrice(prices[i]);
|
||||
listright.add(product);
|
||||
}
|
||||
return listright;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
package com.example.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.adapter.SettlementAdapter;
|
||||
import com.example.data.AppData;
|
||||
import com.example.xc.IndexActivty;
|
||||
import com.example.xc.MainActivity;
|
||||
import com.example.xc.R;
|
||||
|
||||
public class SettlementFragment extends Fragment {
|
||||
private AppData app;
|
||||
private RecyclerView rv;
|
||||
private TextView noproduct;
|
||||
private ScrollView scrollView;
|
||||
private TextView countprice;
|
||||
private EditText countremarks;
|
||||
private Button btnsettlement;
|
||||
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle
|
||||
savedInstanceState) {
|
||||
View view=inflater.inflate(R.layout.settlement_fragment,container,false);
|
||||
//关联布局文件
|
||||
app= (AppData) getActivity().getApplication(); //获得全局类
|
||||
rv=view.findViewById(R.id.selectedRecycler); //获得列表控件对象
|
||||
noproduct=view.findViewById(R.id.noProduct); //获得没点菜时的控件对象
|
||||
scrollView=view.findViewById(R.id.scrollView); //获得ScrollView控件对象
|
||||
countprice=view.findViewById(R.id.countPirce); //获得总价控件对象
|
||||
countremarks=view.findViewById(R.id.countRemarks); //获得总备注控件对象
|
||||
btnsettlement=view.findViewById(R.id.settlement); //获得下单按钮对象
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
IndexActivty.initSettlementBtnColor();
|
||||
|
||||
if(app.selectedproduct.size()!=0){ //如果已选小吃集合长度不等于0
|
||||
noproduct.setVisibility(View.GONE); //就隐藏没点菜控件
|
||||
scrollView.setVisibility(View.VISIBLE); //就显示已点菜控件
|
||||
initView();
|
||||
}
|
||||
else { //否则
|
||||
noproduct.setVisibility(View.VISIBLE); //就显示没点菜控件
|
||||
scrollView.setVisibility(View.GONE); //就隐藏已点菜控件
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
countprice.setText(app.countprice+""); //显示已选小吃总价
|
||||
countremarks.setText(app.countremarks); //把总备注显示到控件里
|
||||
//设置列表为上下结构的LinearLayout布局
|
||||
rv.setLayoutManager(new LinearLayoutManager(getActivity(),RecyclerView.VERTICAL,false));
|
||||
//调用适配器
|
||||
SettlementAdapter adapter=new SettlementAdapter(getActivity(),app.selectedproduct);
|
||||
rv.setAdapter(adapter); //把适配器设置给列表控件
|
||||
btnsettlement.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
//提示框提示“暂时无法下单”
|
||||
Toast.makeText(getActivity(),"暂时无法下单",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,181 @@
|
||||
package com.example.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.example.data.AppData;
|
||||
import com.example.xc.IndexActivty;
|
||||
import com.example.xc.MainActivity;
|
||||
import com.example.xc.R;
|
||||
|
||||
public class UserFragment extends Fragment {
|
||||
|
||||
private String s1=""; //用于存放是否不要葱
|
||||
private String s2=""; //用于存放是否不要香菜
|
||||
private String s3=""; //用于存放是否不要蒜
|
||||
private String s4=""; //用于存放是否不要动物油
|
||||
private String s5=""; //用于存放是否不要醋
|
||||
private String s6=""; //用于存放辣味
|
||||
private AppData app;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle
|
||||
savedInstanceState) {
|
||||
View view=inflater.inflate(R.layout.user_fragment,container,false);
|
||||
app= (AppData) getActivity().getApplication(); //获得全局类
|
||||
//关联布局文件
|
||||
initView(view);
|
||||
initCheckBox(view);
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
IndexActivty.initUserBtnColor();
|
||||
}
|
||||
|
||||
private void initView(View view){
|
||||
//点击购物评价入口
|
||||
CardView evaluate=view.findViewById(R.id.evaluate);
|
||||
evaluate.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Toast.makeText(getActivity(),"暂不提供",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
//点击购买记录入口
|
||||
CardView record=view.findViewById(R.id.record);
|
||||
record.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Toast.makeText(getActivity(),"暂不提供",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
//点击收货地址入口
|
||||
CardView adress=view.findViewById(R.id.adress);
|
||||
adress.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Toast.makeText(getActivity(),"暂不提供",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
//点击联系客服入口
|
||||
CardView server=view.findViewById(R.id.server);
|
||||
server.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Toast.makeText(getActivity(),"暂不提供",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void initCheckBox(final View view){
|
||||
//点击不要葱多选框
|
||||
final CheckBox cb1=view.findViewById(R.id.checkBox1);
|
||||
cb1.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
||||
if(b){ //如果选中,
|
||||
s1="-"+cb1.getText().toString(); //就获得选框里的值
|
||||
}
|
||||
else{ //如果没选中
|
||||
s1=""; //就赋值为空
|
||||
}
|
||||
app.countremarks=s1+s2+s3+s4+s5+s6; //把当前所选口味添加到总备注
|
||||
}
|
||||
});
|
||||
//点击不要香菜多选框
|
||||
final CheckBox cb2=view.findViewById(R.id.checkBox2);
|
||||
cb2.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
||||
if(b){
|
||||
s2="-"+cb2.getText().toString();
|
||||
}
|
||||
else{
|
||||
s2="";
|
||||
}
|
||||
app.countremarks=s1+s2+s3+s4+s5+s6; //把当前所选口味添加到总备注
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
//点击不要蒜多选框
|
||||
final CheckBox cb3=view.findViewById(R.id.checkBox3);
|
||||
cb3.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
||||
if(b){
|
||||
s3="-"+cb3.getText().toString();
|
||||
}
|
||||
else{
|
||||
s3="";
|
||||
}
|
||||
app.countremarks=s1+s2+s3+s4+s5+s6; //把当前所选口味添加到总备注
|
||||
|
||||
}
|
||||
});
|
||||
//点击不要动物油多选框
|
||||
final CheckBox cb4=view.findViewById(R.id.checkBox4);
|
||||
cb4.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
||||
if(b){
|
||||
s4="-"+cb4.getText().toString();
|
||||
}
|
||||
else{
|
||||
s4="";
|
||||
}
|
||||
app.countremarks=s1+s2+s3+s4+s5+s6; //把当前所选口味添加到总备注
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//点击不要醋多选框
|
||||
final CheckBox cb5=view.findViewById(R.id.checkBox5);
|
||||
cb5.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
||||
if(b){
|
||||
s5="-"+cb5.getText().toString();
|
||||
}
|
||||
else{
|
||||
s5="";
|
||||
}
|
||||
app.countremarks=s1+s2+s3+s4+s5+s6; //把当前所选口味添加到总备注
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
RadioGroup radioGroup=view.findViewById(R.id.radio);
|
||||
radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(RadioGroup radioGroup, int i) {
|
||||
RadioButton radioButton=view.findViewById(i); //获得选中的单选框
|
||||
s6="-"+radioButton.getText().toString(); //获得选框里的数据
|
||||
app.countremarks=s1+s2+s3+s4+s5+s6; //把当前所选口味添加到总备注
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package com.example.utils;
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.AttributeSet;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public class ChiImageView extends androidx.appcompat.widget.AppCompatImageView {
|
||||
|
||||
public ChiImageView(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public ChiImageView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public ChiImageView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec){
|
||||
Drawable d = getDrawable();
|
||||
if(d!=null){
|
||||
int width = MeasureSpec.getSize(widthMeasureSpec);
|
||||
//高度根据宽度计算
|
||||
int height = (int) Math.ceil((float) width * (float) d.getIntrinsicHeight() / (float) d.getIntrinsicWidth());
|
||||
setMeasuredDimension(width, height);
|
||||
}else{
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,177 @@
|
||||
package com.example.xc;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
|
||||
import com.example.fragment.NewFragment;
|
||||
import com.example.fragment.ProductsFragment;
|
||||
import com.example.fragment.SettlementFragment;
|
||||
import com.example.fragment.UserFragment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class IndexActivty extends AppCompatActivity {
|
||||
private ViewPager2 vp;
|
||||
public static ImageView homeiv;
|
||||
public static TextView hometv;
|
||||
public static ImageView productiv;
|
||||
public static TextView producttv;
|
||||
public static ImageView settlementiv;
|
||||
public static TextView settlementtv;
|
||||
public static ImageView useriv;
|
||||
public static TextView usertv;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
||||
setContentView(R.layout.activity_main);
|
||||
initFragment();
|
||||
initClick();
|
||||
}
|
||||
|
||||
private void initFragment(){
|
||||
//创建Fragment集合
|
||||
final List<Fragment> list=new ArrayList<>();
|
||||
list.add(new NewFragment());
|
||||
list.add(new ProductsFragment());
|
||||
list.add(new SettlementFragment());
|
||||
list.add(new UserFragment());
|
||||
vp=findViewById(R.id.viewPager); //获得ViewPager2控件
|
||||
//设置预加载的Fragment 页面数量,可防止流式布局 StaggeredGrid 数组越界错误。
|
||||
vp.setOffscreenPageLimit(list.size());
|
||||
//设置适配器
|
||||
FragmentStateAdapter adapter=new FragmentStateAdapter(IndexActivty.this) {
|
||||
@NonNull
|
||||
@Override
|
||||
public Fragment createFragment(int position) {
|
||||
return list.get(position);
|
||||
}
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
};
|
||||
vp.setAdapter(adapter);//把适配器添加给ViewPager2
|
||||
}
|
||||
|
||||
private
|
||||
void initClick(){
|
||||
homeiv=findViewById(R.id.imageHome);
|
||||
hometv=findViewById(R.id.textHome);
|
||||
productiv=findViewById(R.id.imageProduct);
|
||||
producttv=findViewById(R.id.textProduct);
|
||||
settlementiv=findViewById(R.id.imageSettlement);
|
||||
settlementtv=findViewById(R.id.textSettlement);
|
||||
useriv=findViewById(R.id.imageUser);
|
||||
usertv=findViewById(R.id.textUser);
|
||||
//给新品选项添加点击事件
|
||||
LinearLayout btnhome=findViewById(R.id.btnHome);
|
||||
btnhome.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
vp.setCurrentItem(0,false);
|
||||
initHomeBtnColor();
|
||||
}
|
||||
});
|
||||
//给点菜选项添加添加事件
|
||||
LinearLayout btnproduct=findViewById(R.id.btnProduct);
|
||||
btnproduct.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
vp.setCurrentItem(1,false);
|
||||
initProductBtnColor();
|
||||
}
|
||||
});
|
||||
//给下单选项添加点击事件
|
||||
LinearLayout btnsettlement=findViewById(R.id.btnSettlement);
|
||||
btnsettlement.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
vp.setCurrentItem(2,false);
|
||||
initSettlementBtnColor();
|
||||
}
|
||||
|
||||
});
|
||||
//给我的选项添加点击事件
|
||||
LinearLayout btnuser=findViewById(R.id.btnUser);
|
||||
btnuser.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
vp.setCurrentItem(3,false);
|
||||
initUserBtnColor();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
/**
|
||||
*
|
||||
选中新品选项时的颜色
|
||||
*/
|
||||
public static void initHomeBtnColor(){
|
||||
homeiv.setImageResource(R.drawable.home1);
|
||||
hometv.setTextColor(Color.rgb(0,188,212));
|
||||
productiv.setImageResource(R.drawable.product2);
|
||||
producttv.setTextColor(Color.rgb(148,148,148));
|
||||
settlementiv.setImageResource(R.drawable.settlement2);
|
||||
settlementtv.setTextColor(Color.rgb(148,148,148));
|
||||
useriv.setImageResource(R.drawable.user2);
|
||||
usertv.setTextColor(Color.rgb(148,148,148));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
选中点菜选项时的颜色
|
||||
*/
|
||||
public static void initProductBtnColor(){
|
||||
homeiv.setImageResource(R.drawable.home2);
|
||||
hometv.setTextColor(Color.rgb(148,148,148));
|
||||
productiv.setImageResource(R.drawable.product1);
|
||||
producttv.setTextColor(Color.rgb(0,188,212));
|
||||
settlementiv.setImageResource(R.drawable.settlement2);
|
||||
settlementtv.setTextColor(Color.rgb(148,148,148));
|
||||
useriv.setImageResource(R.drawable.user2);
|
||||
usertv.setTextColor(Color.rgb(148,148,148));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
选中下单选项时的颜色
|
||||
*/
|
||||
public static void initSettlementBtnColor(){
|
||||
homeiv.setImageResource(R.drawable.home2);
|
||||
hometv.setTextColor(Color.rgb(148,148,148));
|
||||
productiv.setImageResource(R.drawable.product2);
|
||||
producttv.setTextColor(Color.rgb(148,148,148));
|
||||
settlementiv.setImageResource(R.drawable.settlement1);
|
||||
settlementtv.setTextColor(Color.rgb(0,188,212));
|
||||
useriv.setImageResource(R.drawable.user2);
|
||||
usertv.setTextColor(Color.rgb(148,148,148));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
选中我的选项时的颜色
|
||||
*/
|
||||
public static void initUserBtnColor(){
|
||||
homeiv.setImageResource(R.drawable.home2);
|
||||
hometv.setTextColor(Color.rgb(148,148,148));
|
||||
productiv.setImageResource(R.drawable.product2);
|
||||
producttv.setTextColor(Color.rgb(148,148,148));
|
||||
settlementiv.setImageResource(R.drawable.settlement2);
|
||||
settlementtv.setTextColor(Color.rgb(148,148,148));
|
||||
useriv.setImageResource(R.drawable.user1);
|
||||
usertv.setTextColor(Color.rgb(0,188,212));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
package com.example.xc;
|
||||
|
||||
import static android.service.controls.ControlsProviderService.TAG;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
EditText username_Text,passward_Text;
|
||||
@RequiresApi(api = Build.VERSION_CODES.R)
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState); //初始化
|
||||
setContentView(R.layout.login); //创建一个布局文件
|
||||
Button button =(Button) findViewById(R.id.login2);
|
||||
button.setOnClickListener(view -> {
|
||||
Intent intent = new Intent();
|
||||
intent.setClass(MainActivity.this,Reigester.class);
|
||||
startActivity(intent);
|
||||
Log.w(TAG, "onClick:点击了注册按钮 ");
|
||||
});
|
||||
Button button1=(Button) findViewById(R.id.login);
|
||||
username_Text = (EditText)findViewById(R.id.username);
|
||||
passward_Text = (EditText)findViewById(R.id.passward);
|
||||
button1.setOnClickListener(view -> {
|
||||
if(validataLogin())
|
||||
{
|
||||
Intent intent1 = new Intent(MainActivity.this,IndexActivty.class);
|
||||
Bundle bundle = new Bundle();
|
||||
XcDatabase orangeDatabase = new XcDatabase(MainActivity.this);
|
||||
bundle.putString("username",username_Text.getText().toString());
|
||||
bundle = orangeDatabase.queryUserInfo(
|
||||
orangeDatabase.getReadableDatabase(),bundle);
|
||||
intent1.putExtras(bundle);
|
||||
startActivity(intent1);
|
||||
}
|
||||
else {
|
||||
Toast.makeText(MainActivity.this,"账号或者密码错误",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
private boolean validataLogin(){
|
||||
String username_str = username_Text.getText().toString();
|
||||
String passward_str = passward_Text.getText().toString();
|
||||
XcDatabase xcDatabase = new XcDatabase(MainActivity.this);
|
||||
SQLiteDatabase sqLiteDatabase = xcDatabase.getReadableDatabase();
|
||||
@SuppressLint("Recycle") Cursor cursor = sqLiteDatabase.rawQuery("select * from xc_user where username=? and password=?", new String[]{username_str, passward_str});
|
||||
if (cursor.getCount() > 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,86 @@
|
||||
package com.example.xc;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.content.Intent;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.IdRes;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class Reigester extends AppCompatActivity {
|
||||
private String name_str = "";
|
||||
private String passward_str1 = "";
|
||||
private String passward_str2 = "";
|
||||
private String sex_str = "男性";
|
||||
RadioGroup sex_group;
|
||||
RadioButton nan_but,nv_but;
|
||||
Button register;
|
||||
EditText name_edit,passward_edit1,passward_edit2;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.reigster);
|
||||
name_edit = (EditText)findViewById(R.id.reg_username);
|
||||
passward_edit1 = (EditText)findViewById(R.id.reg_passward);
|
||||
passward_edit2 = (EditText)findViewById(R.id.reg_sure_passward);
|
||||
sex_group = (RadioGroup)findViewById(R.id.reg_user_sex);
|
||||
sex_group.setOnCheckedChangeListener(this::onCheckedChanged);
|
||||
nan_but=(RadioButton)findViewById(R.id.reg_man);
|
||||
nv_but=(RadioButton)findViewById(R.id.reg_woman);
|
||||
register=(Button)findViewById(R.id.reg_register);
|
||||
register.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
switch (view.getId()){
|
||||
case R.id.reg_register:
|
||||
validateRegister();
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void validateRegister() {
|
||||
name_str = name_edit.getText().toString();
|
||||
passward_str1 = passward_edit1.getText().toString();
|
||||
passward_str2 = passward_edit2.getText().toString();
|
||||
if(passward_str1.equals(passward_str2)){
|
||||
if(!name_str.equals("")||!passward_str1.equals("")) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("reg_username", name_str);
|
||||
bundle.putString("reg_passward", passward_str1);
|
||||
bundle.putString("reg_sure_passward", passward_str2);
|
||||
bundle.putString("sex", sex_str);
|
||||
XcDatabase xcDatabase = new XcDatabase(Reigester.this);
|
||||
SQLiteDatabase sqLiteDatabase = xcDatabase.getWritableDatabase();
|
||||
insertData(sqLiteDatabase, bundle);
|
||||
Intent intent = new Intent(Reigester.this, MainActivity.class);
|
||||
intent.putExtras(bundle);
|
||||
startActivity(intent);
|
||||
}else {
|
||||
Toast.makeText(Reigester.this,"账号或者密码未填写",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}else {
|
||||
Toast.makeText(Reigester.this,"两次输入的密码不对",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
public void onCheckedChanged(RadioGroup radioGroup, @IdRes int i){
|
||||
sex_str=i==R.id.reg_man?"男性":"女性";
|
||||
}
|
||||
private void insertData(SQLiteDatabase sqLiteDatabase, Bundle bundle){
|
||||
ContentValues contentValues = new ContentValues();
|
||||
contentValues.put("username",bundle.getString("reg_username"));
|
||||
contentValues.put("password",bundle.getString("reg_passward"));
|
||||
contentValues.put("sex", bundle.getString("sex"));
|
||||
sqLiteDatabase.insert("cz_user", null, contentValues);
|
||||
sqLiteDatabase.close();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package com.example.xc;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public class XcDatabase extends SQLiteOpenHelper {
|
||||
public XcDatabase(@Nullable Context context){
|
||||
super(context,"xc",null,1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(SQLiteDatabase db) {
|
||||
String sql = "create table xc_user(id integer primary key autoincrement, username varchar(50), password varchar(50),sex varchar(10))";
|
||||
db.execSQL(sql);
|
||||
}
|
||||
@Override
|
||||
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
|
||||
|
||||
}
|
||||
public void insertUser(SQLiteDatabase sqLiteDatabase, String username, String password, String sex) {
|
||||
ContentValues contentValues = new ContentValues();
|
||||
contentValues.put("username", username);
|
||||
contentValues.put("password", password);
|
||||
contentValues.put("sex", sex);
|
||||
sqLiteDatabase.insert("xc_user", null, contentValues);
|
||||
sqLiteDatabase.close();
|
||||
}
|
||||
public Bundle queryUserInfo(SQLiteDatabase sqLiteDatabase, Bundle bundle) {
|
||||
String username = bundle.getString("username");
|
||||
Cursor cursor = sqLiteDatabase.rawQuery("select * from xc_user where username=?", new String[]{username});
|
||||
if (cursor != null) {
|
||||
while (cursor.moveToNext()) {
|
||||
bundle.putString("sex", cursor.getString(3));
|
||||
}
|
||||
}
|
||||
cursor.close();
|
||||
sqLiteDatabase.close();
|
||||
return bundle;
|
||||
}
|
||||
}
|
||||
@ -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: 6.9 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 306 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 251 B |
|
After Width: | Height: | Size: 251 B |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 546 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
@ -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,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: 560 B |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 367 B |
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="ring"
|
||||
android:innerRadius="8dp"
|
||||
android:thickness="1dp"
|
||||
android:useLevel="false">
|
||||
|
||||
<solid android:color="@color/colorButton"/>
|
||||
|
||||
|
||||
</shape>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 286 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 919 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 32 KiB |