├── LICENSE.md ├── README.md ├── WX20170719-173330@2x.png ├── WX20170719-173400@2x.png ├── WX20170719-173430@2x.png ├── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── import-summary.txt ├── local.properties ├── settings.gradle └── shenhuaaccount ├── build.gradle ├── libs ├── jsoup.jar └── jxl.jar ├── lint.xml ├── proguard-project.txt ├── shenhuaaccount-release.apk └── src └── main ├── AndroidManifest.xml ├── assets └── fonts │ ├── Roboto-Light.ttf │ ├── Roboto-Thin.ttf │ ├── RobotoCondensed-Bold.ttf │ └── RobotoCondensed-Regular.ttf ├── java └── com │ └── shenhua │ └── account │ ├── Fragment_Count.java │ ├── Fragment_Fenpei.java │ ├── Fragment_History.java │ ├── Fragment_Home.java │ ├── Fragment_Home_None.java │ ├── Fragment_Yusuan.java │ ├── MainActivity.java │ ├── act │ ├── ActivityAbout.java │ ├── ActivityAboutWeb.java │ ├── ActivityAddAccount.java │ ├── ActivityMaGdkx.java │ ├── ActivityMaIncome.java │ ├── ActivityMaLeibie.java │ ├── ActivitySetting.java │ └── SplashActivity.java │ ├── adapter │ ├── HomeAccountAdapter.java │ └── LimitListAdapter.java │ ├── bean │ ├── AccountData.java │ ├── CheckUpdate.java │ ├── GdkzData.java │ ├── LimitData.java │ ├── MD5Util.java │ ├── MyApplication.java │ ├── MyStringUtils.java │ └── NetworkUtil.java │ ├── dao │ ├── DatabaseOutput.java │ └── MyDataBase.java │ └── ui │ ├── AnimationUtils.java │ ├── MyGradientProgressBar.java │ ├── MyIndicatorView.java │ ├── MyLineChart.java │ ├── MyPiechart.java │ ├── NumberProgressBar.java │ ├── SnackbarManager.java │ └── TSnackbar.java └── res ├── anim ├── slide_right.xml ├── top_in.xml └── top_out.xml ├── drawable-hdpi ├── group_down.png ├── group_up.png ├── ic_about_shareapp_ewm.png ├── ic_add.png ├── ic_back.png ├── ic_back_delete_normal.png ├── ic_back_delete_press.png ├── ic_backspace_disabled.png ├── ic_backspace_normal.png ├── ic_cancle.png ├── ic_come.png ├── ic_done.png ├── ic_income.png ├── ic_keybord_nor.png ├── ic_keybord_pre.png ├── ic_launcher.png ├── ic_logo.png ├── ic_menu.png ├── ic_nonet.png ├── ic_nv_about.png ├── ic_nv_exit.png ├── ic_nv_menu01.png ├── ic_nv_menu02.png ├── ic_nv_menu03.png ├── ic_nv_menu04.png ├── ic_nv_menu05.png ├── ic_setting.png ├── ic_share.png ├── ic_sp_nor.9.png ├── ic_sp_pre.9.png ├── ic_update.png ├── image_color_cdcdcd.png ├── image_color_theme.png └── splash_bg.png ├── drawable-mdpi └── ic_launcher.png ├── drawable-xhdpi └── ic_launcher.png ├── drawable-xxhdpi └── ic_launcher.png ├── drawable ├── about_dialog_btn_bg.xml ├── about_layout_bg.xml ├── calender_btn.xml ├── calender_circlebg.xml ├── calender_circlering.xml ├── calender_done_btn.xml ├── calender_rectbg.xml ├── calender_textselector.xml ├── divider_line.xml ├── expander_ic_folder.xml ├── pressed_background_cash_neutral.xml ├── pressed_background_cash_theme.xml ├── selector_backbutton.xml ├── selector_backdelete_bg.xml ├── selector_bg_yusuan_lv_item.xml ├── selector_keyboard_bg.xml ├── selector_layout_bg.xml ├── selector_rv_item_bg.xml ├── selector_tv_bg.xml ├── spinner_selector.xml ├── text_item_bg.xml ├── text_item_bottom_bg.xml └── text_item_top_bg.xml ├── layout ├── activity_about.xml ├── activity_about_web.xml ├── activity_add.xml ├── activity_add_other.xml ├── activity_ma_gdkx.xml ├── activity_ma_gdkx_gv_item.xml ├── activity_ma_income.xml ├── activity_ma_income_dialog.xml ├── activity_ma_income_lv_item.xml ├── activity_ma_leibie.xml ├── activity_ma_leibie_add.xml ├── activity_ma_leibie_add_spinner_item.xml ├── activity_ma_leibie_lv_item.xml ├── activity_main.xml ├── activity_setting.xml ├── activity_setting_dialog.xml ├── activity_splash.xml ├── activity_splash_keyboard.xml ├── content_count.xml ├── content_fenpei.xml ├── content_fenpei_gv_item.xml ├── content_history.xml ├── content_history_e_list_child_item.xml ├── content_history_e_list_parent_item.xml ├── content_home.xml ├── content_home_lv_item.xml ├── content_home_none.xml ├── content_yusuan.xml ├── content_yusuan_lv_item.xml ├── dialog_add_amount.xml ├── dialog_calender.xml ├── dialog_calender_gv_item.xml ├── dialog_shareapp.xml ├── dialog_update.xml ├── navigation_header.xml ├── toolbar.xml ├── tsnackbar_layout.xml └── tsnackbar_layout_include.xml ├── menu ├── nav_menu.xml ├── toolbar_menu.xml ├── toolbar_menu_add.xml ├── toolbar_menu_add_leibie.xml └── toolbar_mune_maincome.xml ├── values-v11 └── styles.xml ├── values-v14 └── styles.xml ├── values-v23 └── styles.xml ├── values-w820dp └── dimens.xml └── values ├── attrs.xml ├── color.xml ├── dimens.xml ├── strings.xml └── styles.xml /README.md: -------------------------------------------------------------------------------- 1 | # Account-android 2 | new shenhua account. 3 | 4 | ![](https://github.com/shenhuanet/shenhua-account-new/raw/master/WX20170719-173330@2x.png) 5 | 6 | ![](https://github.com/shenhuanet/shenhua-account-new/raw/master/WX20170719-173400@2x.png) 7 | 8 | ![](https://github.com/shenhuanet/shenhua-account-new/raw/master/WX20170719-173430@2x.png) 9 | 10 | ## About Me 11 | CSDN:http://blog.csdn.net/klxh2009
12 | JianShu:http://www.jianshu.com/u/12a81897d5bc 13 | 14 | ## License 15 | 16 | Copyright (C) 2017 shenhuanet 17 | 18 | This program is free software; you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation; either version 2 of the License, or 21 | (at your option) any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License along 29 | with this program; if not, write to the Free Software Foundation, Inc., 30 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 31 | -------------------------------------------------------------------------------- /WX20170719-173330@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/WX20170719-173330@2x.png -------------------------------------------------------------------------------- /WX20170719-173400@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/WX20170719-173400@2x.png -------------------------------------------------------------------------------- /WX20170719-173430@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/WX20170719-173430@2x.png -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | repositories { 4 | jcenter() 5 | } 6 | dependencies { 7 | classpath 'com.android.tools.build:gradle:2.2.2' 8 | } 9 | } 10 | 11 | allprojects { 12 | repositories { 13 | jcenter() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Dec 28 10:00:20 PST 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 7 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /import-summary.txt: -------------------------------------------------------------------------------- 1 | ECLIPSE ANDROID PROJECT IMPORT SUMMARY 2 | ====================================== 3 | 4 | Manifest Merging: 5 | ----------------- 6 | Your project uses libraries that provide manifests, and your Eclipse 7 | project did not explicitly turn on manifest merging. In Android Gradle 8 | projects, manifests are always merged (meaning that contents from your 9 | libraries' manifests will be merged into the app manifest. If you had 10 | manually copied contents from library manifests into your app manifest 11 | you may need to remove these for the app to build correctly. 12 | 13 | Ignored Files: 14 | -------------- 15 | The following files were *not* copied into the new Gradle project; you 16 | should evaluate whether these are still needed in your project and if 17 | so manually move them: 18 | 19 | From android-support-recyclerview: 20 | * .amateras 21 | * README.txt 22 | From shenhuaaccount: 23 | * github.txt 24 | * ic_launcher-web.png 25 | * proguard\ 26 | * proguard\dump.txt 27 | * proguard\mapping.txt 28 | * proguard\seeds.txt 29 | * proguard\usage.txt 30 | 31 | Replaced Jars with Dependencies: 32 | -------------------------------- 33 | The importer recognized the following .jar files as third party 34 | libraries and replaced them with Gradle dependencies instead. This has 35 | the advantage that more explicit version information is known, and the 36 | libraries can be updated automatically. However, it is possible that 37 | the .jar file in your project was of an older version than the 38 | dependency we picked, which could render the project not compileable. 39 | You can disable the jar replacement in the import wizard and try again: 40 | 41 | android-support-v4.jar => com.android.support:support-v4:23.4.0 42 | android-support-v7-appcompat.jar => com.android.support:appcompat-v7:23.4.0 43 | 44 | Replaced Libraries with Dependencies: 45 | ------------------------------------- 46 | The importer recognized the following library projects as third party 47 | libraries and replaced them with Gradle dependencies instead. This has 48 | the advantage that more explicit version information is known, and the 49 | libraries can be updated automatically. However, it is possible that 50 | the source files in your project were of an older version than the 51 | dependency we picked, which could render the project not compileable. 52 | You can disable the library replacement in the import wizard and try 53 | again: 54 | 55 | android-support-v7-appcompat => [com.android.support:appcompat-v7:23.4.0] 56 | 57 | Moved Files: 58 | ------------ 59 | Android Gradle projects use a different directory structure than ADT 60 | Eclipse projects. Here's how the projects were restructured: 61 | 62 | In android-support-design: 63 | * AndroidManifest.xml => androidsupportdesign\src\main\AndroidManifest.xml 64 | * assets\ => androidsupportdesign\src\main\assets 65 | * res\ => androidsupportdesign\src\main\res\ 66 | * src\ => androidsupportdesign\src\main\java 67 | * src\.readme => androidsupportdesign\src\main\resources\.readme 68 | In android-support-recyclerview: 69 | * AndroidManifest.xml => androidsupportrecyclerview\src\main\AndroidManifest.xml 70 | * assets\ => androidsupportrecyclerview\src\main\assets 71 | * res\ => androidsupportrecyclerview\src\main\res\ 72 | * src\ => androidsupportrecyclerview\src\main\java 73 | In shenhuaaccount: 74 | * AndroidManifest.xml => shenhuaaccount\src\main\AndroidManifest.xml 75 | * assets\ => shenhuaaccount\src\main\assets\ 76 | * libs\jsoup.jar => shenhuaaccount\libs\jsoup.jar 77 | * libs\jxl.jar => shenhuaaccount\libs\jxl.jar 78 | * lint.xml => shenhuaaccount\lint.xml 79 | * proguard-project.txt => shenhuaaccount\proguard-project.txt 80 | * res\ => shenhuaaccount\src\main\res\ 81 | * src\ => shenhuaaccount\src\main\java\ 82 | 83 | Next Steps: 84 | ----------- 85 | You can now build the project. The Gradle project needs network 86 | connectivity to download dependencies. 87 | 88 | Bugs: 89 | ----- 90 | If for some reason your project does not build, and you determine that 91 | it is due to a bug or limitation of the Eclipse to Gradle importer, 92 | please file a bug at http://b.android.com with category 93 | Component-Tools. 94 | 95 | (This import summary is for your information only, and can be deleted 96 | after import once you are satisfied with the results.) 97 | -------------------------------------------------------------------------------- /local.properties: -------------------------------------------------------------------------------- 1 | ## This file is automatically generated by Android Studio. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must *NOT* be checked into Version Control Systems, 5 | # as it contains information specific to your local configuration. 6 | # 7 | # Location of the SDK. This is only used by Gradle. 8 | # For customization when using a Version Control System, please read the 9 | # header note. 10 | #Tue Nov 29 20:57:29 CST 2016 11 | ndk.dir=D\:\\Android\\SDK\\ndk-bundle 12 | sdk.dir=D\:\\Android\\SDK 13 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':shenhuaaccount' 2 | -------------------------------------------------------------------------------- /shenhuaaccount/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | signingConfigs { 5 | } 6 | compileSdkVersion 23 7 | buildToolsVersion "25.0.1" 8 | defaultConfig { 9 | applicationId "com.shenhua.account" 10 | minSdkVersion 14 11 | targetSdkVersion 23 12 | compileOptions { 13 | sourceCompatibility JavaVersion.VERSION_1_7 14 | targetCompatibility JavaVersion.VERSION_1_7 15 | } 16 | } 17 | buildTypes { 18 | release { 19 | minifyEnabled true 20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt' 21 | } 22 | } 23 | } 24 | 25 | dependencies { 26 | compile fileTree(include: ['*.jar'], dir: 'libs') 27 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 28 | exclude group: 'com.android.support', module: 'support-annotations' 29 | }) 30 | testCompile 'junit:junit:4.12' 31 | compile 'com.android.support:appcompat-v7:23.4.0' 32 | compile 'com.android.support:recyclerview-v7:23.4.0' 33 | compile 'com.android.support:design:23.4.0' 34 | } 35 | -------------------------------------------------------------------------------- /shenhuaaccount/libs/jsoup.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/libs/jsoup.jar -------------------------------------------------------------------------------- /shenhuaaccount/libs/jxl.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/libs/jxl.jar -------------------------------------------------------------------------------- /shenhuaaccount/lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /shenhuaaccount/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | #保持第三方包不被混淆 22 | #-libraryjars libs/jxl.jar 23 | #-libraryjars libs/jsoup.jar 24 | 25 | #保持某些类不被混淆 26 | -keep public class * extends android.support.v4.** 27 | -keep public class com.shenhua.account.dao.DatabaseOutput 28 | 29 | # 保持自定义控件类不被混淆 30 | -keepclasseswithmembers class * { 31 | public (android.content.Context, android.util.AttributeSet); 32 | } 33 | 34 | # 保持自定义控件类不被混淆 35 | -keepclasseswithmembers class * { 36 | public (android.content.Context, android.util.AttributeSet, int); 37 | } 38 | 39 | # 保持自定义控件类不被混淆 40 | -keepclassmembers class * extends android.app.Activity { 41 | public void *(android.view.View); 42 | } 43 | 44 | #-keep public class com.shenhua.account.ui.MyGradientProgressBar 45 | #-keep public class com.shenhua.account.ui.MyIndicatorView 46 | #-keep public class com.shenhua.account.ui.MyLineChart 47 | #-keep public class com.shenhua.account.ui.MyPiechart 48 | #-keep public class com.shenhua.account.ui.NumberProgressBar 49 | 50 | #support支持包不提醒 51 | -dontwarn android.support.** 52 | -------------------------------------------------------------------------------- /shenhuaaccount/shenhuaaccount-release.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/shenhuaaccount-release.apk -------------------------------------------------------------------------------- /shenhuaaccount/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/assets/fonts/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/assets/fonts/Roboto-Light.ttf -------------------------------------------------------------------------------- /shenhuaaccount/src/main/assets/fonts/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/assets/fonts/Roboto-Thin.ttf -------------------------------------------------------------------------------- /shenhuaaccount/src/main/assets/fonts/RobotoCondensed-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/assets/fonts/RobotoCondensed-Bold.ttf -------------------------------------------------------------------------------- /shenhuaaccount/src/main/assets/fonts/RobotoCondensed-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/assets/fonts/RobotoCondensed-Regular.ttf -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/Fragment_Count.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account; 2 | 3 | import com.shenhua.account.bean.MyStringUtils; 4 | import com.shenhua.account.dao.MyDataBase; 5 | import com.shenhua.account.ui.MyLineChart; 6 | import android.os.Bundle; 7 | import android.support.v4.app.Fragment; 8 | import android.util.DisplayMetrics; 9 | import android.view.LayoutInflater; 10 | import android.view.View; 11 | import android.view.ViewGroup; 12 | import android.view.animation.AlphaAnimation; 13 | import android.view.animation.Animation; 14 | import android.view.animation.AnimationSet; 15 | import android.view.animation.LayoutAnimationController; 16 | import android.view.animation.LinearInterpolator; 17 | import android.view.animation.TranslateAnimation; 18 | import android.widget.RelativeLayout; 19 | import android.widget.TextView; 20 | 21 | public class Fragment_Count extends Fragment { 22 | 23 | private MyDataBase database; 24 | private View view; 25 | private TextView content_count_title; 26 | private RelativeLayout count_rl; 27 | private String title, year; 28 | private float expend, income; 29 | private float[] eachmonthexpend = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, eachmonthincome = { 0, 0, 0, 0, 31 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; 32 | private int countofincome; 33 | static int width; 34 | int height; 35 | 36 | @Override 37 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 38 | Bundle savedInstanceState) { 39 | if (view == null) { 40 | view = inflater.inflate(R.layout.content_count, container, false); 41 | count_rl = (RelativeLayout) view.findViewById(R.id.count_rl); 42 | content_count_title = (TextView) view 43 | .findViewById(R.id.content_count_title); 44 | title = getContext().getString(R.string.count_title); 45 | year = MyStringUtils.getSysNowTime(4); 46 | database = new MyDataBase(getContext()); 47 | database.open(); 48 | } 49 | ViewGroup parent = (ViewGroup) view.getParent(); 50 | if (parent != null) { 51 | parent.removeView(view); 52 | } 53 | initDataAndView(); 54 | initLineChartView(); 55 | return view; 56 | } 57 | 58 | private void initDataAndView() { 59 | income = database.getSR_sum(MyStringUtils.INDEX_TABLE_SRZC_SR); 60 | expend = database.getSR_sum(MyStringUtils.INDEX_TABLE_SRZC_ZC); 61 | countofincome = database.getCount(2, "income_record", ""); 62 | for (int i = 0; i < MyStringUtils.monthStrings.length; i++) { 63 | eachmonthincome[i] = Float.parseFloat(database.getSRGL(0, 64 | MyStringUtils.monthStrings[i])); 65 | eachmonthexpend[i] = Float.parseFloat(database.getSRGL(1, 66 | MyStringUtils.monthStrings[i])); 67 | if (expend != 0) { 68 | MyLineChart.Percent_Expend[i] = (eachmonthexpend[i] / expend) * 100; 69 | } 70 | if (income != 0) { 71 | MyLineChart.Percent_Income[i] = (eachmonthincome[i] / income) * 100; 72 | } 73 | } 74 | database.close(); 75 | String str = String.format(title, year, expend, income, countofincome); 76 | content_count_title.setText(str); 77 | AnimationSet set = new AnimationSet(true); 78 | Animation animation = new AlphaAnimation(0.0f, 1.0f); 79 | animation.setDuration(1500); 80 | set.addAnimation(animation); 81 | animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, 82 | Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 83 | 1.0f, Animation.RELATIVE_TO_SELF, 0.0f); 84 | animation.setDuration(3000); 85 | animation.setInterpolator(new LinearInterpolator()); 86 | set.addAnimation(animation); 87 | LayoutAnimationController controller = new LayoutAnimationController( 88 | set, 1f); 89 | controller.setOrder(LayoutAnimationController.ORDER_NORMAL); 90 | count_rl.setLayoutAnimation(controller); 91 | } 92 | 93 | private void initLineChartView() { 94 | DisplayMetrics dm = new DisplayMetrics(); 95 | getActivity().getWindowManager().getDefaultDisplay().getMetrics(dm); 96 | width = dm.widthPixels; 97 | height = dm.heightPixels; 98 | MyLineChart.right = width - 35; 99 | MyLineChart.gapX = (width - 70) / 11; 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/Fragment_Fenpei.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | import com.shenhua.account.bean.LimitData; 6 | import com.shenhua.account.dao.MyDataBase; 7 | import android.graphics.Color; 8 | import android.os.Bundle; 9 | import android.os.Handler; 10 | import android.support.v4.app.Fragment; 11 | import android.view.LayoutInflater; 12 | import android.view.View; 13 | import android.view.ViewGroup; 14 | import android.widget.BaseAdapter; 15 | import android.widget.GridView; 16 | import android.widget.TextView; 17 | 18 | public class Fragment_Fenpei extends Fragment { 19 | 20 | private View view; 21 | private GridView gv; 22 | private List mDatas = new ArrayList(); 23 | private Handler handler = new Handler(); 24 | 25 | @Override 26 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 27 | Bundle savedInstanceState) { 28 | if (view == null) { 29 | view = inflater.inflate(R.layout.content_fenpei, container, false); 30 | gv = (GridView) view.findViewById(R.id.fenpei_gv); 31 | new Thread(new Runnable() { 32 | @Override 33 | public void run() { 34 | initData(); 35 | handler.post(new Runnable() { 36 | 37 | @Override 38 | public void run() { 39 | GvAdapter adapter = new GvAdapter(); 40 | gv.setAdapter(adapter); 41 | } 42 | }); 43 | } 44 | }).start(); 45 | } 46 | ViewGroup parent = (ViewGroup) view.getParent(); 47 | if (parent != null) { 48 | parent.removeView(view); 49 | } 50 | return view; 51 | } 52 | 53 | private void initData() { 54 | MyDataBase dataBase = new MyDataBase(getContext()); 55 | dataBase.open(); 56 | mDatas.clear(); 57 | mDatas = dataBase.getLimits(); 58 | dataBase.close(); 59 | } 60 | 61 | private class GvAdapter extends BaseAdapter { 62 | 63 | @Override 64 | public int getCount() { 65 | return mDatas.size(); 66 | } 67 | 68 | @Override 69 | public Object getItem(int arg0) { 70 | return null; 71 | } 72 | 73 | @Override 74 | public long getItemId(int arg0) { 75 | return arg0; 76 | } 77 | 78 | @Override 79 | public View getView(int arg0, View arg1, ViewGroup arg2) { 80 | final ViewHolder holder; 81 | if (arg1 == null) { 82 | LayoutInflater inflater = LayoutInflater.from(getContext()); 83 | arg1 = inflater.inflate(R.layout.content_fenpei_gv_item, 84 | (ViewGroup) arg1, false); 85 | holder = new ViewHolder(); 86 | holder.view = arg1.findViewById(R.id.fenpei_gv_view); 87 | holder.tv = (TextView) arg1.findViewById(R.id.fenpei_gv_tv); 88 | arg1.setTag(holder); 89 | } else { 90 | holder = (ViewHolder) arg1.getTag(); 91 | } 92 | LimitData data = mDatas.get(arg0); 93 | holder.view.setBackgroundColor(Color.parseColor(data.getColor())); 94 | holder.tv.setText(data.getType()); 95 | return arg1; 96 | } 97 | 98 | class ViewHolder { 99 | View view; 100 | TextView tv; 101 | } 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/Fragment_History.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account; 2 | 3 | import com.shenhua.account.dao.MyDataBase; 4 | import android.content.Context; 5 | import android.database.Cursor; 6 | import android.os.Bundle; 7 | import android.support.v4.app.Fragment; 8 | import android.view.LayoutInflater; 9 | import android.view.View; 10 | import android.view.ViewGroup; 11 | import android.widget.BaseExpandableListAdapter; 12 | import android.widget.CursorTreeAdapter; 13 | import android.widget.ExpandableListView; 14 | import android.widget.ImageView; 15 | import android.widget.TextView; 16 | import android.widget.ExpandableListView.OnChildClickListener; 17 | import android.widget.ExpandableListView.OnGroupClickListener; 18 | 19 | public class Fragment_History extends Fragment { 20 | 21 | private int[] group_checked = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; 23 | private View view; 24 | private ExpandableListView e_list; 25 | private TextView tvEmpty; 26 | private MyDataBase dataBase; 27 | private MyCursrTreeAdapter myCursorTreeAdapter; 28 | private static final int groupName_index = 1; 29 | private static final int time_index = 3; 30 | private static final int type_index = 1; 31 | private static final int money_index = 2; 32 | private static final int mark_index = 6; 33 | int groupNameIndex; 34 | String mygroupName; 35 | Cursor groupCursor; 36 | 37 | @Override 38 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 39 | Bundle savedInstanceState) { 40 | if (view == null) { 41 | view = inflater.inflate(R.layout.content_history, container, false); 42 | tvEmpty = (TextView) view.findViewById(R.id.history_list_empty); 43 | e_list = (ExpandableListView) view.findViewById(R.id.history_list); 44 | e_list.setGroupIndicator(null); 45 | e_list.setEmptyView(tvEmpty); 46 | dataBase = new MyDataBase(getContext()); 47 | dataBase.open(); 48 | } 49 | ViewGroup parent = (ViewGroup) view.getParent(); 50 | if (parent != null) { 51 | parent.removeView(view); 52 | } 53 | initAdapterView(); 54 | return view; 55 | } 56 | 57 | public class MyCursrTreeAdapter extends CursorTreeAdapter { 58 | 59 | public MyCursrTreeAdapter(Cursor cursor, Context context, 60 | boolean autoRequery) { 61 | super(cursor, context, autoRequery); 62 | } 63 | 64 | @Override 65 | protected void bindGroupView(View view, Context context, Cursor cursor, 66 | boolean isExpanded) { 67 | // TODO bindGroupView 68 | TextView group_title = (TextView) view 69 | .findViewById(R.id.group_title); 70 | String group = cursor.getString(groupName_index); 71 | group_title.setText(group); 72 | TextView groupCount = (TextView) view 73 | .findViewById(R.id.group_count); 74 | int count = dataBase.getCount(3, "accounts", group); 75 | groupCount.setText("[" + count + "]"); 76 | ImageView group_state = (ImageView) view 77 | .findViewById(R.id.group_state); 78 | if (isExpanded) { 79 | group_state.setBackgroundResource(R.drawable.group_up); 80 | } else { 81 | group_state.setBackgroundResource(R.drawable.group_down); 82 | } 83 | } 84 | 85 | @Override 86 | protected View newGroupView(Context context, Cursor cursor, 87 | boolean isExpanded, ViewGroup parent) { 88 | LayoutInflater inflate = LayoutInflater.from(getContext()); 89 | View view = inflate.inflate( 90 | R.layout.content_history_e_list_parent_item, parent, false); 91 | 92 | bindGroupView(view, context, cursor, isExpanded); 93 | 94 | return view; 95 | } 96 | 97 | @Override 98 | protected Cursor getChildrenCursor(Cursor groupCursor) { 99 | String groupName = groupCursor.getString(groupName_index); 100 | Cursor childCursor = dataBase.getAccountByGroups(1, groupName); 101 | return childCursor; 102 | } 103 | 104 | @Override 105 | protected View newChildView(Context context, Cursor cursor, 106 | boolean isLastChild, ViewGroup parent) { 107 | LayoutInflater inflate = LayoutInflater.from(getContext()); 108 | View view = inflate.inflate( 109 | R.layout.content_history_e_list_child_item, parent, false); 110 | bindChildView(view, context, cursor, isLastChild); 111 | return view; 112 | } 113 | 114 | @Override 115 | protected void bindChildView(View view, Context context, Cursor cursor, 116 | boolean isLastChild) { 117 | // TODO bindChildView 118 | TextView time = (TextView) view.findViewById(R.id.child_text_time); 119 | time.setText(cursor.getString(time_index)); 120 | TextView type = (TextView) view.findViewById(R.id.child_text_type); 121 | type.setTextKeepState(cursor.getString(type_index)); 122 | TextView money = (TextView) view 123 | .findViewById(R.id.child_text_money); 124 | money.setTextKeepState(cursor.getString(money_index) + " " 125 | + getString(R.string.rmb)); 126 | TextView mark = (TextView) view.findViewById(R.id.child_text_mark); 127 | mark.setTextKeepState(cursor.getString(mark_index)); 128 | } 129 | } 130 | 131 | private void initAdapterView() { 132 | // TODO initAdapterView 133 | groupCursor = dataBase.getAccountByGroups(0, ""); 134 | // getActivity().startManagingCursor(groupCursor); 135 | groupNameIndex = groupCursor.getColumnIndexOrThrow("_month"); 136 | myCursorTreeAdapter = new MyCursrTreeAdapter(groupCursor, getContext(), 137 | true); 138 | e_list.setAdapter(myCursorTreeAdapter); 139 | e_list.setOnGroupClickListener(new OnGroupClickListener() { 140 | 141 | @Override 142 | public boolean onGroupClick(ExpandableListView parent, View v, 143 | int groupPosition, long id) { 144 | group_checked[groupPosition] = group_checked[groupPosition] + 1; 145 | ((BaseExpandableListAdapter) myCursorTreeAdapter) 146 | .notifyDataSetChanged(); 147 | return false; 148 | } 149 | }); 150 | e_list.setOnChildClickListener(new OnChildClickListener() { 151 | 152 | @Override 153 | public boolean onChildClick(ExpandableListView parent, View v, 154 | int groupPosition, int childPosition, long id) { 155 | 156 | ((BaseExpandableListAdapter) myCursorTreeAdapter) 157 | .notifyDataSetChanged(); 158 | return false; 159 | } 160 | }); 161 | } 162 | 163 | @Override 164 | public void onDestroy() { 165 | super.onDestroy(); 166 | groupCursor.close(); 167 | dataBase.close(); 168 | } 169 | 170 | } 171 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/Fragment_Home.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | import com.shenhua.account.adapter.HomeAccountAdapter; 8 | import com.shenhua.account.bean.MyStringUtils; 9 | import com.shenhua.account.dao.MyDataBase; 10 | 11 | import android.graphics.Color; 12 | import android.graphics.Typeface; 13 | import android.os.Bundle; 14 | import android.os.Handler; 15 | import android.os.Message; 16 | import android.support.v4.app.Fragment; 17 | import android.util.Log; 18 | import android.view.LayoutInflater; 19 | import android.view.View; 20 | import android.view.ViewGroup; 21 | import android.widget.AdapterView; 22 | import android.widget.AdapterView.OnItemClickListener; 23 | import android.widget.ListView; 24 | import android.widget.TextView; 25 | import android.widget.Toast; 26 | 27 | public class Fragment_Home extends Fragment { 28 | 29 | private static final int MSG_GETDATAS_DONE = 0x1; 30 | private View view, frame_home_head; 31 | private TextView tv_count, tv_info, tv_month; 32 | private ListView lisView; 33 | private HomeAccountAdapter adapter; 34 | private String month, count, info; 35 | private MyHandler myHandler; 36 | private MyDataBase dataBase; 37 | private ArrayList> datas = new ArrayList>(); 38 | private List l = new ArrayList<>(); 39 | 40 | @Override 41 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 42 | Bundle savedInstanceState) { 43 | if (view == null) { 44 | dataBase = new MyDataBase(getContext()); 45 | dataBase.open(); 46 | view = inflater.inflate(R.layout.content_home, container, false); 47 | frame_home_head = view.findViewById(R.id.frame_home_head); 48 | tv_count = (TextView) view.findViewById(R.id.frame_home_tv_count); 49 | tv_info = (TextView) view.findViewById(R.id.frame_home_tv_info); 50 | tv_month = (TextView) view.findViewById(R.id.frame_home_tv_month); 51 | Typeface typeFace = Typeface.createFromAsset(getActivity() 52 | .getAssets(), "fonts/RobotoCondensed-Bold.ttf"); 53 | tv_count.setTypeface(typeFace); 54 | lisView = (ListView) view.findViewById(R.id.frame_home_lv); 55 | TextView empty = (TextView) view 56 | .findViewById(R.id.frame_home_lv_empty); 57 | lisView.setEmptyView(empty); 58 | lisView.setOnItemClickListener(new OnItemClickListener() { 59 | 60 | @Override 61 | public void onItemClick(AdapterView parent, View view, 62 | int position, long id) { 63 | Log.e("homelist", Integer.toString(position)); 64 | Toast.makeText(getContext(), 65 | "homelist" + Integer.toString(position), 66 | Toast.LENGTH_SHORT).show(); 67 | } 68 | }); 69 | 70 | } 71 | ViewGroup parent = (ViewGroup) view.getParent(); 72 | if (parent != null) { 73 | parent.removeView(view); 74 | } 75 | new Thread(new Runnable() { 76 | 77 | @Override 78 | public void run() { 79 | datas = dataBase.getHomeData(); 80 | getHeadInfo(); 81 | handler.sendEmptyMessage(MSG_GETDATAS_DONE); 82 | } 83 | }).start(); 84 | return view; 85 | } 86 | 87 | private Handler handler = new Handler() { 88 | 89 | @Override 90 | public void handleMessage(Message msg) { 91 | super.handleMessage(msg); 92 | switch (msg.what) { 93 | case MSG_GETDATAS_DONE: 94 | adapter = new HomeAccountAdapter(datas, getContext()); 95 | lisView.setAdapter(adapter); 96 | tv_month.setText(month); 97 | tv_count.setText(count); 98 | tv_info.setText(info); 99 | for (int i = 0; i < datas.size(); i++) { 100 | l.add(i, datas.get(i).get("pro").hashCode()); 101 | } 102 | myHandler = new MyHandler(); 103 | for (int i = 0; i < datas.size(); i++) { 104 | new Thread(new UpdateRunnable(i, 40, myHandler, l.get(i))) 105 | .start(); 106 | } 107 | dataBase.close(); 108 | break; 109 | } 110 | } 111 | }; 112 | 113 | class UpdateRunnable implements Runnable { 114 | int id; 115 | int currentPos = 0; 116 | int delay; 117 | MyHandler handler; 118 | int pos; 119 | 120 | public UpdateRunnable(int id, int delay, MyHandler handler, int pos) { 121 | this.id = id; 122 | this.handler = handler; 123 | this.delay = delay; 124 | this.pos = pos; 125 | } 126 | 127 | @Override 128 | public void run() { 129 | while (currentPos <= pos) { 130 | Message msg = handler.obtainMessage(); 131 | msg.what = 1; 132 | msg.arg1 = id; 133 | msg.arg2 = currentPos; 134 | currentPos = currentPos + 1; 135 | msg.sendToTarget(); 136 | try { 137 | Thread.sleep(delay); 138 | } catch (InterruptedException e) { 139 | e.printStackTrace(); 140 | } 141 | } 142 | } 143 | 144 | } 145 | 146 | class MyHandler extends Handler { 147 | @Override 148 | public void handleMessage(Message msg) { 149 | switch (msg.what) { 150 | case 1: 151 | int id = msg.arg1; 152 | int current = msg.arg2; 153 | updateProgress(id, current); 154 | break; 155 | } 156 | super.handleMessage(msg); 157 | } 158 | 159 | private void updateProgress(int id, int press) { 160 | Map dataPress = datas.get(id); 161 | dataPress.put("pro", press); 162 | adapter.changeProgress(id, dataPress); 163 | } 164 | } 165 | 166 | protected void getHeadInfo() { 167 | month = MyStringUtils.getSysNowTime(3); 168 | float c = dataBase.count; 169 | if (c == 0.0) { 170 | count = "0.00 " + getString(R.string.rmb); 171 | } else { 172 | count = MyStringUtils.get2dotFloat(c) + " " 173 | + getString(R.string.rmb); 174 | } 175 | if (!(count.equals("0") || count == null)) { 176 | float limit = Float.valueOf(MyStringUtils.readSharedpre( 177 | getContext(), 1)); 178 | if (limit != 0) { 179 | float surplus = limit - dataBase.count; 180 | String sur = MyStringUtils.get2dotFloat(surplus); 181 | info = sur + getString(R.string.rmb) + "剩余,直到您达到每月限额"; 182 | if (surplus == 0) 183 | info = "0.00" + getString(R.string.rmb) + "剩余,刚好达到每月限额"; 184 | if (surplus < 0) { 185 | frame_home_head.setBackgroundColor(Color.RED); 186 | info = "剩余" + sur + getString(R.string.rmb) 187 | + ",已超出每月限额,请省着点"; 188 | } 189 | } else { 190 | info = "暂时还没有设置每月限额"; 191 | } 192 | } 193 | } 194 | 195 | @Override 196 | public void onDestroy() { 197 | super.onDestroy(); 198 | } 199 | 200 | } 201 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/Fragment_Home_None.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account; 2 | 3 | import android.os.Bundle; 4 | import android.support.v4.app.Fragment; 5 | import android.view.LayoutInflater; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | 9 | public class Fragment_Home_None extends Fragment { 10 | private View view; 11 | 12 | @Override 13 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 14 | Bundle savedInstanceState) { 15 | if (view == null) { 16 | view = inflater.inflate(R.layout.content_home_none, container, false); 17 | } 18 | ViewGroup parent = (ViewGroup) view.getParent(); 19 | if (parent != null) { 20 | parent.removeView(view); 21 | } 22 | return view; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/act/ActivityAboutWeb.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account.act; 2 | 3 | import android.graphics.Bitmap; 4 | import android.os.Bundle; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.support.v7.widget.Toolbar; 7 | import android.view.View; 8 | import android.view.View.OnClickListener; 9 | import android.webkit.WebChromeClient; 10 | import android.webkit.WebSettings; 11 | import android.webkit.WebView; 12 | import android.webkit.WebViewClient; 13 | import android.widget.ProgressBar; 14 | 15 | import com.shenhua.account.R; 16 | import com.shenhua.account.bean.NetworkUtil; 17 | 18 | public class ActivityAboutWeb extends AppCompatActivity { 19 | 20 | private WebView web; 21 | private ProgressBar bar; 22 | private boolean isNet = false; 23 | 24 | @Override 25 | protected void onCreate(Bundle savedInstanceState) { 26 | super.onCreate(savedInstanceState); 27 | setContentView(R.layout.activity_about_web); 28 | 29 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); 30 | setSupportActionBar(toolbar); 31 | toolbar.setTitle(R.string.app_name); 32 | toolbar.setNavigationOnClickListener(new OnClickListener() { 33 | 34 | @Override 35 | public void onClick(View v) { 36 | ActivityAboutWeb.this.finish(); 37 | } 38 | }); 39 | NetworkUtil net = new NetworkUtil(this); 40 | isNet = net.isNetworkAvailable(); 41 | web = (WebView) findViewById(R.id.about_web); 42 | bar = (ProgressBar) findViewById(R.id.about_web_pro); 43 | WebSettings webSettings = web.getSettings(); 44 | webSettings.setJavaScriptEnabled(true); 45 | web.setDrawingCacheEnabled(true); 46 | MyWebClient mClient = new MyWebClient(); 47 | web.setWebViewClient(mClient); 48 | web.setWebChromeClient(new WebChromeClient() { 49 | @Override 50 | public void onProgressChanged(WebView view, int newProgress) { 51 | if (newProgress == 100) { 52 | bar.setVisibility(View.INVISIBLE); 53 | } else { 54 | if (View.INVISIBLE == bar.getVisibility()) { 55 | bar.setVisibility(View.VISIBLE); 56 | } 57 | bar.setProgress(newProgress); 58 | } 59 | super.onProgressChanged(view, newProgress); 60 | } 61 | 62 | }); 63 | 64 | } 65 | 66 | private class MyWebClient extends WebViewClient { 67 | @Override 68 | public boolean shouldOverrideUrlLoading(WebView view, String url) { 69 | view.loadUrl(url); 70 | return true; 71 | } 72 | 73 | @Override 74 | public void onPageStarted(WebView view, String url, Bitmap favicon) { 75 | super.onPageStarted(view, url, favicon); 76 | } 77 | 78 | } 79 | 80 | @Override 81 | protected void onResume() { 82 | super.onResume(); 83 | if (isNet) { 84 | web.loadUrl(getString(R.string.www)); 85 | } else { 86 | web.setVisibility(View.GONE); 87 | } 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/act/ActivityMaGdkx.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account.act; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | import com.shenhua.account.R; 6 | import com.shenhua.account.bean.GdkzData; 7 | import com.shenhua.account.bean.MyStringUtils; 8 | import com.shenhua.account.dao.MyDataBase; 9 | import android.content.Context; 10 | import android.content.DialogInterface; 11 | import android.graphics.Color; 12 | import android.os.AsyncTask; 13 | import android.os.Bundle; 14 | import android.support.v7.app.AlertDialog; 15 | import android.support.v7.app.AppCompatActivity; 16 | import android.support.v7.widget.Toolbar; 17 | import android.view.LayoutInflater; 18 | import android.view.View; 19 | import android.view.View.OnClickListener; 20 | import android.view.ViewGroup; 21 | import android.widget.AdapterView; 22 | import android.widget.AdapterView.OnItemClickListener; 23 | import android.widget.BaseAdapter; 24 | import android.widget.EditText; 25 | import android.widget.GridView; 26 | import android.widget.TextView; 27 | 28 | /** 29 | * @author Shenhua 30 | * 31 | */ 32 | public class ActivityMaGdkx extends AppCompatActivity { 33 | 34 | private Toolbar toolbar; 35 | private GridView gv; 36 | private String value; 37 | private MyDataBase dataBase; 38 | 39 | @Override 40 | protected void onCreate(Bundle savedInstanceState) { 41 | super.onCreate(savedInstanceState); 42 | setContentView(R.layout.activity_ma_gdkx); 43 | 44 | initView(); 45 | initData(); 46 | } 47 | 48 | private void initData() { 49 | MyAsyncTask myAsyncTask = new MyAsyncTask(gv); 50 | myAsyncTask.execute(); 51 | } 52 | 53 | private void initView() { 54 | toolbar = (Toolbar) findViewById(R.id.ma_gdkx_toolbar); 55 | setSupportActionBar(toolbar); 56 | gv = (GridView) findViewById(R.id.ma_gdkx_gv); 57 | toolbar.setNavigationOnClickListener(new OnClickListener() { 58 | @Override 59 | public void onClick(View v) { 60 | ActivityMaGdkx.this.finish(); 61 | } 62 | }); 63 | TextView emptyView = (TextView) findViewById(R.id.ma_gdkx_gv_empty); 64 | gv.setEmptyView(emptyView); 65 | gv.setOnItemClickListener(itemClickListener); 66 | } 67 | 68 | /** 69 | * 单击item修改开销 70 | */ 71 | private OnItemClickListener itemClickListener = new OnItemClickListener() { 72 | 73 | @Override 74 | public void onItemClick(AdapterView parent, View view, int position, 75 | long id) { 76 | TextView tv = (TextView) view 77 | .findViewById(R.id.gdkx_gv_item_tv_name); 78 | showSettingDialog(position, tv.getText().toString()); 79 | } 80 | }; 81 | 82 | private class GdkzAdapter extends BaseAdapter { 83 | 84 | private Context context; 85 | private List datas; 86 | 87 | public GdkzAdapter(Context context, List datas) { 88 | this.context = context; 89 | this.datas = datas; 90 | } 91 | 92 | @Override 93 | public int getCount() { 94 | return datas.size(); 95 | } 96 | 97 | @Override 98 | public Object getItem(int position) { 99 | return position; 100 | } 101 | 102 | @Override 103 | public long getItemId(int position) { 104 | return 0; 105 | } 106 | 107 | @Override 108 | public View getView(int position, View convertView, ViewGroup parent) { 109 | final ViewHolder holder; 110 | if (convertView == null) { 111 | LayoutInflater mInflater = LayoutInflater.from(context); 112 | convertView = mInflater.inflate( 113 | R.layout.activity_ma_gdkx_gv_item, 114 | (ViewGroup) convertView, false); 115 | holder = new ViewHolder(); 116 | holder.view = convertView.findViewById(R.id.gdkx_gv_item_view); 117 | holder.name = (TextView) convertView 118 | .findViewById(R.id.gdkx_gv_item_tv_name); 119 | holder.limit = (TextView) convertView 120 | .findViewById(R.id.gdkx_gv_item_tv_limit); 121 | convertView.setTag(holder); 122 | } else { 123 | holder = (ViewHolder) convertView.getTag(); 124 | } 125 | final GdkzData d = datas.get(position); 126 | holder.view.setBackgroundColor(Color.parseColor(d.getColor())); 127 | holder.name.setText(d.getName()); 128 | holder.limit.setText(d.getMoney() + " ¥"); 129 | if (d.getMoney().equals("0")) { 130 | holder.limit.setText("未设置"); 131 | } 132 | return convertView; 133 | } 134 | 135 | private class ViewHolder { 136 | private View view; 137 | private TextView name, limit; 138 | } 139 | 140 | } 141 | 142 | public class MyAsyncTask extends AsyncTask { 143 | 144 | private List mDatas = new ArrayList(); 145 | private GridView gridView; 146 | private GdkzAdapter adapter; 147 | private MyDataBase dataBase; 148 | 149 | public MyAsyncTask(GridView gridView) { 150 | this.gridView = gridView; 151 | } 152 | 153 | @Override 154 | protected void onPreExecute() { 155 | super.onPreExecute(); 156 | } 157 | 158 | @Override 159 | protected Void doInBackground(Void... params) { 160 | dataBase = new MyDataBase(getBaseContext()); 161 | dataBase.open(); 162 | mDatas = dataBase.getLimitsDatas(); 163 | return null; 164 | } 165 | 166 | @Override 167 | protected void onPostExecute(Void result) { 168 | super.onPostExecute(result); 169 | adapter = new GdkzAdapter(ActivityMaGdkx.this, mDatas); 170 | gridView.setAdapter(adapter); 171 | dataBase.close(); 172 | } 173 | 174 | } 175 | 176 | protected void showSettingDialog(final int pos, final String type) { 177 | LayoutInflater layoutInflater = getLayoutInflater(); 178 | View dilog = layoutInflater.inflate(R.layout.activity_setting_dialog, 179 | (ViewGroup) findViewById(R.id.setting_dialog)); 180 | final EditText eText = (EditText) dilog 181 | .findViewById(R.id.setting_dialog_et); 182 | final TextView tView = (TextView) dilog 183 | .findViewById(R.id.setting_dialog_tv); 184 | AlertDialog.Builder builder = new AlertDialog.Builder(this); 185 | builder.setPositiveButton("确定", new DialogInterface.OnClickListener() { 186 | @Override 187 | public void onClick(DialogInterface dialog, int which) { 188 | value = eText.getText().toString(); 189 | if (!value.equals("")) { 190 | value = MyStringUtils.get2dotFloat(Float.parseFloat(value)); 191 | updataToDBp(pos, type); 192 | } 193 | } 194 | }); 195 | builder.setNegativeButton("取消", new DialogInterface.OnClickListener() { 196 | 197 | @Override 198 | public void onClick(DialogInterface dialog, int which) { 199 | 200 | } 201 | }); 202 | MyStringUtils.setPricePoint(eText); 203 | tView.setText("请输入金额:"); 204 | builder.setTitle("设置该类别的固定开销"); 205 | builder.setView(dilog); 206 | builder.show(); 207 | } 208 | 209 | protected void updataToDBp(int position, String type) { 210 | dataBase = new MyDataBase(this); 211 | dataBase.open(); 212 | dataBase.updateDataTolimitsLimit(type, value, 213 | dataBase.getProORLimit(0, type)); 214 | initData(); 215 | dataBase.close(); 216 | } 217 | 218 | } 219 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/act/ActivityMaIncome.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account.act; 2 | 3 | import java.util.ArrayList; 4 | import java.util.HashMap; 5 | import com.shenhua.account.R; 6 | import com.shenhua.account.bean.MyStringUtils; 7 | import com.shenhua.account.dao.MyDataBase; 8 | import android.content.Context; 9 | import android.content.DialogInterface; 10 | import android.os.Bundle; 11 | import android.os.Handler; 12 | import android.support.v7.app.AlertDialog; 13 | import android.support.v7.app.AppCompatActivity; 14 | import android.support.v7.widget.Toolbar; 15 | import android.view.LayoutInflater; 16 | import android.view.Menu; 17 | import android.view.MenuItem; 18 | import android.view.View; 19 | import android.view.View.OnClickListener; 20 | import android.view.ViewGroup; 21 | import android.widget.BaseAdapter; 22 | import android.widget.EditText; 23 | import android.widget.ListView; 24 | import android.widget.TextView; 25 | 26 | public class ActivityMaIncome extends AppCompatActivity { 27 | 28 | private ArrayList> lists = new ArrayList>(); 29 | private Handler handler = new Handler(); 30 | private Toolbar toolbar; 31 | private ListView ma_income_lv; 32 | private MaIncomeAdapter adapter; 33 | private MyDataBase dataBase; 34 | private TextView ma_income_lvempty; 35 | 36 | @Override 37 | protected void onCreate(Bundle savedInstanceState) { 38 | super.onCreate(savedInstanceState); 39 | setContentView(R.layout.activity_ma_income); 40 | 41 | dataBase = new MyDataBase(this); 42 | dataBase.open(); 43 | initView(); 44 | getListData(); 45 | 46 | } 47 | 48 | private void getListData() { 49 | new Thread(new Runnable() { 50 | @Override 51 | public void run() { 52 | lists = dataBase.getIncomes(); 53 | handler.post(new Runnable() { 54 | 55 | @Override 56 | public void run() { 57 | adapter = new MaIncomeAdapter(ActivityMaIncome.this, 58 | lists); 59 | ma_income_lv.setAdapter(adapter); 60 | } 61 | }); 62 | } 63 | }).start(); 64 | } 65 | 66 | private void addData(String income, String detail) { 67 | if (income.equals("")) { 68 | return; 69 | } 70 | if (detail.equals("")) { 71 | detail = "新添加的收入"; 72 | } 73 | HashMap myData = new HashMap(); 74 | myData.put("_income", income); 75 | myData.put("_detail", detail); 76 | dataBase.inserDataToIncomeRecord(myData); 77 | getListData(); 78 | String month = MyStringUtils.getSysNowTime(3); 79 | String sr = dataBase.getSRGL(0, month); 80 | if (!sr.equals("0")) { 81 | float f = Float.parseFloat(income) + Float.parseFloat(sr); 82 | income = Float.toString(f); 83 | } 84 | dataBase.updateGLSR(month, "_sr", income); 85 | } 86 | 87 | private void showDialog() { 88 | LayoutInflater inflater = getLayoutInflater(); 89 | View dialog = inflater.inflate(R.layout.activity_ma_income_dialog, 90 | (ViewGroup) findViewById(R.id.maincom_dialog)); 91 | final EditText editText = (EditText) dialog 92 | .findViewById(R.id.maincom_dialog_et); 93 | MyStringUtils.setPricePoint(editText); 94 | final EditText editText2 = (EditText) dialog 95 | .findViewById(R.id.maincom_dialog_et2); 96 | TextView textView = (TextView) dialog 97 | .findViewById(R.id.maincom_dialog_tv); 98 | textView.setText("请输入您的收入:"); 99 | TextView textView2 = (TextView) dialog 100 | .findViewById(R.id.maincom_dialog_tv2); 101 | textView2.setText("请输入您的描述:"); 102 | AlertDialog.Builder builder = new AlertDialog.Builder(this); 103 | builder.setTitle("管理收入"); 104 | builder.setPositiveButton("确定", new DialogInterface.OnClickListener() { 105 | @Override 106 | public void onClick(DialogInterface dialog, int which) { 107 | addData(editText.getText().toString(), editText2.getText() 108 | .toString()); 109 | } 110 | }); 111 | builder.setNegativeButton("取消", new DialogInterface.OnClickListener() { 112 | @Override 113 | public void onClick(DialogInterface dialog, int which) { 114 | } 115 | }); 116 | builder.setView(dialog); 117 | builder.show(); 118 | } 119 | 120 | private void initView() { 121 | ma_income_lv = (ListView) findViewById(R.id.ma_income_lv); 122 | toolbar = (Toolbar) findViewById(R.id.ma_income_toolbar); 123 | setSupportActionBar(toolbar); 124 | toolbar.setNavigationOnClickListener(new OnClickListener() { 125 | 126 | @Override 127 | public void onClick(View v) { 128 | ActivityMaIncome.this.finish(); 129 | } 130 | }); 131 | ma_income_lvempty = (TextView) findViewById(R.id.ma_income_lvempty); 132 | ma_income_lv.setEmptyView(ma_income_lvempty); 133 | } 134 | 135 | @Override 136 | public boolean onCreateOptionsMenu(Menu menu) { 137 | getMenuInflater().inflate(R.menu.toolbar_mune_maincome, menu); 138 | return true; 139 | } 140 | 141 | @Override 142 | public boolean onOptionsItemSelected(MenuItem item) { 143 | if (item.getItemId() == R.id.glsr_add) { 144 | showDialog(); 145 | return true; 146 | } 147 | return super.onOptionsItemSelected(item); 148 | } 149 | 150 | @Override 151 | protected void onDestroy() { 152 | super.onDestroy(); 153 | dataBase.close(); 154 | } 155 | 156 | } 157 | 158 | class MaIncomeAdapter extends BaseAdapter { 159 | 160 | private ArrayList> lists; 161 | private Context context; 162 | 163 | public MaIncomeAdapter(Context context, 164 | ArrayList> map) { 165 | this.context = context; 166 | this.lists = map; 167 | } 168 | 169 | @Override 170 | public int getCount() { 171 | return lists.size(); 172 | } 173 | 174 | @Override 175 | public Object getItem(int position) { 176 | return position; 177 | } 178 | 179 | @Override 180 | public long getItemId(int position) { 181 | return 0; 182 | } 183 | 184 | @Override 185 | public View getView(int position, View convertView, ViewGroup parent) { 186 | final ViewHolder holder; 187 | if (convertView == null) { 188 | LayoutInflater layoutInflater = LayoutInflater.from(context); 189 | convertView = layoutInflater.inflate( 190 | R.layout.activity_ma_income_lv_item, 191 | (ViewGroup) convertView, false); 192 | holder = new ViewHolder(); 193 | holder.money = (TextView) convertView.findViewById(R.id.money); 194 | holder.time = (TextView) convertView.findViewById(R.id.time); 195 | holder.detail = (TextView) convertView.findViewById(R.id.detail); 196 | convertView.setTag(holder); 197 | } else { 198 | holder = (ViewHolder) convertView.getTag(); 199 | } 200 | holder.money.setText(lists.get(position).get("_money") + " 元"); 201 | holder.time.setText(lists.get(position).get("_time")); 202 | holder.detail.setText(lists.get(position).get("_detail")); 203 | 204 | return convertView; 205 | } 206 | 207 | static class ViewHolder { 208 | public TextView money, time, detail; 209 | } 210 | 211 | } 212 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/act/SplashActivity.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account.act; 2 | 3 | import com.shenhua.account.MainActivity; 4 | import com.shenhua.account.R; 5 | import com.shenhua.account.bean.MD5Util; 6 | import com.shenhua.account.bean.MyStringUtils; 7 | import com.shenhua.account.dao.MyDataBase; 8 | import android.app.Activity; 9 | import android.content.Intent; 10 | import android.graphics.Typeface; 11 | import android.os.Bundle; 12 | import android.os.Handler; 13 | import android.os.Message; 14 | import android.text.Editable; 15 | import android.text.TextWatcher; 16 | import android.view.KeyEvent; 17 | import android.view.View; 18 | import android.view.View.OnClickListener; 19 | import android.view.View.OnLongClickListener; 20 | import android.widget.Button; 21 | import android.widget.EditText; 22 | import android.widget.RelativeLayout; 23 | import android.widget.Toast; 24 | 25 | public class SplashActivity extends Activity implements OnClickListener { 26 | 27 | private static final int DELAYMILLIS = 5000; 28 | private RelativeLayout spalsh_layout_num; 29 | private RelativeLayout spalsh_layout_pic; 30 | private EditText et_num; 31 | private String num = "", password; 32 | private Typeface fontLight; 33 | 34 | @Override 35 | protected void onCreate(Bundle savedInstanceState) { 36 | super.onCreate(savedInstanceState); 37 | setContentView(R.layout.activity_splash); 38 | password = MyStringUtils.readSharedpre(SplashActivity.this, 2); 39 | if (password.equals("0")) {// 未设置密码 40 | initMonth(); 41 | new Handler().postDelayed(new Runnable() { 42 | 43 | @Override 44 | public void run() { 45 | Intent intent = new Intent(SplashActivity.this, 46 | MainActivity.class); 47 | startActivity(intent); 48 | SplashActivity.this.finish(); 49 | } 50 | }, DELAYMILLIS); 51 | } else {// 已设置密码 52 | fontLight = Typeface.createFromAsset(this.getAssets(), 53 | "fonts/Roboto-Light.ttf"); 54 | initView(); 55 | initMonth(); 56 | new Handler().postDelayed(new Runnable() { 57 | 58 | @Override 59 | public void run() { 60 | handler.sendEmptyMessage(1); 61 | } 62 | }, DELAYMILLIS); 63 | 64 | } 65 | } 66 | 67 | private void initMonth() { 68 | // TODO 获取月份,判断是否为新一个月 69 | String month = MyStringUtils.getSysNowTime(3); 70 | MyDataBase dataBase = new MyDataBase(this); 71 | dataBase.open(); 72 | boolean ss = dataBase.isNameExist("accounts", "_month", month); 73 | if (!ss) { 74 | // 不同月份,删除limits表中相关数据 75 | MyStringUtils.saveSharedpre(this, 0, "0"); 76 | dataBase.setDataToZero(); 77 | } 78 | } 79 | 80 | private Handler handler = new Handler() { 81 | 82 | @Override 83 | public void handleMessage(Message msg) { 84 | super.handleMessage(msg); 85 | switch (msg.what) { 86 | case 1: 87 | spalsh_layout_pic.setVisibility(View.GONE); 88 | spalsh_layout_num.setVisibility(View.VISIBLE); 89 | et_num.addTextChangedListener(et_numChangeListener); 90 | break; 91 | } 92 | } 93 | 94 | }; 95 | 96 | private TextWatcher et_numChangeListener = new TextWatcher() { 97 | 98 | @Override 99 | public void onTextChanged(CharSequence s, int start, int before, 100 | int count) { 101 | 102 | } 103 | 104 | @Override 105 | public void beforeTextChanged(CharSequence s, int start, int count, 106 | int after) { 107 | } 108 | 109 | @Override 110 | public void afterTextChanged(Editable s) { 111 | num = et_num.getText().toString(); 112 | if (num.length() == 9) { 113 | if (password.equals(MD5Util.MD5(num))) { 114 | Toast.makeText(SplashActivity.this, "欢迎回来", 115 | Toast.LENGTH_SHORT).show(); 116 | et_num.setText(""); 117 | Intent intent = new Intent(SplashActivity.this, 118 | MainActivity.class); 119 | startActivity(intent); 120 | SplashActivity.this.finish(); 121 | } else { 122 | et_num.setText(""); 123 | } 124 | } 125 | } 126 | }; 127 | 128 | private void initView() { 129 | spalsh_layout_num = (RelativeLayout) findViewById(R.id.spalsh_layout_num); 130 | spalsh_layout_pic = (RelativeLayout) findViewById(R.id.spalsh_layout_pic); 131 | et_num = (EditText) findViewById(R.id.et_num); 132 | findViewById(R.id.one).setOnClickListener(this); 133 | findViewById(R.id.two).setOnClickListener(this); 134 | findViewById(R.id.three).setOnClickListener(this); 135 | findViewById(R.id.four).setOnClickListener(this); 136 | findViewById(R.id.five).setOnClickListener(this); 137 | findViewById(R.id.six).setOnClickListener(this); 138 | findViewById(R.id.seven).setOnClickListener(this); 139 | findViewById(R.id.eight).setOnClickListener(this); 140 | findViewById(R.id.nine).setOnClickListener(this); 141 | findViewById(R.id.zero).setOnClickListener(this); 142 | findViewById(R.id.dot).setOnClickListener(this); 143 | findViewById(R.id.delete).setOnClickListener(this); 144 | Button delete = (Button) findViewById(R.id.delete); 145 | delete.setTypeface(fontLight); 146 | delete.setOnClickListener(this); 147 | delete.setOnLongClickListener(new OnLongClickListener() { 148 | @Override 149 | public boolean onLongClick(View v) { 150 | et_num.setText(""); 151 | return true; 152 | } 153 | }); 154 | } 155 | 156 | @Override 157 | public void onClick(View v) { 158 | switch (v.getId()) { 159 | case R.id.one: 160 | et_num.append("1"); 161 | break; 162 | case R.id.two: 163 | et_num.append("2"); 164 | break; 165 | case R.id.three: 166 | et_num.append("3"); 167 | break; 168 | case R.id.four: 169 | et_num.append("4"); 170 | break; 171 | case R.id.five: 172 | et_num.append("5"); 173 | break; 174 | case R.id.six: 175 | et_num.append("6"); 176 | break; 177 | case R.id.seven: 178 | et_num.append("7"); 179 | break; 180 | case R.id.eight: 181 | et_num.append("8"); 182 | break; 183 | case R.id.nine: 184 | et_num.append("9"); 185 | break; 186 | case R.id.zero: 187 | et_num.append("0"); 188 | break; 189 | case R.id.dot: 190 | et_num.append("."); 191 | break; 192 | case R.id.delete: 193 | et_num.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, 194 | KeyEvent.KEYCODE_DEL)); 195 | break; 196 | } 197 | 198 | } 199 | 200 | } 201 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/adapter/HomeAccountAdapter.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account.adapter; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Map; 5 | import com.shenhua.account.R; 6 | import com.shenhua.account.ui.NumberProgressBar; 7 | import android.content.Context; 8 | import android.graphics.Color; 9 | import android.view.LayoutInflater; 10 | import android.view.View; 11 | import android.view.ViewGroup; 12 | import android.widget.BaseAdapter; 13 | import android.widget.TextView; 14 | 15 | public class HomeAccountAdapter extends BaseAdapter { 16 | 17 | private ArrayList> myList; 18 | private Context myContext; 19 | 20 | public HomeAccountAdapter(ArrayList> myList, 21 | Context mContext) { 22 | this.myList = myList; 23 | this.myContext = mContext; 24 | } 25 | 26 | @Override 27 | public int getCount() { 28 | return myList.size(); 29 | } 30 | 31 | @Override 32 | public Object getItem(int position) { 33 | return null; 34 | } 35 | 36 | @Override 37 | public long getItemId(int position) { 38 | return 0; 39 | } 40 | 41 | @Override 42 | public View getView(int position, View convertView, ViewGroup parent) { 43 | final ViewHolder holder; 44 | if (convertView == null) { 45 | LayoutInflater mInflater = LayoutInflater.from(myContext); 46 | convertView = mInflater.inflate(R.layout.content_home_lv_item, 47 | (ViewGroup) convertView, false); 48 | holder = new ViewHolder(); 49 | holder.tv_title = (TextView) convertView 50 | .findViewById(R.id.home_lv_view_tv_title); 51 | holder.pro = (NumberProgressBar) convertView 52 | .findViewById(R.id.numberbar); 53 | holder.pro.setMax(100); 54 | convertView.setTag(holder); 55 | } else { 56 | holder = (ViewHolder) convertView.getTag(); 57 | } 58 | holder.tv_title.setText(myList.get(position).get("title").toString()); 59 | holder.tv_title.setTextColor(Color.parseColor(myList.get(position) 60 | .get("color").toString())); 61 | holder.pro.setReachedBarColor(Color.parseColor(myList.get(position) 62 | .get("color").toString())); 63 | holder.pro.setProgressTextColor(Color.parseColor(myList.get(position) 64 | .get("color").toString())); 65 | holder.pro.setProgress(0); 66 | int progress = (Integer) myList.get(position).get("pro"); 67 | holder.pro.setProgress(progress); 68 | return convertView; 69 | } 70 | 71 | public void changeProgress(int postion, Map obj) { 72 | this.myList.set(postion, obj); 73 | notifyDataSetChanged(); 74 | } 75 | 76 | static class ViewHolder { 77 | 78 | public TextView tv_title; 79 | public NumberProgressBar pro; 80 | 81 | } 82 | 83 | } -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/adapter/LimitListAdapter.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account.adapter; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import com.shenhua.account.R; 7 | import com.shenhua.account.bean.LimitData; 8 | import com.shenhua.account.ui.MyGradientProgressBar; 9 | 10 | import android.content.Context; 11 | import android.graphics.Color; 12 | import android.view.LayoutInflater; 13 | import android.view.View; 14 | import android.view.ViewGroup; 15 | import android.widget.BaseAdapter; 16 | import android.widget.TextView; 17 | 18 | public class LimitListAdapter extends BaseAdapter { 19 | 20 | private List datas = new ArrayList(); 21 | private Context context; 22 | 23 | public LimitListAdapter(Context context, List datas) { 24 | this.context = context; 25 | this.datas = datas; 26 | } 27 | 28 | @Override 29 | public int getCount() { 30 | return datas.size(); 31 | } 32 | 33 | @Override 34 | public Object getItem(int position) { 35 | return position; 36 | } 37 | 38 | @Override 39 | public long getItemId(int position) { 40 | return 0; 41 | } 42 | 43 | @Override 44 | public View getView(int position, View convertView, ViewGroup parent) { 45 | final ViewHolder holder; 46 | if (convertView == null) { 47 | LayoutInflater mInflater = LayoutInflater.from(context); 48 | convertView = mInflater.inflate(R.layout.content_yusuan_lv_item, 49 | (ViewGroup) convertView, false); 50 | holder = new ViewHolder(); 51 | holder.tv_type = (TextView) convertView 52 | .findViewById(R.id.limit_tv_type); 53 | holder.tv_used = (TextView) convertView 54 | .findViewById(R.id.limit_tv_used); 55 | holder.tv_limit = (TextView) convertView 56 | .findViewById(R.id.limit_tv_limit); 57 | holder.progressBar = (MyGradientProgressBar) convertView 58 | .findViewById(R.id.limit_progress); 59 | convertView.setTag(holder); 60 | } else { 61 | holder = (ViewHolder) convertView.getTag(); 62 | } 63 | LimitData data = datas.get(position); 64 | holder.tv_type.setText(data.getType()); 65 | holder.tv_used.setText(data.getUsed()); 66 | holder.tv_limit.setText(data.getLimit()); 67 | int p = Integer.parseInt(data.getProgress()); 68 | holder.progressBar.setProgress(p); 69 | 70 | if (p <= 30) { 71 | holder.progressBar.setReachedBarColor(Color.GREEN); 72 | } 73 | if (p > 30 && p <= 60) { 74 | holder.progressBar.setReachedBarColor(Color.rgb(195, 255, 0)); 75 | } 76 | if (p > 60 && p <= 85) { 77 | holder.progressBar.setReachedBarColor(Color.YELLOW); 78 | } 79 | if (p > 85) { 80 | holder.progressBar.setReachedBarColor(Color.RED); 81 | } 82 | 83 | return convertView; 84 | } 85 | 86 | static class ViewHolder { 87 | public TextView tv_type; 88 | public TextView tv_used; 89 | public TextView tv_limit; 90 | public MyGradientProgressBar progressBar; 91 | } 92 | 93 | } 94 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/bean/AccountData.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account.bean; 2 | 3 | import java.io.Serializable; 4 | 5 | public class AccountData implements Serializable { 6 | 7 | private static final long serialVersionUID = -7152676381950810216L; 8 | private String type, money, time, month, week, mark, others; 9 | private String title; 10 | public int num; 11 | 12 | public AccountData(int num) { 13 | this.num = num; 14 | } 15 | 16 | public String getType() { 17 | return type; 18 | } 19 | 20 | public void setType(String type) { 21 | this.type = type; 22 | } 23 | 24 | public String getMoney() { 25 | return money; 26 | } 27 | 28 | public void setMoney(String money) { 29 | this.money = money; 30 | } 31 | 32 | public String getTime() { 33 | return time; 34 | } 35 | 36 | public void setTime(String time) { 37 | this.time = time; 38 | } 39 | 40 | public String getMonth() { 41 | return month; 42 | } 43 | 44 | public void setMonth(String month) { 45 | this.month = month; 46 | } 47 | 48 | public String getWeek() { 49 | return week; 50 | } 51 | 52 | public void setWeek(String week) { 53 | this.week = week; 54 | } 55 | 56 | public String getMark() { 57 | return mark; 58 | } 59 | 60 | public void setMark(String mark) { 61 | this.mark = mark; 62 | } 63 | 64 | public String getOther() { 65 | return others; 66 | } 67 | 68 | public void setOther(String other) { 69 | this.others = other; 70 | } 71 | 72 | public static long getSerialversionuid() { 73 | return serialVersionUID; 74 | } 75 | 76 | public String getTitle() { 77 | return title; 78 | } 79 | 80 | public void setTitle(String title) { 81 | this.title = title; 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/bean/CheckUpdate.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account.bean; 2 | 3 | import java.io.BufferedInputStream; 4 | import java.io.File; 5 | import java.io.FileOutputStream; 6 | import java.io.IOException; 7 | import java.io.InputStream; 8 | import java.math.BigDecimal; 9 | import java.net.HttpURLConnection; 10 | import java.net.URL; 11 | import java.util.HashMap; 12 | import java.util.Map; 13 | 14 | import org.json.JSONException; 15 | import org.json.JSONObject; 16 | import org.jsoup.Connection; 17 | import org.jsoup.Connection.Method; 18 | import org.jsoup.Jsoup; 19 | 20 | import android.app.ProgressDialog; 21 | import android.os.Environment; 22 | 23 | public class CheckUpdate { 24 | 25 | private static Map map = new HashMap(); 26 | 27 | public static Map getNewVersion() throws IOException, 28 | JSONException { 29 | Connection.Response response = Jsoup 30 | .connect(MyStringUtils.CURL + MyStringUtils.API_TAKEN) 31 | .method(Method.GET).ignoreContentType(true).timeout(5000) 32 | .execute(); 33 | JSONObject dataJson = new JSONObject(response.body()); 34 | JSONObject dataJson2 = dataJson.getJSONObject("binary"); 35 | map.put("name", dataJson.getString("name")); 36 | map.put("version", dataJson.getString("version")); 37 | map.put("changelog", dataJson.getString("changelog")); 38 | map.put("versionShort", dataJson.getString("versionShort")); 39 | map.put("direct_install_url", dataJson.getString("direct_install_url")); 40 | map.put("fsize", bytes2kb(Long.parseLong(dataJson2.getString("fsize")))); 41 | return map; 42 | } 43 | 44 | public static String bytes2kb(long bytes) { 45 | BigDecimal filesize = new BigDecimal(bytes); 46 | BigDecimal megabyte = new BigDecimal(1024 * 1024); 47 | float returnValue = filesize.divide(megabyte, 2, BigDecimal.ROUND_UP) 48 | .floatValue(); 49 | if (returnValue > 1) 50 | return (returnValue + "MB"); 51 | BigDecimal kilobyte = new BigDecimal(1024); 52 | returnValue = filesize.divide(kilobyte, 2, BigDecimal.ROUND_UP) 53 | .floatValue(); 54 | return (returnValue + "KB"); 55 | } 56 | 57 | public static File getFileFromServer(String path, ProgressDialog pd) 58 | throws Exception { 59 | if (Environment.getExternalStorageState().equals( 60 | Environment.MEDIA_MOUNTED)) { 61 | URL url = new URL(path); 62 | HttpURLConnection conn = (HttpURLConnection) url.openConnection(); 63 | conn.setConnectTimeout(5000); 64 | pd.setMax(conn.getContentLength()); 65 | InputStream is = conn.getInputStream(); 66 | File file = new File(Environment.getExternalStorageDirectory(), 67 | "update.apk"); 68 | FileOutputStream fos = new FileOutputStream(file); 69 | BufferedInputStream bis = new BufferedInputStream(is); 70 | byte[] buffer = new byte[1024]; 71 | int len; 72 | int total = 0; 73 | while ((len = bis.read(buffer)) != -1) { 74 | fos.write(buffer, 0, len); 75 | total += len; 76 | pd.setProgress(total); 77 | } 78 | fos.close(); 79 | bis.close(); 80 | is.close(); 81 | return file; 82 | } else { 83 | return null; 84 | } 85 | 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/bean/GdkzData.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account.bean; 2 | 3 | import java.io.Serializable; 4 | 5 | public class GdkzData implements Serializable { 6 | 7 | private static final long serialVersionUID = -9095188441876694036L; 8 | private String name, money, color; 9 | 10 | public String getColor() { 11 | return color; 12 | } 13 | 14 | public void setColor(String color) { 15 | this.color = color; 16 | } 17 | 18 | public GdkzData(String name, String money, String color) { 19 | this.name = name; 20 | this.money = money; 21 | this.color = color; 22 | } 23 | 24 | public String getName() { 25 | return name; 26 | } 27 | 28 | public void setName(String name) { 29 | this.name = name; 30 | } 31 | 32 | public String getMoney() { 33 | try { 34 | String[] i = money.split("\\."); 35 | if ((i[1].length() == 1)) { 36 | return money + "0"; 37 | } 38 | } catch (Exception e) { 39 | } 40 | return money; 41 | } 42 | 43 | public void setMoney(String money) { 44 | this.money = money; 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/bean/LimitData.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account.bean; 2 | 3 | import java.io.Serializable; 4 | 5 | public class LimitData implements Serializable { 6 | 7 | private static final long serialVersionUID = -4424759660758711393L; 8 | private String type; 9 | private String used; 10 | private String limit; 11 | private String progress; 12 | private String fenpei_use; 13 | private String color; 14 | 15 | public String getColor() { 16 | return color; 17 | } 18 | 19 | public void setColor(String color) { 20 | this.color = color; 21 | } 22 | 23 | public String getFenpei_use() { 24 | if (fenpei_use == null) { 25 | return "0"; 26 | } 27 | return fenpei_use; 28 | } 29 | 30 | public void setFenpei_use(String fenpei_use) { 31 | this.fenpei_use = fenpei_use; 32 | } 33 | 34 | public LimitData(String type, String used, String progress, String limit, 35 | String fenpei_use, String color) { 36 | this.type = type; 37 | this.used = used; 38 | this.limit = limit; 39 | this.progress = progress; 40 | this.fenpei_use = fenpei_use; 41 | this.color = color; 42 | } 43 | 44 | public String getProgress() { 45 | if (progress == null) { 46 | return "0"; 47 | } 48 | return progress; 49 | } 50 | 51 | public void setProgress(String progress) { 52 | this.progress = progress; 53 | } 54 | 55 | public String getType() { 56 | return type; 57 | } 58 | 59 | public void setType(String type) { 60 | this.type = type; 61 | } 62 | 63 | public String getUsed() { 64 | if (used == null) { 65 | return "0 ¥"; 66 | } 67 | return used + "¥"; 68 | } 69 | 70 | public void setUsed(String used) { 71 | this.used = used; 72 | } 73 | 74 | public String getLimit() { 75 | if (limit == null || limit.equals("0")) { 76 | return "0 ¥"; 77 | } 78 | try { 79 | String[] i = limit.split("\\."); 80 | if (i[1].length() == 2) { 81 | return limit + " ¥"; 82 | } 83 | } catch (Exception e) { 84 | return limit + "0 ¥"; 85 | } 86 | return limit + "0 ¥"; 87 | } 88 | 89 | public void setLimit(String limit) { 90 | this.limit = limit; 91 | } 92 | 93 | } 94 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/bean/MD5Util.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account.bean; 2 | 3 | import java.security.MessageDigest; 4 | 5 | public class MD5Util { 6 | 7 | public final static String MD5(String s) { 8 | char hexDigits[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 9 | 'A', 'B', 'C', 'D', 'E', 'F' }; 10 | try { 11 | byte[] btInput = s.getBytes(); 12 | MessageDigest mdInst = MessageDigest.getInstance("MD5"); 13 | mdInst.update(btInput); 14 | byte[] md = mdInst.digest(); 15 | int j = md.length; 16 | char str[] = new char[j * 2]; 17 | int k = 0; 18 | for (int i = 0; i < j; i++) { 19 | byte byte0 = md[i]; 20 | str[k++] = hexDigits[byte0 >>> 4 & 0xf]; 21 | str[k++] = hexDigits[byte0 & 0xf]; 22 | } 23 | return new String(str); 24 | } catch (Exception e) { 25 | e.printStackTrace(); 26 | return null; 27 | } 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/bean/MyApplication.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account.bean; 2 | 3 | import android.app.Application; 4 | 5 | public class MyApplication extends Application { 6 | 7 | public String verflag; 8 | 9 | public String getVerflag() { 10 | return verflag; 11 | } 12 | 13 | public void setVerflag(String verflag) { 14 | this.verflag = verflag; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/bean/NetworkUtil.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account.bean; 2 | 3 | import android.content.Context; 4 | import android.net.ConnectivityManager; 5 | import android.net.NetworkInfo; 6 | 7 | public class NetworkUtil { 8 | 9 | private Context context; 10 | 11 | public NetworkUtil(Context context) { 12 | this.context = context; 13 | } 14 | 15 | public boolean isNetworkAvailable() { 16 | ConnectivityManager connectivityManager = (ConnectivityManager) context 17 | .getSystemService(Context.CONNECTIVITY_SERVICE); 18 | if (connectivityManager == null) { 19 | return false; 20 | } else { 21 | @SuppressWarnings("deprecation") 22 | NetworkInfo[] networkInfo = connectivityManager.getAllNetworkInfo(); 23 | if (networkInfo != null && networkInfo.length > 0) { 24 | for (int i = 0; i < networkInfo.length; i++) { 25 | if (networkInfo[i].getState() == NetworkInfo.State.CONNECTED) { 26 | return true; 27 | } 28 | } 29 | } 30 | } 31 | return false; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/dao/DatabaseOutput.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account.dao; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | 6 | import com.shenhua.account.bean.MyStringUtils; 7 | 8 | import jxl.Workbook; 9 | import jxl.write.Label; 10 | import jxl.write.WritableSheet; 11 | import jxl.write.WritableWorkbook; 12 | import jxl.write.WriteException; 13 | import jxl.write.biff.RowsExceededException; 14 | import android.database.Cursor; 15 | import android.os.Environment; 16 | 17 | public class DatabaseOutput { 18 | 19 | private MyDataBase mDb; 20 | 21 | public DatabaseOutput(MyDataBase db) { 22 | mDb = db; 23 | } 24 | 25 | /** 26 | * 生成一个Excel文件 27 | * 28 | * @param fileName 29 | * 要生成的Excel文件名 30 | */ 31 | public String writeExcel(String tableName) { 32 | WritableWorkbook wwb = null; 33 | String fileName; 34 | String mdir = Environment.getExternalStorageDirectory().getPath() 35 | + "/Account/"; 36 | File file = new File(mdir); 37 | if (!file.exists()) 38 | file.mkdir(); 39 | String time = MyStringUtils.getSysNowTime(5); 40 | fileName = mdir + "我的消费记录" + time + ".xls"; 41 | int r = 0; 42 | String sql = "select * from " + tableName; 43 | Cursor cur = mDb.rawQuery(sql, new String[0]); 44 | int numcols = cur.getColumnCount(); 45 | int numrows = cur.getCount(); 46 | String records[][] = new String[numrows + 1][numcols]; 47 | if (cur.moveToFirst()) { 48 | while (cur.getPosition() < cur.getCount()) { 49 | for (int c = 0; c < numcols; c++) { 50 | if (r == 0) { 51 | records[r][c] = cur.getColumnName(c); 52 | records[r + 1][c] = cur.getString(c); 53 | } else { 54 | records[r + 1][c] = cur.getString(c); 55 | } 56 | } 57 | cur.moveToNext(); 58 | r++; 59 | } 60 | cur.close(); 61 | } 62 | try { 63 | // 首先要使用Workbook类的工厂方法创建一个可写入的工作薄(Workbook)对象 64 | wwb = Workbook.createWorkbook(new File(fileName)); 65 | } catch (IOException e) { 66 | e.printStackTrace(); 67 | return "-1"; 68 | } 69 | if (wwb != null) { 70 | // 创建一个可写入的工作表 71 | // Workbook的createSheet方法有两个参数,第一个是工作表的名称,第二个是工作表在工作薄中的位置 72 | WritableSheet ws = wwb.createSheet("sheet1", 0); 73 | // 下面开始添加单元格 74 | for (int i = 0; i < numrows + 1; i++) { 75 | for (int j = 0; j < numcols; j++) { 76 | // 这里需要注意的是,在Excel中,第一个参数表示列,第二个表示行 77 | Label labelC = new Label(j, i, records[i][j]); 78 | // Log.i("Newvalue" + i + " " + j, records[i][j]); 79 | try { 80 | // 将生成的单元格添加到工作表中 81 | ws.addCell(labelC); 82 | } catch (RowsExceededException e) { 83 | e.printStackTrace(); 84 | return "-2"; 85 | } catch (WriteException e) { 86 | e.printStackTrace(); 87 | return "-2"; 88 | } 89 | } 90 | } 91 | try { 92 | // 从内存中写入文件中 93 | wwb.write(); 94 | // 关闭资源,释放内存 95 | wwb.close(); 96 | } catch (IOException e) { 97 | e.printStackTrace(); 98 | return "-3"; 99 | } catch (WriteException e) { 100 | e.printStackTrace(); 101 | return "-3"; 102 | } 103 | } 104 | return fileName; 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/ui/AnimationUtils.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account.ui; 2 | 3 | import android.support.v4.view.animation.FastOutSlowInInterpolator; 4 | import android.view.animation.Animation; 5 | import android.view.animation.DecelerateInterpolator; 6 | import android.view.animation.Interpolator; 7 | import android.view.animation.LinearInterpolator; 8 | 9 | public class AnimationUtils { 10 | public static final Interpolator LINEAR_INTERPOLATOR = new LinearInterpolator(); 11 | public static final Interpolator FAST_OUT_SLOW_IN_INTERPOLATOR = new FastOutSlowInInterpolator(); 12 | public static final Interpolator DECELERATE_INTERPOLATOR = new DecelerateInterpolator(); 13 | 14 | AnimationUtils() { 15 | } 16 | 17 | static float lerp(float startValue, float endValue, float fraction) { 18 | return startValue + fraction * (endValue - startValue); 19 | } 20 | 21 | static int lerp(int startValue, int endValue, float fraction) { 22 | return startValue 23 | + Math.round(fraction * (float) (endValue - startValue)); 24 | } 25 | 26 | public static class AnimationListenerAdapter implements 27 | Animation.AnimationListener { 28 | public AnimationListenerAdapter() { 29 | } 30 | 31 | public void onAnimationStart(Animation animation) { 32 | } 33 | 34 | public void onAnimationEnd(Animation animation) { 35 | } 36 | 37 | public void onAnimationRepeat(Animation animation) { 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/ui/MyIndicatorView.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account.ui; 2 | 3 | import java.util.Calendar; 4 | import java.util.Locale; 5 | import com.shenhua.account.R; 6 | import android.content.Context; 7 | import android.content.res.TypedArray; 8 | import android.graphics.Canvas; 9 | import android.graphics.Color; 10 | import android.graphics.Paint; 11 | import android.graphics.Path; 12 | import android.graphics.RectF; 13 | import android.util.AttributeSet; 14 | import android.util.Log; 15 | import android.view.View; 16 | 17 | public class MyIndicatorView extends View { 18 | 19 | private float mFillWidth; 20 | private float mMaxRate; 21 | private float mEachMaxRate; 22 | private float mRate; 23 | private int mBorderColor; 24 | private int mIndicatorColor; 25 | private int daysOfMonth = 30; 26 | private float topPadding = dp2px(50.0f); 27 | private float leftPadding = dp2px(15.0f); 28 | private float rightPadding = dp2px(15.0f); 29 | private float textLeft; 30 | private RectF mFillBounds; 31 | private RectF mBorderBounds; 32 | private Paint mFillPaint; 33 | private Paint mBorderPaint; 34 | private Paint trianglePaint; 35 | private Paint textPaint; 36 | private Path triangle; 37 | private String mTitleText = "今天"; 38 | 39 | public MyIndicatorView(Context context) { 40 | this(context, null); 41 | } 42 | 43 | public MyIndicatorView(Context context, AttributeSet attrs) { 44 | this(context, attrs, 0); 45 | } 46 | 47 | public MyIndicatorView(Context context, AttributeSet attrs, int defStyle) { 48 | super(context, attrs, defStyle); 49 | TypedArray a = context.getTheme().obtainStyledAttributes(attrs, 50 | R.styleable.MyIndicatorView, defStyle, 0); 51 | mRate = a.getInt(R.styleable.MyIndicatorView_rate, 0); 52 | mBorderColor = a.getColor(R.styleable.MyIndicatorView_border_color, 53 | Color.RED); 54 | mIndicatorColor = a.getColor( 55 | R.styleable.MyIndicatorView_indicator_color, Color.BLACK); 56 | a.recycle(); 57 | initPainters(); 58 | 59 | } 60 | 61 | private void initPainters() { 62 | mFillPaint = new Paint(); 63 | mFillBounds = new RectF(); 64 | mFillPaint.setColor(0x3FCDCDCD); 65 | mBorderPaint = new Paint(); 66 | mBorderBounds = new RectF(); 67 | mBorderPaint.setColor(mBorderColor); 68 | trianglePaint = new Paint(); 69 | trianglePaint.setColor(mIndicatorColor); 70 | textPaint = new Paint(); 71 | textPaint.setTextSize(18); 72 | textPaint.setColor(mIndicatorColor); 73 | 74 | } 75 | 76 | private void caculateRectF() { 77 | daysOfMonth = getDaysOfMonth(1); 78 | mRate = getDaysOfMonth(2); 79 | mMaxRate = getWidth() - leftPadding - rightPadding;// 739.0 80 | mEachMaxRate = mMaxRate / daysOfMonth;// 24.633333 81 | Log.d("mRate", String.valueOf(mRate)); 82 | mFillWidth = mRate * mEachMaxRate; 83 | float fillRight = mFillWidth + leftPadding - 1; 84 | textLeft = mFillWidth + leftPadding - 20; 85 | mFillBounds.left = 0; 86 | mFillBounds.top = 0; 87 | mFillBounds.right = fillRight; 88 | mFillBounds.bottom = getHeight(); 89 | mBorderBounds.left = fillRight - 0.4f; 90 | mBorderBounds.top = 0; 91 | mBorderBounds.right = fillRight + 0.4f; 92 | mBorderBounds.bottom = getHeight(); 93 | triangle = new Path(); 94 | triangle.moveTo(fillRight, topPadding); 95 | triangle.lineTo(fillRight + 21, topPadding - 30); 96 | triangle.lineTo(fillRight + -21, topPadding - 30); 97 | triangle.close(); 98 | } 99 | 100 | private int getDaysOfMonth(int a) { 101 | Calendar calendar = Calendar.getInstance(Locale.CHINA); 102 | if (a == 1) { 103 | return calendar.getActualMaximum(Calendar.DATE); 104 | } else { 105 | return calendar.get(Calendar.DAY_OF_MONTH); 106 | } 107 | } 108 | 109 | @Override 110 | protected void onDraw(Canvas canvas) { 111 | caculateRectF(); 112 | canvas.drawRect(mFillBounds, mFillPaint); 113 | canvas.drawRect(mBorderBounds, mBorderPaint); 114 | canvas.drawPath(triangle, trianglePaint); 115 | canvas.drawText(mTitleText, textLeft, topPadding - 40, textPaint); 116 | 117 | } 118 | 119 | public float dp2px(float dp) { 120 | final float scale = getResources().getDisplayMetrics().density; 121 | return dp * scale + 0.5f; 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/ui/MyPiechart.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account.ui; 2 | 3 | import java.util.ArrayList; 4 | import java.util.HashMap; 5 | import java.util.List; 6 | import com.shenhua.account.bean.LimitData; 7 | import com.shenhua.account.dao.MyDataBase; 8 | import android.content.Context; 9 | import android.graphics.Canvas; 10 | import android.graphics.Color; 11 | import android.graphics.Paint; 12 | import android.graphics.RectF; 13 | import android.util.AttributeSet; 14 | import android.view.View; 15 | 16 | public class MyPiechart extends View { 17 | 18 | public float[] mExplain = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20 | 0, 0, 0, 0, 0, 0, 0, 0 };// 起始角度为0 21 | private static final float Explain_INC = 1; 22 | private Paint[] mPaints; 23 | private Paint bPaint; 24 | private RectF mBigOval; 25 | private ArrayList> lists = new ArrayList>(); 26 | private List mDatas = new ArrayList(); 27 | private HashMap map; 28 | public float[] eachPros;// 每一个块所占的角度,总和为360 29 | 30 | public MyPiechart(Context context) { 31 | super(context); 32 | initDatas(context); 33 | initPainters(); 34 | } 35 | 36 | private void initDatas(Context context) { 37 | MyDataBase dataBase = new MyDataBase(context); 38 | dataBase.open(); 39 | float count = 1f; 40 | mDatas.clear(); 41 | mDatas = dataBase.getLimits(); 42 | count = dataBase.getUsedCountFromLimits(); 43 | for (int i = 0; i < mDatas.size(); i++) { 44 | map = new HashMap(); 45 | float us = Float.parseFloat(mDatas.get(i).getFenpei_use()); 46 | map.put("pro", (us / count) * 360); 47 | map.put("color", mDatas.get(i).getColor().toString()); 48 | lists.add(map); 49 | } 50 | dataBase.close(); 51 | } 52 | 53 | public MyPiechart(Context context, AttributeSet attrs) { 54 | super(context, attrs); 55 | initDatas(context); 56 | initPainters(); 57 | } 58 | 59 | private void initPainters() { 60 | mPaints = new Paint[lists.size()]; 61 | eachPros = new float[lists.size()]; 62 | for (int i = 0; i < lists.size(); i++) { 63 | mPaints[i] = new Paint(); 64 | mPaints[i].setAntiAlias(true); 65 | mPaints[i].setStyle(Paint.Style.FILL); 66 | } 67 | bPaint = new Paint(); 68 | bPaint.setColor(Color.rgb(245, 252, 249)); 69 | } 70 | 71 | private void initDraw() { 72 | mBigOval = new RectF(getPaddingLeft(), getPaddingTop(), getWidth() 73 | - getPaddingRight(), getHeight() - getPaddingBottom()); 74 | for (int i = 0; i < lists.size(); i++) { 75 | eachPros[i] = (float) lists.get(i).get("pro"); 76 | mPaints[i].setColor(Color.parseColor(lists.get(i).get("color") 77 | .toString())); 78 | } 79 | } 80 | 81 | @Override 82 | protected void onDraw(Canvas canvas) { 83 | super.onDraw(canvas); 84 | initDraw(); 85 | canvas.drawColor(Color.TRANSPARENT); 86 | canvas.drawArc(mBigOval, 0, 360, true, bPaint); 87 | float start = 0; 88 | for (int i = 0; i < lists.size(); i++) { 89 | canvas.drawArc(mBigOval, start, mExplain[i], true, mPaints[i]); 90 | start += eachPros[i]; 91 | if (mExplain[i] < eachPros[i]) { 92 | mExplain[i] += Explain_INC; 93 | invalidate(); 94 | } 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/java/com/shenhua/account/ui/SnackbarManager.java: -------------------------------------------------------------------------------- 1 | package com.shenhua.account.ui; 2 | 3 | import android.os.Handler; 4 | import android.os.Looper; 5 | import android.os.Message; 6 | 7 | import java.lang.ref.WeakReference; 8 | 9 | class SnackbarManager { 10 | private static final int MSG_TIMEOUT = 0; 11 | private static final int SHORT_DURATION_MS = 1500; 12 | private static final int LONG_DURATION_MS = 2750; 13 | private static SnackbarManager sSnackbarManager; 14 | 15 | static SnackbarManager getInstance() { 16 | if (sSnackbarManager == null) { 17 | sSnackbarManager = new SnackbarManager(); 18 | } 19 | return sSnackbarManager; 20 | } 21 | 22 | private final Object mLock; 23 | private final Handler mHandler; 24 | private SnackbarRecord mCurrentSnackbar; 25 | private SnackbarRecord mNextSnackbar; 26 | 27 | private SnackbarManager() { 28 | mLock = new Object(); 29 | mHandler = new Handler(Looper.getMainLooper(), new Handler.Callback() { 30 | @Override 31 | public boolean handleMessage(Message message) { 32 | switch (message.what) { 33 | case MSG_TIMEOUT: 34 | handleTimeout((SnackbarRecord) message.obj); 35 | return true; 36 | } 37 | return false; 38 | } 39 | }); 40 | } 41 | 42 | interface Callback { 43 | void show(); 44 | 45 | void dismiss(int event); 46 | } 47 | 48 | public void show(int duration, Callback callback) { 49 | synchronized (mLock) { 50 | if (isCurrentSnackbar(callback)) { 51 | mCurrentSnackbar.duration = duration; 52 | mHandler.removeCallbacksAndMessages(mCurrentSnackbar); 53 | scheduleTimeoutLocked(mCurrentSnackbar); 54 | return; 55 | } else if (isNextSnackbar(callback)) { 56 | mNextSnackbar.duration = duration; 57 | } else { 58 | mNextSnackbar = new SnackbarRecord(duration, callback); 59 | } 60 | if (mCurrentSnackbar != null 61 | && cancelSnackbarLocked(mCurrentSnackbar, 62 | TSnackbar.Callback.DISMISS_EVENT_CONSECUTIVE)) { 63 | return; 64 | } else { 65 | mCurrentSnackbar = null; 66 | showNextSnackbarLocked(); 67 | } 68 | } 69 | } 70 | 71 | public void dismiss(Callback callback, int event) { 72 | synchronized (mLock) { 73 | if (isCurrentSnackbar(callback)) { 74 | cancelSnackbarLocked(mCurrentSnackbar, event); 75 | } else if (isNextSnackbar(callback)) { 76 | cancelSnackbarLocked(mNextSnackbar, event); 77 | } 78 | } 79 | } 80 | 81 | public void onDismissed(Callback callback) { 82 | synchronized (mLock) { 83 | if (isCurrentSnackbar(callback)) { 84 | mCurrentSnackbar = null; 85 | if (mNextSnackbar != null) { 86 | showNextSnackbarLocked(); 87 | } 88 | } 89 | } 90 | } 91 | 92 | public void onShown(Callback callback) { 93 | synchronized (mLock) { 94 | if (isCurrentSnackbar(callback)) { 95 | scheduleTimeoutLocked(mCurrentSnackbar); 96 | } 97 | } 98 | } 99 | 100 | public void cancelTimeout(Callback callback) { 101 | synchronized (mLock) { 102 | if (isCurrentSnackbar(callback)) { 103 | mHandler.removeCallbacksAndMessages(mCurrentSnackbar); 104 | } 105 | } 106 | } 107 | 108 | public void restoreTimeout(Callback callback) { 109 | synchronized (mLock) { 110 | if (isCurrentSnackbar(callback)) { 111 | scheduleTimeoutLocked(mCurrentSnackbar); 112 | } 113 | } 114 | } 115 | 116 | private static class SnackbarRecord { 117 | private final WeakReference callback; 118 | private int duration; 119 | 120 | SnackbarRecord(int duration, Callback callback) { 121 | this.callback = new WeakReference<>(callback); 122 | this.duration = duration; 123 | } 124 | 125 | boolean isSnackbar(Callback callback) { 126 | return callback != null && this.callback.get() == callback; 127 | } 128 | } 129 | 130 | private void showNextSnackbarLocked() { 131 | if (mNextSnackbar != null) { 132 | mCurrentSnackbar = mNextSnackbar; 133 | mNextSnackbar = null; 134 | final Callback callback = mCurrentSnackbar.callback.get(); 135 | if (callback != null) { 136 | callback.show(); 137 | } else { 138 | mCurrentSnackbar = null; 139 | } 140 | } 141 | } 142 | 143 | private boolean cancelSnackbarLocked(SnackbarRecord record, int event) { 144 | final Callback callback = record.callback.get(); 145 | if (callback != null) { 146 | callback.dismiss(event); 147 | return true; 148 | } 149 | return false; 150 | } 151 | 152 | private boolean isCurrentSnackbar(Callback callback) { 153 | return mCurrentSnackbar != null 154 | && mCurrentSnackbar.isSnackbar(callback); 155 | } 156 | 157 | private boolean isNextSnackbar(Callback callback) { 158 | return mNextSnackbar != null && mNextSnackbar.isSnackbar(callback); 159 | } 160 | 161 | private void scheduleTimeoutLocked(SnackbarRecord r) { 162 | if (r.duration == TSnackbar.LENGTH_INDEFINITE) { 163 | return; 164 | } 165 | int durationMs = LONG_DURATION_MS; 166 | if (r.duration > 0) { 167 | durationMs = r.duration; 168 | } else if (r.duration == TSnackbar.LENGTH_SHORT) { 169 | durationMs = SHORT_DURATION_MS; 170 | } 171 | mHandler.removeCallbacksAndMessages(r); 172 | mHandler.sendMessageDelayed(Message.obtain(mHandler, MSG_TIMEOUT, r), 173 | durationMs); 174 | } 175 | 176 | private void handleTimeout(SnackbarRecord record) { 177 | synchronized (mLock) { 178 | if (mCurrentSnackbar == record || mNextSnackbar == record) { 179 | cancelSnackbarLocked(record, 180 | TSnackbar.Callback.DISMISS_EVENT_TIMEOUT); 181 | } 182 | } 183 | } 184 | } -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/anim/slide_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/anim/top_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/anim/top_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/group_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/group_down.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/group_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/group_up.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_about_shareapp_ewm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_about_shareapp_ewm.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_add.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_back.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_back_delete_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_back_delete_normal.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_back_delete_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_back_delete_press.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_backspace_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_backspace_disabled.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_backspace_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_backspace_normal.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_cancle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_cancle.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_come.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_come.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_done.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_done.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_income.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_income.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_keybord_nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_keybord_nor.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_keybord_pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_keybord_pre.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_logo.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_menu.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_nonet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_nonet.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_nv_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_nv_about.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_nv_exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_nv_exit.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_nv_menu01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_nv_menu01.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_nv_menu02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_nv_menu02.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_nv_menu03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_nv_menu03.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_nv_menu04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_nv_menu04.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_nv_menu05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_nv_menu05.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_setting.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_share.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_sp_nor.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_sp_nor.9.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_sp_pre.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_sp_pre.9.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/ic_update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/ic_update.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/image_color_cdcdcd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/image_color_cdcdcd.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/image_color_theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/image_color_theme.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-hdpi/splash_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-hdpi/splash_bg.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenhuanet/Account-android/7a78c8e806f872e437a0833541c482556c8359ee/shenhuaaccount/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/about_dialog_btn_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/about_layout_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/calender_btn.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/calender_circlebg.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/calender_circlering.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 11 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/calender_done_btn.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/calender_rectbg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/calender_textselector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/divider_line.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/expander_ic_folder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/pressed_background_cash_neutral.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/pressed_background_cash_theme.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/selector_backbutton.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/selector_backdelete_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/selector_bg_yusuan_lv_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/selector_keyboard_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/selector_layout_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/selector_rv_item_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/selector_tv_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/spinner_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/text_item_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/text_item_bottom_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/drawable/text_item_top_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/layout/activity_about.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 16 | 17 | 24 | 25 | 32 | 33 | 40 | 41 | 50 | 51 | 59 | 60 | 61 | 68 | 69 | 78 | 79 | 87 | 88 | 89 | 96 | 97 | 106 | 107 | 116 | 117 | 118 | 125 | 126 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/layout/activity_about_web.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 14 | 15 | 20 | 21 | 25 | 26 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/layout/activity_add.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 18 | 19 | 26 | 27 | 33 | 34 | 35 | 41 | 42 | 49 | 50 | 54 | 55 | 62 | 63 | 70 | 71 | 82 | 83 | -------------------------------------------------------------------------------- /shenhuaaccount/src/main/res/layout/activity_add_other.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | 21 | 22 |