@ -0,0 +1,13 @@
|
||||
*.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
|
@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="11" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,519 @@
|
||||
<?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.DatabaseBrowserManager">
|
||||
<autoscroll-to-editor value="false" />
|
||||
<autoscroll-from-editor value="true" />
|
||||
<show-object-properties value="true" />
|
||||
<loaded-nodes />
|
||||
</component>
|
||||
<component name="DBNavigator.Project.DatabaseConsoleManager">
|
||||
<connection id="8a9c3935-a27a-4560-b6ea-17d5b119430a">
|
||||
<console name="Connection" type="STANDARD" schema="" session="Main" />
|
||||
</connection>
|
||||
</component>
|
||||
<component name="DBNavigator.Project.DatabaseEditorStateManager">
|
||||
<last-used-providers />
|
||||
</component>
|
||||
<component name="DBNavigator.Project.DatabaseFileManager">
|
||||
<open-files />
|
||||
</component>
|
||||
<component name="DBNavigator.Project.ObjectQuickFilterManager">
|
||||
<last-used-operator value="EQUAL" />
|
||||
<filters />
|
||||
</component>
|
||||
<component name="DBNavigator.Project.Settings">
|
||||
<connections>
|
||||
<connection id="8a9c3935-a27a-4560-b6ea-17d5b119430a" active="true" signed="true">
|
||||
<database>
|
||||
<name value="Connection" />
|
||||
<description value="" />
|
||||
<database-type value="SQLITE" />
|
||||
<config-type value="BASIC" />
|
||||
<database-version value="3.41" />
|
||||
<driver-source value="BUNDLED" />
|
||||
<driver-library value="" />
|
||||
<driver value="" />
|
||||
<url-type value="FILE" />
|
||||
<host value="" />
|
||||
<port value="" />
|
||||
<database value="" />
|
||||
<tns-folder value="" />
|
||||
<tns-profile value="" />
|
||||
<files>
|
||||
<file path="sqlite.db" schema="main" />
|
||||
</files>
|
||||
<type value="NONE" />
|
||||
<user value="" />
|
||||
<deprecated-pwd value="" />
|
||||
</database>
|
||||
<properties>
|
||||
<auto-commit value="false" />
|
||||
</properties>
|
||||
<ssh-settings>
|
||||
<active value="false" />
|
||||
<proxy-host value="" />
|
||||
<proxy-port value="22" />
|
||||
<proxy-user value="" />
|
||||
<deprecated-proxy-pwd value="" />
|
||||
<auth-type value="PASSWORD" />
|
||||
<key-file value="" />
|
||||
<key-passphrase value="" />
|
||||
</ssh-settings>
|
||||
<ssl-settings>
|
||||
<active value="false" />
|
||||
<certificate-authority-file value="" />
|
||||
<client-certificate-file value="" />
|
||||
<client-key-file value="" />
|
||||
</ssl-settings>
|
||||
<details>
|
||||
<charset value="UTF-8" />
|
||||
<session-management value="true" />
|
||||
<ddl-file-binding value="true" />
|
||||
<database-logging value="true" />
|
||||
<connect-automatically value="true" />
|
||||
<restore-workspace value="true" />
|
||||
<restore-workspace-deep value="false" />
|
||||
<environment-type value="default" />
|
||||
<connectivity-timeout value="30" />
|
||||
<idle-time-to-disconnect value="30" />
|
||||
<idle-time-to-disconnect-pool value="5" />
|
||||
<credential-expiry-time value="10" />
|
||||
<max-connection-pool-size value="7" />
|
||||
<alternative-statement-delimiter value="" />
|
||||
</details>
|
||||
<object-filters hide-empty-schemas="false" hide-pseudo-columns="false">
|
||||
<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>
|
||||
<object-name-filters />
|
||||
</object-filters>
|
||||
</connection>
|
||||
</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,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
|
||||
</project>
|
@ -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="jbr-11" />
|
||||
<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="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="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>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<file type="web" url="file://$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" 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,314 @@
|
||||
@startuml
|
||||
|
||||
title __GUOSHU34.APP's Class Diagram__\n
|
||||
|
||||
namespace com.example.lib {
|
||||
class com.example.lib.TCPServer {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.lib {
|
||||
class com.example.lib.TCPServer {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.BuildConfig {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.CustomVideoView {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.Data {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.DatabaseHelper {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.DescriptionActivity {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.FragmentFive {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.FragmentOne {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.FragmentThree {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.FragmentTwo {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.FrgmentFour {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.Infor {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.Main2Activity {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.Main3Activity {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.Main4Activity {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivity {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityorder {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt1 {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt1t {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt2 {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt2t {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt3 {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt3t {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt4 {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt4t {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt5 {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt5t {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt6t {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivitytxqym1 {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivitytxqym2 {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivitytxqym3 {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivitytypede {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityxqym {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityxzzffs {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityzfcg {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MianActivityset {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MianActivityxx {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MyPagerAdapter {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MyScrollView {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.UnScrollListView {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.WebActivity {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
com.example.myapplication.CustomVideoView -up-|> android.widget.VideoView
|
||||
com.example.myapplication.DatabaseHelper -up-|> android.database.sqlite.SQLiteOpenHelper
|
||||
com.example.myapplication.DescriptionActivity -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.FragmentFive -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.FragmentOne -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.FragmentThree -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.FragmentTwo -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.FrgmentFour .up.|> android.view.GestureDetector.OnGestureListener
|
||||
com.example.myapplication.FrgmentFour -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.Main2Activity .up.|> android.view.View.OnClickListener
|
||||
com.example.myapplication.Main2Activity -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.Main3Activity -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.Main4Activity -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.MainActivity .up.|> android.view.View.OnClickListener
|
||||
com.example.myapplication.MainActivity -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.MainActivityorder -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.MainActivityorder o-- com.example.myapplication.FragmentOne : oneFragment
|
||||
com.example.myapplication.MainActivityorder o-- com.example.myapplication.FragmentTwo : twoFragment
|
||||
com.example.myapplication.MainActivityt1 -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivityt1t -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivityt2 -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivityt2t -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivityt3 -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivityt3t -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivityt4 -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivityt4t -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivityt5 -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivityt5t -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivityt6t -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivitytxqym1 -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivitytxqym2 -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivitytxqym3 -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivitytypede -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.MainActivitytypede o-- com.example.myapplication.FragmentOne : oneFragment
|
||||
com.example.myapplication.MainActivitytypede o-- com.example.myapplication.FragmentTwo : twoFragment
|
||||
com.example.myapplication.MainActivityxqym -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.MainActivityxzzffs -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.MainActivityxzzffs o-- com.example.myapplication.FragmentOne : oneFragment
|
||||
com.example.myapplication.MainActivityxzzffs o-- com.example.myapplication.FragmentTwo : twoFragment
|
||||
com.example.myapplication.MainActivityzfcg -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.MainActivityzfcg o-- com.example.myapplication.FragmentOne : oneFragment
|
||||
com.example.myapplication.MainActivityzfcg o-- com.example.myapplication.FragmentTwo : twoFragment
|
||||
com.example.myapplication.MianActivityset -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.MianActivityxx -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.MyPagerAdapter -up-|> androidx.viewpager.widget.PagerAdapter
|
||||
com.example.myapplication.MyScrollView -up-|> android.widget.ScrollView
|
||||
com.example.myapplication.UnScrollListView -up-|> android.widget.ListView
|
||||
com.example.myapplication.WebActivity -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
|
||||
|
||||
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,37 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion "29.0.2"
|
||||
defaultConfig {
|
||||
applicationId "com.example.myapplicationloign"
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 29
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test:runner:1.2.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
implementation 'com.google.android.material:material:1.0.0'
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
implementation 'com.github.bumptech.glide:glide:4.3.1'
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.3.1'
|
||||
implementation 'net.lingala.zip4j:zip4j:1.3.2'
|
||||
implementation 'net.qiujuer.genius:ui:2.0.0-beta4'
|
||||
|
||||
|
||||
}
|
@ -0,0 +1 @@
|
||||
/build
|
@ -0,0 +1,8 @@
|
||||
plugins {
|
||||
id 'java-library'
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_7
|
||||
targetCompatibility = JavaVersion.VERSION_1_7
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
@startuml
|
||||
|
||||
title __LIB's Class Diagram__\n
|
||||
|
||||
namespace com.example.lib {
|
||||
class com.example.lib.TCPServer {
|
||||
{static} - PORT : int
|
||||
- mExecutorService : ExecutorService
|
||||
- mList : List<Socket>
|
||||
- server : ServerSocket
|
||||
+ TCPServer()
|
||||
{static} + main()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.lib {
|
||||
class com.example.lib.TCPServer.Service {
|
||||
- in : BufferedReader
|
||||
- msg : String
|
||||
- socket : Socket
|
||||
+ Service()
|
||||
+ run()
|
||||
+ sendmsg()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
com.example.lib.TCPServer +-down- com.example.lib.TCPServer.Service
|
||||
com.example.lib.TCPServer.Service .up.|> Runnable
|
||||
|
||||
|
||||
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,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,18 @@
|
||||
{
|
||||
"version": 2,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "com.example.myapplicationloign",
|
||||
"variantName": "processReleaseResources",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"versionCode": 1,
|
||||
"versionName": "1.0",
|
||||
"outputFile": "app-release.apk"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1 @@
|
||||
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
@ -0,0 +1,27 @@
|
||||
package com.example.myapplicationloign;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.test.InstrumentationRegistry;
|
||||
import androidx.test.runner.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.getTargetContext();
|
||||
|
||||
assertEquals("com.example.myapplicationloign", appContext.getPackageName());
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
@startuml
|
||||
|
||||
title __MYAPPLICATIONLOIGN's Class Diagram__\n
|
||||
|
||||
|
||||
|
||||
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,44 @@
|
||||
<?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.myapplication">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/tubiao"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/tubiao"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<meta-data
|
||||
android:name="com.google.android.actions"
|
||||
android:resource="@xml/border" />
|
||||
|
||||
<activity android:name=".Main4Activity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".MainActivityzfcg"/>
|
||||
<activity android:name=".MainActivityxzzffs" />
|
||||
<activity android:name=".Main2Activity" />
|
||||
<activity android:name=".MainActivity"></activity>
|
||||
<activity android:name=".MainActivityorder"></activity>
|
||||
<activity android:name=".MainActivitytypede"></activity>
|
||||
<activity android:name=".MainActivityxqym"></activity>
|
||||
<activity android:name=".MianActivityset"></activity>
|
||||
<activity android:name=".MianActivityxx"></activity>
|
||||
<activity android:name=".WebActivity"></activity>
|
||||
<activity android:name=".DescriptionActivity"/>
|
||||
<activity
|
||||
android:name=".Main3Activity" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -0,0 +1,42 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
import android.content.Context;
|
||||
import android.media.MediaPlayer;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.KeyEvent;
|
||||
import android.widget.VideoView;
|
||||
|
||||
/**
|
||||
* Created by DaQiE on 2017/2/20 0020.
|
||||
*/
|
||||
|
||||
public class CustomVideoView extends VideoView {
|
||||
public CustomVideoView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public CustomVideoView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public CustomVideoView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
//我们重新计算高度
|
||||
int width = getDefaultSize(0, widthMeasureSpec);
|
||||
int height = getDefaultSize(0, heightMeasureSpec);
|
||||
setMeasuredDimension(width, height);
|
||||
}
|
||||
@Override
|
||||
public void setOnPreparedListener(MediaPlayer.OnPreparedListener l) {
|
||||
super.setOnPreparedListener(l);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
}
|
@ -0,0 +1,113 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
public class Data{
|
||||
private static int a;
|
||||
private static int b;
|
||||
private static int c;
|
||||
private static int f;
|
||||
private static int g;
|
||||
|
||||
public static String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public static void setUsername(String username) {
|
||||
Data.username = username;
|
||||
}
|
||||
|
||||
private static String username;
|
||||
public static int getK() {
|
||||
return K;
|
||||
}
|
||||
|
||||
public static void setK(int k) {
|
||||
K = k;
|
||||
}
|
||||
|
||||
private static int K;
|
||||
|
||||
public static int getF() {
|
||||
return f;
|
||||
}
|
||||
|
||||
public static void setF(int f) {
|
||||
Data.f = f;
|
||||
}
|
||||
|
||||
public static int getG() {
|
||||
return g;
|
||||
}
|
||||
|
||||
public static void setG(int g) {
|
||||
Data.g = g;
|
||||
}
|
||||
|
||||
public static int getH() {
|
||||
return h;
|
||||
}
|
||||
|
||||
public static void setH(int h) {
|
||||
Data.h = h;
|
||||
}
|
||||
|
||||
public static int getI() {
|
||||
return i;
|
||||
}
|
||||
|
||||
public static void setI(int i) {
|
||||
Data.i = i;
|
||||
}
|
||||
|
||||
public static int getJ() {
|
||||
return j;
|
||||
}
|
||||
|
||||
public static void setJ(int j) {
|
||||
Data.j = j;
|
||||
}
|
||||
|
||||
private static int h;
|
||||
private static int i;
|
||||
private static int j;
|
||||
public static int getB() {
|
||||
return b;
|
||||
}
|
||||
|
||||
public static void setB(int b) {
|
||||
Data.b = b;
|
||||
}
|
||||
|
||||
public static int getC() {
|
||||
return c;
|
||||
}
|
||||
|
||||
public static void setC(int c) {
|
||||
Data.c = c;
|
||||
}
|
||||
|
||||
public static int getD() {
|
||||
return d;
|
||||
}
|
||||
|
||||
public static void setD(int d) {
|
||||
Data.d = d;
|
||||
}
|
||||
|
||||
public static int getE() {
|
||||
return e;
|
||||
}
|
||||
|
||||
public static void setE(int e) {
|
||||
Data.e = e;
|
||||
}
|
||||
|
||||
private static int d;
|
||||
private static int e;
|
||||
public static int getA() {
|
||||
return a;
|
||||
}
|
||||
|
||||
public static void setA(int a) {
|
||||
Data.a = a;
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
/**
|
||||
* Created by Administrator on 2019/10/30 0030.
|
||||
*/
|
||||
|
||||
public class DatabaseHelper extends SQLiteOpenHelper {
|
||||
private static final String DB_NAME="flowerDB2";//定义数据库名
|
||||
private static final String TABLE_NAME="tb_flower";//定义表名
|
||||
private static final String CREATE_TABLE="create table "+TABLE_NAME+"( _id integer primary key autoincrement,fname text,type text,info text)";//创建表
|
||||
//创建SQLiteDatabase实例
|
||||
private SQLiteDatabase db;
|
||||
//构造方法
|
||||
public DatabaseHelper(Context context){
|
||||
super(context,DB_NAME,null,1);
|
||||
}
|
||||
@Override
|
||||
public void onCreate(SQLiteDatabase sqLiteDatabase) {
|
||||
//实例化SQLiteDatabase
|
||||
db=sqLiteDatabase;
|
||||
//创建表
|
||||
db.execSQL(CREATE_TABLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {
|
||||
|
||||
}
|
||||
//添加数据
|
||||
public void insert(ContentValues values){
|
||||
//将数据库设置为可读写的
|
||||
db=getWritableDatabase();
|
||||
db.insert(TABLE_NAME,null,values);
|
||||
db.close();
|
||||
}
|
||||
//修改数据
|
||||
public void update(Infor infor){
|
||||
db=getWritableDatabase();
|
||||
//获得对象的属性
|
||||
ContentValues values=new ContentValues();
|
||||
values.put("type",infor.getContent());
|
||||
db.update(TABLE_NAME,values,"_id=?",new String[]{infor.getId()+""});
|
||||
db.close();
|
||||
}
|
||||
//删除数据
|
||||
public void del(int id){
|
||||
db=getWritableDatabase();
|
||||
db.delete(TABLE_NAME,"_id=?",new String[]{String.valueOf(id)});
|
||||
db.close();
|
||||
}
|
||||
//查询数据
|
||||
public Cursor query(){
|
||||
db=getWritableDatabase();
|
||||
Cursor cursor=db.query(TABLE_NAME,null,null,null,null,null,"_id desc");
|
||||
//db.close();
|
||||
return cursor;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,162 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.SimpleCursorAdapter;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.os.AsyncTask;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ListView;
|
||||
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class DescriptionActivity extends AppCompatActivity {
|
||||
ImageView iv_flowerB,fhj;
|
||||
TextView tv_flowerB,t_price;
|
||||
EditText et_name,et_type,et_info;
|
||||
ImageView t_sc,t_fx;
|
||||
Button jrgwc;
|
||||
int n;
|
||||
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_desc);
|
||||
iv_flowerB=(ImageView)findViewById(R.id.iv_flowerB);
|
||||
tv_flowerB=(TextView)findViewById(R.id.tv_descB);
|
||||
t_price=(TextView)findViewById(R.id.t_price);
|
||||
fhj=findViewById( R.id.fhj );
|
||||
Intent intent=getIntent();
|
||||
final int num=intent.getIntExtra("num",0);
|
||||
//声明数据
|
||||
int[] imageB={R.drawable.ta,R.drawable.t5,R.drawable.t3,R.drawable.t7,R.drawable.t6,R.drawable.v14,R.drawable.v13,R.drawable.v11,R.drawable.v5,R.drawable.v4,R.drawable.v7};
|
||||
String[] descB={"正宗极品李子","新鲜优质橘子","甘甜硬实草莓","进口速运菠萝","盆地川派西瓜","优质水生莴苣","绿色新鲜菠菜","新鲜速运茄子","优良种胡萝卜","极品丝瓜","完美蔬菜搭配"};
|
||||
String[] descM={"3.0","3.0","8.5","2.5","1.5","3.0","3.5","3.5","2.5","6.5","9.5"};
|
||||
iv_flowerB.setImageResource(imageB[num]);
|
||||
tv_flowerB.setText(descB[num]);
|
||||
t_price.setText( descM[num] );
|
||||
//查询所有的花信息
|
||||
DatabaseHelper helper=new DatabaseHelper(this);
|
||||
Cursor cursor=helper.query();
|
||||
//定义SimpleCursorAdapter
|
||||
// Collections.reverse();
|
||||
SimpleCursorAdapter simpleCursorAdapter=new SimpleCursorAdapter(this,R.layout.layouta,cursor,new String[]{"_id","info"},new int[]{R.id.infor_name,R.id.infor_content},0);
|
||||
|
||||
fhj.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v){
|
||||
finish();
|
||||
}
|
||||
} );
|
||||
t_sc=findViewById( R.id.t_sc );
|
||||
t_fx=findViewById( R.id.t_fx );
|
||||
jrgwc=findViewById( R.id.jrgwc );
|
||||
t_sc.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
n++;
|
||||
if (n % 2 == 1) {
|
||||
t_sc.setBackgroundResource( R.drawable.sctbd );
|
||||
Toast.makeText( getBaseContext(), "已收藏!", Toast.LENGTH_SHORT ).show();
|
||||
}else{
|
||||
t_sc.setBackgroundResource( R.drawable.sctb );
|
||||
Toast.makeText( getBaseContext(), "取消收藏!", Toast.LENGTH_SHORT ).show();
|
||||
}
|
||||
}
|
||||
} );
|
||||
t_fx.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Toast.makeText( getBaseContext(),"已分享!",Toast.LENGTH_SHORT ).show();
|
||||
}
|
||||
} );
|
||||
jrgwc.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(num==0)
|
||||
Data.setA( 11 );
|
||||
if(num==1)
|
||||
Data.setB(num);
|
||||
if (num==2)
|
||||
Data.setC( num );
|
||||
if (num==3)
|
||||
Data.setD( num );
|
||||
if (num==4)
|
||||
Data.setE( num );
|
||||
if (num==5)
|
||||
Data.setF( num );
|
||||
if (num==6)
|
||||
Data.setG( num );
|
||||
if (num==7)
|
||||
Data.setH( num );
|
||||
if (num==8)
|
||||
Data.setI( num );
|
||||
if (num==9)
|
||||
Data.setJ( num );
|
||||
if (num==10)
|
||||
Data.setK( num );
|
||||
Toast.makeText( getBaseContext(),"已加入购物车!",Toast.LENGTH_SHORT ).show();
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0){
|
||||
|
||||
//这里重写返回键
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
public void showdialog(View view) {
|
||||
//Toast.makeText(this,"clickme",Toast.LENGTH_LONG).show();
|
||||
AlertDialog.Builder alertdialogbuilder=new AlertDialog.Builder(this);
|
||||
alertdialogbuilder.setIcon( R.drawable.tubiao);
|
||||
alertdialogbuilder.setTitle( "提示:" );
|
||||
alertdialogbuilder.setMessage("您已选择该商品,是否购买?");
|
||||
alertdialogbuilder.setPositiveButton("确定", click1);
|
||||
alertdialogbuilder.setNegativeButton("取消", click2);
|
||||
AlertDialog alertdialog1=alertdialogbuilder.create();
|
||||
alertdialog1.show();
|
||||
}
|
||||
private DialogInterface.OnClickListener click1= new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
Intent intent=new Intent(DescriptionActivity.this,MainActivityxzzffs.class);
|
||||
startActivity( intent );
|
||||
dialog.cancel();
|
||||
}
|
||||
};
|
||||
private DialogInterface.OnClickListener click2= new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.cancel();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Layout;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
public class FragmentOne extends Fragment {
|
||||
LinearLayout layout1,layout2;
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate( R.layout.activity_main22, container, false );
|
||||
return view;
|
||||
|
||||
}
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated( savedInstanceState );
|
||||
layout1 = getActivity().findViewById( R.id.layout1 );
|
||||
layout2 = getActivity().findViewById( R.id.layout2 );
|
||||
layout1.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent= new Intent(getActivity(), MainActivitytypede.class);
|
||||
startActivity( intent );
|
||||
}
|
||||
} );
|
||||
layout2.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent= new Intent(getActivity(), MainActivitytypede.class);
|
||||
startActivity( intent );
|
||||
}
|
||||
} );
|
||||
}
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
import android.app.UiModeManager;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.Switch;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
|
||||
|
||||
public class FragmentThree extends Fragment {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view=inflater.inflate( R.layout.activity_main2,container,false);
|
||||
return view;
|
||||
}
|
||||
ImageButton ibu1,ibu2;
|
||||
ImageView imgtx,i_sz,i_xx;
|
||||
Switch switch1,switch2;
|
||||
boolean blFlag=false;
|
||||
Button qq,wx;
|
||||
TextView t_username,t_ljlq;
|
||||
LinearLayout lay;
|
||||
private UiModeManager mUiModeManager = null;
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated( savedInstanceState );
|
||||
imgtx = getActivity().findViewById( R.id.imgtx );
|
||||
t_username = getActivity().findViewById( R.id.t_username );
|
||||
lay = getActivity().findViewById( R.id.lay1 );
|
||||
t_ljlq = getActivity().findViewById( R.id.t_ljlq );
|
||||
i_sz = getActivity().findViewById( R.id.i_sz );
|
||||
i_xx = getActivity().findViewById( R.id.i_xx );
|
||||
|
||||
if (Data.getUsername() == null){
|
||||
t_username.setText( "请登录!" );
|
||||
}else {
|
||||
t_username.setText( Data.getUsername() );
|
||||
}
|
||||
i_xx.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent( getActivity(),MianActivityxx.class );
|
||||
startActivity( intent );
|
||||
}
|
||||
} );
|
||||
i_sz.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent( getActivity(),MianActivityset.class );
|
||||
Bundle bundle = new Bundle();
|
||||
String s = getActivity().getIntent().getStringExtra("username");
|
||||
bundle.putString("username", s);
|
||||
intent.putExtras(bundle);
|
||||
startActivity( intent );
|
||||
}
|
||||
} );
|
||||
t_ljlq.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Toast.makeText( getContext(),"领取成功",Toast.LENGTH_SHORT ).show();
|
||||
}
|
||||
} );
|
||||
lay.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent( getActivity(),MainActivityorder.class );
|
||||
startActivity( intent );
|
||||
}
|
||||
} );
|
||||
imgtx.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent( getActivity(),MainActivity.class );
|
||||
startActivity( intent );
|
||||
}
|
||||
} );
|
||||
t_username.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent( getActivity(),MainActivity.class );
|
||||
startActivity( intent );
|
||||
}
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
}
|
||||
}
|
@ -0,0 +1,323 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewParent;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.SimpleAdapter;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.viewpager.widget.PagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class FragmentTwo extends Fragment {
|
||||
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view=inflater.inflate( R.layout.activity_loginok,container,false);
|
||||
return view;
|
||||
}
|
||||
ListView list;
|
||||
TextView tv_login;
|
||||
ImageView iM_liz,i_tb;
|
||||
ImageButton ibu1,ibu3;
|
||||
private LinearLayout ll_dots;
|
||||
private TextView viewpager_tv;
|
||||
|
||||
// 将ViewPager定义为全局变量,方便使用.
|
||||
private ViewPager viewpager_vp;
|
||||
|
||||
// 建立一个ArrayList集合.泛型指定为ImageView.
|
||||
ArrayList<ImageView> imageViews = new ArrayList<ImageView>();
|
||||
public void onActivityCreated(Bundle savedlnstanceState){
|
||||
super.onActivityCreated( savedlnstanceState );
|
||||
init();
|
||||
ibu1=getActivity().findViewById( R.id.ibu1 );
|
||||
ibu3=getActivity().findViewById( R.id.ibu3 );
|
||||
list=getActivity().findViewById( R.id.list );
|
||||
iM_liz=getActivity().findViewById( R.id.iM_liz );
|
||||
i_tb=getActivity().findViewById( R.id.i_tb );
|
||||
i_tb.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent( getActivity(),MianActivityset.class );
|
||||
startActivity( intent );
|
||||
}
|
||||
} );
|
||||
|
||||
iM_liz.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent( getActivity(),MainActivityxqym.class );
|
||||
startActivity( intent );
|
||||
}
|
||||
} );
|
||||
//构建SimpleAdapter
|
||||
|
||||
String []title={"正宗极品李子","新鲜优质橘子","甘甜硬实草莓","进口速运菠萝","盆地川派西瓜","优质水生莴苣","绿色新鲜菠菜","新鲜速运茄子","优良种胡萝卜","极品丝瓜","完美蔬菜搭配"};
|
||||
String []desc={"¥3.0元/斤","¥3.0元/斤","¥8.5元/斤","¥2.5元/斤","¥1.5元/斤","¥3.0元/斤","¥3.5元/斤","¥3.5元/斤","¥2.5元/斤","¥6.5元/斤","¥9.0元/斤"};
|
||||
String []num={"已售1.5万件","已售1.6万件","已售1.3万件","已售1.9万件","已售2.1万件","已售1.8万件","已售3.5万件","已售0.5万件","已售3.3万件","已售2.6万件","已售1.3万件"};
|
||||
int [] img={R.drawable.ta,R.drawable.t5,R.drawable.t3,R.drawable.t7,R.drawable.t6,R.drawable.v14,R.drawable.v13,R.drawable.v11,R.drawable.v5,R.drawable.v4,R.drawable.v7};
|
||||
List<Map<String,Object>> listltems=new ArrayList<Map<String,Object>>();
|
||||
for (int i=0;i<title.length;i++){
|
||||
Map<String,Object>item=new HashMap<String,Object>( );
|
||||
item.put( "title",title[i] );
|
||||
item.put( "desc",desc[i]);
|
||||
item.put( "num",num[i] );
|
||||
item.put("img",img[i]);
|
||||
listltems.add( item );
|
||||
}
|
||||
SimpleAdapter simpleAdapter=new SimpleAdapter( getContext(),listltems,R.layout.layout,new String[]{"title","desc","num","img"},new int[]{R.id.tv_title,R.id.tv_desc,R.id.tv_num,R.id.iv_flower} );
|
||||
//设置适配器
|
||||
list.setAdapter( simpleAdapter );
|
||||
//给ListView添加事件处理
|
||||
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
Intent intent=new Intent(getContext(), DescriptionActivity.class);
|
||||
intent.putExtra("num",i);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
list.setFocusable(false);
|
||||
}
|
||||
//创建一个handler对象,复写handlerMessage方法,用switch方法,通过msg.what得到标识.333
|
||||
private Handler handler = new Handler() {
|
||||
public void handleMessage(Message msg) {
|
||||
switch (msg.what) {
|
||||
case 1:
|
||||
//得到当前VIewPager和用户交互的item条目.VIewPager对象.getCurrentItem 333
|
||||
int currentItem = viewpager_vp.getCurrentItem();
|
||||
//设置ViewPager当前显示的界面,得到的ITem+1
|
||||
viewpager_vp.setCurrentItem(currentItem + 1);
|
||||
//通过静态方法sendEmptyMessageDelayed,延时重复执行命令.注意不是sendEmptyMessageAtTime 333
|
||||
sendEmptyMessageDelayed(1, 3000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
//图片int数组资源
|
||||
private int[] imageResIds = {R.drawable.a, R.drawable.b, R.drawable.c, R.drawable.d, R.drawable.e, R.drawable.f};
|
||||
|
||||
//图片字符串数组String[]资源.
|
||||
private String[] descs = {
|
||||
"爱果蔬初次营业线上特价",
|
||||
"无污染的水果蔬菜等着你来",
|
||||
"新鲜丰富的种类任你挑选",
|
||||
"APP内所有商品一律正品 全程监督",
|
||||
"从下种到收获再到你家一路绿灯",
|
||||
"丰收的果实全天候紧急配送"
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 对VIewPager进行初始化.
|
||||
*/
|
||||
private void init() {
|
||||
//找到可以设置点的容器LinearLayout的对象,进行点的添加
|
||||
ll_dots = (LinearLayout) getActivity().findViewById(R.id.ll_dots);
|
||||
//找到文本的对象.
|
||||
viewpager_tv = (TextView) getActivity().findViewById(R.id.viewpager_tv);
|
||||
//找到VIewPager对象.
|
||||
viewpager_vp = (ViewPager) getActivity().findViewById( R.id.viewpager_vp );
|
||||
|
||||
//更加图片int数组资源的数量,动态的创建ImageView控件.就是有几张图片,创建几个ImageView,for循环
|
||||
for (int x = 0; x < imageResIds.length; x++) {
|
||||
//创建ImageView对象
|
||||
ImageView imageView = new ImageView(getActivity());
|
||||
//通过该对象添加图片资源.setBackgroundResource方法.
|
||||
imageView.setBackgroundResource(imageResIds[x]);
|
||||
//把控件添加到集合ImageViews中去,以方便在VIewPager的适配器里instantiateItem方法获取.
|
||||
imageViews.add(imageView);
|
||||
//进行点的添加,其个数和图片的个数一致,因此放到该循环中.222
|
||||
dot();
|
||||
}
|
||||
|
||||
//设置适配器.setAdapter
|
||||
viewpager_vp.setAdapter(new Myadapter());
|
||||
//设置ViewPager的滑动监听器,addOnPageChangeListener,set的方法因为名字的原因被淘汰了,在onPageScrolled中.222
|
||||
viewpager_vp.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||
|
||||
|
||||
@Override
|
||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||
//同过getCurrentItem方法拿到当前用户所交互ViewPager的item位置.
|
||||
int currentItem = viewpager_vp.getCurrentItem();
|
||||
//通过得到的这个item,给text和点进行选中的设置.
|
||||
changeTextAndDot(currentItem % imageResIds.length);
|
||||
Log.d("aaa", "onPageScrolled: Position-" + position + " positionOffset-" + positionOffset + " positionOffsetPixels-" + positionOffsetPixels);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
Log.d("aaa", "onPageSelected: position" + position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int state) {
|
||||
Log.d("aaa", "onPageScrollStateChanged: state" + state);
|
||||
}
|
||||
});
|
||||
//指定VIewPager默认跳转到某页.一般是最大数的一般.setCurrentItem就是设置VIewPager跳到哪页,get是获取.333
|
||||
viewpager_vp.setCurrentItem(Integer.MAX_VALUE / 2 - 3);
|
||||
|
||||
//通过handler,3秒后开始循环ViwePager的item.sendEmptyMessageDelayed,333
|
||||
handler.sendEmptyMessageDelayed(1, 3000);
|
||||
//设置VIewPager的触摸事件.最后抽成方法.333
|
||||
ViewPagerTouchEvent();
|
||||
}
|
||||
|
||||
/**
|
||||
* 注意:看一个方法或类的信息快捷键:Ctrl+Q;
|
||||
* 像ListVIew一样,创建一个ViewPager的适配器,自定义一个类继承PagerAdapter
|
||||
*/
|
||||
private class Myadapter extends PagerAdapter {
|
||||
//getContent,设置ViewPager的条目个数.一般就是集合或者资源数组的长度.
|
||||
@Override
|
||||
public int getCount() {
|
||||
//把返回的条目设置为无限大.333
|
||||
//注意:一般和获取ViewPager当前选中的是第几页有关的都要改为position(当前页数)%list.size()(取余数),你就看哪报错,根据报错改333
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
|
||||
//isViewFromObject,判断ViewPager的条目View对象和InstantiateItem返回的Object对象是否一致,固定格式:return view==object;
|
||||
@Override
|
||||
public boolean isViewFromObject(View view, Object object) {
|
||||
return view == object;
|
||||
}
|
||||
|
||||
//Ctrl+H:看到一个类的基础结构图 ctrl+h+l:快速格式化.
|
||||
//instantiateItem,ViewPager添加条目的操作.container:VIewPager的化身,控件都是添加到他身上,position:代表用户滑动条目的位置
|
||||
@Override
|
||||
public Object instantiateItem(ViewGroup container, int position) {
|
||||
//根据条目所在位置(利用Position),从ImageViews集合里获取相对应的ImageVIew图片.
|
||||
ImageView imageView = imageViews.get(position % imageResIds.length);
|
||||
//把得到ImageView对象,添加给VIewPager对象,也就是container,使用addView
|
||||
container.addView(imageView);
|
||||
//注意:你添加给VIewPager什么控件,就要返回该控件,给isViewFromObject进行比较判断,这里添加的是ImageView,返回的就是ImageView
|
||||
return imageView;
|
||||
}
|
||||
|
||||
//防止内存泄漏.相当于ListView的复用container,销毁一个page,该方法的实际就是将instantiateItem返回的VIew对象从ViewPager中移除,
|
||||
//container:还是ViewPager控件自身 position: object:则代表了View控件,使用时要强转成View一下
|
||||
//补充:为什么参数是Object,而不直接是View,因为虽然99%是view,但也有可能是Fragment,所以用Object,提高了可扩展性.
|
||||
@Override
|
||||
public void destroyItem(ViewGroup container, int position, Object object) {
|
||||
//构造方法删除后,也是固定格式:container.removeView((View) object);
|
||||
container.removeView((View) object);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 更加图片资源的数量,动态的创建点222
|
||||
*/
|
||||
public void dot() {
|
||||
//创建一个View对象;
|
||||
View view = new View(getActivity());
|
||||
//为这个View对象设置背景setBackgroundResource
|
||||
view.setBackgroundResource(R.drawable.dot_normal);
|
||||
//为View对象设置宽高参数,使用参数对象LayoutParams(int,int),给哪个容器,就用哪个容器创建
|
||||
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(8, 8);
|
||||
//使用参数对象LayoutParams.leftMargin=int,相当于布局里的padding.
|
||||
layoutParams.leftMargin = 8;
|
||||
//把准备好的layoutParams参数对象,设置给View对象.setLayoutParams
|
||||
view.setLayoutParams(layoutParams);
|
||||
//最后容器对象.addView(VIwe);
|
||||
ll_dots.addView(view);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据ViewPager的item的变化,也就是图片切换的操作,设置对应的点和文本.222
|
||||
*
|
||||
* @param position int ViewPager的item,也是图片的位置
|
||||
*/
|
||||
public void changeTextAndDot(int position) {
|
||||
//根据ViewPager的item的变化,设置对应的文本.setText(descs[position]);
|
||||
viewpager_tv.setText(descs[position]);
|
||||
//对点进行判断是否是当前页的点,用for循环,拿到所有点的位置,然后和position对比
|
||||
for (int x = 0; x < imageResIds.length; x++) {
|
||||
//.getChildAt(x);拿到容器的子控件.得到VIew对象
|
||||
View childAt = ll_dots.getChildAt(x);
|
||||
//为View设置背景图片,,使用三元运算符.
|
||||
childAt.setBackgroundResource(x == position ? R.drawable.dot_focus : R.drawable.dot_normal);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 该方法主要设置VIewPager的触摸事件,实现用户的触摸时,不再自动播放.switch中motionEvent.getActivity.333
|
||||
* 另一种实现的思路,是在ViewPager监听事件里面,对ViewPager的状态进行判断.闲置-滑动,和用户交互中-移除滑动.
|
||||
* public void onPageScrollStateChanged(int state) {
|
||||
* //当滑动状态发生改变的时候,手动滑动的时候,不能进行界面切换操作
|
||||
* //SCROLL_STATE_IDLE : 空闲状态
|
||||
* if (state == ViewPager.SCROLL_STATE_IDLE) {
|
||||
* //自动切换界面
|
||||
* handler.sendEmptyMessageDelayed(VIEWPAGER_SWITCH_PAGE, 3000);
|
||||
* }else{
|
||||
* //停止自动切换
|
||||
* //停止界面切换操作
|
||||
* handler.removeMessages(VIEWPAGER_SWITCH_PAGE);
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
public void ViewPagerTouchEvent() {
|
||||
viewpager_vp.setOnTouchListener(new View.OnTouchListener() {
|
||||
@Override
|
||||
public boolean onTouch(View view, MotionEvent motionEvent) {
|
||||
switch (motionEvent.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
//当时MotionEvent.ACTION_DOWN和ACTION_MOVE,就移除handler发送的message.removeMessages.333
|
||||
handler.removeMessages(1);
|
||||
break;
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
handler.removeMessages(1);
|
||||
break;
|
||||
//当用户手松开时ACTION_UP,就继续使用sendEmptyMessageDelayed发送handler的消息.333
|
||||
case MotionEvent.ACTION_UP:
|
||||
handler.sendEmptyMessageDelayed(1, 3000);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
handler.removeMessages(1);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,161 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.media.MediaMetadataRetriever;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.MediaController;
|
||||
import android.widget.TextView;
|
||||
import android.widget.VideoView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Formatter;
|
||||
import java.util.Locale;
|
||||
|
||||
|
||||
public class FrgmentFour extends Fragment implements android.view.GestureDetector.OnGestureListener {
|
||||
private VideoView videoView,videoView1,videoView2;
|
||||
private Button btn_start,btn_end;
|
||||
private MediaController mediaController;
|
||||
private ImageView img;
|
||||
private TextView t_gd;
|
||||
int n;
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view=inflater.inflate( R.layout.activity_maindynamic,container,false);
|
||||
return view;
|
||||
}
|
||||
|
||||
public void onActivityCreated(Bundle savedlnstanceState) {
|
||||
super.onActivityCreated( savedlnstanceState );
|
||||
t_gd=getActivity().findViewById( R.id.t_gd );
|
||||
videoView = (VideoView) getActivity().findViewById( R.id.videoView );
|
||||
videoView1 = (VideoView) getActivity().findViewById( R.id.videoView1 );
|
||||
videoView2 = (VideoView) getActivity().findViewById( R.id.videoView2 );
|
||||
init();
|
||||
init1();
|
||||
init2();
|
||||
t_gd.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent();
|
||||
intent.setAction("android.intent.action.VIEW");
|
||||
Uri content_url = Uri.parse("http://www.cnblogs.com");
|
||||
intent.setData(content_url);
|
||||
intent.setClass(getActivity(),WebActivity.class);
|
||||
startActivity( intent );
|
||||
}
|
||||
} );
|
||||
|
||||
|
||||
/**
|
||||
* MediaMetadataRetriever class provides a unified interface for retrieving
|
||||
* frame and meta data from an input media file.
|
||||
*/
|
||||
videoView.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
init();
|
||||
}
|
||||
} );
|
||||
videoView1.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
init1();
|
||||
}
|
||||
} );
|
||||
videoView2.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
init2();
|
||||
}
|
||||
} );
|
||||
SimpleDateFormat simpleDateFormat=new SimpleDateFormat( "ss" );
|
||||
|
||||
}
|
||||
|
||||
private void init() {
|
||||
videoView = (VideoView) getActivity().findViewById(R.id.videoView);
|
||||
mediaController = new MediaController(getContext());
|
||||
String uri = "android.resource://" + getActivity().getPackageName() + "/" + R.raw.ass;
|
||||
videoView.setVideoURI(Uri.parse(uri));
|
||||
videoView.setMediaController(mediaController);
|
||||
mediaController.setMediaPlayer(videoView);
|
||||
videoView.requestFocus();
|
||||
videoView.start();
|
||||
}
|
||||
private void init1() {
|
||||
videoView1 = (VideoView) getActivity().findViewById(R.id.videoView1);
|
||||
mediaController = new MediaController(getContext());
|
||||
String uri = "android.resource://" + getActivity().getPackageName() + "/" + R.raw.ass1;
|
||||
videoView1.setVideoURI(Uri.parse(uri));
|
||||
videoView1.setMediaController(mediaController);
|
||||
mediaController.setMediaPlayer(videoView1);
|
||||
videoView1.requestFocus();
|
||||
videoView1.start();
|
||||
}
|
||||
private void init2() {
|
||||
videoView2 = (VideoView) getActivity().findViewById(R.id.videoView2);
|
||||
|
||||
mediaController = new MediaController(getContext());
|
||||
String uri = "android.resource://" + getActivity().getPackageName() + "/" + R.raw.ass2;
|
||||
videoView2.setVideoURI(Uri.parse(uri));
|
||||
videoView2.setMediaController(mediaController);
|
||||
mediaController.setMediaPlayer(videoView2);
|
||||
videoView2.requestFocus();
|
||||
videoView2.start();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onDown(MotionEvent e) {
|
||||
videoView.pause();
|
||||
videoView1.pause();
|
||||
videoView2.pause();
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShowPress(MotionEvent e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onSingleTapUp(MotionEvent e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
|
||||
videoView.pause();
|
||||
videoView1.pause();
|
||||
videoView2.pause();
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLongPress(MotionEvent e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
public class Infor {
|
||||
int id;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
String name;
|
||||
String content;
|
||||
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class Main2Activity extends AppCompatActivity implements View.OnClickListener {
|
||||
Button b3;
|
||||
TextView et3,et4,et5;
|
||||
boolean t;
|
||||
ImageView qxzc;
|
||||
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
//设置当前页面的布局
|
||||
setContentView(R.layout.activity_event_detail);
|
||||
//初始化组件
|
||||
b3 = (Button) findViewById(R.id.bt3);
|
||||
et3 = (EditText)findViewById(R.id.et3);
|
||||
et4 = (EditText)findViewById(R.id.et4);
|
||||
et5 = (EditText)findViewById(R.id.et5);
|
||||
qxzc=findViewById( R.id.qxzc );
|
||||
qxzc.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
} );
|
||||
b3.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
String res3=et3.getText().toString();
|
||||
String res4=et4.getText().toString();
|
||||
String res5=et5.getText().toString();
|
||||
SharedPreferences sp=getSharedPreferences("loginInfo", MODE_PRIVATE);
|
||||
t=sp.contains(res3);
|
||||
if (res3.equals("")) {
|
||||
Toast.makeText( Main2Activity.this, "注册失败!用户名不能为空", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
else if(res4.equals("")&&res5.equals("")) {
|
||||
Toast.makeText(getApplicationContext(), "注册失败!密码不能为空!", Toast.LENGTH_SHORT).show();
|
||||
|
||||
}else if (!res4.equals(res5)) {
|
||||
Toast.makeText(getApplicationContext(), "注册失败!密码不一致!", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
else if (t==true) {
|
||||
Toast.makeText(getApplicationContext(), "注册失败!用户名已存在!", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getApplicationContext(), "注册成功", Toast.LENGTH_SHORT).show();
|
||||
SharedPreferences.Editor editor=sp.edit();
|
||||
editor.putString(res3, res4);
|
||||
editor.commit();
|
||||
Intent intent = new Intent();
|
||||
intent.setClass(Main2Activity.this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,171 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.RadioGroup;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Main3Activity extends AppCompatActivity {
|
||||
ImageButton home,type,me,dynamic,shopcar;
|
||||
private RadioGroup radioGroup;
|
||||
ViewPager pager;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main3);
|
||||
home=findViewById(R.id.ibu1);
|
||||
type=findViewById(R.id.ibu2);
|
||||
me=findViewById(R.id.ibu5);
|
||||
dynamic=findViewById( R.id.ibu3 );
|
||||
shopcar=findViewById( R.id.ibu4 );
|
||||
|
||||
String s = Data.getUsername();
|
||||
if (s==null) {
|
||||
Fragment two = new FragmentTwo();
|
||||
//实例化管理器
|
||||
FragmentManager fm = getSupportFragmentManager();
|
||||
//定义事务
|
||||
FragmentTransaction ft = fm.beginTransaction();
|
||||
//将当前的fragment替换为第二个
|
||||
ft.add(R.id.fag6,two);
|
||||
//提交事务
|
||||
ft.commit();
|
||||
me.setBackgroundResource(R.drawable.wd);
|
||||
home.setBackgroundResource(R.drawable.syd);
|
||||
type.setBackgroundResource(R.drawable.gd);
|
||||
dynamic.setBackgroundResource(R.drawable.fx);
|
||||
shopcar.setBackgroundResource( R.drawable.gwc );
|
||||
}
|
||||
else {
|
||||
Fragment three = new FragmentThree();
|
||||
//实例化管理器
|
||||
FragmentManager fm = getSupportFragmentManager();
|
||||
//定义事务
|
||||
FragmentTransaction ft = fm.beginTransaction();
|
||||
//将当前的fragment替换为第二个
|
||||
ft.replace(R.id.fag6, three);
|
||||
//提交事务
|
||||
ft.commit();
|
||||
home.setBackgroundResource(R.drawable.sy);
|
||||
type.setBackgroundResource(R.drawable.gd);
|
||||
dynamic.setBackgroundResource( R.drawable.fx );
|
||||
shopcar.setBackgroundResource( R.drawable.gwc );
|
||||
me.setBackgroundResource(R.drawable.wdd);
|
||||
}
|
||||
|
||||
|
||||
home.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
//实例化fragment
|
||||
Fragment two = new FragmentTwo();
|
||||
//实例化管理器
|
||||
FragmentManager fm = getSupportFragmentManager();
|
||||
//定义事务
|
||||
FragmentTransaction ft = fm.beginTransaction();
|
||||
//添加fragment
|
||||
ft.replace(R.id.fag6, two);
|
||||
//提交事务
|
||||
ft.commit();
|
||||
type.setBackgroundResource(R.drawable.gd);
|
||||
me.setBackgroundResource(R.drawable.wd);
|
||||
dynamic.setBackgroundResource( R.drawable.fx);
|
||||
shopcar.setBackgroundResource( R.drawable.gwc );
|
||||
home.setBackgroundResource(R.drawable.syd);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
type.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Fragment one = new FragmentOne();
|
||||
//实例化管理器
|
||||
FragmentManager fm = getSupportFragmentManager();
|
||||
//定义事务
|
||||
FragmentTransaction ft = fm.beginTransaction();
|
||||
//将当前的fragment替换为第二个
|
||||
ft.replace(R.id.fag6, one);
|
||||
//提交事务
|
||||
ft.commit();
|
||||
me.setBackgroundResource(R.drawable.wd);
|
||||
home.setBackgroundResource(R.drawable.sy);
|
||||
dynamic.setBackgroundResource( R.drawable.fx);
|
||||
shopcar.setBackgroundResource( R.drawable.gwc );
|
||||
type.setBackgroundResource(R.drawable.gdd);
|
||||
}
|
||||
});
|
||||
me.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
//实例化fragment
|
||||
Fragment three = new FragmentThree();
|
||||
//实例化管理器
|
||||
FragmentManager fm = getSupportFragmentManager();
|
||||
//定义事务
|
||||
FragmentTransaction ft = fm.beginTransaction();
|
||||
//将当前的fragment替换为第二个
|
||||
ft.replace(R.id.fag6, three);
|
||||
//提交事务
|
||||
ft.commit();
|
||||
home.setBackgroundResource(R.drawable.sy);
|
||||
type.setBackgroundResource(R.drawable.gd);
|
||||
dynamic.setBackgroundResource( R.drawable.fx );
|
||||
shopcar.setBackgroundResource( R.drawable.gwc );
|
||||
me.setBackgroundResource(R.drawable.wdd);
|
||||
}
|
||||
});
|
||||
dynamic.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
//实例化fragment
|
||||
Fragment four = new FrgmentFour();
|
||||
//实例化管理器
|
||||
FragmentManager fm = getSupportFragmentManager();
|
||||
//定义事务
|
||||
FragmentTransaction ft = fm.beginTransaction();
|
||||
//将当前的fragment替换为第二个
|
||||
ft.replace(R.id.fag6, four);
|
||||
//提交事务
|
||||
ft.commit();
|
||||
home.setBackgroundResource(R.drawable.sy);
|
||||
type.setBackgroundResource(R.drawable.gd);
|
||||
me.setBackgroundResource(R.drawable.wd);
|
||||
shopcar.setBackgroundResource( R.drawable.gwc );
|
||||
dynamic.setBackgroundResource( R.drawable.fxd );
|
||||
}
|
||||
});
|
||||
shopcar.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
//实例化fragment
|
||||
Fragment five = new FragmentFive();
|
||||
//实例化管理器
|
||||
FragmentManager fm = getSupportFragmentManager();
|
||||
//定义事务
|
||||
FragmentTransaction ft = fm.beginTransaction();
|
||||
//将当前的fragment替换为第二个
|
||||
ft.replace(R.id.fag6, five);
|
||||
//提交事务
|
||||
ft.commit();
|
||||
home.setBackgroundResource(R.drawable.sy);
|
||||
type.setBackgroundResource(R.drawable.gd);
|
||||
me.setBackgroundResource(R.drawable.wd);
|
||||
dynamic.setBackgroundResource( R.drawable.fx );
|
||||
shopcar.setBackgroundResource( R.drawable.gwcd );
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.provider.MediaStore;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.MediaController;
|
||||
import android.widget.TextView;
|
||||
import android.widget.VideoView;
|
||||
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.VideoView;
|
||||
|
||||
public class Main4Activity extends AppCompatActivity {
|
||||
TextView m_text;
|
||||
VideoView videoViewq;
|
||||
private MediaController mediaController;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate( savedInstanceState );
|
||||
setContentView( R.layout.activity_main4 );
|
||||
videoViewq=findViewById( R.id.videoViewq );
|
||||
m_text=findViewById( R.id.m_text );
|
||||
init2();
|
||||
final Intent intent = new Intent(this, Main3Activity.class);
|
||||
|
||||
final Timer timer = new Timer();
|
||||
|
||||
TimerTask task = new TimerTask() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
startActivity(intent);
|
||||
finish(); //执行
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
timer.schedule(task, 1000 * 15); //15秒后
|
||||
m_text.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
startActivity(intent);
|
||||
timer.cancel();
|
||||
finish();
|
||||
}
|
||||
} );
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
|
||||
|
||||
}
|
||||
private void init2() {
|
||||
videoViewq = (VideoView) findViewById(R.id.videoViewq);
|
||||
|
||||
mediaController = new MediaController(this);
|
||||
String uri = "android.resource://" + getPackageName() + "/" + R.raw.qdy;
|
||||
videoViewq.setVideoURI( Uri.parse(uri));
|
||||
videoViewq.requestFocus();
|
||||
videoViewq.start();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public boolean onDown(MotionEvent e) {
|
||||
videoViewq.pause();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public void onShowPress(MotionEvent e) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public boolean onSingleTapUp(MotionEvent e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
|
||||
videoViewq.pause();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public void onLongPress(MotionEvent e) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,123 @@
|
||||
package com.example.myapplication;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
|
||||
//声明组件
|
||||
|
||||
Button b1,b2;
|
||||
EditText et1,et2,et3,t1,t2;
|
||||
EditText et_name;
|
||||
CheckBox cb;
|
||||
boolean a;
|
||||
ImageView qxdl;
|
||||
private String res1,res2,res3,res4, res6,res7;
|
||||
|
||||
@SuppressLint("ResourceType")
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
//设置当前页面的布局
|
||||
setContentView(R.layout.activity_main);
|
||||
//初始化组件
|
||||
b1 = (Button) findViewById(R.id.b1);
|
||||
b2 = (Button) findViewById(R.id.b2);
|
||||
et_name=findViewById(R.id.et1);
|
||||
et1=(EditText)findViewById(R.id.et1);
|
||||
et2=(EditText)findViewById(R.id.et2);
|
||||
cb=(CheckBox)findViewById(R.id.cb);
|
||||
qxdl=findViewById( R.id.qxdl );
|
||||
qxdl.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
} );
|
||||
b1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
res1=et1.getText().toString();
|
||||
res2=et2.getText().toString();
|
||||
SharedPreferences sp=getSharedPreferences("loginInfo", MODE_PRIVATE);
|
||||
a=sp.contains(res1);
|
||||
String psw= sp.getString(res1, null);
|
||||
if(res1.equals("")) {
|
||||
Toast.makeText(getApplicationContext(), "用户名为空", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
if(res2.equals("")) {
|
||||
Toast.makeText(getApplicationContext(), "密码为空", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
else if(a==false) {
|
||||
Toast.makeText(getApplicationContext(), "登陆失败,用户名不存在", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
else if(psw.equals(res2)) {
|
||||
Toast.makeText(getApplicationContext(), "登陆成功", Toast.LENGTH_SHORT).show();
|
||||
String name=et_name.getText().toString();
|
||||
Data.setUsername( name );
|
||||
Intent intent=new Intent(MainActivity.this,Main3Activity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}else{
|
||||
Toast.makeText(getApplicationContext(), "登陆失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
b2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent=new Intent();
|
||||
intent.setClass(MainActivity.this,Main2Activity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
et2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
String na=et1.getText().toString();
|
||||
if(isExN(na)==true){
|
||||
SharedPreferences sp=getSharedPreferences("save",MODE_PRIVATE);
|
||||
String b=sp.getString(na,null);
|
||||
et2.setText(b);
|
||||
}
|
||||
}
|
||||
});
|
||||
cb.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if(cb.isChecked()){
|
||||
SharedPreferences sp=getSharedPreferences("save",MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor=sp.edit();
|
||||
String a=et1.getText().toString();
|
||||
String b=et2.getText().toString();
|
||||
editor.putString(a,b);
|
||||
editor.putString("name",a);
|
||||
editor.commit();
|
||||
}
|
||||
else if(!cb.isChecked()){
|
||||
SharedPreferences sp=getSharedPreferences("save",MODE_PRIVATE);
|
||||
sp.edit().remove(String.valueOf(a)).commit();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private boolean isExN(String name) {
|
||||
SharedPreferences sp=getSharedPreferences("save",MODE_PRIVATE);
|
||||
return sp.contains(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,210 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MainActivityorder extends AppCompatActivity {
|
||||
ImageButton home,type,me,dynamic,shopcar;
|
||||
ImageView fhj1;
|
||||
TextView t1,t2,t3,t4,t5;
|
||||
private TextView item_detail, item_category_report;
|
||||
private ViewPager vp;
|
||||
private FragmentOne oneFragment;
|
||||
private FragmentTwo twoFragment;
|
||||
private ViewPager pager;
|
||||
private RadioGroup radioGroup;
|
||||
@SuppressLint("WrongViewCast")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_mainorder);
|
||||
t1=findViewById(R.id.t1);
|
||||
t2=findViewById(R.id.t2);
|
||||
t3=findViewById(R.id.t3);
|
||||
t4=findViewById( R.id.t4 );
|
||||
t5=findViewById( R.id.t5 );
|
||||
fhj1=findViewById( R.id.fhj1 );
|
||||
pager = findViewById(R.id.fag2);
|
||||
radioGroup = findViewById(R.id.radioGroup);
|
||||
|
||||
//选中第一个
|
||||
|
||||
radioGroup.check(radioGroup.getChildAt(0).getId());
|
||||
|
||||
//添加fragment页
|
||||
|
||||
final ArrayList<Fragment> list = new ArrayList<>();
|
||||
list.add(new MainActivityt1());
|
||||
list.add(new MainActivityt2());
|
||||
list.add(new MainActivityt3());
|
||||
list.add(new MainActivityt4());
|
||||
list.add(new MainActivityt5());
|
||||
|
||||
//内部类adapter
|
||||
|
||||
pager.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) {
|
||||
@Override
|
||||
public Fragment getItem(int i) {
|
||||
return list.get(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return list.size();
|
||||
}
|
||||
});
|
||||
|
||||
//viewpage切换
|
||||
|
||||
pager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||
@Override
|
||||
public void onPageScrolled(int i, float v, int i1) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int i) {
|
||||
radioGroup.check(radioGroup.getChildAt(i).getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int i) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//滑动选中相应的下标
|
||||
|
||||
radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(RadioGroup radioGroup, int i) {
|
||||
switch (i){
|
||||
case R.id.t1:
|
||||
t2.setTextColor( Color.parseColor("#000000") );
|
||||
t3.setTextColor( Color.parseColor("#000000") );
|
||||
t4.setTextColor( Color.parseColor("#000000") );
|
||||
t5.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#FF0000") );
|
||||
pager.setCurrentItem(0);
|
||||
break;
|
||||
case R.id.t2:
|
||||
t2.setTextColor( Color.parseColor("#FF0000") );
|
||||
t3.setTextColor( Color.parseColor("#000000") );
|
||||
t4.setTextColor( Color.parseColor("#000000") );
|
||||
t5.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#000000") );
|
||||
pager.setCurrentItem(1);
|
||||
break;
|
||||
case R.id.t3:
|
||||
t2.setTextColor( Color.parseColor("#000000") );
|
||||
t3.setTextColor( Color.parseColor("#FF0000") );
|
||||
t4.setTextColor( Color.parseColor("#000000") );
|
||||
t5.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#000000") );
|
||||
pager.setCurrentItem(2);
|
||||
break;
|
||||
case R.id.t4:
|
||||
t4.setTextColor( Color.parseColor("#FF0000") );
|
||||
t3.setTextColor( Color.parseColor("#000000") );
|
||||
t2.setTextColor( Color.parseColor("#000000") );
|
||||
t5.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#000000") );
|
||||
pager.setCurrentItem(3);
|
||||
break;
|
||||
case R.id.t5:
|
||||
t5.setTextColor( Color.parseColor("#FF0000") );
|
||||
t3.setTextColor( Color.parseColor("#000000") );
|
||||
t4.setTextColor( Color.parseColor("#000000") );
|
||||
t2.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#000000") );
|
||||
pager.setCurrentItem(4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
fhj1.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
} );
|
||||
t2.setTextColor( Color.parseColor("#000000") );
|
||||
t3.setTextColor( Color.parseColor("#000000") );
|
||||
t4.setTextColor( Color.parseColor("#000000") );
|
||||
t5.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#FF0000") );
|
||||
t1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
//实例化fragment
|
||||
pager.setCurrentItem(0);
|
||||
t2.setTextColor( Color.parseColor("#000000") );
|
||||
t3.setTextColor( Color.parseColor("#000000") );
|
||||
t4.setTextColor( Color.parseColor("#000000") );
|
||||
t5.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#FF0000") );
|
||||
}
|
||||
});
|
||||
|
||||
t2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
pager.setCurrentItem(1);
|
||||
t2.setTextColor( Color.parseColor("#FF0000") );
|
||||
t3.setTextColor( Color.parseColor("#000000") );
|
||||
t4.setTextColor( Color.parseColor("#000000") );
|
||||
t5.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#000000") );
|
||||
}
|
||||
});
|
||||
t5.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
pager.setCurrentItem(4);
|
||||
t2.setTextColor( Color.parseColor("#000000") );
|
||||
t3.setTextColor( Color.parseColor("#000000") );
|
||||
t4.setTextColor( Color.parseColor("#000000") );
|
||||
t5.setTextColor( Color.parseColor("#FF0000") );
|
||||
t1.setTextColor( Color.parseColor("#000000") );
|
||||
}
|
||||
});
|
||||
t3.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
pager.setCurrentItem(2);
|
||||
t2.setTextColor( Color.parseColor("#000000") );
|
||||
t3.setTextColor( Color.parseColor("#FF0000") );
|
||||
t4.setTextColor( Color.parseColor("#000000") );
|
||||
t5.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#000000") );
|
||||
}
|
||||
});
|
||||
t4.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
pager.setCurrentItem(3);
|
||||
t2.setTextColor( Color.parseColor("#000000") );
|
||||
t3.setTextColor( Color.parseColor("#000000") );
|
||||
t4.setTextColor( Color.parseColor("#FF0000") );
|
||||
t5.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#000000") );
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
public class MainActivityt1 extends Fragment {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate( R.layout.activity_maint1, container, false );
|
||||
return view;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
public class MainActivityt1t extends Fragment {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate( R.layout.activity_maint1t, container, false );
|
||||
return view;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
public class MainActivityt2 extends Fragment {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate( R.layout.activity_maint2, container, false );
|
||||
return view;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
public class MainActivityt2t extends Fragment {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate( R.layout.activity_maint2t, container, false );
|
||||
return view;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
public class MainActivityt3 extends Fragment {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate( R.layout.activity_maint3, container, false );
|
||||
return view;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
public class MainActivityt3t extends Fragment {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate( R.layout.activity_maint3t, container, false );
|
||||
return view;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
public class MainActivityt4 extends Fragment {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate( R.layout.activity_maint4, container, false );
|
||||
return view;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
public class MainActivityt4t extends Fragment {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate( R.layout.activity_maint4t, container, false );
|
||||
return view;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
public class MainActivityt5 extends Fragment {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate( R.layout.activity_maint5, container, false );
|
||||
return view;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
public class MainActivityt5t extends Fragment {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate( R.layout.activity_maint5t, container, false );
|
||||
return view;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
public class MainActivityt6t extends Fragment {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate( R.layout.activity_maint6t, container, false );
|
||||
return view;
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
public class MainActivitytxqym1 extends Fragment {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate( R.layout.activity_mainxq1, container, false );
|
||||
return view;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
public class MainActivitytxqym2 extends Fragment {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate( R.layout.activity_mainxq2, container, false );
|
||||
return view;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yihuanxing
|
||||
*
|
||||
*/
|
||||
public class MainActivitytxqym3 extends Fragment {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate( R.layout.activity_mainxq3, container, false );
|
||||
return view;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,321 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MainActivitytypede extends AppCompatActivity {
|
||||
ImageButton home,type,me,dynamic,shopcar;
|
||||
ImageView fhj1;
|
||||
TextView t1,t2,t3,t4,t5,t6;
|
||||
private TextView item_detail, item_category_report;
|
||||
private ViewPager vp;
|
||||
private FragmentOne oneFragment;
|
||||
private FragmentTwo twoFragment;
|
||||
private ViewPager pager;
|
||||
private RadioGroup radioGroup;
|
||||
@SuppressLint({"WrongViewCast", "ResourceType"})
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_maintypede);
|
||||
t1=findViewById(R.id.t1d);
|
||||
t2=findViewById(R.id.t2d);
|
||||
t3=findViewById(R.id.t3d);
|
||||
t4=findViewById( R.id.t4d );
|
||||
t5=findViewById( R.id.t5d );
|
||||
t6=findViewById( R.id.t6d );
|
||||
fhj1=findViewById( R.id.fhj1 );
|
||||
pager = findViewById(R.id.fag3);
|
||||
radioGroup = findViewById(R.id.radioGroup1);
|
||||
|
||||
//选中第一个
|
||||
|
||||
radioGroup.check(radioGroup.getChildAt(0).getId());
|
||||
|
||||
//添加fragment页
|
||||
|
||||
final ArrayList<Fragment> list = new ArrayList<>();
|
||||
list.add(new MainActivityt1t());
|
||||
list.add(new MainActivityt2t());
|
||||
list.add(new MainActivityt3t());
|
||||
list.add(new MainActivityt4t());
|
||||
list.add(new MainActivityt5t());
|
||||
list.add(new MainActivityt6t());
|
||||
|
||||
//内部类adapter
|
||||
|
||||
pager.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) {
|
||||
@Override
|
||||
public Fragment getItem(int i) {
|
||||
return list.get(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return list.size();
|
||||
}
|
||||
});
|
||||
|
||||
//viewpage切换
|
||||
|
||||
pager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||
@Override
|
||||
public void onPageScrolled(int i, float v, int i1) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int i) {
|
||||
radioGroup.check(radioGroup.getChildAt(i).getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int i) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//滑动选中相应的下标
|
||||
|
||||
radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||
@SuppressLint("ResourceType")
|
||||
@Override
|
||||
public void onCheckedChanged(RadioGroup radioGroup, int i) {
|
||||
switch (i){
|
||||
case R.id.t1d:
|
||||
t1.setBackgroundResource( R.drawable.borderflxq );
|
||||
t2.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t3.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t4.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t5.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t6.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t2.setTextColor( Color.parseColor("#000000") );
|
||||
t3.setTextColor( Color.parseColor("#000000") );
|
||||
t4.setTextColor( Color.parseColor("#000000") );
|
||||
t5.setTextColor( Color.parseColor("#000000") );
|
||||
t6.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#FF0000") );
|
||||
pager.setCurrentItem(0);
|
||||
break;
|
||||
case R.id.t2d:
|
||||
t2.setBackgroundResource( R.drawable.borderflxq );
|
||||
t1.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t3.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t4.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t5.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t6.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t2.setTextColor( Color.parseColor("#FF0000") );
|
||||
t3.setTextColor( Color.parseColor("#000000") );
|
||||
t4.setTextColor( Color.parseColor("#000000") );
|
||||
t5.setTextColor( Color.parseColor("#000000") );
|
||||
t6.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#000000") );
|
||||
pager.setCurrentItem(1);
|
||||
break;
|
||||
case R.id.t3d:
|
||||
t3.setBackgroundResource( R.drawable.borderflxq );
|
||||
t2.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t1.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t4.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t5.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t6.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t2.setTextColor( Color.parseColor("#000000") );
|
||||
t3.setTextColor( Color.parseColor("#FF0000") );
|
||||
t4.setTextColor( Color.parseColor("#000000") );
|
||||
t5.setTextColor( Color.parseColor("#000000") );
|
||||
t6.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#000000") );
|
||||
pager.setCurrentItem(2);
|
||||
break;
|
||||
case R.id.t4d:
|
||||
t4.setBackgroundResource( R.drawable.borderflxq );
|
||||
t2.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t3.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t1.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t5.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t6.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t4.setTextColor( Color.parseColor("#FF0000") );
|
||||
t3.setTextColor( Color.parseColor("#000000") );
|
||||
t2.setTextColor( Color.parseColor("#000000") );
|
||||
t5.setTextColor( Color.parseColor("#000000") );
|
||||
t6.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#000000") );
|
||||
pager.setCurrentItem(3);
|
||||
break;
|
||||
case R.id.t5d:
|
||||
t5.setBackgroundResource( R.drawable.borderflxq );
|
||||
t2.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t3.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t4.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t6.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t1.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t5.setTextColor( Color.parseColor("#FF0000") );
|
||||
t3.setTextColor( Color.parseColor("#000000") );
|
||||
t4.setTextColor( Color.parseColor("#000000") );
|
||||
t2.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#000000") );
|
||||
t6.setTextColor( Color.parseColor("#000000") );
|
||||
pager.setCurrentItem(4);
|
||||
break;
|
||||
case R.id.t6d:
|
||||
t6.setBackgroundResource( R.drawable.borderflxq );
|
||||
t2.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t3.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t4.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t5.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t1.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t6.setTextColor( Color.parseColor("#FF0000") );
|
||||
t3.setTextColor( Color.parseColor("#000000") );
|
||||
t4.setTextColor( Color.parseColor("#000000") );
|
||||
t2.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#000000") );
|
||||
t5.setTextColor( Color.parseColor("#000000") );
|
||||
pager.setCurrentItem(5);
|
||||
}
|
||||
}
|
||||
});
|
||||
fhj1.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
} );
|
||||
t1.setBackgroundResource( R.drawable.borderflxq );
|
||||
t2.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t3.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t4.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t5.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t2.setTextColor( Color.parseColor("#000000") );
|
||||
t3.setTextColor( Color.parseColor("#000000") );
|
||||
t4.setTextColor( Color.parseColor("#000000") );
|
||||
t5.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#FF0000") );
|
||||
t1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
//实例化fragment
|
||||
pager.setCurrentItem(0);
|
||||
t1.setBackgroundResource( R.drawable.borderflxq );
|
||||
t2.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t3.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t4.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t5.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t6.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t6.setTextColor( Color.parseColor("#000000") );
|
||||
t2.setTextColor( Color.parseColor("#000000") );
|
||||
t3.setTextColor( Color.parseColor("#000000") );
|
||||
t4.setTextColor( Color.parseColor("#000000") );
|
||||
t5.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#FF0000") );
|
||||
}
|
||||
});
|
||||
|
||||
t2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
pager.setCurrentItem(1);
|
||||
t2.setBackgroundResource( R.drawable.borderflxq );
|
||||
t1.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t3.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t4.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t5.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t6.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t2.setTextColor( Color.parseColor("#FF0000") );
|
||||
t3.setTextColor( Color.parseColor("#000000") );
|
||||
t4.setTextColor( Color.parseColor("#000000") );
|
||||
t5.setTextColor( Color.parseColor("#000000") );
|
||||
t6.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#000000") );
|
||||
}
|
||||
});
|
||||
t5.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
pager.setCurrentItem(4);
|
||||
t5.setBackgroundResource( R.drawable.borderflxq );
|
||||
t2.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t3.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t4.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t6.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t1.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t2.setTextColor( Color.parseColor("#000000") );
|
||||
t3.setTextColor( Color.parseColor("#000000") );
|
||||
t4.setTextColor( Color.parseColor("#000000") );
|
||||
t5.setTextColor( Color.parseColor("#FF0000") );
|
||||
t1.setTextColor( Color.parseColor("#000000") );
|
||||
t6.setTextColor( Color.parseColor("#000000") );
|
||||
|
||||
}
|
||||
});
|
||||
t3.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
pager.setCurrentItem(2);
|
||||
t3.setBackgroundResource( R.drawable.borderflxq );
|
||||
t2.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t1.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t4.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t5.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t6.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t2.setTextColor( Color.parseColor("#000000") );
|
||||
t3.setTextColor( Color.parseColor("#FF0000") );
|
||||
t4.setTextColor( Color.parseColor("#000000") );
|
||||
t5.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#000000") );
|
||||
t6.setTextColor( Color.parseColor("#000000") );
|
||||
}
|
||||
});
|
||||
t4.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
pager.setCurrentItem(3);
|
||||
t4.setBackgroundResource( R.drawable.borderflxq );
|
||||
t2.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t3.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t1.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t5.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t6.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t2.setTextColor( Color.parseColor("#000000") );
|
||||
t3.setTextColor( Color.parseColor("#000000") );
|
||||
t4.setTextColor( Color.parseColor("#FF0000") );
|
||||
t5.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#000000") );
|
||||
t6.setTextColor( Color.parseColor("#000000") );
|
||||
}
|
||||
});
|
||||
t6.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
pager.setCurrentItem(5);
|
||||
t6.setBackgroundResource( R.drawable.borderflxq );
|
||||
t2.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t3.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t1.setBackgroundResource( R.drawable.borderflxqf);
|
||||
t5.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t4.setBackgroundResource( R.drawable.borderflxqf );
|
||||
t2.setTextColor( Color.parseColor("#000000") );
|
||||
t3.setTextColor( Color.parseColor("#000000") );
|
||||
t6.setTextColor( Color.parseColor("#FF0000") );
|
||||
t5.setTextColor( Color.parseColor("#000000") );
|
||||
t1.setTextColor( Color.parseColor("#000000") );
|
||||
t4.setTextColor( Color.parseColor("#000000") );
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,210 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.Toast;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class MainActivityxqym extends AppCompatActivity {
|
||||
ImageView fhj1;
|
||||
TextView t1,t2,t3;
|
||||
ImageView t_sc,t_fx;
|
||||
Button jrgwc;
|
||||
int n=0;
|
||||
private ViewPager pager;
|
||||
private RadioGroup radioGroup;
|
||||
@SuppressLint("WrongViewCast")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_mainxqym);
|
||||
t1=findViewById(R.id.t1x);
|
||||
t2=findViewById(R.id.t2x);
|
||||
t3=findViewById(R.id.t3x);
|
||||
fhj1=findViewById( R.id.fhj1 );
|
||||
pager = findViewById(R.id.fag3);
|
||||
radioGroup = findViewById(R.id.radioGroup);
|
||||
t_sc=findViewById( R.id.t_sc );
|
||||
t_fx=findViewById( R.id.t_fx );
|
||||
jrgwc=findViewById( R.id.jrgwc );
|
||||
t_sc.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
n++;
|
||||
if (n % 2 == 1) {
|
||||
t_sc.setBackgroundResource( R.drawable.sctbd );
|
||||
Toast.makeText( getBaseContext(), "已收藏!", Toast.LENGTH_SHORT ).show();
|
||||
}else{
|
||||
t_sc.setBackgroundResource( R.drawable.sctb );
|
||||
Toast.makeText( getBaseContext(), "取消收藏!", Toast.LENGTH_SHORT ).show();
|
||||
}
|
||||
}
|
||||
} );
|
||||
t_fx.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Toast.makeText( getBaseContext(),"已分享!",Toast.LENGTH_SHORT ).show();
|
||||
}
|
||||
} );
|
||||
jrgwc.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Data.setA( 11 );
|
||||
Toast.makeText( getBaseContext(),"已加入购物车!",Toast.LENGTH_SHORT ).show();
|
||||
}
|
||||
} );
|
||||
//选中第一个
|
||||
|
||||
radioGroup.check(radioGroup.getChildAt(0).getId());
|
||||
|
||||
//添加fragment页
|
||||
|
||||
final ArrayList<Fragment> list = new ArrayList<>();
|
||||
list.add(new MainActivitytxqym1());
|
||||
list.add(new MainActivitytxqym2());
|
||||
list.add(new MainActivitytxqym3());
|
||||
|
||||
//内部类adapter
|
||||
|
||||
pager.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) {
|
||||
@Override
|
||||
public Fragment getItem(int i) {
|
||||
return list.get(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return list.size();
|
||||
}
|
||||
});
|
||||
|
||||
//viewpage切换
|
||||
|
||||
pager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||
@Override
|
||||
public void onPageScrolled(int i, float v, int i1) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int i) {
|
||||
radioGroup.check(radioGroup.getChildAt(i).getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int i) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//滑动选中相应的下标
|
||||
|
||||
radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(RadioGroup radioGroup, int i) {
|
||||
switch (i){
|
||||
case R.id.t1x:
|
||||
t2.setBackgroundResource( R.drawable.borderflxqy );
|
||||
t3.setBackgroundResource( R.drawable.borderflxqy);
|
||||
t1.setBackgroundResource( R.drawable.borderflxqyd);
|
||||
pager.setCurrentItem(0);
|
||||
break;
|
||||
case R.id.t2x:
|
||||
t1.setBackgroundResource( R.drawable.borderflxqy );
|
||||
t3.setBackgroundResource( R.drawable.borderflxqy);
|
||||
t2.setBackgroundResource( R.drawable.borderflxqyd);
|
||||
pager.setCurrentItem(1);
|
||||
break;
|
||||
case R.id.t3x:
|
||||
t2.setBackgroundResource( R.drawable.borderflxqy );
|
||||
t1.setBackgroundResource( R.drawable.borderflxqy);
|
||||
t3.setBackgroundResource( R.drawable.borderflxqyd);
|
||||
pager.setCurrentItem(2);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
fhj1.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
} );
|
||||
t2.setBackgroundResource( R.drawable.borderflxqy );
|
||||
t3.setBackgroundResource( R.drawable.borderflxqy);
|
||||
t1.setBackgroundResource( R.drawable.borderflxqyd);
|
||||
t1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
//实例化fragment
|
||||
pager.setCurrentItem(0);
|
||||
t2.setBackgroundResource( R.drawable.borderflxqy );
|
||||
t3.setBackgroundResource( R.drawable.borderflxqy);
|
||||
t1.setBackgroundResource( R.drawable.borderflxqyd);
|
||||
}
|
||||
});
|
||||
|
||||
t2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
pager.setCurrentItem(1);
|
||||
t1.setBackgroundResource( R.drawable.borderflxqy );
|
||||
t3.setBackgroundResource( R.drawable.borderflxqy);
|
||||
t2.setBackgroundResource( R.drawable.borderflxqyd);
|
||||
}
|
||||
});
|
||||
|
||||
t3.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
pager.setCurrentItem(2);
|
||||
t2.setBackgroundResource( R.drawable.borderflxqy );
|
||||
t1.setBackgroundResource( R.drawable.borderflxqy);
|
||||
t3.setBackgroundResource( R.drawable.borderflxqyd);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
public void showdialog(View view) {
|
||||
//Toast.makeText(this,"clickme",Toast.LENGTH_LONG).show();
|
||||
AlertDialog.Builder alertdialogbuilder=new AlertDialog.Builder(this);
|
||||
alertdialogbuilder.setIcon( R.drawable.tubiao);
|
||||
alertdialogbuilder.setTitle( "提示:" );
|
||||
alertdialogbuilder.setMessage("您已选择该商品,是否购买?");
|
||||
alertdialogbuilder.setPositiveButton("确定", click1);
|
||||
alertdialogbuilder.setNegativeButton("取消", click2);
|
||||
AlertDialog alertdialog1=alertdialogbuilder.create();
|
||||
alertdialog1.show();
|
||||
}
|
||||
private DialogInterface.OnClickListener click1= new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
Intent intent=new Intent(MainActivityxqym.this,MainActivityxzzffs.class);
|
||||
startActivity( intent );
|
||||
dialog.cancel();
|
||||
}
|
||||
};
|
||||
private DialogInterface.OnClickListener click2= new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.cancel();
|
||||
}
|
||||
};
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class MainActivityxzzffs extends AppCompatActivity {
|
||||
ImageButton home,type,me,dynamic,shopcar;
|
||||
ImageView fhj1;
|
||||
Button qdzf;
|
||||
TextView t1,t2,t3,t4,t5,t6;
|
||||
private TextView item_detail, item_category_report;
|
||||
private ViewPager vp;
|
||||
private FragmentOne oneFragment;
|
||||
private FragmentTwo twoFragment;
|
||||
private ViewPager pager;
|
||||
private RadioGroup radioGroup;
|
||||
@SuppressLint({"WrongViewCast", "ResourceType"})
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main_xzzffs);
|
||||
fhj1=findViewById( R.id.fhj );
|
||||
qdzf=findViewById( R.id.qdzf );
|
||||
qdzf.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent(MainActivityxzzffs.this,MainActivityzfcg.class);
|
||||
finish();
|
||||
startActivity( intent );
|
||||
}
|
||||
} );
|
||||
fhj1.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
} );
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
public class MainActivityzfcg extends AppCompatActivity {
|
||||
ImageButton home,type,me,dynamic,shopcar;
|
||||
Button fhj1;
|
||||
TextView t1,t2,t3,t4,t5,t6;
|
||||
private TextView item_detail, item_category_report;
|
||||
private ViewPager vp;
|
||||
private FragmentOne oneFragment;
|
||||
private FragmentTwo twoFragment;
|
||||
private ViewPager pager;
|
||||
private RadioGroup radioGroup;
|
||||
@SuppressLint({"WrongViewCast", "ResourceType"})
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main_zfcg);
|
||||
fhj1=findViewById( R.id.qd );
|
||||
fhj1.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
} );
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
public class MianActivityset extends AppCompatActivity {
|
||||
TextView t_yhm;
|
||||
ImageView fhj;
|
||||
@SuppressLint("WrongViewCast")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate( savedInstanceState );
|
||||
setContentView( R.layout.activity_mainset );
|
||||
t_yhm=findViewById( R.id.t_yhm );
|
||||
fhj=findViewById( R.id.fhj1 );
|
||||
fhj.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
} );
|
||||
String s = Data.getUsername();
|
||||
if (s==null) {
|
||||
t_yhm.setText( "请登录!" );
|
||||
}
|
||||
else {
|
||||
t_yhm.setText( "用户名:"+s );
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class MianActivityxx extends AppCompatActivity {
|
||||
TextView t_yhm;
|
||||
ImageView fhj;
|
||||
@SuppressLint("WrongViewCast")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate( savedInstanceState );
|
||||
setContentView( R.layout.activity_mainxx);
|
||||
fhj=findViewById( R.id.fhj1 );
|
||||
fhj.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
} );
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.widget.ScrollView;
|
||||
|
||||
public class MyScrollView extends ScrollView {
|
||||
OnTouchListener mGestureListener;
|
||||
// 滑动距离及坐标
|
||||
private float xDistance, yDistance, xLast, yLast;
|
||||
public MyScrollView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public MyScrollView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public MyScrollView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(MotionEvent ev) {
|
||||
switch (ev.getAction()){
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
xDistance = yDistance = 0f;
|
||||
xLast = ev.getX();
|
||||
yLast = ev.getY();
|
||||
break;
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
final float curX = ev.getX();
|
||||
final float curY = ev.getY();
|
||||
xDistance += Math.abs(curX - xLast);
|
||||
yDistance += Math.abs(curY - yLast);
|
||||
xLast = curX;
|
||||
yLast = curY;
|
||||
if(xDistance > yDistance){
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
return super.onInterceptTouchEvent(ev);
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.example.myapplication;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.ListView;
|
||||
|
||||
public class UnScrollListView extends ListView {
|
||||
public UnScrollListView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public UnScrollListView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public UnScrollListView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,
|
||||
MeasureSpec.AT_MOST);
|
||||
super.onMeasure(widthMeasureSpec, expandSpec);//这里返回的是刚写好的expandSpec
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,727 @@
|
||||
@startuml
|
||||
|
||||
title __MYAPPLICATION's Class Diagram__\n
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.CustomVideoView {
|
||||
+ CustomVideoView()
|
||||
+ CustomVideoView()
|
||||
+ CustomVideoView()
|
||||
+ onKeyDown()
|
||||
+ setOnPreparedListener()
|
||||
# onMeasure()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.Data {
|
||||
{static} - K : int
|
||||
{static} - a : int
|
||||
{static} - b : int
|
||||
{static} - c : int
|
||||
{static} - d : int
|
||||
{static} - e : int
|
||||
{static} - f : int
|
||||
{static} - g : int
|
||||
{static} - h : int
|
||||
{static} - i : int
|
||||
{static} - j : int
|
||||
{static} - username : String
|
||||
{static} + getA()
|
||||
{static} + getB()
|
||||
{static} + getC()
|
||||
{static} + getD()
|
||||
{static} + getE()
|
||||
{static} + getF()
|
||||
{static} + getG()
|
||||
{static} + getH()
|
||||
{static} + getI()
|
||||
{static} + getJ()
|
||||
{static} + getK()
|
||||
{static} + getUsername()
|
||||
{static} + setA()
|
||||
{static} + setB()
|
||||
{static} + setC()
|
||||
{static} + setD()
|
||||
{static} + setE()
|
||||
{static} + setF()
|
||||
{static} + setG()
|
||||
{static} + setH()
|
||||
{static} + setI()
|
||||
{static} + setJ()
|
||||
{static} + setK()
|
||||
{static} + setUsername()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.DatabaseHelper {
|
||||
{static} - CREATE_TABLE : String
|
||||
{static} - DB_NAME : String
|
||||
{static} - TABLE_NAME : String
|
||||
- db : SQLiteDatabase
|
||||
+ DatabaseHelper()
|
||||
+ del()
|
||||
+ insert()
|
||||
+ onCreate()
|
||||
+ onUpgrade()
|
||||
+ query()
|
||||
+ update()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.DescriptionActivity {
|
||||
~ et_info : EditText
|
||||
~ et_name : EditText
|
||||
~ et_type : EditText
|
||||
~ fhj : ImageView
|
||||
~ iv_flowerB : ImageView
|
||||
~ jrgwc : Button
|
||||
~ n : int
|
||||
~ t_fx : ImageView
|
||||
~ t_price : TextView
|
||||
~ t_sc : ImageView
|
||||
~ tv_flowerB : TextView
|
||||
- click1 : OnClickListener
|
||||
- click2 : OnClickListener
|
||||
+ onKeyDown()
|
||||
+ showdialog()
|
||||
# onCreate()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.FragmentFive {
|
||||
~ bj : TextView
|
||||
~ blFlag : boolean
|
||||
~ gwc1 : LinearLayout
|
||||
~ gwc10 : LinearLayout
|
||||
~ gwc11 : LinearLayout
|
||||
~ gwc2 : LinearLayout
|
||||
~ gwc3 : LinearLayout
|
||||
~ gwc4 : LinearLayout
|
||||
~ gwc5 : LinearLayout
|
||||
~ gwc6 : LinearLayout
|
||||
~ gwc7 : LinearLayout
|
||||
~ gwc8 : LinearLayout
|
||||
~ gwc9 : LinearLayout
|
||||
~ ibu1 : ImageButton
|
||||
~ ibu2 : ImageButton
|
||||
~ img : ImageView
|
||||
~ layx : LinearLayout
|
||||
~ minus : ImageButton
|
||||
~ minus1 : ImageButton
|
||||
~ n : int
|
||||
~ number : TextView
|
||||
~ number1 : TextView
|
||||
~ plus : ImageButton
|
||||
~ plus1 : ImageButton
|
||||
~ qq : Button
|
||||
~ rb : CheckBox
|
||||
~ rb1 : CheckBox
|
||||
~ rb10 : CheckBox
|
||||
~ rb2 : CheckBox
|
||||
~ rb3 : CheckBox
|
||||
~ rb4 : CheckBox
|
||||
~ rb5 : CheckBox
|
||||
~ rb6 : CheckBox
|
||||
~ rb7 : CheckBox
|
||||
~ rb8 : CheckBox
|
||||
~ rb9 : CheckBox
|
||||
~ surebuy : Button
|
||||
~ switch1 : Switch
|
||||
~ switch2 : Switch
|
||||
~ tv_sz : TextView
|
||||
~ wx : Button
|
||||
- count : int
|
||||
- count1 : int
|
||||
- mUiModeManager : UiModeManager
|
||||
+ onActivityCreated()
|
||||
+ onCreateView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.FragmentFive.ButtonMinus {
|
||||
+ onClick()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.FragmentFive.ButtonMinus1 {
|
||||
+ onClick()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.FragmentFive.ButtonPlus {
|
||||
+ onClick()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.FragmentFive.ButtonPlus1 {
|
||||
+ onClick()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.FragmentOne {
|
||||
~ layout1 : LinearLayout
|
||||
~ layout2 : LinearLayout
|
||||
+ onActivityCreated()
|
||||
+ onCreateView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.FragmentThree {
|
||||
~ blFlag : boolean
|
||||
~ i_sz : ImageView
|
||||
~ i_xx : ImageView
|
||||
~ ibu1 : ImageButton
|
||||
~ ibu2 : ImageButton
|
||||
~ imgtx : ImageView
|
||||
~ lay : LinearLayout
|
||||
~ qq : Button
|
||||
~ switch1 : Switch
|
||||
~ switch2 : Switch
|
||||
~ t_ljlq : TextView
|
||||
~ t_username : TextView
|
||||
~ wx : Button
|
||||
- mUiModeManager : UiModeManager
|
||||
+ onActivityCreated()
|
||||
+ onCreateView()
|
||||
+ onResume()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.FragmentTwo {
|
||||
~ iM_liz : ImageView
|
||||
~ i_tb : ImageView
|
||||
~ ibu1 : ImageButton
|
||||
~ ibu3 : ImageButton
|
||||
~ imageViews : ArrayList<ImageView>
|
||||
~ list : ListView
|
||||
~ tv_login : TextView
|
||||
- descs : String[]
|
||||
- handler : Handler
|
||||
- imageResIds : int[]
|
||||
- ll_dots : LinearLayout
|
||||
- viewpager_tv : TextView
|
||||
- viewpager_vp : ViewPager
|
||||
+ ViewPagerTouchEvent()
|
||||
+ changeTextAndDot()
|
||||
+ dot()
|
||||
+ onActivityCreated()
|
||||
+ onCreateView()
|
||||
+ onDestroy()
|
||||
- init()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.FragmentTwo.Myadapter {
|
||||
+ destroyItem()
|
||||
+ getCount()
|
||||
+ instantiateItem()
|
||||
+ isViewFromObject()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.FrgmentFour {
|
||||
~ n : int
|
||||
- btn_end : Button
|
||||
- btn_start : Button
|
||||
- img : ImageView
|
||||
- mediaController : MediaController
|
||||
- t_gd : TextView
|
||||
- videoView : VideoView
|
||||
- videoView1 : VideoView
|
||||
- videoView2 : VideoView
|
||||
+ onActivityCreated()
|
||||
+ onCreateView()
|
||||
+ onDown()
|
||||
+ onFling()
|
||||
+ onLongPress()
|
||||
+ onScroll()
|
||||
+ onShowPress()
|
||||
+ onSingleTapUp()
|
||||
- init()
|
||||
- init1()
|
||||
- init2()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.Infor {
|
||||
~ content : String
|
||||
~ id : int
|
||||
~ name : String
|
||||
+ getContent()
|
||||
+ getId()
|
||||
+ getName()
|
||||
+ setContent()
|
||||
+ setId()
|
||||
+ setName()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.Main2Activity {
|
||||
~ b3 : Button
|
||||
~ et3 : TextView
|
||||
~ et4 : TextView
|
||||
~ et5 : TextView
|
||||
~ qxzc : ImageView
|
||||
~ t : boolean
|
||||
+ onClick()
|
||||
# onCreate()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.Main3Activity {
|
||||
~ dynamic : ImageButton
|
||||
~ home : ImageButton
|
||||
~ me : ImageButton
|
||||
~ pager : ViewPager
|
||||
~ shopcar : ImageButton
|
||||
~ type : ImageButton
|
||||
- radioGroup : RadioGroup
|
||||
# onCreate()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.Main4Activity {
|
||||
~ m_text : TextView
|
||||
~ videoViewq : VideoView
|
||||
- mediaController : MediaController
|
||||
+ onDown()
|
||||
+ onFling()
|
||||
+ onLongPress()
|
||||
+ onScroll()
|
||||
+ onShowPress()
|
||||
+ onSingleTapUp()
|
||||
# onCreate()
|
||||
- init2()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivity {
|
||||
~ a : boolean
|
||||
~ b1 : Button
|
||||
~ b2 : Button
|
||||
~ cb : CheckBox
|
||||
~ et1 : EditText
|
||||
~ et2 : EditText
|
||||
~ et3 : EditText
|
||||
~ et_name : EditText
|
||||
~ qxdl : ImageView
|
||||
~ t1 : EditText
|
||||
~ t2 : EditText
|
||||
- res1 : String
|
||||
- res2 : String
|
||||
- res3 : String
|
||||
- res4 : String
|
||||
- res6 : String
|
||||
- res7 : String
|
||||
+ onClick()
|
||||
# onCreate()
|
||||
- isExN()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityorder {
|
||||
~ dynamic : ImageButton
|
||||
~ fhj1 : ImageView
|
||||
~ home : ImageButton
|
||||
~ me : ImageButton
|
||||
~ shopcar : ImageButton
|
||||
~ t1 : TextView
|
||||
~ t2 : TextView
|
||||
~ t3 : TextView
|
||||
~ t4 : TextView
|
||||
~ t5 : TextView
|
||||
~ type : ImageButton
|
||||
- item_category_report : TextView
|
||||
- item_detail : TextView
|
||||
- pager : ViewPager
|
||||
- radioGroup : RadioGroup
|
||||
- vp : ViewPager
|
||||
# onCreate()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt1 {
|
||||
+ onCreateView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt1t {
|
||||
+ onCreateView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt2 {
|
||||
+ onCreateView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt2t {
|
||||
+ onCreateView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt3 {
|
||||
+ onCreateView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt3t {
|
||||
+ onCreateView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt4 {
|
||||
+ onCreateView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt4t {
|
||||
+ onCreateView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt5 {
|
||||
+ onCreateView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt5t {
|
||||
+ onCreateView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityt6t {
|
||||
+ onCreateView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivitytxqym1 {
|
||||
+ onCreateView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivitytxqym2 {
|
||||
+ onCreateView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivitytxqym3 {
|
||||
+ onCreateView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivitytypede {
|
||||
~ dynamic : ImageButton
|
||||
~ fhj1 : ImageView
|
||||
~ home : ImageButton
|
||||
~ me : ImageButton
|
||||
~ shopcar : ImageButton
|
||||
~ t1 : TextView
|
||||
~ t2 : TextView
|
||||
~ t3 : TextView
|
||||
~ t4 : TextView
|
||||
~ t5 : TextView
|
||||
~ t6 : TextView
|
||||
~ type : ImageButton
|
||||
- item_category_report : TextView
|
||||
- item_detail : TextView
|
||||
- pager : ViewPager
|
||||
- radioGroup : RadioGroup
|
||||
- vp : ViewPager
|
||||
# onCreate()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityxqym {
|
||||
~ fhj1 : ImageView
|
||||
~ jrgwc : Button
|
||||
~ n : int
|
||||
~ t1 : TextView
|
||||
~ t2 : TextView
|
||||
~ t3 : TextView
|
||||
~ t_fx : ImageView
|
||||
~ t_sc : ImageView
|
||||
- click1 : OnClickListener
|
||||
- click2 : OnClickListener
|
||||
- pager : ViewPager
|
||||
- radioGroup : RadioGroup
|
||||
+ showdialog()
|
||||
# onCreate()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityxzzffs {
|
||||
~ dynamic : ImageButton
|
||||
~ fhj1 : ImageView
|
||||
~ home : ImageButton
|
||||
~ me : ImageButton
|
||||
~ qdzf : Button
|
||||
~ shopcar : ImageButton
|
||||
~ t1 : TextView
|
||||
~ t2 : TextView
|
||||
~ t3 : TextView
|
||||
~ t4 : TextView
|
||||
~ t5 : TextView
|
||||
~ t6 : TextView
|
||||
~ type : ImageButton
|
||||
- item_category_report : TextView
|
||||
- item_detail : TextView
|
||||
- pager : ViewPager
|
||||
- radioGroup : RadioGroup
|
||||
- vp : ViewPager
|
||||
# onCreate()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MainActivityzfcg {
|
||||
~ dynamic : ImageButton
|
||||
~ fhj1 : Button
|
||||
~ home : ImageButton
|
||||
~ me : ImageButton
|
||||
~ shopcar : ImageButton
|
||||
~ t1 : TextView
|
||||
~ t2 : TextView
|
||||
~ t3 : TextView
|
||||
~ t4 : TextView
|
||||
~ t5 : TextView
|
||||
~ t6 : TextView
|
||||
~ type : ImageButton
|
||||
- item_category_report : TextView
|
||||
- item_detail : TextView
|
||||
- pager : ViewPager
|
||||
- radioGroup : RadioGroup
|
||||
- vp : ViewPager
|
||||
# onCreate()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MianActivityset {
|
||||
~ fhj : ImageView
|
||||
~ t_yhm : TextView
|
||||
# onCreate()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MianActivityxx {
|
||||
~ fhj : ImageView
|
||||
~ t_yhm : TextView
|
||||
# onCreate()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MyPagerAdapter {
|
||||
- viewList : List<View>
|
||||
+ MyPagerAdapter()
|
||||
+ MyPagerAdapter()
|
||||
+ destroyItem()
|
||||
+ getCount()
|
||||
+ instantiateItem()
|
||||
+ isViewFromObject()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.MyScrollView {
|
||||
~ mGestureListener : OnTouchListener
|
||||
- xDistance : float
|
||||
- xLast : float
|
||||
- yDistance : float
|
||||
- yLast : float
|
||||
+ MyScrollView()
|
||||
+ MyScrollView()
|
||||
+ MyScrollView()
|
||||
+ onInterceptTouchEvent()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.UnScrollListView {
|
||||
+ UnScrollListView()
|
||||
+ UnScrollListView()
|
||||
+ UnScrollListView()
|
||||
# onMeasure()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.WebActivity {
|
||||
{static} - account : int
|
||||
- mWebview : WebView
|
||||
+ onKeyDown()
|
||||
# onCreate()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.WebActivity.MyWebChromeClient {
|
||||
+ onProgressChanged()
|
||||
+ onReceivedTitle()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace com.example.myapplication {
|
||||
class com.example.myapplication.WebActivity.MyWebViewClient {
|
||||
+ onPageFinished()
|
||||
+ onPageStarted()
|
||||
+ shouldOverrideUrlLoading()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
com.example.myapplication.CustomVideoView -up-|> android.widget.VideoView
|
||||
com.example.myapplication.DatabaseHelper -up-|> android.database.sqlite.SQLiteOpenHelper
|
||||
com.example.myapplication.DescriptionActivity -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.FragmentFive -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.FragmentFive +-down- com.example.myapplication.FragmentFive.ButtonMinus
|
||||
com.example.myapplication.FragmentFive +-down- com.example.myapplication.FragmentFive.ButtonMinus1
|
||||
com.example.myapplication.FragmentFive +-down- com.example.myapplication.FragmentFive.ButtonPlus
|
||||
com.example.myapplication.FragmentFive +-down- com.example.myapplication.FragmentFive.ButtonPlus1
|
||||
com.example.myapplication.FragmentFive.ButtonMinus .up.|> android.view.View.OnClickListener
|
||||
com.example.myapplication.FragmentFive.ButtonMinus1 .up.|> android.view.View.OnClickListener
|
||||
com.example.myapplication.FragmentFive.ButtonPlus .up.|> android.view.View.OnClickListener
|
||||
com.example.myapplication.FragmentFive.ButtonPlus1 .up.|> android.view.View.OnClickListener
|
||||
com.example.myapplication.FragmentOne -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.FragmentThree -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.FragmentTwo -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.FragmentTwo +-down- com.example.myapplication.FragmentTwo.Myadapter
|
||||
com.example.myapplication.FragmentTwo.Myadapter -up-|> androidx.viewpager.widget.PagerAdapter
|
||||
com.example.myapplication.FrgmentFour .up.|> android.view.GestureDetector.OnGestureListener
|
||||
com.example.myapplication.FrgmentFour -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.Main2Activity .up.|> android.view.View.OnClickListener
|
||||
com.example.myapplication.Main2Activity -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.Main3Activity -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.Main4Activity -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.MainActivity .up.|> android.view.View.OnClickListener
|
||||
com.example.myapplication.MainActivity -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.MainActivityorder -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.MainActivityorder o-- com.example.myapplication.FragmentOne : oneFragment
|
||||
com.example.myapplication.MainActivityorder o-- com.example.myapplication.FragmentTwo : twoFragment
|
||||
com.example.myapplication.MainActivityt1 -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivityt1t -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivityt2 -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivityt2t -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivityt3 -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivityt3t -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivityt4 -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivityt4t -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivityt5 -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivityt5t -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivityt6t -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivitytxqym1 -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivitytxqym2 -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivitytxqym3 -up-|> androidx.fragment.app.Fragment
|
||||
com.example.myapplication.MainActivitytypede -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.MainActivitytypede o-- com.example.myapplication.FragmentOne : oneFragment
|
||||
com.example.myapplication.MainActivitytypede o-- com.example.myapplication.FragmentTwo : twoFragment
|
||||
com.example.myapplication.MainActivityxqym -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.MainActivityxzzffs -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.MainActivityxzzffs o-- com.example.myapplication.FragmentOne : oneFragment
|
||||
com.example.myapplication.MainActivityxzzffs o-- com.example.myapplication.FragmentTwo : twoFragment
|
||||
com.example.myapplication.MainActivityzfcg -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.MainActivityzfcg o-- com.example.myapplication.FragmentOne : oneFragment
|
||||
com.example.myapplication.MainActivityzfcg o-- com.example.myapplication.FragmentTwo : twoFragment
|
||||
com.example.myapplication.MianActivityset -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.MianActivityxx -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.MyPagerAdapter -up-|> androidx.viewpager.widget.PagerAdapter
|
||||
com.example.myapplication.MyScrollView -up-|> android.widget.ScrollView
|
||||
com.example.myapplication.UnScrollListView -up-|> android.widget.ListView
|
||||
com.example.myapplication.WebActivity -up-|> androidx.appcompat.app.AppCompatActivity
|
||||
com.example.myapplication.WebActivity +-down- com.example.myapplication.WebActivity.MyWebChromeClient
|
||||
com.example.myapplication.WebActivity +-down- com.example.myapplication.WebActivity.MyWebViewClient
|
||||
com.example.myapplication.WebActivity.MyWebChromeClient -up-|> android.webkit.WebChromeClient
|
||||
com.example.myapplication.WebActivity.MyWebViewClient -up-|> android.webkit.WebViewClient
|
||||
|
||||
|
||||
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,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<solid android:color="#FFFFFF" />
|
||||
<!-- android:radius 弧形的半径 -->
|
||||
<!-- 设置按钮的四个角为弧形 -->
|
||||
<corners
|
||||
android:radius="0dp" />
|
||||
<!--也可单独设置-->
|
||||
<solid android:color="#FFD700" />
|
||||
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#FFD700" />
|
||||
|
||||
<padding
|
||||
android:bottom="5dp"
|
||||
android:left="0dp"
|
||||
android:right="0dp"
|
||||
android:top="5dp" />
|
||||
</shape>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<solid android:color="#FFFFFF" />
|
||||
<!-- android:radius 弧形的半径 -->
|
||||
<!-- 设置按钮的四个角为弧形 -->
|
||||
<corners
|
||||
android:radius="15dp" />
|
||||
<!--也可单独设置-->
|
||||
<solid android:color="#FFD700" />
|
||||
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#FFD700" />
|
||||
|
||||
<padding
|
||||
android:bottom="5dp"
|
||||
android:left="0dp"
|
||||
android:right="0dp"
|
||||
android:top="5dp" />
|
||||
</shape>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<solid android:color="#FFFFFF" />
|
||||
<!-- android:radius 弧形的半径 -->
|
||||
<!-- 设置按钮的四个角为弧形 -->
|
||||
<corners
|
||||
android:radius="15dp" />
|
||||
<!--也可单独设置-->
|
||||
<solid android:color="#FFFFFF" />
|
||||
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#FFD700" />
|
||||
|
||||
<padding
|
||||
android:bottom="2dp"
|
||||
android:left="0dp"
|
||||
android:right="0dp"
|
||||
android:top="2dp" />
|
||||
</shape>
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<solid android:color="#FFFFFF" />
|
||||
|
||||
<stroke
|
||||
android:width="2dp"
|
||||
android:color="#FFD700" />
|
||||
|
||||
<padding
|
||||
android:bottom="2dp"
|
||||
android:left="0dp"
|
||||
android:right="0dp"
|
||||
android:top="0dp" />
|
||||
</shape>
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<solid android:color="#F5F5F5" />
|
||||
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#DCDCDC" />
|
||||
|
||||
<padding
|
||||
android:bottom="0dp"
|
||||
android:left="0dp"
|
||||
android:right="0dp"
|
||||
android:top="1dp" />
|
||||
</shape>
|
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<solid android:color="#FFFFFF" />
|
||||
|
||||
<stroke
|
||||
android:width="0.1dp"
|
||||
android:color="#F5F5F5" />
|
||||
<corners
|
||||
android:topLeftRadius="30dp"
|
||||
android:bottomLeftRadius="30dp"
|
||||
android:bottomRightRadius="30dp"
|
||||
android:topRightRadius="30dp"/>
|
||||
<padding
|
||||
android:bottom="0dp"
|
||||
android:left="0dp"
|
||||
android:right="0dp"
|
||||
android:top="1dp" />
|
||||
</shape>
|
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<solid android:color="#F5F5F5" />
|
||||
|
||||
<stroke
|
||||
android:width="0.1dp"
|
||||
android:color="#F5F5F5" />
|
||||
<corners
|
||||
android:topLeftRadius="30dip"
|
||||
android:bottomLeftRadius="30dp"/>
|
||||
<padding
|
||||
android:bottom="0dp"
|
||||
android:left="0dp"
|
||||
android:right="0dp"
|
||||
android:top="1dp" />
|
||||
</shape>
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<solid android:color="#FFFFFF" />
|
||||
|
||||
<stroke
|
||||
android:width="0.1dp"
|
||||
android:color="#FFFFFF" />
|
||||
|
||||
<padding
|
||||
android:bottom="0dp"
|
||||
android:left="0dp"
|
||||
android:right="0dp"
|
||||
android:top="1dp" />
|
||||
</shape>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<solid android:color="#FFFFFF" />
|
||||
<!-- android:radius 弧形的半径 -->
|
||||
<!-- 设置按钮的四个角为弧形 -->
|
||||
<corners
|
||||
android:radius="15dp" />
|
||||
<!--也可单独设置-->
|
||||
<solid android:color="#DCDCDC" />
|
||||
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#DCDCDC" />
|
||||
|
||||
<padding
|
||||
android:bottom="5dp"
|
||||
android:left="5dp"
|
||||
android:right="5dp"
|
||||
android:top="5dp" />
|
||||
</shape>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<solid android:color="#FFFFFF" />
|
||||
<!-- android:radius 弧形的半径 -->
|
||||
<!-- 设置按钮的四个角为弧形 -->
|
||||
<corners
|
||||
android:radius="15dp" />
|
||||
<!--也可单独设置-->
|
||||
<solid android:color="#FFFFFF" />
|
||||
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#FFD700" />
|
||||
|
||||
<padding
|
||||
android:bottom="5dp"
|
||||
android:left="5dp"
|
||||
android:right="5dp"
|
||||
android:top="5dp" />
|
||||
</shape>
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<solid android:color="#FFFFFF" />
|
||||
|
||||
<stroke
|
||||
android:width="0.1dp"
|
||||
android:color="#FFD700" />
|
||||
|
||||
<padding
|
||||
android:bottom="0dp"
|
||||
android:left="0dp"
|
||||
android:right="0dp"
|
||||
android:top="1dp" />
|
||||
</shape>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<solid android:color="#FFFFFF" />
|
||||
<!-- android:radius 弧形的半径 -->
|
||||
<!-- 设置按钮的四个角为弧形 -->
|
||||
<corners
|
||||
android:radius="15dp" />
|
||||
<!--也可单独设置-->
|
||||
<solid android:color="#00000000" />
|
||||
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#FFD700" />
|
||||
|
||||
<padding
|
||||
android:bottom="5dp"
|
||||
android:left="5dp"
|
||||
android:right="5dp"
|
||||
android:top="5dp" />
|
||||
</shape>
|
@ -0,0 +1,34 @@
|
||||
<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:fillType="evenOdd"
|
||||
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="78.5885"
|
||||
android:endY="90.9159"
|
||||
android:startX="48.7653"
|
||||
android:startY="61.0927"
|
||||
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="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
After Width: | Height: | Size: 129 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 110 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 28 KiB |