[
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2015 linmp4\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n"
  },
  {
    "path": "MoneyCharge/.gitignore",
    "content": "### Android ###\n.gradle\n/local.properties\n.DS_Store\n/captures\n.externalNativeBuild\n\nHELP.md\ntarget/\n!.mvn/wrapper/maven-wrapper.jar\n!**/src/main/**\n!**/src/test/**\n\n### STS ###\n.apt_generated\n.classpath\n.factorypath\n.project\n.settings\n.springBeans\n.sts4-cache\n\n### IntelliJ IDEA ###\n.idea\n*.iws\n*.iml\n*.ipr\n\n### NetBeans ###\n/nbproject/private/\n/nbbuild/\n/dist/\n/nbdist/\n/.nb-gradle/\nbuild/\n\n### VS Code ###\n.vscode/\n\n### log ###\n*.log\n\n### Java build package###\nsrc/main/java/META-INF/MANIFEST.MF"
  },
  {
    "path": "MoneyCharge/app/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\nandroid {\n    compileSdkVersion 22\n    buildToolsVersion \"22.0.1\"\n\n    defaultConfig {\n        applicationId \"com.cwp.cmoneycharge\"\n        minSdkVersion 15\n        targetSdkVersion 18\n        compileOptions {\n            sourceCompatibility JavaVersion.VERSION_1_7\n            targetCompatibility JavaVersion.VERSION_1_7\n        }\n    }\n\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'\n        }\n    }\n}\n\ndependencies {\n    compile 'com.android.support:support-v4:22.2.1'\n    compile files('libs/achartengine-1.1.0.jar')\n    compile files('libs/Android_Location_V1.3.2.jar')\n    compile files('libs/androidpiechart.jar')\n    compile files('libs/Baidu-SpeechRecognitionUI-SDK-Android-1.6.2.jar')\n    compile files('libs/com.umeng.fb.v5.0.0.jar')\n    compile files('libs/com.umeng.message.lib1.4.1.jar')\n    compile files('libs/galaxy.jar')\n    compile files('libs/nineoldandroids-2.4.0.jar')\n    compile files('libs/VoiceRecognition-1.6.2.jar')\n}\n"
  },
  {
    "path": "MoneyCharge/app/lint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<lint>\n</lint>"
  },
  {
    "path": "MoneyCharge/app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.cwp.cmoneycharge\"\n    android:versionCode=\"2\"\n    android:versionName=\"1.08\" >\n\n    <uses-sdk\n        android:minSdkVersion=\"15\"\n        android:targetSdkVersion=\"18\" />\n\n    <uses-permission android:name=\"android.permission.RECORD_AUDIO\" />\n    <uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />\n    <uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />\n    <uses-permission android:name=\"android.permission.WRITE_SETTINGS\" />\n    <uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" />\n    <uses-permission android:name=\"android.permission.INTERNET\" />\n    <uses-permission android:name=\"android.permission.READ_PHONE_STATE\" />\n    <uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\" />\n    <uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\" />\n    <uses-permission android:name=\"android.permission.CHANGE_CONFIGURATION\" />\n    <uses-permission android:name=\"android.permission.WAKE_LOCK\" />\n\n    <uses-feature android:name=\"android.hardware.camera\" />\n    <uses-feature android:name=\"android.hardware.camera.autofocus\" />\n\n    <uses-permission android:name=\"android.permission.CAMERA\" />\n    <uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\" />\n\n    <application\n        android:name=\".CrashApplication\"\n        android:allowBackup=\"true\"\n        android:icon=\"@drawable/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:theme=\"@style/AppTheme\" >\n        <meta-data\n            android:name=\"com.amap.api.v2.apikey\"\n            android:value=\"40fd2c7bc96ff0fc9eccdbabc2b96984\" />\n        <meta-data\n            android:name=\"UMENG_APPKEY\"\n            android:value=\"552bc81efd98c518a50008b2\" />\n        <!-- Push UMENG_MESSAGE_SECRET -->\n        <meta-data\n            android:name=\"UMENG_MESSAGE_SECRET\"\n            android:value=\"UMENG_MESSAGE_SECRET\" >\n        </meta-data>\n        <!-- umeng push -->\n        <meta-data\n            android:name=\"UMENG_CHANNEL\"\n            android:value=\"Umeng\" />\n\n        <activity\n            android:name=\"com.cwp.cmoneycharge.MainActivity\"\n            android:label=\"@string/app_name\" >\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n        <activity android:name=\"com.cwp.cmoneycharge.About\" />\n        <activity android:name=\"com.cwp.cmoneycharge.Account\" />\n        <activity android:name=\"com.cwp.cmoneycharge.AddIncome\" />\n        <activity android:name=\"com.cwp.cmoneycharge.AddNote\" />\n        <activity android:name=\"com.cwp.cmoneycharge.AddPay\" />\n        <activity android:name=\"com.cwp.cmoneycharge.Author\" />\n        <activity android:name=\"com.cwp.cmoneycharge.ChangePwd\" />\n        <activity android:name=\"com.cwp.cmoneycharge.Data\" />\n        <activity android:name=\"com.cwp.cmoneycharge.Description\" />\n        <activity android:name=\"com.cwp.cmoneycharge.Income\" />\n        <activity android:name=\"com.cwp.cmoneycharge.IncomeData\" />\n        <activity android:name=\"com.cwp.cmoneycharge.InPtypeManager\" />\n        <activity android:name=\"com.cwp.cmoneycharge.Login\" />\n        <activity android:name=\"com.cwp.cmoneycharge.ModifyInP\" />\n        <activity android:name=\"com.cwp.cmoneycharge.ModifyNote\" />\n        <activity android:name=\"com.cwp.cmoneycharge.Note\" />\n        <activity android:name=\"com.cwp.cmoneycharge.Pay\" />\n        <activity android:name=\"com.cwp.cmoneycharge.PayData\" />\n        <activity android:name=\"com.cwp.cmoneycharge.PIData\" />\n        <activity android:name=\"com.cwp.cmoneycharge.Register\" />\n        <activity android:name=\"com.cwp.cmoneycharge.Setting\" />\n        <activity android:name=\"cwp.moneycharge.dao.AccountDAO\" />\n        <activity android:name=\"cwp.moneycharge.dao.DBOpenHelper\" />\n        <activity android:name=\"cwp.moneycharge.dao.IncomeDAO\" />\n        <activity android:name=\"cwp.moneycharge.dao.ItypeDAO\" />\n        <activity android:name=\"cwp.moneycharge.dao.NoteDAO\" />\n        <activity android:name=\"cwp.moneycharge.dao.PayDAO\" />\n        <activity android:name=\"cwp.moneycharge.dao.PtypeDAO\" />\n        <activity android:name=\"cwp.moneycharge.model.ActivityManager\" />\n        <activity android:name=\"cwp.moneycharge.model.CustomDialog\" />\n        <activity android:name=\"cwp.moneycharge.model.Datapicker\" />\n        <activity android:name=\"cwp.moneycharge.model.KindData\" />\n        <activity android:name=\"cwp.moneycharge.model.Tb_account\" />\n        <activity android:name=\"cwp.moneycharge.model.Tb_income\" />\n        <activity android:name=\"cwp.moneycharge.model.Tb_itype\" />\n        <activity android:name=\"cwp.moneycharge.model.Tb_note\" />\n        <activity android:name=\"cwp.moneycharge.model.Tb_pay\" />\n        <activity android:name=\"cwp.moneycharge.model.Tb_ptype\" />\n        <activity android:name=\"com.cwp.cmoneycharge.SettingActivity\" />\n        <activity android:name=\"com.cwp.cmoneycharge.PayChart\" />\n        <activity\n            android:name=\"com.umeng.fb.example.CustomActivity\"\n            android:windowSoftInputMode=\"adjustPan\" />\n        <activity\n            android:name=\"com.example.testpic.PublishedActivity\"\n            android:theme=\"@style/HalfTransparent\" />\n        <activity\n            android:name=\"com.cwp.cmoneycharge.SearchActivity\"\n            android:theme=\"@style/HalfTransparent\"\n            android:windowSoftInputMode=\"stateVisible|adjustPan\" />\n        <activity\n            android:name=\"com.cwp.pattern.CreateGesturePasswordActivity\"\n            android:screenOrientation=\"portrait\" />\n        <activity\n            android:name=\"com.cwp.pattern.GuideGesturePasswordActivity\"\n            android:screenOrientation=\"portrait\" />\n        <activity\n            android:name=\"com.cwp.pattern.UnlockGesturePasswordActivity\"\n            android:screenOrientation=\"portrait\" />\n        <activity\n            android:name=\"com.example.testpic.ImageGridActivity\"\n            android:theme=\"@android:style/Theme.NoTitleBar\" >\n        </activity>\n        <activity\n            android:name=\"com.example.testpic.TestPicActivity\"\n            android:configChanges=\"orientation|keyboardHidden\"\n            android:theme=\"@android:style/Theme.NoTitleBar\" >\n        </activity>\n        <activity\n            android:name=\"com.example.testpic.PhotoActivity\"\n            android:theme=\"@android:style/Theme.NoTitleBar\" >\n        </activity>\n    </application>\n\n</manifest>"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/chart/BaseFoldingLayout.java",
    "content": "/*\n * Copyright (C) 2013 Priboi Tiberiu\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.cwp.chart;\n\nimport com.cwp.cmoneycharge.R;\n\nimport android.content.Context;\nimport android.content.res.TypedArray;\nimport android.graphics.Bitmap;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphics.LinearGradient;\nimport android.graphics.Matrix;\nimport android.graphics.Paint;\nimport android.graphics.Paint.Style;\nimport android.graphics.Rect;\nimport android.graphics.Shader.TileMode;\nimport android.util.AttributeSet;\nimport android.view.View;\nimport android.view.ViewGroup;\n\n/**\n * The folding layout where the number of folds, the anchor point and the\n * orientation of the fold can be specified. Each of these parameters can be\n * modified individually and updates and resets the fold to a default (unfolded)\n * state. The fold factor varies between 0 (completely unfolded flat image) to\n * 1.0 (completely folded, non-visible image).\n * \n * This layout throws an exception if there is more than one child added to the\n * view. For more complicated view hierarchy's inside the folding layout, the\n * views should all be nested inside 1 parent layout.\n * \n * This layout folds the contents of its child in real time. By applying matrix\n * transformations when drawing to canvas, the contents of the child may change\n * as the fold takes place. It is important to note that there are jagged edges\n * about the perimeter of the layout as a result of applying transformations to\n * a rectangle. This can be avoided by having the child of this layout wrap its\n * content inside a 1 pixel transparent border. This will cause an anti-aliasing\n * like effect and smoothen out the edges.\n * \n */\npublic class BaseFoldingLayout extends ViewGroup {\n\n\t/*\n\t * A bug was introduced in Android 4.3 that ignores changes to the Canvas\n\t * state between multiple calls to super.dispatchDraw() when running with\n\t * hardware acceleration. To account for this bug, a slightly different\n\t * approach was taken to fold a static image whereby a bitmap of the\n\t * original contents is captured and drawn in segments onto the canvas.\n\t * However, this method does not permit the folding of a TextureView hosting\n\t * a live camera feed which continuously updates. Furthermore, the sepia\n\t * effect was removed from the bitmap variation of the demo to simplify the\n\t * logic when running with this workaround.\"\n\t */\n\n\tpublic static enum Orientation {\n\t\tVERTICAL, HORIZONTAL\n\t}\n\n\tprivate final String FOLDING_VIEW_EXCEPTION_MESSAGE = \"Folding Layout can only 1 child at \"\n\t\t\t+ \"most\";\n\n\tprivate final float SHADING_ALPHA = 0.8f;\n\tprivate final float SHADING_FACTOR = 0.5f;\n\tprivate final int DEPTH_CONSTANT = 1500;\n\tprivate final int NUM_OF_POLY_POINTS = 8;\n\n\tprivate Rect[] mFoldRectArray;\n\n\tprivate Matrix[] mMatrix;\n\n\tprotected Orientation mOrientation = Orientation.VERTICAL;\n\n\tprotected float mAnchorFactor = 0;\n\tprivate float mFoldFactor = 0;\n\n\tprivate int mNumberOfFolds = 2;\n\n\tprivate boolean mIsHorizontal = true;\n\n\tprivate int mOriginalWidth = 0;\n\tprivate int mOriginalHeight = 0;\n\n\tprivate float mFoldMaxWidth = 0;\n\tprivate float mFoldMaxHeight = 0;\n\tprivate float mFoldDrawWidth = 0;\n\tprivate float mFoldDrawHeight = 0;\n\n\tprivate boolean mIsFoldPrepared = false;\n\tprivate boolean mShouldDraw = true;\n\n\tprivate Paint mSolidShadow;\n\tprivate Paint mGradientShadow;\n\tprivate LinearGradient mShadowLinearGradient;\n\tprivate Matrix mShadowGradientMatrix;\n\n\tprivate float[] mSrc;\n\tprivate float[] mDst;\n\n\tprivate OnFoldListener mFoldListener;\n\n\tprivate float mPreviousFoldFactor = 0;\n\n\tprivate Bitmap mFullBitmap;\n\tprivate Rect mDstRect;\n\n\tpublic BaseFoldingLayout(Context context) {\n\t\tsuper(context);\n\t}\n\n\tpublic BaseFoldingLayout(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t\tinit(context, attrs);\n\t}\n\n\tpublic BaseFoldingLayout(Context context, AttributeSet attrs, int defStyle) {\n\t\tsuper(context, attrs, defStyle);\n\t\tinit(context, attrs);\n\t}\n\n\tpublic void init(Context context, AttributeSet attrs) {\n\t\t// now style everything!\n\t\tTypedArray ta = context.obtainStyledAttributes(attrs,\n\t\t\t\tR.styleable.FoldingMenu);\n\t\tint mFoldNumber = ta.getInt(R.styleable.FoldingMenu_foldNumber,\n\t\t\t\tmNumberOfFolds);\n\t\tif (mFoldNumber > 0 && mFoldNumber < 7) {\n\t\t\tmNumberOfFolds = mFoldNumber;\n\t\t} else {\n\t\t\tmNumberOfFolds = 2;\n\t\t}\n\t\tta.recycle();\n\t}\n\n\t@Override\n\tprotected boolean addViewInLayout(View child, int index,\n\t\t\tLayoutParams params, boolean preventRequestLayout) {\n\t\tthrowCustomException(getChildCount());\n\t\tboolean returnValue = super.addViewInLayout(child, index, params,\n\t\t\t\tpreventRequestLayout);\n\t\treturn returnValue;\n\t}\n\n\t@Override\n\tpublic void addView(View child, int index, LayoutParams params) {\n\t\tthrowCustomException(getChildCount());\n\t\tsuper.addView(child, index, params);\n\t}\n\n\t@Override\n\tprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n\t\tView child = getChildAt(0);\n\t\tmeasureChild(child, widthMeasureSpec, heightMeasureSpec);\n\t\tsetMeasuredDimension(widthMeasureSpec, heightMeasureSpec);\n\t}\n\n\t@Override\n\tprotected void onLayout(boolean changed, int l, int t, int r, int b) {\n\t\tView child = getChildAt(0);\n\t\tchild.layout(0, 0, child.getMeasuredWidth(), child.getMeasuredHeight());\n\t\tupdateFold();\n\t}\n\n\t/**\n\t * The custom exception to be thrown so as to limit the number of views in\n\t * this layout to at most one.\n\t */\n\tprivate class NumberOfFoldingLayoutChildrenException extends\n\t\t\tRuntimeException {\n\t\t/**\n\t\t * \n\t\t */\n\t\tprivate static final long serialVersionUID = 1L;\n\n\t\tpublic NumberOfFoldingLayoutChildrenException(String message) {\n\t\t\tsuper(message);\n\t\t}\n\t}\n\n\t/**\n\t * Throws an exception if the number of views added to this layout exceeds\n\t * one.\n\t */\n\tprivate void throwCustomException(int numOfChildViews) {\n\t\tif (numOfChildViews == 1) {\n\t\t\tthrow new NumberOfFoldingLayoutChildrenException(\n\t\t\t\t\tFOLDING_VIEW_EXCEPTION_MESSAGE);\n\t\t}\n\t}\n\n\tpublic void setFoldListener(OnFoldListener foldListener) {\n\t\tmFoldListener = foldListener;\n\t}\n\n\t/**\n\t * Sets the fold factor of the folding view and updates all the\n\t * corresponding matrices and values to account for the new fold factor.\n\t * Once that is complete, it redraws itself with the new fold.\n\t */\n\tpublic void setFoldFactor(float foldFactor) {\n\t\tif (foldFactor != mFoldFactor) {\n\t\t\tmFoldFactor = foldFactor;\n\t\t\tcalculateMatrices();\n\t\t\tinvalidate();\n\t\t}\n\t}\n\n\tpublic void setOrientation(Orientation orientation) {\n\t\tif (orientation != mOrientation) {\n\t\t\tmOrientation = orientation;\n\t\t\tupdateFold();\n\t\t}\n\t}\n\n\tpublic void setAnchorFactor(float anchorFactor) {\n\t\tif (anchorFactor != mAnchorFactor) {\n\t\t\tmAnchorFactor = anchorFactor;\n\t\t\tupdateFold();\n\t\t}\n\t}\n\n\tpublic void setNumberOfFolds(int numberOfFolds) {\n\t\tif (numberOfFolds != mNumberOfFolds) {\n\t\t\tmNumberOfFolds = numberOfFolds;\n\t\t\tupdateFold();\n\t\t}\n\t}\n\n\tpublic float getAnchorFactor() {\n\t\treturn mAnchorFactor;\n\t}\n\n\tpublic Orientation getOrientation() {\n\t\treturn mOrientation;\n\t}\n\n\tpublic float getFoldFactor() {\n\t\treturn mFoldFactor;\n\t}\n\n\tpublic int getNumberOfFolds() {\n\t\treturn mNumberOfFolds;\n\t}\n\n\tprivate void updateFold() {\n\t\tprepareFold(mOrientation, mAnchorFactor, mNumberOfFolds);\n\t\tcalculateMatrices();\n\t\tinvalidate();\n\t}\n\n\t/**\n\t * This method is called in order to update the fold's orientation, anchor\n\t * point and number of folds. This creates the necessary setup in order to\n\t * prepare the layout for a fold with the specified parameters. Some of the\n\t * dimensions required for the folding transformation are also acquired\n\t * here.\n\t * \n\t * After this method is called, it will be in a completely unfolded state by\n\t * default.\n\t */\n\tprivate void prepareFold(Orientation orientation, float anchorFactor,\n\t\t\tint numberOfFolds) {\n\n\t\tmSrc = new float[NUM_OF_POLY_POINTS];\n\t\tmDst = new float[NUM_OF_POLY_POINTS];\n\n\t\tmDstRect = new Rect();\n\n\t\tmFoldFactor = 0;\n\t\tmPreviousFoldFactor = 0;\n\n\t\tmIsFoldPrepared = false;\n\n\t\tmSolidShadow = new Paint();\n\t\tmGradientShadow = new Paint();\n\n\t\tmOrientation = orientation;\n\t\tmIsHorizontal = (orientation == Orientation.HORIZONTAL);\n\n\t\tif (mIsHorizontal) {\n\t\t\tmShadowLinearGradient = new LinearGradient(0, 0, SHADING_FACTOR, 0,\n\t\t\t\t\tColor.BLACK, Color.TRANSPARENT, TileMode.CLAMP);\n\t\t} else {\n\t\t\tmShadowLinearGradient = new LinearGradient(0, 0, 0, SHADING_FACTOR,\n\t\t\t\t\tColor.BLACK, Color.TRANSPARENT, TileMode.CLAMP);\n\t\t}\n\n\t\tmGradientShadow.setStyle(Style.FILL);\n\t\tmGradientShadow.setShader(mShadowLinearGradient);\n\t\tmShadowGradientMatrix = new Matrix();\n\n\t\tmAnchorFactor = anchorFactor;\n\t\tmNumberOfFolds = numberOfFolds;\n\n\t\tmOriginalWidth = getMeasuredWidth();\n\t\tmOriginalHeight = getMeasuredHeight();\n\n\t\tmFoldRectArray = new Rect[mNumberOfFolds];\n\t\tmMatrix = new Matrix[mNumberOfFolds];\n\n\t\tfor (int x = 0; x < mNumberOfFolds; x++) {\n\t\t\tmMatrix[x] = new Matrix();\n\t\t}\n\n\t\tint h = mOriginalHeight;\n\t\tint w = mOriginalWidth;\n\n\t\tif (Util.IS_JBMR2 && h != 0 && w != 0) {\n\t\t\tmFullBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);\n\t\t\tCanvas canvas = new Canvas(mFullBitmap);\n\t\t\tgetChildAt(0).draw(canvas);\n\t\t}\n\n\t\tint delta = Math.round(mIsHorizontal ? ((float) w)\n\t\t\t\t/ ((float) mNumberOfFolds) : ((float) h)\n\t\t\t\t/ ((float) mNumberOfFolds));\n\n\t\t/*\n\t\t * Loops through the number of folds and segments the full layout into a\n\t\t * number of smaller equal components. If the number of folds is odd,\n\t\t * then one of the components will be smaller than all the rest. Note\n\t\t * that deltap below handles the calculation for an odd number of folds.\n\t\t */\n\t\tfor (int x = 0; x < mNumberOfFolds; x++) {\n\t\t\tif (mIsHorizontal) {\n\t\t\t\tint deltap = (x + 1) * delta > w ? w - x * delta : delta;\n\t\t\t\tmFoldRectArray[x] = new Rect(x * delta, 0, x * delta + deltap,\n\t\t\t\t\t\th);\n\t\t\t} else {\n\t\t\t\tint deltap = (x + 1) * delta > h ? h - x * delta : delta;\n\t\t\t\tmFoldRectArray[x] = new Rect(0, x * delta, w, x * delta\n\t\t\t\t\t\t+ deltap);\n\t\t\t}\n\t\t}\n\n\t\tif (mIsHorizontal) {\n\t\t\tmFoldMaxHeight = h;\n\t\t\tmFoldMaxWidth = delta;\n\t\t} else {\n\t\t\tmFoldMaxHeight = delta;\n\t\t\tmFoldMaxWidth = w;\n\t\t}\n\n\t\tmIsFoldPrepared = true;\n\t}\n\n\t/*\n\t * Calculates the transformation matrices used to draw each of the separate\n\t * folding segments from this view.\n\t */\n\tprivate void calculateMatrices() {\n\n\t\tmShouldDraw = true;\n\n\t\tif (!mIsFoldPrepared) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * If the fold factor is 1 than the folding view should not be seen and\n\t\t * the canvas can be left completely empty.\n\t\t */\n\t\tif (mFoldFactor == 1) {\n\t\t\tmShouldDraw = false;\n\t\t\treturn;\n\t\t}\n\n\t\t// if (mFoldFactor == 0 && mPreviousFoldFactor > 0\n\t\t// && mFoldListener != null) {\n\t\t//\n\t\t// mFoldListener.onEndFold(mFoldFactor);\n\t\t// }else if (mPreviousFoldFactor == 0 && mFoldFactor > 0\n\t\t// && mFoldListener != null) {\n\t\t//\n\t\t// mFoldListener.onStartFold(mFoldFactor);\n\t\t// } else if(mFoldListener != null) {\n\t\t// mFoldListener.onFoldingState(mFoldFactor);\n\t\t// }\n\n\t\tif (mFoldFactor > 0.9f && mFoldFactor > mPreviousFoldFactor\n\t\t\t\t&& mFoldListener != null) {\n\n\t\t\tmFoldListener.onEndFold(mFoldFactor);\n\t\t} else if (mFoldFactor < 0.1f && mFoldFactor < mPreviousFoldFactor\n\t\t\t\t&& mFoldListener != null) {\n\n\t\t\tmFoldListener.onStartFold(mFoldFactor);\n\t\t} else if (mFoldListener != null) {\n\n\t\t\tmFoldListener.onFoldingState(mFoldFactor, mFoldDrawHeight);\n\t\t}\n\n\t\t// if(mFoldFactor == 0 && mFoldListener != null) {\n\t\t// mFoldListener.onStartFold(mFoldFactor);\n\t\t// } else if(mFoldFactor == 1 && mFoldListener != null) {\n\t\t// mFoldListener.onEndFold(mFoldFactor);\n\t\t// } else {\n\t\t// mFoldListener.onFoldingState(mFoldFactor);\n\t\t// }\n\n\t\tmPreviousFoldFactor = mFoldFactor;\n\n\t\t/*\n\t\t * Reset all the transformation matrices back to identity before\n\t\t * computing the new transformation\n\t\t */\n\t\tfor (int x = 0; x < mNumberOfFolds; x++) {\n\t\t\tmMatrix[x].reset();\n\t\t}\n\n\t\tfloat cTranslationFactor = 1 - mFoldFactor;\n\n\t\tfloat translatedDistance = mIsHorizontal ? mOriginalWidth\n\t\t\t\t* cTranslationFactor : mOriginalHeight * cTranslationFactor;\n\n\t\tfloat translatedDistancePerFold = Math.round(translatedDistance\n\t\t\t\t/ mNumberOfFolds);\n\n\t\t/*\n\t\t * For an odd number of folds, the rounding error may cause the\n\t\t * translatedDistancePerFold to be grater than the max fold width or\n\t\t * height.\n\t\t */\n\t\tmFoldDrawWidth = mFoldMaxWidth < translatedDistancePerFold ? translatedDistancePerFold\n\t\t\t\t: mFoldMaxWidth;\n\t\tmFoldDrawHeight = mFoldMaxHeight < translatedDistancePerFold ? translatedDistancePerFold\n\t\t\t\t: mFoldMaxHeight;\n\n\t\tfloat translatedDistanceFoldSquared = translatedDistancePerFold\n\t\t\t\t* translatedDistancePerFold;\n\n\t\t/*\n\t\t * Calculate the depth of the fold into the screen using pythagorean\n\t\t * theorem.\n\t\t */\n\t\tfloat depth = mIsHorizontal ? (float) Math\n\t\t\t\t.sqrt((double) (mFoldDrawWidth * mFoldDrawWidth - translatedDistanceFoldSquared))\n\t\t\t\t: (float) Math\n\t\t\t\t\t\t.sqrt((double) (mFoldDrawHeight * mFoldDrawHeight - translatedDistanceFoldSquared));\n\n\t\t/*\n\t\t * The size of some object is always inversely proportional to the\n\t\t * distance it is away from the viewpoint. The constant can be varied to\n\t\t * to affect the amount of perspective.\n\t\t */\n\t\tfloat scaleFactor = DEPTH_CONSTANT / (DEPTH_CONSTANT + depth);\n\n\t\tfloat scaledWidth, scaledHeight, bottomScaledPoint, topScaledPoint, rightScaledPoint, leftScaledPoint;\n\n\t\tif (mIsHorizontal) {\n\t\t\tscaledWidth = mFoldDrawWidth * cTranslationFactor;\n\t\t\tscaledHeight = mFoldDrawHeight * scaleFactor;\n\t\t} else {\n\t\t\tscaledWidth = mFoldDrawWidth * scaleFactor;\n\t\t\tscaledHeight = mFoldDrawHeight * cTranslationFactor;\n\t\t}\n\n\t\ttopScaledPoint = (mFoldDrawHeight - scaledHeight) / 2.0f;\n\t\tbottomScaledPoint = topScaledPoint + scaledHeight;\n\n\t\tleftScaledPoint = (mFoldDrawWidth - scaledWidth) / 2.0f;\n\t\trightScaledPoint = leftScaledPoint + scaledWidth;\n\n\t\tfloat anchorPoint = mIsHorizontal ? mAnchorFactor * mOriginalWidth\n\t\t\t\t: mAnchorFactor * mOriginalHeight;\n\n\t\t/* The fold along which the anchor point is located. */\n\t\tfloat midFold = mIsHorizontal ? (anchorPoint / mFoldDrawWidth)\n\t\t\t\t: anchorPoint / mFoldDrawHeight;\n\n\t\tmSrc[0] = 0;\n\t\tmSrc[1] = 0;\n\t\tmSrc[2] = 0;\n\t\tmSrc[3] = mFoldDrawHeight;\n\t\tmSrc[4] = mFoldDrawWidth;\n\t\tmSrc[5] = 0;\n\t\tmSrc[6] = mFoldDrawWidth;\n\t\tmSrc[7] = mFoldDrawHeight;\n\n\t\t/*\n\t\t * Computes the transformation matrix for each fold using the values\n\t\t * calculated above.\n\t\t */\n\t\tfor (int x = 0; x < mNumberOfFolds; x++) {\n\n\t\t\tboolean isEven = (x % 2 == 0);\n\n\t\t\tif (mIsHorizontal) {\n\t\t\t\tmDst[0] = (anchorPoint > x * mFoldDrawWidth) ? anchorPoint\n\t\t\t\t\t\t+ (x - midFold) * scaledWidth : anchorPoint\n\t\t\t\t\t\t- (midFold - x) * scaledWidth;\n\t\t\t\tmDst[1] = isEven ? 0 : topScaledPoint;\n\t\t\t\tmDst[2] = mDst[0];\n\t\t\t\tmDst[3] = isEven ? mFoldDrawHeight : bottomScaledPoint;\n\t\t\t\tmDst[4] = (anchorPoint > (x + 1) * mFoldDrawWidth) ? anchorPoint\n\t\t\t\t\t\t+ (x + 1 - midFold) * scaledWidth\n\t\t\t\t\t\t: anchorPoint - (midFold - x - 1) * scaledWidth;\n\t\t\t\tmDst[5] = isEven ? topScaledPoint : 0;\n\t\t\t\tmDst[6] = mDst[4];\n\t\t\t\tmDst[7] = isEven ? bottomScaledPoint : mFoldDrawHeight;\n\n\t\t\t} else {\n\t\t\t\tmDst[0] = isEven ? 0 : leftScaledPoint;\n\t\t\t\tmDst[1] = (anchorPoint > x * mFoldDrawHeight) ? anchorPoint\n\t\t\t\t\t\t+ (x - midFold) * scaledHeight : anchorPoint\n\t\t\t\t\t\t- (midFold - x) * scaledHeight;\n\t\t\t\tmDst[2] = isEven ? leftScaledPoint : 0;\n\t\t\t\tmDst[3] = (anchorPoint > (x + 1) * mFoldDrawHeight) ? anchorPoint\n\t\t\t\t\t\t+ (x + 1 - midFold) * scaledHeight\n\t\t\t\t\t\t: anchorPoint - (midFold - x - 1) * scaledHeight;\n\t\t\t\tmDst[4] = isEven ? mFoldDrawWidth : rightScaledPoint;\n\t\t\t\tmDst[5] = mDst[1];\n\t\t\t\tmDst[6] = isEven ? rightScaledPoint : mFoldDrawWidth;\n\t\t\t\tmDst[7] = mDst[3];\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Pixel fractions are present for odd number of folds which need to\n\t\t\t * be rounded off here.\n\t\t\t */\n\t\t\tfor (int y = 0; y < 8; y++) {\n\t\t\t\tmDst[y] = Math.round(mDst[y]);\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * If it so happens that any of the folds have reached a point where\n\t\t\t * the width or height of that fold is 0, then nothing needs to be\n\t\t\t * drawn onto the canvas because the view is essentially completely\n\t\t\t * folded.\n\t\t\t */\n\t\t\tif (mIsHorizontal) {\n\t\t\t\tif (mDst[4] <= mDst[0] || mDst[6] <= mDst[2]) {\n\t\t\t\t\tmShouldDraw = false;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (mDst[3] <= mDst[1] || mDst[7] <= mDst[5]) {\n\t\t\t\t\tmShouldDraw = false;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Sets the shadow and bitmap transformation matrices. */\n\t\t\tmMatrix[x].setPolyToPoly(mSrc, 0, mDst, 0, NUM_OF_POLY_POINTS / 2);\n\t\t}\n\t\t/*\n\t\t * The shadows on the folds are split into two parts: Solid shadows and\n\t\t * gradients. Every other fold has a solid shadow which overlays the\n\t\t * whole fold. Similarly, the folds in between these alternating folds\n\t\t * also have an overlaying shadow. However, it is a gradient that takes\n\t\t * up part of the fold as opposed to a solid shadow overlaying the whole\n\t\t * fold.\n\t\t */\n\n\t\t/* Solid shadow paint object. */\n\t\tint alpha = (int) (mFoldFactor * 255 * SHADING_ALPHA);\n\n\t\tmSolidShadow.setColor(Color.argb(alpha, 0, 0, 0));\n\n\t\tif (mIsHorizontal) {\n\t\t\tmShadowGradientMatrix.setScale(mFoldDrawWidth, 1);\n\t\t\tmShadowLinearGradient.setLocalMatrix(mShadowGradientMatrix);\n\t\t} else {\n\t\t\tmShadowGradientMatrix.setScale(1, mFoldDrawHeight);\n\t\t\tmShadowLinearGradient.setLocalMatrix(mShadowGradientMatrix);\n\t\t}\n\n\t\tmGradientShadow.setAlpha(alpha);\n\t}\n\n\t@Override\n\tprotected void dispatchDraw(Canvas canvas) {\n\t\t/**\n\t\t * If prepareFold has not been called or if preparation has not\n\t\t * completed yet, then no custom drawing will take place so only need to\n\t\t * invoke super's onDraw and return.\n\t\t */\n\t\tif (!mIsFoldPrepared || mFoldFactor == 0) {\n\t\t\tsuper.dispatchDraw(canvas);\n\t\t\treturn;\n\t\t}\n\n\t\tif (!mShouldDraw) {\n\t\t\treturn;\n\t\t}\n\n\t\tRect src;\n\t\t/*\n\t\t * Draws the bitmaps and shadows on the canvas with the appropriate\n\t\t * transformations.\n\t\t */\n\t\tfor (int x = 0; x < mNumberOfFolds; x++) {\n\n\t\t\tsrc = mFoldRectArray[x];\n\t\t\t/* The canvas is saved and restored for every individual fold */\n\t\t\tcanvas.save();\n\n\t\t\t/*\n\t\t\t * Concatenates the canvas with the transformation matrix for the\n\t\t\t * the segment of the view corresponding to the actual image being\n\t\t\t * displayed.\n\t\t\t */\n\t\t\tcanvas.concat(mMatrix[x]);\n\t\t\tif (Util.IS_JBMR2) {\n\t\t\t\tmDstRect.set(0, 0, src.width(), src.height());\n\t\t\t\tcanvas.drawBitmap(mFullBitmap, src, mDstRect, null);\n\t\t\t} else {\n\t\t\t\t/*\n\t\t\t\t * The same transformation matrix is used for both the shadow\n\t\t\t\t * and the image segment. The canvas is clipped to account for\n\t\t\t\t * the size of each fold and is translated so they are drawn in\n\t\t\t\t * the right place. The shadow is then drawn on top of the\n\t\t\t\t * different folds using the sametransformation matrix.\n\t\t\t\t */\n\t\t\t\tcanvas.clipRect(0, 0, src.right - src.left, src.bottom\n\t\t\t\t\t\t- src.top);\n\n\t\t\t\tif (mIsHorizontal) {\n\t\t\t\t\tcanvas.translate(-src.left, 0);\n\t\t\t\t} else {\n\t\t\t\t\tcanvas.translate(0, -src.top);\n\t\t\t\t}\n\n\t\t\t\tsuper.dispatchDraw(canvas);\n\n\t\t\t\tif (mIsHorizontal) {\n\t\t\t\t\tcanvas.translate(src.left, 0);\n\t\t\t\t} else {\n\t\t\t\t\tcanvas.translate(0, src.top);\n\t\t\t\t}\n\t\t\t}\n\t\t\t/* Draws the shadows corresponding to this specific fold. */\n\t\t\tif (x % 2 == 0) {\n\t\t\t\tcanvas.drawRect(0, 0, mFoldDrawWidth, mFoldDrawHeight,\n\t\t\t\t\t\tmSolidShadow);\n\t\t\t} else {\n\t\t\t\tcanvas.drawRect(0, 0, mFoldDrawWidth, mFoldDrawHeight,\n\t\t\t\t\t\tmGradientShadow);\n\t\t\t}\n\n\t\t\tcanvas.restore();\n\t\t}\n\t}\n\n}"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/chart/ChartProp.java",
    "content": "package com.cwp.chart;\n\nimport android.graphics.Color;\nimport android.util.Log;\nimport android.view.View;\n\npublic class ChartProp {\n\n\tprivate int mId = 0;\n\tprivate float mPercent = 1.0f;\n\tprivate View mParent = null;\n\tprivate int mColor = Color.WHITE;\n\tprivate float mSweepAngle = 0f;\n\tprivate String mName = \"\";\n\tprivate String mName2 = \"\";\n\n\tprivate float mStartAngle = 0f;\n\tprivate float mEndAngle = 0f;\n\n\tpublic ChartProp(View chartView) {\n\t\tmParent = chartView;\n\t}\n\n\tpublic void setId(int id) {\n\t\tmId = id;\n\n\t}\n\n\tpublic int getId() {\n\t\treturn mId;\n\t}\n\n\t/**\n\t * the percent ,such as 0.5f,0.05f, NEIGHTER 50% NOR 50\n\t * \n\t * @param percent\n\t */\n\tpublic void setPercent(float percent) {\n\n\t\t// Log.e(\"caizh\", \"percent=\"+percent);\n\t\tmPercent = percent;\n\t\tmSweepAngle = percent * 360;\n\t\t// invalidate();\n\t}\n\n\tpublic float getPercent() {\n\t\treturn mPercent;\n\t}\n\n\tpublic float getSweepAngle() {\n\t\treturn mSweepAngle;\n\t}\n\n\tpublic void setColor(int color) {\n\t\tmColor = color;\n\t\t// invalidate();\n\t}\n\n\tpublic int getColor() {\n\t\treturn mColor;\n\t}\n\n\tpublic String getName() {\n\t\treturn mName;\n\t}\n\n\tpublic void setName(String name) {\n\t\tthis.mName = name;\n\t\t// invalidate();\n\t}\n\t\n\tpublic String getName2() {\n\t\treturn mName2;\n\t}\n\n\tpublic void setName2(String name) {\n\t\tthis.mName2 = name;\n\t\t// invalidate();\n\t}\n\n\tprivate void invalidate() {\n\t\tif (mParent != null) {\n\t\t\tmParent.invalidate();\n\t\t}\n\t}\n\n\tpublic float getStartAngle() {\n\t\treturn mStartAngle;\n\t}\n\n\tpublic void setStartAngle(float startAngle) {\n\t\tthis.mStartAngle = (startAngle);\n\t}\n\n\tpublic float getEndAngle() {\n\t\treturn mEndAngle;\n\t}\n\n\tpublic void setEndAngle(float endAngle) {\n\n\t\tthis.mEndAngle = (endAngle);\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/chart/ChartPropChangeListener.java",
    "content": "package com.cwp.chart;\n\npublic interface ChartPropChangeListener {\n\tpublic void getChartProp(ChartProp chartProp);\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/chart/CheckAdapter.java",
    "content": "package com.cwp.chart;\n\nimport com.cwp.cmoneycharge.R;\n\nimport android.content.Context;\nimport android.util.SparseArray;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.BaseAdapter;\nimport android.widget.CheckBox;\nimport android.widget.TextView;\n\npublic class CheckAdapter extends BaseAdapter {\n\n\tprivate class ViewHolder {\n\t\tpublic TextView name;\n\t\tpublic CheckBox checkBox;\n\t}\n\n\tprivate String[] names;\n\tprivate LayoutInflater mInflater;\n\tprivate Context mContext;\n\tprivate boolean[] checkedItem;\n\n\tpublic CheckAdapter(Context context, String[] names, boolean[] checkedItem) {\n\t\tthis.names = names;\n\t\tthis.checkedItem = checkedItem;\n\t\tthis.mContext = context;\n\t\tmInflater = (LayoutInflater) mContext\n\t\t\t\t.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n\t}\n\n\t@Override\n\tpublic int getCount() {\n\t\treturn names.length;\n\t}\n\n\t@Override\n\tpublic Object getItem(int position) {\n\t\treturn names[position];\n\t}\n\n\t@Override\n\tpublic long getItemId(int position) {\n\t\treturn position;\n\t}\n\n\tpublic View getItemView(int position) {\n\t\treturn lmap.get(position);\n\t}\n\n\tpublic boolean[] getCheckedItem() {\n\t\t\n\t\tfor (int i = 0; i < getCount(); i++) {\n\t\t\tView view = this.getView(i, null, null);\n\t\t\tCheckBox box = (CheckBox)view.findViewById(R.id.chk_selectone);\n\t\t\tcheckedItem[i] = box.isChecked();\n\t\t}\n\t\t\n\t\treturn checkedItem;\n\t}\n\n\tSparseArray<View> lmap = new SparseArray<View>();\n\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tViewHolder holder = null;\n\t\tView view;\n\t\tif (lmap.get(position) == null) {\n\t\t\tview = mInflater.inflate(R.layout.dialog_multichoice_item, null);\n\t\t\tholder = new ViewHolder();\n\t\t\tholder.name = (TextView) view.findViewById(R.id.contact_name);\n\t\t\tholder.checkBox = (CheckBox) view.findViewById(R.id.chk_selectone);\n\t\t\tlmap.put(position, view);\n\t\t\t\n\t\t\tif (names != null && names.length > 0) {\n\t\t\t\tString name = (String) names[position];\n\t\t\t\tholder.name.setText(name);\n\t\t\t\tholder.checkBox.setChecked(checkedItem[position]);\n\t\t\t}\n\t\t\t\n\t\t\tview.setTag(holder);\n\t\t} else {\n\t\t\tview = lmap.get(position);\n\t\t\tholder = (ViewHolder) view.getTag();\n\t\t}\n\t\treturn view;\n\t}\n\n}"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/chart/CustomMultiChoiceDialog.java",
    "content": "package com.cwp.chart;\n\nimport com.cwp.cmoneycharge.R;\n\nimport android.app.Dialog;\nimport android.content.Context;\nimport android.content.DialogInterface;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup.LayoutParams;\nimport android.widget.AdapterView;\nimport android.widget.AdapterView.OnItemClickListener;\nimport android.widget.Button;\nimport android.widget.CheckBox;\nimport android.widget.CompoundButton;\nimport android.widget.CompoundButton.OnCheckedChangeListener;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.ListView;\nimport android.widget.TextView;\n\npublic class CustomMultiChoiceDialog extends Dialog {\n\n\tpublic CustomMultiChoiceDialog(Context context) {\n\t\tsuper(context);\n\t}\n\n\tpublic CustomMultiChoiceDialog(Context context, int theme) {\n\t\tsuper(context, theme);\n\t}\n\n\tpublic static class Builder {\n\t\tprivate Context context;\n\t\tprivate String title;\n\t\tprivate String message;\n\t\tprivate String positiveButtonText;\n\t\tprivate String negativeButtonText;\n\t\tprivate View contentView;\n\t\tprivate ListView listView;\n\t\tprivate DialogInterface.OnClickListener positiveButtonClickListener;\n\t\tprivate DialogInterface.OnClickListener negativeButtonClickListener;\n\t\tprivate OnItemClickListener onItemClickListener;\n\n\t\tprivate String[] items;\n\t\tprivate boolean[] checkedItems;\n\t\tprivate boolean showSelectAll;\n\t\tprivate static boolean isMultiChoice = false;\n\t\tpublic static String contact_name;\n\n\t\tpublic Builder(Context context) {\n\t\t\tthis.context = context;\n\t\t}\n\n\t\tpublic Builder setMessage(String message) {\n\t\t\tthis.message = message;\n\t\t\treturn this;\n\t\t}\n\n\t\tpublic ListView getListView() {\n\t\t\treturn listView;\n\t\t}\n\n\t\tpublic boolean[] getCheckedItems() {\n\t\t\tif (listView != null) {\n\t\t\t\tCheckAdapter adapter = (CheckAdapter) listView.getAdapter();\n\t\t\t\tcheckedItems = adapter.getCheckedItem();\n\t\t\t}\n\t\t\treturn checkedItems;\n\t\t}\n\n\t\t/**\n\t\t * Set the Dialog message from resource\n\t\t * \n\t\t * @param title\n\t\t * @return\n\t\t */\n\t\tpublic Builder setMessage(int message) {\n\t\t\tthis.message = (String) context.getText(message);\n\t\t\treturn this;\n\t\t}\n\n\t\t/**\n\t\t * Set the Dialog title from resource\n\t\t * \n\t\t * @param title\n\t\t * @return\n\t\t */\n\t\tpublic Builder setTitle(int title) {\n\t\t\tthis.title = (String) context.getText(title);\n\t\t\treturn this;\n\t\t}\n\n\t\t/**\n\t\t * Set the Dialog title from String\n\t\t * \n\t\t * @param title\n\t\t * @return\n\t\t */\n\n\t\tpublic Builder setTitle(String title) {\n\t\t\tthis.title = title;\n\t\t\treturn this;\n\t\t}\n\n\t\tpublic Builder setContentView(View v) {\n\t\t\tthis.contentView = v;\n\t\t\treturn this;\n\t\t}\n\n\t\t/**\n\t\t * Set the positive button resource and it's listener\n\t\t * \n\t\t * @param positiveButtonText\n\t\t * @return\n\t\t */\n\t\tpublic Builder setPositiveButton(int positiveButtonText,\n\t\t\t\tDialogInterface.OnClickListener listener) {\n\t\t\tthis.positiveButtonText = (String) context\n\t\t\t\t\t.getText(positiveButtonText);\n\t\t\tthis.positiveButtonClickListener = listener;\n\t\t\treturn this;\n\t\t}\n\n\t\tpublic Builder setPositiveButton(String positiveButtonText,\n\t\t\t\tDialogInterface.OnClickListener listener) {\n\t\t\tthis.positiveButtonText = positiveButtonText;\n\t\t\tthis.positiveButtonClickListener = listener;\n\t\t\treturn this;\n\t\t}\n\n\t\tpublic Builder setNegativeButton(int negativeButtonText,\n\t\t\t\tDialogInterface.OnClickListener listener) {\n\t\t\tthis.negativeButtonText = (String) context\n\t\t\t\t\t.getText(negativeButtonText);\n\t\t\tthis.negativeButtonClickListener = listener;\n\t\t\treturn this;\n\t\t}\n\n\t\tpublic Builder setNegativeButton(String negativeButtonText,\n\t\t\t\tDialogInterface.OnClickListener listener) {\n\t\t\tthis.negativeButtonText = negativeButtonText;\n\t\t\tthis.negativeButtonClickListener = listener;\n\t\t\treturn this;\n\t\t}\n\n\t\t/**\n\t\t * \n\t\t * \n\t\t * @param items\n\t\t * @param checkedItems\n\t\t * @param onItemClickListener\n\t\t *            Listening the item click event.\n\t\t * @param showSelectAll\n\t\t *            Whether to display the full checkbox.\n\t\t * @return\n\t\t */\n\t\tpublic Builder setMultiChoiceItems(boolean isMultiChoice,\n\t\t\t\tString[] items, boolean[] checkedItems,\n\t\t\t\tOnItemClickListener onItemClickListener, boolean showSelectAll) {\n\t\t\tthis.isMultiChoice = isMultiChoice;\n\t\t\tthis.items = items;\n\t\t\tthis.checkedItems = checkedItems;\n\t\t\tthis.onItemClickListener = onItemClickListener;\n\t\t\tthis.showSelectAll = showSelectAll;\n\t\t\treturn this;\n\t\t}\n\n\t\tpublic CustomMultiChoiceDialog create() {\n\t\t\tLayoutInflater inflater = (LayoutInflater) context\n\t\t\t\t\t.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t\t// instantiate the dialog with the custom Theme\n\t\t\tfinal CustomMultiChoiceDialog dialog = new CustomMultiChoiceDialog(\n\t\t\t\t\tcontext, R.style.Dialog);\n\t\t\tView layout = inflater.inflate(R.layout.dialog_multichoice_layout,\n\t\t\t\t\tnull);\n\n\t\t\t// set the dialog title\n\t\t\tTextView multichoicTitle = (TextView) layout\n\t\t\t\t\t.findViewById(R.id.multichoic_title);\n\t\t\tmultichoicTitle.setText(title);\n\t\t\tImageView checkAll = (ImageView) layout\n\t\t\t\t\t.findViewById(R.id.chk_selectall);\n\t\t\tLinearLayout dialog_bottom = (LinearLayout) layout\n\t\t\t\t\t.findViewById(R.id.dialog_bottom);\n\n\t\t\tButton positiveButton = (Button) layout\n\t\t\t\t\t.findViewById(R.id.positiveButton);\n\t\t\tButton negativeButton = (Button) layout\n\t\t\t\t\t.findViewById(R.id.negativeButton);\n\n\t\t\tlistView = (ListView) layout.findViewById(R.id.multichoiceList);\n\n\t\t\tdialog.addContentView(layout, new LayoutParams(\n\t\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));\n\n\t\t\t// set the confirm button\n\t\t\tif (positiveButtonText != null) {\n\t\t\t\tpositiveButton.setText(positiveButtonText);\n\t\t\t\tif (positiveButtonClickListener != null) {\n\t\t\t\t\tpositiveButton\n\t\t\t\t\t\t\t.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\tpositiveButtonClickListener.onClick(dialog,\n\t\t\t\t\t\t\t\t\t\t\tDialogInterface.BUTTON_POSITIVE);\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tpositiveButton\n\t\t\t\t\t\t\t.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// if no confirm button just set the visibility to GONE\n\t\t\t\tpositiveButton.setVisibility(View.GONE);\n\t\t\t\tdialog_bottom.setVisibility(View.GONE);\n\t\t\t}\n\t\t\t// set the cancel button\n\t\t\tif (negativeButtonText != null) {\n\t\t\t\tnegativeButton.setText(negativeButtonText);\n\t\t\t\tif (negativeButtonClickListener != null) {\n\t\t\t\t\tnegativeButton\n\t\t\t\t\t\t\t.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\tnegativeButtonClickListener.onClick(dialog,\n\t\t\t\t\t\t\t\t\t\t\tDialogInterface.BUTTON_NEGATIVE);\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tnegativeButton\n\t\t\t\t\t\t\t.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// if no confirm button just set the visibility to GONE\n\t\t\t\tnegativeButton.setVisibility(View.GONE);\n\t\t\t}\n\n\t\t\t// is the Multichoice(澶氶?妗?\n\t\t\tif (isMultiChoice == true) {\n\n\t\t\t\tfinal CheckAdapter checkAdapter = new CheckAdapter(context,\n\t\t\t\t\t\titems, checkedItems);\n\n\t\t\t\tlistView.setAdapter(checkAdapter);\n\t\t\t\tlistView.setItemsCanFocus(true);\n\n\t\t\t\tif (onItemClickListener != null) {\n\t\t\t\t\tlistView.setOnItemClickListener(onItemClickListener);\n\t\t\t\t} else {\n\t\t\t\t\tlistView.setOnItemClickListener(new OnMultiItemClick());\n\t\t\t\t}\n\n\t\t\t\t// show the all selectButton or not\n\t\t\t\tif (showSelectAll) {\n\t\t\t\t\t// checkAll.setVisibility( View.VISIBLE);\n\t\t\t\t\t// checkAll.setOnCheckedChangeListener(new\n\t\t\t\t\t// OnCheckedChangeListener() {\n\t\t\t\t\t//\n\t\t\t\t\t// @Override\n\t\t\t\t\t// public void onCheckedChanged(CompoundButton buttonView,\n\t\t\t\t\t// boolean isChecked) {\n\t\t\t\t\t// int count = listView.getAdapter().getCount();\n\t\t\t\t\t// if (isChecked) {\n\t\t\t\t\t// // update the status of all checkbox to checked\n\t\t\t\t\t// if (count > 0) {\n\t\t\t\t\t// for (int i = 0; i < count; i++) {\n\t\t\t\t\t// CheckBox itemCheckBox = (CheckBox) listView\n\t\t\t\t\t// .getAdapter()\n\t\t\t\t\t// .getView(i, null, null)\n\t\t\t\t\t// .findViewById(\n\t\t\t\t\t// R.id.chk_selectone);\n\t\t\t\t\t// itemCheckBox.setChecked(true);\n\t\t\t\t\t// }\n\t\t\t\t\t// }\n\t\t\t\t\t// } else {\n\t\t\t\t\t// // update the status of checkbox to unchecked\n\t\t\t\t\t// if (count > 0) {\n\t\t\t\t\t// for (int i = 0; i < count; i++) {\n\t\t\t\t\t// CheckBox itemCheckBox = (CheckBox) listView\n\t\t\t\t\t// .getAdapter()\n\t\t\t\t\t// .getView(i, null, null)\n\t\t\t\t\t// .findViewById(\n\t\t\t\t\t// R.id.chk_selectone);\n\t\t\t\t\t// itemCheckBox.setChecked(false);\n\t\t\t\t\t// }\n\t\t\t\t\t// }\n\t\t\t\t\t// }\n\t\t\t\t\t// }\n\t\t\t\t\t// });\n\t\t\t\t\tcheckAll.setOnClickListener(new android.view.View.OnClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tcheckAll.setVisibility(View.GONE);\n\t\t\t\t}\n\t\t\t} else { // 如果是单选模式\n\t\t\t\tfinal CheckAdapter checkAdapter = new CheckAdapter(context,\n\t\t\t\t\t\titems, checkedItems);\n\n\t\t\t\tlistView.setAdapter(checkAdapter);\n\t\t\t\tlistView.setItemsCanFocus(true);\n\n\t\t\t\tfor (int i = 0; i < items.length; i++) { // 隐藏CheckBox\n\t\t\t\t\tCheckBox itemCheckBox = (CheckBox) listView.getAdapter()\n\t\t\t\t\t\t\t.getView(i, null, null)\n\t\t\t\t\t\t\t.findViewById(R.id.chk_selectone);\n\t\t\t\t\titemCheckBox.setVisibility(View.GONE);\n\t\t\t\t}\n\t\t\t\tlistView.setOnItemClickListener(onItemClickListener);\n\t\t\t\t// show the all selectButton or not\n\n\t\t\t\tif (showSelectAll) {\n\t\t\t\t\tcheckAll.setOnClickListener(new android.view.View.OnClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tcheckAll.setVisibility(View.GONE);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// set the content message\n\t\t\tif (message != null) {\n\t\t\t\t// ((TextView)layout.findViewById(R.id.message)).setText(message);\n\t\t\t} else if (contentView != null) {\n\t\t\t\t// if no message set add the contentView to the dialog body\n\t\t\t\t((LinearLayout) layout.findViewById(R.id.content))\n\t\t\t\t\t\t.removeAllViews();\n\t\t\t\t((LinearLayout) layout.findViewById(R.id.content)).addView(\n\t\t\t\t\t\tcontentView, new LayoutParams(\n\t\t\t\t\t\t\t\tLayoutParams.WRAP_CONTENT,\n\t\t\t\t\t\t\t\tLayoutParams.WRAP_CONTENT));\n\t\t\t}\n\t\t\tdialog.setContentView(layout);\n\t\t\treturn dialog;\n\t\t}\n\n\t\tclass OnMultiItemClick implements OnItemClickListener {\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint positon, long arg3) {\n\t\t\t\tCheckBox box = (CheckBox) view.findViewById(R.id.chk_selectone);\n\t\t\t\tif (box.isChecked()) {\n\t\t\t\t\tbox.setChecked(false);\n\t\t\t\t} else {\n\t\t\t\t\tbox.setChecked(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tpublic static boolean getisMultiChoice() {\n\t\t\treturn isMultiChoice;\n\t\t}\n\n\t\tpublic static String getcontact_name() {\n\t\t\treturn contact_name;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/chart/FoldingLayout.java",
    "content": "/*\n * Copyright (C) 2013 Priboi Tiberiu\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.cwp.chart;\n\nimport android.content.Context;\nimport android.util.AttributeSet;\nimport android.view.GestureDetector;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.ViewConfiguration;\n\n/**\n * The folding layout where the number of folds, the anchor point and the\n * orientation of the fold can be specified. Each of these parameters can be\n * modified individually and updates and resets the fold to a default (unfolded)\n * state. The fold factor varies between 0 (completely unfolded flat image) to\n * 1.0 (completely folded, non-visible image).\n * \n * This layout throws an exception if there is more than one child added to the\n * view. For more complicated view hierarchy's inside the folding layout, the\n * views should all be nested inside 1 parent layout.\n * \n * This layout folds the contents of its child in real time. By applying matrix\n * transformations when drawing to canvas, the contents of the child may change\n * as the fold takes place. It is important to note that there are jagged edges\n * about the perimeter of the layout as a result of applying transformations to\n * a rectangle. This can be avoided by having the child of this layout wrap its\n * content inside a 1 pixel transparent border. This will cause an anti-aliasing\n * like effect and smoothen out the edges.\n * \n */\npublic class FoldingLayout extends BaseFoldingLayout {\n\n\tprivate final String FOLDING_VIEW_EXCEPTION_MESSAGE = \"Folding Layout can only 1 child at \"\n\t\t\t+ \"most\";\n\n\tprivate GestureDetector mScrollGestureDetector;\n\n\tFoldingLayout that = null;\n\n\tprivate int mTranslation = 0;\n\tprivate int mParentPositionY = -1;\n\tprivate int mTouchSlop = -1;\n\tprivate boolean mDidNotStartScroll = true;\n\n\tpublic FoldingLayout(Context context) {\n\t\tsuper(context);\n\t\tinit(context, null);\n\t\tthat = this;\n\t}\n\n\tpublic FoldingLayout(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t\tinit(context, attrs);\n\t\tthat = this;\n\t}\n\n\tpublic FoldingLayout(Context context, AttributeSet attrs, int defStyle) {\n\t\tsuper(context, attrs, defStyle);\n\t\tinit(context, attrs);\n\t\tthat = this;\n\t}\n\n\tpublic void init(Context context, AttributeSet attrs) {\n\t\tmScrollGestureDetector = new GestureDetector(context,\n\t\t\t\tnew ScrollGestureDetector());\n\t\tmTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();\n\t\tsetAnchorFactor(0);\n\t\tsuper.init(context, attrs);\n\t}\n\n\t@Override\n\tprotected boolean addViewInLayout(View child, int index,\n\t\t\tLayoutParams params, boolean preventRequestLayout) {\n\t\tthrowCustomException(getChildCount());\n\t\tboolean returnValue = super.addViewInLayout(child, index, params,\n\t\t\t\tpreventRequestLayout);\n\t\treturn returnValue;\n\t}\n\n\t/**\n\t * The custom exception to be thrown so as to limit the number of views in\n\t * this layout to at most one.\n\t */\n\tprivate class NumberOfFoldingLayoutChildrenException extends\n\t\t\tRuntimeException {\n\t\t/**\n\t\t * \n\t\t */\n\t\tprivate static final long serialVersionUID = 1L;\n\n\t\tpublic NumberOfFoldingLayoutChildrenException(String message) {\n\t\t\tsuper(message);\n\t\t}\n\t}\n\n\t/**\n\t * Throws an exception if the number of views added to this layout exceeds\n\t * one.\n\t */\n\tprivate void throwCustomException(int numOfChildViews) {\n\t\tif (numOfChildViews == 1) {\n\t\t\tthrow new NumberOfFoldingLayoutChildrenException(\n\t\t\t\t\tFOLDING_VIEW_EXCEPTION_MESSAGE);\n\t\t}\n\t}\n\n\t/** This class uses user touch events to fold and unfold the folding view. */\n\tprivate class ScrollGestureDetector extends\n\t\t\tGestureDetector.SimpleOnGestureListener {\n\t\t@Override\n\t\tpublic boolean onDown(MotionEvent e) {\n\t\t\tmDidNotStartScroll = true;\n\t\t\treturn true;\n\t\t}\n\n\t\t/**\n\t\t * All the logic here is used to determine by what factor the paper view\n\t\t * should be folded in response to the user's touch events. The logic\n\t\t * here uses vertical scrolling to fold a vertically oriented view and\n\t\t * horizontal scrolling to fold a horizontally oriented fold. Depending\n\t\t * on where the anchor point of the fold is, movements towards or away\n\t\t * from the anchor point will either fold or unfold the paper\n\t\t * respectively.\n\t\t * \n\t\t * The translation logic here also accounts for the touch slop when a\n\t\t * new user touch begins, but before a scroll event is first invoked.\n\t\t */\n\t\t@Override\n\t\tpublic boolean onScroll(MotionEvent e1, MotionEvent e2,\n\t\t\t\tfloat distanceX, float distanceY) {\n\t\t\tint touchSlop = 0;\n\t\t\tfloat factor;\n\t\t\tif (mOrientation == Orientation.VERTICAL) {\n\t\t\t\tfactor = Math.abs((float) (mTranslation)\n\t\t\t\t\t\t/ (float) (that.getHeight()));\n\n\t\t\t\tif (e2.getY() - mParentPositionY <= that.getHeight()\n\t\t\t\t\t\t&& e2.getY() - mParentPositionY >= 0) {\n\t\t\t\t\tif ((e2.getY() - mParentPositionY) > that.getHeight()\n\t\t\t\t\t\t\t* getAnchorFactor()) {\n\t\t\t\t\t\tmTranslation -= (int) distanceY;\n\t\t\t\t\t\ttouchSlop = distanceY < 0 ? -mTouchSlop : mTouchSlop;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmTranslation += (int) distanceY;\n\t\t\t\t\t\ttouchSlop = distanceY < 0 ? mTouchSlop : -mTouchSlop;\n\t\t\t\t\t}\n\t\t\t\t\tmTranslation = mDidNotStartScroll ? mTranslation\n\t\t\t\t\t\t\t+ touchSlop : mTranslation;\n\n\t\t\t\t\tif (mTranslation < -that.getHeight()) {\n\t\t\t\t\t\tmTranslation = -that.getHeight();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfactor = Math.abs(((float) mTranslation)\n\t\t\t\t\t\t/ ((float) that.getWidth()));\n\n\t\t\t\tif (e2.getRawX() > that.getWidth() * getAnchorFactor()) {\n\t\t\t\t\tmTranslation -= (int) distanceX;\n\t\t\t\t\ttouchSlop = distanceX < 0 ? -mTouchSlop : mTouchSlop;\n\t\t\t\t} else {\n\t\t\t\t\tmTranslation += (int) distanceX;\n\t\t\t\t\ttouchSlop = distanceX < 0 ? mTouchSlop : -mTouchSlop;\n\t\t\t\t}\n\t\t\t\tmTranslation = mDidNotStartScroll ? mTranslation + touchSlop\n\t\t\t\t\t\t: mTranslation;\n\n\t\t\t\tif (mTranslation < -that.getWidth()) {\n\t\t\t\t\tmTranslation = -that.getWidth();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tmDidNotStartScroll = false;\n\n\t\t\tif (mTranslation > 0) {\n\t\t\t\tmTranslation = 0;\n\t\t\t}\n\n\t\t\tthat.setFoldFactor(factor);\n\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t@Override\n\tpublic boolean onTouchEvent(MotionEvent me) {\n\t\treturn mScrollGestureDetector.onTouchEvent(me);\n\t}\n\n}"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/chart/MenuFragment.java",
    "content": "package com.cwp.chart;\n\nimport com.cwp.cmoneycharge.PayChart;\nimport com.cwp.cmoneycharge.PayData;\nimport com.cwp.cmoneycharge.R;\n\nimport android.annotation.TargetApi;\nimport android.app.FragmentManager;\nimport android.content.Intent;\nimport android.os.Build;\nimport android.os.Bundle;\nimport android.preference.Preference;\nimport android.preference.Preference.OnPreferenceClickListener;\nimport android.preference.PreferenceFragment;\nimport android.view.Window;\nimport android.view.WindowManager;\nimport android.widget.Toast;\n\n/**\n * menu fragment ，主要是用于显示menu菜单\n * \n * @author <a href=\"mailto:kris@krislq.com\">Kris.lee</a>\n * @since Mar 12, 2013\n * @version 1.0.0\n */\npublic class MenuFragment extends PreferenceFragment implements\n\t\tOnPreferenceClickListener {\n\tint index = -1;\n\n\t@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetRetainInstance(true);\n\t\t// set the preference xml to the content view\n\t\taddPreferencesFromResource(R.xml.menu);\n\t\t// add listener\n\t\tfindPreference(\"mpaychart\").setOnPreferenceClickListener(this);\n\t\tfindPreference(\"mincomechart\").setOnPreferenceClickListener(this);\n\t\tfindPreference(\"dpaychart\").setOnPreferenceClickListener(this);\n\t\tfindPreference(\"dincomehart\").setOnPreferenceClickListener(this);\n\t\t// findPreference(\"comparechart\").setOnPreferenceClickListener(this);\n\t\t// findPreference(\"mincomechart\").setOnPreferenceClickListener(this);\n\n\t\tSystemBarTintManager mTintManager;\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n\t\t\tsetTranslucentStatus(true);\n\t\t}\n\t\tmTintManager = new SystemBarTintManager(getActivity());\n\t\tmTintManager.setStatusBarTintEnabled(true);\n\t\tmTintManager.setStatusBarTintResource(R.color.statusbar_bg);\n\n\t}\n\n\t@TargetApi(19)\n\tprotected void setTranslucentStatus(boolean on) {\n\t\tWindow win = getActivity().getWindow();\n\t\tWindowManager.LayoutParams winParams = win.getAttributes();\n\t\tfinal int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;\n\t\tif (on) {\n\t\t\twinParams.flags |= bits;\n\t\t} else {\n\t\t\twinParams.flags &= ~bits;\n\t\t}\n\t\twin.setAttributes(winParams);\n\t}\n\n\t@Override\n\tpublic boolean onPreferenceClick(Preference preference) {\n\t\tString key = preference.getKey();\n\t\tif (\"mpaychart\".equals(key)) {\n\t\t\tIntent intentl = new Intent(getActivity(), PayChart.class);\n\t\t\tintentl.putExtra(\"datatype\", \"pay\");\n\t\t\tintentl.putExtra(\"type\", 0);\n\t\t\tstartActivity(intentl);\n\n\t\t} else if (\"mincomechart\".equals(key)) {\n\n\t\t\tIntent intentl = new Intent(getActivity(), PayChart.class);\n\t\t\tintentl.putExtra(\"datatype\", \"income\");\n\t\t\tintentl.putExtra(\"type\", 0);\n\t\t\tstartActivity(intentl);\n\n\t\t} else if (\"dpaychart\".equals(key)) {\n\t\t\tIntent intentp = new Intent(getActivity(), PayChart.class);\n\t\t\tintentp.putExtra(\"datatype\", \"pay\");\n\t\t\tintentp.putExtra(\"type\", 1);\n\t\t\tstartActivity(intentp);\n\n\t\t} else if (\"dincomehart\".equals(key)) {\n\t\t\tIntent intentp = new Intent(getActivity(), PayChart.class);\n\t\t\tintentp.putExtra(\"datatype\", \"income\");\n\t\t\tintentp.putExtra(\"type\", 1);\n\t\t\tstartActivity(intentp);\n\n\t\t} else if (\"comparechart\".equals(key)) {\n\t\t\t// Intent intentp = new Intent(getActivity(), PIData.class);\n\t\t\t// intent.putExtra(\"cwp.id\", userid);\n\t\t\t// intentp.putExtra(\"datatype\", \"income\");\n\t\t\t// intentp.putExtra(\"type\", 1);\n\t\t\t// startActivity(intentp);\n\t\t}\n\t\t// anyway , show the sliding menu\n\t\t// ((MainActivity) getActivity()).getSlidingMenu().toggle();\n\t\treturn false;\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/chart/MyAdspter.java",
    "content": "package com.cwp.chart;\n\nimport java.util.List;\nimport java.util.Map;\n\nimport com.cwp.cmoneycharge.R;\n\nimport android.R.bool;\nimport android.content.Context;\nimport android.graphics.Color;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.BaseAdapter;\nimport android.widget.Button;\nimport android.widget.ImageView;\nimport android.widget.RelativeLayout;\nimport android.widget.TextView;\n\npublic class MyAdspter extends BaseAdapter {\n\n\tprivate List<Map<String, Object>> data;\n\tprivate LayoutInflater layoutInflater;\n\tprivate Context context;\n\tprivate Boolean time;\n\tprivate String textaddress;\n\n\tpublic MyAdspter(Context context, List<Map<String, Object>> data,\n\t\t\tBoolean time) {\n\t\tthis.context = context;\n\t\tthis.data = data;\n\t\tthis.layoutInflater = LayoutInflater.from(context);\n\t\tthis.time = time;\n\t}\n\n\t@Override\n\tpublic int getCount() {\n\t\treturn data.size();\n\t}\n\n\t/**\n\t * 获得某一位置的数据\n\t */\n\t@Override\n\tpublic Object getItem(int position) {\n\t\treturn data.get(position);\n\t}\n\n\t/**\n\t * 获得唯一标识\n\t */\n\t@Override\n\tpublic long getItemId(int position) {\n\t\treturn position;\n\t}\n\n\t/**\n\t * 组件集合，对应list.xml中的控件\n\t * \n\t * @author Administrator\n\t */\n\tpublic final class Zujian {\n\t\tpublic ImageView image;\n\t\tpublic TextView no;\n\t\tpublic TextView info;\n\t\tpublic TextView title;\n\t\tpublic TextView kind;\n\t\tpublic TextView money;\n\t\tpublic TextView address;\n\t\tpublic RelativeLayout titlebar;\n\t\tpublic TextView search_date;\n\t\tpublic TextView search_date2;\n\t\tpublic RelativeLayout search_img2;\n\t}\n\n\t@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tZujian zujian = null;\n\t\tif (convertView == null) {\n\t\t\tzujian = new Zujian();\n\t\t\t// 获得组件，实例化组件\n\t\t\tconvertView = layoutInflater.inflate(R.layout.list, null);\n\t\t\tzujian.image = (ImageView) convertView\n\t\t\t\t\t.findViewById(R.id.search_img);\n\t\t\tzujian.no = (TextView) convertView.findViewById(R.id.no);\n\t\t\tzujian.info = (TextView) convertView.findViewById(R.id.info);\n\t\t\tzujian.title = (TextView) convertView.findViewById(R.id.title);\n\t\t\tzujian.kind = (TextView) convertView.findViewById(R.id.kind);\n\t\t\tzujian.money = (TextView) convertView.findViewById(R.id.money);\n\t\t\tzujian.address = (TextView) convertView.findViewById(R.id.address);\n\t\t\tzujian.search_date = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.search_date);\n\t\t\tzujian.search_date2 = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.search_date2);\n\t\t\tzujian.search_img2 = (RelativeLayout) convertView\n\t\t\t\t\t.findViewById(R.id.search_img2);\n\t\t\tzujian.titlebar = (RelativeLayout) convertView\n\t\t\t\t\t.findViewById(R.id.titlebar);\n\t\t\tconvertView.setTag(zujian);\n\t\t} else {\n\t\t\tzujian = (Zujian) convertView.getTag();\n\t\t}\n\t\t// 绑定数据\n\t\tzujian.image.setBackgroundResource((Integer) data.get(position).get(\n\t\t\t\t\"img\"));\n\t\tzujian.no.setText((String) data.get(position).get(\"no\"));\n\t\tzujian.title.setText((String) data.get(position).get(\"title\"));\n\t\tzujian.kind.setText((String) data.get(position).get(\"kind\"));\n\t\tzujian.money.setText((String) data.get(position).get(\"money\"));\n\t\tif (data.get(position).get(\"date\") != null) {\n\t\t\tzujian.search_img2.setVisibility(View.VISIBLE);\n\t\t\tzujian.search_date\n\t\t\t\t\t.setText(((String) data.get(position).get(\"info\"))\n\t\t\t\t\t\t\t.substring(8, 10));\n\t\t\tzujian.search_date2\n\t\t\t\t\t.setText((String) data.get(position).get(\"date\"));\n\t\t}\n\n\t\tif (data.get(position).get(\"kind\").toString().equals(\"[收入]\")) {\n\t\t\tzujian.money.setTextColor(Color.parseColor(\"#ffff0000\"));\n\t\t} else {\n\t\t\tzujian.money.setTextColor(Color.parseColor(\"#5ea98d\"));\n\t\t}\n\t\tif (time) {\n\t\t\tzujian.titlebar.setVisibility(View.VISIBLE);\n\t\t\tzujian.info.setText((String) data.get(position).get(\"info\"));\n\t\t\ttextaddress = (String) data.get(position).get(\"address\");\n\t\t\tif (textaddress.indexOf(\"[\") > -1) {\n\t\t\t\tzujian.address.setText(textaddress.substring(0,\n\t\t\t\t\t\ttextaddress.indexOf(\"[\")));\n\t\t\t} else {\n\t\t\t\tzujian.address.setText(textaddress);\n\t\t\t}\n\t\t} else {\n\t\t\tzujian.titlebar.setVisibility(View.GONE);\n\t\t}\n\t\treturn convertView;\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/chart/MyButton.java",
    "content": "package com.cwp.chart;\n\nimport com.cwp.cmoneycharge.R;\n\nimport android.content.Context;\n\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapFactory;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphics.Matrix;\n\nimport android.graphics.Paint;\nimport android.graphics.Bitmap.Config;\nimport android.graphics.Paint.FontMetrics;\n\nimport android.text.style.BackgroundColorSpan;\nimport android.util.AttributeSet;\nimport android.util.Log;\nimport android.view.MotionEvent;\nimport android.view.View;\n\npublic class MyButton extends View implements View.OnTouchListener {\n\n\tprivate String text = \">\";\n\n\tprivate Paint backgroundPaint;\n\tprivate MyButtonClickListener listener;\n\tprivate Bitmap bitmap;\n\n\tprivate float width = 0;\n\n\tprivate float height = 0;\n\n\tpublic void setWidth(float width) {\n\t\tthis.width = width;\n\t}\n\n\tpublic void setHeight(float height) {\n\t\tthis.height = height;\n\t}\n\n\tpublic void setMyButtonClickListener(MyButtonClickListener listener) {\n\t\tthis.listener = listener;\n\t}\n\n\tpublic void setBackgroundPaintColor(int color) {\n\t\tbackgroundPaint.setColor(color);\n\t\tinvalidate();\n\t}\n\n\t@Override\n\tprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n\n\t\tif (width != 0) {\n\t\t\twidth = (float) PiewController.measureWidth(widthMeasureSpec);\n\t\t}\n\t\tif (height != 0) {\n\t\t\theight = (float) PiewController.measureHeight(heightMeasureSpec);\n\t\t}\n\n\t\tsetMeasuredDimension(100, 100);\n\t}\n\n\t@Override\n\tpublic void draw(Canvas canvas) {\n\t\t// TODO Auto-generated method stub\n\n\t\tsuper.draw(canvas);\n\t\tfloat Radius = getRadius();\n\t\tbitmap = createBitmap(bitmap, Radius, Radius);\n\n\t\tPaint paint = new Paint();\n\t\tpaint.setColor(Color.WHITE);\n\t\tpaint.setAntiAlias(true);\n\t\tcanvas.drawCircle(Radius, Radius, Radius, paint);\n\n\t\tcanvas.drawCircle(Radius, Radius, Radius * 4 / 5, backgroundPaint);\n\t\tpaint.setTextAlign(Paint.Align.CENTER);\n\t\tpaint.setTextSize(Radius * 5 / 3);\n\t \n\t\tcanvas.drawText(text, (Radius+Radius * 1 / 10),(Radius+Radius * 1 / 2), paint);\n\t\tcanvas.drawBitmap(bitmap, 0, 0, null);\n\n\t}\n\n\tpublic MyButton(Context context, AttributeSet attrs, int defStyle) {\n\t\tsuper(context, attrs, defStyle);\n\t\tinit();\n\t}\n\n\tpublic MyButton(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t\tinit();\n\t}\n\n\tpublic MyButton(Context context) {\n\t\tsuper(context);\n\t\tinit();\n\t}\n\n\tprivate void init() {\n\t\tthis.setOnTouchListener(this);\n\t\tbackgroundPaint = new Paint();\n\t\tbackgroundPaint.setAntiAlias(true);\n\t\tbackgroundPaint.setColor(Color.RED);\n\n\t\tbitmap = BitmapFactory.decodeResource(getResources(),\n\t\t\t\tR.drawable.common_btn_pressed);\n\n\t}\n\n\tprivate float getRadius() {\n\t\tint height = getHeight();\n\t\tint width = getWidth();\n\t\tif (height < width) {\n\t\t\treturn height / 2;\n\t\t}\n\t\treturn width / 2;\n\t}\n\n\t@Override\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\n\t\tif (event.getAction() == MotionEvent.ACTION_DOWN) {\n\n//\t\t\tbitmap = BitmapFactory.decodeResource(getResources(),\n//\t\t\t\t\tR.drawable.common_shine_btn_bg);\n\n\t\t\tinvalidate();\n\n\t\t}\n\t\tif (event.getAction() == MotionEvent.ACTION_UP) {\n//\t\t\tbitmap = BitmapFactory.decodeResource(getResources(),\n//\t\t\t\t\tR.drawable.common_btn_pressed);\n\n\t\t\tinvalidate();\n\t\t\tif (listener != null) {\n\t\t\t\tlistener.onclick();\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic Bitmap createBitmap(Bitmap b, float x, float y) {\n\t\tint w = b.getWidth();\n\t\tint h = b.getHeight();\n\n\t\tfloat sx = (float) x / w;\n\t\tfloat sy = (float) y / h;\n\t\tMatrix matrix = new Matrix();\n\t\tmatrix.postScale(sx, sy);\n\t\tBitmap resizeBmp = Bitmap.createBitmap(b, 0, 0, w, h, matrix, true);\n\t\treturn resizeBmp;\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/chart/MyButtonClickListener.java",
    "content": "package com.cwp.chart;\n\npublic interface MyButtonClickListener {\n  public void onclick();\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/chart/OnFoldListener.java",
    "content": "/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.cwp.chart;\n\n/**\n * This interface listens for when the folding layout begins folding (enters\n * a folded state from a completely unfolded state), or ends folding (enters a\n * completely unfolded state from a folded state).\n */\npublic interface OnFoldListener {\n    public void onStartFold(float foldFactor);\n    public void onFoldingState(float foldFactor, float foldDrawHeight);\n    public void onEndFold(float foldFactor);\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/chart/PieChart.java",
    "content": "package com.cwp.chart;\n\nimport android.content.Context;\nimport android.util.AttributeSet;\nimport android.util.Log;\nimport android.view.View;\nimport android.view.View.MeasureSpec;\nimport android.view.ViewGroup;\nimport android.widget.Button;\nimport android.widget.FrameLayout;\nimport android.widget.TextView;\n\npublic class PieChart extends ViewGroup {\n\n\tpublic PieChart(Context context, AttributeSet attrs, int defStyle) {\n\t\tsuper(context, attrs, defStyle);\n\t\tinit();\n\t}\n\n\tpublic PieChart(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t\tinit();\n\t}\n\n\tpublic PieChart(Context context) {\n\t\tsuper(context);\n\t\tinit();\n\t}\n\n\tprivate void init() {\n\n\t}\n\n\tprivate int m_measureWidth = 0;\n\tprivate int m_measureHeight = 0;\n\n\t/**\n\t * 计算控件的大尿\n\t */\n\t@Override\n\tprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n\t\tsuper.onMeasure(widthMeasureSpec, heightMeasureSpec);\n\t\tm_measureWidth = PiewController.measureWidth(widthMeasureSpec);\n\t\tLog.e(\"caizh\", \"m_measureWidth=\" + m_measureWidth);\n\t\tm_measureHeight = PiewController.measureHeight(heightMeasureSpec);\n\t\t// 计算自定义的ViewGroup中所有子控件的大尿\n\t\tmeasureChildren(widthMeasureSpec, heightMeasureSpec);\n\t\t// 设置自定义的控件MyViewGroup的大尿\n\t\tsetMeasuredDimension(m_measureWidth, m_measureHeight);\n\t}\n\n\t/**\n\t * 覆写onLayout，其目的是为了指定视图的显示位置，方法执行的前后顺序是在onMeasure之后，因为视图肯定是只有知道大小的情况下＿\n\t * 才能确定怎么摆放\n\t */\n\t@Override\n\tprotected void onLayout(boolean changed, int l, int t, int r, int b) {\n\t\t// 记录总高庿\n\t\tLog.e(\"caizh\", \"l=\" + l);\n\t\t// 遍历承?子视囿\n\t\tint childCount = getChildCount();\n\t\tfor (int i = 0; i < childCount; i++) {\n\t\t\tView childView = getChildAt(i);\n\n\t\t\t// 获取在onMeasure中计算的视图尺寸\n\t\t\tint measureHeight = childView.getMeasuredHeight();\n\t\t\tint measuredWidth = childView.getMeasuredWidth();\n\t\t\tif (childView.getTag().equals(\"pieButton\")) {\n\t\t\t\tchildView.layout(\n\t\t\t\t\t\t(m_measureWidth * 6 / 7 - m_measureWidth / 25),\n\t\t\t\t\t\t(int) ((m_measureWidth * 19 / 16)) - m_measureWidth\n\t\t\t\t\t\t\t\t/ 25,\n\t\t\t\t\t\t(m_measureWidth * 6 / 7 + m_measureWidth / 25),\n\t\t\t\t\t\t(int) ((m_measureWidth * 19 / 16)) + m_measureWidth\n\t\t\t\t\t\t\t\t/ 25);\n\n\t\t\t} else if (childView.getTag().equals(\"pieText\")) {\n\t\t\t\tTextView textView = (TextView) childView;\n\t\t\t\tif (m_measureWidth == 680) {\n\t\t\t\t\ttextView.setTextSize(m_measureWidth / 30);\n\t\t\t\t} else if (m_measureWidth == 1020) {\n\t\t\t\t\ttextView.setTextSize(m_measureWidth / 40);\n\t\t\t\t} else {\n\t\t\t\t\ttextView.setTextSize(m_measureWidth / 30);\n\t\t\t\t}\n\n\t\t\t\tchildView.layout((int) ((m_measureWidth - measuredWidth) / 2),\n\t\t\t\t\t\t(int) ((m_measureWidth * 19 / 16)) - measureHeight / 2,\n\t\t\t\t\t\t(int) ((m_measureWidth + measuredWidth) / 2),\n\t\t\t\t\t\t(int) ((m_measureWidth * 19 / 16)) + measureHeight / 2);\n\t\t\t} else {\n\t\t\t\t// Log.e(\"caizh\", \"measuredWidth=\" + measuredWidth);\n\t\t\t\tchildView.layout(0, 0, measuredWidth, measureHeight);\n\t\t\t}\n\n\t\t}\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/chart/PieView.java",
    "content": "package com.cwp.chart;\n\nimport java.util.ArrayList;\n\nimport com.cwp.cmoneycharge.PayChart;\nimport com.cwp.cmoneycharge.R;\n\nimport android.content.Context;\n\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapFactory;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphics.Matrix;\n\nimport android.graphics.Point;\nimport android.graphics.RectF;\n\nimport android.graphics.Paint;\nimport android.graphics.Paint.FontMetrics;\n\nimport android.os.Handler;\nimport android.util.AttributeSet;\nimport android.util.Log;\nimport android.view.MotionEvent;\n\nimport android.view.View;\nimport android.view.View.MeasureSpec;\n\npublic class PieView extends View implements View.OnTouchListener, Runnable {\n\n\tprivate float m_x = 0;\n\tprivate float m_y = 0;\n\n\tprivate static ArrayList<ChartProp> mChartProps;\n\tprivate float screenHight, screenWidth;// 屏幕的宽和高\n\n\tprivate float radius;// 绘制圆的半径\n\tprivate float startAngle;// 弿?角度\n\tprivate float sweepAngle = 0.0f; // 扫过的角庿\n\tprivate int itemCount;// 选项个数\n\tprivate float startSpeed = 0;\n\n\tprivate boolean firstEnter = true; // 程序是否已经逿?\n\tprivate boolean rotateEnabled = false;\n\tprivate boolean tounched = false;\n\tprivate boolean done = false;\n\tprivate Paint mPaint;\n\n\tprivate Paint textPaint;\n\tprivate Canvas mCanvas;\n\n\tprivate ChartPropChangeListener listener;\n\tprivate static ChartProp mChartProp = null;\n\tprivate static ChartProp tChartProp = null;\n\tprivate static float[] percents;\n\n\tprivate Point centerPoint;\n\tprivate Bitmap myBg;\n\tprivate String amount;\n\n\tprivate Thread myThread;\n\n\tpublic void setBackgroundPaintColor(int color) {\n\n\t\tinvalidate();\n\t}\n\n\tprivate void writeLog(String string) {\n\t\tLog.e(\"caizh\", string);\n\t}\n\n\tpublic void destory() {\n\t\t// myBg.recycle();\n\t\tdone = true;\n\t}\n\n\t@Override\n\tpublic void draw(Canvas canvas) {\n\t\t// TODO Auto-generated method stub\n\n\t\tsuper.draw(canvas);\n\n\t\tif (firstEnter) {\n\t\t\tfirstInit();\n\t\t} else {\n\n\t\t\tif (!tounched) {\n\n\t\t\t\tfloat middleAngle = ((mChartProp.getEndAngle() + mChartProp\n\t\t\t\t\t\t.getStartAngle()) / 2);\n\t\t\t\tfloat distance = (middleAngle - getBorderAngle());\n\n\t\t\t\tstartAngle -= (distance / 2);\n\n\t\t\t\t// startAngle=()\n\t\t\t}\n\n\t\t}\n\n\t\tmCanvas = canvas;\n\n\t\tfloat f1 = centerPoint.x;\n\t\tfloat f2 = centerPoint.y;\n\t\t// 填充背景艿\n\t\t/*\n\t\t * mCanvas.drawColor(0xff639EC3); mCanvas.save();\n\t\t */\n\n\t\t// *********************************确定参逥?域*************************************\n\t\tfloat f3 = f1 - radius;// X轿- 巿\n\t\tfloat f4 = f2 - radius; // Y轿- 丿\n\t\tfloat f5 = f1 + radius; // X轿- 叿\n\t\tfloat f6 = f2 + radius; // Y轿- 丿\n\t\tRectF rectF = new RectF(f3, f4, f5, f6);\n\n\t\t// *********************************画每个区域的颜色坿********************************\n\t\tdrawItem(rectF);\n\t\t// *********************************画边上渐变的圆环出来*******************************\n\n\t\tdrawableCenterCircle(f1, f2);\n\t\t// 解锁Canvas，并渲染当前图像\n\n\t\tif (!(mChartProp == tChartProp)) {\n\t\t\tlistener.getChartProp(mChartProp);\n\t\t\ttChartProp = mChartProp;\n\t\t}\n\n\t}\n\n\tpublic PieView(Context context, AttributeSet attrs, int defStyle) {\n\t\tsuper(context, attrs, defStyle);\n\t\tinit();\n\t}\n\n\tpublic PieView(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t\tinit();\n\t}\n\n\tpublic PieView(Context context) {\n\t\tsuper(context);\n\t\tinit();\n\t}\n\n\tprivate void init() {\n\n\t\tmyThread = new Thread(this);\n\t\t// 创建丿?新的SurfaceHolder＿并分配这个类作为它的回调(callback)\n\n\t\tmChartProps = new ArrayList<ChartProp>();\n\n\t\t// 图像画笔\n\t\tmPaint = new Paint();\n\n\t\tmPaint.setAntiAlias(true);\n\t\t// 文字画笔\n\t\ttextPaint = new Paint();\n\t\ttextPaint.setTextSize(22);\n\t\ttextPaint.setColor(Color.WHITE);\n\t\ttextPaint.setAntiAlias(true);\n\n\t\t// 半径\n\n\t\tstartAngle = 90f;\n\n\t\tmyBg = BitmapFactory.decodeResource(getResources(),\n\t\t\t\tR.drawable.mask_piechartformymoney);\n\n\t\tthis.setOnTouchListener(this);\n\n\t}\n\n\tpublic void start() {\n\t\tmyThread.start();\n\t}\n\n\t@Override\n\tpublic void run() {\n\n\t\twhile (!done) {\n\n\t\t\ttry {\n\t\t\t\tThread.sleep(100);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tif (rotateEnabled) {\n\n\t\t\t\tpostInvalidate();\n\t\t\t}\n\t\t}\n\n\t}\n\n\tprivate Bitmap createBitmap(Bitmap b, float x, float y) {\n\t\tint w = b.getWidth();\n\t\tint h = b.getHeight();\n\n\t\tfloat sx = (float) x / w;\n\t\tfloat sy = (float) y / h;\n\t\tMatrix matrix = new Matrix();\n\t\tmatrix.postScale(sx, sy);\n\t\tBitmap resizeBmp = Bitmap.createBitmap(b, 0, 0, w, h, matrix, true);\n\t\treturn resizeBmp;\n\t}\n\n\t/**\n\t * create charts' property 创建饼状图的属濍\n\t * \n\t * @param chartsNum\n\t *            charts' number 饼状图的个数\n\t * @return charts' property's list 饼状图属性的list\n\t */\n\tpublic ArrayList<ChartProp> createCharts(int itemCount) {\n\t\tthis.itemCount = itemCount;\n\t\tpercents = new float[itemCount];\n\t\tmChartProps.clear();\n\t\tcreateChartProp(itemCount);\n\n\t\treturn mChartProps;\n\t}\n\n\t// 重新初始匿\n\tpublic void reInit() {\n\t\tstartAngle = 90f;\n\t\tfirstEnter = true; // 程序是否已经逿?\n\t}\n\n\t// 第一次参数进行改变后的初始化调用\n\tpublic void initPercents() {\n\n\t\tfor (int i = 0; i < itemCount; i++) {\n\n\t\t\tpercents[i] = mChartProps.get(i).getPercent();\n\t\t\tmChartProps.get(i).setPercent(0.01f);\n\n\t\t}\n\n\t}\n\n\tpublic void setChartPropChangeListener(ChartPropChangeListener listener) {\n\t\tthis.listener = listener;\n\t}\n\n\t/**\n\t * actually create chartProp objects. 真正创建扇形属瀧?方泿\n\t * \n\t * @param chartsNum\n\t *            charts' number 饼状图的个数\n\t */\n\tprivate void createChartProp(int chartsNum) {\n\t\tfor (int i = 0; i < chartsNum; i++) {\n\t\t\tChartProp chartProp = new ChartProp(this);\n\t\t\tchartProp.setId(i);\n\t\t\tmChartProps.add(chartProp);\n\t\t}\n\t}\n\n\tpublic ChartProp createNullChartProp() {\n\t\tmChartProps.clear();\n\t\tChartProp chartProp = new ChartProp(this);\n\t\tmChartProps.add(chartProp);\n\t\treturn chartProp;\n\t}\n\n\tprivate void initResoure() {\n\t\tfloat y = myBg.getHeight();\n\t\tfloat x = myBg.getWidth();\n\t\tfloat r;\n\n\t\tif (screenHight > screenWidth) {\n\t\t\tr = screenWidth;\n\t\t\tmyBg = createBitmap(myBg, screenWidth, (screenWidth * y) / x);\n\t\t} else {\n\t\t\tr = screenHight;\n\t\t\tmyBg = createBitmap(myBg, screenHight, (screenHight * y) / x);\n\t\t}\n\n\t\tcenterPoint = new Point();\n\n\t\tcenterPoint.x = (int) (r / 2);\n\t\tcenterPoint.y = (int) ((r * 19) / 32);\n\n\t\tradius = (centerPoint.x * 0.8843f);\n\t}\n\n\t@Override\n\tprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n\n\t\t// 高度\n\t\tscreenHight = (float) PiewController.measureWidth(heightMeasureSpec);\n\n\t\tscreenWidth = (float) PiewController.measureHeight(widthMeasureSpec);\n\t\tLog.e(\"caizh\", \"screenWidth01=\" + screenWidth);\n\t\tinitResoure();\n\t\tsetMeasuredDimension((int) screenWidth, (int) screenHight);\n\t}\n\n\tprivate int measureWidth(int pWidthMeasureSpec) {\n\t\tint result = 0;\n\t\tint widthMode = MeasureSpec.getMode(pWidthMeasureSpec);// 得到模式\n\t\tint widthSize = MeasureSpec.getSize(pWidthMeasureSpec);// 得到尺寸\n\n\t\tswitch (widthMode) {\n\t\t/**\n\t\t * mode共有三种情况，取值分别为MeasureSpec.UNSPECIFIED, MeasureSpec.EXACTLY,\n\t\t * MeasureSpec.AT_MOST?\n\t\t * \n\t\t * \n\t\t * MeasureSpec.EXACTLY是精确尺寸，\n\t\t * 当我们将控件的layout_width或layout_height指定为具体数值时如andorid\n\t\t * :layout_width=\"50dip\"，或者为FILL_PARENT是，都是控件大小已经确定的情况，都是精确尺寸?\n\t\t * \n\t\t * \n\t\t * MeasureSpec.AT_MOST是最大尺寸，\n\t\t * 当控件的layout_width或layout_height指定为WRAP_CONTENT旿\n\t\t * ，控件大小一般随睿Χ件的子空间或内容进行变化，此时控件尺寸只要不超过父控件允许的朿?尺寸即可\n\t\t * 。因此，此时的mode是AT_MOST，size给出了父控件允许的最大尺寸?\n\t\t * \n\t\t * \n\t\t * MeasureSpec.UNSPECIFIED是未指定尺寸，这种情况不多，丿?都是父控件是AdapterView＿\n\t\t * 通过measure方法传入的模式?\n\t\t */\n\t\tcase MeasureSpec.AT_MOST:\n\t\tcase MeasureSpec.EXACTLY:\n\t\t\tresult = widthSize;\n\t\t\tbreak;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate int measureHeight(int pHeightMeasureSpec) {\n\t\tint result = 0;\n\n\t\tint heightMode = MeasureSpec.getMode(pHeightMeasureSpec);\n\t\tint heightSize = MeasureSpec.getSize(pHeightMeasureSpec);\n\n\t\tswitch (heightMode) {\n\t\tcase MeasureSpec.AT_MOST:\n\t\tcase MeasureSpec.EXACTLY:\n\t\t\tresult = heightSize;\n\t\t\tbreak;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate void firstInit() {\n\t\tstartSpeed += 0.05f;\n\t\tif (startSpeed >= 1) {\n\t\t\tstartSpeed = 0.9f;\n\t\t}\n\t\tfloat total = 0f;\n\t\tif (!mChartProps.isEmpty()) {\n\t\t\tfor (int i = 0; i < itemCount; i++) {\n\t\t\t\tif (i < mChartProps.size()) {\n\t\t\t\t\tfloat percent = mChartProps.get(i).getPercent();\n\t\t\t\t\t// writeLog(\"percent=\"+percent);\n\t\t\t\t\tfloat distancePercent = (percents[i] - percent);\n\n\t\t\t\t\tif (distancePercent < 0.0001) {\n\t\t\t\t\t\tmChartProps.get(i).setPercent(percents[i]);\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tmChartProps.get(i).setPercent(\n\t\t\t\t\t\t\t\tpercent + (distancePercent * startSpeed));\n\t\t\t\t\t}\n\n\t\t\t\t\ttotal = total + mChartProps.get(i).getPercent();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (total >= 1) {\n\t\t\tfirstEnter = false;\n\t\t}\n\n\t}\n\n\tpublic void getCurrentChartProp(ChartProp chartProp, float f) {\n\n\t\tif ((chartProp.getStartAngle() <= f) && (chartProp.getEndAngle() > f)) {\n\n\t\t\tmChartProp = chartProp;\n\n\t\t}\n\t}\n\n\tpublic void drawableCenterCircle(float x, float y) {\n\t\t/*\n\t\t * Paint centerCirclePaint = new Paint();\n\t\t * centerCirclePaint.setColor(Color.BLACK);\n\t\t * \n\t\t * centerCirclePaint.setAlpha(150); mCanvas.drawCircle(x, y, radius / 3,\n\t\t * centerCirclePaint);\n\t\t */\n\n\t\t// Paint localPaint = new Paint();\n\t\t// 设置取消锯齿效果\n\t\t// localPaint.setAntiAlias(true);\n\t\t// 风格为圆玿\n\t\t/*\n\t\t * localPaint.setStyle(Paint.Style.STROKE); // 圆环宽度\n\t\t * localPaint.setStrokeWidth(circleRadius);\n\t\t */\n\t\t// 圆环背景\n\n\t\tmCanvas.drawBitmap(myBg, 0, 0, null);\n\t\tmCanvas.save();\n\n\t\ttextPaint.setColor(Color.WHITE);\n\t\ttextPaint.setTextAlign(Paint.Align.CENTER);\n\t\ttextPaint.setTextSize(x / 10);\n\n\t\tmCanvas.drawText(\"总计\", x, y - x / 12, textPaint);\n\t\tmCanvas.drawText(PayChart.getamount(), x, y + x / 10, textPaint); // 总计\n\t\tmCanvas.save();\n\t}\n\n\tprivate float getBorderAngle() {\n\t\tfloat borderAngle;\n\t\tint circleCount = 0;\n\t\tif (startAngle >= 0) {\n\t\t\tcircleCount = (int) (startAngle / 360);\n\t\t\tif ((startAngle % 360) > (90)) {\n\t\t\t\tborderAngle = (float) (90 + 360 * (circleCount + 1));\n\t\t\t} else {\n\t\t\t\tborderAngle = (float) (90 + 360 * circleCount);\n\t\t\t}\n\n\t\t} else {\n\t\t\tcircleCount = (int) (startAngle / 360);\n\t\t\tif ((startAngle % 360) < (-270)) {\n\t\t\t\tborderAngle = (float) (90 + 360 * (circleCount - 1));\n\t\t\t} else {\n\t\t\t\tborderAngle = (float) (90 + 360 * circleCount);\n\t\t\t}\n\n\t\t}\n\n\t\treturn borderAngle;\n\n\t}\n\n\tpublic ChartProp getCurrentChartProp() {\n\t\tif (mChartProp != null) {\n\t\t\treturn mChartProp;\n\t\t}\n\t\tfloat temp = startAngle;\n\t\tfloat borderAngle = getBorderAngle();\n\n\t\tfor (int i = 0; i < itemCount; i++) {\n\n\t\t\tsweepAngle = mChartProps.get(i).getSweepAngle();\n\t\t\tmChartProps.get(i).setStartAngle(temp);\n\n\t\t\ttemp += sweepAngle;\n\t\t\tmChartProps.get(i).setEndAngle(temp);\n\n\t\t\tgetCurrentChartProp(mChartProps.get(i), borderAngle);\n\t\t}\n\n\t\treturn mChartProp;\n\t}\n\n\t// *********************************画每个扇彿********************************\n\tpublic void drawItem(RectF localRectf) {\n\t\tfloat temp = startAngle;\n\t\tfloat borderAngle = getBorderAngle();\n\t\t// System.out.println(\"itemCount\" + itemCount);\n\t\tif (!mChartProps.isEmpty()) {\n\t\t\tif (itemCount > 0) {\n\t\t\t\tfor (int i = 0; i < itemCount; i++) {\n\t\t\t\t\tif (i < mChartProps.size()) {\n\t\t\t\t\t\tmPaint.setColor(mChartProps.get(i).getColor());\n\t\t\t\t\t\t// startAngle为每次移动的角度大小\n\t\t\t\t\t\tsweepAngle = mChartProps.get(i).getSweepAngle();\n\t\t\t\t\t\tmChartProps.get(i).setStartAngle(temp);\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * oval：圆弧所在的椭圆对象?startAngle：圆弧的起始角度。sweepAngle：圆弧的角度?\n\t\t\t\t\t\t * useCenter：\n\t\t\t\t\t\t * 是否显示半径连线，true表示显示圆弧与圆心的半径连线，false表示不显示?paint\n\t\t\t\t\t\t * ：绘制时承?用的画笔\n\t\t\t\t\t\t */\n\t\t\t\t\t\tmCanvas.drawArc(localRectf, temp, sweepAngle, true,\n\t\t\t\t\t\t\t\tmPaint);\n\t\t\t\t\t\t// mCanvas.drawText(localRectf, temp, sweepAngle,\n\t\t\t\t\t\t// mChartProps.get(i).getName());\n\t\t\t\t\t\tmCanvas.save();\n\n\t\t\t\t\t\ttemp += sweepAngle;\n\t\t\t\t\t\tmChartProps.get(i).setEndAngle(temp);\n\n\t\t\t\t\t\tgetCurrentChartProp(mChartProps.get(i), borderAngle);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n\n\tpublic boolean isRotateEnabled() {\n\t\treturn rotateEnabled;\n\t}\n\n\tpublic void setRotateEnabled(boolean rotateEnabled) {\n\t\tthis.rotateEnabled = rotateEnabled;\n\t}\n\n\tpublic void rotateEnable() {\n\t\trotateEnabled = true;\n\t}\n\n\tpublic void rotateDisable() {\n\t\trotateEnabled = false;\n\t}\n\n\t@Override\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\n\t\tboolean enable = true;\n\t\tfloat x = centerPoint.x;\n\t\tfloat y = centerPoint.y;\n\t\tfloat y1 = event.getY();\n\t\tfloat x1 = event.getX();\n\n\t\tfloat x2 = v.getLeft();\n\t\tfloat y2 = v.getTop();\n\n\t\tfloat x3 = x1 - x2;\n\t\tfloat y3 = y1 - y2;\n\n\t\tif (event.getAction() == MotionEvent.ACTION_DOWN) {\n\t\t\tm_x = x3;\n\t\t\tm_y = y3;\n\t\t\ttounched = true;\n\n\t\t}\n\n\t\tif (event.getAction() == MotionEvent.ACTION_UP) {\n\t\t\tm_x = 0;\n\t\t\tm_y = 0;\n\t\t\ttounched = false;\n\n\t\t}\n\n\t\tfloat d = (float) Math.sqrt((Math.pow(Math.abs((x - x3)), 2) + Math\n\t\t\t\t.pow(Math.abs((y - y3)), 2)));\n\t\tif (d > radius) {\n\t\t\tm_x = 0;\n\t\t\tm_y = 0;\n\t\t\tenable = false;\n\n\t\t}\n\n\t\tif (event.getAction() == MotionEvent.ACTION_MOVE) {\n\n\t\t\tif ((m_x == 0) && (m_y == 0)) {\n\n\t\t\t\tenable = false;\n\t\t\t}\n\t\t\tif (enable) {\n\t\t\t\tfloat c = (float) Math\n\t\t\t\t\t\t.sqrt((Math.pow(Math.abs((m_x - x3)), 2) + Math.pow(\n\t\t\t\t\t\t\t\tMath.abs((m_y - y3)), 2)));\n\t\t\t\tfloat a = (float) Math\n\t\t\t\t\t\t.sqrt((Math.pow(Math.abs(m_x - x), 2) + Math.pow(\n\t\t\t\t\t\t\t\tMath.abs((m_y - y)), 2)));\n\t\t\t\tfloat b = (float) Math\n\t\t\t\t\t\t.sqrt((Math.pow(Math.abs(x3 - x), 2) + Math.pow(\n\t\t\t\t\t\t\t\tMath.abs((y3 - y)), 2)));\n\n\t\t\t\tfloat cosc = (float) (Math.pow(a, 2) + Math.pow(b, 2) - Math\n\t\t\t\t\t\t.pow(c, 2)) / (2 * a * b);\n\n\t\t\t\tfloat m_angle = getAngle((m_x - x), (m_y - y));\n\n\t\t\t\tfloat angle3 = getAngle((x3 - x), (y3 - y));\n\t\t\t\tif ((90 > m_angle) && (angle3 > 270)) {\n\t\t\t\t\tm_angle = m_angle + (float) 360;\n\t\t\t\t}\n\t\t\t\tif ((90 > angle3) && (m_angle > 270)) {\n\t\t\t\t\tangle3 = angle3 + (float) 360;\n\t\t\t\t}\n\t\t\t\tif (angle3 - m_angle > 0) {\n\t\t\t\t\tstartAngle = (float) (startAngle + Math.acos(cosc) * 180\n\t\t\t\t\t\t\t/ Math.PI);\n\t\t\t\t} else {\n\t\t\t\t\tstartAngle = (float) (startAngle - Math.acos(cosc) * 180\n\t\t\t\t\t\t\t/ Math.PI);\n\t\t\t\t}\n\t\t\t\tm_x = x3;\n\t\t\t\tm_y = y3;\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tprivate float getAngle(float x, float y) {\n\n\t\tif ((x == 0) && (y == 0)) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tfloat angle = (float) (Math.atan(y / x) * 180 / Math.PI);\n\n\t\tif (x == 0) {\n\t\t\tif (y > 0) {\n\t\t\t\treturn 90;\n\t\t\t} else {\n\t\t\t\treturn 270;\n\t\t\t}\n\t\t}\n\n\t\tif (x > 0) {\n\t\t\tif (y < 0) {\n\t\t\t\treturn (float) 360 + angle;\n\t\t\t}\n\t\t}\n\t\tif (x < 0) {\n\t\t\tif (y > 0) {\n\t\t\t\treturn (float) 180 + angle;\n\t\t\t} else if (y == 0) {\n\t\t\t\treturn 180;\n\t\t\t} else if (y < 0) {\n\t\t\t\treturn (float) 180 + angle;\n\t\t\t}\n\n\t\t}\n\n\t\treturn angle;\n\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/chart/PiewController.java",
    "content": "package com.cwp.chart;\n\nimport android.view.View;\nimport android.view.View.MeasureSpec;\nimport android.view.ViewGroup.MarginLayoutParams;\nimport android.widget.FrameLayout;\nimport android.widget.RelativeLayout;\n\npublic class PiewController {\n\n\t/*\n\t * 获取控件宿\n\t */\n\tpublic static int getWidth(View view) {\n\t\tint w = View.MeasureSpec.makeMeasureSpec(0,\n\t\t\t\tView.MeasureSpec.UNSPECIFIED);\n\t\tint h = View.MeasureSpec.makeMeasureSpec(0,\n\t\t\t\tView.MeasureSpec.UNSPECIFIED);\n\t\tview.measure(w, h);\n\t\treturn (view.getMeasuredWidth());\n\t}\n\n\t/*\n\t * 获取控件髿\n\t */\n\tpublic static int getHeight(View view) {\n\t\tint w = View.MeasureSpec.makeMeasureSpec(0,\n\t\t\t\tView.MeasureSpec.UNSPECIFIED);\n\t\tint h = View.MeasureSpec.makeMeasureSpec(0,\n\t\t\t\tView.MeasureSpec.UNSPECIFIED);\n\t\tview.measure(w, h);\n\t\treturn (view.getMeasuredHeight());\n\t}\n\n\t/*\n\t * 设置控件承?的位置X，并且不改变宽高＿X为绝对位置，此时Y可能彿\n\t */\n\tpublic static void setLayoutX(View view, int x) {\n\t\tMarginLayoutParams margin = new MarginLayoutParams(\n\t\t\t\tview.getLayoutParams());\n\t\tmargin.setMargins(x, margin.topMargin, x + margin.width,\n\t\t\t\tmargin.bottomMargin);\n\t\tRelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(\n\t\t\t\tmargin);\n\t\tview.setLayoutParams(layoutParams);\n\t}\n\n\t/*\n\t * 设置控件承?的位置Y，并且不改变宽高＿Y为绝对位置，此时X可能彿\n\t */\n\tpublic static void setLayoutY(View view, int y) {\n\t\tMarginLayoutParams margin = new MarginLayoutParams(\n\t\t\t\tview.getLayoutParams());\n\t\tmargin.setMargins(margin.leftMargin, y, margin.rightMargin, y\n\t\t\t\t+ margin.height);\n\t\tRelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(\n\t\t\t\tmargin);\n\t\tview.setLayoutParams(layoutParams);\n\t}\n\n\t/*\n\t * 设置控件承?的位置YY，并且不改变宽高＿XY为绝对位罿\n\t */\n\tpublic static void setLayout(View view, int x, int y) {\n\t\tMarginLayoutParams margin = new MarginLayoutParams(\n\t\t\t\tview.getLayoutParams());\n\t\tmargin.setMargins(x, y, x + margin.width, y + margin.height);\n\t\tRelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(\n\t\t\t\tmargin);\n\t\tview.setLayoutParams(layoutParams);\n\t}\n\n\tpublic static int measureWidth(int pWidthMeasureSpec) {\n\t\tint result = 0;\n\t\tint widthMode = MeasureSpec.getMode(pWidthMeasureSpec);// 得到模式\n\t\tint widthSize = MeasureSpec.getSize(pWidthMeasureSpec);// 得到尺寸\n\n\t\tswitch (widthMode) {\n\t\t/**\n\t\t * mode共有三种情况，取值分别为MeasureSpec.UNSPECIFIED, MeasureSpec.EXACTLY,\n\t\t * MeasureSpec.AT_MOST?\n\t\t * \n\t\t * \n\t\t * MeasureSpec.EXACTLY是精确尺寸，\n\t\t * 当我们将控件的layout_width或layout_height指定为具体数值时如andorid\n\t\t * :layout_width=\"50dip\"，或者为FILL_PARENT是，都是控件大小已经确定的情况，都是精确尺寸?\n\t\t * \n\t\t * \n\t\t * MeasureSpec.AT_MOST是最大尺寸，\n\t\t * 当控件的layout_width或layout_height指定为WRAP_CONTENT旿\n\t\t * ，控件大小一般随睿Χ件的子空间或内容进行变化，此时控件尺寸只要不超过父控件允许的朿?尺寸即可\n\t\t * 。因此，此时的mode是AT_MOST，size给出了父控件允许的最大尺寸?\n\t\t * \n\t\t * \n\t\t * MeasureSpec.UNSPECIFIED是未指定尺寸，这种情况不多，丿?都是父控件是AdapterView＿\n\t\t * 通过measure方法传入的模式?\n\t\t */\n\t\tcase MeasureSpec.AT_MOST:\n\t\tcase MeasureSpec.EXACTLY:\n\t\t\tresult = widthSize;\n\t\t\tbreak;\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static int measureHeight(int pHeightMeasureSpec) {\n\t\tint result = 0;\n\n\t\tint heightMode = MeasureSpec.getMode(pHeightMeasureSpec);\n\t\tint heightSize = MeasureSpec.getSize(pHeightMeasureSpec);\n\n\t\tswitch (heightMode) {\n\t\tcase MeasureSpec.AT_MOST:\n\t\tcase MeasureSpec.EXACTLY:\n\t\t\tresult = heightSize;\n\t\t\tbreak;\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static void mySetMargins(View view, int left, int top, int right,\n\t\t\tint bottom) {\n\t\tFrameLayout.LayoutParams layoutParam = (FrameLayout.LayoutParams) view\n\t\t\t\t.getLayoutParams();\n\t\tlayoutParam.setMargins(left, top, right, bottom);\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/chart/PullToRefreshView.java",
    "content": "package com.cwp.chart;\n\nimport java.util.Date;\n\nimport com.cwp.cmoneycharge.FragmentPage3;\nimport com.cwp.cmoneycharge.R;\n\nimport android.content.Context;\nimport android.util.AttributeSet;\nimport android.util.Log;\nimport android.view.LayoutInflater;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.view.animation.LinearInterpolator;\nimport android.view.animation.RotateAnimation;\nimport android.widget.AdapterView;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.ProgressBar;\nimport android.widget.ScrollView;\nimport android.widget.TextView;\n\n/**\n * @description自定义容器，盛放listview,gridview,scrollview\n * @author 袁东卿\n * @date 2014-7-21 下午5:56:00\n */\npublic class PullToRefreshView extends LinearLayout {\n\tprivate static final String TAG = \"PullToRefreshView\";\n\t// 刷新状濍\n\tprivate static final int PULL_TO_REFRESH = 2;\n\tprivate static final int RELEASE_TO_REFRESH = 3;\n\tprivate static final int REFRESHING = 4;\n\t// 拉动状濍\n\tprivate static final int PULL_UP_STATE = 0;\n\tprivate static final int PULL_DOWN_STATE = 1;\n\tprivate boolean enablePullTorefresh = true;\n\tprivate boolean enablePullLoadMoreDataStatus = true;\n\tprivate int mLastMotionY;\n\tprivate boolean mLock;\n\t/**\n\t * 头部view\n\t */\n\tprivate View mHeaderView;\n\t/**\n\t * 底部view\n\t */\n\tprivate View mFooterView;\n\tprivate AdapterView<?> mAdapterView;\n\tprivate ScrollView mScrollView;\n\t/**\n\t * 头部view的高\n\t */\n\tprivate int mHeaderViewHeight;\n\t/**\n\t * 底部view的高\n\t */\n\tprivate int mFooterViewHeight;\n\t/**\n\t * 头部箭头\n\t */\n\tprivate ImageView mHeaderImageView;\n\t/**\n\t * 底部箭头\n\t */\n\tprivate ImageView mFooterImageView;\n\t/**\n\t * 头部文字\n\t */\n\tprivate TextView mHeaderTextView;\n\t/**\n\t * 底部文字\n\t */\n\tprivate TextView mFooterTextView;\n\t/**\n\t * 头部刷新时间\n\t */\n\tprivate TextView mHeaderUpdateTextView;\n\t/**\n\t * 底部刷新时间\n\t */\n\tprivate TextView mFooterUpdateTextView;\n\t/**\n\t * 头部进度板\n\t */\n\tprivate ProgressBar mHeaderProgressBar;\n\t/**\n\t * 底部进度板\n\t */\n\tprivate ProgressBar mFooterProgressBar;\n\t/**\n\t * layout inflater\n\t */\n\tprivate LayoutInflater mInflater;\n\t/**\n\t * 头部view的当前状怿\n\t */\n\tprivate int mHeaderState;\n\t/**\n\t * 底部view的当前状怿\n\t */\n\tprivate int mFooterState;\n\t/**\n\t * 拉动状濍\n\t */\n\tprivate int mPullState;\n\t/**\n\t * 变为向下的箭夿改变箭头方向\n\t */\n\tprivate RotateAnimation mFlipAnimation;\n\t/**\n\t * 变为逆向的箭夿旋转\n\t */\n\tprivate RotateAnimation mReverseFlipAnimation;\n\t/**\n\t * 底部view的刷新监吿\n\t */\n\tprivate OnFooterRefreshListener mOnFooterRefreshListener;\n\t/**\n\t * 头部view的刷新监吿\n\t */\n\tprivate OnHeaderRefreshListener mOnHeaderRefreshListener;\n\n\t/**\n\t * 朿?更新时间\n\t */\n\tprivate String mLastUpdateTime;\n\n\tpublic PullToRefreshView(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t\tinit();\n\t}\n\n\tpublic PullToRefreshView(Context context) {\n\t\tsuper(context);\n\t\tinit();\n\t}\n\n\tprivate void init() {\n\t\t// Load all of the animations we need in code rather than through XML\n\t\tmFlipAnimation = new RotateAnimation(0, -180,\n\t\t\t\tRotateAnimation.RELATIVE_TO_SELF, 0.5f,\n\t\t\t\tRotateAnimation.RELATIVE_TO_SELF, 0.5f);\n\t\tmFlipAnimation.setInterpolator(new LinearInterpolator());\n\t\tmFlipAnimation.setDuration(250);\n\t\tmFlipAnimation.setFillAfter(true);\n\t\tmReverseFlipAnimation = new RotateAnimation(-180, 0,\n\t\t\t\tRotateAnimation.RELATIVE_TO_SELF, 0.5f,\n\t\t\t\tRotateAnimation.RELATIVE_TO_SELF, 0.5f);\n\t\tmReverseFlipAnimation.setInterpolator(new LinearInterpolator());\n\t\tmReverseFlipAnimation.setDuration(250);\n\t\tmReverseFlipAnimation.setFillAfter(true);\n\n\t\tmInflater = LayoutInflater.from(getContext());\n\t\t// header view 在此添加,保证是第丿?添加到linearlayout的最上端\n\t\taddHeaderView();\n\t}\n\n\tprivate void addHeaderView() {\n\t\t// header view\n\t\tmHeaderView = mInflater.inflate(R.layout.refresh_header, this, false);\n\n\t\tmHeaderImageView = (ImageView) mHeaderView\n\t\t\t\t.findViewById(R.id.pull_to_refresh_image);\n\t\tmHeaderTextView = (TextView) mHeaderView\n\t\t\t\t.findViewById(R.id.pull_to_refresh_text);\n\t\tmHeaderUpdateTextView = (TextView) mHeaderView\n\t\t\t\t.findViewById(R.id.pull_to_refresh_updated_at);\n\t\t// mHeaderProgressBar = (ProgressBar) mHeaderView\n\t\t// .findViewById(R.id.pull_to_refresh_progress);\n\t\t// header layout\n\t\tmeasureView(mHeaderView);\n\t\tmHeaderViewHeight = mHeaderView.getMeasuredHeight();\n\t\tLayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT,\n\t\t\t\tmHeaderViewHeight);\n\t\t// 设置topMargin的怤?负的header View高度,即将其隐藏在朿?斿\n\t\tparams.topMargin = -(mHeaderViewHeight);\n\t\t// mHeaderView.setLayoutParams(params1);\n\t\taddView(mHeaderView, params);\n\n\t}\n\n\tprivate void addFooterView() {\n\t\t// footer view\n\t\tmFooterView = mInflater.inflate(R.layout.refresh_footer, this, false);\n\t\tmFooterImageView = (ImageView) mFooterView\n\t\t\t\t.findViewById(R.id.pull_to_load_image);\n\t\tmFooterTextView = (TextView) mFooterView\n\t\t\t\t.findViewById(R.id.pull_to_load_text);\n\t\t// mFooterProgressBar = (ProgressBar) mFooterView\n\t\t// .findViewById(R.id.pull_to_load_progress);\n\t\t// footer layout\n\t\tmeasureView(mFooterView);\n\t\tmFooterViewHeight = mFooterView.getMeasuredHeight();\n\t\tLayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT,\n\t\t\t\tmFooterViewHeight);\n\t\t// int top = getHeight();\n\t\t// params.topMargin\n\t\t// =getHeight();//在这里getHeight()==0,但在onInterceptTouchEvent()方法里getHeight()已经有怤?不再昿;\n\t\t// getHeight()仿?时怤?赋倿稍急?研究一丿\n\t\t// 由于是线性布屿?以直接添势只要AdapterView的高度是MATCH_PARENT,那么footer view就会被添加到朿?,并隐藿\n\t\taddView(mFooterView, params);\n\t}\n\n\t@Override\n\tprotected void onFinishInflate() {\n\t\tsuper.onFinishInflate();\n\t\t// footer view 在此添加保证添加到linearlayout中的朿?\n\t\taddFooterView();\n\t\tinitContentAdapterView();\n\t}\n\n\tprivate void initContentAdapterView() {\n\t\tint count = getChildCount();\n\t\tif (count < 3) {\n\t\t\tLog.e(TAG, \"子view的个数小亿----------------\");\n\t\t}\n\t\tView view = null;\n\t\tfor (int i = 0; i < count - 1; ++i) {\n\t\t\tview = getChildAt(i);\n\t\t\tif (view instanceof AdapterView<?>) {\n\t\t\t\tmAdapterView = (AdapterView<?>) view;\n\t\t\t}\n\t\t\tif (view instanceof ScrollView) {\n\t\t\t\t// finish later\n\t\t\t\tmScrollView = (ScrollView) view;\n\t\t\t}\n\t\t}\n\t\tif (mAdapterView == null && mScrollView == null) {\n\t\t\tLog.e(TAG, \"view为空-------------------\");\n\t\t}\n\t}\n\n\tprivate void measureView(View child) {\n\t\tViewGroup.LayoutParams p = child.getLayoutParams();\n\t\tif (p == null) {\n\t\t\tp = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,\n\t\t\t\t\tViewGroup.LayoutParams.WRAP_CONTENT);\n\t\t}\n\n\t\tint childWidthSpec = ViewGroup.getChildMeasureSpec(0, 0 + 0, p.width);\n\t\tint lpHeight = p.height;\n\t\tint childHeightSpec;\n\t\tif (lpHeight > 0) {\n\t\t\tchildHeightSpec = MeasureSpec.makeMeasureSpec(lpHeight,\n\t\t\t\t\tMeasureSpec.EXACTLY);\n\t\t} else {\n\t\t\tchildHeightSpec = MeasureSpec.makeMeasureSpec(0,\n\t\t\t\t\tMeasureSpec.UNSPECIFIED);\n\t\t}\n\t\tchild.measure(childWidthSpec, childHeightSpec);\n\t}\n\n\t@Override\n\tpublic boolean onInterceptTouchEvent(MotionEvent e) {\n\t\tint y = (int) e.getRawY();\n\t\tswitch (e.getAction()) {\n\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t// 首先拦截down事件,记录y坐标\n\t\t\tmLastMotionY = y;\n\t\t\tbreak;\n\t\tcase MotionEvent.ACTION_MOVE:\n\t\t\t// deltaY > 0 是向下运势< 0是向上运势\n\t\t\tint deltaY = y - mLastMotionY;\n\t\t\tif (isRefreshViewScroll(deltaY)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase MotionEvent.ACTION_UP:\n\t\tcase MotionEvent.ACTION_CANCEL:\n\t\t\tbreak;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/*\n\t * 如果在onInterceptTouchEvent()方法中没有拦房即onInterceptTouchEvent()方法丿return\n\t * false)则由PullToRefreshView 的子View来处琿否则由下面的方法来处琿即由PullToRefreshView自己来处琿\n\t */\n\t@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tif (mLock) {\n\t\t\treturn true;\n\t\t}\n\t\tint y = (int) event.getRawY();\n\t\tswitch (event.getAction()) {\n\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t// onInterceptTouchEvent已经记录\n\t\t\t// mLastMotionY = y;\n\t\t\tbreak;\n\t\tcase MotionEvent.ACTION_MOVE:\n\t\t\tint deltaY = y - mLastMotionY;\n\t\t\tif (mPullState == PULL_DOWN_STATE) {\n\t\t\t\t// PullToRefreshView执行下拉\n\t\t\t\t// Log.i(TAG, \" pull down!parent view move!\");\n\t\t\t\theaderPrepareToRefresh(deltaY);\n\t\t\t\t// setHeaderPadding(-mHeaderViewHeight);\n\t\t\t} else if (mPullState == PULL_UP_STATE) {\n\t\t\t\t// PullToRefreshView执行上拉\n\t\t\t\t// Log.i(TAG, \"pull up!parent view move!\");\n\t\t\t\tfooterPrepareToRefresh(deltaY);\n\t\t\t}\n\t\t\tmLastMotionY = y;\n\t\t\tbreak;\n\t\tcase MotionEvent.ACTION_UP:\n\t\tcase MotionEvent.ACTION_CANCEL:\n\t\t\tint topMargin = getHeaderTopMargin();\n\t\t\tif (mPullState == PULL_DOWN_STATE) {\n\t\t\t\tif (topMargin >= 0) {\n\t\t\t\t\t// 弿?刷新\n\t\t\t\t\theaderRefreshing();\n\t\t\t\t} else {\n\t\t\t\t\t// 还没有执行刷新，重新隐藏\n\t\t\t\t\tsetHeaderTopMargin(-mHeaderViewHeight);\n\t\t\t\t}\n\t\t\t} else if (mPullState == PULL_UP_STATE) {\n\t\t\t\tif (Math.abs(topMargin) >= mHeaderViewHeight\n\t\t\t\t\t\t+ mFooterViewHeight) {\n\t\t\t\t\t// 弿?执行footer 刷新\n\t\t\t\t\tfooterRefreshing();\n\t\t\t\t} else {\n\t\t\t\t\t// 还没有执行刷新，重新隐藏\n\t\t\t\t\tsetHeaderTopMargin(-mHeaderViewHeight);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onTouchEvent(event);\n\t}\n\n\t/**\n\t * 是否应该到了父View,即PullToRefreshView滑动\n\t * \n\t * @param deltaY\n\t *            , deltaY > 0 是向下运势< 0是向上运势\n\t * @return\n\t */\n\tprivate boolean isRefreshViewScroll(int deltaY) {\n\t\tif (mHeaderState == REFRESHING || mFooterState == REFRESHING) {\n\t\t\treturn false;\n\t\t}\n\t\t// 对于ListView和GridView\n\t\tif (mAdapterView != null) {\n\t\t\t// 子view(ListView or GridView)滑动到最顶端\n\t\t\tif (deltaY > 0) {\n\t\t\t\t// 判断是否禁用下拉刷新操作\n\t\t\t\tif (!enablePullTorefresh) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tView child = mAdapterView.getChildAt(0);\n\t\t\t\tif (child == null) {\n\t\t\t\t\t// 如果mAdapterView中没有数捿不拦房\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (mAdapterView.getFirstVisiblePosition() == 0\n\t\t\t\t\t\t&& child.getTop() == 0) {\n\t\t\t\t\tmPullState = PULL_DOWN_STATE;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tint top = child.getTop();\n\t\t\t\tint padding = mAdapterView.getPaddingTop();\n\t\t\t\tif (mAdapterView.getFirstVisiblePosition() == 0\n\t\t\t\t\t\t&& Math.abs(top - padding) <= 11) {// 这里之前甿可以判断,但现在不衿还没找到原因\n\t\t\t\t\tmPullState = PULL_DOWN_STATE;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t} else if (deltaY < 0) {\n\t\t\t\t// 判断是否禁用上拉加载更多操作\n\t\t\t\tif (!enablePullLoadMoreDataStatus) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tView lastChild = mAdapterView.getChildAt(mAdapterView\n\t\t\t\t\t\t.getChildCount() - 1);\n\t\t\t\tif (lastChild == null) {\n\t\t\t\t\t// 如果mAdapterView中没有数捿不拦房\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// 朿?丿?子view的Bottom小于父View的高度说明mAdapterView的数据没有填满父view,\n\t\t\t\t// 等于父View的高度说明mAdapterView已经滑动到最吿\n\t\t\t\tif (lastChild.getBottom() <= getHeight()\n\t\t\t\t\t\t&& mAdapterView.getLastVisiblePosition() == mAdapterView\n\t\t\t\t\t\t\t\t.getCount() - 1) {\n\t\t\t\t\tmPullState = PULL_UP_STATE;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// 对于ScrollView\n\t\tif (mScrollView != null) {\n\t\t\t// 子scroll view滑动到最顶端\n\t\t\tView child = mScrollView.getChildAt(0);\n\t\t\tif (deltaY > 0 && mScrollView.getScrollY() == 0) {\n\t\t\t\tmPullState = PULL_DOWN_STATE;\n\t\t\t\treturn true;\n\t\t\t} else if (deltaY < 0\n\t\t\t\t\t&& child.getMeasuredHeight() <= getHeight()\n\t\t\t\t\t\t\t+ mScrollView.getScrollY()) {\n\t\t\t\tmPullState = PULL_UP_STATE;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * header 准备刷新,手指移动过程,还没有释政\n\t * \n\t * @param deltaY\n\t *            ,手指滑动的距禿\n\t */\n\tprivate void headerPrepareToRefresh(int deltaY) {\n\t\tint newTopMargin = changingHeaderViewTopMargin(deltaY);\n\n\t\t// 当header view的topMargin>=0时，说明已经完全显示出来亿修改header view 的提示状怿\n\t\tif (newTopMargin >= 0 && mHeaderState != RELEASE_TO_REFRESH) {\n\t\t\tmHeaderTextView.setText(\"放开切换到\"\n\t\t\t\t\t+ Integer.toString(FragmentPage3.getyear() + 1) + \"年流水\");\n\t\t\tmHeaderUpdateTextView.setVisibility(View.VISIBLE);\n\t\t\tmHeaderImageView.clearAnimation();\n\t\t\tmHeaderImageView.startAnimation(mFlipAnimation);\n\t\t\tmHeaderState = RELEASE_TO_REFRESH;\n\t\t} else if (newTopMargin < 0 && newTopMargin > -mHeaderViewHeight) {// 拖动时没有释政\n\t\t\tmHeaderImageView.clearAnimation();\n\t\t\tmHeaderImageView.startAnimation(mFlipAnimation);\n\t\t\t// mHeaderImageView.\n\t\t\tmHeaderTextView.setText(\"下拉切换到\"\n\t\t\t\t\t+ Integer.toString(FragmentPage3.getyear() + 1) + \"年流水\");\n\t\t\tmHeaderState = PULL_TO_REFRESH;\n\t\t}\n\t}\n\n\t/**\n\t * footer 准备刷新,手指移动过程,还没有释政移动footer view高度同样和移动header view\n\t * 高度是一样，都是通过修改header view的topmargin的怦?达刿\n\t * \n\t * @param deltaY\n\t *            ,手指滑动的距禿\n\t */\n\tprivate void footerPrepareToRefresh(int deltaY) {\n\t\tint newTopMargin = changingHeaderViewTopMargin(deltaY);\n\t\t// 如果header view topMargin 的绝对急?于或等于header + footer 的高庿\n\t\t// 说明footer view 完全显示出来了，修改footer view 的提示状怿\n\t\tif (Math.abs(newTopMargin) >= (mHeaderViewHeight + mFooterViewHeight)\n\t\t\t\t&& mFooterState != RELEASE_TO_REFRESH) {\n\t\t\tmFooterTextView.setText(\"放开切换到\"\n\t\t\t\t\t+ Integer.toString(FragmentPage3.getyear() - 1) + \"年流水\");\n\t\t\tmFooterImageView.clearAnimation();\n\t\t\tmFooterImageView.startAnimation(mFlipAnimation);\n\t\t\tmFooterState = RELEASE_TO_REFRESH;\n\t\t} else if (Math.abs(newTopMargin) < (mHeaderViewHeight + mFooterViewHeight)) {\n\t\t\tmFooterImageView.clearAnimation();\n\t\t\tmFooterImageView.startAnimation(mFlipAnimation);\n\t\t\tmFooterTextView.setText(\"上拉切换到\"\n\t\t\t\t\t+ Integer.toString(FragmentPage3.getyear() - 1) + \"年流水\");\n\t\t\tmFooterState = PULL_TO_REFRESH;\n\t\t}\n\t}\n\n\tprivate int changingHeaderViewTopMargin(int deltaY) {\n\t\tLayoutParams params = (LayoutParams) mHeaderView.getLayoutParams();\n\t\tfloat newTopMargin = params.topMargin + deltaY * 0.3f;\n\t\t// 这里对上拉做丿?限制,因为当前上拉后然后不释放手指直接下拉,会把下拉刷新给触发了,感谢网友yufengzungzhe的指凿\n\t\t// 表示如果是在上拉后一段距禿然后直接下拉\n\t\tif (deltaY > 0 && mPullState == PULL_UP_STATE\n\t\t\t\t&& Math.abs(params.topMargin) <= mHeaderViewHeight) {\n\t\t\treturn params.topMargin;\n\t\t}\n\t\t// 同样圿对下拉做丿?限制,避免出现跟上拉操作时丿7的bug\n\t\tif (deltaY < 0 && mPullState == PULL_DOWN_STATE\n\t\t\t\t&& Math.abs(params.topMargin) >= mHeaderViewHeight) {\n\t\t\treturn params.topMargin;\n\t\t}\n\t\tparams.topMargin = (int) newTopMargin;\n\t\tmHeaderView.setLayoutParams(params);\n\t\tinvalidate();\n\t\treturn params.topMargin;\n\t}\n\n\tpublic void headerRefreshing() {\n\t\tmHeaderState = REFRESHING;\n\t\tsetHeaderTopMargin(0);\n\t\tmHeaderImageView.setVisibility(View.GONE);\n\t\tmHeaderImageView.clearAnimation();\n\t\tmHeaderImageView.setImageDrawable(null);\n\t\t// mHeaderProgressBar.setVisibility(View.VISIBLE);\n\t\tmHeaderTextView.setText(R.string.pull_to_refresh_refreshing_label);\n\t\tif (mOnHeaderRefreshListener != null) {\n\t\t\tmOnHeaderRefreshListener.onHeaderRefresh(this);\n\t\t}\n\t}\n\n\tprivate void footerRefreshing() {\n\t\tmFooterState = REFRESHING;\n\t\tint top = mHeaderViewHeight + mFooterViewHeight;\n\t\tsetHeaderTopMargin(-top);\n\t\tmFooterImageView.setVisibility(View.GONE);\n\t\tmFooterImageView.clearAnimation();\n\t\tmFooterImageView.setImageDrawable(null);\n\t\t// mFooterProgressBar.setVisibility(View.VISIBLE);\n\t\tmFooterTextView\n\t\t\t\t.setText(R.string.pull_to_refresh_footer_refreshing_label);\n\t\tif (mOnFooterRefreshListener != null) {\n\t\t\tmOnFooterRefreshListener.onFooterRefresh(this);\n\t\t}\n\t}\n\n\t/**\n\t * 设置header view 的topMargin的忍\n\t */\n\tprivate void setHeaderTopMargin(int topMargin) {\n\t\tLayoutParams params = (LayoutParams) mHeaderView.getLayoutParams();\n\t\tparams.topMargin = topMargin;\n\t\tmHeaderView.setLayoutParams(params);\n\t\tinvalidate();\n\t}\n\n\t/**\n\t * header view 完成更新后恢复初始状怿\n\t * \n\t */\n\tpublic void onHeaderRefreshComplete() {\n\t\tsetHeaderTopMargin(-mHeaderViewHeight);\n\t\tmHeaderImageView.setVisibility(View.VISIBLE);\n\t\tmHeaderImageView.setImageResource(R.drawable.ic_pulltorefresh_arrow);\n\t\tmHeaderTextView.setText(R.string.pull_to_refresh_pull_label);\n\t\t// mHeaderProgressBar.setVisibility(View.GONE);\n\t\tmHeaderState = PULL_TO_REFRESH;\n\t\tsetLastUpdated(\"朿?更新:\" + new Date().toLocaleString());\n\t}\n\n\tpublic void onHeaderRefreshComplete(CharSequence lastUpdated) {\n\t\tsetLastUpdated(lastUpdated);\n\t\tonHeaderRefreshComplete();\n\t}\n\n\t/**\n\t * footer view 完成更新后恢复初始状怿\n\t */\n\tpublic void onFooterRefreshComplete() {\n\t\tsetHeaderTopMargin(-mHeaderViewHeight);\n\t\tmFooterImageView.setVisibility(View.VISIBLE);\n\t\tmFooterImageView.setImageResource(R.drawable.ic_pulltorefresh_arrow_up);\n\t\tmFooterTextView.setText(R.string.pull_to_refresh_footer_pull_label);\n\t\t// mFooterProgressBar.setVisibility(View.GONE);\n\t\t// mHeaderUpdateTextView.setText(\"\");\n\t\tmFooterState = PULL_TO_REFRESH;\n\t}\n\n\t/**\n\t * footer view 完成更新后恢复初始状怿\n\t */\n\tpublic void onFooterRefreshComplete(int size) {\n\t\tif (size > 0) {\n\t\t\tmFooterView.setVisibility(View.VISIBLE);\n\t\t} else {\n\t\t\tmFooterView.setVisibility(View.GONE);\n\t\t}\n\t\tsetHeaderTopMargin(-mHeaderViewHeight);\n\t\tmFooterImageView.setVisibility(View.VISIBLE);\n\t\tmFooterImageView.setImageResource(R.drawable.ic_pulltorefresh_arrow_up);\n\t\tmFooterTextView.setText(R.string.pull_to_refresh_footer_pull_label);\n\t\t// mFooterProgressBar.setVisibility(View.GONE);\n\t\t// mHeaderUpdateTextView.setText(\"\");\n\t\tmFooterState = PULL_TO_REFRESH;\n\t}\n\n\tpublic void setLastUpdated(CharSequence lastUpdated) {\n\t\tif (lastUpdated != null) {\n\t\t\tmHeaderUpdateTextView.setVisibility(View.VISIBLE);\n\t\t\tmHeaderUpdateTextView.setText(lastUpdated);\n\t\t} else {\n\t\t\tmHeaderUpdateTextView.setVisibility(View.GONE);\n\t\t}\n\t}\n\n\tprivate int getHeaderTopMargin() {\n\t\tLayoutParams params = (LayoutParams) mHeaderView.getLayoutParams();\n\t\treturn params.topMargin;\n\t}\n\n\t// /**\n\t// * lock\n\t// */\n\t// private void lock() {\n\t// mLock = true;\n\t// }\n\t//\n\t// /**\n\t// * unlock\n\t// *\n\t// private void unlock() {\n\t// mLock = false;\n\t// }\n\n\t/**\n\t * @description\n\t * @param headerRefreshListener\n\t */\n\tpublic void setOnHeaderRefreshListener(\n\t\t\tOnHeaderRefreshListener headerRefreshListener) {\n\t\tmOnHeaderRefreshListener = headerRefreshListener;\n\t}\n\n\tpublic void setOnFooterRefreshListener(\n\t\t\tOnFooterRefreshListener footerRefreshListener) {\n\t\tmOnFooterRefreshListener = footerRefreshListener;\n\t}\n\n\tpublic interface OnFooterRefreshListener {\n\t\tpublic void onFooterRefresh(PullToRefreshView view);\n\t}\n\n\tpublic interface OnHeaderRefreshListener {\n\t\tpublic void onHeaderRefresh(PullToRefreshView view);\n\t}\n\n\tpublic boolean isEnablePullTorefresh() {\n\t\treturn enablePullTorefresh;\n\t}\n\n\tpublic void setEnablePullTorefresh(boolean enablePullTorefresh) {\n\t\tthis.enablePullTorefresh = enablePullTorefresh;\n\t}\n\n\tpublic boolean isEnablePullLoadMoreDataStatus() {\n\t\treturn enablePullLoadMoreDataStatus;\n\t}\n\n\tpublic void setEnablePullLoadMoreDataStatus(\n\t\t\tboolean enablePullLoadMoreDataStatus) {\n\t\tthis.enablePullLoadMoreDataStatus = enablePullLoadMoreDataStatus;\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/chart/RiseNumberBase.java",
    "content": "package com.cwp.chart;\n\npublic interface RiseNumberBase {\n    public void start();\n    public RiseNumberTextView withNumber(float number);\n    public RiseNumberTextView withNumber(int number);\n    public RiseNumberTextView setDuration(long duration);\n    public void setOnEnd(RiseNumberTextView.EndListener callback);\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/chart/RiseNumberTextView.java",
    "content": "package com.cwp.chart;\n\nimport android.content.Context;\nimport android.util.AttributeSet;\nimport android.widget.TextView;\n\nimport com.nineoldandroids.animation.ValueAnimator;\n\nimport java.text.DecimalFormat;\n\npublic class RiseNumberTextView extends TextView implements RiseNumberBase {\n\n\tprivate static final int STOPPED = 0;\n\n\tprivate static final int RUNNING = 1;\n\n\tprivate int mPlayingState = STOPPED;\n\n\tprivate float number;\n\n\tprivate float fromNumber;\n\n\tprivate long duration = 1500;\n\t/**\n\t * 1.int 2.float\n\t */\n\tprivate int numberType = 2;\n\n\tprivate DecimalFormat fnum;\n\n\tprivate EndListener mEndListener = null;\n\n\tfinal static int[] sizeTable = { 9, 99, 999, 9999, 99999, 999999, 9999999,\n\t\t\t99999999, 999999999, Integer.MAX_VALUE };\n\n\tpublic RiseNumberTextView(Context context) {\n\t\tsuper(context);\n\t}\n\n\tpublic RiseNumberTextView(Context context, AttributeSet attr) {\n\t\tsuper(context, attr);\n\t}\n\n\tpublic RiseNumberTextView(Context context, AttributeSet attr, int defStyle) {\n\t\tsuper(context, attr, defStyle);\n\t}\n\n\tpublic interface EndListener {\n\t\tpublic void onEndFinish();\n\t}\n\n\tpublic boolean isRunning() {\n\t\treturn (mPlayingState == RUNNING);\n\t}\n\n\tprivate void runFloat() {\n\t\tValueAnimator valueAnimator = ValueAnimator.ofFloat(fromNumber, number);\n\t\tvalueAnimator.setDuration(duration);\n\n\t\tvalueAnimator\n\t\t\t\t.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onAnimationUpdate(ValueAnimator valueAnimator) {\n\n\t\t\t\t\t\tsetText(fnum.format(Float.parseFloat(valueAnimator\n\t\t\t\t\t\t\t\t.getAnimatedValue().toString())));\n\t\t\t\t\t\tif (valueAnimator.getAnimatedFraction() >= 1) {\n\t\t\t\t\t\t\tmPlayingState = STOPPED;\n\t\t\t\t\t\t\tif (mEndListener != null)\n\t\t\t\t\t\t\t\tmEndListener.onEndFinish();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\tvalueAnimator.start();\n\t}\n\n\tprivate void runInt() {\n\t\tValueAnimator valueAnimator = ValueAnimator.ofInt((int) fromNumber,\n\t\t\t\t(int) number);\n\t\tvalueAnimator.setDuration(duration);\n\n\t\tvalueAnimator\n\t\t\t\t.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onAnimationUpdate(ValueAnimator valueAnimator) {\n\n\t\t\t\t\t\tsetText(valueAnimator.getAnimatedValue().toString());\n\t\t\t\t\t\tif (valueAnimator.getAnimatedFraction() >= 1) {\n\t\t\t\t\t\t\tmPlayingState = STOPPED;\n\t\t\t\t\t\t\tif (mEndListener != null)\n\t\t\t\t\t\t\t\tmEndListener.onEndFinish();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tvalueAnimator.start();\n\t}\n\n\tstatic int sizeOfInt(int x) {\n\t\tfor (int i = 0;; i++)\n\t\t\tif (x <= sizeTable[i])\n\t\t\t\treturn i + 1;\n\t}\n\n\t@Override\n\tprotected void onFinishInflate() {\n\t\tsuper.onFinishInflate();\n\t\tfnum = new DecimalFormat(\"##0.00\");\n\t}\n\n\t@Override\n\tpublic void start() {\n\n\t\tif (!isRunning()) {\n\t\t\tmPlayingState = RUNNING;\n\t\t\tif (numberType == 1)\n\t\t\t\trunInt();\n\t\t\telse\n\t\t\t\trunFloat();\n\t\t}\n\t}\n\n\t@Override\n\tpublic RiseNumberTextView withNumber(float number) {\n\n\t\tthis.number = number;\n\t\tnumberType = 2;\n\t\t// if (number > 1000) {\n\t\t// fromNumber = number\n\t\t// - (float) Math.pow(10, sizeOfInt((int) number) - 2);\n\t\t// } else {\n\t\t// fromNumber = number / 2;\n\t\t// }\n\t\tfromNumber = 0;\n\n\t\treturn this;\n\t}\n\n\t@Override\n\tpublic RiseNumberTextView withNumber(int number) {\n\t\tthis.number = number;\n\t\tnumberType = 1;\n\t\t// if (number>1000){\n\t\t// fromNumber=number-(float)Math.pow(10,sizeOfInt((int)number)-2);\n\t\t// }else {\n\t\t// fromNumber=number/2;\n\t\t// }\n\t\tfromNumber = 0;\n\n\t\treturn this;\n\n\t}\n\n\t@Override\n\tpublic RiseNumberTextView setDuration(long duration) {\n\t\tthis.duration = duration;\n\t\treturn this;\n\t}\n\n\t@Override\n\tpublic void setOnEnd(EndListener callback) {\n\t\tmEndListener = callback;\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/chart/SystemBarTintManager.java",
    "content": "/*\n * Copyright (C) 2013 readyState Software Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.cwp.chart;\n\nimport java.lang.reflect.Field;\nimport java.lang.reflect.Method;\n\nimport android.annotation.SuppressLint;\nimport android.annotation.TargetApi;\nimport android.app.Activity;\nimport android.content.Context;\nimport android.content.res.Configuration;\nimport android.content.res.Resources;\nimport android.content.res.TypedArray;\nimport android.graphics.drawable.Drawable;\nimport android.os.Build;\nimport android.util.DisplayMetrics;\nimport android.util.TypedValue;\nimport android.view.Gravity;\nimport android.view.View;\nimport android.view.ViewConfiguration;\nimport android.view.ViewGroup;\nimport android.view.Window;\nimport android.view.WindowManager;\nimport android.widget.FrameLayout.LayoutParams;\n\n/**\n * Class to manage status and navigation bar tint effects when using KitKat\n * translucent system UI modes.\n *\n */\npublic class SystemBarTintManager {\n\n    /**\n     * The default system bar tint color value.\n     */\n    public static final int DEFAULT_TINT_COLOR = 0x99000000;\n\n    private final SystemBarConfig mConfig;\n    private boolean mStatusBarAvailable;\n    private boolean mNavBarAvailable;\n    private boolean mStatusBarTintEnabled;\n    private boolean mNavBarTintEnabled;\n    private View mStatusBarTintView;\n    private View mNavBarTintView;\n    private static boolean sIsMiuiV6;\n\n    static {\n        try {\n            Class<?> sysClass = Class.forName(\"android.os.SystemProperties\");\n            Method getStringMethod = sysClass.getDeclaredMethod(\"get\", String.class);\n            sIsMiuiV6 = \"V6\".equals((String) getStringMethod.invoke(sysClass, \"ro.miui.ui.version.name\"));\n        } catch (Exception e) {\n            e.printStackTrace();\n        }\n    }\n\n    /**\n     * Constructor. Call this in the host activity onCreate method after its\n     * content view has been set. You should always create new instances when\n     * the host activity is recreated.\n     *\n     * @param activity The host activity.\n     */\n    @TargetApi(19)\n    public SystemBarTintManager(Activity activity) {\n\n        Window win = activity.getWindow();\n        ViewGroup decorViewGroup = (ViewGroup) win.getDecorView();\n\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n            // check theme attrs\n            int[] attrs = {android.R.attr.windowTranslucentStatus,\n                    android.R.attr.windowTranslucentNavigation};\n            TypedArray a = activity.obtainStyledAttributes(attrs);\n            try {\n                mStatusBarAvailable = a.getBoolean(0, false);\n                mNavBarAvailable = a.getBoolean(1, false);\n            } finally {\n                a.recycle();\n            }\n\n            // check window flags\n            WindowManager.LayoutParams winParams = win.getAttributes();\n            int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;\n            if ((winParams.flags & bits) != 0) {\n                mStatusBarAvailable = true;\n            }\n            bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION;\n            if ((winParams.flags & bits) != 0) {\n                mNavBarAvailable = true;\n            }\n        }\n\n        mConfig = new SystemBarConfig(activity, mStatusBarAvailable, mNavBarAvailable);\n        // device might not have virtual navigation keys\n        if (!mConfig.hasNavigtionBar()) {\n            mNavBarAvailable = false;\n        }\n\n        if (mStatusBarAvailable) {\n            setupStatusBarView(activity, decorViewGroup);\n        }\n        if (mNavBarAvailable) {\n            setupNavBarView(activity, decorViewGroup);\n        }\n\n    }\n\n    /**\n     * Enable tinting of the system status bar.\n     *\n     * If the platform is running Jelly Bean or earlier, or translucent system\n     * UI modes have not been enabled in either the theme or via window flags,\n     * then this method does nothing.\n     *\n     * @param enabled True to enable tinting, false to disable it (default).\n     */\n    public void setStatusBarTintEnabled(boolean enabled) {\n        mStatusBarTintEnabled = enabled;\n        if (mStatusBarAvailable) {\n            mStatusBarTintView.setVisibility(enabled ? View.VISIBLE : View.GONE);\n        }\n    }\n\n    /**\n     * set status bar darkmode\n     * @param darkmode\n     * @param activity\n     */\n    public void setStatusBarDarkMode(boolean darkmode, Activity activity) {\n        if (sIsMiuiV6) {\n            Class<? extends Window> clazz = activity.getWindow().getClass();\n            try {\n            int darkModeFlag = 0;\n            Class<?> layoutParams = Class.forName(\"android.view.MiuiWindowManager$LayoutParams\");\n            Field field = layoutParams.getField(\"EXTRA_FLAG_STATUS_BAR_DARK_MODE\");\n            darkModeFlag = field.getInt(layoutParams);\n            Method extraFlagField = clazz.getMethod(\"setExtraFlags\", int.class, int.class);\n            extraFlagField.invoke(activity.getWindow(), darkmode ? darkModeFlag : 0, darkModeFlag);\n            } catch (Exception e) {\n                e.printStackTrace();\n            }\n        }\n    }\n\n    /**\n     * Enable tinting of the system navigation bar.\n     *\n     * If the platform does not have soft navigation keys, is running Jelly Bean\n     * or earlier, or translucent system UI modes have not been enabled in either\n     * the theme or via window flags, then this method does nothing.\n     *\n     * @param enabled True to enable tinting, false to disable it (default).\n     */\n    public void setNavigationBarTintEnabled(boolean enabled) {\n        mNavBarTintEnabled = enabled;\n        if (mNavBarAvailable) {\n            mNavBarTintView.setVisibility(enabled ? View.VISIBLE : View.GONE);\n        }\n    }\n\n    /**\n     * Apply the specified color tint to all system UI bars.\n     *\n     * @param color The color of the background tint.\n     */\n    public void setTintColor(int color) {\n        setStatusBarTintColor(color);\n        setNavigationBarTintColor(color);\n    }\n\n    /**\n     * Apply the specified drawable or color resource to all system UI bars.\n     *\n     * @param res The identifier of the resource.\n     */\n    public void setTintResource(int res) {\n        setStatusBarTintResource(res);\n        setNavigationBarTintResource(res);\n    }\n\n    /**\n     * Apply the specified drawable to all system UI bars.\n     *\n     * @param drawable The drawable to use as the background, or null to remove it.\n     */\n    public void setTintDrawable(Drawable drawable) {\n        setStatusBarTintDrawable(drawable);\n        setNavigationBarTintDrawable(drawable);\n    }\n\n    /**\n     * Apply the specified alpha to all system UI bars.\n     *\n     * @param alpha The alpha to use\n     */\n    public void setTintAlpha(float alpha) {\n        setStatusBarAlpha(alpha);\n        setNavigationBarAlpha(alpha);\n    }\n\n    /**\n     * Apply the specified color tint to the system status bar.\n     *\n     * @param color The color of the background tint.\n     */\n    public void setStatusBarTintColor(int color) {\n        if (mStatusBarAvailable) {\n            mStatusBarTintView.setBackgroundColor(color);\n        }\n    }\n\n    /**\n     * Apply the specified drawable or color resource to the system status bar.\n     *\n     * @param res The identifier of the resource.\n     */\n    public void setStatusBarTintResource(int res) {\n        if (mStatusBarAvailable) {\n            mStatusBarTintView.setBackgroundResource(res);\n        }\n    }\n\n    /**\n     * Apply the specified drawable to the system status bar.\n     *\n     * @param drawable The drawable to use as the background, or null to remove it.\n     */\n    @SuppressWarnings(\"deprecation\")\n    public void setStatusBarTintDrawable(Drawable drawable) {\n        if (mStatusBarAvailable) {\n            mStatusBarTintView.setBackgroundDrawable(drawable);\n        }\n    }\n\n    /**\n     * Apply the specified alpha to the system status bar.\n     *\n     * @param alpha The alpha to use\n     */\n    @TargetApi(11)\n    public void setStatusBarAlpha(float alpha) {\n        if (mStatusBarAvailable && Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {\n            mStatusBarTintView.setAlpha(alpha);\n        }\n    }\n\n    /**\n     * Apply the specified color tint to the system navigation bar.\n     *\n     * @param color The color of the background tint.\n     */\n    public void setNavigationBarTintColor(int color) {\n        if (mNavBarAvailable) {\n            mNavBarTintView.setBackgroundColor(color);\n        }\n    }\n\n    /**\n     * Apply the specified drawable or color resource to the system navigation bar.\n     *\n     * @param res The identifier of the resource.\n     */\n    public void setNavigationBarTintResource(int res) {\n        if (mNavBarAvailable) {\n            mNavBarTintView.setBackgroundResource(res);\n        }\n    }\n\n    /**\n     * Apply the specified drawable to the system navigation bar.\n     *\n     * @param drawable The drawable to use as the background, or null to remove it.\n     */\n    @SuppressWarnings(\"deprecation\")\n    public void setNavigationBarTintDrawable(Drawable drawable) {\n        if (mNavBarAvailable) {\n            mNavBarTintView.setBackgroundDrawable(drawable);\n        }\n    }\n\n    /**\n     * Apply the specified alpha to the system navigation bar.\n     *\n     * @param alpha The alpha to use\n     */\n    @TargetApi(11)\n    public void setNavigationBarAlpha(float alpha) {\n        if (mNavBarAvailable && Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {\n            mNavBarTintView.setAlpha(alpha);\n        }\n    }\n\n    /**\n     * Get the system bar configuration.\n     *\n     * @return The system bar configuration for the current device configuration.\n     */\n    public SystemBarConfig getConfig() {\n        return mConfig;\n    }\n\n    /**\n     * Is tinting enabled for the system status bar?\n     *\n     * @return True if enabled, False otherwise.\n     */\n    public boolean isStatusBarTintEnabled() {\n        return mStatusBarTintEnabled;\n    }\n\n    /**\n     * Is tinting enabled for the system navigation bar?\n     *\n     * @return True if enabled, False otherwise.\n     */\n    public boolean isNavBarTintEnabled() {\n        return mNavBarTintEnabled;\n    }\n\n    private void setupStatusBarView(Context context, ViewGroup decorViewGroup) {\n        mStatusBarTintView = new View(context);\n        LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, mConfig.getStatusBarHeight());\n        params.gravity = Gravity.TOP;\n        if (mNavBarAvailable && !mConfig.isNavigationAtBottom()) {\n            params.rightMargin = mConfig.getNavigationBarWidth();\n        }\n        mStatusBarTintView.setLayoutParams(params);\n        mStatusBarTintView.setBackgroundColor(DEFAULT_TINT_COLOR);\n        mStatusBarTintView.setVisibility(View.GONE);\n        decorViewGroup.addView(mStatusBarTintView);\n    }\n\n    private void setupNavBarView(Context context, ViewGroup decorViewGroup) {\n        mNavBarTintView = new View(context);\n        LayoutParams params;\n        if (mConfig.isNavigationAtBottom()) {\n            params = new LayoutParams(LayoutParams.MATCH_PARENT, mConfig.getNavigationBarHeight());\n            params.gravity = Gravity.BOTTOM;\n        } else {\n            params = new LayoutParams(mConfig.getNavigationBarWidth(), LayoutParams.MATCH_PARENT);\n            params.gravity = Gravity.RIGHT;\n        }\n        mNavBarTintView.setLayoutParams(params);\n        mNavBarTintView.setBackgroundColor(DEFAULT_TINT_COLOR);\n        mNavBarTintView.setVisibility(View.GONE);\n        decorViewGroup.addView(mNavBarTintView);\n    }\n\n    /**\n     * Class which describes system bar sizing and other characteristics for the current\n     * device configuration.\n     *\n     */\n    public static class SystemBarConfig {\n\n        private static final String STATUS_BAR_HEIGHT_RES_NAME = \"status_bar_height\";\n        private static final String NAV_BAR_HEIGHT_RES_NAME = \"navigation_bar_height\";\n        private static final String NAV_BAR_HEIGHT_LANDSCAPE_RES_NAME = \"navigation_bar_height_landscape\";\n        private static final String NAV_BAR_WIDTH_RES_NAME = \"navigation_bar_width\";\n\n        private final boolean mTranslucentStatusBar;\n        private final boolean mTranslucentNavBar;\n        private final int mStatusBarHeight;\n        private final int mActionBarHeight;\n        private final boolean mHasNavigationBar;\n        private final int mNavigationBarHeight;\n        private final int mNavigationBarWidth;\n        private final boolean mInPortrait;\n        private final float mSmallestWidthDp;\n\n        private SystemBarConfig(Activity activity, boolean translucentStatusBar, boolean traslucentNavBar) {\n            Resources res = activity.getResources();\n            mInPortrait = (res.getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT);\n            mSmallestWidthDp = getSmallestWidthDp(activity);\n            mStatusBarHeight = getInternalDimensionSize(res, STATUS_BAR_HEIGHT_RES_NAME);\n            mActionBarHeight = getActionBarHeight(activity);\n            mNavigationBarHeight = getNavigationBarHeight(activity);\n            mNavigationBarWidth = getNavigationBarWidth(activity);\n            mHasNavigationBar = (mNavigationBarHeight > 0);\n            mTranslucentStatusBar = translucentStatusBar;\n            mTranslucentNavBar = traslucentNavBar;\n        }\n\n        @TargetApi(14)\n        private int getActionBarHeight(Context context) {\n            int result = 0;\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n                TypedValue tv = new TypedValue();\n                context.getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true);\n                result = context.getResources().getDimensionPixelSize(tv.resourceId);\n            }\n            return result;\n        }\n\n        @TargetApi(14)\n        private int getNavigationBarHeight(Context context) {\n            Resources res = context.getResources();\n            int result = 0;\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n                if (!ViewConfiguration.get(context).hasPermanentMenuKey()) {\n                    String key;\n                    if (mInPortrait) {\n                        key = NAV_BAR_HEIGHT_RES_NAME;\n                    } else {\n                        key = NAV_BAR_HEIGHT_LANDSCAPE_RES_NAME;\n                    }\n                    return getInternalDimensionSize(res, key);\n                }\n            }\n            return result;\n        }\n\n        @TargetApi(14)\n        private int getNavigationBarWidth(Context context) {\n            Resources res = context.getResources();\n            int result = 0;\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n                if (!ViewConfiguration.get(context).hasPermanentMenuKey()) {\n                    return getInternalDimensionSize(res, NAV_BAR_WIDTH_RES_NAME);\n                }\n            }\n            return result;\n        }\n\n        private int getInternalDimensionSize(Resources res, String key) {\n            int result = 0;\n            int resourceId = res.getIdentifier(key, \"dimen\", \"android\");\n            if (resourceId > 0) {\n                result = res.getDimensionPixelSize(resourceId);\n            }\n            return result;\n        }\n\n        @SuppressLint(\"NewApi\")\n        private float getSmallestWidthDp(Activity activity) {\n            DisplayMetrics metrics = new DisplayMetrics();\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n                activity.getWindowManager().getDefaultDisplay().getRealMetrics(metrics);\n            } else {\n                // TODO this is not correct, but we don't really care pre-kitkat\n                activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);\n            }\n            float widthDp = metrics.widthPixels / metrics.density;\n            float heightDp = metrics.heightPixels / metrics.density;\n            return Math.min(widthDp, heightDp);\n        }\n\n        /**\n         * Should a navigation bar appear at the bottom of the screen in the current\n         * device configuration? A navigation bar may appear on the right side of\n         * the screen in certain configurations.\n         *\n         * @return True if navigation should appear at the bottom of the screen, False otherwise.\n         */\n        public boolean isNavigationAtBottom() {\n            return (mSmallestWidthDp >= 600 || mInPortrait);\n        }\n\n        /**\n         * Get the height of the system status bar.\n         *\n         * @return The height of the status bar (in pixels).\n         */\n        public int getStatusBarHeight() {\n            return mStatusBarHeight;\n        }\n\n        /**\n         * Get the height of the action bar.\n         *\n         * @return The height of the action bar (in pixels).\n         */\n        public int getActionBarHeight() {\n            return mActionBarHeight;\n        }\n\n        /**\n         * Does this device have a system navigation bar?\n         *\n         * @return True if this device uses soft key navigation, False otherwise.\n         */\n        public boolean hasNavigtionBar() {\n            return mHasNavigationBar;\n        }\n\n        /**\n         * Get the height of the system navigation bar.\n         *\n         * @return The height of the navigation bar (in pixels). If the device does not have\n         * soft navigation keys, this will always return 0.\n         */\n        public int getNavigationBarHeight() {\n            return mNavigationBarHeight;\n        }\n\n        /**\n         * Get the width of the system navigation bar when it is placed vertically on the screen.\n         *\n         * @return The width of the navigation bar (in pixels). If the device does not have\n         * soft navigation keys, this will always return 0.\n         */\n        public int getNavigationBarWidth() {\n            return mNavigationBarWidth;\n        }\n\n        /**\n         * Get the layout inset for any system UI that appears at the top of the screen.\n         *\n         * @param withActionBar True to include the height of the action bar, False otherwise.\n         * @return The layout inset (in pixels).\n         */\n        public int getPixelInsetTop(boolean withActionBar) {\n            return (mTranslucentStatusBar ? mStatusBarHeight : 0) + (withActionBar ? mActionBarHeight : 0);\n        }\n\n        /**\n         * Get the layout inset for any system UI that appears at the bottom of the screen.\n         *\n         * @return The layout inset (in pixels).\n         */\n        public int getPixelInsetBottom() {\n            if (mTranslucentNavBar && isNavigationAtBottom()) {\n                return mNavigationBarHeight;\n            } else {\n                return 0;\n            }\n        }\n\n        /**\n         * Get the layout inset for any system UI that appears at the right of the screen.\n         *\n         * @return The layout inset (in pixels).\n         */\n        public int getPixelInsetRight() {\n            if (mTranslucentNavBar && !isNavigationAtBottom()) {\n                return mNavigationBarWidth;\n            } else {\n                return 0;\n            }\n        }\n\n    }\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/chart/Util.java",
    "content": "package com.cwp.chart;\n\nimport android.os.Build;\n\npublic class Util {\n\n    static final boolean IS_JBMR2 = Build.VERSION.SDK_INT == Build.VERSION_CODES.JELLY_BEAN_MR2;\n    static final boolean IS_ISC = Build.VERSION.SDK_INT == Build.VERSION_CODES.ICE_CREAM_SANDWICH;\n    static final boolean IS_GINGERBREAD_MR1 = Build.VERSION.SDK_INT == Build.VERSION_CODES.GINGERBREAD_MR1;\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/About.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport com.cwp.chart.SystemBarTintManager;\nimport com.cwp.pattern.GuideGesturePasswordActivity;\nimport com.cwp.pattern.UnlockGesturePasswordActivity;\nimport com.cwp.pattern.UpdateManager;\nimport com.umeng.fb.example.CustomActivity;\n\nimport cwp.moneycharge.dao.AccountDAO;\nimport cwp.moneycharge.dao.IncomeDAO;\nimport cwp.moneycharge.dao.ItypeDAO;\nimport cwp.moneycharge.dao.NoteDAO;\nimport cwp.moneycharge.dao.PayDAO;\nimport cwp.moneycharge.dao.PtypeDAO;\nimport cwp.moneycharge.model.ActivityManager;\nimport cwp.moneycharge.model.CustomDialog;\nimport android.annotation.TargetApi;\nimport android.app.Activity;\nimport android.app.Dialog;\nimport android.content.Context;\nimport android.content.DialogInterface;\nimport android.content.Intent;\nimport android.content.SharedPreferences;\nimport android.content.SharedPreferences.Editor;\nimport android.content.pm.PackageInfo;\nimport android.content.pm.PackageManager.NameNotFoundException;\nimport android.os.Build;\nimport android.os.Bundle;\nimport android.os.StrictMode;\nimport android.preference.PreferenceManager;\nimport android.view.KeyEvent;\nimport android.view.View;\nimport android.view.Window;\nimport android.view.WindowManager;\nimport android.view.View.OnClickListener;\nimport android.view.View.OnFocusChangeListener;\nimport android.widget.TableRow;\nimport android.widget.TextView;\nimport android.widget.Toast;\n\npublic class About extends Activity {\n\tTextView usernow, countuser, countpay, countincome, sendlog, gesturepw,\n\t\t\tgesturepwmdtext, gesturepwcleartext;\n\tTableRow author, description, gesturepwmd;\n\tIntent intentr;\n\tint userid;\n\tAccountDAO accountDAO = new AccountDAO(About.this);\n\tPayDAO payDAO = new PayDAO(About.this);\n\tIncomeDAO incomeDAO = new IncomeDAO(About.this);\n\tNoteDAO noteDAO = new NoteDAO(About.this);\n\tstatic SharedPreferences sp;\n\tEditor edit;\n\tprivate final int REQUESTCODE = 1; // 返回的结果码\n\tprivate TextView app_version;\n\tprivate TextView updateapp;\n\tprivate TextView feedback;\n\n\tpublic About() {\n\n\t}\n\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.about);\n\n\t\tSysApplication.getInstance().addActivity(this); // 在销毁队列中添加this\n\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n\t\t\tsetTranslucentStatus(true);\n\t\t\tfindViewById(R.id.about_top).setVisibility(View.VISIBLE);\n\t\t}\n\t\tSystemBarTintManager mTintManager = new SystemBarTintManager(this);\n\t\tmTintManager.setStatusBarTintEnabled(true);\n\t\tmTintManager.setStatusBarTintResource(R.color.statusbar_bg);\n\n\t\tusernow = (TextView) findViewById(R.id.useracc);\n\t\tcountpay = (TextView) findViewById(R.id.countpay);\n\t\tcountuser = (TextView) findViewById(R.id.countuser);\n\t\tcountincome = (TextView) findViewById(R.id.countincome);\n\t\tdescription = (TableRow) findViewById(R.id.description);\n\t\tsendlog = (TextView) findViewById(R.id.sendlog);\n\t\tgesturepw = (TextView) findViewById(R.id.gesturepw);\n\t\tgesturepwmd = (TableRow) findViewById(R.id.gesturepwmd);\n\t\tgesturepwmdtext = (TextView) findViewById(R.id.gesturepwmdtext);\n\t\tapp_version = (TextView) findViewById(R.id.app_version);\n\t\tupdateapp = (TextView) findViewById(R.id.updateapp);\n\t\tfeedback = (TextView) findViewById(R.id.feedback);\n\t\tsp = this.getSharedPreferences(\"preferences\", MODE_WORLD_READABLE);\n\t\tedit = sp.edit();\n\t}\n\n\t@TargetApi(19)\n\tprivate void setTranslucentStatus(boolean on) {\n\t\tWindow win = getWindow();\n\t\tWindowManager.LayoutParams winParams = win.getAttributes();\n\t\tfinal int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;\n\t\tif (on) {\n\t\t\twinParams.flags |= bits;\n\t\t} else {\n\t\t\twinParams.flags &= ~bits;\n\t\t}\n\t\twin.setAttributes(winParams);\n\t}\n\n\t@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tintentr = getIntent();\n\t\tuserid = intentr.getIntExtra(\"cwp.id\", 100000001);\n\t\tif (userid == 100000001)\n\t\t\tusernow.setText(\"默认用户\");\n\t\telse {\n\t\t\tusernow.setText(accountDAO.find(userid));\n\t\t}\n\t\tapp_version.setText(getVersion(this));\n\n\t\tfeedback.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(About.this, CustomActivity.class);\n\t\t\t\t// intent.putExtra(\"cwp.md\", \"md\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\n\t\tupdateapp.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tUpdateManager manager = new UpdateManager(About.this);\n\t\t\t\t// 检查软件更新\n\t\t\t\tmanager.checkUpdate(\"show\");\n\t\t\t}\n\t\t});\n\n\t\tclass OnClickListenermd implements OnClickListener { // 修改密码\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(About.this,\n\t\t\t\t\t\tUnlockGesturePasswordActivity.class);\n\t\t\t\tintent.putExtra(\"cwp.md\", \"md\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t}\n\n\t\tif (sp.getString(\"gesturepw\", \"\").equals(\"关\")\n\t\t\t\t|| sp.getString(\"gesturepw\", \"\").equals(\"\")) {\n\t\t\tgesturepw.setText(\"关\");\n\t\t} else {\n\t\t\tgesturepw.setText(\"开\");\n\t\t\tgesturepwmd.setVisibility(View.VISIBLE);\n\t\t\tif (CrashApplication.getInstance().getLockPatternUtils()\n\t\t\t\t\t.savedPatternExists()) {\n\t\t\t\tgesturepwmd.setOnClickListener(new OnClickListenermd()); // 修改密码\n\t\t\t}\n\t\t}\n\n\t\tif (sp.getString(\"sendlog\", \"\").equals(\"关\")\n\t\t\t\t|| sp.getString(\"sendlog\", \"\").equals(\"\")) {\n\t\t\tsendlog.setText(\"关\");\n\t\t} else {\n\t\t\tsendlog.setText(\"开\");\n\t\t}\n\t\tcountuser.setText(String.valueOf(accountDAO.getCount()));\n\t\tcountpay.setText(String.valueOf(payDAO.getCount(userid)));\n\t\tcountincome.setText(String.valueOf(incomeDAO.getCount(userid)));\n\n\t\tgesturepw.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tCustomDialog.Builder customBuilder = new CustomDialog.Builder(\n\t\t\t\t\t\tAbout.this);\n\n\t\t\t\tcustomBuilder.setTitle(\"提示\"); // 创建标题\n\t\t\t\tcustomBuilder\n\t\t\t\t\t\t.setMessage(\"是否开启/关闭手势密码？\\n注意：关闭手势密码需输入原密码！\")\n\t\t\t\t\t\t.setPositiveButton(\"开启\",\n\t\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t\t\tif (!sp.getString(\"gesturepw\", \"\")\n\t\t\t\t\t\t\t\t\t\t\t\t.equals(\"开\")) {\n\t\t\t\t\t\t\t\t\t\t\tIntent intent = new Intent(\n\t\t\t\t\t\t\t\t\t\t\t\t\tAbout.this,\n\t\t\t\t\t\t\t\t\t\t\t\t\tUnlockGesturePasswordActivity.class);\n\t\t\t\t\t\t\t\t\t\t\tintent.putExtra(\"cwp.pwenable\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"enable\");\n\t\t\t\t\t\t\t\t\t\t\tstartActivityForResult(intent,\n\t\t\t\t\t\t\t\t\t\t\t\t\tREQUESTCODE); // 表示可以返回结果\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t.setNegativeButton(\"关闭\",\n\t\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t\t\tIntent intent = new Intent(\n\t\t\t\t\t\t\t\t\t\t\t\tAbout.this,\n\t\t\t\t\t\t\t\t\t\t\t\tUnlockGesturePasswordActivity.class);\n\t\t\t\t\t\t\t\t\t\tintent.putExtra(\"cwp.pwclear\", \"clear\");\n\t\t\t\t\t\t\t\t\t\tstartActivityForResult(intent,\n\t\t\t\t\t\t\t\t\t\t\t\tREQUESTCODE); // 表示可以返回结果\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\tDialog dialog = customBuilder.create();// 创建对话框\n\t\t\t\tdialog.show(); // 显示对话框\n\t\t\t}\n\t\t});\n\n\t\tsendlog.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tCustomDialog.Builder customBuilder = new CustomDialog.Builder(\n\t\t\t\t\t\tAbout.this);\n\n\t\t\t\tcustomBuilder.setTitle(\"提示\"); // 创建标题\n\t\t\t\tcustomBuilder\n\t\t\t\t\t\t.setMessage(\"是否开启/关闭发送错误日志功能？\\n注意：需退出程序重新进入完成初始化！\")\n\t\t\t\t\t\t.setPositiveButton(\"开启\",\n\t\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t\tedit.putString(\"sendlog\", \"开\");\n\t\t\t\t\t\t\t\t\t\tedit.commit();\n\t\t\t\t\t\t\t\t\t\tsendlog.setText(\"开\");\n\t\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t.setNegativeButton(\"关闭\",\n\t\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t\tedit.putString(\"sendlog\", \"关\");\n\t\t\t\t\t\t\t\t\t\tedit.commit();\n\t\t\t\t\t\t\t\t\t\tsendlog.setText(\"关\");\n\t\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\tDialog dialog = customBuilder.create();// 创建对话框\n\t\t\t\tdialog.show(); // 显示对话框\n\t\t\t}\n\t\t});\n\n\t\tdescription.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent = new Intent(About.this, Description.class);\n\t\t\t\tintent.putExtra(\"cwp.id\", userid);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\t}\n\n\t@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\n\t\tif (requestCode == REQUESTCODE) {\n\t\t\tif (resultCode == 2) {\n\t\t\t\tedit.putString(\"gesturepw\", \"关\");\n\t\t\t\tedit.commit();\n\t\t\t\tgesturepw.setText(\"关\");\n\t\t\t\tgesturepwmd.setVisibility(View.GONE);\n\t\t\t}\n\t\t\tif (resultCode == 3) {\n\t\t\t\tedit.putString(\"gesturepw\", \"开\");\n\t\t\t\tedit.commit();\n\t\t\t\tgesturepw.setText(\"开\");\n\t\t\t\tgesturepwmd.setVisibility(View.VISIBLE);\n\t\t\t}\n\t\t} else {\n\t\t\tToast.makeText(About.this, \"操作失败！\", Toast.LENGTH_LONG).show();\n\t\t}\n\t}\n\n\tpublic static String getVersion(Context context)// 获取版本号\n\t{\n\t\ttry {\n\t\t\tPackageInfo pi = context.getPackageManager().getPackageInfo(\n\t\t\t\t\tcontext.getPackageName(), 0);\n\t\t\treturn pi.versionName;\n\t\t} catch (NameNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"beta 1.0\";\n\t\t}\n\t}\n\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t\tif (keyCode == KeyEvent.KEYCODE_BACK) { // 监控/拦截/屏蔽返回键\n\t\t\tIntent intent = new Intent(About.this, MainActivity.class);\n\t\t\tintent.putExtra(\"cwp.id\", userid);\n\t\t\tintent.putExtra(\"cwp.Fragment\", \"4\");// 设置传递数据\n\t\t\tstartActivity(intent);\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onKeyDown(keyCode, event);\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/AddPay.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport java.io.IOException;\nimport java.text.DecimalFormat;\nimport java.text.SimpleDateFormat;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Calendar;\nimport java.util.Date;\nimport java.util.List;\nimport java.util.Random;\n\nimport com.amap.api.location.AMapLocation;\nimport com.amap.api.location.AMapLocationListener;\nimport com.amap.api.location.LocationManagerProxy;\nimport com.amap.api.location.LocationProviderProxy;\nimport com.baidu.voicerecognition.android.ui.BaiduASRDigitalDialog;\nimport com.baidu.voicerecognition.android.ui.DialogRecognitionListener;\nimport com.cwp.chart.SystemBarTintManager;\nimport com.cwp.cmoneycharge.Config;\nimport com.cwp.cmoneycharge.Constants;\nimport com.cwp.cmoneycharge.DigitUtil;\nimport com.cwp.cmoneycharge.Effectstype;\nimport com.cwp.cmoneycharge.KeyboardUtil;\nimport com.cwp.cmoneycharge.MainActivity;\nimport com.cwp.cmoneycharge.NiftyDialogBuilder;\nimport com.cwp.pattern.UnlockGesturePasswordActivity;\nimport com.example.testpic.Bimp;\nimport com.example.testpic.PublishedActivity;\n\nimport cwp.moneycharge.dao.IncomeDAO;\nimport cwp.moneycharge.dao.ItypeDAO;\nimport cwp.moneycharge.dao.PayDAO;\nimport cwp.moneycharge.dao.PtypeDAO;\nimport cwp.moneycharge.model.Datapicker;\nimport cwp.moneycharge.model.Tb_income;\nimport cwp.moneycharge.model.Tb_pay;\n\nimport android.annotation.SuppressLint;\nimport android.annotation.TargetApi;\nimport android.app.Activity;\nimport android.app.AlertDialog;\nimport android.app.DatePickerDialog;\nimport android.app.Dialog;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.content.SharedPreferences;\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapFactory;\nimport android.graphics.Color;\nimport android.graphics.drawable.BitmapDrawable;\nimport android.graphics.drawable.Drawable;\nimport android.location.Location;\nimport android.os.Build;\nimport android.os.Bundle;\nimport android.util.Log;\nimport android.view.KeyEvent;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.Window;\nimport android.view.WindowManager;\nimport android.view.View.OnClickListener;\nimport android.view.View.OnFocusChangeListener;\nimport android.view.View.OnTouchListener;\nimport android.view.inputmethod.InputMethodManager;\nimport android.widget.ArrayAdapter;\nimport android.widget.Button;\nimport android.widget.CompoundButton;\nimport android.widget.CompoundButton.OnCheckedChangeListener;\nimport android.widget.DatePicker;\nimport android.widget.EditText;\nimport android.widget.FrameLayout;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.RadioButton;\nimport android.widget.RelativeLayout;\nimport android.widget.RelativeLayout.LayoutParams;\nimport android.widget.Spinner;\nimport android.widget.Toast;\n\npublic class AddPay extends Activity implements AMapLocationListener,\n\t\tOnClickListener {\n\tprotected static final int DATE_DIALOG_ID = 0;// 创建日期对话框常量\n\tstatic String type = \"pay\";\n\tString VoiceDefault = \"\";\n\tprotected static String typemode = \"add\";\n\tEditText txtMoney, txtTime, txtAddress, txtMark;// 创建EditText对象\n\tSpinner spType;// 创建Spinner对象\n\tButton btnSaveButton;// 创建Button对象“保存”\n\tButton btnCancelButton;// 创建Button对象“取消”\n\tButton btnVoice;// 创建Button对象“语音识别”\n\tint userid;\n\tint Selection = 0;\n\tBundle bundle = null;\n\tString[] strInfos = null;// 定义字符串数组\n\tString strno, strType;// 定义两个字符串变量，分别用来记录信息编号和管理类型\n\tprivate FrameLayout corporation_fl, address_fl = null;\n\tprivate RadioButton rb1 = null;\n\tprivate RadioButton rb2 = null;\n\tImageView left_back;\n\n\tprivate BaiduASRDigitalDialog mDialog = null; // 百度语音定义\n\tprivate DialogRecognitionListener mRecognitionListener;\n\tprivate int mCurrentTheme = Config.DIALOG_THEME;\n\tprivate Effectstype effect; // 自定义Dialog\n\tNiftyDialogBuilder dialogBuilder = null;\n\tBoolean firstin = true;\n\n\tprivate int mYear;// 年\n\tprivate int mMonth;// 月\n\tprivate int mDay;// 日\n\n\tprivate ArrayAdapter<String> adapter;\n\tprivate String[] spdata;\n\n\tprivate LocationManagerProxy mLocationManagerProxy;// 高德地图api\n\tprivate Random mRandom = new Random();\n\n\tString[] number = { \"一\", \"二\", \"两\", \"三\", \"四\", \"五\", \"六\", \"七\", \"八\", \"九\", \"十\" };\n\tString[] money = { \"元\", \"块\", \"钱\" };\n\tString[] money2 = { \"十\", \"百\", \"千\", \"万\", \"亿\" };\n\tString[] voice_pay = { \"买\", \"吃\" };\n\tString[] voice_income = { \"卖\", \"获\" };\n\n\tString[] VoiceSave = new String[6];\n\tstatic DialogShowUtil dialogShowUtil;\n\tPtypeDAO ptypeDAO = new PtypeDAO(AddPay.this);\n\tItypeDAO itypeDAO = new ItypeDAO(AddPay.this);\n\tPayDAO payDAO = new PayDAO(AddPay.this);// 创建PayDAO对象\n\tIncomeDAO incomeDAO = new IncomeDAO(AddPay.this);// 创建IncomeDAO对象\n\tList<String> spdatalist, spdatalist2;\n\tprivate SystemBarTintManager mTintManager;\n\tprivate ImageView btn_loacte;\n\tprivate ImageView addphoto;\n\tprotected String textphoto = \"\";\n\tprivate int incount = 0;\n\tprivate boolean keycount = true;\n\tprivate FrameLayout bottom_empty;\n\tprivate LinearLayout bottom_full;\n\tprivate KeyboardUtil keyBoard;\n\n\tpublic AddPay() {\n\n\t}\n\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.add);// 设置布局文件\n\n\t\tSysApplication.getInstance().addActivity(this); // 在销毁队列中添加this\n\t\tsuper.onStart();// 实现基类中的方法\n\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n\t\t\tsetTranslucentStatus(true);\n\t\t\tfindViewById(R.id.top).setVisibility(View.VISIBLE);\n\t\t}\n\t\tmTintManager = new SystemBarTintManager(this);\n\t\tmTintManager.setStatusBarTintEnabled(true);\n\t\tmTintManager.setStatusBarTintResource(R.color.statusbar_bg);\n\n\t\ttxtMoney = (EditText) findViewById(R.id.txtMoney);// 获取金额文本框\n\t\ttxtTime = (EditText) findViewById(R.id.txtTime);// 获取时间文本框\n\t\ttxtAddress = (EditText) findViewById(R.id.txtAddress);// 获取地点文本框\n\t\ttxtMark = (EditText) findViewById(R.id.txtMark);// 获取备注文本框\n\t\tspType = (Spinner) findViewById(R.id.spType);// 获取类别下拉列表\n\t\tbtnSaveButton = (Button) findViewById(R.id.btnSave);// 获取保存按钮\n\t\tbtnCancelButton = (Button) findViewById(R.id.btnCancel);// 获取取消按钮\n\t\tbtnVoice = (Button) findViewById(R.id.btnVoice);// 获取语音识别按钮\n\t\trb1 = (RadioButton) findViewById(R.id.payout_tab_rb);\n\t\trb2 = (RadioButton) findViewById(R.id.income_tab_rb);\n\t\tleft_back = (ImageView) findViewById(R.id.example_left3);\n\t\tbtn_loacte = (ImageView) findViewById(R.id.btn_loacte);\n\t\taddphoto = (ImageView) findViewById(R.id.addphoto);\n\t\tbottom_empty = (FrameLayout) findViewById(R.id.bottom_empty);\n\t\tbottom_full = (LinearLayout) findViewById(R.id.bottom_full);\n\n\t\tdialogShowUtil = new DialogShowUtil(this, this, VoiceSave, type, // 初始化dialog\n\t\t\t\tVoiceDefault);\n\t\tbtn_loacte.setOnClickListener(this); // 定位\n\n\t\t// 隐藏菜单\n\t\tbottom_empty.setOnClickListener(new OnClickListener() {\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tkeyBoard.hideKeyboard();\n\t\t\t\tbottom_empty.setVisibility(View.GONE);\n\t\t\t\tbottom_full.setVisibility(View.VISIBLE);\n\t\t\t}\n\t\t});\n\n\t\t// 添加图片\n\t\taddphoto.setOnClickListener(new OnClickListener() {\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(AddPay.this, PublishedActivity.class);\n\t\t\t\tintent.putExtra(\"cwp.id\", userid);\n\t\t\t\tstartActivityForResult(intent, 102);\n\t\t\t}\n\t\t});\n\n\t\t// 初始化定位，只采用网络定位\n\t\tmLocationManagerProxy = LocationManagerProxy.getInstance(this);\n\t\tmLocationManagerProxy.setGpsEnable(false);\n\t\t// 此方法为每隔固定时间会发起一次定位请求，为了减少电量消耗或网络流量消耗，\n\t\t// 注意设置合适的定位时间的间隔（最小间隔支持为2000ms），并且在合适时间调用removeUpdates()方法来取消定位请求\n\t\t// 在定位结束后，在合适的生命周期调用destroy()方法\n\t\t// 其中如果间隔时间为-1，则定位只定一次,\n\t\t// 在单次定位情况下，定位无论成功与否，都无需调用removeUpdates()方法移除请求，定位sdk内部会移除\n\n\t\tleft_back.setOnClickListener(new OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = null;\n\t\t\t\ttype = \"pay\";\n\t\t\t\ttypemode = \"add\";\n\t\t\t\tif (bundle.containsKey(\"cwp.frament3\")) {\n\t\t\t\t\tintent = new Intent(AddPay.this, MainActivity.class);\n\t\t\t\t\tintent.putExtra(\"cwp.Fragment\", \"3\");// 设置传递数据\n\t\t\t\t} else {\n\t\t\t\t\tintent = new Intent(AddPay.this, MainActivity.class);\n\t\t\t\t}\n\t\t\t\tintent.putExtra(\"cwp.id\", userid);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();// 这个是关键\n\t\t\t}\n\t\t});\n\n\t\tmRecognitionListener = new DialogRecognitionListener() { // 百度识别返回数据\n\n\t\t\t@Override\n\t\t\tpublic void onResults(Bundle results) {\n\t\t\t\tArrayList<String> rs = results != null ? results\n\t\t\t\t\t\t.getStringArrayList(RESULTS_RECOGNITION) : null;\n\t\t\t\tif (rs != null && rs.size() > 0) {\n\t\t\t\t\tRecognition(rs.get(0)); // 把识别数据传入识别方法\n\t\t\t\t\t// Toast.makeText(AddPay.this, rs.get(0),\n\t\t\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tcorporation_fl = (FrameLayout) findViewById(R.id.corporation_fl);\n\t\taddress_fl = (FrameLayout) findViewById(R.id.address_fl);\n\n\t\trb1.setOnCheckedChangeListener(new OnCheckedChangeListener() {\n\t\t\t@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView,\n\t\t\t\t\tboolean isChecked) {\n\n\t\t\t\tif (rb1.isChecked()) { // 支出\n\t\t\t\t\ttype = \"pay\";\n\t\t\t\t} else // 收入\n\t\t\t\t{\n\t\t\t\t\ttype = \"income\";\n\t\t\t\t}\n\t\t\t\tupdatetype();\n\t\t\t}\n\t\t});\n\n\t\tfinal Calendar c = Calendar.getInstance();// 获取当前系统日期\n\t\tmYear = c.get(Calendar.YEAR);// 获取年份\n\t\tmMonth = c.get(Calendar.MONTH);// 获取月份\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);// 获取天数\n\t}\n\n\t@TargetApi(19)\n\tprivate void setTranslucentStatus(boolean on) {\n\t\tWindow win = getWindow();\n\t\tWindowManager.LayoutParams winParams = win.getAttributes();\n\t\tfinal int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;\n\t\tif (on) {\n\t\t\twinParams.flags |= bits;\n\t\t} else {\n\t\t\twinParams.flags &= ~bits;\n\t\t}\n\t\twin.setAttributes(winParams);\n\t}\n\n\tprivate void initData(int userid) { // 初始化数据\n\t\tif (typemode == \"add\") { // 添加模式\n\t\t\tif (type == \"pay\") { // 支出\n\t\t\t\trb1.setChecked(true);\n\t\t\t\tspdatalist = ptypeDAO.getPtypeName(userid);\n\t\t\t\ttxtMoney.setTextColor(Color.parseColor(\"#5ea98d\"));\n\t\t\t} else { // 收入\n\t\t\t\trb2.setChecked(true);\n\t\t\t\tspdatalist = itypeDAO.getItypeName(userid);\n\t\t\t\ttxtMoney.setTextColor(Color.parseColor(\"#ffff0000\"));\n\t\t\t}\n\t\t} else { // 修改模式\n\t\t\tbottom_empty.setVisibility(View.GONE);\n\t\t\tbottom_full.setVisibility(View.VISIBLE);\n\t\t\trb1.setOnCheckedChangeListener(null);\n\t\t\tbtnSaveButton.setText(\"修改\"); // 替换修改按钮\n\t\t\tbtnCancelButton.setText(\"删除\"); // 替换删除按钮\n\t\t\tCharSequence textreAddres;\n\t\t\tString textreMark;\n\t\t\tif (type == \"pay\") { // 支出\n\t\t\t\trb1.setChecked(true);\n\t\t\t\trb1.setClickable(false);\n\t\t\t\trb2.setClickable(false);\n\t\t\t\t// 选择列表初始化\n\t\t\t\tspdatalist = ptypeDAO.getPtypeName(userid);\n\t\t\t\t// 根据编号查找支出信息，并存储到Tb_pay对象中\n\t\t\t\tTb_pay tb_pay = payDAO.find(userid, Integer.parseInt(strno));\n\t\t\t\ttxtMoney.setText(tb_pay.getMoney2());// 显示金额\n\t\t\t\ttxtMoney.setTextColor(Color.parseColor(\"#5ea98d\"));\n\t\t\t\ttxtTime.setText(tb_pay.getTime());// 显示时间\n\t\t\t\tSelection = tb_pay.getType() - 1;\n\t\t\t\tinitphotodata(tb_pay.getPhoto());\n\t\t\t\ttextreAddres = tb_pay.getAddress();\n\t\t\t\ttextreMark = tb_pay.getMark();\n\t\t\t\ttxtAddress.setText(textreAddres);// 显示地点\n\t\t\t\ttxtMark.setText(textreMark);// 显示备注\n\t\t\t} else { // 收入\n\t\t\t\t// 选择列表初始化\n\t\t\t\trb2.setChecked(true);\n\t\t\t\trb1.setClickable(false);\n\t\t\t\trb2.setClickable(false);\n\t\t\t\tspdatalist = itypeDAO.getItypeName(userid);\n\t\t\t\t// 根据编号查找收入信息，并存储到Tb_pay对象中\n\t\t\t\tTb_income tb_income = incomeDAO.find(userid,\n\t\t\t\t\t\tInteger.parseInt(strno));\n\t\t\t\ttxtMoney.setText(tb_income.getMoney2());// 显示金额\n\t\t\t\ttxtMoney.setTextColor(Color.parseColor(\"#ffff0000\"));\n\t\t\t\ttxtTime.setText(tb_income.getTime());// 显示时间\n\t\t\t\tSelection = tb_income.getType() - 1; // 显示类别\n\t\t\t\tinitphotodata(tb_income.getPhoto());\n\t\t\t\ttextreAddres = tb_income.getHandler();\n\t\t\t\ttextreMark = tb_income.getMark();\n\t\t\t\ttxtAddress.setText(textreAddres);// 显示地点\n\t\t\t\ttxtMark.setText(textreMark);// 显示备注\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate void initphotodata(String photo) { // 初始化图片数据\n\t\tif ((incount == 0) && (!photo.equals(\"\"))) {\n\t\t\tString[] photoall = photo.split(\",\");\n\t\t\tfor (int i = 0; i < photoall.length / 2; i++) {\n\t\t\t\tif (Bimp.drr.size() < 9) {\n\t\t\t\t\tBimp.drr.add(photoall[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int i = photoall.length / 2; i < photoall.length; i++) {\n\t\t\t\tif (Bimp.smdrr.size() < 9) {\n\t\t\t\t\tBimp.smdrr.add(photoall[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttextphoto = photo;\n\t\t\tinitphoto();\n\t\t\tincount++;\n\t\t}\n\t}\n\n\t@SuppressWarnings(\"deprecation\")\n\tprivate void initphoto() {// 初始化图片\n\t\ttry {\n\t\t\tif (textphoto.equals(\"\")) {\n\t\t\t\taddphoto.setImageResource(R.drawable.addphoto_btn);\n\t\t\t} else if (Bimp.getbitmap(Bimp.smdrr.get(0)) == null) {\n\t\t\t\tToast.makeText(AddPay.this, \"图片不存在\", Toast.LENGTH_SHORT).show();\n\t\t\t} else {\n\t\t\t\taddphoto.setImageBitmap(Bimp.getbitmap(Bimp.smdrr.get(0)));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\n\tprivate void updatetype() { // 更新类别\n\t\tinitData(userid);\n\t\tspdata = spdatalist.toArray(new String[spdatalist.size()]);// 在tb_itype中按用户id读取\n\t\tadapter = new ArrayAdapter<String>(AddPay.this, R.layout.spinner,\n\t\t\t\tspdata); // 动态生成收入类型列表\n\t\tspType.setAdapter(adapter);\n\t\tif (Selection > 0) {\n\t\t\tspType.setSelection(Selection);// 显示类别\n\t\t}\n\t}\n\n\t@Override\n\tprotected void onStart() { // 复写onstart\n\t\tsuper.onStart();// 实现基类中的方法\n\t\tupdateDisplay();// 显示当前系统时间\n\n\t\tIntent intentr = getIntent();\n\t\tuserid = intentr.getIntExtra(\"cwp.id\", 100000001);\n\t\tbundle = intentr.getExtras();// 获取传入的数据，并使用Bundle记录\n\t\tif (bundle.containsKey(\"cwp.message\")) {\n\t\t\tstrInfos = bundle.getStringArray(\"cwp.message\");// 获取Bundle中记录的信息\n\t\t\tstrno = strInfos[0];// 记录id\n\t\t\tstrType = strInfos[1];// 记录类型\n\t\t\ttypemode = \"ModifyInP\";\n\t\t\tif (strType.equals(\"btnininfo\")) { // 收入\n\t\t\t\ttype = \"income\";\n\t\t\t} else {\n\t\t\t\ttype = \"pay\";\n\t\t\t}\n\t\t}\n\t\tkeyBoard = new KeyboardUtil(this, this, txtMoney, typemode); // 数字软键盘\n\t\tif (bundle.containsKey(\"cwp.voice\")) { // 进来调用语音记账\n\t\t\tif (firstin) {\n\t\t\t\tbottom_empty.setVisibility(View.GONE);\n\t\t\t\tbottom_full.setVisibility(View.VISIBLE);\n\t\t\t\tdialogShowUtil.dialogShow(\"rotatebottom\", \"first\", \"\", \"\");\n\t\t\t\tfirstin = false;\n\t\t\t}\n\t\t}\n\t\tif (bundle.containsKey(\"cwp.photo\")) {// 进来调用拍照\n\t\t\tif (firstin) {\n\t\t\t\tbottom_empty.setVisibility(View.GONE);\n\t\t\t\tbottom_full.setVisibility(View.VISIBLE);\n\t\t\t\tIntent intent = new Intent(AddPay.this, PublishedActivity.class);\n\t\t\t\tintent.putExtra(\"cwp.id\", userid);\n\t\t\t\tintent.putExtra(\"cwp.photo\", \"photo\");\n\t\t\t\tstartActivityForResult(intent, 102);\n\t\t\t\tfirstin = false;\n\t\t\t}\n\t\t}\n\t\tif (bundle.containsKey(\"keyboard\")) { // 进来显示键盘\n\t\t\tif (keycount) {\n\t\t\t\tInputMethodManager imm = (InputMethodManager) getSystemService(AddPay.this.INPUT_METHOD_SERVICE); // 显示键盘\n\t\t\t\timm.hideSoftInputFromWindow(txtMoney.getWindowToken(), 0); // 隐藏键盘　\n\t\t\t\tkeyBoard.showKeyboard();\n\t\t\t\tkeycount = false;\n\t\t\t}\n\t\t}\n\t\tupdatetype();\n\t\ttxtTime.setOnTouchListener(new OnTouchListener() { // 为时间文本框设置单击监听事件\n\t\t\t@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\n\t\t\t\tshowDialog(DATE_DIALOG_ID);// 显示日期选择对话框\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\n\t\ttxtMoney.setOnTouchListener(new OnTouchListener() { // 数字软键盘监听\n\t\t\t@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\tInputMethodManager imm = (InputMethodManager) getSystemService(AddPay.this.INPUT_METHOD_SERVICE); // 显示键盘\n\t\t\t\timm.hideSoftInputFromWindow(txtMoney.getWindowToken(), 0); // 隐藏键盘　\n\t\t\t\tkeyBoard.showKeyboard();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\n\t\tbtnVoice.setOnClickListener(new OnClickListener() {// 语音识别监听\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialogShowUtil.dialogShow(\"rotatebottom\", \"first\", \"\", \"\");\n\t\t\t}\n\t\t});\n\n\t\tbtnSaveButton.setOnClickListener(new OnClickListener() {// 为保存按钮设置监听事件\n\t\t\t\t\tprivate String textreAddres;\n\t\t\t\t\tprivate String textreMark;\n\n\t\t\t\t\t@SuppressLint(\"NewApi\")\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\ttextreAddres = txtAddress.getText().toString();\n\t\t\t\t\t\ttextreMark = txtMark.getText().toString();\n\t\t\t\t\t\tif (textphoto == null) {\n\t\t\t\t\t\t\ttextphoto = \"\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (typemode == \"add\") { // 添加模式\n\t\t\t\t\t\t\tString strMoney = txtMoney.getText().toString();// 获取金额文本框的值\n\t\t\t\t\t\t\tif (type == \"pay\") { // 支出\n\t\t\t\t\t\t\t\tif (!strMoney.isEmpty()) {// 判断金额不为空\n\t\t\t\t\t\t\t\t\t// 创建InaccountDAO对象\n\t\t\t\t\t\t\t\t\tPayDAO payDAO = new PayDAO(AddPay.this);\n\t\t\t\t\t\t\t\t\t// 创建Tb_inaccount对象\n\t\t\t\t\t\t\t\t\tTb_pay tb_pay = new Tb_pay(\n\t\t\t\t\t\t\t\t\t\t\tuserid,\n\t\t\t\t\t\t\t\t\t\t\tpayDAO.getMaxNo(userid) + 1,\n\t\t\t\t\t\t\t\t\t\t\tget2Double(strMoney),\n\t\t\t\t\t\t\t\t\t\t\tsetTimeFormat(null),\n\t\t\t\t\t\t\t\t\t\t\t(spType.getSelectedItemPosition() + 1),\n\t\t\t\t\t\t\t\t\t\t\ttextreAddres, textreMark, textphoto);\n\t\t\t\t\t\t\t\t\tpayDAO.add(tb_pay);// 添加收入信息\n\t\t\t\t\t\t\t\t\tToast.makeText(AddPay.this,\n\t\t\t\t\t\t\t\t\t\t\t\"〖新增收入〗数据添加成功！\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t\t\t\t.show();\n\t\t\t\t\t\t\t\t\tgotoback();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tToast.makeText(AddPay.this, \"请输入收入金额！\",\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // 收入\n\t\t\t\t\t\t\t\tif (!strMoney.isEmpty()) {// 判断金额不为空\n\t\t\t\t\t\t\t\t\t// 创建InaccountDAO对象\n\t\t\t\t\t\t\t\t\tIncomeDAO incomeDAO = new IncomeDAO(\n\t\t\t\t\t\t\t\t\t\t\tAddPay.this);\n\t\t\t\t\t\t\t\t\t// 创建Tb_inaccount对象\n\t\t\t\t\t\t\t\t\tTb_income tb_income = new Tb_income(\n\t\t\t\t\t\t\t\t\t\t\tuserid,\n\t\t\t\t\t\t\t\t\t\t\tpayDAO.getMaxNo(userid) + 1,\n\t\t\t\t\t\t\t\t\t\t\tget2Double(strMoney),\n\t\t\t\t\t\t\t\t\t\t\tsetTimeFormat(null),\n\t\t\t\t\t\t\t\t\t\t\t(spType.getSelectedItemPosition() + 1),\n\t\t\t\t\t\t\t\t\t\t\t// txtInhandler.getText().toString(),\n\t\t\t\t\t\t\t\t\t\t\ttextreAddres, textreMark,\n\t\t\t\t\t\t\t\t\t\t\ttextphoto, \"支出\");\n\t\t\t\t\t\t\t\t\tincomeDAO.add(tb_income);// 添加收入信息\n\t\t\t\t\t\t\t\t\t// 弹出信息提示\n\t\t\t\t\t\t\t\t\tToast.makeText(AddPay.this,\n\t\t\t\t\t\t\t\t\t\t\t\"〖新增收入〗数据添加成功！\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t\t\t\t.show();\n\t\t\t\t\t\t\t\t\tgotoback();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tToast.makeText(AddPay.this, \"请输入收入金额！\",\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else { // 修改模式\n\t\t\t\t\t\t\tif (type == \"pay\") { // 支出\n\t\t\t\t\t\t\t\tif (!txtMoney.getText().toString().isEmpty()) {// 判断金额不为空\n\t\t\t\t\t\t\t\t\tTb_pay tb_pay = new Tb_pay(); // 创建Tb_pay对象\n\t\t\t\t\t\t\t\t\ttb_pay.set_id(userid); // 设置userid\n\t\t\t\t\t\t\t\t\ttb_pay.setNo(Integer.parseInt(strno)); // 设置编号\n\t\t\t\t\t\t\t\t\ttb_pay.setMoney(get2Double(txtMoney\n\t\t\t\t\t\t\t\t\t\t\t.getText().toString()));// 设置金额\n\t\t\t\t\t\t\t\t\ttb_pay.setTime(setTimeFormat(txtTime\n\t\t\t\t\t\t\t\t\t\t\t.getText().toString()));// 设置时间\n\t\t\t\t\t\t\t\t\ttb_pay.setType(spType\n\t\t\t\t\t\t\t\t\t\t\t.getSelectedItemPosition() + 1);// 设置类别\n\t\t\t\t\t\t\t\t\ttb_pay.setAddress(textreAddres);// 设置地点\n\t\t\t\t\t\t\t\t\ttb_pay.setMark(textreMark);// 设置备注\n\t\t\t\t\t\t\t\t\ttb_pay.setPhoto(textphoto);// 设置备注\n\t\t\t\t\t\t\t\t\tpayDAO.update(tb_pay);// 更新支出信息\n\t\t\t\t\t\t\t\t\tToast.makeText(AddPay.this, \"〖数据〗修改成功！\",\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\tgotoback();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tToast.makeText(AddPay.this, \"请输入收入金额！\",\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // 收入\n\t\t\t\t\t\t\t\tif (!txtMoney.getText().toString().isEmpty()) {// 判断金额不为空\n\t\t\t\t\t\t\t\t\tTb_income tb_income = new Tb_income();// 创建Tb_income对象\n\t\t\t\t\t\t\t\t\ttb_income.set_id(userid);// 设置编号\n\t\t\t\t\t\t\t\t\ttb_income.setNo(Integer.parseInt(strno));// 设置编号\n\t\t\t\t\t\t\t\t\ttb_income.setMoney(get2Double(txtMoney\n\t\t\t\t\t\t\t\t\t\t\t.getText().toString()));// 设置金额\n\t\t\t\t\t\t\t\t\ttb_income.setTime(setTimeFormat(txtTime\n\t\t\t\t\t\t\t\t\t\t\t.getText().toString()));// 设置时间\n\t\t\t\t\t\t\t\t\ttb_income.setType(spType\n\t\t\t\t\t\t\t\t\t\t\t.getSelectedItemPosition() + 1);// 设置类别\n\t\t\t\t\t\t\t\t\ttb_income.setHandler(textreAddres);// 设置付款方\n\t\t\t\t\t\t\t\t\ttb_income.setMark(textreMark);// 设置备注\n\t\t\t\t\t\t\t\t\ttb_income.setPhoto(textphoto);// 设置备注\n\t\t\t\t\t\t\t\t\tincomeDAO.update(tb_income);// 更新收入信息\n\t\t\t\t\t\t\t\t\tToast.makeText(AddPay.this, \"〖数据〗修改成功！\",\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\tgotoback();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tToast.makeText(AddPay.this, \"请输入收入金额！\",\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbtnCancelButton.setOnClickListener(new OnClickListener() {// 为取消按钮设置单击监听事件\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\t\t\tif (typemode == \"add\") { // 添加模式执行返回\n\t\t\t\t\t\t\ttxtMoney.setText(\"\");// 设置金额文本框为空\n\t\t\t\t\t\t\ttxtMoney.setHint(\"0.00\");// 为金额文本框设置提示\n\t\t\t\t\t\t\ttxtTime.setText(\"\");// 设置时间文本框为空\n\t\t\t\t\t\t\ttxtAddress.setText(\"\");// 设置地址文本框为空\n\t\t\t\t\t\t\ttxtMark.setText(\"\");// 设置备注文本框为空\n\t\t\t\t\t\t\t// txtInhandler.setText(\"\");// 设置备注文本框为空\n\t\t\t\t\t\t\tspType.setSelection(0);// 设置类别下拉列表默认选择第一项\n\t\t\t\t\t\t\tgotoback();\n\t\t\t\t\t\t} else { // 修改模式执行删除\n\t\t\t\t\t\t\tif (type == \"pay\") { // 支出\n\t\t\t\t\t\t\t\tpayDAO.detele(userid, Integer.parseInt(strno));// 根据编号删除支出信息\n\t\t\t\t\t\t\t\tgotoback();\n\t\t\t\t\t\t\t} else { // 收入\n\t\t\t\t\t\t\t\tincomeDAO.detele(userid,\n\t\t\t\t\t\t\t\t\t\tInteger.parseInt(strno));// 根据编号删除收入信息\n\t\t\t\t\t\t\t\tgotoback();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tToast.makeText(AddPay.this, \"〖数据〗删除成功！\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t}\n\n\t// 保留2位小数\n\tpublic static double get2Double(String strMoney) { // 处理小数点\n\t\tDouble a = Double.parseDouble(strMoney);\n\t\tDecimalFormat df = new DecimalFormat(\"0.00\");\n\t\treturn new Double(df.format(a));\n\t}\n\n\t@Override\n\tprotected Dialog onCreateDialog(int id)// 重写onCreateDialog方法\n\t{\n\t\tswitch (id) {\n\t\tcase DATE_DIALOG_ID:// 弹出日期选择对话框\n\t\t\treturn new DatePickerDialog(this, mDateSetListener, mYear, mMonth,\n\t\t\t\t\tmDay);\n\t\t}\n\t\treturn null;\n\t}\n\n\tprivate DatePickerDialog.OnDateSetListener mDateSetListener = new DatePickerDialog.OnDateSetListener() {\n\t\tpublic void onDateSet(DatePicker view, int year, int monthOfYear,\n\t\t\t\tint dayOfMonth) {\n\t\t\tmYear = year;// 为年份赋值\n\t\t\tmMonth = monthOfYear;// 为月份赋值\n\t\t\tmDay = dayOfMonth;// 为天赋值\n\t\t\tupdateDisplay();// 显示设置的日期\n\t\t}\n\t};\n\n\tprivate void updateDisplay() {\n\t\t// 显示设置的时间\n\n\t\ttxtTime.setText(new StringBuilder().append(mYear).append(\"-\")\n\t\t\t\t.append(mMonth + 1).append(\"-\").append(mDay));\n\n\t}\n\n\tprivate String setTimeFormat(String newtxtTime) { // 设置日期格式\n\t\tString date;\n\t\tif (typemode == \"add\") {\n\t\t\tdate = txtTime.getText().toString();\n\t\t} else {\n\t\t\tdate = newtxtTime;\n\t\t}\n\n\t\tint y, m, d;\n\t\tString sm, sd;\n\t\tint i = 0, j = 0, k = 0;\n\n\t\tfor (i = 0; i < date.length(); i++) {\n\t\t\tif (date.substring(i, i + 1).equals(\"-\") && j == 0)\n\t\t\t\tj = i;\n\t\t\telse if (date.substring(i, i + 1).equals(\"-\"))\n\t\t\t\tk = i;\n\t\t}\n\t\ty = Integer.valueOf(date.substring(0, j));\n\t\tm = Integer.valueOf(date.substring(j + 1, k));\n\t\td = Integer.valueOf(date.substring(k + 1));\n\t\tif (m < 10) {\n\t\t\tsm = \"0\" + String.valueOf(m);\n\t\t} else\n\t\t\tsm = String.valueOf(m);\n\t\tif (d < 10) {\n\t\t\tsd = \"0\" + String.valueOf(d);\n\t\t} else\n\t\t\tsd = String.valueOf(d);\n\n\t\treturn String.valueOf(y) + \"-\" + sm + \"-\" + sd;\n\n\t}\n\n\tvoid VoiceRecognition() { // 调用百度语音识别\n\t\t// mResult.setText(null);\n\t\tmCurrentTheme = Config.DIALOG_THEME;\n\t\tif (mDialog != null) {\n\t\t\tmDialog.dismiss();\n\t\t}\n\t\tBundle params = new Bundle();\n\t\tparams.putString(BaiduASRDigitalDialog.PARAM_API_KEY, Constants.API_KEY); // 百度语音api_key\n\t\tparams.putString(BaiduASRDigitalDialog.PARAM_SECRET_KEY,\n\t\t\t\tConstants.SECRET_KEY);\n\t\tparams.putInt(BaiduASRDigitalDialog.PARAM_DIALOG_THEME, // 百度语音主题\n\t\t\t\tConfig.DIALOG_THEME);\n\t\tmDialog = new BaiduASRDigitalDialog(this, params);\n\t\tmDialog.setDialogRecognitionListener(mRecognitionListener);\n\t\tmDialog.getParams().putInt(BaiduASRDigitalDialog.PARAM_PROP, // 百度识别类别\n\t\t\t\tConfig.CURRENT_PROP);\n\t\tmDialog.getParams().putString(BaiduASRDigitalDialog.PARAM_LANGUAGE, // 百度识别语言\n\t\t\t\tConfig.getCurrentLanguage());\n\t\tmDialog.getParams().putBoolean(\n\t\t\t\t// 百度识别音效相关\n\t\t\t\tBaiduASRDigitalDialog.PARAM_START_TONE_ENABLE,\n\t\t\t\tConfig.PLAY_START_SOUND);\n\t\tmDialog.getParams().putBoolean(\n\t\t\t\tBaiduASRDigitalDialog.PARAM_END_TONE_ENABLE,\n\t\t\t\tConfig.PLAY_END_SOUND);\n\t\tmDialog.getParams().putBoolean(\n\t\t\t\tBaiduASRDigitalDialog.PARAM_TIPS_TONE_ENABLE,\n\t\t\t\tConfig.DIALOG_TIPS_SOUND);\n\t\tmDialog.show();\n\t}\n\n\tvoid VoiceSuccess() { // 识别成功录入数据\n\t\tif (DialogShowUtil.dialoggettype() != null) {\n\t\t\ttype = DialogShowUtil.dialoggettype();\n\t\t}\n\t\tVoiceDefault = DialogShowUtil.dialogVoiceDefault();\n\t\tString textreMark = txtMark.getText().toString();\n\n\t\tif (typemode == \"add\") { // 添加模式\n\t\t\tif (type == \"pay\") { // 支出\n\t\t\t\trb1.setChecked(true);\n\t\t\t\t// corporation_fl.setVisibility(View.GONE);\n\t\t\t\t// address_fl.setVisibility(View.VISIBLE);\n\t\t\t\tspdatalist = ptypeDAO.getPtypeName(userid);\n\t\t\t\ttxtMoney.setText(VoiceSave[1]);// 显示金额\n\t\t\t\ttxtMoney.setTextColor(Color.parseColor(\"#5ea98d\"));\n\t\t\t\tif (VoiceDefault == \"notype\") { // 如果没有默认类别\n\t\t\t\t\tspType.setSelection(Integer.parseInt(VoiceSave[5]));// 显示语音识别类别\n\t\t\t\t} else {\n\t\t\t\t\tspType.setSelection(Integer.parseInt(VoiceSave[0]));// 显示类别\n\t\t\t\t}\n\t\t\t\ttxtMark.setText(textreMark + \" \" + VoiceSave[2]);// 显示备注\n\t\t\t} else { // 收入\n\t\t\t\trb2.setChecked(true);\n\t\t\t\t// corporation_fl.setVisibility(View.VISIBLE);\n\t\t\t\t// address_fl.setVisibility(View.GONE);\n\t\t\t\tspdatalist = ptypeDAO.getPtypeName(userid);\n\t\t\t\ttxtMoney.setText(VoiceSave[1]);// 显示金额\n\t\t\t\ttxtMoney.setTextColor(Color.parseColor(\"#ffff0000\"));\n\t\t\t\tif (VoiceDefault == \"notype\") { // 如果没有默认类别\n\t\t\t\t\tspType.setSelection(Integer.parseInt(VoiceSave[5]));// 显示类别\n\t\t\t\t} else {\n\t\t\t\t\tspType.setSelection(Integer.parseInt(VoiceSave[4]));// 显示类别\n\t\t\t\t}\n\t\t\t\ttxtMark.setText(textreMark + \" \" + VoiceSave[2]);// 显示备注\n\t\t\t}\n\t\t} else { // 修改模式\n\t\t\tif (type == \"pay\") { // 支出\n\t\t\t\trb1.setChecked(true);\n\t\t\t\t// 选择列表初始化\n\t\t\t\tspdatalist = ptypeDAO.getPtypeName(userid);\n\t\t\t\tspdata = spdatalist.toArray(new String[spdatalist.size()]);// 在tb_itype中按用户id读取\n\t\t\t\tadapter = new ArrayAdapter<String>(AddPay.this,\n\t\t\t\t\t\tR.layout.spinner, spdata); // 动态生成收入类型列表\n\t\t\t\tspType.setAdapter(adapter);\n\t\t\t\ttxtMoney.setText(VoiceSave[1]);// 显示金额\n\t\t\t\ttxtMoney.setTextColor(Color.parseColor(\"#5ea98d\"));\n\t\t\t\tif (VoiceDefault == \"notype\") { // 如果没有默认类别\n\t\t\t\t\tspType.setSelection(Integer.parseInt(VoiceSave[5]));// 显示语音识别类别\n\t\t\t\t} else {\n\t\t\t\t\tspType.setSelection(Integer.parseInt(VoiceSave[0]));// 显示类别\n\t\t\t\t}\n\t\t\t\ttxtMark.setText(textreMark + \" \" + VoiceSave[2]);// 显示备注\n\t\t\t} else { // 收入\n\t\t\t\t// 选择列表初始化\n\t\t\t\trb2.setChecked(true);\n\t\t\t\tspdatalist = itypeDAO.getItypeName(userid);\n\t\t\t\tspdata = spdatalist.toArray(new String[spdatalist.size()]);// 在tb_itype中按用户id读取\n\t\t\t\tadapter = new ArrayAdapter<String>(AddPay.this,\n\t\t\t\t\t\tR.layout.spinner, spdata); // 动态生成收入类型列表\n\t\t\t\tspType.setAdapter(adapter);\n\t\t\t\ttxtMoney.setText(VoiceSave[1]);// 显示金额\n\t\t\t\ttxtMoney.setTextColor(Color.parseColor(\"#ffff0000\"));\n\t\t\t\tif (VoiceDefault == \"notype\") { // 如果没有默认类别\n\t\t\t\t\tspType.setSelection(Integer.parseInt(VoiceSave[5]));// 显示类别\n\t\t\t\t} else {\n\t\t\t\t\tspType.setSelection(Integer.parseInt(VoiceSave[4]));// 显示类别\n\t\t\t\t}\n\t\t\t\ttxtMark.setText(textreMark + \" \" + VoiceSave[2]);// 显示备注\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * 识别结果处理函数\n\t * \n\t * @param VoiceSave[0] 收入类别的值\n\t * \n\t * @param VoiceSave[1] 金额的值\n\t * \n\t * @param VoiceSave[3] 重复类别的值，仅用于显示提醒\n\t * \n\t * @param VoiceSave[4] 支出类别的值\n\t * \n\t * @param VoiceSave[5] \"语音识别\"类别的值\n\t */\n\tprivate void Recognition(String t) {\n\t\tint mfirst = 100, mend = 0, temp = 0;\n\t\tBoolean ismoney = false, intype = false, outtype = false;\n\t\tBoolean voice_ptype = false, voice_intype = false;\n\t\tString w = \"\", strmoney = \"\", inname = \"1\", outname = \"2\";\n\t\tspdatalist = ptypeDAO.getPtypeName(userid);\n\t\tspdatalist2 = itypeDAO.getItypeName(userid);\n\t\tVoiceSave[2] = t;\n\t\tfor (int i = 0; i < spdatalist.size(); i++) { // 判断是否包含支出\n\t\t\tif (t.indexOf(spdatalist.get(i).toString()) > -1) {\n\t\t\t\ttype = \"pay\";\n\t\t\t\tintype = true;\n\t\t\t\tinname = spdatalist.get(i).toString();\n\t\t\t\tVoiceSave[0] = Integer.toString(i); // VoiceSave[0]为收入类别的值\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < voice_pay.length; i++) { // 判断是否包含支出的动词\n\t\t\tif (t.indexOf(voice_pay[i]) > -1) {\n\t\t\t\tvoice_ptype = true;\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < voice_income.length; i++) { // 判断是否包含支出的动词\n\t\t\tif (t.indexOf(voice_income[i]) > -1) {\n\t\t\t\tvoice_intype = true;\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < spdatalist2.size(); i++) { // 判断是否包含收入\n\t\t\tif (t.indexOf(spdatalist2.get(i).toString()) > -1) {\n\t\t\t\ttype = \"income\";\n\t\t\t\touttype = true;\n\t\t\t\toutname = spdatalist2.get(i).toString();\n\t\t\t\tVoiceSave[4] = Integer.toString(i); // VoiceSave[4]为支出类别的值\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < number.length; i++) { // 判断是否包含金额，获得开头\n\t\t\tif (t.indexOf(number[i]) > -1) {\n\t\t\t\ttemp = t.indexOf(number[i]);\n\t\t\t\tif (temp < mfirst) {\n\t\t\t\t\tmfirst = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < money.length; i++) { // 判断是否包含金额，获得结尾\n\t\t\tif (t.indexOf(money[i]) > -1) {\n\t\t\t\ttemp = t.indexOf(money[i]);\n\t\t\t\tif (temp > -1 && temp >= mend) {\n\t\t\t\t\tmend = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < money2.length; i++) { // 判断是否包含金额，获得结尾\n\t\t\tif (t.indexOf(money2[i]) > -1) {\n\t\t\t\ttemp = t.indexOf(money2[i]);\n\t\t\t\tif (temp > -1 && temp >= mend) {\n\t\t\t\t\tmend = temp;\n\t\t\t\t}\n\t\t\t\tmend = mend + 1;\n\t\t\t}\n\t\t}\n\t\tif (!(mfirst == 100 || mend == 0)) { // 转换为阿拉伯数字\n\t\t\tismoney = true;\n\t\t\tstrmoney = t.substring(mfirst, mend);\n\t\t\t// 判断语句是否包含非数字\n\t\t\tchar[] chs = strmoney.toCharArray();\n\t\t\tList<String> num = Arrays.asList(number);\n\t\t\tList<String> mon = Arrays.asList(money);\n\t\t\tList<String> mon2 = Arrays.asList(money2);\n\t\t\tfor (int l = 0; l < chs.length; l++)\n\t\t\t\tif (!num.contains(String.valueOf(chs[l])))\n\t\t\t\t\tif (!mon.contains(String.valueOf(chs[l])))\n\t\t\t\t\t\tif (!mon2.contains(String.valueOf(chs[l])))\n\t\t\t\t\t\t\tismoney = false;\n\t\t\tif (ismoney) {\n\t\t\t\tDigitUtil Util = new DigitUtil();\n\t\t\t\tVoiceSave[1] = Integer.toString(Util.parse(strmoney)); // 调用工具类处理汉字的金额\n\t\t\t}\n\t\t}\n\t\tif (intype && outtype) { // 如果同时含有收入/支出的类别\n\t\t\tif (outname.equals(inname)) {\n\t\t\t\tif (ismoney) {\n\t\t\t\t\tif (voice_intype) {\n\t\t\t\t\t\ttype = \"income\";\n\t\t\t\t\t\tdialogShowUtil.dialogShow(\"rotatebottom\", \"OK\", t, w);\n\t\t\t\t\t} else if (voice_ptype) {\n\t\t\t\t\t\ttype = \"pay\";\n\t\t\t\t\t\tdialogShowUtil.dialogShow(\"rotatebottom\", \"OK\", t, w);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tVoiceSave[3] = outname; // VoiceSave[3]为重复类别的值，仅用于显示提醒\n\t\t\t\t\t\tdialogShowUtil.dialogShow(\"shake\", \"judge\", t, w); // 如果含有金额\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tw = \"提示：\\n你的话中没有包含消费或开支的<金额>\\n\";\n\t\t\t\t\tdialogShowUtil.dialogShow(\"shake\", \"wrong\", t, w);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tw = \"**提示：\\n一次只能记录一条记录哦\\n\"; // 如果含有收入并且支出的类别\n\t\t\t\tdialogShowUtil.dialogShow(\"shake\", \"wrong\", t, w);\n\t\t\t}\n\t\t} else {\n\t\t\tif (!((intype || outtype) || ismoney)) { // 如果不含金额\n\t\t\t\tw = \"**提示：\\n你的话中没有包含<类别>（\" + listToString(spdatalist, '，')\n\t\t\t\t\t\t+ \"，\" + listToString(spdatalist2, '，')\n\t\t\t\t\t\t+ \"）\\n\\n**提示：\\n你的话中没有包含消费或开支的<金额>\";\n\t\t\t\tdialogShowUtil.dialogShow(\"shake\", \"wrong\", t, w);\n\t\t\t} else if ((intype || outtype) && (!ismoney)) {\n\t\t\t\tw = \"提示：\\n你的话中没有包含消费或开支的<金额>\\n或者出现多次金额\";\n\t\t\t\tdialogShowUtil.dialogShow(\"shake\", \"wrong\", t, w);\n\t\t\t} else if ((!(intype || outtype)) && ismoney) {\n\t\t\t\tfor (int i = 0; i < spdatalist.size(); i++) { // 判断是否包含支出\n\t\t\t\t\tif (\"语音识别\".indexOf(spdatalist.get(i).toString()) > -1) {\n\t\t\t\t\t\tVoiceSave[5] = Integer.toString(i);\n\t\t\t\t\t\tVoiceSave[3] = \"语音识别\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tw = \"**提示：\\n你的话中没有包含<（默认）类别>（\" + listToString(spdatalist, '，')\n\t\t\t\t\t\t+ \"）\\n\\n\\n将会记录为<语音识别>类别，是否依然记录？\\n\";\n\t\t\t\tdialogShowUtil.dialogShow(\"shake\", \"notype\", t, w);\n\t\t\t} else {\n\t\t\t\tdialogShowUtil.dialogShow(\"rotatebottom\", \"OK\", t, w);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic String listToString(List list, char separator) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tsb.append(list.get(i));\n\t\t\tif (i < list.size() - 1) {\n\t\t\t\tsb.append(separator);\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}\n\n\tprivate boolean gotoback() { // 返回\n\t\tIntent intent = null;\n\t\ttype = \"pay\";\n\t\ttypemode = \"add\";\n\t\tBimp.drr = new ArrayList<String>();\n\t\tBimp.smdrr = new ArrayList<String>();\n\t\tBimp.bmp = new ArrayList<Bitmap>();\n\t\tBimp.max = 0;\n\t\tBimp.flag = 0;\n\t\tif (bundle.containsKey(\"cwp.frament3\")) {\n\t\t\tintent = new Intent(AddPay.this, MainActivity.class);\n\t\t\tintent.putExtra(\"cwp.Fragment\", \"3\");// 设置传递数据\n\t\t} else if (bundle.containsKey(\"cwp.search\")) {\n\t\t\tthis.setResult(3);\n\t\t\tthis.finish();\n\t\t\treturn true;\n\t\t} else {\n\t\t\tintent = new Intent(AddPay.this, MainActivity.class);\n\t\t\tintent.putExtra(\"cwp.Fragment\", \"1\");\n\t\t}\n\t\tintent.putExtra(\"cwp.id\", userid);\n\t\tstartActivity(intent);\n\t\tfinish();\n\t\treturn true;\n\t}\n\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t\tif (keyCode == KeyEvent.KEYCODE_BACK) { // 监控/拦截/屏蔽返回键\n\t\t\tgotoback();\n\t\t}\n\t\treturn super.onKeyDown(keyCode, event);\n\t}\n\n\t@Override\n\tprotected void onDestroy() {\n\t\tif (mDialog != null) {\n\t\t\tmDialog.dismiss();\n\t\t}\n\t\tif (dialogBuilder != null) {\n\t\t\tdialogBuilder.dismiss();\n\t\t}\n\t\tsuper.onDestroy();\n\t}\n\n\t@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\t// 移除定位请求\n\t\tmLocationManagerProxy.removeUpdates(this);\n\t\t// 销毁定位\n\t\tmLocationManagerProxy.destroy();\n\t}\n\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tSharedPreferences sp = this.getSharedPreferences(\"preferences\",\n\t\t\t\tMODE_WORLD_READABLE);\n\t\tCrashApplication myApplaction = (CrashApplication) getApplication();\n\t\tif ((myApplaction.isLocked)\n\t\t\t\t&& (sp.getString(\"gesturepw\", \"\").equals(\"开\"))) {// 判断是否需要跳转到密码界面\n\t\t\tIntent intent = new Intent(this,\n\t\t\t\t\tUnlockGesturePasswordActivity.class);\n\t\t\tstartActivity(intent);\n\t\t}\n\t}\n\n\t@Override\n\tpublic void onLocationChanged(Location location) {\n\t}\n\n\t@Override\n\tpublic void onStatusChanged(String provider, int status, Bundle extras) {\n\t}\n\n\t@Override\n\tpublic void onProviderEnabled(String provider) {\n\t}\n\n\t@Override\n\tpublic void onProviderDisabled(String provider) {\n\t}\n\n\t@Override\n\tpublic void onLocationChanged(AMapLocation amapLocation) {\n\t\tif (amapLocation != null\n\t\t\t\t&& amapLocation.getAMapException().getErrorCode() == 0) {\n\t\t\t// 定位成功回调信息，设置相关消息\n\t\t\ttxtAddress.setText(amapLocation.getPoiName() + \" [ \"\n\t\t\t\t\t+ amapLocation.getAddress() + \" 区号：\"\n\t\t\t\t\t+ amapLocation.getCityCode() + \" ]\");\n\t\t} else {\n\t\t\tLog.e(\"AmapErr\", \"Location ERR:\"\n\t\t\t\t\t+ amapLocation.getAMapException().getErrorCode());\n\t\t}\n\t}\n\n\t@Override\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\tcase R.id.btn_loacte:\n\t\t\t// 注意更换定位时间后，需要先将定位请求删除，再进行定位请求\n\t\t\tmLocationManagerProxy.removeUpdates(this);\n\t\t\tint randomTime = mRandom.nextInt(1000);\n\t\t\tmLocationManagerProxy.requestLocationData(\n\t\t\t\t\tLocationProviderProxy.AMapNetwork, 60 * 1000 + randomTime,\n\t\t\t\t\t15, this);\n\t\t\tmLocationManagerProxy.setGpsEnable(false);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tswitch (requestCode) {\n\t\tcase 102:\n\t\t\tif (resultCode == 3 || resultCode == 0) {\n\t\t\t\t// for (int i = 0; i < Bimp.drr.size(); i++) {\n\t\t\t\t// System.out.println(\"Bimp.drr\" + i + \" \" + Bimp.drr.get(i));\n\t\t\t\t// System.out.println(\"list\" + i + \" \" + Bimp.smdrr.get(i));\n\t\t\t\t// }\n\n\t\t\t\tif ((Bimp.drr.size() != 0) && (Bimp.smdrr.size() != 0)) {\n\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\tfor (int i = 0; i < Bimp.drr.size(); i++) {\n\t\t\t\t\t\tsb.append(Bimp.drr.get(i) + \",\");\n\t\t\t\t\t}\n\t\t\t\t\tfor (int i = 0; i < Bimp.drr.size(); i++) {\n\t\t\t\t\t\tsb.append(Bimp.smdrr.get(i) + \",\");\n\t\t\t\t\t}\n\t\t\t\t\ttextphoto = sb.toString().substring(0, sb.length() - 1);\n\t\t\t\t\tinitphoto();\n\t\t\t\t} else {\n\t\t\t\t\ttextphoto = \"\";\n\t\t\t\t\tinitphoto();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t}\n\n\tpublic static void showVoiveDialog() {\n\t\tdialogShowUtil.dialogShow(\"rotatebottom\", \"first\", \"\", \"\");\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Author.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport cwp.moneycharge.model.ActivityManager;\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.view.KeyEvent;\nimport android.widget.ArrayAdapter;\nimport android.widget.ListView;\n\npublic class Author extends Activity {\n\tIntent intentr;\n\tint userid;\n\tpublic Author() {\n\t\t// TODO Auto-generated constructor stub\n\t}\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.author);\n\t\tActivityManager.getInstance().addActivity(this);\n\t}\t\n\t\n\t@Override\n\tprotected void onStart() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onStart();// 实现基类中的方法//  调用自定义方法显示收入信息\n\t\tIntent intentr=getIntent();\n\t\tuserid=intentr.getIntExtra(\"cwp.id\",100000001);}\n\t\n\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t    if(keyCode == KeyEvent.KEYCODE_BACK) { //监控/拦截/屏蔽返回键\n\t    \tIntent intent=new Intent(Author.this,About.class);\n\t\t\tintent.putExtra(\"cwp.id\",userid);\n\t\t\tstartActivity(intent);\n\t        return true;\n\t    }\n\t    return super.onKeyDown(keyCode, event);\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/BaseEffects.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport android.view.View;\n\nimport com.nineoldandroids.animation.AnimatorSet;\nimport com.nineoldandroids.view.ViewHelper;\n\n/**\n * Created by lee on 2014/7/30.\n *\n *\n * The MIT License (MIT)\n *\n * Copyright (c) 2014 daimajia\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * Acknowledgements daimajia\n * https://github.com/daimajia\n */\npublic abstract  class BaseEffects {\n\n    private static final int DURATION = 1 * 700;\n\n    protected long mDuration =DURATION ;\n\n    private AnimatorSet mAnimatorSet;\n\n    {\n        mAnimatorSet = new AnimatorSet();\n    }\n\n    protected abstract void setupAnimation(View view);\n\n    public void start(View view) {\n        reset(view);\n        setupAnimation(view);\n        mAnimatorSet.start();\n    }\n    public void reset(View view) {\n        ViewHelper.setPivotX(view, view.getMeasuredWidth() / 2.0f);\n        ViewHelper.setPivotY(view, view.getMeasuredHeight() / 2.0f);\n    }\n\n\n    public AnimatorSet getAnimatorSet() {\n        return mAnimatorSet;\n    }\n    \n    public void setDuration(long duration) {\n        this.mDuration = duration;\n    }\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/BaseFrament.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport android.support.v4.app.Fragment;\n\nabstract public class BaseFrament extends Fragment {\n    public void filngtonext() {\n\n    }\n\n    public void filngtonpre(){\n\n    }\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Config.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport com.baidu.voicerecognition.android.VoiceRecognitionConfig;\nimport com.baidu.voicerecognition.android.ui.BaiduASRDigitalDialog;\n\n/**\n * 临时保存参数信息，Demo演示使用\n * \n * @author yangliang02\n */\npublic class Config {\n\t/** 对话框样式 */\n\tpublic static int DIALOG_THEME = BaiduASRDigitalDialog.THEME_BLUE_LIGHTBG;\n\n\t/** 对话框样式 */\n\tpublic static int pushlogindex = 0;\n\n\tpublic static int getPushlog() {\n\t\treturn pushlogindex;\n\t}\n\n\tpublic static void setPushlog(int pushlog) {\n\t\tpushlogindex = pushlog;\n\t}\n\n\t/**\n\t * 当前识别语言\n\t */\n\tpublic static String CURRENT_LANGUAGE = VoiceRecognitionConfig.LANGUAGE_CHINESE;\n\n\tprivate static int CURRENT_LANGUAGE_INDEX = 0;\n\n\t/**\n\t * 当前垂直领域类型\n\t */\n\tpublic static int CURRENT_PROP = VoiceRecognitionConfig.PROP_INPUT;\n\n\tprivate static int CURRENT_PROP_INDEX = 0;\n\n\tpublic static String getCurrentLanguage() {\n\t\treturn CURRENT_LANGUAGE;\n\t}\n\n\tpublic static int getCurrentLanguageIndex() {\n\t\treturn CURRENT_LANGUAGE_INDEX;\n\t}\n\n\tpublic static void setCurrentLanguageIndex(int index) {\n\t\tswitch (index) {\n\t\tcase 1:\n\t\t\tCURRENT_LANGUAGE = VoiceRecognitionConfig.LANGUAGE_CANTONESE;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tCURRENT_LANGUAGE = VoiceRecognitionConfig.LANGUAGE_ENGLISH;\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tCURRENT_LANGUAGE = VoiceRecognitionConfig.LANGUAGE_CHINESE;\n\t\t\tindex = 0;\n\t\t\tbreak;\n\t\t}\n\t\tCURRENT_LANGUAGE_INDEX = index;\n\t}\n\n\tpublic static int getCurrentPropIndex() {\n\t\treturn CURRENT_PROP_INDEX;\n\t}\n\n\tpublic static void setCurrentPropIndex(int index) {\n\t\tswitch (index) {\n\t\tcase 1:\n\t\t\tCURRENT_PROP = VoiceRecognitionConfig.PROP_SEARCH;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tCURRENT_PROP = VoiceRecognitionConfig.PROP_MAP;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tCURRENT_PROP = VoiceRecognitionConfig.PROP_MUSIC;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tCURRENT_PROP = VoiceRecognitionConfig.PROP_VIDEO;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tCURRENT_PROP = VoiceRecognitionConfig.PROP_APP;\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tCURRENT_PROP = VoiceRecognitionConfig.PROP_WEB;\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tCURRENT_PROP = VoiceRecognitionConfig.PROP_HEALTH;\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tCURRENT_PROP = VoiceRecognitionConfig.PROP_SHOPPING;\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tCURRENT_PROP = VoiceRecognitionConfig.PROP_PHONE;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tCURRENT_PROP = VoiceRecognitionConfig.PROP_INPUT;\n\t\t\tindex = 0;\n\t\t\tbreak;\n\t\t}\n\t\tCURRENT_PROP_INDEX = index;\n\t}\n\n\t/**\n\t * 播放声音\n\t */\n\tpublic static boolean PLAY_START_SOUND = true;\n\n\t/**\n\t * 播放结束\n\t */\n\tpublic static boolean PLAY_END_SOUND = true;\n\n\t/**\n\t * 对话框提示音\n\t */\n\tpublic static boolean DIALOG_TIPS_SOUND = true;\n\n\t/**\n\t * 显示音量\n\t */\n\tpublic static boolean SHOW_VOL = true;\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Constants.java",
    "content": "package com.cwp.cmoneycharge;\n\npublic class Constants {\n    /*\n     * 请登录http://developer.baidu.com，注册成为百度开发\n     * 将对应的ApiKey和SecretKey填写后再测试\n     */\n    public static final String API_KEY = \"8MAxI5o7VjKSZOKeBzS4XtxO\";\n\n    public static final String SECRET_KEY = \"Ge5GXVdGQpaxOmLzc8fOM8309ATCz9Ha\";\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/CrashApplication.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport com.cwp.pattern.LockPatternUtils;\n\nimport android.app.Application;\nimport android.content.BroadcastReceiver;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.content.IntentFilter;\n\npublic class CrashApplication extends Application {\n\tpublic boolean isLocked = true;\n\tprivate static CrashApplication mInstance;\n\tprivate LockPatternUtils mLockPatternUtils;\n\t\n\tLockScreenReceiver receiver ;\n\tIntentFilter filter ;\n\n\tpublic static CrashApplication getInstance() {\n\t\treturn mInstance;\n\t}\n\n\t@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tmInstance = this;\n\t\tmLockPatternUtils = new LockPatternUtils(this);\n\t\treceiver = new LockScreenReceiver();\n        filter = new IntentFilter();\n        filter.addAction(Intent.ACTION_SCREEN_OFF);\n        this.registerReceiver(receiver, filter);\n\t\t\n\t\tCrashHandler crashHandler = CrashHandler.getInstance();\n\t\tcrashHandler.init(this);\n\t}\n\n\tpublic LockPatternUtils getLockPatternUtils() {\n\t\treturn mLockPatternUtils;\n\t}\n\t\n\tclass LockScreenReceiver extends BroadcastReceiver {\n\t\t@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\t/* 在这里处理广播 */\n\t\t\tif (Intent.ACTION_SCREEN_OFF.equals(intent.getAction())) {\n\t\t\t\tisLocked  = true;\n\t\t\t}\n\t\t}\n\t}\n\t\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/CrashHandler.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport java.io.File;\nimport java.io.FileNotFoundException;\nimport java.io.FileOutputStream;\nimport java.io.IOException;\nimport java.io.PrintWriter;\nimport java.io.StringWriter;\nimport java.io.Writer;\nimport java.lang.Thread.UncaughtExceptionHandler;\nimport java.lang.reflect.Field;\nimport java.text.SimpleDateFormat;\nimport java.util.Date;\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.Timer;\nimport java.util.TimerTask;\n\nimport com.umeng.fb.example.CustomActivity;\n\nimport android.content.Context;\nimport android.content.ContextWrapper;\nimport android.content.Intent;\nimport android.content.SharedPreferences;\nimport android.content.SharedPreferences.Editor;\nimport android.content.pm.PackageInfo;\nimport android.content.pm.PackageManager;\nimport android.content.pm.PackageManager.NameNotFoundException;\nimport android.net.Uri;\nimport android.os.Build;\nimport android.os.Environment;\nimport android.os.Looper;\nimport android.util.Log;\nimport android.widget.Toast;\n\n/**\n * UncaughtException处理类,当程序发生Uncaught异常的时候,由该类来接管程序,并记录发送错误报告.\n * \n * @author way\n * \n */\npublic class CrashHandler implements UncaughtExceptionHandler {\n\tStringBuffer sb;\n\tString result;\n\tprivate static final String TAG = \"CrashHandler\";\n\tprivate static final int MODE_WORLD_READABLE = 0x0001;\n\tprivate Thread.UncaughtExceptionHandler mDefaultHandler;// 系统默认的UncaughtException处理类\n\tprivate static CrashHandler INSTANCE = new CrashHandler();// CrashHandler实例\n\tprivate Context mContext;// 程序的Context对象\n\tprivate Map<String, String> info = new HashMap<String, String>();// 用来存储设备信息和异常信息\n\tprivate SimpleDateFormat format = new SimpleDateFormat(\n\t\t\t\"yyyy-MM-dd-HH-mm-ss\");// 用于格式化日期,作为日志文件名的一部分\n\n\t/** 保证只有一个CrashHandler实例 */\n\tprivate CrashHandler() {\n\n\t}\n\n\t/** 获取CrashHandler实例 ,单例模式 */\n\tpublic static CrashHandler getInstance() {\n\t\treturn INSTANCE;\n\t}\n\n\t/**\n\t * 初始化\n\t * \n\t * @param context\n\t */\n\tpublic void init(Context context) {\n\t\tmContext = context;\n\t\tContextWrapper a = (ContextWrapper) mContext.getApplicationContext();\n\t\tSharedPreferences sp = a.getSharedPreferences(\"preferences\",\n\t\t\t\tMODE_WORLD_READABLE);\n\t\tif (sp.getString(\"sendlog\", \"\").equals(\"开\")\n\t\t\t\t|| sp.getString(\"sendlog\", \"\").equals(\"\")) {\n\t\t\tmDefaultHandler = Thread.getDefaultUncaughtExceptionHandler();// 获取系统默认的UncaughtException处理器\n\t\t\tThread.setDefaultUncaughtExceptionHandler(this);// 设置该CrashHandler为程序的默认处理器\n\t\t}\n\t}\n\n\t/**\n\t * 当UncaughtException发生时会转入该重写的方法来处理\n\t */\n\t@SuppressWarnings(\"static-access\")\n\tpublic void uncaughtException(Thread thread, Throwable ex) {\n\t\tif (!handleException(ex) && mDefaultHandler != null) {\n\t\t\t// 如果自定义的没有处理则让系统默认的异常处理器来处理\n\n\t\t\tmDefaultHandler.uncaughtException(thread, ex);\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tthread.sleep(3000);// 如果处理了，让程序继续运行3秒再退出，保证文件保存并上传到服务器\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t}\n\n\t/**\n\t * 自定义错误处理,收集错误信息 发送错误报告等操作均在此完成.\n\t * \n\t * @param ex\n\t *            异常信息\n\t * @return true:如果处理了该异常信息;否则返回false.\n\t */\n\tpublic boolean handleException(Throwable ex) {\n\t\tif (ex == null || mContext == null)\n\t\t\treturn false;\n\n\t\tnew Thread() {\n\t\t\tpublic void run() {\n\t\t\t\tLooper.prepare();\n\t\t\t\tToast.makeText(mContext, \"很抱歉,程序出现异常,即将退出\", 0).show();\n\t\t\t\tToast.makeText(mContext, \"请把错误日志反馈给开发者\", Toast.LENGTH_LONG)\n\t\t\t\t\t\t.show();\n\t\t\t\tLooper.loop();\n\t\t\t}\n\t\t}.start();\n\t\t// 收集设备参数信息\n\t\tcollectDeviceInfo(mContext);\n\t\t// 保存日志文件\n\t\tfinal File file = saveCrashInfo2File(ex);\n\t\tTimerTask task = new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\t// sendAppCrashReport(mContext, file);\n\t\t\t\tsendreport(mContext);\n\t\t\t}\n\t\t};\n\t\tTimer timer = new Timer();\n\t\ttimer.schedule(task, 4000);\n\t\treturn true;\n\t}\n\n\tprotected void sendreport(Context mContext) {\n\t\tIntent intent = new Intent(mContext, CustomActivity.class);\n\t\tintent.putExtra(\"cwp.md\", result);\n\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP\n\t\t\t\t| Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\tmContext.startActivity(intent);\n\t\tSysApplication.getInstance().exit();\n\t}\n\n\tpublic void sendAppCrashReport(Context mContext, File file) { // 通过系统分享发送文件\n\t\ttry {\n\t\t\tIntent intent = new Intent();\n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);// 设置intent的Action属性\n\t\t\tintent.setAction(Intent.ACTION_VIEW);// 获取文件file的MIME类型\n\t\t\tString type = \"text/plain\";// 设置intent的data和Type属性。\n\t\t\tintent.setDataAndType(Uri.fromFile(file), type);// 跳转\n\t\t\tmContext.startActivity(intent);\n\t\t\t// Toast.makeText(mContext, \"很抱歉,程序出现异常,即将退出\", 0).show();\n\t\t} catch (Exception e) {\n\n\t\t} finally {\n\t\t\tSysApplication.getInstance().exit();\n\t\t}\n\n\t}\n\n\t/**\n\t * 收集设备参数信息\n\t * \n\t * @param context\n\t */\n\tpublic void collectDeviceInfo(Context context) {\n\t\ttry {\n\t\t\tPackageManager pm = context.getPackageManager();// 获得包管理器\n\t\t\tPackageInfo pi = pm.getPackageInfo(context.getPackageName(),\n\t\t\t\t\tPackageManager.GET_ACTIVITIES);// 得到该应用的信息，即主Activity\n\t\t\tif (pi != null) {\n\t\t\t\tString versionName = pi.versionName == null ? \"null\"\n\t\t\t\t\t\t: pi.versionName;\n\t\t\t\tString versionCode = pi.versionCode + \"\";\n\t\t\t\tinfo.put(\"versionName\", versionName);\n\t\t\t\tinfo.put(\"versionCode\", versionCode);\n\t\t\t}\n\t\t} catch (NameNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tField[] fields = Build.class.getDeclaredFields();// 反射机制\n\t\tfor (Field field : fields) {\n\t\t\ttry {\n\t\t\t\tfield.setAccessible(true);\n\t\t\t\tinfo.put(field.getName(), field.get(\"\").toString());\n\t\t\t\tLog.d(TAG, field.getName() + \":\" + field.get(\"\"));\n\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate File saveCrashInfo2File(Throwable ex) {\n\t\tsb = new StringBuffer();\n\t\tfor (Map.Entry<String, String> entry : info.entrySet()) {\n\t\t\tString key = entry.getKey();\n\t\t\tString value = entry.getValue();\n\t\t\tsb.append(key + \"=\" + value + \"\\r\\n\");\n\t\t}\n\t\tWriter writer = new StringWriter();\n\t\tPrintWriter pw = new PrintWriter(writer);\n\t\tex.printStackTrace(pw);\n\t\tThrowable cause = ex.getCause();\n\t\t// 循环着把所有的异常信息写入writer中\n\t\twhile (cause != null) {\n\t\t\tcause.printStackTrace(pw);\n\t\t\tcause = cause.getCause();\n\t\t}\n\t\tpw.close();// 记得关闭\n\t\tresult = writer.toString();\n\t\tsb.append(result);\n\t\t// 保存文件\n\t\tlong timetamp = System.currentTimeMillis();\n\t\tString time = format.format(new Date());\n\t\tString fileName = \"crash-\" + time + \"-\" + timetamp + \".log\";\n\t\tif (Environment.getExternalStorageState().equals(\n\t\t\t\tEnvironment.MEDIA_MOUNTED)) {\n\t\t\ttry {\n\t\t\t\tFile dir = new File(Environment.getExternalStorageDirectory()\n\t\t\t\t\t\t+ \"/crash/\");\n\t\t\t\tif (!dir.exists())\n\t\t\t\t\tdir.mkdir();\n\t\t\t\tFile file = new File(dir, fileName);\n\t\t\t\tFileOutputStream fos = new FileOutputStream(file);\n\t\t\t\tfos.write(sb.toString().getBytes());\n\t\t\t\tfos.close();\n\t\t\t\treturn file;\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Description.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.view.KeyEvent;\nimport cwp.moneycharge.model.ActivityManager;\n\npublic class Description extends Activity{\n\n\tIntent intentr;\n\tint userid;\n\tpublic Description() {\n\t\t// TODO Auto-generated constructor stub\n\t}\n\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.description);\n\t\tActivityManager.getInstance().addActivity(this);\n\t}\t\n\t\n\t@Override\n\tprotected void onStart() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onStart();// 实现基类中的方法//  调用自定义方法显示收入信息\n\t\tIntent intentr=getIntent();\n\t\tuserid=intentr.getIntExtra(\"cwp.id\",100000001);}\n\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t    if(keyCode == KeyEvent.KEYCODE_BACK) { //监控/拦截/屏蔽返回键\n\t    \tIntent intent=new Intent(Description.this,About.class);\n\t\t\tintent.putExtra(\"cwp.id\",userid);\n\t\t\tstartActivity(intent);\n\t        return true;\n\t    }\n\t    return super.onKeyDown(keyCode, event);\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/DialogShowUtil.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport android.app.Activity;\nimport android.content.Context;\nimport android.view.View;\nimport android.widget.EditText;\n\npublic class DialogShowUtil {\n\tprivate Context ctx;\n\tprivate Activity act;\n\tNiftyDialogBuilder dialogBuilder = null;\n\tprivate Effectstype effect; // 自定义Dialog\n\tString[] VoiceSave;\n\tstatic String type;\n\tstatic String VoiceDefault;\n\n\tpublic DialogShowUtil(Activity act, Context ctx, String[] VoiceSave,\n\t\t\tString type, String VoiceDefault) {\n\t\tthis.ctx = ctx;\n\t\tthis.act = act;\n\t\tthis.VoiceSave = VoiceSave;\n\t\tthis.type = type;\n\t\tthis.VoiceDefault = VoiceDefault;\n\t}\n\n\tpublic void dialogShow(String showtype, String style,\n\t\t\tfinal String context1, String context2) {\n\t\tdialogBuilder = new NiftyDialogBuilder(ctx, R.style.dialog_untran); // 自定义dialogBuilder\n\t\tswitch (showtype) {\n\t\tcase \"rotatebottom\":\n\t\t\teffect = Effectstype.RotateBottom;\n\t\t\tbreak;\n\t\tcase \"shake\":\n\t\t\teffect = Effectstype.Shake;\n\t\t\tbreak;\n\t\t}\n\n\t\tswitch (style) {\n\t\tcase \"first\":\n\t\t\tdialogBuilder.withTitle(\"语音记账\")\n\t\t\t\t\t// .withTitle(null) no title\n\t\t\t\t\t.withTitleColor(\"#FFFFFF\")\n\t\t\t\t\t// def\n\t\t\t\t\t.withDividerColor(\"#11000000\")\n\t\t\t\t\t// def\n\t\t\t\t\t.withMessage(\"语音格式：\\n早餐在餐厅食了20元。\\n\\n\")\n\t\t\t\t\t// .withMessage(null) no Msg\n\t\t\t\t\t.withMessageColor(\"#FFFFFF\")\n\t\t\t\t\t// def\n\t\t\t\t\t.withIcon(ctx.getResources().getDrawable(R.drawable.icon))\n\t\t\t\t\t.isCancelableOnTouchOutside(false) // def |//\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// isCancelable(true)\n\t\t\t\t\t.withDuration(700) // def\n\t\t\t\t\t.withEffect(effect) // def Effectstype.Slidetop\n\t\t\t\t\t.withButton1Text(\"取消\") // def gone\n\t\t\t\t\t.withButton2Text(\"开始语音\") // def gone\n\t\t\t\t\t.setButton1Click(new View.OnClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tdialogBuilder.dismiss();\n\t\t\t\t\t\t}\n\t\t\t\t\t}).setButton2Click(new View.OnClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tdialogBuilder.dismiss();\n\t\t\t\t\t\t\t((AddPay) act).VoiceRecognition();\n\t\t\t\t\t\t}\n\t\t\t\t\t}).show();\n\t\t\tbreak;\n\t\tcase \"notype\":\n\t\t\tdialogBuilder.withTitle(\"识别成功\")\n\t\t\t\t\t// .withTitle(null) no title\n\t\t\t\t\t.withTitleColor(\"#FFFFFF\")\n\t\t\t\t\t// def\n\t\t\t\t\t.withDividerColor(\"#11000000\")\n\t\t\t\t\t// def\n\t\t\t\t\t.withMessage(\"你刚刚说了“ \" + context1 + \"”\\n\\n\" + context2)\n\t\t\t\t\t// .withMessage(null) no Msg\n\t\t\t\t\t.withMessageColor(\"#FFFFFF\")\n\t\t\t\t\t// def\n\t\t\t\t\t.withIcon(ctx.getResources().getDrawable(R.drawable.icon))\n\t\t\t\t\t.isCancelableOnTouchOutside(false) // def |//\n\t\t\t\t\t.withDuration(700) // def\n\t\t\t\t\t.withEffect(effect) // def Effectstype.Slidetop\n\t\t\t\t\t.withButton1Text(\"取消\") // def gone\n\t\t\t\t\t.withButton2Text(\"是\") // def gone\n\t\t\t\t\t.setButton1Click(new View.OnClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tdialogBuilder.dismiss();\n\t\t\t\t\t\t}\n\t\t\t\t\t}).setButton2Click(new View.OnClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tdialogBuilder.dismiss();\n\t\t\t\t\t\t\tVoiceDefault = \"notype\";\n\t\t\t\t\t\t\tVoiceSave[3] = VoiceSave[3];\n\t\t\t\t\t\t\tdialogShow(\"shake\", \"judge\", context1, \"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}).show();\n\t\t\tbreak;\n\t\tcase \"wrong\":\n\t\t\tdialogBuilder\n\t\t\t\t\t.withTitle(\"识别失败\")\n\t\t\t\t\t// .withTitle(null) no title\n\t\t\t\t\t.withTitleColor(\"#FFFFFF\")\n\t\t\t\t\t// def\n\t\t\t\t\t.withDividerColor(\"#11000000\")\n\t\t\t\t\t// def\n\t\t\t\t\t.withMessage(\n\t\t\t\t\t\t\t\"你刚刚说了“ \" + context1 + \"”不符合格式，请再试一次\\n\\n\"\n\t\t\t\t\t\t\t\t\t+ context2)\n\t\t\t\t\t// .withMessage(null) no Msg\n\t\t\t\t\t.withMessageColor(\"#FFFFFF\")\n\t\t\t\t\t// def\n\t\t\t\t\t.withIcon(ctx.getResources().getDrawable(R.drawable.icon))\n\t\t\t\t\t.isCancelableOnTouchOutside(false) // def |\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// isCancelable(true)\n\t\t\t\t\t.withDuration(700) // def\n\t\t\t\t\t.withEffect(effect) // def Effectstype.Slidetop\n\t\t\t\t\t.withButton1Text(\"取消\") // def gone\n\t\t\t\t\t.withButton2Text(\"再次语音\") // def gone\n\t\t\t\t\t.setButton1Click(new View.OnClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tdialogBuilder.dismiss();\n\t\t\t\t\t\t}\n\t\t\t\t\t}).setButton2Click(new View.OnClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tdialogBuilder.dismiss();\n\t\t\t\t\t\t\t((AddPay) act).VoiceRecognition();\n\t\t\t\t\t\t}\n\t\t\t\t\t}).show();\n\t\t\tbreak;\n\t\tcase \"OK\":\n\t\t\tdialogBuilder.withTitle(\"识别成功\")\n\t\t\t\t\t// .withTitle(null) no title\n\t\t\t\t\t.withTitleColor(\"#FFFFFF\")\n\t\t\t\t\t// def\n\t\t\t\t\t.withDividerColor(\"#11000000\")\n\t\t\t\t\t// def\n\t\t\t\t\t.withMessage(\"成功！\\n你刚刚说了“\" + context1 + \"”，\\n是否确定要记录这条数据?\")\n\t\t\t\t\t// .withMessage(null) no Msg\n\t\t\t\t\t.withMessageColor(\"#FFFFFF\")\n\t\t\t\t\t// def\n\t\t\t\t\t.withIcon(ctx.getResources().getDrawable(R.drawable.icon))\n\t\t\t\t\t.isCancelableOnTouchOutside(false) // def |\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// isCancelable(true)\n\t\t\t\t\t.withDuration(700) // def\n\t\t\t\t\t.withEffect(effect) // def Effectstype.Slidetop\n\t\t\t\t\t.withButton1Text(\"取消\") // def gone\n\t\t\t\t\t.withButton2Text(\"确定\") // def gone\n\t\t\t\t\t.setButton1Click(new View.OnClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tdialogBuilder.dismiss();\n\t\t\t\t\t\t}\n\t\t\t\t\t}).setButton2Click(new View.OnClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tdialogBuilder.dismiss();\n\t\t\t\t\t\t\t((AddPay) act).VoiceSuccess();\n\t\t\t\t\t\t}\n\t\t\t\t\t}).show();\n\t\t\tbreak;\n\t\tcase \"judge\":\n\t\t\tdialogBuilder\n\t\t\t\t\t.withTitle(\"识别成功\")\n\t\t\t\t\t// .withTitle(null) no title\n\t\t\t\t\t.withTitleColor(\"#FFFFFF\")\n\t\t\t\t\t// def\n\t\t\t\t\t.withDividerColor(\"#11000000\")\n\t\t\t\t\t// def\n\t\t\t\t\t.withMessage(\n\t\t\t\t\t\t\t\"成功！\\n你刚刚说了“\" + context1 + \"”，\\n<\" + VoiceSave[3]\n\t\t\t\t\t\t\t\t\t+ \">类别需要你请确认该笔是<开支>还是<收入>?\\n\")\n\t\t\t\t\t// .withMessage(null) no Msg\n\t\t\t\t\t.withMessageColor(\"#FFFFFF\")\n\t\t\t\t\t// def\n\t\t\t\t\t.withIcon(ctx.getResources().getDrawable(R.drawable.icon))\n\t\t\t\t\t.isCancelableOnTouchOutside(false) // def |\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// isCancelable(true)\n\t\t\t\t\t.withDuration(700) // def\n\t\t\t\t\t.withEffect(effect) // def Effectstype.Slidetop\n\t\t\t\t\t.withButton1Text(\"开支\") // def gone\n\t\t\t\t\t.withButton2Text(\"收入\") // def gone\n\t\t\t\t\t.setButton1Click(new View.OnClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tdialogBuilder.dismiss();\n\t\t\t\t\t\t\ttype = \"pay\";\n\t\t\t\t\t\t\t((AddPay) act).VoiceSuccess();\n\t\t\t\t\t\t}\n\t\t\t\t\t}).setButton2Click(new View.OnClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tdialogBuilder.dismiss();\n\t\t\t\t\t\t\ttype = \"income\";\n\t\t\t\t\t\t\t((AddPay) act).VoiceSuccess();\n\t\t\t\t\t\t}\n\t\t\t\t\t}).show();\n\t\t\tbreak;\n\t\tcase \"quit\":\n\t\t\tdialogBuilder.withTitle(\"退出程序\")\n\t\t\t\t\t// .withTitle(null) no title\n\t\t\t\t\t.withTitleColor(\"#FFFFFF\")\n\t\t\t\t\t// def\n\t\t\t\t\t.withDividerColor(\"#11000000\")\n\t\t\t\t\t// def\n\t\t\t\t\t.withMessage(\"是否要退出程序？\\n\\n\")\n\t\t\t\t\t// .withMessage(null) no Msg\n\t\t\t\t\t.withMessageColor(\"#FFFFFF\")\n\t\t\t\t\t// def\n\t\t\t\t\t.withIcon(ctx.getResources().getDrawable(R.drawable.icon))\n\t\t\t\t\t.isCancelableOnTouchOutside(false) // def |\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// isCancelable(true)\n\t\t\t\t\t.withDuration(700) // def\n\t\t\t\t\t.withEffect(effect) // def Effectstype.Slidetop\n\t\t\t\t\t.withButton1Text(\"取消\") // def gone\n\t\t\t\t\t.withButton2Text(\"退出\") // def gone\n\t\t\t\t\t.setButton1Click(new View.OnClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tdialogBuilder.dismiss();\n\t\t\t\t\t\t}\n\t\t\t\t\t}).setButton2Click(new View.OnClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tSysApplication.getInstance().exit();\n\t\t\t\t\t\t}\n\t\t\t\t\t}).show();\n\t\t\tbreak;\n\t\t}\n\n\t}\n\n\tpublic static String dialoggettype() {\n\t\treturn type;\n\t}\n\n\tpublic static String dialogVoiceDefault() {\n\t\treturn VoiceDefault;\n\t}\n}"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/DigitUtil.java",
    "content": "package com.cwp.cmoneycharge;\n\n/**\n *  @author loiy\n *  www.agrilink.cn\n *  2012.11.30   \n */\nimport java.util.Hashtable;\n\npublic class DigitUtil {\n\n\t/**\n\t * 汉字中的数字字符\n\t */\n\tprivate static final Character[] SCDigits = { '零', '一', '二', '两', '三', '四',\n\t\t\t'五', '六', '七', '八', '九' };\n\n\t/**\n\t * 阿拉伯数字\n\t */\n\tprivate static final Character[] araDigits = { '0', '1', '2', '2', '3',\n\t\t\t'4', '5', '6', '7', '8', '9' };\n\n\t/**\n\t * 阿拉伯数字\n\t */\n\tprivate static Hashtable<Character, Character> araHash = new Hashtable<Character, Character>();\n\n\t/**\n\t * 阿拉伯数字\n\t */\n\tprivate static Hashtable<Character, Integer> YWQBSHash = new Hashtable<Character, Integer>();\n\n\tstatic {\n\t\tfor (int i = 0; i < SCDigits.length; i++) {\n\t\t\taraHash.put(SCDigits[i], araDigits[i]);\n\t\t}\n\t\tYWQBSHash.put('亿', 100000000);\n\t\tYWQBSHash.put('万', 10000);\n\t\tYWQBSHash.put('千', 1000);\n\t\tYWQBSHash.put('百', 100);\n\t\tYWQBSHash.put('十', 10);\n\t}\n\n\t/**\n\t * @param remain\n\t *            剩下多少个字符\n\t * @param curchar\n\t *            当前分析的字符\n\t */\n\tprivate static int ywqbs(int num, Boolean bool, int no, int remain,\n\t\t\tchar curchar, char lastshow) {\n\t\tif (num == 0) {\n\t\t\tnum += no;\n\t\t\treturn num;\n\t\t} else {\n\t\t\tString numString = String.valueOf(num); // 将num转换成String\n\t\t\tString last = numString.substring(numString.length() - 1,\n\t\t\t\t\tnumString.length()); // 获取最后一个字符\n\t\t\tString exceptlast = numString.substring(0, numString.length() - 1); // 获取除了最后一个字符所有字符串\n\t\t\tif (exceptlast.length() == 0) { // 说明num是个位值\n\t\t\t\tnum = Integer.parseInt(last) * no;\n\t\t\t\treturn num;\n\t\t\t} else {\n\t\t\t\t/***** 针对有连续的这些字符[十百千万亿] start *****/\n\t\t\t\tif (bool && YWQBSHash.get(curchar) > YWQBSHash.get(lastshow)) { // 说明上个字符属于[十百千万亿]\n\t\t\t\t\tnum *= no;\n\t\t\t\t\treturn num;\n\t\t\t\t}\n\t\t\t\t/***** 针对有连续的这些字符[十百千万亿] end *****/\n\t\t\t\t/***** 分析到最后一个字符 start *****/\n\t\t\t\t/**** 针对这种情况(一千二百二十一万) ****/\n\t\t\t\tif (remain == 1\n\t\t\t\t\t\t&& YWQBSHash.get(curchar) > YWQBSHash.get(lastshow)) {\n\t\t\t\t\tnum *= YWQBSHash.get(curchar);\n\t\t\t\t\treturn num;\n\t\t\t\t}\n\t\t\t\t/**** 针对这种情况(一千二百二十一万) ****/\n\t\t\t\t/***** 分析到最后一个字符 end *****/\n\t\t\t\t/***** last如果为0 start *****/\n\t\t\t\tif (last.equals(\"0\")) { // 循环到最后一位字符,last等于0\n\t\t\t\t\tlast = \"1\"; //\n\t\t\t\t}\n\t\t\t\t/***** last如果为0 end *****/\n\t\t\t\texceptlast = exceptlast + \"0\"; // 缺少最后一位,需要补上\n\t\t\t\tnum = Integer.parseInt(exceptlast) + Integer.parseInt(last)\n\t\t\t\t\t\t* no;\n\t\t\t\treturn num;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic static int parse(String word) {\n\t\tint num = 0;\n\t\tchar lastchar = '一'; // 上次字符,字符特指[十百千万亿],默认随便填写一个'一'\n\t\tchar lastshow = '一'; // 上次出现的字符,字符特指[十百千万亿],默认随便填写一个'一'\n\t\tchar[] ch = word.toCharArray();\n\t\tBoolean bool = false; // 是否连续出现[十百千万亿]\n\t\tfor (int i = 0; i < ch.length; i++) {\n\t\t\tCharacter find = araHash.get(ch[i]);// 获取阿拉伯数字数组[1,2,3...]\n\t\t\tif (find != null) {\n\t\t\t\tnum += Integer.parseInt(String.valueOf(find.charValue()));\n\t\t\t\tbool = false;\n\t\t\t\tlastchar = '一'; // 恢复到默认值\n\t\t\t\tcontinue;\n\t\t\t} else if (ch[i] == '十') {\n\t\t\t\tnum = ywqbs(num, bool, 10, ch.length - i, ch[i], lastshow);\n\t\t\t\tbool = true;\n\t\t\t\tlastchar = '十';\n\t\t\t\tlastshow = '十';\n\t\t\t} else if (ch[i] == '千') {\n\t\t\t\tnum = ywqbs(num, bool, 1000, ch.length - i, ch[i], lastshow);\n\t\t\t\tbool = true;\n\t\t\t\tlastchar = '千';\n\t\t\t\tlastshow = '千';\n\t\t\t} else if (ch[i] == '百') {\n\t\t\t\tnum = ywqbs(num, bool, 100, ch.length - i, ch[i], lastshow);\n\t\t\t\tbool = true;\n\t\t\t\tlastchar = '百';\n\t\t\t\tlastshow = '百';\n\t\t\t} else if (ch[i] == '万') {\n\t\t\t\tnum = ywqbs(num, bool, 10000, ch.length - i, ch[i], lastshow);\n\t\t\t\tbool = true;\n\t\t\t\tlastchar = '万';\n\t\t\t\tlastshow = '万';\n\t\t\t}\n\t\t}\n\t\tch = null;\n\t\treturn num;\n\t}\n\n\t// public static void main(String args[]) {\n\t// String wordes[] = {\n\t// \"一千二百二十一万\",\n\t// \"一千二百二十一\",\n\t// \"一千零十\",\n\t// \"一万零一百\",\n\t// \"一千零十一\",\n\t// \"一万零一百十一\",\n\t// \"一千二百十九\",\n\t// \"一千万\",\n\t// \"五十五\"\n\t// };\n\t// for(int i = 0; i < wordes.length; i++) {\n\t// DigitUtil t = new DigitUtil();\n\t// int num = t.parse(wordes[i]);\n\t// System.out.println(wordes[i] + \" \" + num);\n\t// }\n\t// }\n\n}"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Effectstype.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport com.cwp.cmoneycharge.RotateBottom;\nimport com.cwp.cmoneycharge.Shake;\n\n\n/**\n * Created by lee on 2014/7/30.\n */\npublic enum  Effectstype {\n\n\tSlidetop(SlideTop.class),\n    RotateBottom(RotateBottom.class),\n    Shake(Shake.class);\n    \n    private Class effectsClazz;\n\n    private Effectstype(Class mclass) {\n        effectsClazz = mclass;\n    }\n\n    public BaseEffects getAnimator() {\n        try {\n            return (BaseEffects) effectsClazz.newInstance();\n        } catch (Exception e) {\n            throw new Error(\"Can not init animatorClazz instance\");\n        }\n    }\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/FragmentPage1.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Calendar;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\nimport com.cwp.chart.MyAdspter;\nimport com.cwp.cmoneycharge.AddPay;\nimport com.cwp.cmoneycharge.ModifyInP;\nimport com.cwp.cmoneycharge.R;\n\nimport cwp.moneycharge.dao.IncomeDAO;\nimport cwp.moneycharge.dao.ItypeDAO;\nimport cwp.moneycharge.dao.PayDAO;\nimport cwp.moneycharge.dao.PtypeDAO;\nimport cwp.moneycharge.model.ActivityManager;\nimport cwp.moneycharge.model.Tb_income;\nimport cwp.moneycharge.model.Tb_pay;\n\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.view.KeyEvent;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.view.View.OnClickListener;\nimport android.widget.AdapterView;\nimport android.widget.ArrayAdapter;\nimport android.widget.Button;\nimport android.widget.ListView;\nimport android.widget.RelativeLayout;\nimport android.widget.TextView;\nimport android.widget.AdapterView.OnItemClickListener;\nimport android.widget.Toast;\n\npublic class FragmentPage1 extends BaseFrament {\n\tint userid;\n\tButton baddpay;\n\tTextView income_amount;\n\tTextView expense_amount;\n\tPtypeDAO ptypeDAO;\n\tItypeDAO itypeDAO;\n\tString nodata = \"\t\t还木有数据，赶紧买买买吧\";\n\n\tpublic void Pay() {\n\t\t// TODO Auto-generated constructor stub\n\t}\n\n\tListView lvinfo;// 创建ListView对象\n\tString strType = \"\";// 创建字符串，记录管理类型\n\tprivate MyAdspter adapter;\n\tprivate int defaultYear;\n\tprivate int defaultMonth;\n\tprivate int defaultDay;\n\tprivate String dmonth;\n\tprivate String dday;\n\tprivate String date2;\n\tprivate String date1;\n\tprivate RelativeLayout lvnodata;\n\tprivate TextView lvtime;\n\n\t@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\n\t\treturn inflater.inflate(R.layout.fragment_1, null);\n\t}\n\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tlvinfo = (ListView) getView().findViewById(R.id.lvoutaccountinfo);// 获取布局文件中的ListView组件\n\t\tbaddpay = (Button) getView().findViewById(R.id.add_expense_quickly_btn);// 添加按钮\n\t\tincome_amount = (TextView) getView().findViewById(R.id.income_amount);\n\t\texpense_amount = (TextView) getView().findViewById(R.id.expense_amount);\n\t\tlvtime = (TextView) getView().findViewById(R.id.lvtime);\n\t\tlvnodata = (RelativeLayout) getView().findViewById(R.id.lvnodata);\n\t\tptypeDAO = new PtypeDAO(getActivity().getApplicationContext());\n\t\titypeDAO = new ItypeDAO(getActivity().getApplicationContext());\n\t}\n\n\t@Override\n\tpublic void onStart() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onStart();// 实现基类中的方法// 调用自定义方法显示收入信息\n\t\tIntent intentr = getActivity().getIntent();\n\t\tuserid = intentr.getIntExtra(\"cwp.id\", 100000001);\n\t\tShowamount();\n\t\tShowInfo(R.id.btnoutinfo);\n\t\tlvinfo.setOnItemClickListener(new OnItemClickListener()// 为ListView添加项单击事件\n\t\t{\n\t\t\t// 覆写onItemClick方法\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tTextView txno = (TextView) view.findViewById(R.id.no);\n\t\t\t\tTextView txkind = (TextView) view.findViewById(R.id.kind);\n\t\t\t\tString strtype = ((String) txkind.getText()).substring(1,\n\t\t\t\t\t\t((String) txkind.getText()).indexOf(']')).trim();// 从收入信息中截取收支类型\n\t\t\t\tString strno = (String) txno.getText(); // 从信息中截取收支编号\n\t\t\t\tIntent intent = new Intent(getActivity(), AddPay.class);// 创建Intent对象\n\t\t\t\tif (strtype.equals(\"收入\")) {\n\t\t\t\t\tintent.putExtra(\"cwp.message\", new String[] { strno,\n\t\t\t\t\t\t\t\"btnininfo\" });// 设置传递数据\n\t\t\t\t}\n\t\t\t\tif (strtype.equals(\"支出\")) {\n\t\t\t\t\tintent.putExtra(\"cwp.message\", new String[] { strno,\n\t\t\t\t\t\t\t\"btnoutinfo\" });// 设置传递数据\n\t\t\t\t}\n\t\t\t\tintent.putExtra(\"cwp.id\", userid);\n\t\t\t\tstartActivity(intent);// 执行Intent操作\n\t\t\t}\n\t\t});\n\t\tbaddpay.setOnClickListener(new OnClickListener() { // 记一笔\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t// Intent intent = new Intent(getActivity(), AddIncome.class);\n\t\t\t\tIntent intent = new Intent(getActivity(), AddPay.class);// 创建Intent对象\n\t\t\t\tintent.putExtra(\"cwp.id\", userid);\n\t\t\t\tintent.putExtra(\"keyboard\", \"true\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate void Showamount() {\n\t\tPayDAO paydao = new PayDAO(getActivity().getApplicationContext());// 创建PayDAO对象\n\t\tIncomeDAO incomedao = new IncomeDAO(getActivity()\n\t\t\t\t.getApplicationContext());// 创建IncomeDAO对象\n\t\t// 获取所有收入信息，并存储到List泛型集合中\n\t\tDouble incomeamount = incomedao.getamountData(userid);\n\t\tDouble payamount = paydao.getamountData(userid);\n\t\tincome_amount.setText(\"¥ \" + incomeamount);\n\t\texpense_amount.setText(\"¥ \" + payamount);\n\t}\n\n\tprivate void ShowInfo(int intType) {// 用来根据传入的管理类型，显示相应的信息\n\t\tstrType = \"btnoutinfo\";// 为strType变量赋值\n\t\tPayDAO paydao = new PayDAO(getActivity().getApplicationContext());// 创建PayDAO对象\n\t\t// 获取所有收入信息，并存储到List泛型集合中\n\t\tList<Tb_pay> listinfos = paydao.getScrollData(userid, 0,\n\t\t\t\t(int) paydao.getCount(userid));\n\n\t\tIncomeDAO incomedao = new IncomeDAO(getActivity()\n\t\t\t\t.getApplicationContext());// 创建IncomeDAO对象\n\t\tfinal Calendar c = Calendar.getInstance();// 获取当前系统日期\n\t\tdefaultYear = c.get(Calendar.YEAR);// 获取年份\n\t\tdefaultMonth = c.get(Calendar.MONTH) + 1;// 获取月份\n\t\tdefaultDay = c.get(Calendar.DAY_OF_MONTH);// 获取天数\n\t\tlvtime.setText(\"今天是\" + defaultYear + \"年\" + defaultMonth + \"月\"\n\t\t\t\t+ defaultDay + \"日\");\n\t\tif (defaultMonth < 10) {\n\t\t\tdmonth = \"0\" + Integer.toString(defaultMonth);\n\t\t} else {\n\t\t\tdmonth = Integer.toString(defaultMonth);\n\t\t}\n\t\tif (defaultDay < 10) {\n\t\t\tdday = \"0\" + Integer.toString(defaultDay);\n\t\t} else {\n\t\t\tdday = Integer.toString(defaultDay);\n\t\t}\n\t\tdate2 = Integer.toString(defaultYear) + \"-\" + dmonth + \"-\" + dday;\n\t\tdate1 = Integer.toString(defaultYear) + \"-\" + dmonth + \"-\" + dday;\n\t\tList<Tb_income> listinfos2 = incomedao.getScrollDataTotal(userid, 0, 0,\n\t\t\t\tdate1, date2);\n\t\t// System.out.println(\"listinfos2\" + listinfos2.size());\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String, Object>>();\n\t\tif (listinfos2.size() == 0) {\n\t\t\tlvnodata.setVisibility(View.VISIBLE);\n\t\t\tlvinfo.setVisibility(View.GONE);\n\t\t} else {\n\t\t\tlvnodata.setVisibility(View.GONE);\n\t\t\tlvinfo.setVisibility(View.VISIBLE);\n\t\t\tfor (Tb_income tb_income : listinfos2) {// 遍历List泛型集合\n\t\t\t\t// 将收入相关信息组合成一个字符串，存储到字符串数组的相应位置\n\t\t\t\tif (tb_income.getKind().equals(\"收入\")) { // 收入\n\t\t\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\t\tmap.put(\"img\",\n\t\t\t\t\t\t\titypeDAO.getOneImg(userid, tb_income.getType()));\n\t\t\t\t\tmap.put(\"no\", tb_income.getNo() + \"\");\n\t\t\t\t\tmap.put(\"kind\", \"[\" + tb_income.getKind() + \"]\");\n\t\t\t\t\tmap.put(\"money\", \"￥ \" + tb_income.getMoney2() + \"元\");\n\t\t\t\t\tmap.put(\"title\",\n\t\t\t\t\t\t\titypeDAO.getOneName(userid, tb_income.getType()));\n\t\t\t\t\tmap.put(\"info\", tb_income.getTime());\n\t\t\t\t\tlist.add(map);\n\t\t\t\t} else { // 支出\n\t\t\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\t\tmap.put(\"img\",\n\t\t\t\t\t\t\tptypeDAO.getOneImg(userid, tb_income.getType()));\n\t\t\t\t\tmap.put(\"no\", tb_income.getNo() + \"\");\n\t\t\t\t\tmap.put(\"kind\", \"[\" + tb_income.getKind() + \"]\");\n\t\t\t\t\tmap.put(\"money\", \"￥ \" + tb_income.getMoney2() + \"元\");\n\t\t\t\t\tmap.put(\"title\",\n\t\t\t\t\t\t\tptypeDAO.getOneName(userid, tb_income.getType()));\n\t\t\t\t\tmap.put(\"info\", tb_income.getTime());\n\t\t\t\t\tlist.add(map);\n\t\t\t\t}\n\t\t\t}\n\t\t\tadapter = new MyAdspter(getActivity(), list, false);\n\t\t\tlvinfo.setAdapter(adapter);// 为ListView列表设置数据源\n\t\t}\n\t}\n\n\t@Override\n\tpublic void filngtonext() {\n\t\tFragmentPage2.clickMyfeedBtn();\n\t}\n\n\t@Override\n\tpublic void filngtonpre() {\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/FragmentPage2.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport com.cwp.cmoneycharge.R;\n\nimport android.content.Context;\nimport android.content.Intent;\nimport android.graphics.drawable.BitmapDrawable;\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.support.v4.app.FragmentActivity;\nimport android.support.v4.app.FragmentTransaction;\nimport android.util.DisplayMetrics;\nimport android.view.LayoutInflater;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.view.View.OnClickListener;\nimport android.view.View.OnTouchListener;\nimport android.widget.ArrayAdapter;\nimport android.widget.FrameLayout;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.ListView;\nimport android.widget.PopupWindow;\nimport android.widget.PopupWindow.OnDismissListener;\n\npublic class FragmentPage2 extends Fragment implements OnClickListener {\n\tstatic int userid;\n\tprivate static FragmentPage1 fragmentPage1;\n\tprivate FragmentPage2 fragmentPage2;\n\tprivate static FragmentPage3 fragmentPage3;\n\tprivate static FragmentPage4 fragmentPage4;\n\t// 定义布局对象\n\tprivate static FrameLayout friendfeedFl;\n\tprivate static FrameLayout myfeedFl;\n\tprivate static FrameLayout homeFl;\n\tprivate static FrameLayout moreFl;\n\n\t// 定义图片组件对象\n\tprivate static ImageView friendfeedIv;\n\tprivate static ImageView myfeedIv;\n\tprivate static ImageView homeIv;\n\tprivate static ImageView moreIv;\n\n\t// 定义按钮图片组件\n\tprivate ImageView toggleImageView, plusImageView;\n\n\t// 定义PopupWindow\n\tprivate PopupWindow popWindow;\n\tprivate LinearLayout popWinLayout;\n\n\t// 定义pop组件\n\tprivate LinearLayout pop_voiceView;\n\tprivate LinearLayout pop_quickView;\n\n\tint value = 0;\n\tprivate LinearLayout pop_photoView;\n\n\tstatic FragmentActivity act;\n\n\tpublic FragmentPage2(FragmentActivity activity) {\n\t\tact = activity;\n\t}\n\n\tpublic FragmentPage2() {\n\t}\n\n\t@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\n\t\treturn inflater.inflate(R.layout.fragment_2, null);\n\t}\n\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\n\t\tIntent intentr = getActivity().getIntent();\n\t\tuserid = intentr.getIntExtra(\"cwp.id\", 100000001);\n\n\t\tinitView();\n\t\tinitData();\n\n\t\tswitch (value) {\n\t\tcase 0:\n\t\t\tclickFriendfeedBtn();\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tclickFriendfeedBtn();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tclickMyfeedBtn();\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tclickHomeBtn();\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tclickMoreBtn();\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t/**\n\t * 初始化组件\n\t */\n\tpublic void initView() {\n\t\tvalue = MainActivity.getValueFM();\n\t\t// 实例化布局对象\n\t\tfriendfeedFl = (FrameLayout) getActivity().findViewById(\n\t\t\t\tR.id.layout_friendfeed);\n\t\tmyfeedFl = (FrameLayout) getActivity().findViewById(R.id.layout_myfeed);\n\t\thomeFl = (FrameLayout) getActivity().findViewById(R.id.layout_home);\n\t\tmoreFl = (FrameLayout) getActivity().findViewById(R.id.layout_more);\n\n\t\t// 实例化图片组件对象\n\t\tfriendfeedIv = (ImageView) getActivity().findViewById(\n\t\t\t\tR.id.image_friendfeed);\n\t\tmyfeedIv = (ImageView) getActivity().findViewById(R.id.image_myfeed);\n\t\thomeIv = (ImageView) getActivity().findViewById(R.id.image_home);\n\t\tmoreIv = (ImageView) getActivity().findViewById(R.id.image_more);\n\n\t\t// 实例化按钮图片组件\n\t\ttoggleImageView = (ImageView) getActivity().findViewById(\n\t\t\t\tR.id.toggle_btn);\n\t\tplusImageView = (ImageView) getActivity().findViewById(R.id.plus_btn);\n\t}\n\n\tprivate void initData() {\n\t\t// 给布局对象设置监听\n\t\tfriendfeedFl.setOnClickListener(this);\n\t\tmyfeedFl.setOnClickListener(this);\n\t\thomeFl.setOnClickListener(this);\n\t\tmoreFl.setOnClickListener(this);\n\n\t\t// 给按钮图片设置监听\n\t\ttoggleImageView.setOnClickListener(this);\n\t}\n\n\t@Override\n\tpublic void onClick(View v) {\n\t\t// System.out.println(\"我按了\" + v.getId());\n\t\tswitch (v.getId()) {\n\t\t// 点击动态按钮\n\t\tcase R.id.layout_friendfeed:\n\t\t\tclickFriendfeedBtn();\n\t\t\tbreak;\n\t\t// 点击与我相关按钮\n\t\tcase R.id.layout_myfeed:\n\t\t\tclickMyfeedBtn();\n\t\t\tbreak;\n\t\t// 点击我的空间按钮\n\t\tcase R.id.layout_home:\n\t\t\tclickHomeBtn();\n\t\t\tbreak;\n\t\t// 点击更多按钮\n\t\tcase R.id.layout_more:\n\t\t\tclickMoreBtn();\n\t\t\tbreak;\n\t\t// 点击中间按钮\n\t\tcase R.id.toggle_btn:\n\t\t\tclickToggleBtn();\n\t\t\tbreak;\n\t\t// 点击中间按钮\n\t\tcase R.id.pop_voice:\n\t\t\tclickPop_voiceBtn();\n\t\t\tbreak;\n\t\tcase R.id.pop_quick:\n\t\t\tclickPop_quickBtn();\n\t\t\tbreak;\n\t\tcase R.id.pop_photo:\n\t\t\tclickPop_photoViewBtn();\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tprivate void clickPop_photoViewBtn() {\n\t\tIntent intent = new Intent(getActivity(), AddPay.class);// 创建Intent对象\n\t\tintent.putExtra(\"cwp.id\", userid);\n\t\tintent.putExtra(\"cwp.photo\", \"\");// 设置传递数据\n\t\tstartActivity(intent);\n\t}\n\n\t/**\n\t * 显示PopupWindow弹出菜单\n\t */\n\tprivate void showPopupWindow(View parent) {\n\t\tDisplayMetrics dm = parent.getResources().getDisplayMetrics();\n\t\tint w_screen = dm.widthPixels;\n\t\tint h_screen = dm.heightPixels;\n\t\t// System.out.println(\"你的设备w_screen：\" + w_screen + \" h_screen：\" +\n\t\t// h_screen);\n\t\tif (popWindow == null) {\n\t\t\tLayoutInflater layoutInflater = (LayoutInflater) getActivity()\n\t\t\t\t\t.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n\t\t\tView view = layoutInflater.inflate(R.layout.popwindow_layout, null);\n\t\t\tpopWinLayout = (LinearLayout) view.findViewById(R.id.popwindow);\n\t\t\t// 创建一个PopuWidow对象\n\t\t\tfloat radiowith = w_screen / 480.0f;\n\t\t\tfloat radioheight = h_screen / 800.0f;\n\t\t\tpopWindow = new PopupWindow(view,\n\t\t\t\t\t(int) (popWinLayout.getLayoutParams().width), h_screen / 4);\n\t\t}\n\t\t// 使其聚集 ，要想监听菜单里控件的事件就必须要调用此方法\n\t\tpopWindow.setFocusable(true);\n\n\t\tpop_voiceView = (LinearLayout) popWinLayout\n\t\t\t\t.findViewById(R.id.pop_voice);\n\t\tpop_quickView = (LinearLayout) popWinLayout\n\t\t\t\t.findViewById(R.id.pop_quick);\n\t\tpop_photoView = (LinearLayout) popWinLayout\n\t\t\t\t.findViewById(R.id.pop_photo);\n\t\tpop_voiceView.setOnClickListener(this);\n\t\tpop_quickView.setOnClickListener(this);\n\t\tpop_photoView.setOnClickListener(this);\n\n\t\t// 设置允许在外点击消失\n\t\tpopWindow.setOutsideTouchable(true);\n\t\t// 设置背景，这个是为了点击“返回Back”也能使其消失，并且并不会影响你的背景\n\t\tpopWindow.setBackgroundDrawable(new BitmapDrawable());\n\t\t// 设置菜单显示的位置\n\n\t\tint xPos = (w_screen - popWinLayout.getLayoutParams().width) / 2;\n\t\tpopWindow.showAsDropDown(parent, xPos, 12);\n\t\t// popWindow.showAsDropDown(parent, Gravity.CENTER, 0);\n\n\t\t// 监听菜单的关闭事件\n\t\tpopWindow.setOnDismissListener(new OnDismissListener() {\n\t\t\t@Override\n\t\t\tpublic void onDismiss() {\n\t\t\t\t// 改变显示的按钮图片为正常状态\n\t\t\t\tchangeButtonImage();\n\t\t\t}\n\t\t});\n\n\t\t// 监听触屏事件\n\t\tpopWindow.setTouchInterceptor(new OnTouchListener() {\n\t\t\tpublic boolean onTouch(View view, MotionEvent event) {\n\t\t\t\tif (event.getAction() == MotionEvent.ACTION_OUTSIDE) {\n\t\t\t\t\t// 改变显示的按钮图片为正常状态\n\t\t\t\t\tchangeButtonImage();\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * 点击了“动态”按钮\n\t */\n\tpublic static void clickFriendfeedBtn() {\n\t\t// 实例化Fragment页面\n\t\tfragmentPage1 = new FragmentPage1();\n\t\t// 得到Fragment事务管理器\n\t\tFragmentTransaction fragmentTransaction;\n\t\tfragmentTransaction = act.getSupportFragmentManager()\n\t\t\t\t.beginTransaction();\n\n\t\t// 替换当前的页面\n\t\tfragmentTransaction.replace(R.id.frame_content, fragmentPage1);\n\t\t// 事务管理提交\n\t\tfragmentTransaction.commit();\n\n\t\tfriendfeedFl.setSelected(true);\n\t\tfriendfeedIv.setSelected(true);\n\n\t\tmyfeedFl.setSelected(false);\n\t\tmyfeedIv.setSelected(false);\n\n\t\thomeFl.setSelected(false);\n\t\thomeIv.setSelected(false);\n\n\t\tmoreFl.setSelected(false);\n\t\tmoreIv.setSelected(false);\n\t}\n\n\t/**\n\t * 点击了“与我相关”按钮\n\t */\n\tpublic static void clickMyfeedBtn() {\n\n\t\t// Intent intentr = new Intent(getActivity(), PayData.class);\n\t\tIntent intentr = new Intent(act, PayChart.class);\n\t\tintentr.putExtra(\"cwp.id\", userid);\n\t\tintentr.putExtra(\"type\", 0);\n\t\tact.startActivity(intentr);\n\t\tact.overridePendingTransition(android.R.anim.fade_in,\n\t\t\t\tandroid.R.anim.fade_out);\n\n\t}\n\n\t/**\n\t * 点击了“我的空间”按钮\n\t */\n\tpublic static void clickHomeBtn() {\n\t\t// 实例化Fragment页面\n\t\tfragmentPage3 = new FragmentPage3();\n\t\t// 得到Fragment事务管理器\n\t\tFragmentTransaction fragmentTransaction = act\n\t\t\t\t.getSupportFragmentManager().beginTransaction();\n\t\t// 替换当前的页面\n\t\tfragmentTransaction.replace(R.id.frame_content, fragmentPage3);\n\t\t// 事务管理提交\n\t\tfragmentTransaction.commit();\n\n\t\tfriendfeedFl.setSelected(false);\n\t\tfriendfeedIv.setSelected(false);\n\n\t\tmyfeedFl.setSelected(false);\n\t\tmyfeedIv.setSelected(false);\n\n\t\thomeFl.setSelected(true);\n\t\thomeIv.setSelected(true);\n\n\t\tmoreFl.setSelected(false);\n\t\tmoreIv.setSelected(false);\n\t}\n\n\t/**\n\t * 点击了“更多”按钮\n\t */\n\tpublic static void clickMoreBtn() {\n\t\t// 实例化Fragment页面\n\t\tfragmentPage4 = new FragmentPage4();\n\t\t// 得到Fragment事务管理器\n\t\tFragmentTransaction fragmentTransaction = act\n\t\t\t\t.getSupportFragmentManager().beginTransaction();\n\t\t// 替换当前的页面\n\t\tfragmentTransaction.replace(R.id.frame_content, fragmentPage4);\n\t\t// 事务管理提交\n\t\tfragmentTransaction.commit();\n\n\t\tfriendfeedFl.setSelected(false);\n\t\tfriendfeedIv.setSelected(false);\n\n\t\tmyfeedFl.setSelected(false);\n\t\tmyfeedIv.setSelected(false);\n\n\t\thomeFl.setSelected(false);\n\t\thomeIv.setSelected(false);\n\n\t\tmoreFl.setSelected(true);\n\t\tmoreIv.setSelected(true);\n\t}\n\n\tprivate void clickPop_voiceBtn() {\n\n\t\tIntent intent = new Intent(getActivity(), AddPay.class);// 创建Intent对象\n\t\tintent.putExtra(\"cwp.id\", userid);\n\t\tintent.putExtra(\"cwp.voice\", \"\");// 设置传递数据\n\t\tstartActivity(intent);\n\t}\n\n\tprivate void clickPop_quickBtn() {\n\n\t\tIntent intent = new Intent(getActivity(), AddPay.class);// 创建Intent对象\n\t\tintent.putExtra(\"cwp.id\", userid);\n\t\tintent.putExtra(\"keyboard\", \"true\");\n\t\tstartActivity(intent);\n\t}\n\n\t/**\n\t * 点击了中间按钮\n\t */\n\tprivate void clickToggleBtn() {\n\t\tshowPopupWindow(plusImageView);\n\t\t// 改变按钮显示的图片为按下时的状态\n\t\tplusImageView.setImageResource(R.drawable.toolbar_plusback);\n\t\ttoggleImageView.setImageResource(R.drawable.toolbar_btn_pressed);\n\t}\n\n\t/**\n\t * 改变显示的按钮图片为正常状态\n\t */\n\tprivate void changeButtonImage() {\n\t\tplusImageView.setImageResource(R.drawable.toolbar_plus);\n\t\ttoggleImageView.setImageResource(R.drawable.toolbar_btn_normal);\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/FragmentPage3.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport java.text.SimpleDateFormat;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Calendar;\nimport java.util.Date;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\nimport com.cwp.chart.FoldingLayout;\nimport com.cwp.chart.PullToRefreshView;\nimport com.cwp.chart.PullToRefreshView.OnFooterRefreshListener;\nimport com.cwp.chart.PullToRefreshView.OnHeaderRefreshListener;\nimport com.cwp.chart.RiseNumberTextView;\n\nimport cwp.moneycharge.dao.IncomeDAO;\nimport cwp.moneycharge.dao.ItypeDAO;\nimport cwp.moneycharge.dao.PayDAO;\nimport cwp.moneycharge.dao.PtypeDAO;\nimport cwp.moneycharge.model.KindData;\nimport cwp.moneycharge.model.Tb_income;\nimport cwp.moneycharge.model.Tb_pay;\n\nimport android.annotation.SuppressLint;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.graphics.Color;\nimport android.net.ParseException;\nimport android.os.Bundle;\nimport android.os.Handler;\nimport android.os.Message;\nimport android.support.v4.app.Fragment;\nimport android.view.LayoutInflater;\n\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.view.View.OnClickListener;\nimport android.view.animation.Animation;\nimport android.view.animation.AnimationUtils;\nimport android.view.animation.TranslateAnimation;\nimport android.view.animation.Animation.AnimationListener;\nimport android.widget.AdapterView;\nimport android.widget.ArrayAdapter;\nimport android.widget.BaseExpandableListAdapter;\nimport android.widget.ExpandableListView;\nimport android.widget.ExpandableListView.OnChildClickListener;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.ListView;\nimport android.widget.RelativeLayout;\nimport android.widget.TextView;\nimport android.widget.Toast;\nimport android.widget.AdapterView.OnItemClickListener;\n\n@SuppressLint(\"InflateParams\")\npublic class FragmentPage3 extends BaseFrament implements\n\t\tOnHeaderRefreshListener, OnFooterRefreshListener {\n\n\tTextView sum_pay, sum_income, sum_title, February_date;\n\tListView scrollview;\n\tArrayAdapter<String> arrayAdapter = null;// 创建ArrayAdapter对象\n\tString[] strInfos = null;// 定义字符串数组，用来存储收入信息\n\tInteger[] newStr = null;\n\tprivate PullToRefreshView mPullToRefreshView;\n\n\tPayDAO payDAO;\n\tIncomeDAO incomeDAO;\n\tList<Tb_pay> list_pay;\n\tList<Tb_income> list_income;\n\tList<KindData> KindDatap;\n\tPtypeDAO ptypeDAO;\n\tItypeDAO itypeDAO;\n\tstatic int defaultYear;\n\tint defaultMonth;\n\tint defaultDay;\n\tint userid, height;\n\tString dmonth, dday, date1, date2;\n\tList<Integer> list2;\n\tAnimation pushup, pushout;\n\tRelativeLayout searchButton;\n\tLinearLayout frag3, fragall;\n\tprivate ExpandableListView elv;\n\tprivate ArrayList<Map<String, String>> groups;\n\tprivate ArrayList<List<Map<String, String>>> childs;\n\tprivate ArrayList<Map<String, String>> child1;\n\tprivate RiseNumberTextView sum_total;\n\n\t@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\n\t\treturn inflater.inflate(R.layout.fragment_3, null);\n\t}\n\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\n\t\tfinal Calendar c = Calendar.getInstance();// 获取当前系统日期\n\t\tdefaultYear = c.get(Calendar.YEAR);// 获取年份\n\t\tdefaultMonth = c.get(Calendar.MONTH) + 1;// 获取月份\n\n\t\tfindViews();\n\n\t\tinitData(0);\n\n\t\telv.setOnChildClickListener(new OnChildClickListener() {\n\t\t\t@Override\n\t\t\tpublic boolean onChildClick(ExpandableListView parent, View view,\n\t\t\t\t\tint groupPosition, int childPosition, long id) {\n\t\t\t\tTextView txno = (TextView) view.findViewById(R.id.no);\n\t\t\t\tTextView txkind = (TextView) view.findViewById(R.id.kind);\n\t\t\t\tString strtype = ((String) txkind.getText()).substring(1,\n\t\t\t\t\t\t((String) txkind.getText()).indexOf(']')).trim();// 从收入信息中截取收支类型\n\t\t\t\tString strno = (String) txno.getText(); // 从信息中截取收支编号\n\t\t\t\tIntent intent = new Intent(getActivity(), AddPay.class);// 创建Intent对象\n\t\t\t\tif (strtype.equals(\"收入\")) {\n\t\t\t\t\tintent.putExtra(\"cwp.message\", new String[] { strno,\n\t\t\t\t\t\t\t\"btnininfo\" });// 设置传递数据\n\t\t\t\t}\n\t\t\t\tif (strtype.equals(\"支出\")) {\n\t\t\t\t\tintent.putExtra(\"cwp.message\", new String[] { strno,\n\t\t\t\t\t\t\t\"btnoutinfo\" });// 设置传递数据\n\t\t\t\t}\n\t\t\t\tintent.putExtra(\"cwp.id\", userid);\n\t\t\t\tintent.putExtra(\"cwp.frament3\", \"3\");\n\t\t\t\tstartActivity(intent);// 执行Intent操作\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t});\n\t}\n\n\tprivate void initData(int newyear) {\n\t\tint pay_sum = 0;\n\t\tint income_sum = 0;\n\n\t\tpayDAO = new PayDAO(getActivity());\n\t\tptypeDAO = new PtypeDAO(getActivity());\n\t\tincomeDAO = new IncomeDAO(getActivity());\n\t\titypeDAO = new ItypeDAO(getActivity());\n\n\t\tswitch (newyear) {\n\t\tcase 1:\n\t\t\tdefaultYear++;\n\t\t\tbreak;\n\t\tcase -1:\n\t\t\tdefaultYear--;\n\t\t\tbreak;\n\t\t}\n\n\t\tIntent intentr = getActivity().getIntent();\n\t\tuserid = intentr.getIntExtra(\"cwp.id\", 100000001);\n\n\t\tsum_title.setText(Integer.toString(defaultYear) + \"年结余\");\n\n\t\tlist_income = incomeDAO.getScrollData(userid, 0, // 取每年的收入数据\n\t\t\t\t(int) incomeDAO.getCount(userid), Integer.toString(defaultYear)\n\t\t\t\t\t\t+ \"-01-01\", Integer.toString(defaultYear) + \"-12-31\");\n\n\t\tlist_pay = payDAO.getScrollData(userid, 0, // 取每年的支出数据\n\t\t\t\t(int) payDAO.getCount(userid), Integer.toString(defaultYear)\n\t\t\t\t\t\t+ \"-01-01\", Integer.toString(defaultYear) + \"-12-31\");\n\t\tInteger[] str = new Integer[list_income.size() + list_pay.size()];\n\n\t\tgroups = new ArrayList<Map<String, String>>();\n\t\tchilds = new ArrayList<List<Map<String, String>>>();\n\t\tif (list_income.size() == 0) { // 处理listview\n\t\t\tsum_income.setText(\"￥ 0.0\");\n\t\t}\n\t\tif (list_pay.size() == 0) {\n\t\t\tsum_pay.setText(\"￥ 0.0\");\n\t\t}\n\t\tif ((list_income.size() == 0) && (list_pay.size() == 0)) {\n\t\t\tsum_total.setText(\"￥ 0.0\");\n\t\t\tMap<String, String> group1 = new HashMap<String, String>();\n\t\t\tgroup1.put(\"isnodata\", \"true\");\n\t\t\tgroups.add(group1);\n\t\t} else {\n\n\t\t\tint n = 0;\n\t\t\tfor (Tb_pay tb_pay : list_pay) {// 遍历List泛型集合\n\t\t\t\t// 将收入相关信息组合成一个字符串，存储到字符串数组的相应位置\n\t\t\t\tpay_sum += tb_pay.getMoney();\n\t\t\t\tstr[n] = Integer.parseInt(tb_pay.getTime().substring(5, 7));\n\t\t\t\tn++;\n\t\t\t}\n\t\t\tfor (Tb_income tb_income : list_income) {// 遍历List泛型集合\n\t\t\t\t// 将收入相关信息组合成一个字符串，存储到字符串数组的相应位置\n\t\t\t\tincome_sum += tb_income.getMoney();\n\t\t\t\tstr[n] = Integer.parseInt(tb_income.getTime().substring(5, 7));\n\t\t\t\tn++;\n\t\t\t}\n\t\t\tsum_pay.setText(\"￥ \" + String.valueOf(pay_sum));\n\t\t\tsum_income.setText(\"￥ \" + String.valueOf(income_sum));\n\t\t\tfinal int ip_sum = income_sum - pay_sum;\n\t\t\tsum_total.withNumber(ip_sum);\n\t\t\tsum_total.start();\n\t\t\tlist2 = new ArrayList<Integer>();\n\t\t\tfor (int i = 0; i < str.length; i++) {\n\t\t\t\tif (!list2.contains(str[i])) {// 如果数组 list 不包含当前项，则增加该项到数组中\n\t\t\t\t\tlist2.add(str[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tnewStr = list2.toArray(new Integer[1]);\n\t\t\tArrays.sort(newStr);\n\n\t\t\tfor (int i = newStr.length; i > 0; i--) { // 循环获取数据\n\t\t\t\tint sum = 0;\n\n\t\t\t\tif (newStr[i - 1] < 10) {\n\t\t\t\t\tdmonth = \"0\" + Integer.toString(newStr[i - 1]);\n\t\t\t\t} else {\n\t\t\t\t\tdmonth = Integer.toString(newStr[i - 1]);\n\t\t\t\t}\n\t\t\t\tdate1 = Integer.toString(defaultYear) + \"-\" + dmonth + \"-01\";\n\t\t\t\tdate2 = Integer.toString(defaultYear) + \"-\" + dmonth + \"-31\";\n\n\t\t\t\tList<Tb_income> listinfos2 = incomeDAO.getScrollDataTotal(\n\t\t\t\t\t\tuserid, 0, // 取每个月的数据\n\t\t\t\t\t\t(int) incomeDAO.getCount(userid), date1, date2);\n\t\t\t\tif (listinfos2.size() != 0) {\n\t\t\t\t\tchild1 = new ArrayList<Map<String, String>>();\n\t\t\t\t\tfor (Tb_income tb_income : listinfos2) {// 遍历List泛型集合\n\t\t\t\t\t\t// 将收入相关信息组合成一个字符串，存储到字符串数组的相应位置\n\t\t\t\t\t\tif (tb_income.getKind().equals(\"收入\")) { // 收入\n\t\t\t\t\t\t\t// 准备第一个一级列表中的二级列表数据:两个二级列表,分别显示\"childData1\"和\"childData2\"\n\t\t\t\t\t\t\tMap<String, String> Data1 = new HashMap<String, String>();\n\t\t\t\t\t\t\tData1.put(\"img\", String.valueOf(itypeDAO.getOneImg(\n\t\t\t\t\t\t\t\t\tuserid, tb_income.getType())));\n\t\t\t\t\t\t\tData1.put(\"no\", tb_income.getNo() + \"\");\n\t\t\t\t\t\t\tData1.put(\"kind\", \"[\" + tb_income.getKind() + \"]\");\n\t\t\t\t\t\t\tData1.put(\"money\", \"￥ \" + tb_income.getMoney2()\n\t\t\t\t\t\t\t\t\t+ \"元\");\n\t\t\t\t\t\t\tData1.put(\n\t\t\t\t\t\t\t\t\t\"title\",\n\t\t\t\t\t\t\t\t\titypeDAO.getOneName(userid,\n\t\t\t\t\t\t\t\t\t\t\ttb_income.getType()));\n\t\t\t\t\t\t\tData1.put(\"info\", tb_income.getTime());\n\t\t\t\t\t\t\tData1.put(\"date\", gofordate(tb_income.getTime()));\n\t\t\t\t\t\t\tchild1.add(Data1);\n\t\t\t\t\t\t\tsum += tb_income.getMoney();\n\t\t\t\t\t\t} else { // 支出\n\t\t\t\t\t\t\tMap<String, String> Data1 = new HashMap<String, String>();\n\t\t\t\t\t\t\tData1.put(\"img\", String.valueOf(ptypeDAO.getOneImg(\n\t\t\t\t\t\t\t\t\tuserid, tb_income.getType())));\n\t\t\t\t\t\t\tData1.put(\"no\", tb_income.getNo() + \"\");\n\t\t\t\t\t\t\tData1.put(\"kind\", \"[\" + tb_income.getKind() + \"]\");\n\t\t\t\t\t\t\tData1.put(\"money\", \"￥ \" + tb_income.getMoney2()\n\t\t\t\t\t\t\t\t\t+ \"元\");\n\t\t\t\t\t\t\tData1.put(\n\t\t\t\t\t\t\t\t\t\"title\",\n\t\t\t\t\t\t\t\t\tptypeDAO.getOneName(userid,\n\t\t\t\t\t\t\t\t\t\t\ttb_income.getType()));\n\t\t\t\t\t\t\tData1.put(\"info\", tb_income.getTime());\n\t\t\t\t\t\t\tData1.put(\"date\", gofordate(tb_income.getTime()));\n\t\t\t\t\t\t\tchild1.add(Data1);\n\t\t\t\t\t\t\tsum -= tb_income.getMoney();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// 准备一级列表中显示的数据:2个一级列表,分别显示\"group1\"和\"group2\"\n\t\t\t\t\tMap<String, String> group1 = new HashMap<String, String>();\n\t\t\t\t\tgroup1.put(\"day\", (newStr[i - 1]) + \"月\");\n\t\t\t\t\tgroup1.put(\n\t\t\t\t\t\t\t\"time\",\n\t\t\t\t\t\t\tincomeDAO.gettime(defaultYear, (newStr[i - 1]), 0,\n\t\t\t\t\t\t\t\t\ttrue, false).substring(5, 10)\n\t\t\t\t\t\t\t\t\t+ \" ~ \"\n\t\t\t\t\t\t\t\t\t+ incomeDAO.gettime(defaultYear,\n\t\t\t\t\t\t\t\t\t\t\t(newStr[i - 1]), 0, false, true)\n\t\t\t\t\t\t\t\t\t\t\t.substring(5, 10));\n\t\t\t\t\tgroup1.put(\"money\", String.valueOf(sum));\n\t\t\t\t\tgroups.add(group1);\n\n\t\t\t\t\t// 用一个list对象保存所有的二级列表数据\n\t\t\t\t\tchilds.add(child1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tExpandableAdapter viewAdapter = new ExpandableAdapter(getActivity(),\n\t\t\t\tgroups, childs);\n\t\telv.setGroupIndicator(null);\n\t\telv.setAdapter(viewAdapter);\n\t}\n\n\tstatic String gofordate(String s) {\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tDate date = null;\n\t\ttry {\n\t\t\tdate = format.parse(s);\n\t\t} catch (java.text.ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] weekDays = { \"周日\", \"周一\", \"周二\", \"周三\", \"周四\", \"周五\", \"周六\" };\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(date);\n\t\tint w = cal.get(Calendar.DAY_OF_WEEK) - 1;\n\t\tif (w < 0)\n\t\t\tw = 0;\n\t\tSystem.out.println(\"date\" + date + \" weekDays \" + weekDays[w]);\n\t\treturn weekDays[w];\n\t}\n\n\tprivate void findViews() {\n\t\telv = (ExpandableListView) getActivity().findViewById(\n\t\t\t\tR.id.expandableListView);\n\n\t\tsum_title = (TextView) getActivity().findViewById(R.id.sum_title);\n\t\tsum_total = (RiseNumberTextView) getActivity().findViewById(\n\t\t\t\tR.id.sum_total);\n\t\t// 设置动画播放时间\n\t\tsum_total.setDuration(1000);\n\t\t// 开始播放动画\n\n\t\tsum_pay = (TextView) getActivity().findViewById(R.id.sum_pay);\n\t\tsum_income = (TextView) getActivity().findViewById(R.id.sum_income);\n\n\t\tmPullToRefreshView = (PullToRefreshView) getActivity().findViewById(\n\t\t\t\tR.id.main_pull_refresh_view);\n\t\tmPullToRefreshView.setOnHeaderRefreshListener(this);\n\t\tmPullToRefreshView.setOnFooterRefreshListener(this);\n\n\t\tpushup = AnimationUtils.loadAnimation(getActivity(), R.anim.push_up_in);\n\t\tpushout = AnimationUtils.loadAnimation(getActivity(),\n\t\t\t\tR.anim.push_up_out);\n\n\t\tsearchButton = (RelativeLayout) getActivity().findViewById(\n\t\t\t\tR.id.search_button); // 搜索控件\n\t\tfrag3 = (LinearLayout) getActivity().findViewById(R.id.frag3); // 搜索控件\n\t\tfragall = (LinearLayout) getActivity().findViewById(R.id.fragall); // 搜索控件\n\t\tsearchButton.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\theight = frag3.getHeight();\n\t\t\t\tTranslateAnimation animation = new TranslateAnimation(0, 0, 0,\n\t\t\t\t\t\t-height);\n\t\t\t\tanimation.setDuration(500);\n\t\t\t\tanimation.setFillAfter(true);\n\t\t\t\tanimation.setAnimationListener(new AnimationListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onAnimationStart(Animation animation) {\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onAnimationRepeat(Animation animation) {\n\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onAnimationEnd(Animation animation) {\n\t\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\t\tintent.setClass(getActivity(), SearchActivity.class);\n\t\t\t\t\t\tstartActivityForResult(intent, 100);\n\t\t\t\t\t\tgetActivity().overridePendingTransition(\n\t\t\t\t\t\t\t\tR.anim.animation_2, R.anim.animation_1);\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t\tfragall.startAnimation(animation);\n\t\t\t}\n\t\t});\n\t}\n\n\t// 自定义的ExpandListAdapter\n\tclass ExpandableAdapter extends BaseExpandableListAdapter {\n\t\tprivate Context context;\n\t\tList<Map<String, String>> groups;\n\t\tList<List<Map<String, String>>> childs;\n\n\t\t/*\n\t\t * 构造函数: 参数1:context对象 参数2:一级列表数据源 参数3:二级列表数据源\n\t\t */\n\t\tpublic ExpandableAdapter(Context context,\n\t\t\t\tList<Map<String, String>> groups,\n\t\t\t\tList<List<Map<String, String>>> childs) {\n\t\t\tthis.groups = groups;\n\t\t\tthis.childs = childs;\n\t\t\tthis.context = context;\n\t\t}\n\n\t\t@Override\n\t\tpublic Object getChild(int groupPosition, int childPosition) {\n\t\t\treturn childs.get(groupPosition).get(childPosition);\n\t\t}\n\n\t\t@Override\n\t\tpublic long getChildId(int groupPosition, int childPosition) {\n\t\t\treturn childPosition;\n\t\t}\n\n\t\t// 获取二级列表的View对象\n\t\t@SuppressWarnings(\"unchecked\")\n\t\t@Override\n\t\tpublic View getChildView(int groupPosition, int childPosition,\n\t\t\t\tboolean isLastChild, View convertView, ViewGroup parent) {\n\t\t\tLayoutInflater layoutInflater = (LayoutInflater) context\n\t\t\t\t\t.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n\t\t\t// 获取二级列表对应的布局文件, 并将其各元素设置相应的属性\n\t\t\tLinearLayout linearLayout = (LinearLayout) layoutInflater.inflate(\n\t\t\t\t\tR.layout.list, null);\n\n\t\t\tRelativeLayout search_img2 = (RelativeLayout) linearLayout\n\t\t\t\t\t.findViewById(R.id.search_img2);\n\t\t\tRelativeLayout titlebar = (RelativeLayout) linearLayout\n\t\t\t\t\t.findViewById(R.id.titlebar);\n\t\t\tImageView search_img = (ImageView) linearLayout\n\t\t\t\t\t.findViewById(R.id.search_img);\n\t\t\tTextView search_date = (TextView) linearLayout\n\t\t\t\t\t.findViewById(R.id.search_date);\n\t\t\tTextView search_date2 = (TextView) linearLayout\n\t\t\t\t\t.findViewById(R.id.search_date2);\n\t\t\tTextView no = (TextView) linearLayout.findViewById(R.id.no);\n\t\t\tTextView kind = (TextView) linearLayout.findViewById(R.id.kind);\n\t\t\tTextView title = (TextView) linearLayout.findViewById(R.id.title);\n\t\t\tTextView money = (TextView) linearLayout.findViewById(R.id.money);\n\t\t\ttitlebar.setVisibility(View.GONE);\n\t\t\tsearch_img2.setVisibility(View.VISIBLE);\n\n\t\t\ttitle.setText(((Map<String, String>) getChild(groupPosition,\n\t\t\t\t\tchildPosition)).get(\"title\"));\n\t\t\tno.setText(((Map<String, String>) getChild(groupPosition,\n\t\t\t\t\tchildPosition)).get(\"no\"));\n\t\t\tkind.setText(((Map<String, String>) getChild(groupPosition,\n\t\t\t\t\tchildPosition)).get(\"kind\"));\n\t\t\tmoney.setText(((Map<String, String>) getChild(groupPosition,\n\t\t\t\t\tchildPosition)).get(\"money\"));\n\t\t\tsearch_date2.setText(((Map<String, String>) getChild(groupPosition,\n\t\t\t\t\tchildPosition)).get(\"date\"));\n\t\t\tsearch_date.setText(((Map<String, String>) getChild(groupPosition,\n\t\t\t\t\tchildPosition)).get(\"info\").substring(8, 10));\n\t\t\tsearch_img.setImageResource(Integer\n\t\t\t\t\t.parseInt(((Map<String, String>) getChild(groupPosition,\n\t\t\t\t\t\t\tchildPosition)).get(\"img\")));\n\t\t\tif (((Map<String, String>) getChild(groupPosition, childPosition))\n\t\t\t\t\t.get(\"kind\").equals(\"[收入]\")) {\n\t\t\t\tmoney.setTextColor(Color.parseColor(\"#ffff0000\"));\n\t\t\t} else {\n\t\t\t\tmoney.setTextColor(Color.parseColor(\"#5ea98d\"));\n\t\t\t}\n\t\t\treturn linearLayout;\n\t\t}\n\n\t\t@Override\n\t\tpublic int getChildrenCount(int groupPosition) {\n\t\t\tif (childs.isEmpty()) {\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\treturn childs.get(groupPosition).size();\n\t\t\t}\n\t\t}\n\n\t\t@Override\n\t\tpublic Object getGroup(int groupPosition) {\n\t\t\treturn groups.get(groupPosition);\n\t\t}\n\n\t\t@Override\n\t\tpublic int getGroupCount() {\n\t\t\treturn groups.size();\n\t\t}\n\n\t\t@Override\n\t\tpublic long getGroupId(int groupPosition) {\n\t\t\treturn groupPosition;\n\t\t}\n\n\t\t// 获取一级列表View对象\n\t\t@Override\n\t\tpublic View getGroupView(int groupPosition, boolean isExpanded,\n\t\t\t\tView convertView, ViewGroup parent) {\n\t\t\tLinearLayout lv2;\n\t\t\tLayoutInflater layoutInflater = (LayoutInflater) context\n\t\t\t\t\t.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t\tif (groups.get(groupPosition).get(\"isnodata\") == \"true\") {\n\t\t\t\tlv2 = (LinearLayout) layoutInflater.inflate(R.layout.child,\n\t\t\t\t\t\tnull);\n\t\t\t\tlv2.setOnClickListener(null);\n\t\t\t\telv.setDivider(null);\n\t\t\t} else {\n\t\t\t\t// 获取一级列表布局文件,设置相应元素属性\n\t\t\t\tlv2 = (LinearLayout) layoutInflater.inflate(R.layout.group,\n\t\t\t\t\t\tnull);\n\t\t\t\tTextView day = (TextView) lv2.findViewById(R.id.day);\n\t\t\t\tTextView time = (TextView) lv2.findViewById(R.id.time);\n\t\t\t\tTextView money = (TextView) lv2.findViewById(R.id.money);\n\t\t\t\tImageView service_arrow = (ImageView) lv2\n\t\t\t\t\t\t.findViewById(R.id.service_arrow);\n\t\t\t\tday.setText(groups.get(groupPosition).get(\"day\"));\n\t\t\t\ttime.setText(groups.get(groupPosition).get(\"time\"));\n\t\t\t\tmoney.setText(\"￥\" + groups.get(groupPosition).get(\"money\"));\n\n\t\t\t\tif (Integer.parseInt(groups.get(groupPosition).get(\"money\")) > 0) {\n\t\t\t\t\tmoney.setTextColor(Color.parseColor(\"#ffff0000\"));\n\t\t\t\t} else if (Integer.parseInt(groups.get(groupPosition).get(\n\t\t\t\t\t\t\"money\")) < 0) {\n\t\t\t\t\tmoney.setTextColor(Color.parseColor(\"#5ea98d\"));\n\t\t\t\t}\n\t\t\t\tif (isExpanded) {\n\t\t\t\t\tservice_arrow\n\t\t\t\t\t\t\t.setBackgroundResource(R.drawable.service_arrow_up);\n\t\t\t\t} else {\n\t\t\t\t\tservice_arrow\n\t\t\t\t\t\t\t.setBackgroundResource(R.drawable.service_arrow_down);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn lv2;\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean hasStableIds() {\n\t\t\treturn false;\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean isChildSelectable(int groupPosition, int childPosition) {\n\t\t\treturn true; // 必须改过来\n\t\t}\n\n\t}\n\n\t@Override\n\tpublic void onFooterRefresh(PullToRefreshView view) {\n\t\tmPullToRefreshView.postDelayed(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tmHandler.sendEmptyMessage(2);\n\t\t\t\tmPullToRefreshView.onFooterRefreshComplete();\n\t\t\t}\n\t\t}, 1000);\n\t}\n\n\t@Override\n\tpublic void onHeaderRefresh(PullToRefreshView view) {\n\t\tmPullToRefreshView.postDelayed(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tmHandler.sendEmptyMessage(1);\n\t\t\t\tmPullToRefreshView.onHeaderRefreshComplete();\n\t\t\t}\n\t\t}, 1000);\n\n\t}\n\n\tprivate Handler mHandler = new Handler() {\n\n\t\t@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\t// groups = new ArrayList<Map<String, String>>();\n\t\t\t// childs = new ArrayList<List<Map<String, String>>>();\n\t\t\tswitch (msg.what) {\n\t\t\tcase 1:\n\t\t\t\tinitData(1);\n\t\t\t\tsum_title.startAnimation(pushup);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tinitData(-1);\n\t\t\t\tsum_title.startAnimation(pushout);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t};\n\n\t@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tTranslateAnimation animation = new TranslateAnimation(0, 0, -height, 0);\n\t\tanimation.setDuration(500);\n\t\tanimation.setFillAfter(true);\n\t\tfragall.startAnimation(animation);\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t}\n\n\tpublic static int getyear() {\n\t\treturn defaultYear;\n\t}\n\n\t@Override\n\tpublic void filngtonext() {\n\t\tSystem.out.println(\"filngtonext\");\n\t\tFragmentPage2.clickMoreBtn();\n\t}\n\n\t@Override\n\tpublic void filngtonpre() {\n\t\tFragmentPage2.clickMyfeedBtn();\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/FragmentPage4.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport com.cwp.cmoneycharge.R;\n\nimport cwp.moneycharge.dao.IncomeDAO;\nimport cwp.moneycharge.dao.ItypeDAO;\nimport cwp.moneycharge.dao.NoteDAO;\nimport cwp.moneycharge.dao.PayDAO;\nimport cwp.moneycharge.dao.PtypeDAO;\nimport cwp.moneycharge.model.CustomDialog;\n\nimport android.app.Dialog;\nimport android.content.DialogInterface;\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.AdapterView;\nimport android.widget.ArrayAdapter;\nimport android.widget.Button;\nimport android.widget.ListView;\nimport android.widget.TextView;\nimport android.widget.Toast;\nimport android.widget.AdapterView.OnItemClickListener;\n\npublic class FragmentPage4 extends BaseFrament{\n\n\tint userid;\n\tIntent intentr;\n\tprivate ListView listview;\n\n\tpublic void Setting() {\n\t\t// TODO Auto-generated constructor stub\n\t}\n\n\t@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\n\t\treturn inflater.inflate(R.layout.fragment_4, null);\n\t}\n\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\n\t\tlistview = (ListView) getView().findViewById(R.id.settinglisv);\n\t\tArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(\n\t\t\t\tgetView().getContext(), R.array.settingtype,\n\t\t\t\tandroid.R.layout.simple_expandable_list_item_1);\n\n\t\tlistview.setAdapter(adapter);\n\t}\n\n\t@Override\n\tpublic void onStart() {\n\n\t\tsuper.onStart();\n\t\tintentr = getActivity().getIntent();\n\t\tuserid = intentr.getIntExtra(\"cwp.id\", 100000001);\n\t\tlistview.setOnItemClickListener(new OnItemClickListener() {// 为GridView设置项单击事件\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int pos,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tString result = arg0.getItemAtPosition(pos).toString();\n\t\t\t\tIntent intent = getActivity().getIntent();// 创建Intent对象\n\t\t\t\tuserid = intent.getIntExtra(\"cwp.id\", 100000001);\n\t\t\t\tswitch (pos) {\n\t\t\t\tcase 0:\n\t\t\t\t\talarmDialog(pos);// 清空收入数据\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\talarmDialog(pos); // 清空支出数据\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tintentr = new Intent(getActivity(), SettingActivity.class); // 设置百度语音\n\t\t\t\t\tstartActivity(intentr);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tintentr = new Intent(getActivity(), InPtypeManager.class);\n\t\t\t\t\tintentr.putExtra(\"cwp.id\", userid);\n\t\t\t\t\tintentr.putExtra(\"type\", 0);\n\t\t\t\t\tstartActivity(intentr);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tintentr = new Intent(getActivity(), InPtypeManager.class);\n\t\t\t\t\tintentr.putExtra(\"cwp.id\", userid);\n\t\t\t\t\tintentr.putExtra(\"type\", 1);\n\t\t\t\t\tstartActivity(intentr);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\talarmDialog(pos); // 数据初始化\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\t// 关于系统\n\t\t\t\t\tintentr = new Intent(getActivity(), About.class);\n\t\t\t\t\tintentr.putExtra(\"cwp.id\", userid);\n\t\t\t\t\tstartActivity(intentr);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t}\n\n\tprivate void alarmDialog(int type) { // 退出程序的方法\n\t\tDialog dialog = null;\n\t\tString ps = \"收入数据\", is = \"支出数据\";\n\t\tCustomDialog.Builder customBuilder = new CustomDialog.Builder(getView()\n\t\t\t\t.getContext());\n\n\t\tcustomBuilder.setTitle(\"警告\"); // 创建标题\n\t\tswitch (type) {\n\t\tcase 0:\n\t\t\tcustomBuilder\n\t\t\t\t\t.setMessage(\"将删除当前的用户所有\" + ps)\n\t\t\t\t\t.setPositiveButton(\"确定\",\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tIncomeDAO incomeDAO = new IncomeDAO(\n\t\t\t\t\t\t\t\t\t\t\tgetActivity());\n\t\t\t\t\t\t\t\t\tincomeDAO.deleteUserData(userid);\n\t\t\t\t\t\t\t\t\tToast.makeText(getActivity(), \"已清空~！！\",\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t})\n\t\t\t\t\t.setNegativeButton(\"取消\",\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\tbreak;\n\n\t\tcase 1:\n\t\t\tcustomBuilder\n\t\t\t\t\t.setMessage(\"将删除当前的用户所有\" + is)\n\t\t\t\t\t.setPositiveButton(\"确定\",\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tPayDAO payDAO = new PayDAO(getActivity());\n\t\t\t\t\t\t\t\t\tpayDAO.deleteUserData(userid);\n\t\t\t\t\t\t\t\t\tToast.makeText(getActivity(), \"已清空~！！\",\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t})\n\t\t\t\t\t.setNegativeButton(\"取消\",\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tcustomBuilder\n\t\t\t\t\t.setMessage(\"此操作将重置当前用户的收入、支出类型，确定还原吗？\")\n\t\t\t\t\t.setPositiveButton(\"确定\",\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tItypeDAO itypedao = new ItypeDAO(\n\t\t\t\t\t\t\t\t\t\t\tgetActivity());\n\t\t\t\t\t\t\t\t\tPtypeDAO ptypedao = new PtypeDAO(\n\t\t\t\t\t\t\t\t\t\t\tgetActivity());\n\t\t\t\t\t\t\t\t\titypedao.initData(userid);\n\t\t\t\t\t\t\t\t\tptypedao.initData(userid);\n\t\t\t\t\t\t\t\t\tToast.makeText(getActivity(), \"已还原~！！\",\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t})\n\t\t\t\t\t.setNegativeButton(\"取消\",\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\tbreak;\n\n\t\t}\n\n\t\tdialog = customBuilder.create();// 创建对话框\n\t\tdialog.show(); // 显示对话框\n\n\t}\n\n\t@Override\n\tpublic void filngtonext() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}\n\n\t@Override\n\tpublic void filngtonpre() {\n\t\tFragmentPage2.clickHomeBtn();\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/InPtypeManager.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\n\nimport com.cwp.chart.SystemBarTintManager;\n\nimport cwp.moneycharge.dao.ItypeDAO;\nimport cwp.moneycharge.dao.PtypeDAO;\nimport cwp.moneycharge.model.ActivityManager;\nimport cwp.moneycharge.model.CustomDialog;\nimport cwp.moneycharge.model.Tb_itype;\nimport cwp.moneycharge.model.Tb_ptype;\nimport android.annotation.TargetApi;\nimport android.app.Activity;\nimport android.app.AlertDialog;\nimport android.app.Dialog;\nimport android.content.DialogInterface;\nimport android.content.Intent;\nimport android.os.Build;\nimport android.os.Bundle;\nimport android.util.Log;\nimport android.util.SparseBooleanArray;\nimport android.view.KeyEvent;\nimport android.view.View;\nimport android.view.Window;\nimport android.view.WindowManager;\nimport android.view.View.OnClickListener;\nimport android.widget.AdapterView;\nimport android.widget.ArrayAdapter;\nimport android.widget.Button;\nimport android.widget.EditText;\nimport android.widget.ListView;\nimport android.widget.TextView;\nimport android.widget.AdapterView.OnItemClickListener;\nimport android.widget.Toast;\n\npublic class InPtypeManager extends Activity {\n\n\tpublic InPtypeManager() {\n\t\t// TODO Auto-generated constructor stub\n\t}\n\n\tprivate List<String> typename;\n\tprivate ListView lv;\n\tint userid, type;\n\tIntent intentr;\n\tItypeDAO itypeDAO;\n\tPtypeDAO ptypeDAO;\n\tTextView inptext;\n\tButton add, delete;\n\tString inputStr = \"\";\n\n\t@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.inptypemanager);\n\n\t\tSystemBarTintManager mTintManager;\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n\t\t\tfindViewById(R.id.inptext_top).setVisibility(View.VISIBLE);\n\t\t\tsetTranslucentStatus(true);\n\t\t}\n\t\tmTintManager = new SystemBarTintManager(this);\n\t\tmTintManager.setStatusBarTintEnabled(true);\n\t\tmTintManager.setStatusBarTintResource(R.color.statusbar_bg);\n\n\t\tSysApplication.getInstance().addActivity(this); // 在销毁队列中添加this\n\t\tinptext = (TextView) findViewById(R.id.inptext);\n\t\tlv = (ListView) findViewById(R.id.typelist);// 得到ListView对象的引用\n\t\tadd = (Button) findViewById(R.id.addtype);\n\t\tdelete = (Button) findViewById(R.id.deletetype);\n\t}\n\n\t@TargetApi(19)\n\tprivate void setTranslucentStatus(boolean on) {\n\t\tWindow win = getWindow();\n\t\tWindowManager.LayoutParams winParams = win.getAttributes();\n\t\tfinal int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;\n\t\tif (on) {\n\t\t\twinParams.flags |= bits;\n\t\t} else {\n\t\t\twinParams.flags &= ~bits;\n\t\t}\n\t\twin.setAttributes(winParams);\n\t}\n\n\t@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t\t// 获取数据\n\t\tintentr = getIntent();\n\t\tuserid = intentr.getIntExtra(\"cwp.id\", 100000001);\n\t\ttype = intentr.getIntExtra(\"type\", 0);\n\t\titypeDAO = new ItypeDAO(InPtypeManager.this);\n\t\tptypeDAO = new PtypeDAO(InPtypeManager.this);\n\t\tif (type == 0) {\n\t\t\ttypename = itypeDAO.getItypeName(userid);\n\t\t\tinptext.setText(\"收入类型管理\");\n\t\t} else {\n\t\t\ttypename = ptypeDAO.getPtypeName(userid);\n\t\t\tinptext.setText(\"支出类型管理\");\n\t\t}\n\n\t\t/* 为ListView设置Adapter来绑定数据 */\n\t\tlv.setAdapter(new ArrayAdapter<String>(this,\n\t\t\t\tandroid.R.layout.simple_list_item_checked, typename));\n\n\t\tadd.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tinputTitleDialog();\n\t\t\t}\n\n\t\t});\n\t\tdelete.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdeleteDialog();\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate void inputTitleDialog() {\n\n\t\tfinal EditText inputServer = new EditText(InPtypeManager.this);\n\t\tinputServer.setFocusable(true);\n\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(\"添加类型\").setView(inputServer)\n\t\t\t\t.setNegativeButton(\"取消\", null);\n\t\tbuilder.setPositiveButton(\"确定\", new DialogInterface.OnClickListener() {\n\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tinputStr = inputServer.getText().toString();\n\t\t\t\tint i = (int) itypeDAO.getCount(userid) + 1;\n\t\t\t\tif (inputStr.trim().equals(\"\")) {\n\t\t\t\t\tToast.makeText(InPtypeManager.this, \"输入内容不能为空！\",\n\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\trefresh();\n\t\t\t\t} else if (type == 0) {\n\t\t\t\t\titypeDAO.add(new Tb_itype(userid, i, inputStr));\n\t\t\t\t} else {\n\t\t\t\t\tptypeDAO.add(new Tb_ptype(userid, i, inputStr));\n\t\t\t\t}\n\t\t\t\trefresh();\n\t\t\t}\n\t\t});\n\t\tbuilder.show();\n\t}\n\n\tprivate void deleteDialog() { // 退出程序的方法\n\t\tDialog dialog = null;\n\n\t\tCustomDialog.Builder customBuilder = new CustomDialog.Builder(\n\t\t\t\tInPtypeManager.this);\n\n\t\tcustomBuilder\n\t\t\t\t.setTitle(\"删除\")\n\t\t\t\t// 创建标题\n\n\t\t\t\t.setMessage(\"您确定要删除吗？\")\n\t\t\t\t.setPositiveButton(\"确定\", new DialogInterface.OnClickListener() {\n\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tonDeleteClick();\n\t\t\t\t\t\tToast.makeText(InPtypeManager.this, \"已删除！\",\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\trefresh();\n\t\t\t\t\t}\n\n\t\t\t\t})\n\t\t\t\t.setNegativeButton(\"取消\", new DialogInterface.OnClickListener() {\n\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tdialog = customBuilder.create();// 创建对话框\n\t\tdialog.show(); // 显示对话框\n\n\t}\n\n\tpublic void onDeleteClick() {\n\t\t// 获取选中的行\n\t\tSparseBooleanArray checked = lv.getCheckedItemPositions();\n\t\tList<String> checkList = new ArrayList<String>();\n\t\tfor (int i = 0; i < lv.getCount(); i++) {\n\t\t\tif (checked.get(i) == true) {\n\t\t\t\t// 获取到选择的行的数据\n\t\t\t\tcheckList.add(typename.get(i).toString());\n\t\t\t}\n\t\t}\n\t\tif (checkList.size() > 0) {\n\t\t\tfor (String lchecked : checkList) {\n\t\t\t\tif (type == 1)\n\t\t\t\t\tptypeDAO.deleteByName(userid, lchecked);\n\t\t\t\telse\n\t\t\t\t\titypeDAO.deleteByName(userid, lchecked);\n\t\t\t}\n\t\t} else {\n\t\t\tToast.makeText(InPtypeManager.this, \"您未选中任何项,请选择\",\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t}\n\n\t\tlv.clearChoices();// 清空listView的选择状态，方便下次选择\n\t}\n\n\tpublic void refresh() {\n\t\tfinish();\n\t\tIntent intentf = new Intent(InPtypeManager.this, InPtypeManager.class);\n\t\tintentf.putExtra(\"cwp.id\", userid);\n\t\tintentf.putExtra(\"type\", type);\n\t\tstartActivity(intentf);\n\t}\n\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t\tif (keyCode == KeyEvent.KEYCODE_BACK) { // 监控/拦截/屏蔽返回键\n\t\t\tIntent intent = new Intent(InPtypeManager.this, MainActivity.class);\n\t\t\tintent.putExtra(\"cwp.id\", userid);\n\t\t\tintent.putExtra(\"cwp.Fragment\", \"4\");// 设置传递数据\n\t\t\tstartActivity(intent);\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onKeyDown(keyCode, event);\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/IncomeData.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport java.text.NumberFormat;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Random;\n\nimport org.achartengine.ChartFactory;\nimport org.achartengine.GraphicalView;\nimport org.achartengine.model.CategorySeries;\nimport org.achartengine.model.SeriesSelection;\nimport org.achartengine.renderer.DefaultRenderer;\nimport org.achartengine.renderer.SimpleSeriesRenderer;\n\nimport cwp.moneycharge.dao.IncomeDAO;\nimport cwp.moneycharge.dao.ItypeDAO;\nimport cwp.moneycharge.model.ActivityManager;\nimport cwp.moneycharge.model.KindData;\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.graphics.Color;\nimport android.os.Bundle;\nimport android.text.format.Time;\nimport android.util.Log;\nimport android.view.KeyEvent;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.widget.Adapter;\nimport android.widget.ArrayAdapter;\nimport android.widget.Button;\nimport android.widget.LinearLayout;\nimport android.widget.Spinner;\nimport android.widget.SpinnerAdapter;\nimport android.widget.TextView;\nimport android.widget.Toast;\n\npublic class IncomeData  extends Activity {\n\tint userid;\n\tIntent intentr;\n\tIncomeDAO incomeDAO;\n\tint defaultMonth;\n\tint defaultYear; \n\tTime time ;//获取当前时间\n\tLinearLayout piechart,idataselect;\n\tButton beforet,aftert,anytime;\n\tSpinner year,month,day,yeare,monthe,daye;//界面上的任意时间\n\tList<String> yearlist;\n\tAdapter adapter;\n\tString date1,date2;\n\tList<KindData> KindDatai;\n\tDefaultRenderer mRenderer ;\n\tCategorySeries mSeries ; \n\tGraphicalView mChartView;\n\tItypeDAO itypeDAO;\n\tTextView nodata;\n\tprivate static int[] COLORS = new int[] { Color.rgb(180, 0, 0),Color.rgb(180, 120,130),\n\t\tColor.rgb(10, 180, 170),Color.rgb(10, 180, 10),Color.rgb(220, 180, 10),Color.rgb(220, 180, 130),Color.rgb(20, 180, 130)\n\t\t,Color.rgb(20, 18, 130),Color.rgb(255, 120, 10),Color.rgb(255, 120, 100),Color.rgb(255, 12, 100),Color.rgb(217, 190, 100)\n\t\t,Color.rgb(50,150, 100),Color.rgb(150,150, 100),Color.rgb(150,150, 190)};\n\t\n\tpublic IncomeData() {\n\t\t// TODO Auto-generated constructor stub\n\t}\n\t @Override\n\t    public void onCreate(Bundle savedInstanceState) {\n\t        super.onCreate(savedInstanceState);\n\t        setContentView(R.layout.incomedata);\n\n\t        SysApplication.getInstance().addActivity(this); // 在销毁队列中添加this\n\t        time = new Time(\"GMT+8\");    \n\t        time.setToNow();   \n\t        defaultMonth=time.month+1;//设置默认月份\n\t        defaultYear=time.year;\n\t        beforet=(Button)findViewById(R.id.ibefore);\n\t        aftert=(Button)findViewById(R.id.iafter);\n\t        anytime=(Button)findViewById(R.id.ianytime);\n\t        year=(Spinner)findViewById(R.id.iyear);\n\t        month=(Spinner)findViewById(R.id.imonth);\n\t        day=(Spinner)findViewById(R.id.iday);\n\t        yeare=(Spinner)findViewById(R.id.iyeare);\n\t        monthe=(Spinner)findViewById(R.id.imonthe);\n\t        daye=(Spinner)findViewById(R.id.idaye);\n \t\t    nodata=(TextView)findViewById(R.id.nodata);\n \t\t    idataselect=(LinearLayout)findViewById(R.id.idataselect);\n\t        piechart=(LinearLayout)findViewById(R.id.ichart);\n\t        mSeries = new CategorySeries(\"\"); \n\t        mRenderer = new DefaultRenderer();// PieChart的主要描绘器\n\t        yearlist=new ArrayList<String>(); //生成年份列表 spinner\n\t        itypeDAO=new ItypeDAO(IncomeData.this);\n\t        \n\t        //设置年\n\t        for(int i=0;i<=10;i++){\n\t        \tyearlist.add(String.valueOf(defaultYear-i));\n\t        } \n\t        adapter=new ArrayAdapter<String>(IncomeData.this,android.R.layout.simple_spinner_item,yearlist);\n\t        year.setAdapter((SpinnerAdapter) adapter);\n\t        yeare.setAdapter((SpinnerAdapter) adapter);\n\t\n\t } \n\t \n\t @Override\n\t protected void onStart(){\n\t\t \tsuper.onStart();\n\t\t \tintentr=getIntent();\n\t\t \tuserid=intentr.getIntExtra(\"cwp.id\",100000001); \n\t\t \tdefaultMonth=intentr.getIntExtra(\"default\", defaultMonth);  \n\t\t \tdefaultYear=intentr.getIntExtra(\"defaulty\", defaultYear);  \n\t\t \tint type=intentr.getIntExtra(\"type\",0);//为0，选择上下月，为1，选择任意时间\n\t\t \t\n\t\t \t//饼图\n\t\t \t/*      mRenderer=new DefaultRenderer();\n\t\t\t        mRenderer.setApplyBackgroundColor(true);\n\t\t\t        mRenderer.setBackgroundColor(Color.TRANSPARENT);\n\t\t\t//      mRenderer.setChartTitleTextSize(20);\n\t\t\t        mRenderer.setLabelsTextSize(20);\n\t\t\t        mRenderer.setLabelsColor(Color.BLACK);\n\t\t\t        mRenderer.setShowAxes(false);   // 是否显示轴线\n\t\t\t//      mRenderer.setAxesColor(Color.RED); //设置轴颜色\n\t\t\t        mRenderer.setFitLegend(false);\n\t\t\t        mRenderer.setInScroll(false);\n\t\t\t        mRenderer.setPanEnabled(false);\n\t\t\t        mRenderer.setShowCustomTextGrid(false);\n\t\t\t        mRenderer.setShowLegend(false);       //不显示图例\n\t\t\t        mRenderer.setShowGrid(false);\n\t\t\t        mRenderer.setClickEnabled(true);\n\t\t\t//      mRenderer.setScale(1.5f);\n\t\t\t//      mRenderer.setLegendTextSize(15);\n\t\t\t//      mRenderer.setMargins(new int[] { 20, 50, 15, 0 });\n\t\t\t//      mRenderer.setZoomButtonsVisible(true);\n\t\t\t        mRenderer.setStartAngle(45);\n\n\t\t \t*/\n\n\t\t \tmRenderer.setZoomButtonsVisible(true);// 显示放大缩小功能按钮\n\t\t \tmRenderer.setStartAngle(180);// 设置为水平开始\n\t\t \tmRenderer.setDisplayValues(true);// 显示数据\n\t\t \tmRenderer.setFitLegend(true);// 设置是否显示图例  \n\t\t \tmRenderer.setShowLabels(true);  \n\t        mRenderer.setLabelsTextSize(40);\n\t        mRenderer.setShowLegend(true);  \n\t        mRenderer.setLabelsColor(Color.BLACK);\n\t\t \tmRenderer.setLegendTextSize(30);// 设置图例字体大小\n\t\t \tmRenderer.setLegendHeight(30);// 设置图例高度 \n\t\t \tmRenderer.setChartTitleTextSize(34);// 设置饼图标题大小\n\t\t \tincomeDAO=new IncomeDAO(IncomeData.this);\n\t\t \t\n\t\t \tif(type==0){ \n\t\t \t\tKindDatai=incomeDAO.getKDataOnMonth(userid, defaultYear, defaultMonth); \t\n\t\t \t\tmRenderer.setChartTitle(String.valueOf(defaultYear)+\"-\"+String.valueOf(defaultMonth));\n\t \t\t}else{ \n\t\t\t\t date1=intentr.getStringExtra(\"date1\");\n\t\t\t     date2=intentr.getStringExtra(\"date2\");\t\t\t     \n\t\t\t     KindDatai=incomeDAO.getKDataOnDay(userid, date1, date2);\n\t\t\t     mRenderer.setChartTitle(date1+\"~\"+date2); \n\t\t    \t \n\t\t     }\n\t\t \t//数据\n\n\t\t \t if(KindDatai.size()==0){ \n\t\t \t\t nodata.setVisibility(View.VISIBLE); \n\t\t \t\t \n\t\t \t }else{\n\t\t \t\t \n\t\t\t \tdouble sum=0.00;  \n\t\t\t \tint i=0;\n\t\t \t\tfor(KindData ki:KindDatai)\n\t\t \t\t\tsum+=ki.getAmount();//总和\n\t\t \t\tfor(KindData ki:KindDatai){ \n\t\t \t\t\tmSeries.add(itypeDAO.getOneName(userid, ki.getKindname()), ki.getAmount()/ sum);\n\t\t \t\t\tSimpleSeriesRenderer renderer = new SimpleSeriesRenderer();\n\t\t \t\t\tif(i<COLORS.length){\n\t\t \t\t\t\trenderer.setColor( COLORS[i]);\n\t\t \t\t\t}else{\n\t\t \t\t\t\trenderer.setColor( getRandomColor());\n\t\t \t\t\t}\n\t\t \t\t\trenderer.setChartValuesFormat(NumberFormat.getPercentInstance());// 设置百分比 \n\t\t\t \t\tmRenderer.addSeriesRenderer(renderer);// 将最新的描绘器添加到DefaultRenderer中\n\t\t\t \t\ti++;\n\t\t \t\t}\n\t\t \t\t  \n\t\t            mChartView = ChartFactory.getPieChartView(getApplicationContext(),  \n\t\t                    mSeries, mRenderer);// 构建mChartView  \n\t\t            mRenderer.setClickEnabled(true);// 允许点击事件  \n\t\t            mChartView.setOnClickListener(new View.OnClickListener() {// 具体内容  \n\t\t                        @Override  \n\t\t                        public void onClick(View v) {  \n\t\t                            SeriesSelection seriesSelection = mChartView  \n\t\t                                    .getCurrentSeriesAndPoint();// 获取当前的类别和指针  \n\t\t                            if (seriesSelection == null) {  \n\t\t                                Toast.makeText(getApplicationContext(),  \n\t\t                                        \"您未选择数据\", Toast.LENGTH_SHORT).show();  \n\t\t                            } else {  \n\t\t                                for (int i = 0; i < mSeries.getItemCount(); i++) {  \n\t\t                                    mRenderer.getSeriesRendererAt(i)  \n\t\t                                            .setHighlighted(  \n\t\t                                                    i == seriesSelection  \n\t\t                                                            .getPointIndex());  \n\t\t                                }  \n\t\t                                mChartView.repaint();  \n\t\t                                Toast.makeText(  \n\t\t                                        getApplicationContext(),  \n\t\t                                        \"您选择的是第\"  \n\t\t                                                + (seriesSelection\n\t\t                                                        .getPointIndex() + 1)  \n\t\t                                                + \" 项 \"  \n\t\t                                                + \" 百分比为  \"  \n\t\t                                                + NumberFormat  \n\t\t                                                        .getPercentInstance()  \n\t\t                                                        .format(seriesSelection  \n\t\t                                                                .getValue()),  \n\t\t                                        Toast.LENGTH_SHORT).show();  \n\t\t                            }  \n\t\t                        }  \n\t\t                    });  \n\t\t            piechart.addView(mChartView);   \n\t\t}\n\t\t \tbeforet.setOnClickListener(new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tif(defaultMonth!=1)\n\t\t\t\t\tdefaultMonth=defaultMonth-1;\n\t\t\t\t\telse{\n\t\t\t\t\t\tdefaultMonth=12;\n\t\t\t\t\t\tdefaultYear=defaultYear-1;\n\t\t\t\t\t}\n\t\t\t\t\tmSeries.clear(); \n\t\t\t\t\tIntent intentp=new Intent(IncomeData.this,IncomeData.class);\n\t\t\t\t\tintentp.putExtra(\"defaulty\", defaultYear);\n\t\t\t\t\tintentp.putExtra(\"default\",defaultMonth);\n\t\t\t\t\tintentp.putExtra(\"cwp.id\", userid); \n\t\t\t\t\tstartActivity(intentp);\n\t\t\t\t}\n\t\t\t});\n\t \t\taftert.setOnClickListener(new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tif(defaultMonth!=12)\n\t\t\t\t\tdefaultMonth=defaultMonth+1;\n\t\t\t\t\telse{\n\t\t\t\t\t\tdefaultMonth=1;\n\t\t\t\t\t\tdefaultYear=defaultYear+1;\n\t\t\t\t\t}\n\t\t\t\t\tmSeries.clear(); \n\t\t\t\t\tIntent intentp=new Intent(IncomeData.this,PayData.class);\n\t\t\t\t\tintentp.putExtra(\"defaulty\", defaultYear);\n\t\t\t\t\tintentp.putExtra(\"default\",defaultMonth);\n\t\t\t\t\tintentp.putExtra(\"cwp.id\", userid); \n\t\t\t\t\tstartActivity(intentp);\n\t\t\t\t}\n\t\t\t});\n\n\t \t\tanytime.setOnClickListener(new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tgetAnyDate();\n\t\t\t\t\tmSeries.clear();  \n\t\t\t\t \tIntent intentp=new Intent(IncomeData.this,IncomeData.class);\n\t\t\t\t \tintentp.putExtra(\"type\",1);\n\t\t\t\t \tintentp.putExtra(\"date1\", date1);\n\t\t\t\t \tintentp.putExtra(\"date2\", date2);\n\t\t\t\t \tintentp.putExtra(\"cwp.id\", userid);\n\t\t\t\t    startActivity(intentp);\n\t\t\t\t}\n\t\t\t});\n\t \t  \n\t\t \t \n\t }\n\t public void getAnyDate(){\n\t \t\tdate1=year.getSelectedItem().toString()+\"-\"+month.getSelectedItem().toString()+\"-\"+day.getSelectedItem().toString();\n\t \t\tdate2=yeare.getSelectedItem().toString()+\"-\"+monthe.getSelectedItem().toString()+\"-\"+daye.getSelectedItem().toString();\n\n\t \t}\n\t private int getRandomColor() {// 分别产生RBG数值  \n\t        Random random = new Random();  \n\t        int R = random.nextInt(255);  \n\t        int G = random.nextInt(255);  \n\t        int B = random.nextInt(255);  \n\t        return Color.rgb(R, G, B);  \n\t    } \n\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t    if(keyCode == KeyEvent.KEYCODE_BACK) { //监控/拦截/屏蔽返回键\n\t    \tIntent intent=new Intent(IncomeData.this,MainActivity.class);\n\t\t\tintent.putExtra(\"cwp.id\",userid);\n\t\t\tintent.putExtra(\"cwp.Fragment\", \"2\");// 设置传递数据  \n\t\t\tstartActivity(intent);\n\t        return true;\n\t    }\n\t    return super.onKeyDown(keyCode, event);\n\t}\n\t\t\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/KeyboardUtil.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport com.cwp.cmoneycharge.R;\n\nimport android.app.Activity;\nimport android.content.Context;\nimport android.inputmethodservice.Keyboard;\nimport android.inputmethodservice.Keyboard.Key;\nimport android.inputmethodservice.KeyboardView;\nimport android.inputmethodservice.KeyboardView.OnKeyboardActionListener;\nimport android.text.Editable;\nimport android.view.Gravity;\nimport android.view.View;\nimport android.widget.EditText;\nimport android.widget.LinearLayout;\nimport android.widget.TextView;\n\npublic class KeyboardUtil {\n\tprivate Context ctx;\n\tprivate Activity act;\n\tprivate KeyboardView keyboardView;\n\tprivate Keyboard k2;// 数字键盘\n\tpublic boolean isnun = true;// 是否数据键盘\n\tpublic boolean a = true;\n\tpublic static String c = null;\n\tprivate EditText ed;\n\tString typemode;\n\tDialogShowUtil dialogShowUtil = null;\n\tprotected boolean count = true;\n\n\tpublic KeyboardUtil(Activity act, Context ctx, EditText edit,\n\t\t\tString typemode) {\n\t\tthis.ctx = ctx;\n\t\tthis.ed = edit;\n\t\tthis.act = act;\n\t\tthis.typemode = typemode;\n\t\tk2 = new Keyboard(ctx, R.xml.symbols_num);\n\t\tkeyboardView = (KeyboardView) act.findViewById(R.id.keyboard_view);\n\t\tkeyboardView.setEnabled(true);\n\t\tkeyboardView.setKeyboard(k2);\n\t\tkeyboardView.setPreviewEnabled(false);\n\t\tkeyboardView.setOnKeyboardActionListener(listener);\n\n\t}\n\n\tprivate OnKeyboardActionListener listener = new OnKeyboardActionListener() {\n\n\t\t@Override\n\t\tpublic void swipeUp() {\n\t\t}\n\n\t\t@Override\n\t\tpublic void swipeRight() {\n\t\t}\n\n\t\t@Override\n\t\tpublic void swipeLeft() {\n\t\t}\n\n\t\t@Override\n\t\tpublic void swipeDown() {\n\t\t}\n\n\t\t@Override\n\t\tpublic void onText(CharSequence text) {\n\t\t}\n\n\t\t@Override\n\t\tpublic void onRelease(int primaryCode) {\n\t\t}\n\n\t\t@Override\n\t\tpublic void onPress(int primaryCode) {\n\t\t}\n\n\t\t@Override\n\t\tpublic void onKey(int primaryCode, int[] keyCodes) {\n\t\t\tgoforkey(primaryCode, keyCodes);\n\t\t}\n\n\t\tprivate void goforkey(int primaryCode, int[] keyCodes) {\n\t\t\tEditable editable = ed.getText();\n\t\t\tif (typemode.equals(\"ModifyInP\")) { // 添加模式获取开始光标\n\t\t\t\ted.setSelection(editable.length());\n\t\t\t}\n\t\t\tint start = ed.getSelectionStart();\n\t\t\tif (primaryCode == Keyboard.KEYCODE_DELETE) { // 删除键\n\t\t\t\tif (editable != null && editable.length() > 0) {\n\t\t\t\t\tif (start > 0) {\n\t\t\t\t\t\teditable.delete(start - 1, start);\n\t\t\t\t\t\tif (ed.getText().toString().indexOf(\".\") < 0) {\n\t\t\t\t\t\t\ta = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (primaryCode == -8) {\n\t\t\t\tif (start > 0 && a) {\n\t\t\t\t\teditable.insert(start, \".\");\n\t\t\t\t\ta = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// else if (primaryCode == -11) { // 收入\n\t\t\t// ((AddPay) act).update();\n\t\t\t// }\n\t\t\t// else if (primaryCode == -12) { // 支出\n\t\t\t// AddPay add = new AddPay();\n\t\t\t// add.getupdatepay(\"income\");\n\t\t\t// }\n\t\t\telse if (primaryCode == -7) {\n\t\t\t\thideKeyboard();\n\t\t\t} else if (primaryCode == -9) {\n\t\t\t\thideKeyboard();\n\t\t\t\tAddPay.showVoiveDialog();\n\t\t\t} else if (primaryCode == -10) {\n\t\t\t\ted.setText(\"\");\n\t\t\t\ta = true;\n\t\t\t} else {\n\t\t\t\tif (a) { // 判断是否有小数点\n\t\t\t\t\tif (editable.length() < 9) {\n\t\t\t\t\t\teditable.insert(start,\n\t\t\t\t\t\t\t\tCharacter.toString((char) primaryCode));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (editable.toString().split(\"\\\\.\").length < 2) {\n\t\t\t\t\t\teditable.insert(start,\n\t\t\t\t\t\t\t\tCharacter.toString((char) primaryCode));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (editable.toString().split(\"\\\\.\")[1].length() < 2) { // 处理小数点后是否只能2位数\n\t\t\t\t\t\t\teditable.insert(start,\n\t\t\t\t\t\t\t\t\tCharacter.toString((char) primaryCode));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tpublic void showKeyboard() {\n\t\tint visibility = keyboardView.getVisibility();\n\t\tif (visibility == View.GONE || visibility == View.INVISIBLE) {\n\t\t\tkeyboardView.setVisibility(View.VISIBLE);\n\t\t}\n\t}\n\n\tpublic void hideKeyboard() {\n\t\tint visibility = keyboardView.getVisibility();\n\t\tif (visibility == View.VISIBLE) {\n\t\t\tkeyboardView.setVisibility(View.INVISIBLE);\n\t\t}\n\t}\n\n\tprivate boolean isword(String str) {\n\t\tString wordstr = \"abcdefghijklmnopqrstuvwxyz\";\n\t\tif (wordstr.indexOf(str.toLowerCase()) > -1) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic interface InputFinishListener {\n\t\tpublic void inputHasOver(String text);\n\t}\n\n}"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/MainActivity.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport java.util.Calendar;\n\nimport com.cwp.chart.SystemBarTintManager;\nimport com.cwp.cmoneycharge.AddPay;\nimport com.cwp.cmoneycharge.R;\nimport com.cwp.pattern.UnlockGesturePasswordActivity;\nimport com.cwp.pattern.UpdateManager;\n\nimport android.annotation.TargetApi;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.content.SharedPreferences;\nimport android.content.SharedPreferences.Editor;\nimport android.graphics.drawable.BitmapDrawable;\nimport android.os.Build;\nimport android.os.Bundle;\nimport android.os.StrictMode;\nimport android.support.v4.app.FragmentActivity;\nimport android.support.v4.app.FragmentTransaction;\nimport android.util.DisplayMetrics;\nimport android.util.Log;\nimport android.view.Gravity;\nimport android.view.KeyEvent;\nimport android.view.LayoutInflater;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.Window;\nimport android.view.WindowManager;\nimport android.view.View.OnClickListener;\nimport android.view.View.OnTouchListener;\nimport android.widget.FrameLayout;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.PopupWindow;\nimport android.widget.PopupWindow.OnDismissListener;\n\npublic class MainActivity extends FragmentActivity implements OnClickListener {\n\t// 定义Fragment页面\n\tprivate FragmentPage2 fragmentPage2;\n\tSharedPreferences sp;\n\tint userid;\n\tstatic int value = 0;\n\tDialogShowUtil dialogShowUtil = new DialogShowUtil(this, this, null, null,\n\t\t\tnull);\n\n\tprivate Effectstype effect; // 自定义Dialog\n\tprivate FragmentPage3 fragmentPage3;\n\tprivate String updatedate;\n\tprivate Editor edit;\n\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.activity_main);\n\n\t\tsp = this.getSharedPreferences(\"preferences\", MODE_WORLD_READABLE);\n\t\tedit = sp.edit();\n\t\t// initdefault();// 初始化数据\n\n\t\tSystemBarTintManager mTintManager;\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n\t\t\tsetTranslucentStatus(true);\n\t\t}\n\t\tmTintManager = new SystemBarTintManager(this);\n\t\tmTintManager.setStatusBarTintEnabled(true);\n\t\tmTintManager.setStatusBarTintResource(R.color.statusbar_bg);\n\n\t\tfragmentPage2 = new FragmentPage2(this);\n\t\t// 得到Fragment事务管理器\n\t\tFragmentTransaction fragmentTransaction = this\n\t\t\t\t.getSupportFragmentManager().beginTransaction();\n\t\t// 替换当前的页面\n\t\tfragmentTransaction.replace(R.id.frame_foot, fragmentPage2);\n\t\tfragmentTransaction.commit();\n\n\t\tSysApplication.getInstance().addActivity(this); // 在销毁队列中添加this\n\t\tIntent intentr = getIntent();\n\t\tuserid = intentr.getIntExtra(\"cwp.id\", 100000001);\n\t\tif (intentr.getStringExtra(\"cwp.Fragment\") != null) { // 取回跳转的目的页面\n\t\t\tvalue = Integer.parseInt(intentr.getStringExtra(\"cwp.Fragment\"));\n\t\t}\n\t\tCalendar c = Calendar.getInstance();// 获取当前系统日期\n\t\tint mYear = c.get(Calendar.YEAR);// 获取年份\n\t\tint mMonth = c.get(Calendar.MONTH);// 获取月份\n\t\tint mDay = c.get(Calendar.DAY_OF_MONTH);// 获取天数\n\t\tupdatedate = mYear + \"-\" + mMonth + 1 + \"-\" + mDay;\n\n\t\t// StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()\n\t\t// .detectDiskReads().detectDiskWrites().detectNetwork()\n\t\t// .penaltyLog().build());\n\t\t// StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()\n\t\t// .detectLeakedSqlLiteObjects().detectLeakedClosableObjects()\n\t\t// .penaltyLog().penaltyDeath().build());\n\t}\n\n\tprivate void initdefault() { // 初始化数据\n\t\tedit.putString(\"sendlog\", \"开\"); // 报log\n\t\tedit.putString(\"gesturepw\", \"开\"); // 手势开\n\t\tedit.commit();\n\t}\n\n\t@Override\n\tpublic void onClick(View v) {\n\n\t}\n\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t\tif (keyCode == KeyEvent.KEYCODE_BACK) { // 监控/拦截/屏蔽返回键\n\t\t\tdialogShowUtil.dialogShow(\"shake\", \"quit\", \"\", \"\");\n\t\t}\n\t\treturn super.onKeyDown(keyCode, event);\n\t}\n\n\tpublic static int getValueFM() {\n\t\treturn value;\n\t}\n\n\t@TargetApi(19)\n\tprivate void setTranslucentStatus(boolean on) {\n\t\tWindow win = getWindow();\n\t\tWindowManager.LayoutParams winParams = win.getAttributes();\n\t\tfinal int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;\n\t\tif (on) {\n\t\t\twinParams.flags |= bits;\n\t\t} else {\n\t\t\twinParams.flags &= ~bits;\n\t\t}\n\t\twin.setAttributes(winParams);\n\t}\n\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tCrashApplication myApplaction = (CrashApplication) getApplication();\n\t\tif ((myApplaction.isLocked)\n\t\t\t\t&& (sp.getString(\"gesturepw\", \"\").equals(\"开\"))) {// 判断是否需要跳转到密码界面\n\t\t\tIntent intent = new Intent(this,\n\t\t\t\t\tUnlockGesturePasswordActivity.class);\n\t\t\tstartActivity(intent);\n\t\t}\n\n\t\tif (!updatedate.equals(sp.getString(\"updatedate\", \"\"))) { // 今天已经检查过就不自动检查了\n\t\t\tUpdateManager manager = new UpdateManager(MainActivity.this);\n\t\t\tmanager.checkUpdate(\"noshow\");\n\t\t\tedit.putString(\"updatedate\", updatedate); // 一天只检查一次\n\t\t\tedit.commit();\n\t\t}\n\t};\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/ModifyInP.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport java.util.Calendar;\nimport java.util.List;\n  \nimport com.cwp.cmoneycharge.R; \n\nimport cwp.moneycharge.dao.IncomeDAO; \nimport cwp.moneycharge.dao.ItypeDAO; \nimport cwp.moneycharge.dao.PtypeDAO;\nimport cwp.moneycharge.model.ActivityManager;\nimport cwp.moneycharge.model.Tb_income;\nimport cwp.moneycharge.model.Tb_pay;\n\nimport android.annotation.SuppressLint;\nimport android.app.Activity;\nimport android.app.DatePickerDialog;\nimport android.app.Dialog;\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.widget.ArrayAdapter;\nimport android.widget.Button;\nimport android.widget.DatePicker;\nimport android.widget.EditText;\nimport android.widget.Spinner;\nimport android.widget.TextView;\nimport android.widget.Toast;\n\nimport cwp.moneycharge.dao.IncomeDAO;\nimport cwp.moneycharge.dao.PayDAO;\n\npublic class ModifyInP extends Activity{\n\tprotected static final int DATE_DIALOG_ID = 0;// 创建日期对话框常量\n\tTextView tvtitle, textView;// 创建两个TextView对象\n\tEditText txtMoney, txtTime, txtHA, txtMark;// 创建4个EditText对象\n\tSpinner spType;// 创建Spinner对象\n\tButton btnEdit, btnDel;// 创建两个Button对象\n\tString[] strInfos;// 定义字符串数组\n\tString strno, strType;// 定义两个字符串变量，分别用来记录信息编号和管理类型\n\tint userid;\n\tItypeDAO itypeDAO=new ItypeDAO(ModifyInP.this);\n\tPtypeDAO ptypeDAO=new PtypeDAO(ModifyInP.this);\n\tList<String> spdatalist;\n\n\tprivate int mYear;// 年\n\tprivate int mMonth;// 月\n\tprivate int mDay;// 日\n\n    private ArrayAdapter<String> adapter;\n    private String[] spdata;\n\tPayDAO payDAO= new PayDAO(ModifyInP.this );// 创建PayDAO对象\n\tIncomeDAO incomeDAO  = new IncomeDAO(ModifyInP.this);// 创建IncomeDAO对象\n\tpublic ModifyInP() {\n\t\t// TODO Auto-generated constructor stub\n\t}\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.modifyinp);// 设置布局文件 \n\t\tActivityManager.getInstance().addActivity(this); //管理Activity,退出按钮点击时调用\n\t\ttvtitle = (TextView) findViewById(R.id.inouttitle);// 获取标题标签对象\n\t\ttextView = (TextView) findViewById(R.id.tvInOut);// 获取地点/付款方标签对象\n\t\ttxtMoney = (EditText) findViewById(R.id.txtInOutMoney);// 获取金额文本框\n\t\ttxtTime = (EditText) findViewById(R.id.txtInOutTime);// 获取时间文本框\n\t\tspType = (Spinner) findViewById(R.id.spInOutType);// 获取类别下拉列表\n\t\ttxtHA = (EditText) findViewById(R.id.txtInOut);// 获取地点/付款方文本框\n\t\ttxtMark = (EditText) findViewById(R.id.txtInOutMark);// 获取备注文本框\n\t\tbtnEdit = (Button) findViewById(R.id.btnInOutEdit);// 获取修改按钮\n\t\tbtnDel = (Button) findViewById(R.id.btnInOutDelete);// 获取删除按钮\n\t}\n\t@Override\n\tprotected void onStart(){\n\t\tsuper.onStart();\n\t\t\n\t\tIntent intent = getIntent();// 创建Intent对象\n\t\tBundle bundle = intent.getExtras();// 获取传入的数据，并使用Bundle记录\n\t\tstrInfos = bundle.getStringArray(\"cwp.message\");// 获取Bundle中记录的信息\n\t\tstrno = strInfos[0];// 记录id\n\t\tstrType = strInfos[1];// 记录类型\n\t\tuserid=intent.getIntExtra(\"cwp.id\",100000001);\n\t\tif (strType.equals(\"btnoutinfo\"))// 如果类型是btnoutinfo\n\t\t{\n\t\t\t//选择列表初始化\n\t\t\tspdatalist=ptypeDAO.getPtypeName(userid);\n\t\t\tspdata=spdatalist.toArray(new String[spdatalist.size()]);//在tb_itype中按用户id读取 \n\t\t\tadapter =new ArrayAdapter<String>(ModifyInP.this,android.R.layout.simple_spinner_item,spdata); //动态生成收入类型列表\n\t\t\tspType.setAdapter(adapter);\n\t\t\t\n\t\t\ttvtitle.setText(\"支出管理\");// 设置标题为“支出管理”\n\t\t\ttextView.setText(\"地  点：\");// 设置“地点/付款方”标签文本为“地 点：”\n\t\t\t// 根据编号查找支出信息，并存储到Tb_pay对象中\n\t\t\tTb_pay tb_pay = payDAO.find(userid,Integer.parseInt(strno));\n\t\t\ttxtMoney.setText(String.valueOf(tb_pay.getMoney()));// 显示金额\n\t\t\ttxtTime.setText(tb_pay.getTime());// 显示时间\n\t\t\tspType.setSelection(tb_pay.getType()-1);// 显示类别\n\t\t\ttxtHA.setText(tb_pay.getAddress());// 显示地点\n\t\t\ttxtMark.setText(tb_pay.getMark());// 显示备注\n\t\t} else if (strType.equals(\"btnininfo\"))// 如果类型是btnininfo\n\t\t{\n\t\t\t//选择列表初始化\n\t\t\tspdatalist=itypeDAO.getItypeName(userid);\n\t\t\tspdata=spdatalist.toArray(new String[spdatalist.size()]);//在tb_itype中按用户id读取 \n\t\t\tadapter =new ArrayAdapter<String>(ModifyInP.this,android.R.layout.simple_spinner_item,spdata); //动态生成收入类型列表\n\t\t\tspType.setAdapter(adapter);\n\t\t\t\n\t\t\t\n\t\t\ttvtitle.setText(\"收入管理\");// 设置标题为“收入管理”\n\t\t\ttextView.setText(\"付款方：\");// 设置“地点/付款方”标签文本为“付款方：”\n\t\t\t// 根据编号查找收入信息，并存储到Tb_pay对象中\n\t\t\tTb_income tb_income = incomeDAO.find(userid,Integer.parseInt(strno));\n\t\t\ttxtMoney.setText(String.valueOf(tb_income.getMoney()));// 显示金额\n\t\t\ttxtTime.setText(tb_income.getTime());// 显示时间\t\n\t\t\tspType.setSelection(tb_income.getType()-1);// 显示类别\n\t\t\ttxtHA.setText(tb_income.getHandler());// 显示付款方\n\t\t\ttxtMark.setText(tb_income.getMark());// 显示备注\n\t\t}\n\n\t\ttxtTime.setOnClickListener(new OnClickListener() {// 为时间文本框设置单击监听事件\n\t\t\t@SuppressWarnings(\"deprecation\")\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tshowDialog(DATE_DIALOG_ID);// 显示日期选择对话框\n\t\t\t}\n\t\t});\n\n\t\tbtnEdit.setOnClickListener(new OnClickListener() {// 为修改按钮设置监听事件\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (strType.equals(\"btnoutinfo\"))// 判断类型如果是btnoutinfo\n\t\t\t\t{\n\t\t\t\t\tTb_pay tb_pay = new Tb_pay();// 创建Tb_pay对象\n\t\t\t\t\ttb_pay.set_id(userid);// 设置userid\n\t\t\t\t\ttb_pay.setNo(Integer.parseInt(strno));// 设置编号\n\t\t\t\t\ttb_pay.setMoney(Double.parseDouble(txtMoney.getText().toString()));// 设置金额\n\t\t\t\t\ttb_pay.setTime(setTimeFormat(txtTime.getText().toString()));// 设置时间\n\t\t\t\t\ttb_pay.setType(spType.getSelectedItemPosition()+1);// 设置类别\n\t\t\t\t\ttb_pay.setAddress(txtHA.getText().toString());// 设置地点\n\t\t\t\t\ttb_pay.setMark(txtMark.getText().toString());// 设置备注\n\t\t\t\t\tpayDAO.update(tb_pay);// 更新支出信息\n\t\t\t\t\tToast.makeText(ModifyInP.this, \"〖数据〗修改成功！\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\tgotoback();\n\t\t\t\t} else if (strType.equals(\"btnininfo\"))// 判断类型如果是btnininfo\n\t\t\t\t{\n\t\t\t\t\tTb_income tb_income = new Tb_income();// 创建Tb_income对象\n\t\t\t\t\ttb_income.set_id(userid);// 设置编号\n\t\t\t\t\ttb_income.setNo(Integer.parseInt(strno));// 设置编号\n\t\t\t\t\ttb_income.setMoney(Double.parseDouble(txtMoney.getText().toString()));// 设置金额\n\t\t\t\t\ttb_income.setTime(setTimeFormat(txtTime.getText().toString()));// 设置时间\n\t\t\t\t\ttb_income.setType(spType.getSelectedItemPosition()+1);// 设置类别\n\t\t\t\t\ttb_income.setHandler(txtHA.getText().toString());// 设置付款方\n\t\t\t\t\ttb_income.setMark(txtMark.getText().toString());// 设置备注\n\t\t\t\t\tincomeDAO.update(tb_income);// 更新收入信息\n\t\t\t\t\tToast.makeText(ModifyInP.this, \"〖数据〗修改成功！\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\tgotoback();\n\t\t\t\t}\n\t\t\t\t// 弹出信息提示\n\t\t\t\t \n\t\t\t}\n\t\t});\n\n\t\tbtnDel.setOnClickListener(new OnClickListener() {// 为删除按钮设置监听事件\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (strType.equals(\"btnoutinfo\"))// 判断类型如果是btnoutinfo\n\t\t\t\t{\n\t\t\t\t\tpayDAO.detele(userid,Integer.parseInt(strno));// 根据编号删除支出信息\n\t\t\t\t\tgotoback();\n\t\t\t\t} else if (strType.equals(\"btnininfo\"))// 判断类型如果是btnininfo\n\t\t\t\t{\n\t\t\t\t\tincomeDAO.detele(userid,Integer.parseInt(strno));// 根据编号删除收入信息\n\t\t\t\t\tgotoback();\n\t\t\t\t}\n\t\t\t\tToast.makeText(ModifyInP.this, \"〖数据〗删除成功！\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t.show();\n\t\t\t}\n\t\t});\n\n\t\tfinal Calendar c = Calendar.getInstance();// 获取当前系统日期\n\t\tmYear = c.get(Calendar.YEAR);// 获取年份\n\t\tmMonth = c.get(Calendar.MONTH);// 获取月份\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);// 获取天数\n\t\tupdateDisplay();// 显示当前系统时间\n\t}\n\n\t@Override\n\tprotected Dialog onCreateDialog(int id)// 重写onCreateDialog方法\n\t{\n\t\tswitch (id) {\n\t\tcase DATE_DIALOG_ID:// 弹出日期选择对话框\n\t\t\treturn new DatePickerDialog(this, mDateSetListener, mYear, mMonth,\n\t\t\t\t\tmDay);\n\t\t}\n\t\treturn null;\n\t}\n\n\tprivate DatePickerDialog.OnDateSetListener mDateSetListener = new DatePickerDialog.OnDateSetListener() {\n\t\tpublic void onDateSet(DatePicker view, int year, int monthOfYear,\n\t\t\t\tint dayOfMonth) {\n\t\t\tmYear = year;// 为年份赋值\n\t\t\tmMonth = monthOfYear;// 为月份赋值\n\t\t\tmDay = dayOfMonth;// 为天赋值\n\t\t\tupdateDisplay();// 显示设置的日期\n\t\t}\n\t};\n\n\tprivate void updateDisplay() {\n\t\t// 显示设置的时间\n\t\ttxtTime.setText(new StringBuilder().append(mYear).append(\"-\")\n\t\t\t\t.append(mMonth + 1).append(\"-\").append(mDay));\n\t}\n\n\tprivate void gotoback(){\n\t\t \n\t\tIntent intent=new Intent(ModifyInP.this,MainActivity.class);\n\t\tintent.putExtra(\"cwp.id\",userid);\n\t\tstartActivity(intent);\n\t}\n\t\n\tprivate String setTimeFormat(String txtTime){\n\t\tString date=txtTime;\n\n\t\tint y,m,d;\n\t\tString sm,sd;\n\t\tint i=0,j=0,k=0; \n\t\t\n\t\tfor (i = 0; i < date.length(); i++)   \n\t\t  {   \n\t\t   if (date.substring(i, i + 1).equals(\"-\") && j==0)   \n\t\t\t    j=i;\n\t\t   else if(date.substring(i, i + 1).equals(\"-\"))\n\t\t\t    k=i;\n\t\t  } \n\t\ty=Integer.valueOf(date.substring(0,j));\n\t\tm=Integer.valueOf(date.substring(j+1,k));\n\t\td=Integer.valueOf(date.substring(k+1));\n\t\tif(m<10){\n\t\t\tsm=\"0\"+String.valueOf(m);\n\t\t}\n\t\telse\n\t\t\tsm=String.valueOf(m);\n\t\tif(d<10){\n\t\t\tsd=\"0\"+String.valueOf(d);\n\t\t}\n\t\telse\n\t\t\tsd=String.valueOf(d);\n \n\t\treturn String.valueOf(y)+\"-\"+sm+\"-\"+sd;\n\t\t\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/NiftyDialogBuilder.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport com.cwp.cmoneycharge.R;\n\nimport android.app.Dialog;\nimport android.content.Context;\nimport android.content.DialogInterface;\nimport android.graphics.Color;\nimport android.graphics.drawable.Drawable;\nimport android.os.Bundle;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.view.WindowManager;\nimport android.widget.Button;\nimport android.widget.FrameLayout;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.RelativeLayout;\nimport android.widget.TextView;\n\n\n/**\n * Created by lee on 2014/7/30.\n */\npublic class NiftyDialogBuilder extends Dialog implements DialogInterface {\n\n    private final String defTextColor=\"#FFFFFFFF\";\n\n    private final String defDividerColor=\"#11000000\";\n\n    private final String defMsgColor=\"#FFFFFFFF\";\n\n    private final String defDialogColor=\"#FFE74C3C\";\n\n\n\n    private Effectstype type=null;\n\n    private LinearLayout mLinearLayoutView;\n\n    private RelativeLayout mRelativeLayoutView;\n\n    private LinearLayout mLinearLayoutMsgView;\n\n    private LinearLayout mLinearLayoutTopView;\n\n    private FrameLayout mFrameLayoutCustomView;\n\n    private View mDialogView;\n\n    private View mDivider;\n\n    private TextView mTitle;\n\n    private TextView mMessage;\n\n    private ImageView mIcon;\n\n    private Button mButton1;\n\n    private Button mButton2;\n\n    private int mDuration = -1;\n\n    private static  int mOrientation=1;\n\n    private boolean isCancelable=true;\n\n    private volatile static NiftyDialogBuilder instance;\n\n    public NiftyDialogBuilder(Context context) {\n        super(context);\n        init(context);\n\n    }\n    public NiftyDialogBuilder(Context context,int theme) {\n        super(context, theme);\n        init(context);\n    }\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        WindowManager.LayoutParams params = getWindow().getAttributes();\n        params.height = ViewGroup.LayoutParams.MATCH_PARENT;\n        params.width  = ViewGroup.LayoutParams.MATCH_PARENT;\n        getWindow().setAttributes((android.view.WindowManager.LayoutParams) params);\n\n    }\n\n    public static NiftyDialogBuilder getInstance(Context context) {\n\n        int ort=context.getResources().getConfiguration().orientation;\n        if (mOrientation!=ort){\n            mOrientation=ort;\n            instance=null;\n        }\n\n        if (instance == null) {\n            synchronized (NiftyDialogBuilder.class) {\n                if (instance == null) {\n                    instance = new NiftyDialogBuilder(context,R.style.dialog_untran);\n                }\n            }\n        }\n        return instance;\n\n    }\n\n    private void init(Context context) {\n\n\n        mDialogView = View.inflate(context, R.layout.dialog_layout, null);\n\n        mLinearLayoutView=(LinearLayout)mDialogView.findViewById(R.id.parentPanel);\n        mRelativeLayoutView=(RelativeLayout)mDialogView.findViewById(R.id.main);\n        mLinearLayoutTopView=(LinearLayout)mDialogView.findViewById(R.id.topPanel);\n        mLinearLayoutMsgView=(LinearLayout)mDialogView.findViewById(R.id.contentPanel);\n        mFrameLayoutCustomView=(FrameLayout)mDialogView.findViewById(R.id.customPanel);\n\n        mTitle = (TextView) mDialogView.findViewById(R.id.alertTitle);\n        mMessage = (TextView) mDialogView.findViewById(R.id.message);\n        mIcon = (ImageView) mDialogView.findViewById(R.id.icon);\n        mDivider = mDialogView.findViewById(R.id.titleDivider);\n        mButton1=(Button)mDialogView.findViewById(R.id.button1);\n        mButton2=(Button)mDialogView.findViewById(R.id.button2);\n\n        setContentView(mDialogView);\n\n        this.setOnShowListener(new OnShowListener() {\n            @Override\n            public void onShow(DialogInterface dialogInterface) {\n\n                mLinearLayoutView.setVisibility(View.VISIBLE);\n                if(type==null){\n                    type=Effectstype.Slidetop;\n                }\n                start(type);\n\n\n            }\n        });\n        mRelativeLayoutView.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View view) {\n                if (isCancelable)dismiss();\n            }\n        });\n    }\n\n    public void toDefault(){\n        mTitle.setTextColor(Color.parseColor(defTextColor));\n        mDivider.setBackgroundColor(Color.parseColor(defDividerColor));\n        mMessage.setTextColor(Color.parseColor(defMsgColor));\n        mLinearLayoutView.setBackgroundColor(Color.parseColor(defDialogColor));\n    }\n\n    public NiftyDialogBuilder withDividerColor(String colorString) {\n        mDivider.setBackgroundColor(Color.parseColor(colorString));\n        return this;\n    }\n\n\n    public NiftyDialogBuilder withTitle(CharSequence title) {\n        toggleView(mLinearLayoutTopView,title);\n        mTitle.setText(title);\n        return this;\n    }\n\n    public NiftyDialogBuilder withTitleColor(String colorString) {\n        mTitle.setTextColor(Color.parseColor(colorString));\n        return this;\n    }\n\n    public NiftyDialogBuilder withMessage(int textResId) {\n        toggleView(mLinearLayoutMsgView,textResId);\n        mMessage.setText(textResId);\n        return this;\n    }\n\n    public NiftyDialogBuilder withMessage(CharSequence msg) {\n        toggleView(mLinearLayoutMsgView,msg);\n        mMessage.setText(msg);\n        return this;\n    }\n    public NiftyDialogBuilder withMessageColor(String colorString) {\n        mMessage.setTextColor(Color.parseColor(colorString));\n        return this;\n    }\n\n    public NiftyDialogBuilder withIcon(int drawableResId) {\n        mIcon.setImageResource(drawableResId);\n        return this;\n    }\n\n    public NiftyDialogBuilder withIcon(Drawable icon) {\n        mIcon.setImageDrawable(icon);\n        return this;\n    }\n\n    public NiftyDialogBuilder withDuration(int duration) {\n        this.mDuration=duration;\n        return this;\n    }\n\n    public NiftyDialogBuilder withEffect(Effectstype type) {\n        this.type=type;\n        return this;\n    }\n    \n    public NiftyDialogBuilder withButtonDrawable(int resid) {\n        mButton1.setBackgroundResource(resid);\n        mButton2.setBackgroundResource(resid);\n        return this;\n    }\n    public NiftyDialogBuilder withButton1Text(CharSequence text) {\n        mButton1.setVisibility(View.VISIBLE);\n        mButton1.setText(text);\n\n        return this;\n    }\n    public NiftyDialogBuilder withButton2Text(CharSequence text) {\n        mButton2.setVisibility(View.VISIBLE);\n        mButton2.setText(text);\n        return this;\n    }\n    public NiftyDialogBuilder setButton1Click(View.OnClickListener click) {\n        mButton1.setOnClickListener(click);\n        return this;\n    }\n\n    public NiftyDialogBuilder setButton2Click(View.OnClickListener click) {\n        mButton2.setOnClickListener(click);\n        return this;\n    }\n\n\n    public NiftyDialogBuilder setCustomView(int resId, Context context) {\n        View customView = View.inflate(context, resId, null);\n        if (mFrameLayoutCustomView.getChildCount()>0){\n            mFrameLayoutCustomView.removeAllViews();\n        }\n        mFrameLayoutCustomView.addView(customView);\n        return this;\n    }\n\n    public NiftyDialogBuilder setCustomView(View view, Context context) {\n        if (mFrameLayoutCustomView.getChildCount()>0){\n            mFrameLayoutCustomView.removeAllViews();\n        }\n        mFrameLayoutCustomView.addView(view);\n\n        return this;\n    }\n    public NiftyDialogBuilder isCancelableOnTouchOutside(boolean cancelable) {\n        this.isCancelable=cancelable;\n        this.setCanceledOnTouchOutside(cancelable);\n        return this;\n    }\n\n    public NiftyDialogBuilder isCancelable(boolean cancelable) {\n        this.isCancelable=cancelable;\n        this.setCancelable(cancelable);\n        return this;\n    }\n\n    private void toggleView(View view,Object obj){\n        if (obj==null){\n            view.setVisibility(View.GONE);\n        }else {\n            view.setVisibility(View.VISIBLE);\n        }\n    }\n    @Override\n    public void show() {\n\n        if (mTitle.getText().equals(\"\")) mDialogView.findViewById(R.id.topPanel).setVisibility(View.GONE);\n\n        super.show();\n    }\n\n    private void start(Effectstype type){\n        BaseEffects animator = type.getAnimator();\n        if(mDuration != -1){\n            animator.setDuration(Math.abs(mDuration));\n        }\n        animator.start(mRelativeLayoutView);\n    }\n\n    @Override\n    public void dismiss() {\n        super.dismiss();\n        mButton1.setVisibility(View.GONE);\n        mButton2.setVisibility(View.GONE);\n    }\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/PayChart.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport java.text.DecimalFormat;\nimport java.text.NumberFormat;\nimport java.util.ArrayList;\nimport java.util.Calendar;\nimport java.util.List;\nimport java.util.Random;\n\nimport com.cwp.chart.ChartProp;\nimport com.cwp.chart.ChartPropChangeListener;\nimport com.cwp.chart.MenuFragment;\nimport com.cwp.chart.MyButton;\nimport com.cwp.chart.PieView;\nimport com.cwp.chart.SystemBarTintManager;\nimport com.cwp.pattern.UnlockGesturePasswordActivity;\nimport com.slidingmenu.lib.SlidingMenu;\nimport com.slidingmenu.lib.app.SlidingActivity;\n\nimport cwp.moneycharge.dao.IncomeDAO;\nimport cwp.moneycharge.dao.ItypeDAO;\nimport cwp.moneycharge.dao.PayDAO;\nimport cwp.moneycharge.dao.PtypeDAO;\nimport cwp.moneycharge.model.KindData;\n\nimport android.os.Build;\nimport android.os.Bundle;\nimport android.os.Handler;\nimport android.os.Message;\nimport android.annotation.TargetApi;\nimport android.app.FragmentTransaction;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.content.SharedPreferences;\nimport android.graphics.Color;\nimport android.graphics.drawable.BitmapDrawable;\n\nimport android.text.format.Time;\nimport android.util.DisplayMetrics;\nimport android.view.KeyEvent;\nimport android.view.LayoutInflater;\nimport android.view.MenuItem;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.Window;\nimport android.view.WindowManager;\nimport android.view.View.OnClickListener;\nimport android.view.View.OnTouchListener;\nimport android.widget.Adapter;\nimport android.widget.ArrayAdapter;\nimport android.widget.Button;\nimport android.widget.FrameLayout;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.PopupWindow;\nimport android.widget.Spinner;\nimport android.widget.SpinnerAdapter;\nimport android.widget.TextView;\nimport android.widget.PopupWindow.OnDismissListener;\n\npublic class PayChart extends SlidingActivity implements OnClickListener {\n\tDialogShowUtil dialogShowUtil = new DialogShowUtil(this, this, null, null,\n\t\t\tnull);\n\t// 定义布局对象\n\tprivate FrameLayout friendfeedFl, myfeedFl, homeFl, moreFl;\n\n\t// 定义图片组件对象\n\tprivate ImageView friendfeedIv, myfeedIv, homeIv, moreIv;\n\n\t// 定义按钮图片组件\n\tprivate ImageView toggleImageView, plusImageView;\n\n\t// 定义PopupWindow\n\tprivate PopupWindow popWindow;\n\tprivate LinearLayout popWinLayout;\n\n\t// 定义pop组件\n\tprivate LinearLayout pop_voiceView;\n\tprivate LinearLayout pop_quickView;\n\n\tprivate int[] itemColor;// 选项颜色\n\tprivate String[] itemText;// 选项文字\n\tprivate PieView pieView;\n\tprivate float surfacViewWidth = 0;\n\tprivate float surfacViewHeight = 0;\n\tprivate MyButton myButton;\n\tLinearLayout piechart, pdataselect;\n\tprivate TextView textView;\n\tprivate TextView textView2, example_center;\n\tprivate ImageView example_left, example_left2, example_right;\n\tButton anytime;\n\tString date1 = \"\", date2 = \"\", dday, dmonth;\n\tSpinner year, month, day, yeare, monthe, daye;// 界面上的任意时间\n\n\tList<String> yearlist;\n\tstatic String amount = \"\";\n\tTime time;// 获取当前时间\n\tint defaultMonth, defaultDay;\n\tint defaultYear;\n\tIntent intentr;\n\tint userid;\n\tint type;\n\tString datatype = \"pay\";\n\tAdapter adapter;\n\n\tPayDAO payDAO;\n\tIncomeDAO incomeDAO;\n\tList<KindData> KindDatap;\n\tPtypeDAO ptypeDAO;\n\tItypeDAO itypeDAO;\n\n\t@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\t// getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,\n\t\t// WindowManager.LayoutParams.FLAG_FULLSCREEN);\n\n\t\tSysApplication.getInstance().addActivity(this); // 在销毁队列中添加this\n\t\tsetContentView(R.layout.paychart);\n\t\t// set the Behind View\n\t\tsetBehindContentView(R.layout.frame_menu);\n\n\t\tSystemBarTintManager mTintManager;\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n\t\t\tsetTranslucentStatus(true);\n\t\t}\n\t\tmTintManager = new SystemBarTintManager(this);\n\t\tmTintManager.setStatusBarTintEnabled(true);\n\t\tmTintManager.setStatusBarTintResource(R.color.fragment2);\n\n\t\tpayDAO = new PayDAO(PayChart.this);\n\t\tKindDatap = new ArrayList<KindData>();\n\t\tptypeDAO = new PtypeDAO(PayChart.this);\n\t\tincomeDAO = new IncomeDAO(PayChart.this);\n\t\titypeDAO = new ItypeDAO(PayChart.this);\n\n\t\tFragmentTransaction fragmentTransaction = getFragmentManager()\n\t\t\t\t.beginTransaction();\n\t\tMenuFragment menuFragment = new MenuFragment();\n\t\tfragmentTransaction.replace(R.id.menu, menuFragment);\n\t\tfragmentTransaction.commit();\n\n\t\t// customize the SlidingMenu\n\t\tSlidingMenu sm = getSlidingMenu();\n\t\tsm.setMode(SlidingMenu.LEFT);\n\t\tsm.setShadowWidth(50);\n\t\tsm.setShadowDrawable(R.drawable.shadow);\n\t\tsm.setBehindOffset(260);\n\t\tsm.setFadeDegree(0.4f);\n\t\t// 设置slding menu的几种手势模式\n\t\t// TOUCHMODE_FULLSCREEN 全屏模式，在content页面中，滑动，可以打开sliding menu\n\t\t// TOUCHMODE_MARGIN 边缘模式，在content页面中，如果想打开slding ,你需要在屏幕边缘滑动才可以打开slding\n\t\t// menu\n\t\t// TOUCHMODE_NONE 自然是不能通过手势打开啦\n\t\tsm.setTouchModeAbove(SlidingMenu.TOUCHMODE_MARGIN);\n\n\t\t// 使用左上方icon可点，这样在onOptionsItemSelected里面才可以监听到R.id.home\n\t\t// getActionBar().setDisplayHomeAsUpEnabled(true);\n\n\t\tinitView();\n\n\t}\n\n\t@TargetApi(19)\n\tprivate void setTranslucentStatus(boolean on) {\n\t\tWindow win = getWindow();\n\t\tWindowManager.LayoutParams winParams = win.getAttributes();\n\t\tfinal int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;\n\t\tif (on) {\n\t\t\twinParams.flags |= bits;\n\t\t} else {\n\t\t\twinParams.flags &= ~bits;\n\t\t}\n\t\twin.setAttributes(winParams);\n\t}\n\n\t@Override\n\tprotected void onStart() {\n\n\t\tsuper.onStart();\n\n\t}\n\n\t@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tpieView.rotateEnable();\n\t\tSharedPreferences sp = this.getSharedPreferences(\"preferences\",\n\t\t\t\tMODE_WORLD_READABLE);\n\t\tCrashApplication myApplaction = (CrashApplication) getApplication();\n\t\tif ((myApplaction.isLocked)\n\t\t\t\t&& (sp.getString(\"gesturepw\", \"\").equals(\"开\"))) {// 判断是否需要跳转到密码界面\n\t\t\tIntent intent = new Intent(this,\n\t\t\t\t\tUnlockGesturePasswordActivity.class);\n\t\t\tstartActivity(intent);\n\t\t}\n\t}\n\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\n\t\tif (pieView != null) {\n\t\t\tpieView.rotateDisable();\n\t\t}\n\t}\n\n\t/**\n\t * \n\t * Description:初始化界面元紿\n\t * \n\t */\n\n\tpublic void initView() {\n\n\t\tfinal Calendar c = Calendar.getInstance();// 获取当前系统日期\n\t\tdefaultYear = c.get(Calendar.YEAR);// 获取年份\n\t\tdefaultMonth = c.get(Calendar.MONTH) + 1;// 获取月份\n\t\tdefaultDay = c.get(Calendar.DAY_OF_MONTH);// 获取天数\n\t\tif (defaultMonth < 10) {\n\t\t\tdmonth = \"0\" + Integer.toString(defaultMonth);\n\t\t} else {\n\t\t\tdmonth = Integer.toString(defaultMonth);\n\t\t}\n\t\tif (defaultDay < 10) {\n\t\t\tdday = \"0\" + Integer.toString(defaultDay);\n\t\t} else {\n\t\t\tdday = Integer.toString(defaultDay);\n\t\t}\n\t\tdate2 = Integer.toString(defaultYear) + \"-\" + dmonth + \"-\" + dday;\n\t\tdate1 = Integer.toString(defaultYear) + \"-01-01\";\n\n\t\tintentr = getIntent();\n\t\tuserid = intentr.getIntExtra(\"cwp.id\", 100000001);\n\t\tdefaultMonth = intentr.getIntExtra(\"default\", defaultMonth);\n\t\tdefaultYear = intentr.getIntExtra(\"defaulty\", defaultYear);\n\n\t\tpieView = (PieView) this.findViewById(R.id.lotteryView);\n\t\t// myButton = (MyButton) this.findViewById(R.id.MyBt);\n\t\ttextView = (TextView) this.findViewById(R.id.MyTV);\n\t\ttextView2 = (TextView) this.findViewById(R.id.MyTVbottom);\n\t\texample_left = (ImageView) findViewById(R.id.example_left);\n\t\texample_left2 = (ImageView) findViewById(R.id.example_left2);\n\t\texample_right = (ImageView) findViewById(R.id.example_right);\n\t\texample_center = (TextView) this.findViewById(R.id.example_center);\n\t\tpdataselect = (LinearLayout) findViewById(R.id.pdataselect);\n\t\tyear = (Spinner) findViewById(R.id.pyear);\n\t\tmonth = (Spinner) findViewById(R.id.pmonth);\n\t\tday = (Spinner) findViewById(R.id.pday);\n\t\tyeare = (Spinner) findViewById(R.id.pyeare);\n\t\tmonthe = (Spinner) findViewById(R.id.pmonthe);\n\t\tdaye = (Spinner) findViewById(R.id.pdaye);\n\t\tyearlist = new ArrayList<String>(); // 生成年份列表 spinner\n\t\tanytime = (Button) findViewById(R.id.panytime);\n\n\t\t// 设置年\n\t\tfor (int i = 0; i <= 10; i++) {\n\t\t\tyearlist.add(String.valueOf(defaultYear - i));\n\t\t}\n\t\tadapter = new ArrayAdapter<String>(PayChart.this,\n\t\t\t\tandroid.R.layout.simple_spinner_item, yearlist);\n\t\tyear.setAdapter((SpinnerAdapter) adapter);\n\t\tyeare.setAdapter((SpinnerAdapter) adapter);\n\n\t\t// 实例化布局对象\n\t\tfriendfeedFl = (FrameLayout) this.findViewById(R.id.layout_friendfeed2);\n\t\tmyfeedFl = (FrameLayout) this.findViewById(R.id.layout_myfeed2);\n\t\thomeFl = (FrameLayout) this.findViewById(R.id.layout_home2);\n\t\tmoreFl = (FrameLayout) this.findViewById(R.id.layout_more2);\n\n\t\t// 实例化图片组件对象\n\t\tfriendfeedIv = (ImageView) this.findViewById(R.id.image_friendfeed2);\n\t\tmyfeedIv = (ImageView) this.findViewById(R.id.image_myfeed2);\n\t\thomeIv = (ImageView) this.findViewById(R.id.image_home2);\n\t\tmoreIv = (ImageView) this.findViewById(R.id.image_more2);\n\n\t\t// 实例化按钮图片组件\n\t\ttoggleImageView = (ImageView) this.findViewById(R.id.toggle_btn2);\n\t\tplusImageView = (ImageView) this.findViewById(R.id.plus_btn2);\n\t\tinitData();\n\n\t\ttextView.setOnClickListener(this);\n\t\texample_left.setOnClickListener(this);\n\t\texample_left2.setOnClickListener(this);\n\t\texample_right.setOnClickListener(this);\n\t\tanytime.setOnClickListener(this);\n\n\t\ttype = intentr.getIntExtra(\"type\", 0);// 为0，选择上下月，为1，选择任意时间\n\t\tif (intentr.getStringExtra(\"datatype\") != null) {\n\t\t\tdatatype = intentr.getStringExtra(\"datatype\");\n\t\t}\n\t\tif ((intentr.getStringExtra(\"date1\") != null)\n\t\t\t\t&& (intentr.getStringExtra(\"date2\") != null)) {\n\t\t\tdate1 = intentr.getStringExtra(\"date1\");\n\t\t\tdate2 = intentr.getStringExtra(\"date2\");\n\t\t}\n\t\t// 为0，选择上下月，为1，选择任意时间\n\t\t// 获取数据\n\t\tif (type == 0) {\n\t\t\tpdataselect.setVisibility(View.GONE);\n\t\t\texample_left.setVisibility(View.VISIBLE);\n\t\t\texample_right.setVisibility(View.VISIBLE);\n\t\t\texample_center.setText(String.valueOf(defaultYear) + \"年 - \"\n\t\t\t\t\t+ String.valueOf(defaultMonth) + \"月\");\n\t\t\tif (datatype.equals(\"pay\")) {\n\t\t\t\tKindDatap = payDAO.getKDataOnMonth(userid, defaultYear,\n\t\t\t\t\t\tdefaultMonth);\n\t\t\t} else {\n\t\t\t\tKindDatap = incomeDAO.getKDataOnMonth(userid, defaultYear,\n\t\t\t\t\t\tdefaultMonth);\n\t\t\t}\n\n\t\t} else {\n\t\t\tpdataselect.setVisibility(View.VISIBLE);\n\t\t\texample_left.setVisibility(View.GONE);\n\t\t\texample_right.setVisibility(View.GONE);\n\t\t\texample_center.setText(date1 + \" ~ \" + date2);\n\t\t\tif (datatype.equals(\"pay\")) {\n\t\t\t\tKindDatap = payDAO.getKDataOnDay(userid, date1, date2);\n\t\t\t} else {\n\t\t\t\tKindDatap = payDAO.getKDataOnDay(userid, date1, date2);\n\t\t\t}\n\t\t\tmonthe.setSelection(defaultMonth - 1); // spinner显示当前月\n\t\t\tdaye.setSelection(defaultDay - 1); // spinner显示当前日\n\t\t}\n\n\t\tinitItem(); // 初始化数据\n\n\t\tif (!(KindDatap.size() == 0)) { // 当获取到数据时\n\t\t\tMessage msg = new Message();\n\t\t\tmsg.obj = pieView.getCurrentChartProp();\n\t\t\thandler.sendMessage(msg); // 发送消息，更新UI\n\t\t}\n\n\t\tpieView.setChartPropChangeListener(new ChartPropChangeListener() {\n\n\t\t\t@Override\n\t\t\tpublic void getChartProp(ChartProp chartProp) {\n\t\t\t\tMessage msg = new Message();\n\t\t\t\tmsg.obj = chartProp;\n\t\t\t\thandler.sendMessage(msg); // 发送消息，更新UI\n\t\t\t}\n\t\t});\n\n\t\tpieView.start();\n\n\t}\n\n\tpublic Handler handler = new Handler() { // 创建线程\n\t\tpublic void handleMessage(android.os.Message msg) {\n\t\t\tChartProp chartProp = (ChartProp) msg.obj;\n\t\t\t// myButton.setBackgroundPaintColor(chartProp.getColor());\n\t\t\ttextView.setText(chartProp.getName());\n\t\t\ttextView2.setText(chartProp.getName2());\n\t\t\ttextView.setTextColor(chartProp.getColor());\n\t\t};\n\t};\n\tprivate LinearLayout pop_photoView;\n\tDecimalFormat df = new DecimalFormat(\"#.00\");\n\n\t/**\n\t * \n\t * Description:初始化转盘的颜色\n\t * \n\t */\n\tpublic void initItem() {\n\t\tint i = 0;\n\t\tint fivecolor[] = new int[] { Color.rgb(56, 220, 244), Color.GREEN,\n\t\t\t\tColor.RED, Color.YELLOW, Color.CYAN };\n\n\t\tif (KindDatap.size() == 0) { // 没有数据的情况\n\t\t\tamount = \"暂无数据\"; // 无数据下总数的提示文字\n\n\t\t} else { // 获取数据的情况\n\t\t\tdouble sum = 0.00;\n\t\t\tfor (KindData kp : KindDatap) {\n\t\t\t\tsum += kp.getAmount();// 取得总和\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t// 初始化数组\n\t\t\tString names[] = new String[i];\n\t\t\tfloat percent[] = new float[i];\n\t\t\tString names2[] = new String[i];\n\t\t\tint color[] = new int[i];\n\t\t\ti = 0;\n\n\t\t\tfor (KindData kp : KindDatap) {\n\t\t\t\tif (datatype.equals(\"pay\")) {\n\t\t\t\t\tnames[i] = ptypeDAO.getOneName(userid, kp.getKindname());\n\t\t\t\t} else {\n\t\t\t\t\tnames[i] = itypeDAO.getOneName(userid, kp.getKindname());\n\t\t\t\t}\n\t\t\t\tif (i < fivecolor.length) {\n\t\t\t\t\tcolor[i] = fivecolor[i]; // 使用自定义颜色\n\t\t\t\t} else {\n\t\t\t\t\tcolor[i] = getRandomColor(); // 使用随机生成的颜色\n\t\t\t\t}\n\t\t\t\tjava.text.NumberFormat percentFormat = java.text.NumberFormat\n\t\t\t\t\t\t.getPercentInstance();\n\t\t\t\tpercentFormat.setMaximumFractionDigits(2); // 最大小数位数\n\t\t\t\t// 自动转换成百分比显示.\n\t\t\t\tnames2[i] = percentFormat.format(kp.getAmount() / sum) + \":￥\"\n\t\t\t\t\t\t+ df.format(kp.getAmount());\n\t\t\t\tpercent[i] = (float) (kp.getAmount() / sum); // 计算所占百分比\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t\tamount = df.format(sum); // 总数的费用\n\n\t\t\t// 创建图表\n\t\t\tArrayList<ChartProp> acps = pieView.createCharts(i);\n\t\t\tint size = acps.size();\n\t\t\tfor (int k = 0; k < size; k++) { // 把数据传入图表\n\t\t\t\tChartProp chartProp = acps.get(k);\n\t\t\t\tchartProp.setColor(color[k]);\n\t\t\t\tchartProp.setPercent(percent[k]);\n\t\t\t\tchartProp.setName(names[k]);\n\t\t\t\tchartProp.setName2(names2[k]);\n\t\t\t}\n\t\t\tpieView.initPercents();\n\t\t}\n\n\t}\n\n\tprivate int getRandomColor() {// 分别产生RBG数值\n\t\tRandom random = new Random();\n\t\tint R = random.nextInt(255);\n\t\tint G = random.nextInt(255);\n\t\tint B = random.nextInt(255);\n\t\treturn Color.rgb(R, G, B);\n\t}\n\n\tpublic static String getamount() {\n\t\treturn amount;\n\t}\n\n\t@Override\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\tcase R.id.layout_friendfeed2:\n\t\t\tclickSwitchBtn(\"1\");\n\t\t\tbreak;\n\t\t// 点击与我相关按钮\n\t\tcase R.id.layout_myfeed2:\n\t\t\tclickSwitchBtn(\"2\");\n\t\t\tbreak;\n\t\t// 点击我的空间按钮\n\t\tcase R.id.layout_home2:\n\t\t\tclickSwitchBtn(\"3\");\n\t\t\tbreak;\n\t\t// 点击更多按钮\n\t\tcase R.id.layout_more2:\n\t\t\tclickSwitchBtn(\"4\");\n\t\t\tbreak;\n\t\t// 点击中间按钮\n\t\tcase R.id.toggle_btn2:\n\t\t\tclickToggleBtn();\n\t\t\tbreak;\n\t\t// 点击中间按钮\n\t\tcase R.id.pop_voice:\n\t\t\tclickPop_voiceBtn();\n\t\t\tbreak;\n\t\tcase R.id.pop_quick:\n\t\t\tclickPop_quickBtn();\n\t\t\tbreak;\n\t\tcase R.id.pop_photo:\n\t\t\tclickPop_photoViewBtn();\n\t\t\tbreak;\n\t\tcase R.id.panytime:\n\t\t\tgetAnyDate();\n\t\t\tIntent intentp = new Intent(PayChart.this, PayChart.class);\n\t\t\tintentp.putExtra(\"type\", 1);\n\t\t\tintentp.putExtra(\"datatype\", datatype);\n\t\t\tintentp.putExtra(\"date1\", date1);\n\t\t\tintentp.putExtra(\"date2\", date2);\n\t\t\tintentp.putExtra(\"cwp.id\", userid);\n\t\t\tstartActivity(intentp);\n\t\t\tbreak;\n\t\tcase R.id.example_left2:\n\t\t\ttoggle();\n\t\t\tbreak;\n\t\tcase R.id.example_left: // 上一个月的按键\n\t\t\tif (defaultMonth != 1)\n\t\t\t\tdefaultMonth = defaultMonth - 1;\n\t\t\telse {\n\t\t\t\tdefaultMonth = 12;\n\t\t\t\tdefaultYear = defaultYear - 1;\n\t\t\t}\n\t\t\tIntent intentl = new Intent(PayChart.this, PayChart.class);\n\t\t\tintentl.putExtra(\"type\", 0);\n\t\t\tintentl.putExtra(\"defaulty\", defaultYear);\n\t\t\tintentl.putExtra(\"default\", defaultMonth);\n\t\t\tintentl.putExtra(\"datatype\", datatype);\n\t\t\tintentl.putExtra(\"cwp.id\", userid);\n\t\t\tstartActivity(intentl);\n\t\t\toverridePendingTransition(R.anim.in_from_right, R.anim.out_to_left);\n\t\t\tthis.finish();\n\t\t\tbreak;\n\t\tcase R.id.example_right: // 下一个月的按键\n\t\t\tif (defaultMonth != 12)\n\t\t\t\tdefaultMonth = defaultMonth + 1;\n\t\t\telse {\n\t\t\t\tdefaultMonth = 1;\n\t\t\t\tdefaultYear = defaultYear + 1;\n\t\t\t}\n\t\t\tIntent intentr = new Intent(PayChart.this, PayChart.class);\n\t\t\tintentr.putExtra(\"type\", 0);\n\t\t\tintentr.putExtra(\"defaulty\", defaultYear);\n\t\t\tintentr.putExtra(\"default\", defaultMonth);\n\t\t\tintentr.putExtra(\"cwp.id\", userid);\n\t\t\tintentr.putExtra(\"datatype\", datatype);\n\t\t\tstartActivity(intentr);\n\t\t\toverridePendingTransition(android.R.anim.slide_in_left,\n\t\t\t\t\tandroid.R.anim.slide_out_right);\n\t\t\tthis.finish();\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tprivate void clickPop_photoViewBtn() {\n\t\tIntent intent = new Intent(PayChart.this, AddPay.class);// 创建Intent对象\n\t\tintent.putExtra(\"cwp.id\", userid);\n\t\tintent.putExtra(\"cwp.photo\", \"\");// 设置传递数据\n\t\tstartActivity(intent);\n\t}\n\n\tprivate void clickSwitchBtn(String i) {\n\t\tIntent intent = new Intent(PayChart.this, MainActivity.class);\n\t\tintent.putExtra(\"cwp.id\", userid);\n\t\tintent.putExtra(\"cwp.Fragment\", i);// 设置传递数据\n\t\tstartActivity(intent);\n\t\toverridePendingTransition(android.R.anim.fade_in,\n\t\t\t\tandroid.R.anim.fade_out);\n\t}\n\n\t@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// toggle就是程序自动判断是打开还是关闭\n\t\t\ttoggle();\n\t\t\t// getSlidingMenu().showMenu();// show menu\n\t\t\t// getSlidingMenu().showContent();//show content\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}\n\n\t/**\n\t * 显示PopupWindow弹出菜单\n\t */\n\tprivate void showPopupWindow(View parent) {\n\t\tDisplayMetrics dm = parent.getResources().getDisplayMetrics();\n\t\tint w_screen = dm.widthPixels;\n\t\tint h_screen = dm.heightPixels;\n\t\t// System.out\n\t\t// .println(\"你的设备w_screen：\" + w_screen + \" h_screen：\" + h_screen);\n\t\tif (popWindow == null) {\n\t\t\tLayoutInflater layoutInflater = (LayoutInflater) this\n\t\t\t\t\t.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n\t\t\tView view = layoutInflater.inflate(R.layout.popwindow_layout, null);\n\t\t\tpopWinLayout = (LinearLayout) view.findViewById(R.id.popwindow);\n\t\t\t// 创建一个PopuWidow对象\n\t\t\tfloat radiowith = w_screen / 480.0f;\n\t\t\tfloat radioheight = h_screen / 800.0f;\n\t\t\tpopWindow = new PopupWindow(view,\n\t\t\t\t\t(int) (popWinLayout.getLayoutParams().width), h_screen / 4);\n\t\t}\n\t\t// 使其聚集 ，要想监听菜单里控件的事件就必须要调用此方法\n\t\tpopWindow.setFocusable(true);\n\n\t\tpop_voiceView = (LinearLayout) popWinLayout\n\t\t\t\t.findViewById(R.id.pop_voice);\n\t\tpop_quickView = (LinearLayout) popWinLayout\n\t\t\t\t.findViewById(R.id.pop_quick);\n\t\tpop_photoView = (LinearLayout) popWinLayout\n\t\t\t\t.findViewById(R.id.pop_photo);\n\t\tpop_voiceView.setOnClickListener(this);\n\t\tpop_quickView.setOnClickListener(this);\n\t\tpop_photoView.setOnClickListener(this);\n\n\t\t// 设置允许在外点击消失\n\t\tpopWindow.setOutsideTouchable(true);\n\t\t// 设置背景，这个是为了点击“返回Back”也能使其消失，并且并不会影响你的背景\n\t\tpopWindow.setBackgroundDrawable(new BitmapDrawable());\n\t\t// 设置菜单显示的位置\n\n\t\tint xPos = (w_screen - popWinLayout.getLayoutParams().width) / 2;\n\t\tpopWindow.showAsDropDown(parent, xPos, 12);\n\t\t// popWindow.showAsDropDown(parent, Gravity.CENTER, 0);\n\n\t\t// 监听菜单的关闭事件\n\t\tpopWindow.setOnDismissListener(new OnDismissListener() {\n\t\t\t@Override\n\t\t\tpublic void onDismiss() {\n\t\t\t\t// 改变显示的按钮图片为正常状态\n\t\t\t\tchangeButtonImage();\n\t\t\t}\n\t\t});\n\n\t\t// 监听触屏事件\n\t\tpopWindow.setTouchInterceptor(new OnTouchListener() {\n\t\t\tpublic boolean onTouch(View view, MotionEvent event) {\n\t\t\t\tif (event.getAction() == MotionEvent.ACTION_OUTSIDE) {\n\t\t\t\t\t// 改变显示的按钮图片为正常状态\n\t\t\t\t\tchangeButtonImage();\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * 点击了中间按钮\n\t */\n\tprivate void clickToggleBtn() {\n\t\tshowPopupWindow(plusImageView);\n\t\t// 改变按钮显示的图片为按下时的状态\n\t\tplusImageView.setImageResource(R.drawable.toolbar_plusback);\n\t\ttoggleImageView.setImageResource(R.drawable.toolbar_btn_pressed);\n\t}\n\n\t/**\n\t * 改变显示的按钮图片为正常状态\n\t */\n\tprivate void changeButtonImage() {\n\t\tplusImageView.setImageResource(R.drawable.toolbar_plus);\n\t\ttoggleImageView.setImageResource(R.drawable.toolbar_btn_normal);\n\t}\n\n\tprivate void clickPop_voiceBtn() {\n\n\t\tIntent intent = new Intent(PayChart.this, AddPay.class);// 创建Intent对象\n\t\tintent.putExtra(\"cwp.id\", userid);\n\t\tintent.putExtra(\"cwp.voice\", \"\");// 设置传递数据\n\t\tstartActivity(intent);\n\t}\n\n\tprivate void clickPop_quickBtn() {\n\n\t\tIntent intent = new Intent(PayChart.this, AddPay.class);// 创建Intent对象\n\t\tintent.putExtra(\"cwp.id\", userid);\n\t\tstartActivity(intent);\n\t}\n\n\tprivate void initData() {\n\t\t// 给布局对象设置监听\n\t\tfriendfeedFl.setOnClickListener(this);\n\t\tmyfeedFl.setOnClickListener(this);\n\t\thomeFl.setOnClickListener(this);\n\t\tmoreFl.setOnClickListener(this);\n\n\t\t// 给按钮图片设置监听\n\t\ttoggleImageView.setOnClickListener(this);\n\n\t\tmyfeedFl.setSelected(true);\n\t\tmyfeedIv.setSelected(true);\n\t}\n\n\tpublic void getAnyDate() {// 处理任意时间\n\t\tdate1 = year.getSelectedItem().toString() + \"-\"\n\t\t\t\t+ month.getSelectedItem().toString() + \"-\"\n\t\t\t\t+ day.getSelectedItem().toString();\n\t\tdate2 = yeare.getSelectedItem().toString() + \"-\"\n\t\t\t\t+ monthe.getSelectedItem().toString() + \"-\"\n\t\t\t\t+ daye.getSelectedItem().toString();\n\t\tif (Integer.parseInt(year.getSelectedItem().toString()) > Integer\n\t\t\t\t.parseInt(yeare.getSelectedItem().toString())) {\n\t\t\tchange();\n\t\t} else {\n\t\t\tif (Integer.parseInt(month.getSelectedItem().toString()) > Integer\n\t\t\t\t\t.parseInt(monthe.getSelectedItem().toString())) {\n\t\t\t\tchange();\n\t\t\t} else {\n\t\t\t\tif (Integer.parseInt(day.getSelectedItem().toString()) > Integer\n\t\t\t\t\t\t.parseInt(daye.getSelectedItem().toString())) {\n\t\t\t\t\tchange();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate void change() {\n\t\tString temp = date1;\n\t\tdate1 = date2;\n\t\tdate2 = temp;\n\t}\n\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t\tif (keyCode == KeyEvent.KEYCODE_BACK) { // 监控/拦截/屏蔽返回键\n\t\t\tdialogShowUtil.dialogShow(\"shake\", \"quit\", \"\", \"\");\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onKeyDown(keyCode, event);\n\t}\n\n}"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/PayData.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport java.text.NumberFormat;\nimport java.util.ArrayList;\nimport java.util.Calendar;\nimport java.util.List;\nimport java.util.Random;\n\nimport org.achartengine.ChartFactory;\nimport org.achartengine.GraphicalView;\nimport org.achartengine.model.CategorySeries;\nimport org.achartengine.model.SeriesSelection;\nimport org.achartengine.renderer.DefaultRenderer;\nimport org.achartengine.renderer.SimpleSeriesRenderer;\nimport org.w3c.dom.Text;\n\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.content.res.Resources;\nimport android.graphics.Color;\nimport android.graphics.drawable.Drawable;\nimport android.os.Bundle;\nimport android.text.format.Time;\nimport android.util.Log;\nimport android.view.KeyEvent;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.widget.Adapter;\nimport android.widget.ArrayAdapter;\nimport android.widget.Button;\nimport android.widget.LinearLayout;\nimport android.widget.Spinner;\nimport android.widget.SpinnerAdapter;\nimport android.widget.TextView;\nimport android.widget.Toast;\nimport cwp.moneycharge.dao.PayDAO;\nimport cwp.moneycharge.dao.PtypeDAO;\nimport cwp.moneycharge.model.ActivityManager;\nimport cwp.moneycharge.model.KindData;\n\npublic class PayData extends Activity {\n\tint userid;\n\tIntent intentr;\n\tPayDAO payDAO;\n\tint defaultMonth;\n\tint defaultYear;\n\tTime time;// 获取当前时间\n\tLinearLayout piechart, pdataselect;\n\tButton beforet, aftert, anytime;\n\tSpinner year, month, day, yeare, monthe, daye;// 界面上的任意时间\n\tList<String> yearlist;\n\tAdapter adapter;\n\tString date1 = \"\", date2 = \"\";\n\tList<KindData> KindDatap;\n\tDefaultRenderer mRenderer;\n\tCategorySeries mSeries;\n\tGraphicalView mChartView;\n\tPtypeDAO ptypeDAO;\n\tTextView nodata;\n\tprivate static int[] COLORS = new int[] { Color.rgb(180, 0, 0),\n\t\t\tColor.rgb(180, 120, 130), Color.rgb(10, 180, 170),\n\t\t\tColor.rgb(10, 180, 10), Color.rgb(220, 180, 10),\n\t\t\tColor.rgb(220, 180, 130), Color.rgb(20, 180, 130),\n\t\t\tColor.rgb(20, 18, 130), Color.rgb(255, 120, 10),\n\t\t\tColor.rgb(255, 120, 100), Color.rgb(255, 12, 100),\n\t\t\tColor.rgb(217, 190, 100), Color.rgb(50, 150, 100),\n\t\t\tColor.rgb(150, 150, 100), Color.rgb(150, 150, 190) };\n\n\tpublic PayData() {\n\t\t// TODO Auto-generated constructor stub\n\t}\n\n\t@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.paydata);\n\t\tSysApplication.getInstance().addActivity(this); // 在销毁队列中添加this\n\t\ttime = new Time(\"GMT+8\");\n\t\ttime.setToNow();\n\t\tdefaultMonth = time.month + 1;// 设置默认月份\n\t\tdefaultYear = time.year;\n\t\tbeforet = (Button) findViewById(R.id.pbefore);\n\t\taftert = (Button) findViewById(R.id.pafter);\n\t\tanytime = (Button) findViewById(R.id.panytime);\n\t\tyear = (Spinner) findViewById(R.id.pyear);\n\t\tmonth = (Spinner) findViewById(R.id.pmonth);\n\t\tday = (Spinner) findViewById(R.id.pday);\n\t\tyeare = (Spinner) findViewById(R.id.pyeare);\n\t\tmonthe = (Spinner) findViewById(R.id.pmonthe);\n\t\tdaye = (Spinner) findViewById(R.id.pdaye);\n\t\tpiechart = (LinearLayout) findViewById(R.id.pchart);\n\t\tnodata = (TextView) findViewById(R.id.nodata);\n\t\tpdataselect = (LinearLayout) findViewById(R.id.pdataselect);\n\t\tmSeries = new CategorySeries(\"\");\n\t\tmRenderer = new DefaultRenderer();// PieChart的主要描绘器\n\t\tyearlist = new ArrayList<String>(); // 生成年份列表 spinner\n\t\tpayDAO = new PayDAO(PayData.this);\n\t\tKindDatap = new ArrayList<KindData>();\n\t\tptypeDAO = new PtypeDAO(PayData.this);\n\n\t\t// 设置年\n\t\tfor (int i = 0; i <= 10; i++) {\n\t\t\tyearlist.add(String.valueOf(defaultYear - i));\n\t\t}\n\t\tadapter = new ArrayAdapter<String>(PayData.this,\n\t\t\t\tandroid.R.layout.simple_spinner_item, yearlist);\n\t\tyear.setAdapter((SpinnerAdapter) adapter);\n\t\tyeare.setAdapter((SpinnerAdapter) adapter);\n\n\t}\n\n\t@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tintentr = getIntent();\n\t\tuserid = intentr.getIntExtra(\"cwp.id\", 100000001);\n\t\tdefaultMonth = intentr.getIntExtra(\"default\", defaultMonth);\n\t\tdefaultYear = intentr.getIntExtra(\"defaulty\", defaultYear);\n\t\tint type = intentr.getIntExtra(\"type\", 0);// 为0，选择上下月，为1，选择任意时间\n\t\tpayDAO = new PayDAO(PayData.this);\n\n\t\tmRenderer.setZoomButtonsVisible(true); // 显示放大缩小功能按钮\n\t\tmRenderer.setStartAngle(180); // 设置为水平开始\n\t\tmRenderer.setDisplayValues(true); // 显示数据\n\t\tmRenderer.setFitLegend(true); // 设置自动按比例缩放\n\t\tmRenderer.setShowLabels(true); // 显示标签\n\t\tmRenderer.setLabelsTextSize(54); // 设置轴刻度文字的大小\n\t\tmRenderer.setShowLegend(false); // 不显示底部\n\t\tmRenderer.setLabelsColor(Color.BLACK); // 设置轴标签颜色\n\t\tmRenderer.setLegendTextSize(54); // 设置图例字体大小\n\t\tmRenderer.setLegendHeight(30); // 设置图例高度\n\t\tmRenderer.setChartTitleTextSize(54); // 设置饼图标题大小\n\n\t\tif (type == 0) {\n\t\t\tKindDatap = payDAO.getKDataOnMonth(userid, defaultYear,\n\t\t\t\t\tdefaultMonth);\n\t\t\tmRenderer.setChartTitle(String.valueOf(defaultYear) + \"-\"\n\t\t\t\t\t+ String.valueOf(defaultMonth));\n\n\t\t} else {\n\t\t\tdate1 = intentr.getStringExtra(\"date1\");\n\t\t\tdate2 = intentr.getStringExtra(\"date2\");\n\t\t\tKindDatap = payDAO.getKDataOnDay(userid, date1, date2);\n\t\t\tmRenderer.setChartTitle(date1 + \"~\" + date2);\n\t\t}\n\t\t// 数据\n\n\t\tif (KindDatap.size() == 0) {\n\t\t\tnodata.setVisibility(View.VISIBLE);\n\n\t\t} else {\n\n\t\t\tdouble sum = 0.00;\n\t\t\tint i = 0;\n\t\t\tfor (KindData kp : KindDatap)\n\t\t\t\tsum += kp.getAmount();// 总和\n\n\t\t\tfor (KindData kp : KindDatap) {\n\t\t\t\tmSeries.add(ptypeDAO.getOneName(userid, kp.getKindname()),\n\t\t\t\t\t\tkp.getAmount() / sum);\n\t\t\t\tSimpleSeriesRenderer renderer = new SimpleSeriesRenderer();\n\t\t\t\tif (i < COLORS.length) {\n\t\t\t\t\trenderer.setColor(COLORS[i]);\n\t\t\t\t} else {\n\t\t\t\t\trenderer.setColor(getRandomColor());\n\t\t\t\t}\n\t\t\t\trenderer.setChartValuesFormat(NumberFormat.getPercentInstance());// 设置百分比\n\t\t\t\tmRenderer.addSeriesRenderer(renderer);// 将最新的描绘器添加到DefaultRenderer中\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t\tmChartView = ChartFactory.getPieChartView(getApplicationContext(),\n\t\t\t\t\tmSeries, mRenderer);// 构建mChartView\n\t\t\tmRenderer.setClickEnabled(true);// 允许点击事件\n\t\t\tmChartView.setOnClickListener(new View.OnClickListener() {// 具体内容\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tSeriesSelection seriesSelection = mChartView\n\t\t\t\t\t\t\t\t\t.getCurrentSeriesAndPoint();// 获取当前的类别和指针\n\t\t\t\t\t\t\tif (seriesSelection == null) {\n\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\"您未选择数据\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfor (int i = 0; i < mSeries.getItemCount(); i++) {\n\t\t\t\t\t\t\t\t\tmRenderer.getSeriesRendererAt(i)\n\t\t\t\t\t\t\t\t\t\t\t.setHighlighted(\n\t\t\t\t\t\t\t\t\t\t\t\t\ti == seriesSelection\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getPointIndex());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmChartView.repaint();\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\"您选择的是第\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ (seriesSelection\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getPointIndex() + 1)\n\t\t\t\t\t\t\t\t\t\t\t\t+ \" 项 \"\n\t\t\t\t\t\t\t\t\t\t\t\t+ \" 百分比为  \"\n\t\t\t\t\t\t\t\t\t\t\t\t+ NumberFormat\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getPercentInstance()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.format(seriesSelection\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getValue()),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\tpiechart.addView(mChartView);\n\t\t}\n\n\t\tbeforet.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (defaultMonth != 1)\n\t\t\t\t\tdefaultMonth = defaultMonth - 1;\n\t\t\t\telse {\n\t\t\t\t\tdefaultMonth = 12;\n\t\t\t\t\tdefaultYear = defaultYear - 1;\n\t\t\t\t}\n\t\t\t\tmSeries.clear();\n\t\t\t\tIntent intentp = new Intent(PayData.this, PayData.class);\n\t\t\t\tintentp.putExtra(\"defaulty\", defaultYear);\n\t\t\t\tintentp.putExtra(\"default\", defaultMonth);\n\t\t\t\tintentp.putExtra(\"cwp.id\", userid);\n\t\t\t\tstartActivity(intentp);\n\t\t\t}\n\t\t});\n\t\taftert.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (defaultMonth != 12)\n\t\t\t\t\tdefaultMonth = defaultMonth + 1;\n\t\t\t\telse {\n\t\t\t\t\tdefaultMonth = 1;\n\t\t\t\t\tdefaultYear = defaultYear + 1;\n\t\t\t\t}\n\t\t\t\tmSeries.clear();\n\t\t\t\tIntent intentp = new Intent(PayData.this, PayData.class);\n\t\t\t\tintentp.putExtra(\"defaulty\", defaultYear);\n\t\t\t\tintentp.putExtra(\"default\", defaultMonth);\n\t\t\t\tintentp.putExtra(\"cwp.id\", userid);\n\t\t\t\tstartActivity(intentp);\n\t\t\t}\n\t\t});\n\n\t\tanytime.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tgetAnyDate();\n\t\t\t\tmSeries.clear();\n\t\t\t\tIntent intentp = new Intent(PayData.this, PayData.class);\n\t\t\t\tintentp.putExtra(\"type\", 1);\n\t\t\t\tintentp.putExtra(\"date1\", date1);\n\t\t\t\tintentp.putExtra(\"date2\", date2);\n\t\t\t\tintentp.putExtra(\"cwp.id\", userid);\n\t\t\t\tstartActivity(intentp);\n\t\t\t}\n\t\t});\n\n\t}\n\n\tpublic void getAnyDate() {\n\t\tdate1 = year.getSelectedItem().toString() + \"-\"\n\t\t\t\t+ month.getSelectedItem().toString() + \"-\"\n\t\t\t\t+ day.getSelectedItem().toString();\n\t\tdate2 = yeare.getSelectedItem().toString() + \"-\"\n\t\t\t\t+ monthe.getSelectedItem().toString() + \"-\"\n\t\t\t\t+ daye.getSelectedItem().toString();\n\t}\n\n\tprivate int getRandomColor() {// 分别产生RBG数值\n\t\tRandom random = new Random();\n\t\tint R = random.nextInt(255);\n\t\tint G = random.nextInt(255);\n\t\tint B = random.nextInt(255);\n\t\treturn Color.rgb(R, G, B);\n\t}\n\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t\tif (keyCode == KeyEvent.KEYCODE_BACK) { // 监控/拦截/屏蔽返回键\n\t\t\tIntent intent = new Intent(PayData.this, MainActivity.class);\n\t\t\tintent.putExtra(\"cwp.id\", userid);\n\t\t\tintent.putExtra(\"cwp.Fragment\", \"2\");// 设置传递数据\n\t\t\tstartActivity(intent);\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onKeyDown(keyCode, event);\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/RotateBottom.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport android.view.View;\nimport android.widget.RelativeLayout;\n\nimport com.nineoldandroids.animation.ObjectAnimator;\nimport com.nineoldandroids.view.ViewHelper;\n\n/**\n * Created by lee on 2014/7/31.\n */\npublic class RotateBottom extends BaseEffects{\n\n    @Override\n    protected void setupAnimation(View view) {\n        getAnimatorSet().playTogether(\n                ObjectAnimator.ofFloat(view, \"rotationX\",90, 0).setDuration(mDuration),\n                ObjectAnimator.ofFloat(view, \"translationY\", 300, 0).setDuration(mDuration),\n                ObjectAnimator.ofFloat(view, \"alpha\", 0, 1).setDuration(mDuration*3/2)\n\n        );\n    }\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/SearchActivity.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport java.text.SimpleDateFormat;\nimport java.util.ArrayList;\nimport java.util.Calendar;\nimport java.util.Date;\nimport java.util.GregorianCalendar;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\nimport com.cwp.chart.CustomMultiChoiceDialog;\nimport com.cwp.chart.MyAdspter;\nimport com.cwp.chart.SystemBarTintManager;\n\nimport cwp.moneycharge.dao.IncomeDAO;\nimport cwp.moneycharge.dao.ItypeDAO;\nimport cwp.moneycharge.dao.PayDAO;\nimport cwp.moneycharge.dao.PtypeDAO;\nimport cwp.moneycharge.model.Tb_income;\nimport android.annotation.TargetApi;\nimport android.app.Activity;\nimport android.app.AlertDialog;\nimport android.app.DatePickerDialog;\nimport android.app.Dialog;\nimport android.content.Context;\nimport android.content.DialogInterface;\nimport android.content.Intent;\nimport android.graphics.Color;\nimport android.graphics.drawable.BitmapDrawable;\nimport android.os.Build;\nimport android.os.Bundle;\nimport android.text.Editable;\nimport android.text.TextWatcher;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.view.View.OnTouchListener;\nimport android.view.Window;\nimport android.view.WindowManager;\nimport android.view.inputmethod.InputMethodManager;\nimport android.widget.AdapterView;\nimport android.widget.AdapterView.OnItemClickListener;\nimport android.widget.ArrayAdapter;\nimport android.widget.DatePicker;\nimport android.widget.EditText;\nimport android.widget.LinearLayout;\nimport android.widget.ListView;\nimport android.widget.RelativeLayout;\nimport android.widget.TextView;\n\npublic class SearchActivity extends Activity {\n\tprivate String arrs[] = { \"自定义时间段\", \"今天\", \"昨天\", \"本周\", \"上周\", \"本月\", \"上月\",\n\t\t\t\"本季\", \"上季\", \"本年\" };\n\tprivate boolean boos[] = { false, false, false, false, false, false, false,\n\t\t\tfalse, false, false };\n\tprivate CustomMultiChoiceDialog.Builder multiChoiceDialogBuilder;\n\n\tpublic String contact_name;\n\n\tprivate CustomMultiChoiceDialog multiChoiceDialog;\n\tprotected static final int DATE_DIALOG_ID = 0;// 创建日期对话框常量\n\tEditText query_dialog;\n\tListView mListView;\n\tLinearLayout mlayout;\n\tprivate int userid;\n\n\tIncomeDAO incomeDAO = new IncomeDAO(this);\n\tPtypeDAO ptypeDAO = new PtypeDAO(this);\n\tItypeDAO itypeDAO = new ItypeDAO(this);\n\tPayDAO payDAO = new PayDAO(this);// 创建PayDAO对象\n\tprivate String[] strInfos;\n\tprivate TextView searchincome;\n\tprivate TextView searchpay;\n\tprivate TextView seachbalance;\n\tprivate ArrayAdapter<String> arrayAdapter;\n\tprivate Editable text;\n\tprivate MyAdspter adapter;\n\tprivate TextView search_quit;\n\tprivate RelativeLayout search_more;\n\tprivate LinearLayout search_more_list;\n\tprivate RelativeLayout search_list_time;\n\tprivate TextView search_list_time_text;\n\tprivate RelativeLayout search_list_starttime;\n\tprivate static TextView search_starttime;\n\tprivate RelativeLayout search_list_endtime;\n\tprivate static TextView search_endtime;\n\tprivate RelativeLayout search_list_paytype;\n\tprivate TextView search_paytype;\n\tprivate RelativeLayout search_list_incometype;\n\tprivate TextView search_incometype;\n\tprivate List<String> spdatalistpay;\n\tprivate List<String> spdatalistincome;\n\tprivate String[] spdatapay;\n\tprivate String[] spdataincome;\n\tprivate boolean[] paychoice;\n\tprivate boolean[] incomechoice;\n\tprotected String searchtype;\n\tpublic String[] resultpay;\n\tpublic String[] resultincome;\n\tprivate int mYear;\n\tprivate int mMonth;\n\tprivate int mDay;\n\tprotected String timetype;\n\tprivate LinearLayout search_list_timeall;\n\tprivate RelativeLayout search_more_close;\n\tpublic int defaultMonth;\n\tpublic String dmonth;\n\tpublic int defaultDay;\n\tpublic String dday;\n\tprivate Calendar c;\n\tprotected String searchstate = \"quit\";\n\tpublic boolean timeselect;\n\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.search_activity);\n\n\t\tSystemBarTintManager mTintManager;\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n\t\t\tsetTranslucentStatus(true);\n\t\t}\n\t\tmTintManager = new SystemBarTintManager(this);\n\t\tmTintManager.setStatusBarTintEnabled(true);\n\t\tmTintManager.setStatusBarTintResource(R.color.statusbar_bg);\n\n\t\tinit();\n\n\t}\n\n\tpublic void init() {\n\t\tIntent intentr = getIntent();\n\t\tuserid = intentr.getIntExtra(\"cwp.id\", 100000001);\n\n\t\tmlayout = (LinearLayout) findViewById(R.id.mlayout);// 获取金额文本框\n\t\tsearch_list_timeall = (LinearLayout) findViewById(R.id.search_list_timeall);// 获取金额文本框\n\t\tsearch_more_list = (LinearLayout) findViewById(R.id.search_more_list);// 获取金额文本框\n\t\tsearch_more = (RelativeLayout) findViewById(R.id.search_more);// 获取金额文本框\n\t\tsearch_more_close = (RelativeLayout) findViewById(R.id.search_more_close);// 获取金额文本框\n\n\t\tsearch_list_time = (RelativeLayout) findViewById(R.id.search_list_time);// 获取金额文本框\n\t\tsearch_list_starttime = (RelativeLayout) findViewById(R.id.search_list_starttime);// 获取金额文本框\n\t\tsearch_list_endtime = (RelativeLayout) findViewById(R.id.search_list_endtime);// 获取金额文本框\n\t\tsearch_list_paytype = (RelativeLayout) findViewById(R.id.search_list_paytype);// 获取金额文本框\n\t\tsearch_list_incometype = (RelativeLayout) findViewById(R.id.search_list_incometype);// 获取金额文本框\n\n\t\tmListView = (ListView) findViewById(R.id.mListView);// 获取金额文本框\n\t\tquery_dialog = (EditText) findViewById(R.id.query_dialog);// 获取金额文本框\n\t\tsearchincome = (TextView) findViewById(R.id.searchincome);// 获取金额文本框\n\t\tseachbalance = (TextView) findViewById(R.id.seachbalance);// 获取金额文本框\n\t\tsearchpay = (TextView) findViewById(R.id.searchpay);// 获取金额文本框\n\t\tsearch_quit = (TextView) findViewById(R.id.search_quit);// 获取金额文本框\n\n\t\tsearch_list_time_text = (TextView) findViewById(R.id.search_list_time_text);// 获取金额文本框\n\t\tsearch_starttime = (TextView) findViewById(R.id.search_starttime);// 获取金额文本框\n\t\tsearch_endtime = (TextView) findViewById(R.id.search_endtime);// 获取金额文本框\n\t\tsearch_paytype = (TextView) findViewById(R.id.search_paytype);// 获取金额文本框\n\t\tsearch_incometype = (TextView) findViewById(R.id.search_incometype);// 获取金额文本框\n\n\t\tc = Calendar.getInstance();// 获取当前系统日期\n\t\tmYear = c.get(Calendar.YEAR);// 获取年份\n\t\tmMonth = c.get(Calendar.MONTH) + 1;// 获取月份\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);// 获取天数\n\n\t\tsearch_list_endtime.setOnTouchListener(new OnTouchListener() { // 为时间文本框设置单击监听事件\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\n\t\t\t\t\t\tshowDialog(DATE_DIALOG_ID);// 显示日期选择对话框\n\t\t\t\t\t\ttimetype = \"end\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\tsearch_list_starttime.setOnTouchListener(new OnTouchListener() { // 为时间文本框设置单击监听事件\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\n\t\t\t\t\t\tshowDialog(DATE_DIALOG_ID);// 显示日期选择对话框\n\t\t\t\t\t\ttimetype = \"start\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\tspdatalistpay = ptypeDAO.getPtypeName(userid);\n\t\tspdatalistincome = itypeDAO.getItypeName(userid);\n\t\tspdatapay = spdatalistpay.toArray(new String[spdatalistpay.size()]);// 在tb_itype中按用户id读取\n\t\tspdataincome = spdatalistincome.toArray(new String[spdatalistincome\n\t\t\t\t.size()]);// 在tb_itype中按用户id读取\n\n\t\tsearch_list_time.setOnClickListener(new OnClickListener() { // 高级搜索时间列表\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tshowMultiChoiceDialog(v, null);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\tsearch_list_paytype.setOnClickListener(new OnClickListener() {// 高级搜索支出列表\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tshowMultiChoiceDialog(v, \"pay\");\n\t\t\t\t\t\tsearchtype = \"pay\";\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\tsearch_list_incometype.setOnClickListener(new OnClickListener() {// 高级搜索收入列表\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tshowMultiChoiceDialog(v, \"income\");\n\t\t\t\t\t\tsearchtype = \"income\";\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\tsearch_more_close.setOnClickListener(new OnClickListener() { // 按了更多选项\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tclosemore();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\tsearch_more.setOnClickListener(new OnClickListener() { // 按了更多选项\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tInputMethodManager imm = (InputMethodManager) getApplicationContext()\n\t\t\t\t\t\t\t\t.getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\t\t\t\t\timm.hideSoftInputFromWindow(v.getWindowToken(), 0); // 强制关闭软键盘\n\t\t\t\t\t\tsearch_more.setVisibility(View.GONE);\n\t\t\t\t\t\tmlayout.setVisibility(View.GONE);\n\t\t\t\t\t\tsearch_more_list.setVisibility(View.VISIBLE);\n\t\t\t\t\t\tsearch_quit.setText(\"开始查询\");\n\t\t\t\t\t\tsearchstate = \"search\";\n\t\t\t\t\t\tsearch_starttime.setText(mYear + \"-01-01\");\n\t\t\t\t\t\tsearch_endtime.setText(mYear + \"-12-31\");\n\t\t\t\t\t\tsearch_paytype.setText(\"\");\n\t\t\t\t\t\tsearch_incometype.setText(\"\");\n\t\t\t\t\t\tresultincome = null;\n\t\t\t\t\t\tresultpay = null;\n\t\t\t\t\t\tpaychoice = null;\n\t\t\t\t\t\tincomechoice = null;\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\tclass OnClickListenernormal implements OnClickListener { // 执行查询\n\t\t\tprivate String String;\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (searchstate == \"quit\") {\n\t\t\t\t\tSearchActivity.this.finish();\n\t\t\t\t} else {\n\t\t\t\t\tif (timeselect) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tDateCompare(search_starttime.getText(),\n\t\t\t\t\t\t\t\t\tsearch_endtime.getText());\n\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// System.out.println(\"timeselect \"\n\t\t\t\t\t\t// + search_starttime.getText() + \" \"\n\t\t\t\t\t\t// + search_endtime.getText());\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// System.out.println(\"2 \" + search_starttime.getText()\n\t\t\t\t\t\t// + \" \" + search_endtime.getText());\n\t\t\t\t\t}\n\t\t\t\t\tif (resultincome == null) {\n\t\t\t\t\t\tresultincome = new String[1];\n\t\t\t\t\t\tresultincome[0] = (String) search_incometype.getText();\n\t\t\t\t\t}\n\t\t\t\t\tif (resultpay == null) {\n\t\t\t\t\t\tresultpay = new String[1];\n\t\t\t\t\t\tresultpay[0] = (String) search_paytype.getText();\n\t\t\t\t\t}\n\t\t\t\t\t// for (int i = 0; i < resultincome.length; i++) {\n\t\t\t\t\t// System.out.println(\"收入 \" + resultincome[i]);\n\t\t\t\t\t// }\n\t\t\t\t\t// for (int i = 0; i < resultpay.length; i++) {\n\t\t\t\t\t// System.out.println(\"支出 \" + resultpay[i]);\n\t\t\t\t\t// }\n\t\t\t\t\tif (text == null) {\n\t\t\t\t\t\tString = \"\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tString = text.toString();\n\t\t\t\t\t}\n\t\t\t\t\tList<Tb_income> listinfosall = incomeDAO.searchALL(userid,\n\t\t\t\t\t\t\tsearch_starttime.getText() + \"\",\n\t\t\t\t\t\t\tsearch_endtime.getText() + \"\", resultpay,\n\t\t\t\t\t\t\tresultincome, String);\n\t\t\t\t\tclosemore();\n\t\t\t\t\tdispay(listinfosall);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tsearch_quit.setOnClickListener(new OnClickListenernormal());\n\n\t\tmListView.setOnItemClickListener(new OnItemClickListener()// 为ListView添加项单击事件\n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\t\t\tint position, long id) {\n\t\t\t\t\t\tTextView txno = (TextView) view.findViewById(R.id.no);\n\t\t\t\t\t\tTextView txkind = (TextView) view\n\t\t\t\t\t\t\t\t.findViewById(R.id.kind);\n\t\t\t\t\t\tString strtype = ((String) txkind.getText()).substring(\n\t\t\t\t\t\t\t\t1, ((String) txkind.getText()).indexOf(']'))\n\t\t\t\t\t\t\t\t.trim();// 从收入信息中截取收支类型\n\t\t\t\t\t\tString strno = (String) txno.getText(); // 从信息中截取收支编号\n\t\t\t\t\t\tIntent intent = new Intent(SearchActivity.this,\n\t\t\t\t\t\t\t\tAddPay.class);// 创建Intent对象\n\t\t\t\t\t\tif (strtype.equals(\"收入\")) {\n\t\t\t\t\t\t\tintent.putExtra(\"cwp.message\", new String[] {\n\t\t\t\t\t\t\t\t\tstrno, \"btnininfo\" });// 设置传递数据\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (strtype.equals(\"支出\")) {\n\t\t\t\t\t\t\tintent.putExtra(\"cwp.message\", new String[] {\n\t\t\t\t\t\t\t\t\tstrno, \"btnoutinfo\" });// 设置传递数据\n\t\t\t\t\t\t}\n\t\t\t\t\t\tintent.putExtra(\"cwp.id\", userid);\n\t\t\t\t\t\tintent.putExtra(\"cwp.search\", \"search\");\n\t\t\t\t\t\tstartActivityForResult(intent, 101);// 执行Intent操作\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tquery_dialog.addTextChangedListener(new TextWatcher() {\n\n\t\t\t@Override\n\t\t\tpublic void beforeTextChanged(CharSequence s, int start, int count,\n\t\t\t\t\tint after) {\n\t\t\t\t// text 输入框中改变前的字符串信息\n\t\t\t\t// start 输入框中改变前的字符串的起始位置\n\t\t\t\t// count 输入框中改变前后的字符串改变数量一般为0\n\t\t\t\t// after 输入框中改变后的字符串与起始位置的偏移量\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onTextChanged(CharSequence s, int start, int before,\n\t\t\t\t\tint count) {\n\t\t\t\t// text 输入框中改变后的字符串信息\n\t\t\t\t// start 输入框中改变后的字符串的起始位置\n\t\t\t\t// before 输入框中改变前的字符串的位置 默认为0\n\t\t\t\t// count 输入框中改变后的一共输入字符串的数量\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\t// edit 输入结束呈现在输入框中的信息\n\t\t\t\ttext = s;\n\t\t\t\tupdate(text.toString());\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected void closemore() {\n\t\tInputMethodManager imm = (InputMethodManager) getApplicationContext()\n\t\t\t\t.getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\timm.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);\n\t\tsearch_more.setVisibility(View.VISIBLE);\n\t\tsearch_more_list.setVisibility(View.GONE);\n\t\tsearch_quit.setText(\"取消\");\n\t\tsearchstate = \"quit\";\n\t\tsearch_more.setBackgroundColor(Color.parseColor(\"#00000000\"));\n\t}\n\n\tint getQuarterInMonth(int month, boolean isQuarterStart) {\n\t\tint months[] = { 1, 4, 7, 10 };\n\t\tif (!isQuarterStart) {\n\t\t\tmonths = new int[] { 3, 6, 9, 12 };\n\t\t}\n\t\tif (month >= 2 && month <= 4)\n\t\t\treturn months[0];\n\t\telse if (month >= 5 && month <= 7)\n\t\t\treturn months[1];\n\t\telse if (month >= 8 && month <= 10)\n\t\t\treturn months[2];\n\t\telse\n\t\t\treturn months[3];\n\t}\n\n\tpublic void showMultiChoiceDialog(View view, String type) { // 类型选择\n\t\tpaychoice = new boolean[spdatalistpay.size()];\n\t\tincomechoice = new boolean[spdatalistincome.size()];\n\t\tfor (int i = 0; i < paychoice.length; i++) {\n\t\t\tpaychoice[i] = false;\n\t\t}\n\t\tfor (int i = 0; i < incomechoice.length; i++) {\n\t\t\tincomechoice[i] = false;\n\t\t}\n\t\tmultiChoiceDialogBuilder = new CustomMultiChoiceDialog.Builder(this);\n\t\tif (type == \"pay\") {\n\t\t\tmultiChoiceDialog = multiChoiceDialogBuilder\n\t\t\t\t\t.setTitle(\"收入类别\")\n\t\t\t\t\t.setMultiChoiceItems(true, spdatapay, paychoice, null, true)\n\t\t\t\t\t.setPositiveButton(\"确定\", new PositiveClickListener())\n\t\t\t\t\t.setNegativeButton(\"取消\", null).create();\n\t\t} else if (type == \"income\") {\n\t\t\tmultiChoiceDialog = multiChoiceDialogBuilder\n\t\t\t\t\t.setTitle(\"支出类别\")\n\t\t\t\t\t.setMultiChoiceItems(true, spdataincome, incomechoice,\n\t\t\t\t\t\t\tnull, true)\n\t\t\t\t\t.setPositiveButton(\"确定\", new PositiveClickListener())\n\t\t\t\t\t.setNegativeButton(\"取消\", null).create();\n\t\t} else {\n\t\t\tmultiChoiceDialog = multiChoiceDialogBuilder.setTitle(\"时间范围\")\n\t\t\t\t\t.setMultiChoiceItems(false, arrs, boos, new onitem(), true)\n\t\t\t\t\t.setPositiveButton(null, null)\n\t\t\t\t\t.setNegativeButton(null, null).create();\n\t\t}\n\t\tmultiChoiceDialog.getWindow().setBackgroundDrawable(\n\t\t\t\tnew BitmapDrawable());\n\t\tmultiChoiceDialog.show();\n\t}\n\n\tclass PositiveClickListener implements DialogInterface.OnClickListener { // 点确定按钮\n\t\t@Override\n\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\tif (CustomMultiChoiceDialog.Builder.getisMultiChoice()) {\n\t\t\t\tif (searchtype == \"pay\") {\n\t\t\t\t\tboos = multiChoiceDialogBuilder.getCheckedItems();\n\t\t\t\t\tint j1 = 0, j2 = 0;\n\t\t\t\t\tfor (int i = 0; i < boos.length; i++) {\n\t\t\t\t\t\tif (boos[i]) {\n\t\t\t\t\t\t\tj1++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tresultpay = new String[j1];\n\t\t\t\t\tfor (int i = 0; i < boos.length; i++) {\n\t\t\t\t\t\tif (boos[i]) {\n\t\t\t\t\t\t\tresultpay[j2] = spdatapay[i];\n\t\t\t\t\t\t\tj2++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (j1 > 1) {\n\t\t\t\t\t\tsearch_paytype.setText(resultpay[0] + \",\"\n\t\t\t\t\t\t\t\t+ resultpay[1] + \"...\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (resultpay.length != 0) {\n\t\t\t\t\t\t\tsearch_paytype.setText(resultpay[0]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsearch_paytype.setText(\"早餐\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (searchtype == \"income\") {\n\t\t\t\t\tboos = multiChoiceDialogBuilder.getCheckedItems();\n\t\t\t\t\tint j1 = 0, j2 = 0;\n\t\t\t\t\tfor (int i = 0; i < boos.length; i++) {\n\t\t\t\t\t\tif (boos[i]) {\n\t\t\t\t\t\t\tj1++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tresultincome = new String[j1];\n\t\t\t\t\tfor (int i = 0; i < boos.length; i++) {\n\t\t\t\t\t\tif (boos[i]) {\n\t\t\t\t\t\t\tresultincome[j2] = spdataincome[i];\n\t\t\t\t\t\t\tj2++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (j1 > 1) {\n\t\t\t\t\t\tsearch_incometype.setText(resultincome[0] + \",\"\n\t\t\t\t\t\t\t\t+ resultincome[1] + \"...\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (resultincome.length != 0) {\n\t\t\t\t\t\t\tsearch_incometype.setText(resultincome[0]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsearch_incometype.setText(\"早餐\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tString s = CustomMultiChoiceDialog.Builder.getcontact_name();\n\t\t\t\t// alert(MainActivity.this, s);\n\t\t\t}\n\n\t\t}\n\t}\n\n\tclass onitem implements OnItemClickListener { // 时间范围响应事件\n\n\t\t@Override\n\t\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\t\tlong id) {\n\t\t\tTextView cn = (TextView) view.findViewById(R.id.contact_name);\n\t\t\tsearch_list_time_text.setText(cn.getText());\n\t\t\tswitch (position) {\n\t\t\tcase 0: // 自定义时间\n\t\t\t\tsearch_starttime.setText(mYear + \"-01-01\");\n\t\t\t\tsearch_endtime.setText(mYear + \"-12-31\");\n\t\t\t\tsearch_list_timeall.setVisibility(view.VISIBLE);\n\t\t\t\ttimeselect = true;\n\t\t\t\tbreak;\n\t\t\tcase 1:// 今天\n\t\t\t\tsearch_list_timeall.setVisibility(view.GONE);\n\t\t\t\ttimeselect = false;\n\t\t\t\tsearch_starttime.setText(incomeDAO.gettime(mYear, mMonth, mDay,\n\t\t\t\t\t\tfalse, false));\n\t\t\t\tsearch_endtime.setText(incomeDAO.gettime(mYear, mMonth, mDay,\n\t\t\t\t\t\tfalse, false));\n\t\t\t\tbreak;\n\t\t\tcase 2:// 昨天\n\t\t\t\tsearch_list_timeall.setVisibility(view.GONE);\n\t\t\t\ttimeselect = false;\n\t\t\t\tif (mDay == 1) {\n\t\t\t\t\tsearch_starttime.setText(incomeDAO.gettime(mYear,\n\t\t\t\t\t\t\tmMonth - 1, mDay, false, true));\n\t\t\t\t\tsearch_endtime.setText(incomeDAO.gettime(mYear, mMonth - 1,\n\t\t\t\t\t\t\tmDay, false, true));\n\t\t\t\t} else {\n\t\t\t\t\tsearch_starttime.setText(incomeDAO.gettime(mYear, mMonth,\n\t\t\t\t\t\t\tmDay - 1, false, false));\n\t\t\t\t\tsearch_endtime.setText(incomeDAO.gettime(mYear, mMonth,\n\t\t\t\t\t\t\tmDay - 1, false, false));\n\t\t\t\t}\n\t\t\t\t// System.out.println(search_starttime.getText() + \"  \"\n\t\t\t\t// + search_endtime.getText());\n\t\t\t\tbreak;\n\t\t\tcase 3:// 本周\n\t\t\t\tsearch_list_timeall.setVisibility(view.GONE);\n\t\t\t\ttimeselect = false;\n\t\t\t\tint n = 0;\n\t\t\t\t// n为推迟的周数，0本周，-1向前推迟一周，1下周，依次类推\n\t\t\t\tc.add(Calendar.DATE, n * 7);\n\t\t\t\t// 想周几，这里就传几Calendar.MONDAY（TUESDAY...）\n\t\t\t\tc.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);\n\t\t\t\tsearch_starttime.setText(incomeDAO.gettime(\n\t\t\t\t\t\tc.get(Calendar.YEAR), (c.get(Calendar.MONTH) + 1),\n\t\t\t\t\t\tc.get(Calendar.DAY_OF_MONTH), false, false));\n\t\t\t\tc.add(Calendar.DATE, 6);\n\t\t\t\tsearch_endtime.setText(incomeDAO.gettime(c.get(Calendar.YEAR),\n\t\t\t\t\t\t(c.get(Calendar.MONTH) + 1),\n\t\t\t\t\t\tc.get(Calendar.DAY_OF_MONTH), false, false));\n\t\t\t\tbreak;\n\t\t\tcase 4:// 上周\n\t\t\t\ttimeselect = false;\n\t\t\t\tsearch_list_timeall.setVisibility(view.GONE);\n\t\t\t\t// n为推迟的周数，0本周，-1向前推迟一周，1下周，依次类推\n\t\t\t\tc.add(Calendar.DATE, (-1) * 7);\n\t\t\t\t// 想周几，这里就传几Calendar.MONDAY（TUESDAY...）\n\t\t\t\tc.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);\n\t\t\t\tsearch_starttime.setText(incomeDAO.gettime(\n\t\t\t\t\t\tc.get(Calendar.YEAR), (c.get(Calendar.MONTH) + 1),\n\t\t\t\t\t\tc.get(Calendar.DAY_OF_MONTH), false, false));\n\t\t\t\tc.add(Calendar.DATE, 6);\n\t\t\t\tsearch_endtime.setText(incomeDAO.gettime(c.get(Calendar.YEAR),\n\t\t\t\t\t\t(c.get(Calendar.MONTH) + 1),\n\t\t\t\t\t\tc.get(Calendar.DAY_OF_MONTH), false, false));\n\t\t\t\tbreak;\n\t\t\tcase 5:// 本月\n\t\t\t\ttimeselect = false;\n\t\t\t\tsearch_list_timeall.setVisibility(view.GONE);\n\t\t\t\tsearch_starttime.setText(incomeDAO.gettime(mYear, mMonth, mDay,\n\t\t\t\t\t\ttrue, false));\n\t\t\t\tsearch_endtime.setText(incomeDAO.gettime(mYear, mMonth, mDay,\n\t\t\t\t\t\tfalse, true));\n\t\t\t\tbreak;\n\t\t\tcase 6:// 上月\n\t\t\t\ttimeselect = false;\n\t\t\t\tsearch_list_timeall.setVisibility(view.GONE);\n\t\t\t\tsearch_starttime.setText(incomeDAO.gettime(mYear, mMonth - 1,\n\t\t\t\t\t\tmDay, true, false));\n\t\t\t\tsearch_endtime.setText(incomeDAO.gettime(mYear, mMonth - 1,\n\t\t\t\t\t\tmDay, false, true));\n\t\t\t\tbreak;\n\t\t\tcase 7:// 本季\n\t\t\t\ttimeselect = false;\n\t\t\t\tsearch_list_timeall.setVisibility(view.GONE);\n\t\t\t\tCalendar calendar = new GregorianCalendar();\n\t\t\t\tcalendar.setTime(new Date());\n\t\t\t\tint month = getQuarterInMonth(calendar.get(Calendar.MONTH) + 1,\n\t\t\t\t\t\ttrue);\n\t\t\t\tcalendar.set(Calendar.MONTH, month);\n\t\t\t\tcalendar.set(Calendar.DAY_OF_MONTH, 1);\n\t\t\t\tsearch_starttime.setText(incomeDAO.gettime(\n\t\t\t\t\t\tcalendar.get(Calendar.YEAR),\n\t\t\t\t\t\t(calendar.get(Calendar.MONTH) + 1),\n\t\t\t\t\t\tcalendar.get(Calendar.DAY_OF_MONTH), false, false));\n\t\t\t\t// 季度末\n\t\t\t\tcalendar.setTime(new Date());\n\t\t\t\tmonth = getQuarterInMonth(calendar.get(Calendar.MONTH) + 1,\n\t\t\t\t\t\tfalse);\n\t\t\t\tcalendar.set(Calendar.MONTH, month + 1);\n\t\t\t\tcalendar.set(Calendar.DAY_OF_MONTH, 0);\n\t\t\t\tsearch_endtime.setText(incomeDAO.gettime(\n\t\t\t\t\t\tcalendar.get(Calendar.YEAR),\n\t\t\t\t\t\t(calendar.get(Calendar.MONTH) + 1),\n\t\t\t\t\t\tcalendar.get(Calendar.DAY_OF_MONTH), false, false));\n\t\t\t\tbreak;\n\t\t\tcase 8:// 上季\n\t\t\t\ttimeselect = false;\n\t\t\t\tsearch_list_timeall.setVisibility(view.GONE);\n\t\t\t\tCalendar calendar2 = new GregorianCalendar();\n\t\t\t\tcalendar2.setTime(new Date());\n\t\t\t\tint month2 = getQuarterInMonth(\n\t\t\t\t\t\tcalendar2.get(calendar2.MONTH) + 1, true);\n\t\t\t\tcalendar2.set(calendar2.MONTH, month2 - 3);\n\t\t\t\tcalendar2.set(calendar2.DAY_OF_MONTH, 1);\n\t\t\t\tsearch_starttime.setText(incomeDAO.gettime(\n\t\t\t\t\t\tcalendar2.get(calendar2.YEAR),\n\t\t\t\t\t\t(calendar2.get(calendar2.MONTH) + 1),\n\t\t\t\t\t\tcalendar2.get(calendar2.DAY_OF_MONTH), false, false));\n\t\t\t\tcalendar2.setTime(new Date());\n\t\t\t\tmonth2 = getQuarterInMonth(calendar2.get(calendar2.MONTH) + 1,\n\t\t\t\t\t\tfalse);\n\t\t\t\tcalendar2.set(calendar2.MONTH, month2 - 2);\n\t\t\t\tcalendar2.set(calendar2.DAY_OF_MONTH, 0);\n\t\t\t\tsearch_endtime.setText(incomeDAO.gettime(\n\t\t\t\t\t\tcalendar2.get(calendar2.YEAR),\n\t\t\t\t\t\t(calendar2.get(calendar2.MONTH) + 1),\n\t\t\t\t\t\tcalendar2.get(calendar2.DAY_OF_MONTH), false, false));\n\t\t\t\tbreak;\n\t\t\tcase 9:// 上年\n\t\t\t\ttimeselect = false;\n\t\t\t\tsearch_list_timeall.setVisibility(view.GONE);\n\t\t\t\tsearch_starttime.setText(incomeDAO.gettime(mYear - 1, 1, 1,\n\t\t\t\t\t\tfalse, false));\n\t\t\t\tsearch_endtime.setText(incomeDAO.gettime(mYear - 1, 12, 31,\n\t\t\t\t\t\tfalse, false));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmultiChoiceDialog.dismiss();\n\t\t}\n\t}\n\n\tprotected void update(String string) {\n\t\tList<Tb_income> listinfos2 = incomeDAO.search(userid, string);\n\t\tdispay(listinfos2);\n\t}\n\n\tprivate void dispay(List<Tb_income> listinfos2) {\n\t\tmlayout.setVisibility(View.VISIBLE);\n\t\tsearch_more.setBackgroundColor(Color.parseColor(\"#e8e8e8\"));\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String, Object>>();\n\t\tint m = 0, income = 0, pay = 0;// 定义一个开始标识\n\t\tstrInfos = new String[listinfos2.size()];\n\t\tif (listinfos2.size() == 0) { // 处理listview\n\t\t\tseachbalance.setText(\"￥ 0.0\");\n\t\t\tsearchpay.setText(\"￥ 0.0\");\n\t\t\tsearchincome.setText(\"￥ 0.0\");\n\t\t\tmListView.setVisibility(View.GONE);\n\t\t} else {\n\t\t\tmListView.setVisibility(View.VISIBLE);\n\t\t\tfor (Tb_income tb_income : listinfos2) {// 遍历List泛型集合\n\t\t\t\t// 将收入相关信息组合成一个字符串，存储到字符串数组的相应位置\n\t\t\t\tif (tb_income.getKind().equals(\"收入\")) { // 收入\n\t\t\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\t\tmap.put(\"img\",\n\t\t\t\t\t\t\titypeDAO.getOneImg(userid, tb_income.getType()));\n\t\t\t\t\tmap.put(\"no\", tb_income.getNo() + \"\");\n\t\t\t\t\tmap.put(\"kind\", \"[\" + tb_income.getKind() + \"]\");\n\t\t\t\t\tmap.put(\"address\", tb_income.getHandler());\n\t\t\t\t\tmap.put(\"money\", \"￥ \" + tb_income.getMoney2() + \"元\");\n\t\t\t\t\tmap.put(\"title\",\n\t\t\t\t\t\t\titypeDAO.getOneName(userid, tb_income.getType()));\n\t\t\t\t\tmap.put(\"info\", tb_income.getTime());\n\t\t\t\t\tmap.put(\"date\",\n\t\t\t\t\t\t\tFragmentPage3.gofordate(tb_income.getTime()));\n\t\t\t\t\tlist.add(map);\n\t\t\t\t\tincome += tb_income.getMoney();\n\t\t\t\t\tm++;// 标识加1\n\t\t\t\t} else { // 支出\n\t\t\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\t\tmap.put(\"img\",\n\t\t\t\t\t\t\tptypeDAO.getOneImg(userid, tb_income.getType()));\n\t\t\t\t\tmap.put(\"no\", tb_income.getNo() + \"\");\n\t\t\t\t\tmap.put(\"kind\", \"[\" + tb_income.getKind() + \"]\");\n\t\t\t\t\tmap.put(\"address\", tb_income.getHandler());\n\t\t\t\t\tmap.put(\"money\", \"￥ \" + tb_income.getMoney2() + \"元\");\n\t\t\t\t\tmap.put(\"title\",\n\t\t\t\t\t\t\tptypeDAO.getOneName(userid, tb_income.getType()));\n\t\t\t\t\tmap.put(\"info\", tb_income.getTime());\n\t\t\t\t\tmap.put(\"date\",\n\t\t\t\t\t\t\tFragmentPage3.gofordate(tb_income.getTime()));\n\t\t\t\t\tlist.add(map);\n\t\t\t\t\tpay += tb_income.getMoney();\n\t\t\t\t\tm++;// 标识加1\n\t\t\t\t}\n\t\t\t}\n\t\t\tseachbalance.setText(\"￥ \" + String.valueOf(income - pay));\n\t\t\tsearchpay.setText(\"￥ \" + String.valueOf(-pay));\n\t\t\tsearchincome.setText(\"￥ \" + String.valueOf(income));\n\t\t\tadapter = new MyAdspter(this, list, true);\n\t\t\tmListView.setAdapter(adapter);\n\t\t}\n\n\t}\n\n\t@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif (resultCode == 3) {\n\t\t\tif (text != null) {\n\t\t\t\tupdate(text.toString());\n\t\t\t}\n\t\t}\n\t}\n\n\tDatePickerDialog.OnDateSetListener mDateSetListener = new DatePickerDialog.OnDateSetListener() {\n\n\t\tpublic void onDateSet(DatePicker view, int year, int monthOfYear,\n\t\t\t\tint dayOfMonth) {\n\t\t\tmYear = year;// 为年份赋值\n\t\t\tmMonth = monthOfYear;// 为月份赋值\n\t\t\tmDay = dayOfMonth;// 为天赋值\n\t\t\tupdateDisplay();// 显示设置的日期\n\t\t}\n\t};\n\n\t@Override\n\tprotected Dialog onCreateDialog(int id)// 重写onCreateDialog方法\n\t{\n\t\tswitch (id) {\n\t\tcase DATE_DIALOG_ID:// 弹出日期选择对话框\n\t\t\treturn new DatePickerDialog(this, AlertDialog.THEME_HOLO_LIGHT,\n\t\t\t\t\tmDateSetListener, mYear, mMonth, mDay);\n\t\t}\n\t\treturn null;\n\t}\n\n\tprivate void updateDisplay() {\n\t\tif (timetype == \"start\") {\n\t\t\tsearch_starttime.setText(incomeDAO.gettime(mYear, mMonth + 1, mDay,\n\t\t\t\t\tfalse, false));\n\t\t} else {\n\t\t\tsearch_endtime.setText(incomeDAO.gettime(mYear, mMonth + 1, mDay,\n\t\t\t\t\tfalse, false));\n\t\t}\n\t}\n\n\tpublic static void DateCompare(CharSequence s1, CharSequence s2)\n\t\t\tthrows Exception {\n\t\t// 设定时间的模板\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t// 得到指定模范的时间\n\t\tDate d1 = sdf.parse(s1 + \"\");\n\t\tDate d2 = sdf.parse(s2 + \"\");\n\t\t// 比较\n\t\tif (d1.getTime() - d2.getTime() > 0) {\n\t\t\tCharSequence a = search_starttime.getText();\n\t\t\tsearch_starttime.setText(search_endtime.getText());\n\t\t\tsearch_endtime.setText(a);\n\t\t}\n\t}\n\n\t@TargetApi(19)\n\tprivate void setTranslucentStatus(boolean on) {\n\t\tWindow win = getWindow();\n\t\tWindowManager.LayoutParams winParams = win.getAttributes();\n\t\tfinal int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;\n\t\tif (on) {\n\t\t\twinParams.flags |= bits;\n\t\t} else {\n\t\t\twinParams.flags &= ~bits;\n\t\t}\n\t\twin.setAttributes(winParams);\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/SettingActivity.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport com.baidu.voicerecognition.android.ui.BaiduASRDigitalDialog;\n\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.view.KeyEvent;\nimport android.view.View;\nimport android.view.Window;\nimport android.widget.AdapterView;\nimport android.widget.AdapterView.OnItemSelectedListener;\nimport android.widget.CheckBox;\nimport android.widget.CompoundButton;\nimport android.widget.CompoundButton.OnCheckedChangeListener;\nimport android.widget.Spinner;\n\n/**\n * Demo调整识别参数使用，开发逤?须关注\n * \n * @author yangliang02\n */\npublic class SettingActivity extends Activity implements\n\t\tOnCheckedChangeListener {\n\n\tprivate Spinner propTypeSpinner;\n\n\tprivate Spinner dialogThemeSpinner;\n\n\tprivate Spinner languageSpinner;\n\n\tprivate CheckBox startSoundCheckBox;\n\n\tprivate CheckBox endSoundCheckBox;\n\n\tprivate CheckBox dialogTipsCheckBox;\n\n\tprivate CheckBox showVolCheckBox;\n\n\tint userid, type;\n\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.voice_setting);\n\n\t\tIntent intentr = getIntent();\n\t\tuserid = intentr.getIntExtra(\"cwp.id\", 100000001);\n\t\tSysApplication.getInstance().addActivity(this); // 在销毁队列中添加this\n\t\tstartSoundCheckBox = (CheckBox) findViewById(R.id.cb_play_start_sound);\n\t\tstartSoundCheckBox.setChecked(Config.PLAY_START_SOUND);\n\t\tstartSoundCheckBox.setOnCheckedChangeListener(this);\n\t\tendSoundCheckBox = (CheckBox) findViewById(R.id.cb_play_end_sound);\n\t\tendSoundCheckBox.setChecked(Config.PLAY_END_SOUND);\n\t\tendSoundCheckBox.setOnCheckedChangeListener(this);\n\t\tdialogTipsCheckBox = (CheckBox) findViewById(R.id.cb_dialog_tips_sound);\n\t\tdialogTipsCheckBox.setChecked(Config.DIALOG_TIPS_SOUND);\n\t\tdialogTipsCheckBox.setOnCheckedChangeListener(this);\n\t\tshowVolCheckBox = (CheckBox) findViewById(R.id.cb_show_vol);\n\t\tshowVolCheckBox.setChecked(Config.SHOW_VOL);\n\t\tshowVolCheckBox.setOnCheckedChangeListener(this);\n\t\tpropTypeSpinner = (Spinner) this.findViewById(R.id.propType);\n\t\tpropTypeSpinner.setSelection(Config.getCurrentPropIndex());\n\t\tpropTypeSpinner.setOnItemSelectedListener(new OnItemSelectedListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tConfig.setCurrentPropIndex(position);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> parent) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\t\t});\n\t\tlanguageSpinner = (Spinner) this.findViewById(R.id.languages);\n\t\tlanguageSpinner.setSelection(Config.getCurrentLanguageIndex());\n\t\tlanguageSpinner.setOnItemSelectedListener(new OnItemSelectedListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tConfig.setCurrentLanguageIndex(position);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> parent) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\t\t});\n\n\t\tint selection = 0;\n\t\tswitch (Config.DIALOG_THEME) {\n\t\tcase BaiduASRDigitalDialog.THEME_BLUE_DEEPBG:\n\t\t\tselection = 0;\n\t\t\tbreak;\n\t\tcase BaiduASRDigitalDialog.THEME_BLUE_LIGHTBG:\n\t\t\tselection = 1;\n\t\t\tbreak;\n\t\tcase BaiduASRDigitalDialog.THEME_GREEN_DEEPBG:\n\t\t\tselection = 2;\n\t\t\tbreak;\n\t\tcase BaiduASRDigitalDialog.THEME_GREEN_LIGHTBG:\n\t\t\tselection = 3;\n\t\t\tbreak;\n\t\tcase BaiduASRDigitalDialog.THEME_ORANGE_DEEPBG:\n\t\t\tselection = 4;\n\t\t\tbreak;\n\t\tcase BaiduASRDigitalDialog.THEME_ORANGE_LIGHTBG:\n\t\t\tselection = 5;\n\t\t\tbreak;\n\t\tcase BaiduASRDigitalDialog.THEME_RED_DEEPBG:\n\t\t\tselection = 6;\n\t\t\tbreak;\n\t\tcase BaiduASRDigitalDialog.THEME_RED_LIGHTBG:\n\t\t\tselection = 7;\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\tdialogThemeSpinner = (Spinner) this.findViewById(R.id.dialogTheme);\n\t\tdialogThemeSpinner.setSelection(selection);\n\t\tdialogThemeSpinner\n\t\t\t\t.setOnItemSelectedListener(new OnItemSelectedListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onItemSelected(AdapterView<?> parent,\n\t\t\t\t\t\t\tView view, int position, long id) {\n\n\t\t\t\t\t\tint result = BaiduASRDigitalDialog.THEME_BLUE_DEEPBG;\n\t\t\t\t\t\tswitch (position) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\tresult = BaiduASRDigitalDialog.THEME_BLUE_DEEPBG;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\tresult = BaiduASRDigitalDialog.THEME_BLUE_LIGHTBG;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\tresult = BaiduASRDigitalDialog.THEME_GREEN_DEEPBG;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\tresult = BaiduASRDigitalDialog.THEME_GREEN_LIGHTBG;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\tresult = BaiduASRDigitalDialog.THEME_ORANGE_DEEPBG;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\tresult = BaiduASRDigitalDialog.THEME_ORANGE_LIGHTBG;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\tresult = BaiduASRDigitalDialog.THEME_RED_DEEPBG;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 7:\n\t\t\t\t\t\t\tresult = BaiduASRDigitalDialog.THEME_RED_LIGHTBG;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tConfig.DIALOG_THEME = result;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onNothingSelected(AdapterView<?> parent) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t}\n\n\t@Override\n\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\tif (buttonView == showVolCheckBox) {\n\t\t\tConfig.SHOW_VOL = isChecked;\n\t\t}\n\t\tif (buttonView == startSoundCheckBox) {\n\t\t\tConfig.PLAY_START_SOUND = isChecked;\n\t\t}\n\t\tif (buttonView == endSoundCheckBox) {\n\t\t\tConfig.PLAY_END_SOUND = isChecked;\n\t\t}\n\t\tif (buttonView == dialogTipsCheckBox) {\n\t\t\tConfig.DIALOG_TIPS_SOUND = isChecked;\n\t\t}\n\t}\n\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t\tif (keyCode == KeyEvent.KEYCODE_BACK) { // 监控/拦截/屏蔽返回键\n\t\t\tIntent intent = new Intent(SettingActivity.this, MainActivity.class);\n\t\t\tintent.putExtra(\"cwp.id\", userid);\n\t\t\tintent.putExtra(\"cwp.Fragment\", \"4\");// 设置传递数据\n\t\t\tstartActivity(intent);\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onKeyDown(keyCode, event);\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Shake.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport android.view.View;\n\nimport com.nineoldandroids.animation.ObjectAnimator;\n\n/**\n * Created by lee on 2014/7/31.\n */\npublic class Shake  extends BaseEffects{\n\n    @Override\n    protected void setupAnimation(View view) {\n        getAnimatorSet().playTogether(\n                ObjectAnimator.ofFloat(view, \"translationX\", 0, .10f, -25, .26f, 25,.42f, -25, .58f, 25,.74f,-25,.90f,1,0).setDuration(mDuration)\n\n        );\n    }\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/SlideTop.java",
    "content": "package com.cwp.cmoneycharge;\n\nimport android.view.View;\n\nimport com.nineoldandroids.animation.ObjectAnimator;\n\n/**\n * Created by lee on 2014/7/31.\n */\npublic class SlideTop extends BaseEffects{\n\n    @Override\n    protected void setupAnimation(View view) {\n        getAnimatorSet().playTogether(\n                ObjectAnimator.ofFloat(view, \"translationY\", -300, 0).setDuration(mDuration),\n                ObjectAnimator.ofFloat(view, \"alpha\", 0, 1).setDuration(mDuration*3/2)\n\n        );\n    }\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/SysApplication.java",
    "content": "package com.cwp.cmoneycharge;\nimport java.util.LinkedList;\nimport java.util.List;\nimport android.app.Activity;\nimport android.app.AlertDialog;\nimport android.app.Application;\nimport android.content.DialogInterface;\nimport android.content.Intent;\n\npublic class SysApplication extends Application {\nprivate List<Activity> mList = new LinkedList<Activity>();\nprivate static SysApplication instance;\n\nprivate SysApplication() {\n}\n\npublic synchronized static SysApplication getInstance() {\n   if (null == instance) {\n         instance = new SysApplication();\n      }\n         return instance;\n      }\n\n// add Activity\npublic void addActivity(Activity activity) {\n      mList.add(activity);\n}\n\n    public void exit() {\n        try {\n           for (Activity activity : mList) {\n              if (activity != null)\n                 activity.finish();\n                 }\n             } catch (Exception e) {\n                 e.printStackTrace();\n             } finally {\n                System.exit(0);\n             }\n}\n\n@Override\npublic void onLowMemory() {\n    super.onLowMemory();\n      System.gc();\n}\n\n}"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/pattern/CreateGesturePasswordActivity.java",
    "content": "package com.cwp.pattern;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport com.cwp.chart.SystemBarTintManager;\nimport com.cwp.cmoneycharge.CrashApplication;\nimport com.cwp.cmoneycharge.R;\nimport com.cwp.cmoneycharge.SysApplication;\nimport com.cwp.pattern.LockPatternView.Cell;\nimport com.cwp.pattern.LockPatternView.DisplayMode;\n\nimport android.annotation.TargetApi;\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.os.Build;\nimport android.os.Bundle;\nimport android.util.Log;\nimport android.view.KeyEvent;\nimport android.view.View;\nimport android.view.Window;\nimport android.view.WindowManager;\nimport android.view.View.OnClickListener;\nimport android.widget.Button;\nimport android.widget.TextView;\nimport android.widget.Toast;\n\npublic class CreateGesturePasswordActivity extends Activity implements\n\t\tOnClickListener {\n\tprivate static final int ID_EMPTY_MESSAGE = -1;\n\tprivate static final String KEY_UI_STAGE = \"uiStage\";\n\tprivate static final String KEY_PATTERN_CHOICE = \"chosenPattern\";\n\tprivate LockPatternView mLockPatternView;\n\tprivate Button mFooterRightButton;\n\tprivate Button mFooterLeftButton;\n\tprotected TextView mHeaderText;\n\tprotected List<LockPatternView.Cell> mChosenPattern = null;\n\tprivate Toast mToast;\n\tprivate Stage mUiStage = Stage.Introduction;\n\tprivate View mPreviewViews[][] = new View[3][3];\n\t/**\n\t * The patten used during the help screen to show how to draw a pattern.\n\t */\n\tprivate final List<LockPatternView.Cell> mAnimatePattern = new ArrayList<LockPatternView.Cell>();\n\n\t/**\n\t * The states of the left footer button.\n\t */\n\tenum LeftButtonMode {\n\t\tCancel(android.R.string.cancel, true), CancelDisabled(\n\t\t\t\tandroid.R.string.cancel, false), Retry(\n\t\t\t\tR.string.lockpattern_retry_button_text, true), RetryDisabled(\n\t\t\t\tR.string.lockpattern_retry_button_text, false), Gone(\n\t\t\t\tID_EMPTY_MESSAGE, false);\n\n\t\t/**\n\t\t * @param text\n\t\t *            The displayed text for this mode.\n\t\t * @param enabled\n\t\t *            Whether the button should be enabled.\n\t\t */\n\t\tLeftButtonMode(int text, boolean enabled) {\n\t\t\tthis.text = text;\n\t\t\tthis.enabled = enabled;\n\t\t}\n\n\t\tfinal int text;\n\t\tfinal boolean enabled;\n\t}\n\n\t/**\n\t * The states of the right button.\n\t */\n\tenum RightButtonMode {\n\t\tContinue(R.string.lockpattern_continue_button_text, true), ContinueDisabled(\n\t\t\t\tR.string.lockpattern_continue_button_text, false), Confirm(\n\t\t\t\tR.string.lockpattern_confirm_button_text, true), ConfirmDisabled(\n\t\t\t\tR.string.lockpattern_confirm_button_text, false), Ok(\n\t\t\t\tandroid.R.string.ok, true);\n\n\t\t/**\n\t\t * @param text\n\t\t *            The displayed text for this mode.\n\t\t * @param enabled\n\t\t *            Whether the button should be enabled.\n\t\t */\n\t\tRightButtonMode(int text, boolean enabled) {\n\t\t\tthis.text = text;\n\t\t\tthis.enabled = enabled;\n\t\t}\n\n\t\tfinal int text;\n\t\tfinal boolean enabled;\n\t}\n\n\t/**\n\t * Keep track internally of where the user is in choosing a pattern.\n\t */\n\tprotected enum Stage {\n\n\t\tIntroduction(R.string.lockpattern_recording_intro_header,\n\t\t\t\tLeftButtonMode.Cancel, RightButtonMode.ContinueDisabled,\n\t\t\t\tID_EMPTY_MESSAGE, true), HelpScreen(\n\t\t\t\tR.string.lockpattern_settings_help_how_to_record,\n\t\t\t\tLeftButtonMode.Gone, RightButtonMode.Ok, ID_EMPTY_MESSAGE,\n\t\t\t\tfalse), ChoiceTooShort(\n\t\t\t\tR.string.lockpattern_recording_incorrect_too_short,\n\t\t\t\tLeftButtonMode.Retry, RightButtonMode.ContinueDisabled,\n\t\t\t\tID_EMPTY_MESSAGE, true), FirstChoiceValid(\n\t\t\t\tR.string.lockpattern_pattern_entered_header,\n\t\t\t\tLeftButtonMode.Retry, RightButtonMode.Continue,\n\t\t\t\tID_EMPTY_MESSAGE, false), NeedToConfirm(\n\t\t\t\tR.string.lockpattern_need_to_confirm, LeftButtonMode.Cancel,\n\t\t\t\tRightButtonMode.ConfirmDisabled, ID_EMPTY_MESSAGE, true), ConfirmWrong(\n\t\t\t\tR.string.lockpattern_need_to_unlock_wrong,\n\t\t\t\tLeftButtonMode.Cancel, RightButtonMode.ConfirmDisabled,\n\t\t\t\tID_EMPTY_MESSAGE, true), ChoiceConfirmed(\n\t\t\t\tR.string.lockpattern_pattern_confirmed_header,\n\t\t\t\tLeftButtonMode.Cancel, RightButtonMode.Confirm,\n\t\t\t\tID_EMPTY_MESSAGE, false);\n\n\t\t/**\n\t\t * @param headerMessage\n\t\t *            The message displayed at the top.\n\t\t * @param leftMode\n\t\t *            The mode of the left button.\n\t\t * @param rightMode\n\t\t *            The mode of the right button.\n\t\t * @param footerMessage\n\t\t *            The footer message.\n\t\t * @param patternEnabled\n\t\t *            Whether the pattern widget is enabled.\n\t\t */\n\t\tStage(int headerMessage, LeftButtonMode leftMode,\n\t\t\t\tRightButtonMode rightMode, int footerMessage,\n\t\t\t\tboolean patternEnabled) {\n\t\t\tthis.headerMessage = headerMessage;\n\t\t\tthis.leftMode = leftMode;\n\t\t\tthis.rightMode = rightMode;\n\t\t\tthis.footerMessage = footerMessage;\n\t\t\tthis.patternEnabled = patternEnabled;\n\t\t}\n\n\t\tfinal int headerMessage;\n\t\tfinal LeftButtonMode leftMode;\n\t\tfinal RightButtonMode rightMode;\n\t\tfinal int footerMessage;\n\t\tfinal boolean patternEnabled;\n\t}\n\n\tprivate void showToast(CharSequence message) {\n\t\tif (null == mToast) {\n\t\t\tmToast = Toast.makeText(this, message, Toast.LENGTH_SHORT);\n\t\t} else {\n\t\t\tmToast.setText(message);\n\t\t}\n\n\t\tmToast.show();\n\t}\n\n\t@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.gesturepassword_create);\n\t\tSysApplication.getInstance().addActivity(this); // 在销毁队列中添加this\n\n\t\tSystemBarTintManager mTintManager;\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n\t\t\tsetTranslucentStatus(true);\n\t\t}\n\t\tmTintManager = new SystemBarTintManager(this);\n\t\tmTintManager.setStatusBarTintEnabled(true);\n\t\tmTintManager.setStatusBarTintResource(R.color.statusbar_bg);\n\n\t\t// 初始化演示动画\n\t\tmAnimatePattern.add(LockPatternView.Cell.of(0, 0));\n\t\tmAnimatePattern.add(LockPatternView.Cell.of(0, 1));\n\t\tmAnimatePattern.add(LockPatternView.Cell.of(1, 1));\n\t\tmAnimatePattern.add(LockPatternView.Cell.of(2, 1));\n\t\tmAnimatePattern.add(LockPatternView.Cell.of(2, 2));\n\n\t\tmLockPatternView = (LockPatternView) this\n\t\t\t\t.findViewById(R.id.gesturepwd_create_lockview);\n\t\tmHeaderText = (TextView) findViewById(R.id.gesturepwd_create_text);\n\t\tmLockPatternView.setOnPatternListener(mChooseNewLockPatternListener);\n\t\tmLockPatternView.setTactileFeedbackEnabled(true);\n\n\t\tmFooterRightButton = (Button) this.findViewById(R.id.right_btn);\n\t\tmFooterLeftButton = (Button) this.findViewById(R.id.reset_btn);\n\t\tmFooterRightButton.setOnClickListener(this);\n\t\tmFooterLeftButton.setOnClickListener(this);\n\t\tinitPreviewViews();\n\t\tif (savedInstanceState == null) {\n\t\t\tupdateStage(Stage.Introduction);\n\t\t\tupdateStage(Stage.HelpScreen);\n\t\t} else {\n\t\t\t// restore from previous state\n\t\t\tfinal String patternString = savedInstanceState\n\t\t\t\t\t.getString(KEY_PATTERN_CHOICE);\n\t\t\tif (patternString != null) {\n\t\t\t\tmChosenPattern = LockPatternUtils\n\t\t\t\t\t\t.stringToPattern(patternString);\n\t\t\t}\n\t\t\tupdateStage(Stage.values()[savedInstanceState.getInt(KEY_UI_STAGE)]);\n\t\t}\n\n\t}\n\n\tprivate void initPreviewViews() {\n\t\tmPreviewViews = new View[3][3];\n\t\tmPreviewViews[0][0] = findViewById(R.id.gesturepwd_setting_preview_0);\n\t\tmPreviewViews[0][1] = findViewById(R.id.gesturepwd_setting_preview_1);\n\t\tmPreviewViews[0][2] = findViewById(R.id.gesturepwd_setting_preview_2);\n\t\tmPreviewViews[1][0] = findViewById(R.id.gesturepwd_setting_preview_3);\n\t\tmPreviewViews[1][1] = findViewById(R.id.gesturepwd_setting_preview_4);\n\t\tmPreviewViews[1][2] = findViewById(R.id.gesturepwd_setting_preview_5);\n\t\tmPreviewViews[2][0] = findViewById(R.id.gesturepwd_setting_preview_6);\n\t\tmPreviewViews[2][1] = findViewById(R.id.gesturepwd_setting_preview_7);\n\t\tmPreviewViews[2][2] = findViewById(R.id.gesturepwd_setting_preview_8);\n\t}\n\n\tprivate void updatePreviewViews() {\n\t\tif (mChosenPattern == null)\n\t\t\treturn;\n\t\tLog.i(\"way\", \"result = \" + mChosenPattern.toString());\n\t\tfor (LockPatternView.Cell cell : mChosenPattern) {\n\t\t\tLog.i(\"way\", \"cell.getRow() = \" + cell.getRow()\n\t\t\t\t\t+ \", cell.getColumn() = \" + cell.getColumn());\n\t\t\tmPreviewViews[cell.getRow()][cell.getColumn()]\n\t\t\t\t\t.setBackgroundResource(R.drawable.gesture_create_grid_selected);\n\n\t\t}\n\t}\n\n\t@Override\n\tprotected void onSaveInstanceState(Bundle outState) {\n\t\tsuper.onSaveInstanceState(outState);\n\t\toutState.putInt(KEY_UI_STAGE, mUiStage.ordinal());\n\t\tif (mChosenPattern != null) {\n\t\t\toutState.putString(KEY_PATTERN_CHOICE,\n\t\t\t\t\tLockPatternUtils.patternToString(mChosenPattern));\n\t\t}\n\t}\n\n\t@Override\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t\tif (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {\n\t\t\tif (mUiStage == Stage.HelpScreen) {\n\t\t\t\tupdateStage(Stage.Introduction);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tif (keyCode == KeyEvent.KEYCODE_MENU && mUiStage == Stage.Introduction) {\n\t\t\tupdateStage(Stage.HelpScreen);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate Runnable mClearPatternRunnable = new Runnable() {\n\t\tpublic void run() {\n\t\t\tmLockPatternView.clearPattern();\n\t\t}\n\t};\n\n\tprotected LockPatternView.OnPatternListener mChooseNewLockPatternListener = new LockPatternView.OnPatternListener() {\n\n\t\tpublic void onPatternStart() {\n\t\t\tmLockPatternView.removeCallbacks(mClearPatternRunnable);\n\t\t\tpatternInProgress();\n\t\t}\n\n\t\tpublic void onPatternCleared() {\n\t\t\tmLockPatternView.removeCallbacks(mClearPatternRunnable);\n\t\t}\n\n\t\tpublic void onPatternDetected(List<LockPatternView.Cell> pattern) {\n\t\t\tif (pattern == null)\n\t\t\t\treturn;\n\t\t\t// Log.i(\"way\", \"result = \" + pattern.toString());\n\t\t\tif (mUiStage == Stage.NeedToConfirm\n\t\t\t\t\t|| mUiStage == Stage.ConfirmWrong) {\n\t\t\t\tif (mChosenPattern == null)\n\t\t\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\t\t\"null chosen pattern in stage 'need to confirm\");\n\t\t\t\tif (mChosenPattern.equals(pattern)) {\n\t\t\t\t\tupdateStage(Stage.ChoiceConfirmed);\n\t\t\t\t} else {\n\t\t\t\t\tupdateStage(Stage.ConfirmWrong);\n\t\t\t\t}\n\t\t\t} else if (mUiStage == Stage.Introduction\n\t\t\t\t\t|| mUiStage == Stage.ChoiceTooShort) {\n\t\t\t\tif (pattern.size() < LockPatternUtils.MIN_LOCK_PATTERN_SIZE) {\n\t\t\t\t\tupdateStage(Stage.ChoiceTooShort);\n\t\t\t\t} else {\n\t\t\t\t\tmChosenPattern = new ArrayList<LockPatternView.Cell>(\n\t\t\t\t\t\t\tpattern);\n\t\t\t\t\tupdateStage(Stage.FirstChoiceValid);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new IllegalStateException(\"Unexpected stage \" + mUiStage\n\t\t\t\t\t\t+ \" when \" + \"entering the pattern.\");\n\t\t\t}\n\t\t}\n\n\t\tprivate void patternInProgress() {\n\t\t\tmHeaderText.setText(R.string.lockpattern_recording_inprogress);\n\t\t\tmFooterLeftButton.setEnabled(false);\n\t\t\tmFooterRightButton.setEnabled(false);\n\t\t}\n\n\t\t@Override\n\t\tpublic void onPatternCellAdded(List<Cell> pattern) {\n\n\t\t}\n\t};\n\n\tprivate void updateStage(Stage stage) {\n\t\tmUiStage = stage;\n\t\tif (stage == Stage.ChoiceTooShort) {\n\t\t\tmHeaderText.setText(getResources().getString(stage.headerMessage,\n\t\t\t\t\tLockPatternUtils.MIN_LOCK_PATTERN_SIZE));\n\t\t} else {\n\t\t\tmHeaderText.setText(stage.headerMessage);\n\t\t}\n\n\t\tif (stage.leftMode == LeftButtonMode.Gone) {\n\t\t\tmFooterLeftButton.setVisibility(View.GONE);\n\t\t} else {\n\t\t\tmFooterLeftButton.setVisibility(View.VISIBLE);\n\t\t\tmFooterLeftButton.setText(stage.leftMode.text);\n\t\t\tmFooterLeftButton.setEnabled(stage.leftMode.enabled);\n\t\t}\n\n\t\tmFooterRightButton.setText(stage.rightMode.text);\n\t\tmFooterRightButton.setEnabled(stage.rightMode.enabled);\n\n\t\t// same for whether the patten is enabled\n\t\tif (stage.patternEnabled) {\n\t\t\tmLockPatternView.enableInput();\n\t\t} else {\n\t\t\tmLockPatternView.disableInput();\n\t\t}\n\n\t\tmLockPatternView.setDisplayMode(DisplayMode.Correct);\n\n\t\tswitch (mUiStage) {\n\t\tcase Introduction:\n\t\t\tmLockPatternView.clearPattern();\n\t\t\tbreak;\n\t\tcase HelpScreen:\n\t\t\tmLockPatternView.setPattern(DisplayMode.Animate, mAnimatePattern);\n\t\t\tbreak;\n\t\tcase ChoiceTooShort:\n\t\t\tmLockPatternView.setDisplayMode(DisplayMode.Wrong);\n\t\t\tpostClearPatternRunnable();\n\t\t\tbreak;\n\t\tcase FirstChoiceValid:\n\t\t\tbreak;\n\t\tcase NeedToConfirm:\n\t\t\tmLockPatternView.clearPattern();\n\t\t\tupdatePreviewViews();\n\t\t\tbreak;\n\t\tcase ConfirmWrong:\n\t\t\tmLockPatternView.setDisplayMode(DisplayMode.Wrong);\n\t\t\tpostClearPatternRunnable();\n\t\t\tbreak;\n\t\tcase ChoiceConfirmed:\n\t\t\tbreak;\n\t\t}\n\n\t}\n\n\t// clear the wrong pattern unless they have started a new one\n\t// already\n\tprivate void postClearPatternRunnable() {\n\t\tmLockPatternView.removeCallbacks(mClearPatternRunnable);\n\t\tmLockPatternView.postDelayed(mClearPatternRunnable, 2000);\n\t}\n\n\t@Override\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\tcase R.id.reset_btn:\n\t\t\tif (mUiStage.leftMode == LeftButtonMode.Retry) {\n\t\t\t\tmChosenPattern = null;\n\t\t\t\tmLockPatternView.clearPattern();\n\t\t\t\tupdateStage(Stage.Introduction);\n\t\t\t} else if (mUiStage.leftMode == LeftButtonMode.Cancel) {\n\t\t\t\t// They are canceling the entire wizard\n\t\t\t\tfinish();\n\t\t\t} else {\n\t\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\t\"left footer button pressed, but stage of \" + mUiStage\n\t\t\t\t\t\t\t\t+ \" doesn't make sense\");\n\t\t\t}\n\n\t\t\tbreak;\n\t\tcase R.id.right_btn:\n\t\t\tif (mUiStage.rightMode == RightButtonMode.Continue) {\n\t\t\t\tif (mUiStage != Stage.FirstChoiceValid) {\n\t\t\t\t\tthrow new IllegalStateException(\"expected ui stage \"\n\t\t\t\t\t\t\t+ Stage.FirstChoiceValid + \" when button is \"\n\t\t\t\t\t\t\t+ RightButtonMode.Continue);\n\t\t\t\t}\n\t\t\t\tupdateStage(Stage.NeedToConfirm);\n\t\t\t} else if (mUiStage.rightMode == RightButtonMode.Confirm) {\n\t\t\t\tif (mUiStage != Stage.ChoiceConfirmed) {\n\t\t\t\t\tthrow new IllegalStateException(\"expected ui stage \"\n\t\t\t\t\t\t\t+ Stage.ChoiceConfirmed + \" when button is \"\n\t\t\t\t\t\t\t+ RightButtonMode.Confirm);\n\t\t\t\t}\n\t\t\t\tsaveChosenPatternAndFinish();\n\t\t\t} else if (mUiStage.rightMode == RightButtonMode.Ok) {\n\t\t\t\tif (mUiStage != Stage.HelpScreen) {\n\t\t\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\t\t\"Help screen is only mode with ok button, but \"\n\t\t\t\t\t\t\t\t\t+ \"stage is \" + mUiStage);\n\t\t\t\t}\n\t\t\t\tmLockPatternView.clearPattern();\n\t\t\t\tmLockPatternView.setDisplayMode(DisplayMode.Correct);\n\t\t\t\tupdateStage(Stage.Introduction);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t@TargetApi(19)\n\tprivate void setTranslucentStatus(boolean on) {\n\t\tWindow win = getWindow();\n\t\tWindowManager.LayoutParams winParams = win.getAttributes();\n\t\tfinal int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;\n\t\tif (on) {\n\t\t\twinParams.flags |= bits;\n\t\t} else {\n\t\t\twinParams.flags &= ~bits;\n\t\t}\n\t\twin.setAttributes(winParams);\n\t}\n\n\tprivate void saveChosenPatternAndFinish() {\n\t\tCrashApplication.getInstance().getLockPatternUtils()\n\t\t\t\t.saveLockPattern(mChosenPattern);\n\t\tshowToast(\"密码设置成功\");\n\t\tthis.setResult(3);// this.setResult(int resultCode)，resultCode 可以自定义\n\t\tthis.finish();\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/pattern/GuideGesturePasswordActivity.java",
    "content": "package com.cwp.pattern;\n\nimport com.cwp.chart.SystemBarTintManager;\nimport com.cwp.cmoneycharge.About;\nimport com.cwp.cmoneycharge.CrashApplication;\nimport com.cwp.cmoneycharge.R;\nimport com.cwp.cmoneycharge.SysApplication;\n\nimport android.annotation.TargetApi;\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.os.Build;\nimport android.os.Bundle;\nimport android.view.View;\nimport android.view.Window;\nimport android.view.WindowManager;\nimport android.view.View.OnClickListener;\nimport android.widget.Toast;\n\npublic class GuideGesturePasswordActivity extends Activity {\n\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.gesturepassword_guide);\n\n\t\tSysApplication.getInstance().addActivity(this); // 在销毁队列中添加this\n\n\t\tSystemBarTintManager mTintManager;\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n\t\t\tsetTranslucentStatus(true);\n\t\t}\n\t\tmTintManager = new SystemBarTintManager(this);\n\t\tmTintManager.setStatusBarTintEnabled(true);\n\t\tmTintManager.setStatusBarTintResource(R.color.statusbar_bg);\n\n\t\tfindViewById(R.id.gesturepwd_guide_btn).setOnClickListener(\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tCrashApplication.getInstance().getLockPatternUtils()\n\t\t\t\t\t\t\t\t.clearLock();\n\t\t\t\t\t\tIntent intent = new Intent(\n\t\t\t\t\t\t\t\tGuideGesturePasswordActivity.this,\n\t\t\t\t\t\t\t\tCreateGesturePasswordActivity.class);\n\t\t\t\t\t\t// 打开新的Activity\n\t\t\t\t\t\tstartActivityForResult(intent, 1);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}\n\n\t@TargetApi(19)\n\tprivate void setTranslucentStatus(boolean on) {\n\t\tWindow win = getWindow();\n\t\tWindowManager.LayoutParams winParams = win.getAttributes();\n\t\tfinal int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;\n\t\tif (on) {\n\t\t\twinParams.flags |= bits;\n\t\t} else {\n\t\t\twinParams.flags &= ~bits;\n\t\t}\n\t\twin.setAttributes(winParams);\n\t}\n\n\t@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\n//\t\tSystem.out.println(\"asdrequestCode\" + requestCode + \"  \" + resultCode);\n\t\tif (requestCode == 1) {\n\t\t\tif (resultCode == 3) {\n\t\t\t\tthis.setResult(3);\n\t\t\t\tthis.finish();\n\t\t\t}\n\t\t}\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/pattern/LockPatternUtils.java",
    "content": "package com.cwp.pattern;\n\nimport java.io.File;\nimport java.io.FileNotFoundException;\nimport java.io.IOException;\nimport java.io.RandomAccessFile;\nimport java.security.MessageDigest;\nimport java.security.NoSuchAlgorithmException;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.concurrent.atomic.AtomicBoolean;\n\nimport android.content.Context;\nimport android.os.FileObserver;\nimport android.util.Log;\n\n/**\n * 图案解锁加密、解密工具类\n * \n * @author way\n * \n */\npublic class LockPatternUtils {\n\tprivate static final String TAG = \"LockPatternUtils\";\n\tprivate static final String LOCK_PATTERN_FILE = \"gesture.key\";\n\t/**\n\t * The minimum number of dots in a valid pattern.\n\t */\n\tpublic static final int MIN_LOCK_PATTERN_SIZE = 4;\n\t/**\n\t * The maximum number of incorrect attempts before the user is prevented\n\t * from trying again for {@link #FAILED_ATTEMPT_TIMEOUT_MS}.\n\t */\n\tpublic static final int FAILED_ATTEMPTS_BEFORE_TIMEOUT = 5;\n\t/**\n\t * The minimum number of dots the user must include in a wrong pattern\n\t * attempt for it to be counted against the counts that affect\n\t * {@link #FAILED_ATTEMPTS_BEFORE_TIMEOUT} and\n\t * {@link #FAILED_ATTEMPTS_BEFORE_RESET}\n\t */\n\tpublic static final int MIN_PATTERN_REGISTER_FAIL = MIN_LOCK_PATTERN_SIZE;\n\t/**\n\t * How long the user is prevented from trying again after entering the wrong\n\t * pattern too many times.\n\t */\n\tpublic static final long FAILED_ATTEMPT_TIMEOUT_MS = 30000L;\n\n\tprivate static File sLockPatternFilename;\n\tprivate static final AtomicBoolean sHaveNonZeroPatternFile = new AtomicBoolean(\n\t\t\tfalse);\n\tprivate static FileObserver sPasswordObserver;\n\n\tprivate static class LockPatternFileObserver extends FileObserver {\n\t\tpublic LockPatternFileObserver(String path, int mask) {\n\t\t\tsuper(path, mask);\n\t\t}\n\n\t\t@Override\n\t\tpublic void onEvent(int event, String path) {\n\t\t\tLog.d(TAG, \"file path\" + path);\n\t\t\tif (LOCK_PATTERN_FILE.equals(path)) {\n\t\t\t\tLog.d(TAG, \"lock pattern file changed\");\n\t\t\t\tsHaveNonZeroPatternFile.set(sLockPatternFilename.length() > 0);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic LockPatternUtils(Context context) {\n\t\tif (sLockPatternFilename == null) {\n\t\t\tString dataSystemDirectory = context.getFilesDir()\n\t\t\t\t\t.getAbsolutePath();\n\t\t\tsLockPatternFilename = new File(dataSystemDirectory\n\t\t\t\t\t, LOCK_PATTERN_FILE);\n\t\t\tsHaveNonZeroPatternFile.set(sLockPatternFilename.length() > 0);\n\t\t\tint fileObserverMask = FileObserver.CLOSE_WRITE\n\t\t\t\t\t| FileObserver.DELETE | FileObserver.MOVED_TO\n\t\t\t\t\t| FileObserver.CREATE;\n\t\t\tsPasswordObserver = new LockPatternFileObserver(\n\t\t\t\t\tdataSystemDirectory, fileObserverMask);\n\t\t\tsPasswordObserver.startWatching();\n\t\t}\n\t}\n\n\t/**\n\t * Check to see if the user has stored a lock pattern.\n\t * \n\t * @return Whether a saved pattern exists.\n\t */\n\tpublic boolean savedPatternExists() {\n\t\treturn sHaveNonZeroPatternFile.get();\n\t}\n\n\tpublic void clearLock() {\n\t\tsaveLockPattern(null);\n\t}\n\n\t/**\n\t * Deserialize a pattern. 解密,用于保存状濊\t * \n\t * @param string\n\t *            The pattern serialized with {@link #patternToString}\n\t * @return The pattern.\n\t */\n\tpublic static List<LockPatternView.Cell> stringToPattern(String string) {\n\t\tList<LockPatternView.Cell> result = new ArrayList<LockPatternView.Cell>();\n\n\t\tfinal byte[] bytes = string.getBytes();\n\t\tfor (int i = 0; i < bytes.length; i++) {\n\t\t\tbyte b = bytes[i];\n\t\t\tresult.add(LockPatternView.Cell.of(b / 3, b % 3));\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Serialize a pattern. 加密\n\t * \n\t * @param pattern\n\t *            The pattern.\n\t * @return The pattern in string form.\n\t */\n\tpublic static String patternToString(List<LockPatternView.Cell> pattern) {\n\t\tif (pattern == null) {\n\t\t\treturn \"\";\n\t\t}\n\t\tfinal int patternSize = pattern.size();\n\n\t\tbyte[] res = new byte[patternSize];\n\t\tfor (int i = 0; i < patternSize; i++) {\n\t\t\tLockPatternView.Cell cell = pattern.get(i);\n\t\t\tres[i] = (byte) (cell.getRow() * 3 + cell.getColumn());\n\t\t}\n\t\treturn new String(res);\n\t}\n\n\t/**\n\t * Save a lock pattern.\n\t * \n\t * @param pattern\n\t *            The new pattern to save.\n\t * @param isFallback\n\t *            Specifies if this is a fallback to biometric weak\n\t */\n\tpublic void saveLockPattern(List<LockPatternView.Cell> pattern) {\n\t\t// Compute the hash\n\t\tfinal byte[] hash = LockPatternUtils.patternToHash(pattern);\n\t\ttry {\n\t\t\t// Write the hash to file\n\t\t\tRandomAccessFile raf = new RandomAccessFile(sLockPatternFilename,\n\t\t\t\t\t\"rwd\");\n\t\t\t// Truncate the file if pattern is null, to clear the lock\n\t\t\tif (pattern == null) {\n\t\t\t\traf.setLength(0);\n\t\t\t} else {\n\t\t\t\traf.write(hash, 0, hash.length);\n\t\t\t}\n\t\t\traf.close();\n\t\t} catch (FileNotFoundException fnfe) {\n\t\t\t// Cant do much, unless we want to fail over to using the settings\n\t\t\t// provider\n\t\t\tLog.e(TAG, \"Unable to save lock pattern to \" + sLockPatternFilename);\n\t\t} catch (IOException ioe) {\n\t\t\t// Cant do much\n\t\t\tLog.e(TAG, \"Unable to save lock pattern to \" + sLockPatternFilename);\n\t\t}\n\t}\n\n\t/*\n\t * Generate an SHA-1 hash for the pattern. Not the most secure, but it is at\n\t * least a second level of protection. First level is that the file is in a\n\t * location only readable by the system process.\n\t * \n\t * @param pattern the gesture pattern.\n\t * \n\t * @return the hash of the pattern in a byte array.\n\t */\n\tprivate static byte[] patternToHash(List<LockPatternView.Cell> pattern) {\n\t\tif (pattern == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfinal int patternSize = pattern.size();\n\t\tbyte[] res = new byte[patternSize];\n\t\tfor (int i = 0; i < patternSize; i++) {\n\t\t\tLockPatternView.Cell cell = pattern.get(i);\n\t\t\tres[i] = (byte) (cell.getRow() * 3 + cell.getColumn());\n\t\t}\n\t\ttry {\n\t\t\tMessageDigest md = MessageDigest.getInstance(\"SHA-1\");\n\t\t\tbyte[] hash = md.digest(res);\n\t\t\treturn hash;\n\t\t} catch (NoSuchAlgorithmException nsa) {\n\t\t\treturn res;\n\t\t}\n\t}\n\n\t/**\n\t * Check to see if a pattern matches the saved pattern. If no pattern\n\t * exists, always returns true.\n\t * \n\t * @param pattern\n\t *            The pattern to check.\n\t * @return Whether the pattern matches the stored one.\n\t */\n\tpublic boolean checkPattern(List<LockPatternView.Cell> pattern) {\n\t\ttry {\n\t\t\t// Read all the bytes from the file\n\t\t\tRandomAccessFile raf = new RandomAccessFile(sLockPatternFilename,\n\t\t\t\t\t\"r\");\n\t\t\tfinal byte[] stored = new byte[(int) raf.length()];\n\t\t\tint got = raf.read(stored, 0, stored.length);\n\t\t\traf.close();\n\t\t\tif (got <= 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t// Compare the hash from the file with the entered pattern's hash\n\t\t\treturn Arrays.equals(stored,\n\t\t\t\t\tLockPatternUtils.patternToHash(pattern));\n\t\t} catch (FileNotFoundException fnfe) {\n\t\t\treturn true;\n\t\t} catch (IOException ioe) {\n\t\t\treturn true;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/pattern/LockPatternView.java",
    "content": "package com.cwp.pattern;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport com.cwp.cmoneycharge.R;\n\nimport android.content.Context;\nimport android.content.res.TypedArray;\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapFactory;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphics.Matrix;\nimport android.graphics.Paint;\nimport android.graphics.Path;\nimport android.graphics.Rect;\nimport android.os.Debug;\nimport android.os.Parcel;\nimport android.os.Parcelable;\nimport android.os.SystemClock;\nimport android.util.AttributeSet;\nimport android.util.Log;\nimport android.view.HapticFeedbackConstants;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.accessibility.AccessibilityEvent;\n\n\n/**\n * Displays and detects the user's unlock attempt, which is a drag of a finger\n * across 9 regions of the screen.\n * \n * Is also capable of displaying a static pattern in \"in progress\", \"wrong\" or\n * \"correct\" states.\n * \n * @author way\n */\npublic class LockPatternView extends View {\n\tprivate static final String TAG = \"LockPatternView\";\n\t// Aspect to use when rendering this view\n\tprivate static final int ASPECT_SQUARE = 0; // View will be the minimum of\n\t\t\t\t\t\t\t\t\t\t\t\t// width/height\n\tprivate static final int ASPECT_LOCK_WIDTH = 1; // Fixed width; height will\n\t\t\t\t\t\t\t\t\t\t\t\t\t// be minimum of (w,h)\n\tprivate static final int ASPECT_LOCK_HEIGHT = 2; // Fixed height; width will\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// be minimum of (w,h)\n\n\tprivate static final boolean PROFILE_DRAWING = false;\n\tprivate boolean mDrawingProfilingStarted = false;\n\n\tprivate Paint mPaint = new Paint();\n\tprivate Paint mPathPaint = new Paint();\n\n\t// TODO: make this common with PhoneWindow\n\tstatic final int STATUS_BAR_HEIGHT = 25;\n\n\t/**\n\t * How many milliseconds we spend animating each circle of a lock pattern if\n\t * the animating mode is set. The entire animation should take this constant\n\t * * the length of the pattern to complete.\n\t */\n\tprivate static final int MILLIS_PER_CIRCLE_ANIMATING = 700;\n\n\tprivate OnPatternListener mOnPatternListener;\n\tprivate ArrayList<Cell> mPattern = new ArrayList<Cell>(9);\n\n\t/**\n\t * Lookup table for the circles of the pattern we are currently drawing.\n\t * This will be the cells of the complete pattern unless we are animating,\n\t * in which case we use this to hold the cells we are drawing for the in\n\t * progress animation.\n\t */\n\tprivate boolean[][] mPatternDrawLookup = new boolean[3][3];\n\n\t/**\n\t * the in progress point: - during interaction: where the user's finger is -\n\t * during animation: the current tip of the animating line\n\t */\n\tprivate float mInProgressX = -1;\n\tprivate float mInProgressY = -1;\n\n\tprivate long mAnimatingPeriodStart;\n\n\tprivate DisplayMode mPatternDisplayMode = DisplayMode.Correct;\n\tprivate boolean mInputEnabled = true;\n\tprivate boolean mInStealthMode = false;\n\tprivate boolean mEnableHapticFeedback = false;\n\tprivate boolean mPatternInProgress = false;\n\n\tprivate float mDiameterFactor = 0.10f; // TODO: move to attrs\n\tprivate final int mStrokeAlpha = 128;\n\tprivate float mHitFactor = 0.6f;\n\n\tprivate float mSquareWidth;\n\tprivate float mSquareHeight;\n\n\tprivate Bitmap mBitmapCircleDefault;\n\tprivate Bitmap mBitmapCircleGreen;\n\tprivate Bitmap mBitmapCircleRed;\n\n\tprivate final Path mCurrentPath = new Path();\n\tprivate final Rect mInvalidate = new Rect();\n\n\tprivate int mBitmapWidth;\n\tprivate int mBitmapHeight;\n\n\tprivate int mAspect;\n\tprivate final Matrix mCircleMatrix = new Matrix();\n\n\t/**\n\t * Represents a cell in the 3 X 3 matrix of the unlock pattern view.\n\t */\n\tpublic static class Cell {\n\t\tint row;\n\t\tint column;\n\n\t\t// keep # objects limited to 9\n\t\tstatic Cell[][] sCells = new Cell[3][3];\n\t\tstatic {\n\t\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\t\tsCells[i][j] = new Cell(i, j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * @param row\n\t\t *            The row of the cell.\n\t\t * @param column\n\t\t *            The column of the cell.\n\t\t */\n\t\tprivate Cell(int row, int column) {\n\t\t\tcheckRange(row, column);\n\t\t\tthis.row = row;\n\t\t\tthis.column = column;\n\t\t}\n\n\t\tpublic int getRow() {\n\t\t\treturn row;\n\t\t}\n\n\t\tpublic int getColumn() {\n\t\t\treturn column;\n\t\t}\n\n\t\t/**\n\t\t * @param row\n\t\t *            The row of the cell.\n\t\t * @param column\n\t\t *            The column of the cell.\n\t\t */\n\t\tpublic static synchronized Cell of(int row, int column) {\n\t\t\tcheckRange(row, column);\n\t\t\treturn sCells[row][column];\n\t\t}\n\n\t\tprivate static void checkRange(int row, int column) {\n\t\t\tif (row < 0 || row > 2) {\n\t\t\t\tthrow new IllegalArgumentException(\"row must be in range 0-2\");\n\t\t\t}\n\t\t\tif (column < 0 || column > 2) {\n\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\"column must be in range 0-2\");\n\t\t\t}\n\t\t}\n\n\t\tpublic String toString() {\n\t\t\treturn \"(row=\" + row + \",clmn=\" + column + \")\";\n\t\t}\n\t}\n\n\t/**\n\t * How to display the current pattern.\n\t */\n\tpublic enum DisplayMode {\n\n\t\t/**\n\t\t * The pattern drawn is correct (i.e draw it in a friendly color)\n\t\t */\n\t\tCorrect,\n\n\t\t/**\n\t\t * Animate the pattern (for demo, and help).\n\t\t */\n\t\tAnimate,\n\n\t\t/**\n\t\t * The pattern is wrong (i.e draw a foreboding color)\n\t\t */\n\t\tWrong\n\t}\n\n\t/**\n\t * The call back interface for detecting patterns entered by the user.\n\t */\n\tpublic static interface OnPatternListener {\n\n\t\t/**\n\t\t * A new pattern has begun.\n\t\t */\n\t\tvoid onPatternStart();\n\n\t\t/**\n\t\t * The pattern was cleared.\n\t\t */\n\t\tvoid onPatternCleared();\n\n\t\t/**\n\t\t * The user extended the pattern currently being drawn by one cell.\n\t\t * \n\t\t * @param pattern\n\t\t *            The pattern with newly added cell.\n\t\t */\n\t\tvoid onPatternCellAdded(List<Cell> pattern);\n\n\t\t/**\n\t\t * A pattern was detected from the user.\n\t\t * \n\t\t * @param pattern\n\t\t *            The pattern.\n\t\t */\n\t\tvoid onPatternDetected(List<Cell> pattern);\n\t}\n\n\tpublic LockPatternView(Context context) {\n\t\tthis(context, null);\n\t}\n\n\tpublic LockPatternView(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\n\t\tTypedArray a = context.obtainStyledAttributes(attrs,\n\t\t\t\tR.styleable.LockPatternView);\n\n\t\tfinal String aspect = a.getString(R.styleable.LockPatternView_aspect);\n\n\t\tif (\"square\".equals(aspect)) {\n\t\t\tmAspect = ASPECT_SQUARE;\n\t\t} else if (\"lock_width\".equals(aspect)) {\n\t\t\tmAspect = ASPECT_LOCK_WIDTH;\n\t\t} else if (\"lock_height\".equals(aspect)) {\n\t\t\tmAspect = ASPECT_LOCK_HEIGHT;\n\t\t} else {\n\t\t\tmAspect = ASPECT_SQUARE;\n\t\t}\n\n\t\tsetClickable(true);\n\n\t\tmPathPaint.setAntiAlias(true);\n\t\tmPathPaint.setDither(true);\n\t\tmPathPaint.setColor(Color.YELLOW); // TODO this should be from the style\n\t\tmPathPaint.setAlpha(mStrokeAlpha);\n\t\tmPathPaint.setStyle(Paint.Style.STROKE);\n\t\tmPathPaint.setStrokeJoin(Paint.Join.ROUND);\n\t\tmPathPaint.setStrokeCap(Paint.Cap.ROUND);\n\n\t\tmBitmapCircleDefault = getBitmapFor(R.drawable.gesture_pattern_item_bg);\n\t\tmBitmapCircleGreen = getBitmapFor(R.drawable.gesture_pattern_selected);\n\t\tmBitmapCircleRed = getBitmapFor(R.drawable.gesture_pattern_selected_wrong);\n\t\t// bitmaps have the size of the largest bitmap in this group\n\t\tfinal Bitmap bitmaps[] = { mBitmapCircleDefault, mBitmapCircleGreen,\n\t\t\t\tmBitmapCircleRed };\n\t\tfor (Bitmap bitmap : bitmaps) {\n\t\t\tmBitmapWidth = Math.max(mBitmapWidth, bitmap.getWidth());\n\t\t\tmBitmapHeight = Math.max(mBitmapHeight, bitmap.getHeight());\n\t\t}\n\t\ta.recycle();\n\n\t}\n\n\tprivate Bitmap getBitmapFor(int resId) {\n\t\treturn BitmapFactory.decodeResource(getContext().getResources(), resId);\n\t}\n\n\t/**\n\t * @return Whether the view is in stealth mode.\n\t */\n\tpublic boolean isInStealthMode() {\n\t\treturn mInStealthMode;\n\t}\n\n\t/**\n\t * @return Whether the view has tactile feedback enabled.\n\t */\n\tpublic boolean isTactileFeedbackEnabled() {\n\t\treturn mEnableHapticFeedback;\n\t}\n\n\t/**\n\t * Set whether the view is in stealth mode. If true, there will be no\n\t * visible feedback as the user enters the pattern.\n\t * \n\t * @param inStealthMode\n\t *            Whether in stealth mode.\n\t */\n\tpublic void setInStealthMode(boolean inStealthMode) {\n\t\tmInStealthMode = inStealthMode;\n\t}\n\n\t/**\n\t * Set whether the view will use tactile feedback. If true, there will be\n\t * tactile feedback as the user enters the pattern.\n\t * \n\t * @param tactileFeedbackEnabled\n\t *            Whether tactile feedback is enabled\n\t */\n\tpublic void setTactileFeedbackEnabled(boolean tactileFeedbackEnabled) {\n\t\tmEnableHapticFeedback = tactileFeedbackEnabled;\n\t}\n\n\t/**\n\t * Set the call back for pattern detection.\n\t * \n\t * @param onPatternListener\n\t *            The call back.\n\t */\n\tpublic void setOnPatternListener(OnPatternListener onPatternListener) {\n\t\tmOnPatternListener = onPatternListener;\n\t}\n\n\t/**\n\t * Set the pattern explicitely (rather than waiting for the user to input a\n\t * pattern).\n\t * \n\t * @param displayMode\n\t *            How to display the pattern.\n\t * @param pattern\n\t *            The pattern.\n\t */\n\tpublic void setPattern(DisplayMode displayMode, List<Cell> pattern) {\n\t\tmPattern.clear();\n\t\tmPattern.addAll(pattern);\n\t\tclearPatternDrawLookup();\n\t\tfor (Cell cell : pattern) {\n\t\t\tmPatternDrawLookup[cell.getRow()][cell.getColumn()] = true;\n\t\t}\n\n\t\tsetDisplayMode(displayMode);\n\t}\n\n\t/**\n\t * Set the display mode of the current pattern. This can be useful, for\n\t * instance, after detecting a pattern to tell this view whether change the\n\t * in progress result to correct or wrong.\n\t * \n\t * @param displayMode\n\t *            The display mode.\n\t */\n\tpublic void setDisplayMode(DisplayMode displayMode) {\n\t\tmPatternDisplayMode = displayMode;\n\t\tif (displayMode == DisplayMode.Animate) {\n\t\t\tif (mPattern.size() == 0) {\n\t\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\t\"you must have a pattern to \"\n\t\t\t\t\t\t\t\t+ \"animate if you want to set the display mode to animate\");\n\t\t\t}\n\t\t\tmAnimatingPeriodStart = SystemClock.elapsedRealtime();\n\t\t\tfinal Cell first = mPattern.get(0);\n\t\t\tmInProgressX = getCenterXForColumn(first.getColumn());\n\t\t\tmInProgressY = getCenterYForRow(first.getRow());\n\t\t\tclearPatternDrawLookup();\n\t\t}\n\t\tinvalidate();\n\t}\n\n\tprivate void notifyCellAdded() {\n\t\tif (mOnPatternListener != null) {\n\t\t\tmOnPatternListener.onPatternCellAdded(mPattern);\n\t\t}\n\t\tsendAccessEvent(R.string.lockscreen_access_pattern_cell_added);\n\t}\n\n\tprivate void notifyPatternStarted() {\n\t\tif (mOnPatternListener != null) {\n\t\t\tmOnPatternListener.onPatternStart();\n\t\t}\n\t\tsendAccessEvent(R.string.lockscreen_access_pattern_start);\n\t}\n\n\tprivate void notifyPatternDetected() {\n\t\tif (mOnPatternListener != null) {\n\t\t\tmOnPatternListener.onPatternDetected(mPattern);\n\t\t}\n\t\tsendAccessEvent(R.string.lockscreen_access_pattern_detected);\n\t}\n\n\tprivate void notifyPatternCleared() {\n\t\tif (mOnPatternListener != null) {\n\t\t\tmOnPatternListener.onPatternCleared();\n\t\t}\n\t\tsendAccessEvent(R.string.lockscreen_access_pattern_cleared);\n\t}\n\n\t/**\n\t * Clear the pattern.\n\t */\n\tpublic void clearPattern() {\n\t\tresetPattern();\n\t}\n\n\t/**\n\t * Reset all pattern state.\n\t */\n\tprivate void resetPattern() {\n\t\tmPattern.clear();\n\t\tclearPatternDrawLookup();\n\t\tmPatternDisplayMode = DisplayMode.Correct;\n\t\tinvalidate();\n\t}\n\n\t/**\n\t * Clear the pattern lookup table.\n\t */\n\tprivate void clearPatternDrawLookup() {\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tmPatternDrawLookup[i][j] = false;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Disable input (for instance when displaying a message that will timeout\n\t * so user doesn't get view into messy state).\n\t */\n\tpublic void disableInput() {\n\t\tmInputEnabled = false;\n\t}\n\n\t/**\n\t * Enable input.\n\t */\n\tpublic void enableInput() {\n\t\tmInputEnabled = true;\n\t}\n\n\t@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tfinal int width = w - getPaddingLeft() - getPaddingRight();\n\t\tmSquareWidth = width / 3.0f;\n\n\t\tfinal int height = h - getPaddingTop() - getPaddingBottom();\n\t\tmSquareHeight = height / 3.0f;\n\t}\n\n\tprivate int resolveMeasured(int measureSpec, int desired) {\n\t\tint result = 0;\n\t\tint specSize = MeasureSpec.getSize(measureSpec);\n\t\tswitch (MeasureSpec.getMode(measureSpec)) {\n\t\tcase MeasureSpec.UNSPECIFIED:\n\t\t\tresult = desired;\n\t\t\tbreak;\n\t\tcase MeasureSpec.AT_MOST:\n\t\t\tresult = Math.max(specSize, desired);\n\t\t\tbreak;\n\t\tcase MeasureSpec.EXACTLY:\n\t\tdefault:\n\t\t\tresult = specSize;\n\t\t}\n\t\treturn result;\n\t}\n\n\t@Override\n\tprotected int getSuggestedMinimumWidth() {\n\t\t// View should be large enough to contain 3 side-by-side target bitmaps\n\t\treturn 3 * mBitmapWidth;\n\t}\n\n\t@Override\n\tprotected int getSuggestedMinimumHeight() {\n\t\t// View should be large enough to contain 3 side-by-side target bitmaps\n\t\treturn 3 * mBitmapWidth;\n\t}\n\n\t@Override\n\tprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n\t\tfinal int minimumWidth = getSuggestedMinimumWidth();\n\t\tfinal int minimumHeight = getSuggestedMinimumHeight();\n\t\tint viewWidth = resolveMeasured(widthMeasureSpec, minimumWidth);\n\t\tint viewHeight = resolveMeasured(heightMeasureSpec, minimumHeight);\n\n\t\tswitch (mAspect) {\n\t\tcase ASPECT_SQUARE:\n\t\t\tviewWidth = viewHeight = Math.min(viewWidth, viewHeight);\n\t\t\tbreak;\n\t\tcase ASPECT_LOCK_WIDTH:\n\t\t\tviewHeight = Math.min(viewWidth, viewHeight);\n\t\t\tbreak;\n\t\tcase ASPECT_LOCK_HEIGHT:\n\t\t\tviewWidth = Math.min(viewWidth, viewHeight);\n\t\t\tbreak;\n\t\t}\n\t\tLog.v(TAG, \"LockPatternView dimensions: \" + viewWidth + \"x\"\n\t\t\t\t+ viewHeight);\n\t\tsetMeasuredDimension(viewWidth, viewHeight);\n\t}\n\n\t/**\n\t * Determines whether the point x, y will add a new point to the current\n\t * pattern (in addition to finding the cell, also makes heuristic choices\n\t * such as filling in gaps based on current pattern).\n\t * \n\t * @param x\n\t *            The x coordinate.\n\t * @param y\n\t *            The y coordinate.\n\t */\n\tprivate Cell detectAndAddHit(float x, float y) {\n\t\tfinal Cell cell = checkForNewHit(x, y);\n\t\tif (cell != null) {\n\n\t\t\t// check for gaps in existing pattern\n\t\t\tCell fillInGapCell = null;\n\t\t\tfinal ArrayList<Cell> pattern = mPattern;\n\t\t\tif (!pattern.isEmpty()) {\n\t\t\t\tfinal Cell lastCell = pattern.get(pattern.size() - 1);\n\t\t\t\tint dRow = cell.row - lastCell.row;\n\t\t\t\tint dColumn = cell.column - lastCell.column;\n\n\t\t\t\tint fillInRow = lastCell.row;\n\t\t\t\tint fillInColumn = lastCell.column;\n\n\t\t\t\tif (Math.abs(dRow) == 2 && Math.abs(dColumn) != 1) {\n\t\t\t\t\tfillInRow = lastCell.row + ((dRow > 0) ? 1 : -1);\n\t\t\t\t}\n\n\t\t\t\tif (Math.abs(dColumn) == 2 && Math.abs(dRow) != 1) {\n\t\t\t\t\tfillInColumn = lastCell.column + ((dColumn > 0) ? 1 : -1);\n\t\t\t\t}\n\n\t\t\t\tfillInGapCell = Cell.of(fillInRow, fillInColumn);\n\t\t\t}\n\n\t\t\tif (fillInGapCell != null\n\t\t\t\t\t&& !mPatternDrawLookup[fillInGapCell.row][fillInGapCell.column]) {\n\t\t\t\taddCellToPattern(fillInGapCell);\n\t\t\t}\n\t\t\taddCellToPattern(cell);\n//\t\t\tif (mEnableHapticFeedback) {\n//\t\t\t\tperformHapticFeedback(\n//\t\t\t\t\t\tHapticFeedbackConstants.VIRTUAL_KEY,\n//\t\t\t\t\t\tHapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING\n//\t\t\t\t\t\t\t\t| HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING);\n//\t\t\t}\n\t\t\treturn cell;\n\t\t}\n\t\treturn null;\n\t}\n\n\tprivate void addCellToPattern(Cell newCell) {\n\t\tmPatternDrawLookup[newCell.getRow()][newCell.getColumn()] = true;\n\t\tmPattern.add(newCell);\n\t\tnotifyCellAdded();\n\t}\n\n\t// helper method to find which cell a point maps to\n\tprivate Cell checkForNewHit(float x, float y) {\n\n\t\tfinal int rowHit = getRowHit(y);\n\t\tif (rowHit < 0) {\n\t\t\treturn null;\n\t\t}\n\t\tfinal int columnHit = getColumnHit(x);\n\t\tif (columnHit < 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (mPatternDrawLookup[rowHit][columnHit]) {\n\t\t\treturn null;\n\t\t}\n\t\treturn Cell.of(rowHit, columnHit);\n\t}\n\n\t/**\n\t * Helper method to find the row that y falls into.\n\t * \n\t * @param y\n\t *            The y coordinate\n\t * @return The row that y falls in, or -1 if it falls in no row.\n\t */\n\tprivate int getRowHit(float y) {\n\n\t\tfinal float squareHeight = mSquareHeight;\n\t\tfloat hitSize = squareHeight * mHitFactor;\n\n\t\tfloat offset = getPaddingTop() + (squareHeight - hitSize) / 2f;\n\t\tfor (int i = 0; i < 3; i++) {\n\n\t\t\tfinal float hitTop = offset + squareHeight * i;\n\t\t\tif (y >= hitTop && y <= hitTop + hitSize) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}\n\n\t/**\n\t * Helper method to find the column x fallis into.\n\t * \n\t * @param x\n\t *            The x coordinate.\n\t * @return The column that x falls in, or -1 if it falls in no column.\n\t */\n\tprivate int getColumnHit(float x) {\n\t\tfinal float squareWidth = mSquareWidth;\n\t\tfloat hitSize = squareWidth * mHitFactor;\n\n\t\tfloat offset = getPaddingLeft() + (squareWidth - hitSize) / 2f;\n\t\tfor (int i = 0; i < 3; i++) {\n\n\t\t\tfinal float hitLeft = offset + squareWidth * i;\n\t\t\tif (x >= hitLeft && x <= hitLeft + hitSize) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}\n\n\t@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tif (!mInputEnabled || !isEnabled()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tswitch (event.getAction()) {\n\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\thandleActionDown(event);\n\t\t\treturn true;\n\t\tcase MotionEvent.ACTION_UP:\n\t\t\thandleActionUp(event);\n\t\t\treturn true;\n\t\tcase MotionEvent.ACTION_MOVE:\n\t\t\thandleActionMove(event);\n\t\t\treturn true;\n\t\tcase MotionEvent.ACTION_CANCEL:\n\t\t\tresetPattern();\n\t\t\tmPatternInProgress = false;\n\t\t\tnotifyPatternCleared();\n\t\t\tif (PROFILE_DRAWING) {\n\t\t\t\tif (mDrawingProfilingStarted) {\n\t\t\t\t\tDebug.stopMethodTracing();\n\t\t\t\t\tmDrawingProfilingStarted = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate void handleActionMove(MotionEvent event) {\n\t\t// Handle all recent motion events so we don't skip any cells even when\n\t\t// the device\n\t\t// is busy...\n\t\tfinal int historySize = event.getHistorySize();\n\t\tfor (int i = 0; i < historySize + 1; i++) {\n\t\t\tfinal float x = i < historySize ? event.getHistoricalX(i) : event\n\t\t\t\t\t.getX();\n\t\t\tfinal float y = i < historySize ? event.getHistoricalY(i) : event\n\t\t\t\t\t.getY();\n\t\t\tfinal int patternSizePreHitDetect = mPattern.size();\n\t\t\tCell hitCell = detectAndAddHit(x, y);\n\t\t\tfinal int patternSize = mPattern.size();\n\t\t\tif (hitCell != null && patternSize == 1) {\n\t\t\t\tmPatternInProgress = true;\n\t\t\t\tnotifyPatternStarted();\n\t\t\t}\n\t\t\t// note current x and y for rubber banding of in progress patterns\n\t\t\tfinal float dx = Math.abs(x - mInProgressX);\n\t\t\tfinal float dy = Math.abs(y - mInProgressY);\n\t\t\tif (dx + dy > mSquareWidth * 0.01f) {\n\t\t\t\tfloat oldX = mInProgressX;\n\t\t\t\tfloat oldY = mInProgressY;\n\n\t\t\t\tmInProgressX = x;\n\t\t\t\tmInProgressY = y;\n\n\t\t\t\tif (mPatternInProgress && patternSize > 0) {\n\t\t\t\t\tfinal ArrayList<Cell> pattern = mPattern;\n\t\t\t\t\tfinal float radius = mSquareWidth * mDiameterFactor * 0.5f;\n\n\t\t\t\t\tfinal Cell lastCell = pattern.get(patternSize - 1);\n\n\t\t\t\t\tfloat startX = getCenterXForColumn(lastCell.column);\n\t\t\t\t\tfloat startY = getCenterYForRow(lastCell.row);\n\n\t\t\t\t\tfloat left;\n\t\t\t\t\tfloat top;\n\t\t\t\t\tfloat right;\n\t\t\t\t\tfloat bottom;\n\n\t\t\t\t\tfinal Rect invalidateRect = mInvalidate;\n\n\t\t\t\t\tif (startX < x) {\n\t\t\t\t\t\tleft = startX;\n\t\t\t\t\t\tright = x;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tleft = x;\n\t\t\t\t\t\tright = startX;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (startY < y) {\n\t\t\t\t\t\ttop = startY;\n\t\t\t\t\t\tbottom = y;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttop = y;\n\t\t\t\t\t\tbottom = startY;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Invalidate between the pattern's last cell and the\n\t\t\t\t\t// current location\n\t\t\t\t\tinvalidateRect.set((int) (left - radius),\n\t\t\t\t\t\t\t(int) (top - radius), (int) (right + radius),\n\t\t\t\t\t\t\t(int) (bottom + radius));\n\n\t\t\t\t\tif (startX < oldX) {\n\t\t\t\t\t\tleft = startX;\n\t\t\t\t\t\tright = oldX;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tleft = oldX;\n\t\t\t\t\t\tright = startX;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (startY < oldY) {\n\t\t\t\t\t\ttop = startY;\n\t\t\t\t\t\tbottom = oldY;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttop = oldY;\n\t\t\t\t\t\tbottom = startY;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Invalidate between the pattern's last cell and the\n\t\t\t\t\t// previous location\n\t\t\t\t\tinvalidateRect.union((int) (left - radius),\n\t\t\t\t\t\t\t(int) (top - radius), (int) (right + radius),\n\t\t\t\t\t\t\t(int) (bottom + radius));\n\n\t\t\t\t\t// Invalidate between the pattern's new cell and the\n\t\t\t\t\t// pattern's previous cell\n\t\t\t\t\tif (hitCell != null) {\n\t\t\t\t\t\tstartX = getCenterXForColumn(hitCell.column);\n\t\t\t\t\t\tstartY = getCenterYForRow(hitCell.row);\n\n\t\t\t\t\t\tif (patternSize >= 2) {\n\t\t\t\t\t\t\t// (re-using hitcell for old cell)\n\t\t\t\t\t\t\thitCell = pattern.get(patternSize - 1\n\t\t\t\t\t\t\t\t\t- (patternSize - patternSizePreHitDetect));\n\t\t\t\t\t\t\toldX = getCenterXForColumn(hitCell.column);\n\t\t\t\t\t\t\toldY = getCenterYForRow(hitCell.row);\n\n\t\t\t\t\t\t\tif (startX < oldX) {\n\t\t\t\t\t\t\t\tleft = startX;\n\t\t\t\t\t\t\t\tright = oldX;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tleft = oldX;\n\t\t\t\t\t\t\t\tright = startX;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (startY < oldY) {\n\t\t\t\t\t\t\t\ttop = startY;\n\t\t\t\t\t\t\t\tbottom = oldY;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttop = oldY;\n\t\t\t\t\t\t\t\tbottom = startY;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tleft = right = startX;\n\t\t\t\t\t\t\ttop = bottom = startY;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfinal float widthOffset = mSquareWidth / 2f;\n\t\t\t\t\t\tfinal float heightOffset = mSquareHeight / 2f;\n\n\t\t\t\t\t\tinvalidateRect.set((int) (left - widthOffset),\n\t\t\t\t\t\t\t\t(int) (top - heightOffset),\n\t\t\t\t\t\t\t\t(int) (right + widthOffset),\n\t\t\t\t\t\t\t\t(int) (bottom + heightOffset));\n\t\t\t\t\t}\n\n\t\t\t\t\tinvalidate(invalidateRect);\n\t\t\t\t} else {\n\t\t\t\t\tinvalidate();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate void sendAccessEvent(int resId) {\n\t\tsetContentDescription(getContext().getString(resId));\n\t\tsendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);\n\t\tsetContentDescription(null);\n\t}\n\n\tprivate void handleActionUp(MotionEvent event) {\n\t\t// report pattern detected\n\t\tif (!mPattern.isEmpty()) {\n\t\t\tmPatternInProgress = false;\n\t\t\tnotifyPatternDetected();\n\t\t\tinvalidate();\n\t\t}\n\t\tif (PROFILE_DRAWING) {\n\t\t\tif (mDrawingProfilingStarted) {\n\t\t\t\tDebug.stopMethodTracing();\n\t\t\t\tmDrawingProfilingStarted = false;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate void handleActionDown(MotionEvent event) {\n\t\tresetPattern();\n\t\tfinal float x = event.getX();\n\t\tfinal float y = event.getY();\n\t\tfinal Cell hitCell = detectAndAddHit(x, y);\n\t\tif (hitCell != null) {\n\t\t\tmPatternInProgress = true;\n\t\t\tmPatternDisplayMode = DisplayMode.Correct;\n\t\t\tnotifyPatternStarted();\n\t\t} else {\n\t\t\tmPatternInProgress = false;\n\t\t\tnotifyPatternCleared();\n\t\t}\n\t\tif (hitCell != null) {\n\t\t\tfinal float startX = getCenterXForColumn(hitCell.column);\n\t\t\tfinal float startY = getCenterYForRow(hitCell.row);\n\n\t\t\tfinal float widthOffset = mSquareWidth / 2f;\n\t\t\tfinal float heightOffset = mSquareHeight / 2f;\n\n\t\t\tinvalidate((int) (startX - widthOffset),\n\t\t\t\t\t(int) (startY - heightOffset),\n\t\t\t\t\t(int) (startX + widthOffset), (int) (startY + heightOffset));\n\t\t}\n\t\tmInProgressX = x;\n\t\tmInProgressY = y;\n\t\tif (PROFILE_DRAWING) {\n\t\t\tif (!mDrawingProfilingStarted) {\n\t\t\t\tDebug.startMethodTracing(\"LockPatternDrawing\");\n\t\t\t\tmDrawingProfilingStarted = true;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate float getCenterXForColumn(int column) {\n\t\treturn getPaddingLeft() + column * mSquareWidth + mSquareWidth / 2f;\n\t}\n\n\tprivate float getCenterYForRow(int row) {\n\t\treturn getPaddingTop() + row * mSquareHeight + mSquareHeight / 2f;\n\t}\n\n\t@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tfinal ArrayList<Cell> pattern = mPattern;\n\t\tfinal int count = pattern.size();\n\t\tfinal boolean[][] drawLookup = mPatternDrawLookup;\n\n\t\tif (mPatternDisplayMode == DisplayMode.Animate) {\n\n\t\t\t// figure out which circles to draw\n\n\t\t\t// + 1 so we pause on complete pattern\n\t\t\tfinal int oneCycle = (count + 1) * MILLIS_PER_CIRCLE_ANIMATING;\n\t\t\tfinal int spotInCycle = (int) (SystemClock.elapsedRealtime() - mAnimatingPeriodStart)\n\t\t\t\t\t% oneCycle;\n\t\t\tfinal int numCircles = spotInCycle / MILLIS_PER_CIRCLE_ANIMATING;\n\n\t\t\tclearPatternDrawLookup();\n\t\t\tfor (int i = 0; i < numCircles; i++) {\n\t\t\t\tfinal Cell cell = pattern.get(i);\n\t\t\t\tdrawLookup[cell.getRow()][cell.getColumn()] = true;\n\t\t\t}\n\n\t\t\t// figure out in progress portion of ghosting line\n\n\t\t\tfinal boolean needToUpdateInProgressPoint = numCircles > 0\n\t\t\t\t\t&& numCircles < count;\n\n\t\t\tif (needToUpdateInProgressPoint) {\n\t\t\t\tfinal float percentageOfNextCircle = ((float) (spotInCycle % MILLIS_PER_CIRCLE_ANIMATING))\n\t\t\t\t\t\t/ MILLIS_PER_CIRCLE_ANIMATING;\n\n\t\t\t\tfinal Cell currentCell = pattern.get(numCircles - 1);\n\t\t\t\tfinal float centerX = getCenterXForColumn(currentCell.column);\n\t\t\t\tfinal float centerY = getCenterYForRow(currentCell.row);\n\n\t\t\t\tfinal Cell nextCell = pattern.get(numCircles);\n\t\t\t\tfinal float dx = percentageOfNextCircle\n\t\t\t\t\t\t* (getCenterXForColumn(nextCell.column) - centerX);\n\t\t\t\tfinal float dy = percentageOfNextCircle\n\t\t\t\t\t\t* (getCenterYForRow(nextCell.row) - centerY);\n\t\t\t\tmInProgressX = centerX + dx;\n\t\t\t\tmInProgressY = centerY + dy;\n\t\t\t}\n\t\t\t// TODO: Infinite loop here...\n\t\t\tinvalidate();\n\t\t}\n\n\t\tfinal float squareWidth = mSquareWidth;\n\t\tfinal float squareHeight = mSquareHeight;\n\n\t\tfloat radius = (squareWidth * mDiameterFactor * 0.5f);\n\t\tmPathPaint.setStrokeWidth(radius);\n\n\t\tfinal Path currentPath = mCurrentPath;\n\t\tcurrentPath.rewind();\n\n\t\t// TODO: the path should be created and cached every time we hit-detect\n\t\t// a cell\n\t\t// only the last segment of the path should be computed here\n\t\t// draw the path of the pattern (unless the user is in progress, and\n\t\t// we are in stealth mode)\n\t\tfinal boolean drawPath = (!mInStealthMode || mPatternDisplayMode == DisplayMode.Wrong);\n\n\t\t// draw the arrows associated with the path (unless the user is in\n\t\t// progress, and\n\t\t// we are in stealth mode)\n\t\tboolean oldFlag = (mPaint.getFlags() & Paint.FILTER_BITMAP_FLAG) != 0;\n\t\tmPaint.setFilterBitmap(true); // draw with higher quality since we\n\t\t\t\t\t\t\t\t\t\t// render with transforms\n\t\t// draw the lines\n\t\tif (drawPath) {\n\t\t\tboolean anyCircles = false;\n\t\t\tfor (int i = 0; i < count; i++) {\n\t\t\t\tCell cell = pattern.get(i);\n\n\t\t\t\t// only draw the part of the pattern stored in\n\t\t\t\t// the lookup table (this is only different in the case\n\t\t\t\t// of animation).\n\t\t\t\tif (!drawLookup[cell.row][cell.column]) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tanyCircles = true;\n\n\t\t\t\tfloat centerX = getCenterXForColumn(cell.column);\n\t\t\t\tfloat centerY = getCenterYForRow(cell.row);\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tcurrentPath.moveTo(centerX, centerY);\n\t\t\t\t} else {\n\t\t\t\t\tcurrentPath.lineTo(centerX, centerY);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// add last in progress section\n\t\t\tif ((mPatternInProgress || mPatternDisplayMode == DisplayMode.Animate)\n\t\t\t\t\t&& anyCircles) {\n\t\t\t\tcurrentPath.lineTo(mInProgressX, mInProgressY);\n\t\t\t}\n\t\t\t// chang the line color in different DisplayMode\n\t\t\tif (mPatternDisplayMode == DisplayMode.Wrong)\n\t\t\t\tmPathPaint.setColor(Color.RED);\n\t\t\telse\n\t\t\t\tmPathPaint.setColor(Color.YELLOW);\n\t\t\tcanvas.drawPath(currentPath, mPathPaint);\n\t\t}\n\n\t\t// draw the circles\n\t\tfinal int paddingTop = getPaddingTop();\n\t\tfinal int paddingLeft = getPaddingLeft();\n\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tfloat topY = paddingTop + i * squareHeight;\n\t\t\t// float centerY = mPaddingTop + i * mSquareHeight + (mSquareHeight\n\t\t\t// / 2);\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tfloat leftX = paddingLeft + j * squareWidth;\n\t\t\t\tdrawCircle(canvas, (int) leftX, (int) topY, drawLookup[i][j]);\n\t\t\t}\n\t\t}\n\n\t\tmPaint.setFilterBitmap(oldFlag); // restore default flag\n\t}\n\n\t/**\n\t * @param canvas\n\t * @param leftX\n\t * @param topY\n\t * @param partOfPattern\n\t *            Whether this circle is part of the pattern.\n\t */\n\tprivate void drawCircle(Canvas canvas, int leftX, int topY,\n\t\t\tboolean partOfPattern) {\n\t\tBitmap outerCircle;\n\t\tBitmap innerCircle = null;\n\n\t\tif (!partOfPattern\n\t\t\t\t|| (mInStealthMode && mPatternDisplayMode != DisplayMode.Wrong)) {\n\t\t\t// unselected circle\n\t\t\touterCircle = mBitmapCircleDefault;\n\t\t\tinnerCircle = null;\n\t\t} else if (mPatternInProgress) {\n\t\t\t// user is in middle of drawing a pattern\n\t\t\touterCircle = mBitmapCircleDefault;\n\t\t\tinnerCircle = mBitmapCircleGreen;\n\t\t} else if (mPatternDisplayMode == DisplayMode.Wrong) {\n\t\t\t// the pattern is wrong\n\t\t\touterCircle = mBitmapCircleDefault;\n\t\t\tinnerCircle = mBitmapCircleRed;\n\t\t} else if (mPatternDisplayMode == DisplayMode.Correct\n\t\t\t\t|| mPatternDisplayMode == DisplayMode.Animate) {\n\t\t\t// the pattern is correct\n\t\t\touterCircle = mBitmapCircleDefault;\n\t\t\tinnerCircle = mBitmapCircleGreen;\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"unknown display mode \"\n\t\t\t\t\t+ mPatternDisplayMode);\n\t\t}\n\n\t\tfinal int width = mBitmapWidth;\n\t\tfinal int height = mBitmapHeight;\n\n\t\tfinal float squareWidth = mSquareWidth;\n\t\tfinal float squareHeight = mSquareHeight;\n\n\t\tint offsetX = (int) ((squareWidth - width) / 2f);\n\t\tint offsetY = (int) ((squareHeight - height) / 2f);\n\n\t\t// Allow circles to shrink if the view is too small to hold them.\n\t\tfloat sx = Math.min(mSquareWidth / mBitmapWidth, 1.0f);\n\t\tfloat sy = Math.min(mSquareHeight / mBitmapHeight, 1.0f);\n\n\t\tmCircleMatrix.setTranslate(leftX + offsetX, topY + offsetY);\n\t\tmCircleMatrix.preTranslate(mBitmapWidth / 2, mBitmapHeight / 2);\n\t\tmCircleMatrix.preScale(sx, sy);\n\t\tmCircleMatrix.preTranslate(-mBitmapWidth / 2, -mBitmapHeight / 2);\n\n\t\tcanvas.drawBitmap(outerCircle, mCircleMatrix, mPaint);\n\t\tif (innerCircle != null)\n\t\t\tcanvas.drawBitmap(innerCircle, mCircleMatrix, mPaint);\n\t}\n\n\t@Override\n\tprotected Parcelable onSaveInstanceState() {\n\t\tParcelable superState = super.onSaveInstanceState();\n\t\treturn new SavedState(superState,\n\t\t\t\tLockPatternUtils.patternToString(mPattern),\n\t\t\t\tmPatternDisplayMode.ordinal(), mInputEnabled, mInStealthMode,\n\t\t\t\tmEnableHapticFeedback);\n\t}\n\n\t@Override\n\tprotected void onRestoreInstanceState(Parcelable state) {\n\t\tfinal SavedState ss = (SavedState) state;\n\t\tsuper.onRestoreInstanceState(ss.getSuperState());\n\t\tsetPattern(DisplayMode.Correct,\n\t\t\t\tLockPatternUtils.stringToPattern(ss.getSerializedPattern()));\n\t\tmPatternDisplayMode = DisplayMode.values()[ss.getDisplayMode()];\n\t\tmInputEnabled = ss.isInputEnabled();\n\t\tmInStealthMode = ss.isInStealthMode();\n\t\tmEnableHapticFeedback = ss.isTactileFeedbackEnabled();\n\t}\n\n\t/**\n\t * The parecelable for saving and restoring a lock pattern view.\n\t */\n\tprivate static class SavedState extends BaseSavedState {\n\n\t\tprivate final String mSerializedPattern;\n\t\tprivate final int mDisplayMode;\n\t\tprivate final boolean mInputEnabled;\n\t\tprivate final boolean mInStealthMode;\n\t\tprivate final boolean mTactileFeedbackEnabled;\n\n\t\t/**\n\t\t * Constructor called from {@link LockPatternView#onSaveInstanceState()}\n\t\t */\n\t\tprivate SavedState(Parcelable superState, String serializedPattern,\n\t\t\t\tint displayMode, boolean inputEnabled, boolean inStealthMode,\n\t\t\t\tboolean tactileFeedbackEnabled) {\n\t\t\tsuper(superState);\n\t\t\tmSerializedPattern = serializedPattern;\n\t\t\tmDisplayMode = displayMode;\n\t\t\tmInputEnabled = inputEnabled;\n\t\t\tmInStealthMode = inStealthMode;\n\t\t\tmTactileFeedbackEnabled = tactileFeedbackEnabled;\n\t\t}\n\n\t\t/**\n\t\t * Constructor called from {@link #CREATOR}\n\t\t */\n\t\tprivate SavedState(Parcel in) {\n\t\t\tsuper(in);\n\t\t\tmSerializedPattern = in.readString();\n\t\t\tmDisplayMode = in.readInt();\n\t\t\tmInputEnabled = (Boolean) in.readValue(null);\n\t\t\tmInStealthMode = (Boolean) in.readValue(null);\n\t\t\tmTactileFeedbackEnabled = (Boolean) in.readValue(null);\n\t\t}\n\n\t\tpublic String getSerializedPattern() {\n\t\t\treturn mSerializedPattern;\n\t\t}\n\n\t\tpublic int getDisplayMode() {\n\t\t\treturn mDisplayMode;\n\t\t}\n\n\t\tpublic boolean isInputEnabled() {\n\t\t\treturn mInputEnabled;\n\t\t}\n\n\t\tpublic boolean isInStealthMode() {\n\t\t\treturn mInStealthMode;\n\t\t}\n\n\t\tpublic boolean isTactileFeedbackEnabled() {\n\t\t\treturn mTactileFeedbackEnabled;\n\t\t}\n\n\t\t@Override\n\t\tpublic void writeToParcel(Parcel dest, int flags) {\n\t\t\tsuper.writeToParcel(dest, flags);\n\t\t\tdest.writeString(mSerializedPattern);\n\t\t\tdest.writeInt(mDisplayMode);\n\t\t\tdest.writeValue(mInputEnabled);\n\t\t\tdest.writeValue(mInStealthMode);\n\t\t\tdest.writeValue(mTactileFeedbackEnabled);\n\t\t}\n\n\t\tpublic static final Parcelable.Creator<SavedState> CREATOR = new Creator<SavedState>() {\n\t\t\tpublic SavedState createFromParcel(Parcel in) {\n\t\t\t\treturn new SavedState(in);\n\t\t\t}\n\n\t\t\tpublic SavedState[] newArray(int size) {\n\t\t\t\treturn new SavedState[size];\n\t\t\t}\n\t\t};\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/pattern/ParseXmlService.java",
    "content": "package com.cwp.pattern;\n\nimport java.io.InputStream;\nimport java.util.HashMap;\n\nimport javax.xml.parsers.DocumentBuilder;\nimport javax.xml.parsers.DocumentBuilderFactory;\n\nimport org.w3c.dom.Document;\nimport org.w3c.dom.Element;\nimport org.w3c.dom.Node;\nimport org.w3c.dom.NodeList;\n\n/**\n * @author coolszy\n * @date 2012-4-26\n * @blog http://blog.92coding.com\n */\npublic class ParseXmlService {\n\tpublic HashMap<String, String> parseXml(InputStream inStream)\n\t\t\tthrows Exception {\n\t\tHashMap<String, String> hashMap = new HashMap<String, String>();\n\n\t\t// 实例化一个文档构建器工厂\n\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t// 通过文档构建器工厂获取一个文档构建器\n\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t// 通过文档通过文档构建器构建一个文档实例\n\t\tDocument document = builder.parse(inStream);\n\t\t// 获取XML文件根节点\n\t\tElement root = document.getDocumentElement();\n\t\t// 获得所有子节点\n\t\tNodeList childNodes = root.getChildNodes();\n\t\tfor (int j = 0; j < childNodes.getLength(); j++) {\n\t\t\t// 遍历子节点\n\t\t\tNode childNode = (Node) childNodes.item(j);\n\t\t\tif (childNode.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\tElement childElement = (Element) childNode;\n\t\t\t\t// 版本号\n\t\t\t\tif (\"version\".equals(childElement.getNodeName())) {\n\t\t\t\t\thashMap.put(\"version\", childElement.getFirstChild()\n\t\t\t\t\t\t\t.getNodeValue());\n\t\t\t\t}\n\t\t\t\t// 软件名称\n\t\t\t\telse if ((\"name\".equals(childElement.getNodeName()))) {\n\t\t\t\t\thashMap.put(\"name\", childElement.getFirstChild()\n\t\t\t\t\t\t\t.getNodeValue());\n\t\t\t\t}\n\t\t\t\t// 下载地址\n\t\t\t\telse if ((\"url\".equals(childElement.getNodeName()))) {\n\t\t\t\t\thashMap.put(\"url\", childElement.getFirstChild()\n\t\t\t\t\t\t\t.getNodeValue());\n\t\t\t\t}\n\t\t\t\t// 更新内容\n\t\t\t\telse if ((\"text\".equals(childElement.getNodeName()))) {\n\t\t\t\t\thashMap.put(\"text\", childElement.getFirstChild()\n\t\t\t\t\t\t\t.getNodeValue());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn hashMap;\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/pattern/UnlockGesturePasswordActivity.java",
    "content": "package com.cwp.pattern;\n\nimport java.util.List;\n\nimport com.cwp.chart.SystemBarTintManager;\nimport com.cwp.cmoneycharge.About;\nimport com.cwp.cmoneycharge.CrashApplication;\nimport com.cwp.cmoneycharge.Description;\nimport com.cwp.cmoneycharge.DialogShowUtil;\nimport com.cwp.cmoneycharge.R;\nimport com.cwp.cmoneycharge.SysApplication;\nimport com.cwp.pattern.LockPatternView.Cell;\n\nimport android.annotation.TargetApi;\nimport android.app.Activity;\nimport android.content.ContextWrapper;\nimport android.content.Intent;\nimport android.content.SharedPreferences;\nimport android.graphics.Color;\nimport android.os.Build;\nimport android.os.Bundle;\nimport android.os.CountDownTimer;\nimport android.os.Handler;\nimport android.view.Gravity;\nimport android.view.KeyEvent;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.view.Window;\nimport android.view.WindowManager;\nimport android.view.animation.Animation;\nimport android.view.animation.AnimationUtils;\nimport android.widget.TextView;\nimport android.widget.Toast;\n\npublic class UnlockGesturePasswordActivity extends Activity {\n\tprivate LockPatternView mLockPatternView;\n\tprivate int mFailedPatternAttemptsSinceLastTimeout = 0;\n\tprivate CountDownTimer mCountdownTimer = null;\n\tprivate Handler mHandler = new Handler();\n\tprivate TextView mHeadTextView, mforgetTextView;\n\tprivate Animation mShakeAnim;\n\tString flag = null;\n\n\tprivate Toast mToast;\n\n\tprivate void showToast(CharSequence message) {\n\t\tif (null == mToast) {\n\t\t\tmToast = Toast.makeText(this, message, Toast.LENGTH_SHORT);\n\t\t\tmToast.setGravity(Gravity.CENTER, 0, 0);\n\t\t} else {\n\t\t\tmToast.setText(message);\n\t\t}\n\n\t\tmToast.show();\n\t}\n\n\t@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.gesturepassword_unlock);\n\n\t\tSystemBarTintManager mTintManager;\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n\t\t\tsetTranslucentStatus(true);\n\t\t}\n\t\tmTintManager = new SystemBarTintManager(this);\n\t\tmTintManager.setStatusBarTintEnabled(true);\n\t\tmTintManager.setStatusBarTintResource(R.color.statusbar_bg);\n\n\t\tSysApplication.getInstance().addActivity(this); // 在销毁队列中添加this\n\n\t\tmLockPatternView = (LockPatternView) this\n\t\t\t\t.findViewById(R.id.gesturepwd_unlock_lockview);\n\t\tmLockPatternView.setOnPatternListener(mChooseNewLockPatternListener);\n\t\tmLockPatternView.setTactileFeedbackEnabled(true);\n\t\tmHeadTextView = (TextView) findViewById(R.id.gesturepwd_unlock_text);\n\t\tmforgetTextView = (TextView) findViewById(R.id.gesturepwd_unlock_forget);\n\t\tmShakeAnim = AnimationUtils.loadAnimation(this, R.anim.shake_x);\n\n\t\tIntent intentr = getIntent();\n\t\tBundle bundle = intentr.getExtras();// 获取传入的数据，并使用Bundle记录\n\t\tif (bundle != null && bundle.containsKey(\"cwp.pwclear\")) { // 清除密码\n\t\t\tflag = \"clear\";\n\t\t\tmHeadTextView.setText(\"请绘制原密码\");\n\t\t\tmforgetTextView.setVisibility(View.GONE);\n\t\t}\n\t\tif (bundle != null && bundle.containsKey(\"cwp.md\")) { // 修改密码\n\t\t\tmHeadTextView.setText(\"请绘制原密码\");\n\t\t\tflag = \"md\";\n\t\t\tmforgetTextView.setVisibility(View.GONE);\n\t\t}\n\t\tif (bundle != null && bundle.containsKey(\"cwp.pwenable\")) { // 第一次开启\n\t\t\tflag = \"enable\";\n\t\t\tmforgetTextView.setVisibility(View.GONE);\n\n\t\t}\n\t}\n\n\t@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t\tif (!CrashApplication.getInstance().getLockPatternUtils()\n\t\t\t\t.savedPatternExists()) {\n\t\t\tIntent intent = new Intent(this, GuideGesturePasswordActivity.class);\n\t\t\tstartActivityForResult(intent, 1);\n\t\t}\n\t}\n\n\t@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\n\t\tif (requestCode == 1) {\n\t\t\tif (resultCode == 3) {\n\t\t\t\tthis.setResult(3);\n\t\t\t\tthis.finish();\n\t\t\t}\n\t\t}\n\t}\n\n\t@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tif (mCountdownTimer != null)\n\t\t\tmCountdownTimer.cancel();\n\t}\n\n\tprivate Runnable mClearPatternRunnable = new Runnable() {\n\t\tpublic void run() {\n\t\t\tmLockPatternView.clearPattern();\n\t\t}\n\t};\n\n\tprotected LockPatternView.OnPatternListener mChooseNewLockPatternListener = new LockPatternView.OnPatternListener() {\n\n\t\tpublic void onPatternStart() {\n\t\t\tmLockPatternView.removeCallbacks(mClearPatternRunnable);\n\t\t\tpatternInProgress();\n\t\t}\n\n\t\tpublic void onPatternCleared() {\n\t\t\tmLockPatternView.removeCallbacks(mClearPatternRunnable);\n\t\t}\n\n\t\tpublic void onPatternDetected(List<LockPatternView.Cell> pattern) {\n\t\t\tif (pattern == null)\n\t\t\t\treturn;\n\t\t\tif (CrashApplication.getInstance().getLockPatternUtils()\n\t\t\t\t\t.checkPattern(pattern)) {\n\t\t\t\tif (flag == \"clear\") {\n\t\t\t\t\tCrashApplication.getInstance().getLockPatternUtils()\n\t\t\t\t\t\t\t.clearLock();\n\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\tsetResult(2, intent);\n\t\t\t\t\tshowToast(\"清除成功\");\n\t\t\t\t\tfinish();// 结束当前的activity的生命周期\n\t\t\t\t} else if (flag == \"md\") {\n\t\t\t\t\tIntent intent = new Intent(\n\t\t\t\t\t\t\tUnlockGesturePasswordActivity.this,\n\t\t\t\t\t\t\tGuideGesturePasswordActivity.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\tshowToast(\"开始重置密码\");\n\t\t\t\t\tfinish();// 结束当前的activity的生命周期\n\t\t\t\t} else {\n\t\t\t\t\tmLockPatternView\n\t\t\t\t\t\t\t.setDisplayMode(LockPatternView.DisplayMode.Correct);\n\t\t\t\t\tCrashApplication myApplaction = (CrashApplication) getApplication();\n\t\t\t\t\tmyApplaction.isLocked = false;\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmLockPatternView\n\t\t\t\t\t\t.setDisplayMode(LockPatternView.DisplayMode.Wrong);\n\t\t\t\tif (pattern.size() >= LockPatternUtils.MIN_PATTERN_REGISTER_FAIL) {\n\t\t\t\t\tmFailedPatternAttemptsSinceLastTimeout++;\n\t\t\t\t\tint retry = LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT\n\t\t\t\t\t\t\t- mFailedPatternAttemptsSinceLastTimeout;\n\t\t\t\t\tif (retry >= 0) {\n\t\t\t\t\t\tif (retry == 0)\n\t\t\t\t\t\t\tshowToast(\"您已5次输错密码，60秒后再试\");\n\t\t\t\t\t\tmHeadTextView.setText(\"密码错误，还可以再输入\" + retry + \"次\");\n\t\t\t\t\t\tmHeadTextView.setTextColor(Color.RED);\n\t\t\t\t\t\tmHeadTextView.startAnimation(mShakeAnim);\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tshowToast(\"输入长度不够，请重试\");\n\t\t\t\t}\n\n\t\t\t\tif (mFailedPatternAttemptsSinceLastTimeout >= LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT) {\n\t\t\t\t\tmHandler.postDelayed(attemptLockout, 2000);\n\t\t\t\t} else {\n\t\t\t\t\tmLockPatternView.postDelayed(mClearPatternRunnable, 2000);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tprivate void patternInProgress() {\n\t\t}\n\n\t\t@Override\n\t\tpublic void onPatternCellAdded(List<Cell> pattern) {\n\t\t\t// TODO Auto-generated method stub\n\n\t\t}\n\t};\n\tRunnable attemptLockout = new Runnable() {\n\n\t\t@Override\n\t\tpublic void run() {\n\t\t\tmLockPatternView.clearPattern();\n\t\t\tmLockPatternView.setEnabled(false);\n\t\t\tmCountdownTimer = new CountDownTimer(\n\t\t\t\t\tLockPatternUtils.FAILED_ATTEMPT_TIMEOUT_MS + 1, 1000) {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onTick(long millisUntilFinished) {\n\t\t\t\t\tint secondsRemaining = (int) (millisUntilFinished / 1000) - 1;\n\t\t\t\t\tif (secondsRemaining > 0) {\n\t\t\t\t\t\tmHeadTextView.setText(secondsRemaining + \" 秒后重试\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmHeadTextView.setText(\"请绘制手势密码\");\n\t\t\t\t\t\tmHeadTextView.setTextColor(Color.WHITE);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onFinish() {\n\t\t\t\t\tmLockPatternView.setEnabled(true);\n\t\t\t\t\tmFailedPatternAttemptsSinceLastTimeout = 0;\n\t\t\t\t}\n\t\t\t}.start();\n\t\t}\n\t};\n\n\t@TargetApi(19)\n\tprivate void setTranslucentStatus(boolean on) {\n\t\tWindow win = getWindow();\n\t\tWindowManager.LayoutParams winParams = win.getAttributes();\n\t\tfinal int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;\n\t\tif (on) {\n\t\t\twinParams.flags |= bits;\n\t\t} else {\n\t\t\twinParams.flags &= ~bits;\n\t\t}\n\t\twin.setAttributes(winParams);\n\t}\n\n\tDialogShowUtil dialogShowUtil = new DialogShowUtil(this, this, null, null,\n\t\t\tnull);\n\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t\tif (keyCode == KeyEvent.KEYCODE_BACK) { // 监控/拦截/屏蔽返回键\n\t\t\tif ((flag == \"clear\") || (flag == \"md\") || (flag == \"enable\")) {\n\t\t\t\tfinish();\n\t\t\t} else {\n\t\t\t\tdialogShowUtil.dialogShow(\"shake\", \"quit\", \"\", \"\");\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onKeyDown(keyCode, event);\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/cwp/pattern/UpdateManager.java",
    "content": "package com.cwp.pattern;\n\nimport java.io.File;\nimport java.io.FileOutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.net.HttpURLConnection;\nimport java.net.MalformedURLException;\nimport java.net.URL;\nimport java.util.HashMap;\n\nimport com.cwp.cmoneycharge.R;\nimport com.zhy.view.RoundProgressBarWidthNumber;\n\nimport android.app.AlertDialog;\nimport android.app.Dialog;\nimport android.app.Notification;\nimport android.app.NotificationManager;\nimport android.app.PendingIntent;\nimport android.app.Service;\nimport android.app.AlertDialog.Builder;\nimport android.content.Context;\nimport android.content.DialogInterface;\nimport android.content.Intent;\nimport android.content.DialogInterface.OnClickListener;\nimport android.content.pm.PackageManager.NameNotFoundException;\nimport android.net.ConnectivityManager;\nimport android.net.NetworkInfo;\nimport android.net.Uri;\nimport android.os.Environment;\nimport android.os.Handler;\nimport android.os.IBinder;\nimport android.os.Message;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.widget.ProgressBar;\nimport android.widget.RemoteViews;\nimport android.widget.TextView;\nimport android.widget.Toast;\n\n/**\n * @author coolszy\n * @date 2012-4-26\n * @blog http://blog.92coding.com\n */\n\npublic class UpdateManager extends Service {\n\t/* 下载丿 */\n\tprivate static final int DOWNLOAD = 1;\n\tprivate static final int DOWNLOAD2 = 4;\n\t/* 下载结束 */\n\tprivate static final int DOWNLOAD_FINISH = 2;\n\tpublic static final int IS_FINISH = 0;\n\tpublic static final int DOWNLOAD_FILERR = 3;\n\t/* 保存解析的XML信息 */\n\tHashMap<String, String> mHashMap;\n\t/* 下载保存路径 */\n\tprivate String mSavePath;\n\t/* 记录进度条数釿 */\n\tprivate int progress;\n\t/* 是否取消更新 */\n\tprivate boolean cancelUpdate = false;\n\n\tprivate static final int down_step = 3;\n\n\tprivate Context mContext;\n\t/* 更新进度板 */\n\tprivate ProgressBar mProgress;\n\tprivate Dialog mDownloadDialog;\n\tpublic InputStream inputStream;\n\tprivate String show;\n\n\tprivate RemoteViews contentView;\n\tprivate NotificationManager notificationManager;\n\tprotected Notification notification;\n\tpublic int updateCount = 0;\n\tprivate TextView update_text;\n\n\tprivate RoundProgressBarWidthNumber mRoundProgressBar;\n\n\tprivate Handler mHandler = new Handler() {\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tswitch (msg.what) {\n\t\t\t// 正在下载\n\t\t\tcase DOWNLOAD:\n\t\t\t\tmRoundProgressBar.setProgress(progress);\n\t\t\t\t// 设置进度条位罿\n\t\t\t\tbreak;\n\t\t\tcase DOWNLOAD_FINISH:\n\t\t\t\t// 安装文件\n\t\t\t\tinstallApk();\n\t\t\t\tbreak;\n\t\t\tcase DOWNLOAD_FILERR:\n\t\t\t\t// 无下载文件\n\t\t\t\tToast.makeText(mContext, \"下载文件出错，请重新下载\", Toast.LENGTH_LONG)\n\t\t\t\t\t\t.show();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t};\n\t};\n\n\tpublic Handler handler = new Handler() {\n\t\t// 在Handler中获取消息，重写handleMessage()方法\n\t\t@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tswitch (msg.what) {\n\t\t\tcase 1:\n\t\t\t\t// 成功建立连接,但无更新\n\t\t\t\tif (show.equals(\"show\")) {\n\t\t\t\t\tToast.makeText(mContext, \"暂无更新\", Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t// 有更新\n\t\t\t\tshowNoticeDialog();\n\t\t\t\tbreak;\n\t\t\tcase -1:\n\t\t\t\t// 卡住\n\t\t\t\tif (show.equals(\"show\")) {\n\t\t\t\t\tToast.makeText(mContext, \"网络出了点状况\", Toast.LENGTH_LONG)\n\t\t\t\t\t\t\t.show();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tpublic UpdateManager(Context context) {\n\t\tthis.mContext = context;\n\t}\n\n\t/**\n\t * 棿?软件更新\n\t */\n\tpublic void checkUpdate(String show) {\n\t\tthis.show = show;\n\t\tif (isWifi(mContext)) {\n\t\t\tisUpdate();\n\t\t} else {\n\t\t\tif (show.equals(\"show\")) {\n\t\t\t\tToast.makeText(mContext, \"当前为非WIFI网络！\", Toast.LENGTH_LONG)\n\t\t\t\t\t\t.show();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * 棿?软件是否有更新版朿\n\t */\n\tpublic void isUpdate() {\n\t\t// 获取当前软件版本\n\t\t// 把version.xml放到网络上，然后获取文件信息\n\t\t// InputStream inStream = ParseXmlService.class.getClassLoader()\n\t\t// .getResourceAsStream(\"version.xml\");\n\t\tnew Thread() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tdouble versionCode = getVersionCode(mContext);\n\t\t\t\t\tURL url = new URL(\n\t\t\t\t\t\t\t\"http://linmp6-wordpress.stor.sinaapp.com/version.xml\");\n\t\t\t\t\t// 建立网络连接\n\t\t\t\t\tHttpURLConnection conn = (HttpURLConnection) url\n\t\t\t\t\t\t\t.openConnection();\n\t\t\t\t\tconn.setConnectTimeout(1 * 1000);\n\t\t\t\t\tconn.setReadTimeout(1 * 1000); // 必须设置\n\t\t\t\t\tinputStream = conn.getInputStream();\n\t\t\t\t\t// 获取图片数据\n\t\t\t\t\tParseXmlService service = new ParseXmlService();\n\t\t\t\t\t// 解析XML文件?由于XML文件比较小，因此使用DOM方式进行解析\n\t\t\t\t\tmHashMap = service.parseXml(inputStream);\n\t\t\t\t\tMessage message = new Message();\n\t\t\t\t\tmessage.what = 1;\n\t\t\t\t\tif (null != mHashMap) {\n\t\t\t\t\t\tDouble serviceCode = Double.valueOf(mHashMap\n\t\t\t\t\t\t\t\t.get(\"version\"));\n\t\t\t\t\t\t// 版本判断\n\t\t\t\t\t\tif ((serviceCode - versionCode) > 0) {\n\t\t\t\t\t\t\tmessage.what = 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tinputStream.close();\n\t\t\t\t\t// 发送消息到消息队列中\n\t\t\t\t\thandler.sendMessage(message);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tMessage message = new Message();\n\t\t\t\t\tmessage.what = -1;\n\t\t\t\t\thandler.sendMessage(message);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}.start();\n\t}\n\n\t/**\n\t * 获取软件版本叿\n\t * \n\t * @param context\n\t * @return\n\t */\n\tpublic double getVersionCode(Context context) {\n\t\tdouble versionCode = 0;\n\t\ttry {\n\t\t\t// 获取软件版本号，对应AndroidManifest.xml下android:versionCode\n\t\t\tversionCode = Double.valueOf(\n\t\t\t\t\tcontext.getPackageManager().getPackageInfo(\n\t\t\t\t\t\t\tcontext.getPackageName(), 0).versionName)\n\t\t\t\t\t.doubleValue();\n\t\t} catch (NameNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn versionCode;\n\t}\n\n\t/**\n\t * 显示软件更新对话桿\n\t */\n\tprivate void showNoticeDialog() {\n\t\t// 构??话桿\n\t\tAlertDialog.Builder builder = new Builder(mContext);\n\t\tbuilder.setTitle(\"软件更新\");\n\t\tbuilder.setMessage(\"检测到新版本\" + mHashMap.get(\"version\") + \"，立即更新吗?\\n\\n\"\n\t\t\t\t+ mHashMap.get(\"text\").replace(\"\\\\n\", \"\\n\"));\n\t\t// 更新\n\t\tbuilder.setPositiveButton(\"更新\", new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t\t// 显示下载对话桿\n\t\t\t\tshowDownloadDialog();\n\t\t\t}\n\t\t});\n\t\t// 稍后更新\n\t\tbuilder.setNegativeButton(\"稍后更新\", new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}\n\t\t});\n\t\tDialog noticeDialog = builder.create();\n\t\tnoticeDialog.show();\n\t}\n\n\t/**\n\t * 显示软件下载对话桿\n\t */\n\tprivate void showDownloadDialog() {\n\t\t// 构??件下载对话桿\n\t\tAlertDialog.Builder builder = new Builder(mContext);\n\t\tbuilder.setTitle(\"正在更新\");\n\t\t// 给下载对话框增加进度板\n\t\tfinal LayoutInflater inflater = LayoutInflater.from(mContext);\n\t\tView v = inflater.inflate(R.layout.softupdate_progress, null);\n\t\tmRoundProgressBar = (RoundProgressBarWidthNumber) v\n\t\t\t\t.findViewById(R.id.id_progress02);\n\t\t// mProgress = (ProgressBar) v.findViewById(R.id.update_progress);\n\t\t// update_text = (TextView) v.findViewById(R.id.update_text);\n\t\tbuilder.setView(v);\n\t\t// 取消更新\n\t\tbuilder.setNegativeButton(\"取消\", new OnClickListener() {\n\t\t\t@SuppressWarnings(\"deprecation\")\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t\t// 设置取消状濍\n\t\t\t\tcancelUpdate = true;\n\n\t\t\t\tnotification.flags = Notification.FLAG_AUTO_CANCEL;\n\t\t\t\tnotification.setLatestEventInfo(mContext, mHashMap.get(\"name\"),\n\t\t\t\t\t\t\"用户已取消下载\", null);\n\t\t\t\tnotificationManager.notify(R.layout.notification_item,\n\t\t\t\t\t\tnotification);\n\t\t\t}\n\t\t});\n\t\tmDownloadDialog = builder.create();\n\t\tmDownloadDialog.show();\n\t\t// 现在文件\n\t\tdownloadApk();\n\t}\n\n\t/**\n\t * 下载apk文件\n\t */\n\tprivate void downloadApk() {\n\t\t// 启动新线程下载软仿\n\t\tnew downloadApkThread().start();\n\t}\n\n\t/**\n\t * 下载文件线程\n\t * \n\t * @author coolszy\n\t * @date 2012-4-26\n\t * @blog http://blog.92coding.com\n\t */\n\tprivate class downloadApkThread extends Thread {\n\t\t@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\t\t\t\t// 判断SD卡是否存在，并且是否具有读写权限\n\t\t\t\tif (Environment.getExternalStorageState().equals(\n\t\t\t\t\t\tEnvironment.MEDIA_MOUNTED)) {\n\t\t\t\t\t// 获得存储卡的路径\n\t\t\t\t\tString sdpath = Environment.getExternalStorageDirectory()\n\t\t\t\t\t\t\t+ \"/\";\n\t\t\t\t\tmSavePath = sdpath + \"download\";\n\t\t\t\t\tURL url = new URL(mHashMap.get(\"url\"));\n\t\t\t\t\t// 创建连接\n\t\t\t\t\tHttpURLConnection conn = (HttpURLConnection) url\n\t\t\t\t\t\t\t.openConnection();\n\t\t\t\t\tconn.connect();\n\t\t\t\t\t// 获取文件大小\n\t\t\t\t\tint length = conn.getContentLength();\n\t\t\t\t\t// 创建输入浿\n\t\t\t\t\tif (length > -1) {\n\t\t\t\t\t\tcreateNotification();\n\t\t\t\t\t\tInputStream is = conn.getInputStream();\n\t\t\t\t\t\tFile file = new File(mSavePath);\n\t\t\t\t\t\t// 判断文件目录是否存在\n\t\t\t\t\t\tif (!file.exists()) {\n\t\t\t\t\t\t\tfile.mkdir();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tFile apkFile = new File(mSavePath, mHashMap.get(\"name\"));\n\t\t\t\t\t\tFileOutputStream fos = new FileOutputStream(apkFile);\n\t\t\t\t\t\tint count = 0;\n\t\t\t\t\t\t// 缓存\n\t\t\t\t\t\tbyte buf[] = new byte[1024];\n\t\t\t\t\t\t// 写入到文件中\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tint numread = is.read(buf);\n\t\t\t\t\t\t\tcount += numread;\n\t\t\t\t\t\t\tprogress = (int) (((float) count / length) * 100);\n\t\t\t\t\t\t\t// 更新进度\n\t\t\t\t\t\t\tmHandler.sendEmptyMessage(DOWNLOAD);\n\t\t\t\t\t\t\tif (numread <= 0) {\n\t\t\t\t\t\t\t\t// 下载完成\n\t\t\t\t\t\t\t\tmHandler.sendEmptyMessage(DOWNLOAD_FINISH);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// 写入文件\n\t\t\t\t\t\t\tfos.write(buf, 0, numread);\n\t\t\t\t\t\t} while (!cancelUpdate);// 点击取消就停止下轿\n\t\t\t\t\t\tfos.close();\n\t\t\t\t\t\tis.close();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmHandler.sendEmptyMessage(DOWNLOAD_FILERR);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t// 取消下载对话框显礿\n\t\t\tmDownloadDialog.dismiss();\n\t\t}\n\t};\n\n\t/**\n\t * make true current connect service is wifi\n\t * \n\t * @param mContext\n\t * @return\n\t */\n\tprivate static boolean isWifi(Context mContext) {\n\t\tConnectivityManager connectivityManager = (ConnectivityManager) mContext\n\t\t\t\t.getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\tNetworkInfo activeNetInfo = connectivityManager.getActiveNetworkInfo();\n\t\tif (activeNetInfo != null\n\t\t\t\t&& activeNetInfo.getType() == ConnectivityManager.TYPE_WIFI) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * 安装APK文件\n\t */\n\t@SuppressWarnings(\"deprecation\")\n\tprivate void installApk() {\n\t\tFile apkfile = new File(mSavePath, mHashMap.get(\"name\"));\n\t\tif (!apkfile.exists()) {\n\t\t\treturn;\n\t\t}\n\t\t// 通过Intent安装APK文件\n\t\tIntent i = new Intent(Intent.ACTION_VIEW);\n\t\ti.setDataAndType(Uri.parse(\"file://\" + apkfile.toString()),\n\t\t\t\t\"application/vnd.android.package-archive\");\n\t\tmContext.startActivity(i);\n\n\t\tPendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, i,\n\t\t\t\t0);\n\t\tnotification.flags = Notification.FLAG_AUTO_CANCEL;\n\t\tnotification.setLatestEventInfo(mContext, mHashMap.get(\"name\"), \"下载成功\",\n\t\t\t\tpendingIntent);\n\t\tnotificationManager.notify(R.layout.notification_item, notification);\n\t\t/*** stop service *****/\n\t\tstopSelf();\n\t}\n\n\t/**\n\t * 方法描述：createNotification方法\n\t * \n\t * @param\n\t * @return\n\t */\n\t@SuppressWarnings(\"deprecation\")\n\tpublic void createNotification() {\n\n\t\tString app_name = null;\n\t\t// notification = new Notification(R.drawable.dot_enable,app_name +\n\t\t// getString(R.string.is_downing) ,System.currentTimeMillis());\n\t\tnotification = new Notification(\n\t\t// R.drawable.video_player,//应用的图标\n\t\t\t\tR.drawable.ic_launcher,// 应用的图标\n\t\t\t\tmHashMap.get(\"name\") + \"正在下载\", System.currentTimeMillis());\n\t\tnotification.flags = Notification.FLAG_ONGOING_EVENT;\n\n\t\tcontentView = new RemoteViews(mContext.getPackageName(),\n\t\t\t\tR.layout.notification_item);\n\t\tcontentView.setTextViewText(R.id.notificationTitle,\n\t\t\t\tmHashMap.get(\"name\") + \"正在下载\");\n\t\tcontentView.setTextViewText(R.id.notificationPercent, \"下载中\");\n\t\tcontentView.setProgressBar(R.id.notificationProgress, 100, 0, false);\n\t\tnotification.contentView = contentView;\n\n\t\t// updateIntent = new Intent(this, AboutActivity.class);\n\t\t// updateIntent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);\n\t\t// //updateIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\t// pendingIntent = PendingIntent.getActivity(this, 0, updateIntent, 0);\n\t\t// notification.contentIntent = pendingIntent;\n\n\t\tnotificationManager = (NotificationManager) mContext\n\t\t\t\t.getSystemService(Context.NOTIFICATION_SERVICE);\n\t\tnotificationManager.notify(R.layout.notification_item, notification);\n\t}\n\n\t@Override\n\tpublic IBinder onBind(Intent intent) {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/example/testpic/AlbumHelper.java",
    "content": "package com.example.testpic;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Map.Entry;\n\nimport android.content.ContentResolver;\nimport android.content.Context;\nimport android.database.Cursor;\nimport android.provider.MediaStore.Audio.Albums;\nimport android.provider.MediaStore.Images.Media;\nimport android.provider.MediaStore.Images.Thumbnails;\nimport android.util.Log;\n\n/**\n * 专辑帮助类\n * \n * @author Administrator\n * \n */\npublic class AlbumHelper {\n\tfinal String TAG = getClass().getSimpleName();\n\tContext context;\n\tContentResolver cr;\n\n\t// 缩略图列表\n\tHashMap<String, String> thumbnailList = new HashMap<String, String>();\n\t// 专辑列表\n\tList<HashMap<String, String>> albumList = new ArrayList<HashMap<String, String>>();\n\tHashMap<String, ImageBucket> bucketList = new HashMap<String, ImageBucket>();\n\n\tprivate static AlbumHelper instance;\n\n\tprivate AlbumHelper() {\n\t}\n\n\tpublic static AlbumHelper getHelper() {\n\t\tif (instance == null) {\n\t\t\tinstance = new AlbumHelper();\n\t\t}\n\t\treturn instance;\n\t}\n\n\t/**\n\t * 初始化\n\t * \n\t * @param context\n\t */\n\tpublic void init(Context context) {\n\t\tif (this.context == null) {\n\t\t\tthis.context = context;\n\t\t\tcr = context.getContentResolver();\n\t\t}\n\t}\n\n\t/**\n\t * 得到缩略图\n\t */\n\tprivate void getThumbnail() {\n\t\tString[] projection = { Thumbnails._ID, Thumbnails.IMAGE_ID,\n\t\t\t\tThumbnails.DATA };\n\t\tCursor cursor = cr.query(Thumbnails.EXTERNAL_CONTENT_URI, projection,\n\t\t\t\tnull, null, null);\n\t\tgetThumbnailColumnData(cursor);\n\t}\n\n\t/**\n\t * 从数据库中得到缩略图\n\t * \n\t * @param cur\n\t */\n\tprivate void getThumbnailColumnData(Cursor cur) {\n\t\tif (cur.moveToFirst()) {\n\t\t\tint _id;\n\t\t\tint image_id;\n\t\t\tString image_path;\n\t\t\tint _idColumn = cur.getColumnIndex(Thumbnails._ID);\n\t\t\tint image_idColumn = cur.getColumnIndex(Thumbnails.IMAGE_ID);\n\t\t\tint dataColumn = cur.getColumnIndex(Thumbnails.DATA);\n\n\t\t\tdo {\n\t\t\t\t// Get the field values\n\t\t\t\t_id = cur.getInt(_idColumn);\n\t\t\t\timage_id = cur.getInt(image_idColumn);\n\t\t\t\timage_path = cur.getString(dataColumn);\n\n\t\t\t\t// Do something with the values.\n\t\t\t\t// Log.i(TAG, _id + \" image_id:\" + image_id + \" path:\"\n\t\t\t\t// + image_path + \"---\");\n\t\t\t\t// HashMap<String, String> hash = new HashMap<String, String>();\n\t\t\t\t// hash.put(\"image_id\", image_id + \"\");\n\t\t\t\t// hash.put(\"path\", image_path);\n\t\t\t\t// thumbnailList.add(hash);\n\t\t\t\tthumbnailList.put(\"\" + image_id, image_path);\n\t\t\t} while (cur.moveToNext());\n\t\t}\n\t}\n\n\t/**\n\t * 得到原图\n\t */\n\tvoid getAlbum() {\n\t\tString[] projection = { Albums._ID, Albums.ALBUM, Albums.ALBUM_ART,\n\t\t\t\tAlbums.ALBUM_KEY, Albums.ARTIST, Albums.NUMBER_OF_SONGS };\n\t\tCursor cursor = cr.query(Albums.EXTERNAL_CONTENT_URI, projection, null,\n\t\t\t\tnull, null);\n\t\tgetAlbumColumnData(cursor);\n\n\t}\n\n\t/**\n\t * 从本地数据库中得到原图\n\t * \n\t * @param cur\n\t */\n\tprivate void getAlbumColumnData(Cursor cur) {\n\t\tif (cur.moveToFirst()) {\n\t\t\tint _id;\n\t\t\tString album;\n\t\t\tString albumArt;\n\t\t\tString albumKey;\n\t\t\tString artist;\n\t\t\tint numOfSongs;\n\n\t\t\tint _idColumn = cur.getColumnIndex(Albums._ID);\n\t\t\tint albumColumn = cur.getColumnIndex(Albums.ALBUM);\n\t\t\tint albumArtColumn = cur.getColumnIndex(Albums.ALBUM_ART);\n\t\t\tint albumKeyColumn = cur.getColumnIndex(Albums.ALBUM_KEY);\n\t\t\tint artistColumn = cur.getColumnIndex(Albums.ARTIST);\n\t\t\tint numOfSongsColumn = cur.getColumnIndex(Albums.NUMBER_OF_SONGS);\n\n\t\t\tdo {\n\t\t\t\t// Get the field values\n\t\t\t\t_id = cur.getInt(_idColumn);\n\t\t\t\talbum = cur.getString(albumColumn);\n\t\t\t\talbumArt = cur.getString(albumArtColumn);\n\t\t\t\talbumKey = cur.getString(albumKeyColumn);\n\t\t\t\tartist = cur.getString(artistColumn);\n\t\t\t\tnumOfSongs = cur.getInt(numOfSongsColumn);\n\n\t\t\t\t// Do something with the values.\n\t\t\t\tLog.i(TAG, _id + \" album:\" + album + \" albumArt:\" + albumArt\n\t\t\t\t\t\t+ \"albumKey: \" + albumKey + \" artist: \" + artist\n\t\t\t\t\t\t+ \" numOfSongs: \" + numOfSongs + \"---\");\n\t\t\t\tHashMap<String, String> hash = new HashMap<String, String>();\n\t\t\t\thash.put(\"_id\", _id + \"\");\n\t\t\t\thash.put(\"album\", album);\n\t\t\t\thash.put(\"albumArt\", albumArt);\n\t\t\t\thash.put(\"albumKey\", albumKey);\n\t\t\t\thash.put(\"artist\", artist);\n\t\t\t\thash.put(\"numOfSongs\", numOfSongs + \"\");\n\t\t\t\talbumList.add(hash);\n\n\t\t\t} while (cur.moveToNext());\n\n\t\t}\n\t}\n\n\t/**\n\t * 是否创建了图片集\n\t */\n\tboolean hasBuildImagesBucketList = false;\n\n\t/**\n\t * 得到图片集\n\t */\n\tvoid buildImagesBucketList() {\n\t\tlong startTime = System.currentTimeMillis();\n\n\t\t// 构造缩略图索引\n\t\tgetThumbnail();\n\n\t\t// 构造相册索引\n\t\tString columns[] = new String[] { Media._ID, Media.BUCKET_ID,\n\t\t\t\tMedia.PICASA_ID, Media.DATA, Media.DISPLAY_NAME, Media.TITLE,\n\t\t\t\tMedia.SIZE, Media.BUCKET_DISPLAY_NAME };\n\t\t// 得到一个游标\n\t\tCursor cur = cr.query(Media.EXTERNAL_CONTENT_URI, columns, null, null,\n\t\t\t\tnull);\n\t\tif (cur.moveToFirst()) {\n\t\t\t// 获取指定列的索引\n\t\t\tint photoIDIndex = cur.getColumnIndexOrThrow(Media._ID);\n\t\t\tint photoPathIndex = cur.getColumnIndexOrThrow(Media.DATA);\n\t\t\tint photoNameIndex = cur.getColumnIndexOrThrow(Media.DISPLAY_NAME);\n\t\t\tint photoTitleIndex = cur.getColumnIndexOrThrow(Media.TITLE);\n\t\t\tint photoSizeIndex = cur.getColumnIndexOrThrow(Media.SIZE);\n\t\t\tint bucketDisplayNameIndex = cur\n\t\t\t\t\t.getColumnIndexOrThrow(Media.BUCKET_DISPLAY_NAME);\n\t\t\tint bucketIdIndex = cur.getColumnIndexOrThrow(Media.BUCKET_ID);\n\t\t\tint picasaIdIndex = cur.getColumnIndexOrThrow(Media.PICASA_ID);\n\t\t\t// 获取图片总数\n\t\t\tint totalNum = cur.getCount();\n\n\t\t\tdo {\n\t\t\t\tString _id = cur.getString(photoIDIndex);\n\t\t\t\tString name = cur.getString(photoNameIndex);\n\t\t\t\tString path = cur.getString(photoPathIndex);\n\t\t\t\tString title = cur.getString(photoTitleIndex);\n\t\t\t\tString size = cur.getString(photoSizeIndex);\n\t\t\t\tString bucketName = cur.getString(bucketDisplayNameIndex);\n\t\t\t\tString bucketId = cur.getString(bucketIdIndex);\n\t\t\t\tString picasaId = cur.getString(picasaIdIndex);\n\n\t\t\t\tLog.i(TAG, _id + \", bucketId: \" + bucketId + \", picasaId: \"\n\t\t\t\t\t\t+ picasaId + \" name:\" + name + \" path:\" + path\n\t\t\t\t\t\t+ \" title: \" + title + \" size: \" + size + \" bucket: \"\n\t\t\t\t\t\t+ bucketName + \"---\");\n\n\t\t\t\tImageBucket bucket = bucketList.get(bucketId);\n\t\t\t\tif (bucket == null) {\n\t\t\t\t\tbucket = new ImageBucket();\n\t\t\t\t\tbucketList.put(bucketId, bucket);\n\t\t\t\t\tbucket.imageList = new ArrayList<ImageItem>();\n\t\t\t\t\tbucket.bucketName = bucketName;\n\t\t\t\t}\n\t\t\t\tbucket.count++;\n\t\t\t\tImageItem imageItem = new ImageItem();\n\t\t\t\timageItem.imageId = _id;\n\t\t\t\timageItem.imagePath = path;\n\t\t\t\timageItem.thumbnailPath = thumbnailList.get(_id);\n\t\t\t\tbucket.imageList.add(imageItem);\n\n\t\t\t} while (cur.moveToNext());\n\t\t}\n\n\t\tIterator<Entry<String, ImageBucket>> itr = bucketList.entrySet()\n\t\t\t\t.iterator();\n\t\twhile (itr.hasNext()) {\n\t\t\tMap.Entry<String, ImageBucket> entry = (Map.Entry<String, ImageBucket>) itr\n\t\t\t\t\t.next();\n\t\t\tImageBucket bucket = entry.getValue();\n\t\t\tLog.d(TAG, entry.getKey() + \", \" + bucket.bucketName + \", \"\n\t\t\t\t\t+ bucket.count + \" ---------- \");\n\t\t\tfor (int i = 0; i < bucket.imageList.size(); ++i) {\n\t\t\t\tImageItem image = bucket.imageList.get(i);\n\t\t\t\tLog.d(TAG, \"----- \" + image.imageId + \", \" + image.imagePath\n\t\t\t\t\t\t+ \", \" + image.thumbnailPath);\n\t\t\t}\n\t\t}\n\t\thasBuildImagesBucketList = true;\n\t\tlong endTime = System.currentTimeMillis();\n\t\tLog.d(TAG, \"use time: \" + (endTime - startTime) + \" ms\");\n\t}\n\n\t/**\n\t * 得到图片集\n\t * \n\t * @param refresh\n\t * @return\n\t */\n\tpublic List<ImageBucket> getImagesBucketList(boolean refresh) {\n\t\tif (refresh || (!refresh && !hasBuildImagesBucketList)) {\n\t\t\tbuildImagesBucketList();\n\t\t}\n\t\tList<ImageBucket> tmpList = new ArrayList<ImageBucket>();\n\t\tIterator<Entry<String, ImageBucket>> itr = bucketList.entrySet()\n\t\t\t\t.iterator();\n\t\twhile (itr.hasNext()) {\n\t\t\tMap.Entry<String, ImageBucket> entry = (Map.Entry<String, ImageBucket>) itr\n\t\t\t\t\t.next();\n\t\t\ttmpList.add(entry.getValue());\n\t\t}\n\t\treturn tmpList;\n\t}\n\n\t/**\n\t * 得到原始图像路径\n\t * \n\t * @param image_id\n\t * @return\n\t */\n\tString getOriginalImagePath(String image_id) {\n\t\tString path = null;\n\t\tLog.i(TAG, \"---(^o^)----\" + image_id);\n\t\tString[] projection = { Media._ID, Media.DATA };\n\t\tCursor cursor = cr.query(Media.EXTERNAL_CONTENT_URI, projection,\n\t\t\t\tMedia._ID + \"=\" + image_id, null, null);\n\t\tif (cursor != null) {\n\t\t\tcursor.moveToFirst();\n\t\t\tpath = cursor.getString(cursor.getColumnIndex(Media.DATA));\n\n\t\t}\n\t\treturn path;\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/example/testpic/Bimp.java",
    "content": "package com.example.testpic;\n\nimport java.io.BufferedInputStream;\nimport java.io.File;\nimport java.io.FileInputStream;\nimport java.io.IOException;\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport com.cwp.cmoneycharge.AddPay;\n\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapFactory;\nimport android.os.Environment;\nimport android.widget.Toast;\n\npublic class Bimp {\n\tpublic static int max = 0;\n\tpublic static int flag = 0;\n\tpublic static int flag2 = 0;\n\tpublic static boolean act_bool = true;\n\tpublic static List<Bitmap> bmp = new ArrayList<Bitmap>();\n\n\t// 图片sd地址 上传服务器时把图片调用下面方法压缩后 保存到临时文件夹 图片压缩后小于100KB，失真度不明显\n\tpublic static List<String> drr = new ArrayList<String>();\n\tpublic static List<String> smdrr = new ArrayList<String>();\n\n\tpublic static Bitmap getbitmap(String path) throws IOException {\n\t\tBitmap bitmap = null;\n\t\tFile f = new File(path);\n\t\tif (f.exists()) { /* 产生Bitmap对象，并放入mImageView中 */\n\t\t\tbitmap = BitmapFactory.decodeFile(path);\n\t\t}\n\t\treturn bitmap;\n\t}\n\n\tpublic static Bitmap revitionImageSize(String path) throws IOException {\n\t\tBufferedInputStream in = new BufferedInputStream(new FileInputStream(\n\t\t\t\tnew File(path)));\n\t\tBitmapFactory.Options options = new BitmapFactory.Options();\n\t\toptions.inJustDecodeBounds = true;\n\t\tBitmapFactory.decodeStream(in, null, options);\n\t\tin.close();\n\t\tint i = 0;\n\t\tBitmap bitmap = null;\n\t\twhile (true) {\n\t\t\tif ((options.outWidth >> i <= 1000)\n\t\t\t\t\t&& (options.outHeight >> i <= 1000)) {\n\t\t\t\tin = new BufferedInputStream(\n\t\t\t\t\t\tnew FileInputStream(new File(path)));\n\t\t\t\toptions.inSampleSize = (int) Math.pow(2.0D, i);\n\t\t\t\toptions.inJustDecodeBounds = false;\n\t\t\t\tbitmap = BitmapFactory.decodeStream(in, null, options);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti += 1;\n\t\t}\n\t\treturn bitmap;\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/example/testpic/BitmapCache.java",
    "content": "package com.example.testpic;\n\nimport java.io.BufferedInputStream;\nimport java.io.File;\nimport java.io.FileInputStream;\nimport java.io.IOException;\nimport java.lang.ref.SoftReference;\nimport java.util.HashMap;\n\nimport android.app.Activity;\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapFactory;\nimport android.os.Handler;\nimport android.text.TextUtils;\nimport android.util.Log;\nimport android.widget.ImageView;\n\npublic class BitmapCache extends Activity {\n\n\tpublic Handler h = new Handler();\n\tpublic final String TAG = getClass().getSimpleName();\n\tprivate HashMap<String, SoftReference<Bitmap>> imageCache = new HashMap<String, SoftReference<Bitmap>>();\n\n\tpublic void put(String path, Bitmap bmp) {\n\t\tif (!TextUtils.isEmpty(path) && bmp != null) {\n\t\t\timageCache.put(path, new SoftReference<Bitmap>(bmp));\n\t\t}\n\t}\n\n\tpublic void displayBmp(final ImageView iv, final String thumbPath,\n\t\t\tfinal String sourcePath, final ImageCallback callback) {\n\t\tif (TextUtils.isEmpty(thumbPath) && TextUtils.isEmpty(sourcePath)) {\n\t\t\tLog.e(TAG, \"no paths pass in\");\n\t\t\treturn;\n\t\t}\n\n\t\tfinal String path;\n\t\tfinal boolean isThumbPath;\n\t\tif (!TextUtils.isEmpty(thumbPath)) {\n\t\t\tpath = thumbPath;\n\t\t\tisThumbPath = true;\n\t\t} else if (!TextUtils.isEmpty(sourcePath)) {\n\t\t\tpath = sourcePath;\n\t\t\tisThumbPath = false;\n\t\t} else {\n\t\t\t// iv.setImageBitmap(null);\n\t\t\treturn;\n\t\t}\n\n\t\tif (imageCache.containsKey(path)) {\n\t\t\tSoftReference<Bitmap> reference = imageCache.get(path);\n\t\t\tBitmap bmp = reference.get();\n\t\t\tif (bmp != null) {\n\t\t\t\tif (callback != null) {\n\t\t\t\t\tcallback.imageLoad(iv, bmp, sourcePath);\n\t\t\t\t}\n\t\t\t\tiv.setImageBitmap(bmp);\n\t\t\t\tLog.d(TAG, \"hit cache\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tiv.setImageBitmap(null);\n\n\t\tnew Thread() {\n\t\t\tBitmap thumb;\n\n\t\t\tpublic void run() {\n\n\t\t\t\ttry {\n\t\t\t\t\tif (isThumbPath) {\n\t\t\t\t\t\tthumb = BitmapFactory.decodeFile(thumbPath);\n\t\t\t\t\t\tif (thumb == null) {\n\t\t\t\t\t\t\tthumb = revitionImageSize(sourcePath);\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthumb = revitionImageSize(sourcePath);\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif (thumb == null) {\n\t\t\t\t\tthumb = TestPicActivity.bimap;\n\t\t\t\t}\n\t\t\t\tLog.e(TAG, \"-------thumb------\"+thumb);\n\t\t\t\tput(path, thumb);\n\n\t\t\t\tif (callback != null) {\n\t\t\t\t\th.post(new Runnable() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tcallback.imageLoad(iv, thumb, sourcePath);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}.start();\n\n\t}\n\n\tpublic Bitmap revitionImageSize(String path) throws IOException {\n\t\tBufferedInputStream in = new BufferedInputStream(new FileInputStream(\n\t\t\t\tnew File(path)));\n\t\tBitmapFactory.Options options = new BitmapFactory.Options();\n\t\toptions.inJustDecodeBounds = true;\n\t\tBitmapFactory.decodeStream(in, null, options);\n\t\tin.close();\n\t\tint i = 0;\n\t\tBitmap bitmap = null;\n\t\twhile (true) {\n\t\t\tif ((options.outWidth >> i <= 256)\n\t\t\t\t\t&& (options.outHeight >> i <= 256)) {\n\t\t\t\tin = new BufferedInputStream(\n\t\t\t\t\t\tnew FileInputStream(new File(path)));\n\t\t\t\toptions.inSampleSize = (int) Math.pow(2.0D, i);\n\t\t\t\toptions.inJustDecodeBounds = false;\n\t\t\t\tbitmap = BitmapFactory.decodeStream(in, null, options);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti += 1;\n\t\t}\n\t\treturn bitmap;\n\t}\n\n\tpublic interface ImageCallback {\n\t\tpublic void imageLoad(ImageView imageView, Bitmap bitmap,\n\t\t\t\tObject... params);\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/example/testpic/FileUtils.java",
    "content": "package com.example.testpic;\n\nimport java.io.File;\nimport java.io.FileNotFoundException;\nimport java.io.FileOutputStream;\nimport java.io.IOException;\n\nimport android.graphics.Bitmap;\nimport android.os.Environment;\nimport android.util.Log;\n\npublic class FileUtils {\n\n\tpublic static String SDPATH = Environment.getExternalStorageDirectory()\n\t\t\t+ \"/myimage/formats/\";\n\n\tpublic static void saveBitmap(Bitmap bm, String picName) {\n\t\tLog.e(\"\", \"保存图片\");\n\t\ttry {\n\t\t\tif (!isFileExist(\"\")) {\n\t\t\t\tFile tempf = createSDDir(\"\");\n\t\t\t}\n\t\t\tFile f = new File(SDPATH, picName + \".jpg\");\n\t\t\tif (f.exists()) {\n\t\t\t\tf.delete();\n\t\t\t}\n\t\t\tFileOutputStream out = new FileOutputStream(f);\n\t\t\tbm.compress(Bitmap.CompressFormat.JPEG, 90, out);\n\t\t\tout.flush();\n\t\t\tout.close();\n\t\t\tLog.e(\"\", \"已经保存\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\n\tpublic static File createSDDir(String dirName) throws IOException {\n\t\tFile dir = new File(SDPATH + dirName);\n\t\tif (Environment.getExternalStorageState().equals(\n\t\t\t\tEnvironment.MEDIA_MOUNTED)) {\n\t\t\tdir.getAbsolutePath();\n\t\t\tdir.mkdir();\n\t\t\t// System.out.println(\"createSDDir:\" + dir.getAbsolutePath());\n\t\t\t// System.out.println(\"createSDDir:\" + dir.mkdir());\n\t\t}\n\t\treturn dir;\n\t}\n\n\tpublic static boolean isFileExist(String fileName) {\n\t\tFile file = new File(SDPATH + fileName);\n\t\tfile.isFile();\n\t\treturn file.exists();\n\t}\n\n\tpublic static void delFile(String fileName) {\n\t\tFile file = new File(SDPATH + fileName);\n\t\tif (file.isFile()) {\n\t\t\tfile.delete();\n\t\t}\n\t\tfile.exists();\n\t}\n\n\tpublic static void deleteDir() {\n\t\tFile dir = new File(SDPATH);\n\t\tif (dir == null || !dir.exists() || !dir.isDirectory())\n\t\t\treturn;\n\n\t\tfor (File file : dir.listFiles()) {\n\t\t\tif (file.isFile())\n\t\t\t\tfile.delete(); // 删除所有文件\n\t\t\telse if (file.isDirectory())\n\t\t\t\tdeleteDir(); // 递规的方式删除文件夹\n\t\t}\n\t\tdir.delete();// 删除目录本身\n\t}\n\n\tpublic static boolean fileIsExists(String path) {\n\t\ttry {\n\t\t\tFile f = new File(path);\n\t\t\tif (!f.exists()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/example/testpic/ImageBucket.java",
    "content": "package com.example.testpic;\n\nimport java.util.List;\n\n/**\n * 一个目录的相册对象\n * \n * @author Administrator\n * \n */\npublic class ImageBucket {\n\tpublic int count = 0;\n\tpublic String bucketName;\n\tpublic List<ImageItem> imageList;\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/example/testpic/ImageBucketAdapter.java",
    "content": "package com.example.testpic;\n\nimport java.util.List;\n\nimport android.app.Activity;\nimport android.graphics.Bitmap;\nimport android.util.Log;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.BaseAdapter;\nimport android.widget.ImageView;\nimport android.widget.TextView;\n\nimport com.cwp.cmoneycharge.R;\nimport com.example.testpic.BitmapCache.ImageCallback;\n\npublic class ImageBucketAdapter extends BaseAdapter {\n\tfinal String TAG = getClass().getSimpleName();\n\n\tActivity act;\n\t/**\n\t * ?????\n\t */\n\tList<ImageBucket> dataList;\n\tBitmapCache cache;\n\tImageCallback callback = new ImageCallback() {\n\t\t@Override\n\t\tpublic void imageLoad(ImageView imageView, Bitmap bitmap,\n\t\t\t\tObject... params) {\n\t\t\tif (imageView != null && bitmap != null) {\n\t\t\t\tString url = (String) params[0];\n\t\t\t\tif (url != null && url.equals((String) imageView.getTag())) {\n\t\t\t\t\t((ImageView) imageView).setImageBitmap(bitmap);\n\t\t\t\t} else {\n\t\t\t\t\tLog.e(TAG, \"callback, bmp not match\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tLog.e(TAG, \"callback, bmp null\");\n\t\t\t}\n\t\t}\n\t};\n\n\tpublic ImageBucketAdapter(Activity act, List<ImageBucket> list) {\n\t\tthis.act = act;\n\t\tdataList = list;\n\t\tcache = new BitmapCache();\n\t}\n\n\t@Override\n\tpublic int getCount() {\n\t\t// TODO Auto-generated method stub\n\t\tint count = 0;\n\t\tif (dataList != null) {\n\t\t\tcount = dataList.size();\n\t\t}\n\t\treturn count;\n\t}\n\n\t@Override\n\tpublic Object getItem(int arg0) {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}\n\n\t@Override\n\tpublic long getItemId(int arg0) {\n\t\t// TODO Auto-generated method stub\n\t\treturn arg0;\n\t}\n\n\tclass Holder {\n\t\tprivate ImageView iv;\n\t\tprivate ImageView selected;\n\t\tprivate TextView name;\n\t\tprivate TextView count;\n\t}\n\n\t@Override\n\tpublic View getView(int arg0, View arg1, ViewGroup arg2) {\n\t\t// TODO Auto-generated method stub\n\t\tHolder holder;\n\t\tif (arg1 == null) {\n\t\t\tholder = new Holder();\n\t\t\targ1 = View.inflate(act, R.layout.item_image_bucket, null);\n\t\t\tholder.iv = (ImageView) arg1.findViewById(R.id.image);\n\t\t\tholder.selected = (ImageView) arg1.findViewById(R.id.isselected);\n\t\t\tholder.name = (TextView) arg1.findViewById(R.id.name);\n\t\t\tholder.count = (TextView) arg1.findViewById(R.id.count);\n\t\t\targ1.setTag(holder);\n\t\t} else {\n\t\t\tholder = (Holder) arg1.getTag();\n\t\t}\n\t\tImageBucket item = dataList.get(arg0);\n\t\tholder.count.setText(\"\" + item.count);\n\t\tholder.name.setText(item.bucketName);\n\t\tholder.selected.setVisibility(View.GONE);\n\t\tif (item.imageList != null && item.imageList.size() > 0) {\n\t\t\tString thumbPath = item.imageList.get(0).thumbnailPath;\n\t\t\tString sourcePath = item.imageList.get(0).imagePath;\n\t\t\tholder.iv.setTag(sourcePath);\n\t\t\tcache.displayBmp(holder.iv, thumbPath, sourcePath, callback);\n\t\t} else {\n\t\t\tholder.iv.setImageBitmap(null);\n\t\t\tLog.e(TAG, \"no images in bucket \" + item.bucketName);\n\t\t}\n\t\treturn arg1;\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/example/testpic/ImageGridActivity.java",
    "content": "package com.example.testpic;\n\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.Iterator;\nimport java.util.List;\n\nimport com.cwp.cmoneycharge.About;\nimport com.cwp.cmoneycharge.MainActivity;\nimport com.cwp.cmoneycharge.R;\nimport com.example.testpic.ImageGridAdapter.TextCallback;\n\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.graphics.Color;\nimport android.graphics.drawable.ColorDrawable;\nimport android.os.Bundle;\nimport android.os.Handler;\nimport android.os.Message;\nimport android.view.KeyEvent;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.widget.AdapterView;\nimport android.widget.Button;\nimport android.widget.ImageView;\nimport android.widget.TextView;\nimport android.widget.Toast;\nimport android.widget.AdapterView.OnItemClickListener;\nimport android.widget.GridView;\n\npublic class ImageGridActivity extends Activity {\n\tpublic static final String EXTRA_IMAGE_LIST = \"imagelist\";\n\n\t// ArrayList<Entity> dataList;//用来装载数据源的列表\n\tList<ImageItem> dataList;\n\tGridView gridView;\n\tImageGridAdapter adapter;// 自定义的适配噿\n\tAlbumHelper helper;\n\tButton bt;\n\n\tHandler mHandler = new Handler() {\n\t\t@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tswitch (msg.what) {\n\t\t\tcase 0:\n\t\t\t\tToast.makeText(ImageGridActivity.this, \"最多选择9张图片\", 400).show();\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t};\n\n\tprivate TextView bt_cancel;\n\n\tprivate ImageView bt_back;\n\n\tprivate TextView gridview_cancel;\n\n\t@SuppressWarnings(\"unchecked\")\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tsetContentView(R.layout.activity_image_grid);\n\n\t\thelper = AlbumHelper.getHelper();\n\t\thelper.init(getApplicationContext());\n\n\t\tdataList = (List<ImageItem>) getIntent().getSerializableExtra(\n\t\t\t\tEXTRA_IMAGE_LIST);\n\n\t\tinitView();\n\t\tbt = (Button) findViewById(R.id.bt);\n\t\tbt_cancel = (TextView) findViewById(R.id.bt_cancel);\n\t\tbt_back = (ImageView) findViewById(R.id.bt_back);\n\t\tbt_cancel.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(ImageGridActivity.this,\n\t\t\t\t\t\tPublishedActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\n\t\tbt_back.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(ImageGridActivity.this,\n\t\t\t\t\t\tTestPicActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\n\t\tbt.setOnClickListener(new OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tArrayList<String> list = new ArrayList<String>();\n\t\t\t\tCollection<String> c = adapter.map.values();\n\t\t\t\tIterator<String> it = c.iterator();\n\t\t\t\tfor (; it.hasNext();) {\n\t\t\t\t\tlist.add(it.next());\n\t\t\t\t}\n\n\t\t\t\tif (Bimp.act_bool) {\n\t\t\t\t\tIntent intent = new Intent(ImageGridActivity.this,\n\t\t\t\t\t\t\tPublishedActivity.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\tBimp.act_bool = false;\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\t\tif (Bimp.drr.size() < 9) {\n\t\t\t\t\t\tBimp.drr.add(list.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Bimp.flag\" + Bimp.flag);\n\t\t\t\tif (Bimp.flag2 == 0) {\n\t\t\t\t\tfinish();\n\t\t\t\t\tBimp.flag2++;\n\t\t\t\t} else {\n\t\t\t\t\tIntent intent = new Intent(ImageGridActivity.this,\n\t\t\t\t\t\t\tPublishedActivity.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t}\n\n\t/**\n\t * 初妾化view视图\n\t */\n\tprivate void initView() {\n\t\tgridView = (GridView) findViewById(R.id.gridview);\n\t\tgridView.setSelector(new ColorDrawable(Color.TRANSPARENT));\n\t\tadapter = new ImageGridAdapter(ImageGridActivity.this, dataList,\n\t\t\t\tmHandler);\n\t\tgridView.setAdapter(adapter);\n\t\tadapter.setTextCallback(new TextCallback() {\n\t\t\tpublic void onListen(int count) {\n\t\t\t\tbt.setText(\"完成\" + \" (\" + count + \")\");\n\t\t\t}\n\t\t});\n\n\t\tgridView.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\t/**\n\t\t\t\t * 根据position参数，可以获得跟GridView的子View相绑定的实体类，然后根据它的isSelected状捊 *\n\t\t\t\t * ?＿ 来判断是否显示??效果?至于选中效果的覽则，下面适配器的代码中会有说昿\n\t\t\t\t */\n\t\t\t\t// if(dataList.get(position).isSelected()){\n\t\t\t\t// dataList.get(position).setSelected(false);\n\t\t\t\t// }else{\n\t\t\t\t// dataList.get(position).setSelected(true);\n\t\t\t\t// }\n\t\t\t\t/**\n\t\t\t\t * 通知适配器，绑定的数据发生了改变，应当刷新覹囿\n\t\t\t\t */\n\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t}\n\n\t\t});\n\t}\n\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t\tif (keyCode == KeyEvent.KEYCODE_BACK) { // 监控/拦截/屏蔽返回键\n\t\t\tIntent intent = new Intent(ImageGridActivity.this,\n\t\t\t\t\tTestPicActivity.class);\n\t\t\tstartActivity(intent);\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onKeyDown(keyCode, event);\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/example/testpic/ImageGridAdapter.java",
    "content": "package com.example.testpic;\n\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\nimport android.app.Activity;\nimport android.graphics.Bitmap;\nimport android.os.Handler;\nimport android.os.Message;\nimport android.util.Log;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.view.ViewGroup;\nimport android.widget.BaseAdapter;\nimport android.widget.ImageView;\nimport android.widget.TextView;\n\nimport com.cwp.cmoneycharge.R;\nimport com.example.testpic.BitmapCache.ImageCallback;\n\npublic class ImageGridAdapter extends BaseAdapter {\n\n\tprivate TextCallback textcallback = null;\n\tfinal String TAG = getClass().getSimpleName();\n\tActivity act;\n\tList<ImageItem> dataList;\n\tMap<String, String> map = new HashMap<String, String>();\n\tBitmapCache cache;\n\tprivate Handler mHandler;\n\tprivate int selectTotal = 0;\n\tImageCallback callback = new ImageCallback() {\n\t\t@Override\n\t\tpublic void imageLoad(ImageView imageView, Bitmap bitmap,\n\t\t\t\tObject... params) {\n\t\t\tif (imageView != null && bitmap != null) {\n\t\t\t\tString url = (String) params[0];\n\t\t\t\tif (url != null && url.equals((String) imageView.getTag())) {\n\t\t\t\t\t((ImageView) imageView).setImageBitmap(bitmap);\n\t\t\t\t} else {\n\t\t\t\t\tLog.e(TAG, \"callback, bmp not match\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tLog.e(TAG, \"callback, bmp null\");\n\t\t\t}\n\t\t}\n\t};\n\n\tpublic static interface TextCallback {\n\t\tpublic void onListen(int count);\n\t}\n\n\tpublic void setTextCallback(TextCallback listener) {\n\t\ttextcallback = listener;\n\t}\n\n\tpublic ImageGridAdapter(Activity act, List<ImageItem> list, Handler mHandler) {\n\t\tthis.act = act;\n\t\tdataList = list;\n\t\tcache = new BitmapCache();\n\t\tthis.mHandler = mHandler;\n\t}\n\n\t@Override\n\tpublic int getCount() {\n\t\tint count = 0;\n\t\tif (dataList != null) {\n\t\t\tcount = dataList.size();\n\t\t}\n\t\treturn count;\n\t}\n\n\t@Override\n\tpublic Object getItem(int position) {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}\n\n\t@Override\n\tpublic long getItemId(int position) {\n\t\t// TODO Auto-generated method stub\n\t\treturn position;\n\t}\n\n\tclass Holder {\n\t\tprivate ImageView iv;\n\t\tprivate ImageView selected;\n\t\tprivate TextView text;\n\t}\n\n\t@Override\n\tpublic View getView(final int position, View convertView, ViewGroup parent) {\n\t\tfinal Holder holder;\n\n\t\tif (convertView == null) {\n\t\t\tholder = new Holder();\n\t\t\tconvertView = View.inflate(act, R.layout.item_image_grid, null);\n\t\t\tholder.iv = (ImageView) convertView.findViewById(R.id.image);\n\t\t\tholder.selected = (ImageView) convertView\n\t\t\t\t\t.findViewById(R.id.isselected);\n\t\t\tholder.text = (TextView) convertView\n\t\t\t\t\t.findViewById(R.id.item_image_grid_text);\n\t\t\tconvertView.setTag(holder);\n\t\t} else {\n\t\t\tholder = (Holder) convertView.getTag();\n\t\t}\n\t\tfinal ImageItem item = dataList.get(position);\n\n\t\tholder.iv.setTag(item.imagePath);\n\t\tcache.displayBmp(holder.iv, item.thumbnailPath, item.imagePath,\n\t\t\t\tcallback);\n\t\tif (item.isSelected) {\n\t\t\tholder.selected.setImageResource(R.drawable.icon_data_select);  \n\t\t\tholder.text.setBackgroundResource(R.drawable.bgd_relatly_line);\n\t\t} else {\n\t\t\tholder.selected.setImageResource(-1);\n\t\t\tholder.text.setBackgroundColor(0x00000000);\n\t\t}\n\t\tholder.iv.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString path = dataList.get(position).imagePath;\n\n\t\t\t\tif ((Bimp.drr.size() + selectTotal) < 9) {\n\t\t\t\t\titem.isSelected = !item.isSelected;\n\t\t\t\t\tif (item.isSelected) {\n\t\t\t\t\t\tholder.selected\n\t\t\t\t\t\t\t\t.setImageResource(R.drawable.icon_data_select);\n\t\t\t\t\t\tholder.text.setBackgroundResource(R.drawable.bgd_relatly_line);\n\t\t\t\t\t\tselectTotal++;\n\t\t\t\t\t\tif (textcallback != null)\n\t\t\t\t\t\t\ttextcallback.onListen(selectTotal);\n\t\t\t\t\t\tmap.put(path, path);\n\n\t\t\t\t\t} else if (!item.isSelected) {\n\t\t\t\t\t\tholder.selected.setImageResource(-1);\n\t\t\t\t\t\tholder.text.setBackgroundColor(0x00000000);\n\t\t\t\t\t\tselectTotal--;\n\t\t\t\t\t\tif (textcallback != null)\n\t\t\t\t\t\t\ttextcallback.onListen(selectTotal);\n\t\t\t\t\t\tmap.remove(path);\n\t\t\t\t\t}\n\t\t\t\t} else if ((Bimp.drr.size() + selectTotal) >= 9) {\n\t\t\t\t\tif (item.isSelected == true) {\n\t\t\t\t\t\titem.isSelected = !item.isSelected;\n\t\t\t\t\t\tholder.selected.setImageResource(-1);\n\t\t\t\t\t\tselectTotal--;\n\t\t\t\t\t\tmap.remove(path);\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tMessage message = Message.obtain(mHandler, 0);\n\t\t\t\t\t\tmessage.sendToTarget();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\n\t\treturn convertView;\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/example/testpic/ImageItem.java",
    "content": "package com.example.testpic;\n\nimport java.io.Serializable;\n\n/**\n * 一个图片对象\n * \n * @author Administrator\n * \n */\npublic class ImageItem implements Serializable {\n\tpublic String imageId;\n\tpublic String thumbnailPath;\n\tpublic String imagePath;\n\tpublic boolean isSelected = false;\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/example/testpic/NoScrollGridView.java",
    "content": "package com.example.testpic;\n\nimport android.content.Context;\nimport android.util.AttributeSet;\nimport android.widget.GridView;\n\npublic class NoScrollGridView extends GridView {\n\tpublic NoScrollGridView(Context context) {\n\t\tsuper(context);\n\t}\n\n\tpublic NoScrollGridView(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t}\n\n\tprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n\t\tint expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,\n\t\t\t\tMeasureSpec.AT_MOST);\n\t\tsuper.onMeasure(widthMeasureSpec, expandSpec);\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/example/testpic/PhotoActivity.java",
    "content": "package com.example.testpic;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport com.cwp.cmoneycharge.R;\n\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.graphics.Bitmap;\nimport android.os.Bundle;\nimport android.support.v4.view.PagerAdapter;\nimport android.support.v4.view.ViewPager;\nimport android.support.v4.view.ViewPager.OnPageChangeListener;\nimport android.view.View;\nimport android.view.ViewGroup.LayoutParams;\nimport android.widget.Button;\nimport android.widget.ImageView;\nimport android.widget.RelativeLayout;\n\npublic class PhotoActivity extends Activity {\n\n\tprivate ArrayList<View> listViews = null;\n\tprivate ViewPager pager;\n\tprivate MyPageAdapter adapter;\n\tprivate int count;\n\n\tpublic List<Bitmap> bmp = new ArrayList<Bitmap>();\n\tpublic List<String> drr = new ArrayList<String>();\n\tpublic static List<String> smdrr = new ArrayList<String>();\n\tpublic List<String> del = new ArrayList<String>();\n\tpublic int max;\n\n\tRelativeLayout photo_relativeLayout;\n\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_photo);\n\n\t\tphoto_relativeLayout = (RelativeLayout) findViewById(R.id.photo_relativeLayout);\n\t\tphoto_relativeLayout.setBackgroundColor(0x70000000);\n\n\t\tIntent intentr = getIntent();\n\t\tBundle bundle = intentr.getExtras();// 获取传入的数据，并使用Bundle记录\n\t\tif ((bundle != null)) {\n\t\t\tif ((bundle.containsKey(\"mian\"))) {\n\t\t\t\tphoto_relativeLayout.setVisibility(View.GONE);\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < Bimp.bmp.size(); i++) {\n\t\t\tbmp.add(Bimp.bmp.get(i));\n\t\t}\n\t\tfor (int i = 0; i < Bimp.drr.size(); i++) {\n\t\t\tdrr.add(Bimp.drr.get(i));\n\t\t}\n\n\t\tmax = Bimp.max;\n\n\t\tButton photo_bt_exit = (Button) findViewById(R.id.photo_bt_exit);\n\t\tphoto_bt_exit.setOnClickListener(new View.OnClickListener() {\n\t\t\tpublic void onClick(View v) {\n\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t\tButton photo_bt_del = (Button) findViewById(R.id.photo_bt_del);\n\t\tphoto_bt_del.setOnClickListener(new View.OnClickListener() {\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (listViews.size() == 1) {\n\t\t\t\t\tBimp.bmp.clear();\n\t\t\t\t\tBimp.drr.clear();\n\t\t\t\t\tBimp.smdrr.clear();\n\t\t\t\t\tBimp.max = 0;\n\t\t\t\t\tString newStr = drr.get(count).substring(\n\t\t\t\t\t\t\tdrr.get(count).lastIndexOf(\"/\") + 1,\n\t\t\t\t\t\t\tdrr.get(count).lastIndexOf(\".\"));\n\t\t\t\t\tdel.add(newStr);\n\t\t\t\t\tIntent intent = new Intent(PhotoActivity.this,\n\t\t\t\t\t\t\tPublishedActivity.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\tfinish();\n\t\t\t\t} else {\n\t\t\t\t\tString newStr = drr.get(count).substring(\n\t\t\t\t\t\t\tdrr.get(count).lastIndexOf(\"/\") + 1,\n\t\t\t\t\t\t\tdrr.get(count).lastIndexOf(\".\"));\n\t\t\t\t\tbmp.remove(count);\n\t\t\t\t\tdrr.remove(count);\n\t\t\t\t\tdel.add(newStr);\n\t\t\t\t\tmax--;\n\t\t\t\t\tpager.removeAllViews();\n\t\t\t\t\tlistViews.remove(count);\n\t\t\t\t\tadapter.setListViews(listViews);\n\t\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tButton photo_bt_enter = (Button) findViewById(R.id.photo_bt_enter);\n\t\tphoto_bt_enter.setOnClickListener(new View.OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tBimp.bmp = bmp;\n\t\t\t\tBimp.drr = drr;\n\t\t\t\tBimp.max = max;\n\t\t\t\tfor (int i = 0; i < del.size(); i++) {\n\t\t\t\t\tFileUtils.delFile(del.get(i) + \".jpg\");\n\t\t\t\t}\n\t\t\t\tIntent intent = new Intent(PhotoActivity.this,\n\t\t\t\t\t\tPublishedActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\n\t\tpager = (ViewPager) findViewById(R.id.viewpager);\n\t\tpager.setOnPageChangeListener(pageChangeListener);\n\t\tfor (int i = 0; i < bmp.size(); i++) {\n\t\t\tinitListViews(bmp.get(i));//\n\t\t}\n\n\t\tadapter = new MyPageAdapter(listViews);// 构造adapter\n\t\tpager.setAdapter(adapter);// 设置适配器\n\t\tIntent intent = getIntent();\n\t\tint id = intent.getIntExtra(\"ID\", 0);\n\t\tpager.setCurrentItem(id);\n\t}\n\n\tprivate void initListViews(Bitmap bm) {\n\t\tif (listViews == null)\n\t\t\tlistViews = new ArrayList<View>();\n\t\tImageView img = new ImageView(this);// 构造textView对象\n\t\timg.setBackgroundColor(0xff000000);\n\t\timg.setImageBitmap(bm);\n\t\timg.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,\n\t\t\t\tLayoutParams.FILL_PARENT));\n\t\tlistViews.add(img);// 添加view\n\t}\n\n\tprivate OnPageChangeListener pageChangeListener = new OnPageChangeListener() {\n\n\t\tpublic void onPageSelected(int arg0) {// 页面选择响应函数\n\t\t\tcount = arg0;\n\t\t}\n\n\t\tpublic void onPageScrolled(int arg0, float arg1, int arg2) {// 滑动中。。。\n\n\t\t}\n\n\t\tpublic void onPageScrollStateChanged(int arg0) {// 滑动状态改变\n\n\t\t}\n\t};\n\n\tclass MyPageAdapter extends PagerAdapter {\n\n\t\tprivate ArrayList<View> listViews;// content\n\n\t\tprivate int size;// 页数\n\n\t\tpublic MyPageAdapter(ArrayList<View> listViews) {// 构造函数\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 初始化viewpager的时候给的一个页面\n\t\t\tthis.listViews = listViews;\n\t\t\tsize = listViews == null ? 0 : listViews.size();\n\t\t}\n\n\t\tpublic void setListViews(ArrayList<View> listViews) {// 自己写的一个方法用来添加数据\n\t\t\tthis.listViews = listViews;\n\t\t\tsize = listViews == null ? 0 : listViews.size();\n\t\t}\n\n\t\tpublic int getCount() {// 返回数量\n\t\t\treturn size;\n\t\t}\n\n\t\tpublic int getItemPosition(Object object) {\n\t\t\treturn POSITION_NONE;\n\t\t}\n\n\t\tpublic void destroyItem(View arg0, int arg1, Object arg2) {// 销毁view对象\n\t\t\t((ViewPager) arg0).removeView(listViews.get(arg1 % size));\n\t\t}\n\n\t\tpublic void finishUpdate(View arg0) {\n\t\t}\n\n\t\tpublic Object instantiateItem(View arg0, int arg1) {// 返回view对象\n\t\t\ttry {\n\t\t\t\t((ViewPager) arg0).addView(listViews.get(arg1 % size), 0);\n\n\t\t\t} catch (Exception e) {\n\t\t\t}\n\t\t\treturn listViews.get(arg1 % size);\n\t\t}\n\n\t\tpublic boolean isViewFromObject(View arg0, Object arg1) {\n\t\t\treturn arg0 == arg1;\n\t\t}\n\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/example/testpic/PublishedActivity.java",
    "content": "package com.example.testpic;\n\nimport java.io.File;\nimport java.io.FileNotFoundException;\nimport java.io.FileOutputStream;\nimport java.io.IOException;\nimport java.io.Serializable;\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport com.cwp.chart.SystemBarTintManager;\nimport com.cwp.cmoneycharge.AddPay;\nimport com.cwp.cmoneycharge.R;\nimport com.cwp.cmoneycharge.SysApplication;\n\nimport android.annotation.SuppressLint;\nimport android.annotation.TargetApi;\nimport android.app.Activity;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapFactory;\nimport android.graphics.Color;\nimport android.graphics.drawable.BitmapDrawable;\nimport android.graphics.drawable.ColorDrawable;\nimport android.net.Uri;\nimport android.os.Build;\nimport android.os.Bundle;\nimport android.os.Environment;\nimport android.os.Handler;\nimport android.os.Message;\nimport android.provider.MediaStore;\nimport android.view.Gravity;\nimport android.view.KeyEvent;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.Window;\nimport android.view.WindowManager;\nimport android.view.View.OnClickListener;\nimport android.view.ViewGroup;\nimport android.view.ViewGroup.LayoutParams;\nimport android.view.animation.AnimationUtils;\nimport android.widget.AdapterView;\nimport android.widget.AdapterView.OnItemClickListener;\nimport android.widget.BaseAdapter;\nimport android.widget.Button;\nimport android.widget.GridView;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.PopupWindow;\nimport android.widget.TextView;\n\npublic class PublishedActivity extends Activity {\n\n\tprivate GridView noScrollgridview;\n\tprivate GridAdapter adapter;\n\tprivate TextView activity_selectimg_send;\n\tprivate int flag = 0;\n\tprivate Bundle bundle;\n\tprivate int userid;\n\tprivate int modifysize;\n\tBoolean firstin = true;\n\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.activity_selectimg);\n\n\t\tInit();\n\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n\t\t\tsetTranslucentStatus(true);\n\t\t\t// findViewById(R.id.top).setVisibility(View.VISIBLE);\n\t\t}\n\t\tSystemBarTintManager mTintManager = new SystemBarTintManager(this);\n\t\tmTintManager.setStatusBarTintEnabled(true);\n\t\tmTintManager.setStatusBarTintResource(R.color.statusbar_bg);\n\n\t\tSysApplication.getInstance().addActivity(this); // 在销毁队列中添加this\n\n\t}\n\n\t@TargetApi(19)\n\tprivate void setTranslucentStatus(boolean on) {\n\t\tWindow win = getWindow();\n\t\tWindowManager.LayoutParams winParams = win.getAttributes();\n\t\tfinal int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;\n\t\tif (on) {\n\t\t\twinParams.flags |= bits;\n\t\t} else {\n\t\t\twinParams.flags &= ~bits;\n\t\t}\n\t\twin.setAttributes(winParams);\n\t}\n\n\tpublic void Init() {\n\t\tIntent intentr = getIntent();\n\t\tuserid = intentr.getIntExtra(\"cwp.id\", 100000001);\n\t\tbundle = intentr.getExtras();// 获取传入的数据，并使用Bundle记录\n\t\tif ((bundle != null)) {\n\t\t\tif ((bundle.containsKey(\"cwp.photo\"))) {\n\t\t\t\tif (firstin) {\n\t\t\t\t\tphoto();\n\t\t\t\t\tfirstin = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tnoScrollgridview = (GridView) findViewById(R.id.noScrollgridview);\n\t\tnoScrollgridview.setSelector(new ColorDrawable(Color.TRANSPARENT));\n\t\tadapter = new GridAdapter(this);\n\t\tadapter.update();\n\t\tnoScrollgridview.setAdapter(adapter);\n\t\tnoScrollgridview.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tif (arg2 == Bimp.bmp.size()) {\n\t\t\t\t\tnew PopupWindows(PublishedActivity.this, noScrollgridview);\n\t\t\t\t} else {\n\t\t\t\t\tIntent intent = new Intent(PublishedActivity.this,\n\t\t\t\t\t\t\tPhotoActivity.class);\n\t\t\t\t\tintent.putExtra(\"ID\", arg2);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tactivity_selectimg_send = (TextView) findViewById(R.id.activity_selectimg_send);\n\t\tactivity_selectimg_send.setOnClickListener(new OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsetResult(3);// this.setResult(int resultCode)，resultCode 可以自定义\n\t\t\t\tfinish();\n\t\t\t\t// 高清的压缩过的图片全部就在 list 路径里面了\n\t\t\t\t// 高清的压缩过的 bmp 对象 都在 Bimp.bmp里面\n\t\t\t\t// 完成上传服务器后 .........\n\t\t\t\t// FileUtils.deleteDir();\n\t\t\t}\n\t\t});\n\t}\n\n\t@SuppressLint(\"HandlerLeak\")\n\tpublic class GridAdapter extends BaseAdapter {\n\t\tprivate LayoutInflater inflater; // 视图容器\n\t\tprivate int selectedPosition = -1;// 选中的位置\n\t\tprivate boolean shape;\n\n\t\tpublic boolean isShape() {\n\t\t\treturn shape;\n\t\t}\n\n\t\tpublic void setShape(boolean shape) {\n\t\t\tthis.shape = shape;\n\t\t}\n\n\t\tpublic GridAdapter(Context context) {\n\t\t\tinflater = LayoutInflater.from(context);\n\t\t}\n\n\t\tpublic void update() {\n//\t\t\tif (Bimp.flag == 0) {\n\t\t\t\tloading();\n//\t\t\t\tBimp.flag++;\n//\t\t\t}\n\t\t}\n\n\t\tpublic int getCount() {\n\t\t\treturn (Bimp.bmp.size() + 1);\n\t\t}\n\n\t\tpublic Object getItem(int arg0) {\n\n\t\t\treturn null;\n\t\t}\n\n\t\tpublic long getItemId(int arg0) {\n\n\t\t\treturn 0;\n\t\t}\n\n\t\tpublic void setSelectedPosition(int position) {\n\t\t\tselectedPosition = position;\n\t\t}\n\n\t\tpublic int getSelectedPosition() {\n\t\t\treturn selectedPosition;\n\t\t}\n\n\t\t/**\n\t\t * ListView Item设置\n\t\t */\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tfinal int coord = position;\n\t\t\tViewHolder holder = null;\n\t\t\tif (convertView == null) {\n\t\t\t\tconvertView = inflater.inflate(R.layout.item_published_grida,\n\t\t\t\t\t\tparent, false);\n\t\t\t\tholder = new ViewHolder();\n\t\t\t\tholder.image = (ImageView) convertView\n\t\t\t\t\t\t.findViewById(R.id.item_grida_image);\n\t\t\t\tconvertView.setTag(holder);\n\t\t\t} else {\n\t\t\t\tholder = (ViewHolder) convertView.getTag();\n\t\t\t}\n\n\t\t\tif (position == Bimp.bmp.size()) {\n\t\t\t\tholder.image.setImageBitmap(BitmapFactory.decodeResource(\n\t\t\t\t\t\tgetResources(), R.drawable.icon_addpic_unfocused));\n\t\t\t\tif (position == 9) {\n\t\t\t\t\tholder.image.setVisibility(View.GONE);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tholder.image.setImageBitmap(Bimp.bmp.get(position));\n\t\t\t}\n\n\t\t\treturn convertView;\n\t\t}\n\n\t\tpublic class ViewHolder {\n\t\t\tpublic ImageView image;\n\t\t}\n\n\t\tHandler handler = new Handler() {\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tswitch (msg.what) {\n\t\t\t\tcase 1:\n\t\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tsuper.handleMessage(msg);\n\t\t\t}\n\t\t};\n\n\t\tpublic void loading() {\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tif (Bimp.max == Bimp.drr.size()) {\n\t\t\t\t\t\t\tMessage message = new Message();\n\t\t\t\t\t\t\tmessage.what = 1;\n\t\t\t\t\t\t\thandler.sendMessage(message);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tIntent intentr = getIntent();\n\t\t\t\t\t\t\tbundle = intentr.getExtras();// 获取传入的数据，并使用Bundle记录\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tif (Bimp.drr.size() >= Bimp.max) {\n\t\t\t\t\t\t\t\t\tString path = Bimp.drr.get(Bimp.max);\n\t\t\t\t\t\t\t\t\tBitmap bm = Bimp.revitionImageSize(path);\n\t\t\t\t\t\t\t\t\tBimp.bmp.add(bm);\n\t\t\t\t\t\t\t\t\tString newStr = path.substring(\n\t\t\t\t\t\t\t\t\t\t\tpath.lastIndexOf(\"/\") + 1,\n\t\t\t\t\t\t\t\t\t\t\tpath.lastIndexOf(\".\"));\n\t\t\t\t\t\t\t\t\tFileUtils.saveBitmap(bm, newStr);\n\t\t\t\t\t\t\t\t\tBimp.smdrr.add(FileUtils.SDPATH + newStr\n\t\t\t\t\t\t\t\t\t\t\t+ \".jpg\");\n\t\t\t\t\t\t\t\t\tBimp.max += 1;\n\t\t\t\t\t\t\t\t\tMessage message = new Message();\n\t\t\t\t\t\t\t\t\tmessage.what = 1;\n\t\t\t\t\t\t\t\t\thandler.sendMessage(message);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}).start();\n\t\t}\n\t}\n\n\tpublic String getString(String s) {\n\t\tString path = null;\n\t\tif (s == null)\n\t\t\treturn \"\";\n\t\tfor (int i = s.length() - 1; i > 0; i++) {\n\t\t\ts.charAt(i);\n\t\t}\n\t\treturn path;\n\t}\n\n\tpublic class PopupWindows extends PopupWindow { // 弹出菜单\n\n\t\tpublic PopupWindows(Context mContext, View parent) {\n\n\t\t\tView view = View\n\t\t\t\t\t.inflate(mContext, R.layout.item_popupwindows, null);\n\t\t\tview.startAnimation(AnimationUtils.loadAnimation(mContext,\n\t\t\t\t\tR.anim.fade_ins));\n\t\t\tLinearLayout ll_popup = (LinearLayout) view\n\t\t\t\t\t.findViewById(R.id.ll_popup);\n\t\t\tll_popup.startAnimation(AnimationUtils.loadAnimation(mContext,\n\t\t\t\t\tR.anim.push_bottom_in_2));\n\n\t\t\tsetWidth(LayoutParams.FILL_PARENT);\n\t\t\tsetHeight(LayoutParams.FILL_PARENT);\n\t\t\tsetBackgroundDrawable(new BitmapDrawable());\n\t\t\tsetFocusable(true);\n\t\t\tsetOutsideTouchable(true);\n\t\t\tsetContentView(view);\n\t\t\tshowAtLocation(parent, Gravity.BOTTOM, 0, 0);\n\t\t\tupdate();\n\n\t\t\tButton bt1 = (Button) view\n\t\t\t\t\t.findViewById(R.id.item_popupwindows_camera); // 相机\n\t\t\tButton bt2 = (Button) view\n\t\t\t\t\t.findViewById(R.id.item_popupwindows_Photo); // 图库\n\t\t\tButton bt3 = (Button) view\n\t\t\t\t\t.findViewById(R.id.item_popupwindows_cancel); // 取消\n\t\t\tbt1.setOnClickListener(new OnClickListener() {\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tphoto();\n\t\t\t\t\tdismiss();\n\t\t\t\t}\n\t\t\t});\n\t\t\tbt2.setOnClickListener(new OnClickListener() {\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tIntent intent = new Intent(PublishedActivity.this,\n\t\t\t\t\t\t\tTestPicActivity.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\tBimp.flag = 0;\n\t\t\t\t\tfinish();\n\t\t\t\t\tdismiss();\n\t\t\t\t}\n\t\t\t});\n\t\t\tbt3.setOnClickListener(new OnClickListener() {\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tdismiss();\n\t\t\t\t}\n\t\t\t});\n\n\t\t}\n\t}\n\n\tprivate static final int TAKE_PICTURE = 0x000000;\n\tprivate String path = \"\";\n\n\tpublic void photo() {\n\t\tIntent openCameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\t\tif (Environment.getExternalStorageState().equals(\n\t\t\t\tEnvironment.MEDIA_MOUNTED)) {\n\t\t\tFile dir = new File(Environment.getExternalStorageDirectory()\n\t\t\t\t\t+ \"/myimage/\");\n\t\t\tString fileName = String.valueOf(System.currentTimeMillis())\n\t\t\t\t\t+ \".jpg\";\n\t\t\tif (!dir.exists())\n\t\t\t\tdir.mkdir();\n\t\t\tFile file = new File(dir, fileName);\n\t\t\tpath = file.getPath();\n\t\t\tUri imageUri = Uri.fromFile(file);\n\t\t\topenCameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);\n\t\t\tstartActivityForResult(openCameraIntent, TAKE_PICTURE);\n\t\t}\n\t}\n\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tswitch (requestCode) {\n\t\tcase TAKE_PICTURE:\n\t\t\tif (Bimp.drr.size() < 9 && resultCode == -1) {\n\t\t\t\tBimp.drr.add(path);\n\t\t\t}\n\t\t\tInit();\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t}\n\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t\tif (keyCode == KeyEvent.KEYCODE_BACK) { // 监控/拦截/屏蔽返回键\n\t\t\tsetResult(3);// this.setResult(int resultCode)，resultCode 可以自定义\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onKeyDown(keyCode, event);\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/example/testpic/TestPicActivity.java",
    "content": "package com.example.testpic;\n\nimport java.io.Serializable;\nimport java.util.List;\n\nimport com.cwp.cmoneycharge.R;\n\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapFactory;\nimport android.os.Bundle;\nimport android.view.KeyEvent;\nimport android.view.View;\nimport android.view.View.OnClickListener;\nimport android.widget.AdapterView;\nimport android.widget.AdapterView.OnItemClickListener;\nimport android.widget.GridView;\nimport android.widget.TextView;\n\npublic class TestPicActivity extends Activity {\n\t// ArrayList<Entity> dataList;//用来装载数据源的列表\n\tList<ImageBucket> dataList;\n\tGridView gridView;\n\tImageBucketAdapter adapter;// 自定义的适配器\n\tAlbumHelper helper;\n\tprivate TextView gridview_cancel;\n\tpublic static final String EXTRA_IMAGE_LIST = \"imagelist\";\n\tpublic static Bitmap bimap;\n\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_image_bucket);\n\n\t\thelper = AlbumHelper.getHelper();\n\t\thelper.init(getApplicationContext());\n\n\t\tinitData();\n\t\tinitView();\n\t}\n\n\t/**\n\t * 初始化数据\n\t */\n\tprivate void initData() {\n\t\t// /**\n\t\t// * 这里，我们假设已经从网络或者本地解析好了数据，所以直接在这里模拟了10个实体类，直接装进列表中\n\t\t// */\n\t\t// dataList = new ArrayList<Entity>();\n\t\t// for(int i=-0;i<10;i++){\n\t\t// Entity entity = new Entity(R.drawable.picture, false);\n\t\t// dataList.add(entity);\n\t\t// }\n\t\tdataList = helper.getImagesBucketList(false);\n\t\tbimap = BitmapFactory.decodeResource(getResources(),\n\t\t\t\tR.drawable.icon_addpic_unfocused);\n\t}\n\n\t/**\n\t * 初始化view视图\n\t */\n\tprivate void initView() {\n\t\tgridView = (GridView) findViewById(R.id.gridview);\n\t\tgridview_cancel = (TextView) findViewById(R.id.gridview_cancel);\n\t\tgridview_cancel.setOnClickListener(new OnClickListener() {\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(TestPicActivity.this,\n\t\t\t\t\t\tPublishedActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\n\t\tadapter = new ImageBucketAdapter(TestPicActivity.this, dataList);\n\t\tgridView.setAdapter(adapter);\n\n\t\tgridView.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\t/**\n\t\t\t\t * 根据position参数，可以获得跟GridView的子View相绑定的实体类，然后根据它的isSelected状态，\n\t\t\t\t * 来判断是否显示选中效果。 至于选中效果的规则，下面适配器的代码中会有说明\n\t\t\t\t */\n\t\t\t\t// if(dataList.get(position).isSelected()){\n\t\t\t\t// dataList.get(position).setSelected(false);\n\t\t\t\t// }else{\n\t\t\t\t// dataList.get(position).setSelected(true);\n\t\t\t\t// }\n\t\t\t\t/**\n\t\t\t\t * 通知适配器，绑定的数据发生了改变，应当刷新视图\n\t\t\t\t */\n\t\t\t\t// adapter.notifyDataSetChanged();\n\t\t\t\tIntent intent = new Intent(TestPicActivity.this,\n\t\t\t\t\t\tImageGridActivity.class);\n\t\t\t\tintent.putExtra(TestPicActivity.EXTRA_IMAGE_LIST,\n\t\t\t\t\t\t(Serializable) dataList.get(position).imageList);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}\n\n\t\t});\n\t}\n\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t\tif (keyCode == KeyEvent.KEYCODE_BACK) { // 监控/拦截/屏蔽返回键\n\t\t\tIntent intent = new Intent(TestPicActivity.this,\n\t\t\t\t\tPublishedActivity.class);\n\t\t\tstartActivity(intent);\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onKeyDown(keyCode, event);\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/CanvasTransformerBuilder.java",
    "content": "package com.slidingmenu.lib;\n\nimport android.graphics.Canvas;\nimport android.view.animation.Interpolator;\n\nimport com.slidingmenu.lib.SlidingMenu.CanvasTransformer;\n\npublic class CanvasTransformerBuilder {\n\n\tprivate CanvasTransformer mTrans;\n\n\tprivate static Interpolator lin = new Interpolator() {\n\t\tpublic float getInterpolation(float t) {\n\t\t\treturn t;\n\t\t}\n\t};\n\n\tprivate void initTransformer() {\n\t\tif (mTrans == null)\n\t\t\tmTrans = new CanvasTransformer() {\n\t\t\tpublic void transformCanvas(Canvas canvas, float percentOpen) {\t}\n\t\t};\n\t}\n\n\tpublic CanvasTransformer zoom(final int openedX, final int closedX, \n\t\t\tfinal int openedY, final int closedY, \n\t\t\tfinal int px, final int py) {\n\t\treturn zoom(openedX, closedX, openedY, closedY, px, py, lin);\n\t}\n\n\tpublic CanvasTransformer zoom(final int openedX, final int closedX, \n\t\t\tfinal int openedY, final int closedY,\n\t\t\tfinal int px, final int py, final Interpolator interp) {\n\t\tinitTransformer();\n\t\tmTrans = new CanvasTransformer() {\n\t\t\tpublic void transformCanvas(Canvas canvas, float percentOpen) {\n\t\t\t\tmTrans.transformCanvas(canvas, percentOpen);\n\t\t\t\tfloat f = interp.getInterpolation(percentOpen);\n\t\t\t\tcanvas.scale((openedX - closedX) * f + closedX,\n\t\t\t\t\t\t(openedY - closedY) * f + closedY, px, py);\n\t\t\t}\t\t\t\n\t\t};\n\t\treturn mTrans;\n\t}\n\n\tpublic CanvasTransformer rotate(final int openedDeg, final int closedDeg, \n\t\t\tfinal int px, final int py) {\n\t\treturn rotate(openedDeg, closedDeg, px, py, lin);\n\t}\n\n\tpublic CanvasTransformer rotate(final int openedDeg, final int closedDeg, \n\t\t\tfinal int px, final int py, final Interpolator interp) {\n\t\tinitTransformer();\n\t\tmTrans = new CanvasTransformer() {\n\t\t\tpublic void transformCanvas(Canvas canvas, float percentOpen) {\n\t\t\t\tmTrans.transformCanvas(canvas, percentOpen);\n\t\t\t\tfloat f = interp.getInterpolation(percentOpen);\n\t\t\t\tcanvas.rotate((openedDeg - closedDeg) * f + closedDeg, \n\t\t\t\t\t\tpx, py);\n\t\t\t}\t\t\t\n\t\t};\n\t\treturn mTrans;\n\t}\n\n\tpublic CanvasTransformer translate(final int openedX, final int closedX, \n\t\t\tfinal int openedY, final int closedY) {\n\t\treturn translate(openedX, closedX, openedY, closedY, lin);\n\t}\n\n\tpublic CanvasTransformer translate(final int openedX, final int closedX, \n\t\t\tfinal int openedY, final int closedY, final Interpolator interp) {\n\t\tinitTransformer();\n\t\tmTrans = new CanvasTransformer() {\n\t\t\tpublic void transformCanvas(Canvas canvas, float percentOpen) {\n\t\t\t\tmTrans.transformCanvas(canvas, percentOpen);\n\t\t\t\tfloat f = interp.getInterpolation(percentOpen);\n\t\t\t\tcanvas.translate((openedX - closedX) * f + closedX,\n\t\t\t\t\t\t(openedY - closedY) * f + closedY);\n\t\t\t}\t\t\t\n\t\t};\n\t\treturn mTrans;\n\t}\n\n\tpublic CanvasTransformer concatTransformer(final CanvasTransformer t) {\n\t\tinitTransformer();\n\t\tmTrans = new CanvasTransformer() {\n\t\t\tpublic void transformCanvas(Canvas canvas, float percentOpen) {\n\t\t\t\tmTrans.transformCanvas(canvas, percentOpen);\n\t\t\t\tt.transformCanvas(canvas, percentOpen);\n\t\t\t}\t\t\t\n\t\t};\n\t\treturn mTrans;\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/CustomViewAbove.java",
    "content": "package com.slidingmenu.lib;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport android.content.Context;\nimport android.graphics.Canvas;\nimport android.graphics.Rect;\nimport android.os.Build;\nimport android.support.v4.view.KeyEventCompat;\nimport android.support.v4.view.MotionEventCompat;\nimport android.support.v4.view.VelocityTrackerCompat;\nimport android.support.v4.view.ViewCompat;\nimport android.support.v4.view.ViewConfigurationCompat;\nimport android.util.AttributeSet;\nimport android.util.FloatMath;\nimport android.util.Log;\nimport android.view.FocusFinder;\nimport android.view.KeyEvent;\nimport android.view.MotionEvent;\nimport android.view.SoundEffectConstants;\nimport android.view.VelocityTracker;\nimport android.view.View;\nimport android.view.ViewConfiguration;\nimport android.view.ViewGroup;\nimport android.view.animation.Interpolator;\nimport android.widget.Scroller;\n\nimport com.slidingmenu.lib.SlidingMenu.OnClosedListener;\nimport com.slidingmenu.lib.SlidingMenu.OnOpenedListener;\n//import com.slidingmenu.lib.SlidingMenu.OnCloseListener;\n//import com.slidingmenu.lib.SlidingMenu.OnOpenListener;\n\npublic class CustomViewAbove extends ViewGroup {\n\n\tprivate static final String TAG = \"CustomViewAbove\";\n\tprivate static final boolean DEBUG = false;\n\n\tprivate static final boolean USE_CACHE = false;\n\n\tprivate static final int MAX_SETTLE_DURATION = 600; // ms\n\tprivate static final int MIN_DISTANCE_FOR_FLING = 25; // dips\n\n\tprivate static final Interpolator sInterpolator = new Interpolator() {\n\t\tpublic float getInterpolation(float t) {\n\t\t\tt -= 1.0f;\n\t\t\treturn t * t * t * t * t + 1.0f;\n\t\t}\n\t};\n\n\tprivate View mContent;\n\n\tprivate int mCurItem;\n\tprivate Scroller mScroller;\n\n\tprivate boolean mScrollingCacheEnabled;\n\n\tprivate boolean mScrolling;\n\n\tprivate boolean mIsBeingDragged;\n\tprivate boolean mIsUnableToDrag;\n\tprivate int mTouchSlop;\n\tprivate float mInitialMotionX;\n\t/**\n\t * Position of the last motion event.\n\t */\n\tprivate float mLastMotionX;\n\tprivate float mLastMotionY;\n\t/**\n\t * ID of the active pointer. This is used to retain consistency during\n\t * drags/flings if multiple pointers are used.\n\t */\n\tprotected int mActivePointerId = INVALID_POINTER;\n\t/**\n\t * Sentinel value for no current active pointer.\n\t * Used by {@link #mActivePointerId}.\n\t */\n\tprivate static final int INVALID_POINTER = -1;\n\n\t/**\n\t * Determines speed during touch scrolling\n\t */\n\tprotected VelocityTracker mVelocityTracker;\n\tprivate int mMinimumVelocity;\n\tprotected int mMaximumVelocity;\n\tprivate int mFlingDistance;\n\n\tprivate CustomViewBehind mViewBehind;\n\t//\tprivate int mMode;\n\tprivate boolean mEnabled = true;\n\n\tprivate OnPageChangeListener mOnPageChangeListener;\n\tprivate OnPageChangeListener mInternalPageChangeListener;\n\n\t//\tprivate OnCloseListener mCloseListener;\n\t//\tprivate OnOpenListener mOpenListener;\n\tprivate OnClosedListener mClosedListener;\n\tprivate OnOpenedListener mOpenedListener;\n\n\tprivate List<View> mIgnoredViews = new ArrayList<View>();\n\n\t//\tprivate int mScrollState = SCROLL_STATE_IDLE;\n\n\t/**\n\t * Callback interface for responding to changing state of the selected page.\n\t */\n\tpublic interface OnPageChangeListener {\n\n\t\t/**\n\t\t * This method will be invoked when the current page is scrolled, either as part\n\t\t * of a programmatically initiated smooth scroll or a user initiated touch scroll.\n\t\t *\n\t\t * @param position Position index of the first page currently being displayed.\n\t\t *                 Page position+1 will be visible if positionOffset is nonzero.\n\t\t * @param positionOffset Value from [0, 1) indicating the offset from the page at position.\n\t\t * @param positionOffsetPixels Value in pixels indicating the offset from position.\n\t\t */\n\t\tpublic void onPageScrolled(int position, float positionOffset, int positionOffsetPixels);\n\n\t\t/**\n\t\t * This method will be invoked when a new page becomes selected. Animation is not\n\t\t * necessarily complete.\n\t\t *\n\t\t * @param position Position index of the new selected page.\n\t\t */\n\t\tpublic void onPageSelected(int position);\n\n\t}\n\n\t/**\n\t * Simple implementation of the {@link OnPageChangeListener} interface with stub\n\t * implementations of each method. Extend this if you do not intend to override\n\t * every method of {@link OnPageChangeListener}.\n\t */\n\tpublic static class SimpleOnPageChangeListener implements OnPageChangeListener {\n\n\t\tpublic void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n\t\t\t// This space for rent\n\t\t}\n\n\t\tpublic void onPageSelected(int position) {\n\t\t\t// This space for rent\n\t\t}\n\n\t\tpublic void onPageScrollStateChanged(int state) {\n\t\t\t// This space for rent\n\t\t}\n\n\t}\n\n\tpublic CustomViewAbove(Context context) {\n\t\tthis(context, null);\n\t}\n\n\tpublic CustomViewAbove(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t\tinitCustomViewAbove();\n\t}\n\n\tvoid initCustomViewAbove() {\n\t\tsetWillNotDraw(false);\n\t\tsetDescendantFocusability(FOCUS_AFTER_DESCENDANTS);\n\t\tsetFocusable(true);\n\t\tfinal Context context = getContext();\n\t\tmScroller = new Scroller(context, sInterpolator);\n\t\tfinal ViewConfiguration configuration = ViewConfiguration.get(context);\n\t\tmTouchSlop = ViewConfigurationCompat.getScaledPagingTouchSlop(configuration);\n\t\tmMinimumVelocity = configuration.getScaledMinimumFlingVelocity();\n\t\tmMaximumVelocity = configuration.getScaledMaximumFlingVelocity();\n\t\tsetInternalPageChangeListener(new SimpleOnPageChangeListener() {\n\t\t\tpublic void onPageSelected(int position) {\n\t\t\t\tif (mViewBehind != null) {\n\t\t\t\t\tswitch (position) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tmViewBehind.setChildrenEnabled(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tmViewBehind.setChildrenEnabled(false);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfinal float density = context.getResources().getDisplayMetrics().density;\n\t\tmFlingDistance = (int) (MIN_DISTANCE_FOR_FLING * density);\n\t}\n\n\t/**\n\t * Set the currently selected page. If the CustomViewPager has already been through its first\n\t * layout there will be a smooth animated transition between the current item and the\n\t * specified item.\n\t *\n\t * @param item Item index to select\n\t */\n\tpublic void setCurrentItem(int item) {\n\t\tsetCurrentItemInternal(item, true, false);\n\t}\n\n\t/**\n\t * Set the currently selected page.\n\t *\n\t * @param item Item index to select\n\t * @param smoothScroll True to smoothly scroll to the new item, false to transition immediately\n\t */\n\tpublic void setCurrentItem(int item, boolean smoothScroll) {\n\t\tsetCurrentItemInternal(item, smoothScroll, false);\n\t}\n\n\tpublic int getCurrentItem() {\n\t\treturn mCurItem;\n\t}\n\n\tvoid setCurrentItemInternal(int item, boolean smoothScroll, boolean always) {\n\t\tsetCurrentItemInternal(item, smoothScroll, always, 0);\n\t}\n\n\tvoid setCurrentItemInternal(int item, boolean smoothScroll, boolean always, int velocity) {\n\t\tif (!always && mCurItem == item) {\n\t\t\tsetScrollingCacheEnabled(false);\n\t\t\treturn;\n\t\t}\n\n\t\titem = mViewBehind.getMenuPage(item);\n\n\t\tfinal boolean dispatchSelected = mCurItem != item;\n\t\tmCurItem = item;\n\t\tfinal int destX = getDestScrollX(mCurItem);\n\t\tif (dispatchSelected && mOnPageChangeListener != null) {\n\t\t\tmOnPageChangeListener.onPageSelected(item);\n\t\t}\n\t\tif (dispatchSelected && mInternalPageChangeListener != null) {\n\t\t\tmInternalPageChangeListener.onPageSelected(item);\n\t\t}\n\t\tif (smoothScroll) {\n\t\t\tsmoothScrollTo(destX, 0, velocity);\n\t\t} else {\n\t\t\tcompleteScroll();\n\t\t\tscrollTo(destX, 0);\n\t\t}\n\t}\n\n\t/**\n\t * Set a listener that will be invoked whenever the page changes or is incrementally\n\t * scrolled. See {@link OnPageChangeListener}.\n\t *\n\t * @param listener Listener to set\n\t */\n\tpublic void setOnPageChangeListener(OnPageChangeListener listener) {\n\t\tmOnPageChangeListener = listener;\n\t}\n\t/*\n\tpublic void setOnOpenListener(OnOpenListener l) {\n\t\tmOpenListener = l;\n\t}\n\n\tpublic void setOnCloseListener(OnCloseListener l) {\n\t\tmCloseListener = l;\n\t}\n\t */\n\tpublic void setOnOpenedListener(OnOpenedListener l) {\n\t\tmOpenedListener = l;\n\t}\n\n\tpublic void setOnClosedListener(OnClosedListener l) {\n\t\tmClosedListener = l;\n\t}\n\n\t/**\n\t * Set a separate OnPageChangeListener for internal use by the support library.\n\t *\n\t * @param listener Listener to set\n\t * @return The old listener that was set, if any.\n\t */\n\tOnPageChangeListener setInternalPageChangeListener(OnPageChangeListener listener) {\n\t\tOnPageChangeListener oldListener = mInternalPageChangeListener;\n\t\tmInternalPageChangeListener = listener;\n\t\treturn oldListener;\n\t}\n\n\tpublic void addIgnoredView(View v) {\n\t\tif (!mIgnoredViews.contains(v)) {\n\t\t\tmIgnoredViews.add(v);\n\t\t}\n\t}\n\n\tpublic void removeIgnoredView(View v) {\n\t\tmIgnoredViews.remove(v);\n\t}\n\n\tpublic void clearIgnoredViews() {\n\t\tmIgnoredViews.clear();\n\t}\n\n\t// We want the duration of the page snap animation to be influenced by the distance that\n\t// the screen has to travel, however, we don't want this duration to be effected in a\n\t// purely linear fashion. Instead, we use this method to moderate the effect that the distance\n\t// of travel has on the overall snap duration.\n\tfloat distanceInfluenceForSnapDuration(float f) {\n\t\tf -= 0.5f; // center the values about 0.\n\t\tf *= 0.3f * Math.PI / 2.0f;\n\t\treturn (float) FloatMath.sin(f);\n\t}\n\n\tpublic int getDestScrollX(int page) {\n\t\tswitch (page) {\n\t\tcase 0:\n\t\tcase 2:\n\t\t\treturn mViewBehind.getMenuLeft(mContent, page);\n\t\tcase 1:\n\t\t\treturn mContent.getLeft();\n\t\t}\n\t\treturn 0;\n\t}\n\n\tprivate int getLeftBound() {\n\t\treturn mViewBehind.getAbsLeftBound(mContent);\n\t}\n\n\tprivate int getRightBound() {\n\t\treturn mViewBehind.getAbsRightBound(mContent);\n\t}\n\n\tpublic int getContentLeft() {\n\t\treturn mContent.getLeft() + mContent.getPaddingLeft();\n\t}\n\n\tpublic boolean isMenuOpen() {\n\t\treturn mCurItem == 0 || mCurItem == 2;\n\t}\n\n\tprivate boolean isInIgnoredView(MotionEvent ev) {\n\t\tRect rect = new Rect();\n\t\tfor (View v : mIgnoredViews) {\n\t\t\tv.getHitRect(rect);\n\t\t\tif (rect.contains((int)ev.getX(), (int)ev.getY())) return true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic int getBehindWidth() {\n\t\tif (mViewBehind == null) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn mViewBehind.getBehindWidth();\n\t\t}\n\t}\n\n\tpublic int getChildWidth(int i) {\n\t\tswitch (i) {\n\t\tcase 0:\n\t\t\treturn getBehindWidth();\n\t\tcase 1:\n\t\t\treturn mContent.getWidth();\n\t\tdefault:\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\tpublic boolean isSlidingEnabled() {\n\t\treturn mEnabled;\n\t}\n\n\tpublic void setSlidingEnabled(boolean b) {\n\t\tmEnabled = b;\n\t}\n\n\t/**\n\t * Like {@link View#scrollBy}, but scroll smoothly instead of immediately.\n\t *\n\t * @param x the number of pixels to scroll by on the X axis\n\t * @param y the number of pixels to scroll by on the Y axis\n\t */\n\tvoid smoothScrollTo(int x, int y) {\n\t\tsmoothScrollTo(x, y, 0);\n\t}\n\n\t/**\n\t * Like {@link View#scrollBy}, but scroll smoothly instead of immediately.\n\t *\n\t * @param x the number of pixels to scroll by on the X axis\n\t * @param y the number of pixels to scroll by on the Y axis\n\t * @param velocity the velocity associated with a fling, if applicable. (0 otherwise)\n\t */\n\tvoid smoothScrollTo(int x, int y, int velocity) {\n\t\tif (getChildCount() == 0) {\n\t\t\t// Nothing to do.\n\t\t\tsetScrollingCacheEnabled(false);\n\t\t\treturn;\n\t\t}\n\t\tint sx = getScrollX();\n\t\tint sy = getScrollY();\n\t\tint dx = x - sx;\n\t\tint dy = y - sy;\n\t\tif (dx == 0 && dy == 0) {\n\t\t\tcompleteScroll();\n\t\t\tif (isMenuOpen()) {\n\t\t\t\tif (mOpenedListener != null)\n\t\t\t\t\tmOpenedListener.onOpened();\n\t\t\t} else {\n\t\t\t\tif (mClosedListener != null)\n\t\t\t\t\tmClosedListener.onClosed();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tsetScrollingCacheEnabled(true);\n\t\tmScrolling = true;\n\n\t\tfinal int width = getBehindWidth();\n\t\tfinal int halfWidth = width / 2;\n\t\tfinal float distanceRatio = Math.min(1f, 1.0f * Math.abs(dx) / width);\n\t\tfinal float distance = halfWidth + halfWidth *\n\t\t\t\tdistanceInfluenceForSnapDuration(distanceRatio);\n\n\t\tint duration = 0;\n\t\tvelocity = Math.abs(velocity);\n\t\tif (velocity > 0) {\n\t\t\tduration = 4 * Math.round(1000 * Math.abs(distance / velocity));\n\t\t} else {\n\t\t\tfinal float pageDelta = (float) Math.abs(dx) / width;\n\t\t\tduration = (int) ((pageDelta + 1) * 100);\n\t\t\tduration = MAX_SETTLE_DURATION;\n\t\t}\n\t\tduration = Math.min(duration, MAX_SETTLE_DURATION);\n\n\t\tmScroller.startScroll(sx, sy, dx, dy, duration);\n\t\tinvalidate();\n\t}\n\n\tpublic void setContent(View v) {\n\t\tif (mContent != null) \n\t\t\tthis.removeView(mContent);\n\t\tmContent = v;\n\t\taddView(mContent);\n\t}\n\n\tpublic View getContent() {\n\t\treturn mContent;\n\t}\n\n\tpublic void setCustomViewBehind(CustomViewBehind cvb) {\n\t\tmViewBehind = cvb;\n\t}\n\n\t@Override\n\tprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n\n\t\tint width = getDefaultSize(0, widthMeasureSpec);\n\t\tint height = getDefaultSize(0, heightMeasureSpec);\n\t\tsetMeasuredDimension(width, height);\n\n\t\tfinal int contentWidth = getChildMeasureSpec(widthMeasureSpec, 0, width);\n\t\tfinal int contentHeight = getChildMeasureSpec(heightMeasureSpec, 0, height);\n\t\tmContent.measure(contentWidth, contentHeight);\n\t}\n\n\t@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\n\t\t// Make sure scroll position is set correctly.\n\t\tif (w != oldw) {\n\t\t\t// [ChrisJ] - This fixes the onConfiguration change for orientation issue..\n\t\t\t// maybe worth having a look why the recomputeScroll pos is screwing\n\t\t\t// up?\n\t\t\tcompleteScroll();\n\t\t\tscrollTo(getDestScrollX(mCurItem), getScrollY());\n\t\t}\n\t}\n\n\t@Override\n\tprotected void onLayout(boolean changed, int l, int t, int r, int b) {\n\t\tfinal int width = r - l;\n\t\tfinal int height = b - t;\n\t\tmContent.layout(0, 0, width, height);\n\t}\n\n\tpublic void setAboveOffset(int i) {\n\t\t//\t\tRelativeLayout.LayoutParams params = ((RelativeLayout.LayoutParams)mContent.getLayoutParams());\n\t\t//\t\tparams.setMargins(i, params.topMargin, params.rightMargin, params.bottomMargin);\n\t\tmContent.setPadding(i, mContent.getPaddingTop(), \n\t\t\t\tmContent.getPaddingRight(), mContent.getPaddingBottom());\n\t}\n\n\n\t@Override\n\tpublic void computeScroll() {\n\t\tif (!mScroller.isFinished()) {\n\t\t\tif (mScroller.computeScrollOffset()) {\n\t\t\t\tint oldX = getScrollX();\n\t\t\t\tint oldY = getScrollY();\n\t\t\t\tint x = mScroller.getCurrX();\n\t\t\t\tint y = mScroller.getCurrY();\n\n\t\t\t\tif (oldX != x || oldY != y) {\n\t\t\t\t\tscrollTo(x, y);\n\t\t\t\t\tpageScrolled(x);\n\t\t\t\t}\n\n\t\t\t\t// Keep on drawing until the animation has finished.\n\t\t\t\tinvalidate();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// Done with scroll, clean up state.\n\t\tcompleteScroll();\n\t}\n\n\tprivate void pageScrolled(int xpos) {\n\t\tfinal int widthWithMargin = getWidth();\n\t\tfinal int position = xpos / widthWithMargin;\n\t\tfinal int offsetPixels = xpos % widthWithMargin;\n\t\tfinal float offset = (float) offsetPixels / widthWithMargin;\n\n\t\tonPageScrolled(position, offset, offsetPixels);\n\t}\n\n\t/**\n\t * This method will be invoked when the current page is scrolled, either as part\n\t * of a programmatically initiated smooth scroll or a user initiated touch scroll.\n\t * If you override this method you must call through to the superclass implementation\n\t * (e.g. super.onPageScrolled(position, offset, offsetPixels)) before onPageScrolled\n\t * returns.\n\t *\n\t * @param position Position index of the first page currently being displayed.\n\t *                 Page position+1 will be visible if positionOffset is nonzero.\n\t * @param offset Value from [0, 1) indicating the offset from the page at position.\n\t * @param offsetPixels Value in pixels indicating the offset from position.\n\t */\n\tprotected void onPageScrolled(int position, float offset, int offsetPixels) {\n\t\tif (mOnPageChangeListener != null) {\n\t\t\tmOnPageChangeListener.onPageScrolled(position, offset, offsetPixels);\n\t\t}\n\t\tif (mInternalPageChangeListener != null) {\n\t\t\tmInternalPageChangeListener.onPageScrolled(position, offset, offsetPixels);\n\t\t}\n\t}\n\n\tprivate void completeScroll() {\n\t\tboolean needPopulate = mScrolling;\n\t\tif (needPopulate) {\n\t\t\t// Done with scroll, no longer want to cache view drawing.\n\t\t\tsetScrollingCacheEnabled(false);\n\t\t\tmScroller.abortAnimation();\n\t\t\tint oldX = getScrollX();\n\t\t\tint oldY = getScrollY();\n\t\t\tint x = mScroller.getCurrX();\n\t\t\tint y = mScroller.getCurrY();\n\t\t\tif (oldX != x || oldY != y) {\n\t\t\t\tscrollTo(x, y);\n\t\t\t}\n\t\t\tif (isMenuOpen()) {\n\t\t\t\tif (mOpenedListener != null)\n\t\t\t\t\tmOpenedListener.onOpened();\n\t\t\t} else {\n\t\t\t\tif (mClosedListener != null)\n\t\t\t\t\tmClosedListener.onClosed();\n\t\t\t}\n\t\t}\n\t\tmScrolling = false;\n\t}\n\n\tprotected int mTouchMode = SlidingMenu.TOUCHMODE_MARGIN;\n\n\tpublic void setTouchMode(int i) {\n\t\tmTouchMode = i;\n\t}\n\n\tpublic int getTouchMode() {\n\t\treturn mTouchMode;\n\t}\n\n\tprivate boolean thisTouchAllowed(MotionEvent ev) {\n\t\tint x = (int) (ev.getX() + mScrollX);\n\t\tif (isMenuOpen()) {\n\t\t\treturn mViewBehind.menuOpenTouchAllowed(mContent, mCurItem, x);\n\t\t} else {\n\t\t\tswitch (mTouchMode) {\n\t\t\tcase SlidingMenu.TOUCHMODE_FULLSCREEN:\n\t\t\t\treturn !isInIgnoredView(ev);\n\t\t\tcase SlidingMenu.TOUCHMODE_NONE:\n\t\t\t\treturn false;\n\t\t\tcase SlidingMenu.TOUCHMODE_MARGIN:\n\t\t\t\treturn mViewBehind.marginTouchAllowed(mContent, x);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate boolean thisSlideAllowed(float dx) {\n\t\tboolean allowed = false;\n\t\tif (isMenuOpen()) {\n\t\t\tallowed = mViewBehind.menuOpenSlideAllowed(dx);\n\t\t} else {\n\t\t\tallowed = mViewBehind.menuClosedSlideAllowed(dx);\n\t\t}\n\t\tif (DEBUG)\n\t\t\tLog.v(TAG, \"this slide allowed \" + allowed + \" dx: \" + dx);\n\t\treturn allowed;\n\t}\n\n\tprivate int getPointerIndex(MotionEvent ev, int id) {\n\t\tint activePointerIndex = MotionEventCompat.findPointerIndex(ev, id);\n\t\tif (activePointerIndex == -1)\n\t\t\tmActivePointerId = INVALID_POINTER;\n\t\treturn activePointerIndex;\n\t}\n\n\tprivate boolean mQuickReturn = false;\n\n\t@Override\n\tpublic boolean onInterceptTouchEvent(MotionEvent ev) {\n\n\t\tif (!mEnabled)\n\t\t\treturn false;\n\n\t\tfinal int action = ev.getAction() & MotionEventCompat.ACTION_MASK;\n\n\t\tif (DEBUG)\n\t\t\tif (action == MotionEvent.ACTION_DOWN)\n\t\t\t\tLog.v(TAG, \"Received ACTION_DOWN\");\n\n\t\tif (action == MotionEvent.ACTION_CANCEL || action == MotionEvent.ACTION_UP\n\t\t\t\t|| (action != MotionEvent.ACTION_DOWN && mIsUnableToDrag)) {\n\t\t\tendDrag();\n\t\t\treturn false;\n\t\t}\n\n\t\tswitch (action) {\n\t\tcase MotionEvent.ACTION_MOVE:\n\t\t\tdetermineDrag(ev);\n\t\t\tbreak;\n\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\tint index = MotionEventCompat.getActionIndex(ev);\n\t\t\tmActivePointerId = MotionEventCompat.getPointerId(ev, index);\n\t\t\tif (mActivePointerId == INVALID_POINTER)\n\t\t\t\tbreak;\n\t\t\tmLastMotionX = mInitialMotionX = MotionEventCompat.getX(ev, index);\n\t\t\tmLastMotionY = MotionEventCompat.getY(ev, index);\n\t\t\tif (thisTouchAllowed(ev)) {\n\t\t\t\tmIsBeingDragged = false;\n\t\t\t\tmIsUnableToDrag = false;\n\t\t\t\tif (isMenuOpen() && mViewBehind.menuTouchInQuickReturn(mContent, mCurItem, ev.getX() + mScrollX)) {\n\t\t\t\t\tmQuickReturn = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmIsUnableToDrag = true;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase MotionEventCompat.ACTION_POINTER_UP:\n\t\t\tonSecondaryPointerUp(ev);\n\t\t\tbreak;\n\t\t}\n\n\t\tif (!mIsBeingDragged) {\n\t\t\tif (mVelocityTracker == null) {\n\t\t\t\tmVelocityTracker = VelocityTracker.obtain();\n\t\t\t}\n\t\t\tmVelocityTracker.addMovement(ev);\n\t\t}\n\t\treturn mIsBeingDragged || mQuickReturn;\n\t}\n\n\n\t@Override\n\tpublic boolean onTouchEvent(MotionEvent ev) {\n\n\t\tif (!mEnabled)\n\t\t\treturn false;\n\n\t\tif (!mIsBeingDragged && !thisTouchAllowed(ev))\n\t\t\treturn false;\n\n\t\t//\t\tif (!mIsBeingDragged && !mQuickReturn)\n\t\t//\t\t\treturn false;\n\n\t\tfinal int action = ev.getAction();\n\n\t\tif (mVelocityTracker == null) {\n\t\t\tmVelocityTracker = VelocityTracker.obtain();\n\t\t}\n\t\tmVelocityTracker.addMovement(ev);\n\n\t\tswitch (action & MotionEventCompat.ACTION_MASK) {\n\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t/*\n\t\t\t * If being flinged and user touches, stop the fling. isFinished\n\t\t\t * will be false if being flinged.\n\t\t\t */\n\t\t\tcompleteScroll();\n\n\t\t\t// Remember where the motion event started\n\t\t\tint index = MotionEventCompat.getActionIndex(ev);\n\t\t\tmActivePointerId = MotionEventCompat.getPointerId(ev, index);\n\t\t\tmLastMotionX = mInitialMotionX = ev.getX();\n\t\t\tbreak;\n\t\tcase MotionEvent.ACTION_MOVE:\n\t\t\tif (!mIsBeingDragged) {\t\n\t\t\t\tdetermineDrag(ev);\n\t\t\t\tif (mIsUnableToDrag)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (mIsBeingDragged) {\n\t\t\t\t// Scroll to follow the motion event\n\t\t\t\tfinal int activePointerIndex = getPointerIndex(ev, mActivePointerId);\n\t\t\t\tif (mActivePointerId == INVALID_POINTER)\n\t\t\t\t\tbreak;\n\t\t\t\tfinal float x = MotionEventCompat.getX(ev, activePointerIndex);\n\t\t\t\tfinal float deltaX = mLastMotionX - x;\n\t\t\t\tmLastMotionX = x;\n\t\t\t\tfloat oldScrollX = getScrollX();\n\t\t\t\tfloat scrollX = oldScrollX + deltaX;\n\t\t\t\tfinal float leftBound = getLeftBound();\n\t\t\t\tfinal float rightBound = getRightBound();\n\t\t\t\tif (scrollX < leftBound) {\n\t\t\t\t\tscrollX = leftBound;\n\t\t\t\t} else if (scrollX > rightBound) {\n\t\t\t\t\tscrollX = rightBound;\n\t\t\t\t}\n\t\t\t\t// Don't lose the rounded component\n\t\t\t\tmLastMotionX += scrollX - (int) scrollX;\n\t\t\t\tscrollTo((int) scrollX, getScrollY());\n\t\t\t\tpageScrolled((int) scrollX);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase MotionEvent.ACTION_UP:\n\t\t\tif (mIsBeingDragged) {\n\t\t\t\tfinal VelocityTracker velocityTracker = mVelocityTracker;\n\t\t\t\tvelocityTracker.computeCurrentVelocity(1000, mMaximumVelocity);\n\t\t\t\tint initialVelocity = (int) VelocityTrackerCompat.getXVelocity(\n\t\t\t\t\t\tvelocityTracker, mActivePointerId);\n\t\t\t\tfinal int scrollX = getScrollX();\n\t\t\t\t//\t\t\t\tfinal int widthWithMargin = getWidth();\n\t\t\t\t//\t\t\t\tfinal float pageOffset = (float) (scrollX % widthWithMargin) / widthWithMargin;\n\t\t\t\t// TODO test this. should get better flinging behavior\n\t\t\t\tfinal float pageOffset = (float) (scrollX - getDestScrollX(mCurItem)) / getBehindWidth();\n\t\t\t\tfinal int activePointerIndex = getPointerIndex(ev, mActivePointerId);\n\t\t\t\tif (mActivePointerId != INVALID_POINTER) {\n\t\t\t\t\tfinal float x = MotionEventCompat.getX(ev, activePointerIndex);\n\t\t\t\t\tfinal int totalDelta = (int) (x - mInitialMotionX);\n\t\t\t\t\tint nextPage = determineTargetPage(pageOffset, initialVelocity, totalDelta);\n\t\t\t\t\tsetCurrentItemInternal(nextPage, true, true, initialVelocity);\n\t\t\t\t} else {\t\n\t\t\t\t\tsetCurrentItemInternal(mCurItem, true, true, initialVelocity);\n\t\t\t\t}\n\t\t\t\tmActivePointerId = INVALID_POINTER;\n\t\t\t\tendDrag();\n\t\t\t} else if (mQuickReturn && mViewBehind.menuTouchInQuickReturn(mContent, mCurItem, ev.getX() + mScrollX)) {\n\t\t\t\t// close the menu\n\t\t\t\tsetCurrentItem(1);\n\t\t\t\tendDrag();\n\t\t\t}\n\t\t\tbreak;\n\t\tcase MotionEvent.ACTION_CANCEL:\n\t\t\tif (mIsBeingDragged) {\n\t\t\t\tsetCurrentItemInternal(mCurItem, true, true);\n\t\t\t\tmActivePointerId = INVALID_POINTER;\n\t\t\t\tendDrag();\n\t\t\t}\n\t\t\tbreak;\n\t\tcase MotionEventCompat.ACTION_POINTER_DOWN: {\n\t\t\tfinal int indexx = MotionEventCompat.getActionIndex(ev);\n\t\t\tmLastMotionX = MotionEventCompat.getX(ev, indexx);\n\t\t\tmActivePointerId = MotionEventCompat.getPointerId(ev, indexx);\n\t\t\tbreak;\n\t\t}\n\t\tcase MotionEventCompat.ACTION_POINTER_UP:\n\t\t\tonSecondaryPointerUp(ev);\n\t\t\tint pointerIndex = getPointerIndex(ev, mActivePointerId);\n\t\t\tif (mActivePointerId == INVALID_POINTER)\n\t\t\t\tbreak;\n\t\t\tmLastMotionX = MotionEventCompat.getX(ev, pointerIndex);\n\t\t\tbreak;\n\t\t}\n\t\treturn true;\n\t}\n\t\n\tprivate void determineDrag(MotionEvent ev) {\n\t\tfinal int activePointerId = mActivePointerId;\n\t\tfinal int pointerIndex = getPointerIndex(ev, activePointerId);\n\t\tif (activePointerId == INVALID_POINTER)\n\t\t\treturn;\n\t\tfinal float x = MotionEventCompat.getX(ev, pointerIndex);\n\t\tfinal float dx = x - mLastMotionX;\n\t\tfinal float xDiff = Math.abs(dx);\n\t\tfinal float y = MotionEventCompat.getY(ev, pointerIndex);\n\t\tfinal float dy = y - mLastMotionY;\n\t\tfinal float yDiff = Math.abs(dy);\n\t\tif (xDiff > (isMenuOpen()?mTouchSlop/2:mTouchSlop) && xDiff > yDiff && thisSlideAllowed(dx)) {\t\t\n\t\t\tstartDrag();\n\t\t\tmLastMotionX = x;\n\t\t\tmLastMotionY = y;\n\t\t\tsetScrollingCacheEnabled(true);\n\t\t\t// TODO add back in touch slop check\n\t\t} else if (xDiff > mTouchSlop) {\n\t\t\tmIsUnableToDrag = true;\n\t\t}\n\t}\n\n\t@Override\n\tpublic void scrollTo(int x, int y) {\n\t\tsuper.scrollTo(x, y);\n\t\tmScrollX = x;\n\t\tif (mEnabled)\n\t\t\tmViewBehind.scrollBehindTo(mContent, x, y);\t\n\t\t((SlidingMenu)getParent()).manageLayers(getPercentOpen());\n\t}\n\n\tprivate int determineTargetPage(float pageOffset, int velocity, int deltaX) {\n\t\tint targetPage = mCurItem;\n\t\tif (Math.abs(deltaX) > mFlingDistance && Math.abs(velocity) > mMinimumVelocity) {\n\t\t\tif (velocity > 0 && deltaX > 0) {\n\t\t\t\ttargetPage -= 1;\n\t\t\t} else if (velocity < 0 && deltaX < 0){\n\t\t\t\ttargetPage += 1;\n\t\t\t}\n\t\t} else {\n\t\t\ttargetPage = (int) Math.round(mCurItem + pageOffset);\n\t\t}\n\t\treturn targetPage;\n\t}\n\n\tprotected float getPercentOpen() {\n\t\treturn Math.abs(mScrollX-mContent.getLeft()) / getBehindWidth();\n\t}\n\n\t@Override\n\tprotected void dispatchDraw(Canvas canvas) {\n\t\tsuper.dispatchDraw(canvas);\n\t\t// Draw the margin drawable if needed.\n\t\tmViewBehind.drawShadow(mContent, canvas);\n\t\tmViewBehind.drawFade(mContent, canvas, getPercentOpen());\n\t\tmViewBehind.drawSelector(mContent, canvas, getPercentOpen());\n\t}\n\n\t// variables for drawing\n\tprivate float mScrollX = 0.0f;\n\n\tprivate void onSecondaryPointerUp(MotionEvent ev) {\n\t\tif (DEBUG) Log.v(TAG, \"onSecondaryPointerUp called\");\n\t\tfinal int pointerIndex = MotionEventCompat.getActionIndex(ev);\n\t\tfinal int pointerId = MotionEventCompat.getPointerId(ev, pointerIndex);\n\t\tif (pointerId == mActivePointerId) {\n\t\t\t// This was our active pointer going up. Choose a new\n\t\t\t// active pointer and adjust accordingly.\n\t\t\tfinal int newPointerIndex = pointerIndex == 0 ? 1 : 0;\n\t\t\tmLastMotionX = MotionEventCompat.getX(ev, newPointerIndex);\n\t\t\tmActivePointerId = MotionEventCompat.getPointerId(ev, newPointerIndex);\n\t\t\tif (mVelocityTracker != null) {\n\t\t\t\tmVelocityTracker.clear();\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate void startDrag() {\n\t\tmIsBeingDragged = true;\n\t\tmQuickReturn = false;\n\t}\n\n\tprivate void endDrag() {\n\t\tmQuickReturn = false;\n\t\tmIsBeingDragged = false;\n\t\tmIsUnableToDrag = false;\n\t\tmActivePointerId = INVALID_POINTER;\n\n\t\tif (mVelocityTracker != null) {\n\t\t\tmVelocityTracker.recycle();\n\t\t\tmVelocityTracker = null;\n\t\t}\n\t}\n\n\tprivate void setScrollingCacheEnabled(boolean enabled) {\n\t\tif (mScrollingCacheEnabled != enabled) {\n\t\t\tmScrollingCacheEnabled = enabled;\n\t\t\tif (USE_CACHE) {\n\t\t\t\tfinal int size = getChildCount();\n\t\t\t\tfor (int i = 0; i < size; ++i) {\n\t\t\t\t\tfinal View child = getChildAt(i);\n\t\t\t\t\tif (child.getVisibility() != GONE) {\n\t\t\t\t\t\tchild.setDrawingCacheEnabled(enabled);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Tests scrollability within child views of v given a delta of dx.\n\t *\n\t * @param v View to test for horizontal scrollability\n\t * @param checkV Whether the view v passed should itself be checked for scrollability (true),\n\t *               or just its children (false).\n\t * @param dx Delta scrolled in pixels\n\t * @param x X coordinate of the active touch point\n\t * @param y Y coordinate of the active touch point\n\t * @return true if child views of v can be scrolled by delta of dx.\n\t */\n\tprotected boolean canScroll(View v, boolean checkV, int dx, int x, int y) {\n\t\tif (v instanceof ViewGroup) {\n\t\t\tfinal ViewGroup group = (ViewGroup) v;\n\t\t\tfinal int scrollX = v.getScrollX();\n\t\t\tfinal int scrollY = v.getScrollY();\n\t\t\tfinal int count = group.getChildCount();\n\t\t\t// Count backwards - let topmost views consume scroll distance first.\n\t\t\tfor (int i = count - 1; i >= 0; i--) {\n\t\t\t\tfinal View child = group.getChildAt(i);\n\t\t\t\tif (x + scrollX >= child.getLeft() && x + scrollX < child.getRight() &&\n\t\t\t\t\t\ty + scrollY >= child.getTop() && y + scrollY < child.getBottom() &&\n\t\t\t\t\t\tcanScroll(child, true, dx, x + scrollX - child.getLeft(),\n\t\t\t\t\t\t\t\ty + scrollY - child.getTop())) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn checkV && ViewCompat.canScrollHorizontally(v, -dx);\n\t}\n\n\n\t@Override\n\tpublic boolean dispatchKeyEvent(KeyEvent event) {\n\t\t// Let the focused view and/or our descendants get the key first\n\t\treturn super.dispatchKeyEvent(event) || executeKeyEvent(event);\n\t}\n\n\t/**\n\t * You can call this function yourself to have the scroll view perform\n\t * scrolling from a key event, just as if the event had been dispatched to\n\t * it by the view hierarchy.\n\t *\n\t * @param event The key event to execute.\n\t * @return Return true if the event was handled, else false.\n\t */\n\tpublic boolean executeKeyEvent(KeyEvent event) {\n\t\tboolean handled = false;\n\t\tif (event.getAction() == KeyEvent.ACTION_DOWN) {\n\t\t\tswitch (event.getKeyCode()) {\n\t\t\tcase KeyEvent.KEYCODE_DPAD_LEFT:\n\t\t\t\thandled = arrowScroll(FOCUS_LEFT);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.KEYCODE_DPAD_RIGHT:\n\t\t\t\thandled = arrowScroll(FOCUS_RIGHT);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.KEYCODE_TAB:\n\t\t\t\tif (Build.VERSION.SDK_INT >= 11) {\n\t\t\t\t\t// The focus finder had a bug handling FOCUS_FORWARD and FOCUS_BACKWARD\n\t\t\t\t\t// before Android 3.0. Ignore the tab key on those devices.\n\t\t\t\t\tif (KeyEventCompat.hasNoModifiers(event)) {\n\t\t\t\t\t\thandled = arrowScroll(FOCUS_FORWARD);\n\t\t\t\t\t} else if (KeyEventCompat.hasModifiers(event, KeyEvent.META_SHIFT_ON)) {\n\t\t\t\t\t\thandled = arrowScroll(FOCUS_BACKWARD);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn handled;\n\t}\n\n\tpublic boolean arrowScroll(int direction) {\n\t\tView currentFocused = findFocus();\n\t\tif (currentFocused == this) currentFocused = null;\n\n\t\tboolean handled = false;\n\n\t\tView nextFocused = FocusFinder.getInstance().findNextFocus(this, currentFocused,\n\t\t\t\tdirection);\n\t\tif (nextFocused != null && nextFocused != currentFocused) {\n\t\t\tif (direction == View.FOCUS_LEFT) {\n\t\t\t\thandled = nextFocused.requestFocus();\n\t\t\t} else if (direction == View.FOCUS_RIGHT) {\n\t\t\t\t// If there is nothing to the right, or this is causing us to\n\t\t\t\t// jump to the left, then what we really want to do is page right.\n\t\t\t\tif (currentFocused != null && nextFocused.getLeft() <= currentFocused.getLeft()) {\n\t\t\t\t\thandled = pageRight();\n\t\t\t\t} else {\n\t\t\t\t\thandled = nextFocused.requestFocus();\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == FOCUS_LEFT || direction == FOCUS_BACKWARD) {\n\t\t\t// Trying to move left and nothing there; try to page.\n\t\t\thandled = pageLeft();\n\t\t} else if (direction == FOCUS_RIGHT || direction == FOCUS_FORWARD) {\n\t\t\t// Trying to move right and nothing there; try to page.\n\t\t\thandled = pageRight();\n\t\t}\n\t\tif (handled) {\n\t\t\tplaySoundEffect(SoundEffectConstants.getContantForFocusDirection(direction));\n\t\t}\n\t\treturn handled;\n\t}\n\n\tboolean pageLeft() {\n\t\tif (mCurItem > 0) {\n\t\t\tsetCurrentItem(mCurItem-1, true);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tboolean pageRight() {\n\t\tif (mCurItem < 1) {\n\t\t\tsetCurrentItem(mCurItem+1, true);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/CustomViewBehind.java",
    "content": "package com.slidingmenu.lib;\n\nimport android.content.Context;\nimport android.graphics.Bitmap;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphics.Paint;\nimport android.graphics.drawable.Drawable;\nimport android.util.AttributeSet;\nimport android.util.Log;\nimport android.util.TypedValue;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.ViewGroup;\n\nimport com.cwp.cmoneycharge.R;\nimport com.slidingmenu.lib.SlidingMenu.CanvasTransformer;\n\npublic class CustomViewBehind extends ViewGroup {\n\n\tprivate static final String TAG = \"CustomViewBehind\";\n\n\tprivate static final int MARGIN_THRESHOLD = 48; // dips\n\tprivate int mTouchMode = SlidingMenu.TOUCHMODE_MARGIN;\n\n\tprivate CustomViewAbove mViewAbove;\n\n\tprivate View mContent;\n\tprivate View mSecondaryContent;\n\tprivate int mMarginThreshold;\n\tprivate int mWidthOffset;\n\tprivate CanvasTransformer mTransformer;\n\tprivate boolean mChildrenEnabled;\n\n\tpublic CustomViewBehind(Context context) {\n\t\tthis(context, null);\n\t}\n\n\tpublic CustomViewBehind(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t\tmMarginThreshold = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, \n\t\t\t\tMARGIN_THRESHOLD, getResources().getDisplayMetrics());\n\t}\n\n\tpublic void setCustomViewAbove(CustomViewAbove customViewAbove) {\n\t\tmViewAbove = customViewAbove;\n\t}\n\n\tpublic void setCanvasTransformer(CanvasTransformer t) {\n\t\tmTransformer = t;\n\t}\n\n\tpublic void setWidthOffset(int i) {\n\t\tmWidthOffset = i;\n\t\trequestLayout();\n\t}\n\n\tpublic int getBehindWidth() {\n\t\treturn mContent.getWidth();\n\t}\n\n\tpublic void setContent(View v) {\n\t\tif (mContent != null)\n\t\t\tremoveView(mContent);\n\t\tmContent = v;\n\t\taddView(mContent);\n\t}\n\n\tpublic View getContent() {\n\t\treturn mContent;\n\t}\n\n\t/**\n\t * Sets the secondary (right) menu for use when setMode is called with SlidingMenu.LEFT_RIGHT.\n\t * @param v the right menu\n\t */\n\tpublic void setSecondaryContent(View v) {\n\t\tif (mSecondaryContent != null)\n\t\t\tremoveView(mSecondaryContent);\n\t\tmSecondaryContent = v;\n\t\taddView(mSecondaryContent);\n\t}\n\n\tpublic View getSecondaryContent() {\n\t\treturn mSecondaryContent;\n\t}\n\n\tpublic void setChildrenEnabled(boolean enabled) {\n\t\tmChildrenEnabled = enabled;\n\t}\n\n\t@Override\n\tpublic void scrollTo(int x, int y) {\n\t\tsuper.scrollTo(x, y);\n\t\tif (mTransformer != null)\n\t\t\tinvalidate();\n\t}\n\n\t@Override\n\tpublic boolean onInterceptTouchEvent(MotionEvent e) {\n\t\treturn !mChildrenEnabled;\n\t}\n\n\t@Override\n\tpublic boolean onTouchEvent(MotionEvent e) {\n\t\treturn !mChildrenEnabled;\n\t}\n\n\t@Override\n\tprotected void dispatchDraw(Canvas canvas) {\n\t\tif (mTransformer != null) {\n\t\t\tcanvas.save();\n\t\t\tmTransformer.transformCanvas(canvas, mViewAbove.getPercentOpen());\n\t\t\tsuper.dispatchDraw(canvas);\n\t\t\tcanvas.restore();\n\t\t} else\n\t\t\tsuper.dispatchDraw(canvas);\n\t}\n\n\t@Override\n\tprotected void onLayout(boolean changed, int l, int t, int r, int b) {\n\t\tfinal int width = r - l;\n\t\tfinal int height = b - t;\n\t\tmContent.layout(0, 0, width-mWidthOffset, height);\n\t\tif (mSecondaryContent != null)\n\t\t\tmSecondaryContent.layout(0, 0, width-mWidthOffset, height);\n\t}\n\n\t@Override\n\tprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n\t\tint width = getDefaultSize(0, widthMeasureSpec);\n\t\tint height = getDefaultSize(0, heightMeasureSpec);\n\t\tsetMeasuredDimension(width, height);\n\t\tfinal int contentWidth = getChildMeasureSpec(widthMeasureSpec, 0, width-mWidthOffset);\n\t\tfinal int contentHeight = getChildMeasureSpec(heightMeasureSpec, 0, height);\n\t\tmContent.measure(contentWidth, contentHeight);\n\t\tif (mSecondaryContent != null)\n\t\t\tmSecondaryContent.measure(contentWidth, contentHeight);\n\t}\n\n\tprivate int mMode;\n\tprivate boolean mFadeEnabled;\n\tprivate final Paint mFadePaint = new Paint();\n\tprivate float mScrollScale;\n\tprivate Drawable mShadowDrawable;\n\tprivate Drawable mSecondaryShadowDrawable;\n\tprivate int mShadowWidth;\n\tprivate float mFadeDegree;\n\n\tpublic void setMode(int mode) {\n\t\tif (mode == SlidingMenu.LEFT || mode == SlidingMenu.RIGHT) {\n\t\t\tif (mContent != null)\n\t\t\t\tmContent.setVisibility(View.VISIBLE);\n\t\t\tif (mSecondaryContent != null)\n\t\t\t\tmSecondaryContent.setVisibility(View.INVISIBLE);\n\t\t}\n\t\tmMode = mode;\n\t}\n\n\tpublic int getMode() {\n\t\treturn mMode;\n\t}\n\n\tpublic void setScrollScale(float scrollScale) {\n\t\tmScrollScale = scrollScale;\n\t}\n\n\tpublic float getScrollScale() {\n\t\treturn mScrollScale;\n\t}\n\n\tpublic void setShadowDrawable(Drawable shadow) {\n\t\tmShadowDrawable = shadow;\n\t\tinvalidate();\n\t}\n\n\tpublic void setSecondaryShadowDrawable(Drawable shadow) {\n\t\tmSecondaryShadowDrawable = shadow;\n\t\tinvalidate();\n\t}\n\n\tpublic void setShadowWidth(int width) {\n\t\tmShadowWidth = width;\n\t\tinvalidate();\n\t}\n\n\tpublic void setFadeEnabled(boolean b) {\n\t\tmFadeEnabled = b;\n\t}\n\n\tpublic void setFadeDegree(float degree) {\n\t\tif (degree > 1.0f || degree < 0.0f)\n\t\t\tthrow new IllegalStateException(\"The BehindFadeDegree must be between 0.0f and 1.0f\");\n\t\tmFadeDegree = degree;\n\t}\n\n\tpublic int getMenuPage(int page) {\n\t\tpage = (page > 1) ? 2 : ((page < 1) ? 0 : page);\n\t\tif (mMode == SlidingMenu.LEFT && page > 1) {\n\t\t\treturn 0;\n\t\t} else if (mMode == SlidingMenu.RIGHT && page < 1) {\n\t\t\treturn 2;\n\t\t} else {\n\t\t\treturn page;\n\t\t}\n\t}\n\n\tpublic void scrollBehindTo(View content, int x, int y) {\n\t\tint vis = View.VISIBLE;\t\t\n\t\tif (mMode == SlidingMenu.LEFT) {\n\t\t\tif (x >= content.getLeft()) vis = View.INVISIBLE;\n\t\t\tscrollTo((int)((x + getBehindWidth())*mScrollScale), y);\n\t\t} else if (mMode == SlidingMenu.RIGHT) {\n\t\t\tif (x <= content.getLeft()) vis = View.INVISIBLE;\n\t\t\tscrollTo((int)(getBehindWidth() - getWidth() + \n\t\t\t\t\t(x-getBehindWidth())*mScrollScale), y);\n\t\t} else if (mMode == SlidingMenu.LEFT_RIGHT) {\n\t\t\tmContent.setVisibility(x >= content.getLeft() ? View.INVISIBLE : View.VISIBLE);\n\t\t\tmSecondaryContent.setVisibility(x <= content.getLeft() ? View.INVISIBLE : View.VISIBLE);\n\t\t\tvis = x == 0 ? View.INVISIBLE : View.VISIBLE;\n\t\t\tif (x <= content.getLeft()) {\n\t\t\t\tscrollTo((int)((x + getBehindWidth())*mScrollScale), y);\t\t\t\t\n\t\t\t} else {\n\t\t\t\tscrollTo((int)(getBehindWidth() - getWidth() + \n\t\t\t\t\t\t(x-getBehindWidth())*mScrollScale), y);\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tif (vis == View.INVISIBLE)\n\t\t\tLog.v(TAG, \"behind INVISIBLE\");\n\t\tsetVisibility(vis);\n\t}\n\n\tpublic int getMenuLeft(View content, int page) {\n\t\tif (mMode == SlidingMenu.LEFT) {\n\t\t\tswitch (page) {\n\t\t\tcase 0:\n\t\t\t\treturn content.getLeft() - getBehindWidth();\n\t\t\tcase 2:\n\t\t\t\treturn content.getLeft();\n\t\t\t}\n\t\t} else if (mMode == SlidingMenu.RIGHT) {\n\t\t\tswitch (page) {\n\t\t\tcase 0:\n\t\t\t\treturn content.getLeft();\n\t\t\tcase 2:\n\t\t\t\treturn content.getLeft() + getBehindWidth();\t\n\t\t\t}\n\t\t} else if (mMode == SlidingMenu.LEFT_RIGHT) {\n\t\t\tswitch (page) {\n\t\t\tcase 0:\n\t\t\t\treturn content.getLeft() - getBehindWidth();\n\t\t\tcase 2:\n\t\t\t\treturn content.getLeft() + getBehindWidth();\n\t\t\t}\n\t\t}\n\t\treturn content.getLeft();\n\t}\n\n\tpublic int getAbsLeftBound(View content) {\n\t\tif (mMode == SlidingMenu.LEFT || mMode == SlidingMenu.LEFT_RIGHT) {\n\t\t\treturn content.getLeft() - getBehindWidth();\n\t\t} else if (mMode == SlidingMenu.RIGHT) {\n\t\t\treturn content.getLeft();\n\t\t}\n\t\treturn 0;\n\t}\n\n\tpublic int getAbsRightBound(View content) {\n\t\tif (mMode == SlidingMenu.LEFT) {\n\t\t\treturn content.getLeft();\n\t\t} else if (mMode == SlidingMenu.RIGHT || mMode == SlidingMenu.LEFT_RIGHT) {\n\t\t\treturn content.getLeft() + getBehindWidth();\n\t\t}\n\t\treturn 0;\n\t}\n\n\tpublic boolean marginTouchAllowed(View content, int x) {\n\t\tint left = content.getLeft();\n\t\tint right = content.getRight();\n\t\tif (mMode == SlidingMenu.LEFT) {\n\t\t\treturn (x >= left && x <= mMarginThreshold + left);\n\t\t} else if (mMode == SlidingMenu.RIGHT) {\n\t\t\treturn (x <= right && x >= right - mMarginThreshold);\n\t\t} else if (mMode == SlidingMenu.LEFT_RIGHT) {\n\t\t\treturn (x >= left && x <= mMarginThreshold + left) || \n\t\t\t\t\t(x <= right && x >= right - mMarginThreshold);\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic void setTouchMode(int i) {\n\t\tmTouchMode = i;\n\t}\n\n\tpublic boolean menuOpenTouchAllowed(View content, int currPage, float x) {\n\t\tswitch (mTouchMode) {\n\t\tcase SlidingMenu.TOUCHMODE_FULLSCREEN:\n\t\t\treturn true;\n\t\tcase SlidingMenu.TOUCHMODE_MARGIN:\n\t\t\treturn menuTouchInQuickReturn(content, currPage, x);\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic boolean menuTouchInQuickReturn(View content, int currPage, float x) {\n\t\tif (mMode == SlidingMenu.LEFT || (mMode == SlidingMenu.LEFT_RIGHT && currPage == 0)) {\n\t\t\treturn x >= content.getLeft();\n\t\t} else if (mMode == SlidingMenu.RIGHT || (mMode == SlidingMenu.LEFT_RIGHT && currPage == 2)) {\n\t\t\treturn x <= content.getRight();\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic boolean menuClosedSlideAllowed(float dx) {\n\t\tif (mMode == SlidingMenu.LEFT) {\n\t\t\treturn dx > 0;\n\t\t} else if (mMode == SlidingMenu.RIGHT) {\n\t\t\treturn dx < 0;\n\t\t} else if (mMode == SlidingMenu.LEFT_RIGHT) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic boolean menuOpenSlideAllowed(float dx) {\n\t\tif (mMode == SlidingMenu.LEFT) {\n\t\t\treturn dx < 0;\n\t\t} else if (mMode == SlidingMenu.RIGHT) {\n\t\t\treturn dx > 0;\n\t\t} else if (mMode == SlidingMenu.LEFT_RIGHT) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic void drawShadow(View content, Canvas canvas) {\n\t\tif (mShadowDrawable == null || mShadowWidth <= 0) return;\n\t\tint left = 0;\n\t\tif (mMode == SlidingMenu.LEFT) {\n\t\t\tleft = content.getLeft() - mShadowWidth;\n\t\t} else if (mMode == SlidingMenu.RIGHT) {\n\t\t\tleft = content.getRight();\n\t\t} else if (mMode == SlidingMenu.LEFT_RIGHT) {\n\t\t\tif (mSecondaryShadowDrawable != null) {\n\t\t\t\tleft = content.getRight();\n\t\t\t\tmSecondaryShadowDrawable.setBounds(left, 0, left + mShadowWidth, getHeight());\n\t\t\t\tmSecondaryShadowDrawable.draw(canvas);\n\t\t\t}\n\t\t\tleft = content.getLeft() - mShadowWidth;\n\t\t}\n\t\tmShadowDrawable.setBounds(left, 0, left + mShadowWidth, getHeight());\n\t\tmShadowDrawable.draw(canvas);\n\t}\n\n\tpublic void drawFade(View content, Canvas canvas, float openPercent) {\n\t\tif (!mFadeEnabled) return;\n\t\tfinal int alpha = (int) (mFadeDegree * 255 * Math.abs(1-openPercent));\n\t\tmFadePaint.setColor(Color.argb(alpha, 0, 0, 0));\n\t\tint left = 0;\n\t\tint right = 0;\n\t\tif (mMode == SlidingMenu.LEFT) {\n\t\t\tleft = content.getLeft() - getBehindWidth();\n\t\t\tright = content.getLeft();\n\t\t} else if (mMode == SlidingMenu.RIGHT) {\n\t\t\tleft = content.getRight();\n\t\t\tright = content.getRight() + getBehindWidth();\t\t\t\n\t\t} else if (mMode == SlidingMenu.LEFT_RIGHT) {\n\t\t\tleft = content.getLeft() - getBehindWidth();\n\t\t\tright = content.getLeft();\n\t\t\tcanvas.drawRect(left, 0, right, getHeight(), mFadePaint);\n\t\t\tleft = content.getRight();\n\t\t\tright = content.getRight() + getBehindWidth();\t\t\t\n\t\t}\n\t\tcanvas.drawRect(left, 0, right, getHeight(), mFadePaint);\n\t}\n\t\n\tprivate boolean mSelectorEnabled = true;\n\tprivate Bitmap mSelectorDrawable;\n\tprivate View mSelectedView;\n\t\n\tpublic void drawSelector(View content, Canvas canvas, float openPercent) {\n\t\tif (!mSelectorEnabled) return;\n\t\tif (mSelectorDrawable != null && mSelectedView != null) {\n\t\t\tString tag = (String) mSelectedView.getTag(R.id.selected_view);\n\t\t\tif (tag.equals(TAG+\"SelectedView\")) {\n\t\t\t\tcanvas.save();\n\t\t\t\tint left, right, offset;\n\t\t\t\toffset = (int) (mSelectorDrawable.getWidth() * openPercent);\n\t\t\t\tif (mMode == SlidingMenu.LEFT) {\n\t\t\t\t\tright = content.getLeft();\n\t\t\t\t\tleft = right - offset;\n\t\t\t\t\tcanvas.clipRect(left, 0, right, getHeight());\n\t\t\t\t\tcanvas.drawBitmap(mSelectorDrawable, left, getSelectorTop(), null);\t\t\n\t\t\t\t} else if (mMode == SlidingMenu.RIGHT) {\n\t\t\t\t\tleft = content.getRight();\n\t\t\t\t\tright = left + offset;\n\t\t\t\t\tcanvas.clipRect(left, 0, right, getHeight());\n\t\t\t\t\tcanvas.drawBitmap(mSelectorDrawable, right - mSelectorDrawable.getWidth(), getSelectorTop(), null);\n\t\t\t\t}\n\t\t\t\tcanvas.restore();\n\t\t\t}\n\t\t}\n\t}\n\t\n\tpublic void setSelectorEnabled(boolean b) {\n\t\tmSelectorEnabled = b;\n\t}\n\n\tpublic void setSelectedView(View v) {\n\t\tif (mSelectedView != null) {\n\t\t\tmSelectedView.setTag(R.id.selected_view, null);\n\t\t\tmSelectedView = null;\n\t\t}\n\t\tif (v != null && v.getParent() != null) {\n\t\t\tmSelectedView = v;\n\t\t\tmSelectedView.setTag(R.id.selected_view, TAG+\"SelectedView\");\n\t\t\tinvalidate();\n\t\t}\n\t}\n\n\tprivate int getSelectorTop() {\n\t\tint y = mSelectedView.getTop();\n\t\ty += (mSelectedView.getHeight() - mSelectorDrawable.getHeight()) / 2;\n\t\treturn y;\n\t}\n\n\tpublic void setSelectorBitmap(Bitmap b) {\n\t\tmSelectorDrawable = b;\n\t\trefreshDrawableState();\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/MenuInterface.java",
    "content": "package com.slidingmenu.lib;\n\nimport android.graphics.Canvas;\nimport android.graphics.drawable.Drawable;\nimport android.view.View;\n\npublic interface MenuInterface {\n\n\tpublic abstract void scrollBehindTo(int x, int y, \n\t\t\tCustomViewBehind cvb, float scrollScale);\n\t\n\tpublic abstract int getMenuLeft(CustomViewBehind cvb, View content);\n\t\n\tpublic abstract int getAbsLeftBound(CustomViewBehind cvb, View content);\n\n\tpublic abstract int getAbsRightBound(CustomViewBehind cvb, View content);\n\n\tpublic abstract boolean marginTouchAllowed(View content, int x, int threshold);\n\t\n\tpublic abstract boolean menuOpenTouchAllowed(View content, int currPage, int x);\n\t\n\tpublic abstract boolean menuTouchInQuickReturn(View content, int currPage, int x);\n\t\n\tpublic abstract boolean menuClosedSlideAllowed(int x);\n\t\n\tpublic abstract boolean menuOpenSlideAllowed(int x);\n\t\n\tpublic abstract void drawShadow(Canvas canvas, Drawable shadow, int width);\n\t\n\tpublic abstract void drawFade(Canvas canvas, int alpha, \n\t\t\tCustomViewBehind cvb, View content);\n\t\n\tpublic abstract void drawSelector(View content, Canvas canvas, float percentOpen);\n\t\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/SlidingMenu.java",
    "content": "package com.slidingmenu.lib;\n\nimport java.lang.reflect.Method;\n\nimport android.annotation.SuppressLint;\nimport android.annotation.TargetApi;\nimport android.app.Activity;\nimport android.content.Context;\nimport android.content.res.TypedArray;\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapFactory;\nimport android.graphics.Canvas;\nimport android.graphics.Point;\nimport android.graphics.Rect;\nimport android.graphics.drawable.Drawable;\nimport android.os.Build;\nimport android.os.Handler;\nimport android.os.Parcel;\nimport android.os.Parcelable;\nimport android.util.AttributeSet;\nimport android.util.Log;\nimport android.view.Display;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.view.WindowManager;\nimport android.widget.FrameLayout;\nimport android.widget.RelativeLayout;\n\nimport com.cwp.cmoneycharge.R;\nimport com.slidingmenu.lib.CustomViewAbove.OnPageChangeListener;\n\npublic class SlidingMenu extends RelativeLayout {\n\n\tprivate static final String TAG = \"SlidingMenu\";\n\n\tpublic static final int SLIDING_WINDOW = 0;\n\tpublic static final int SLIDING_CONTENT = 1;\n\tprivate boolean mActionbarOverlay = false;\n\n\t/** Constant value for use with setTouchModeAbove(). Allows the SlidingMenu to be opened with a swipe\n\t * gesture on the screen's margin\n\t */\n\tpublic static final int TOUCHMODE_MARGIN = 0;\n\n\t/** Constant value for use with setTouchModeAbove(). Allows the SlidingMenu to be opened with a swipe\n\t * gesture anywhere on the screen\n\t */\n\tpublic static final int TOUCHMODE_FULLSCREEN = 1;\n\n\t/** Constant value for use with setTouchModeAbove(). Denies the SlidingMenu to be opened with a swipe\n\t * gesture\n\t */\n\tpublic static final int TOUCHMODE_NONE = 2;\n\n\t/** Constant value for use with setMode(). Puts the menu to the left of the content.\n\t */\n\tpublic static final int LEFT = 0;\n\n\t/** Constant value for use with setMode(). Puts the menu to the right of the content.\n\t */\n\tpublic static final int RIGHT = 1;\n\n\t/** Constant value for use with setMode(). Puts menus to the left and right of the content.\n\t */\n\tpublic static final int LEFT_RIGHT = 2;\n\n\tprivate CustomViewAbove mViewAbove;\n\n\tprivate CustomViewBehind mViewBehind;\n\n\tprivate OnOpenListener mOpenListener;\n\n\tprivate OnCloseListener mCloseListener;\n\n\t/**\n\t * The listener interface for receiving onOpen events.\n\t * The class that is interested in processing a onOpen\n\t * event implements this interface, and the object created\n\t * with that class is registered with a component using the\n\t * component's <code>addOnOpenListener<code> method. When\n\t * the onOpen event occurs, that object's appropriate\n\t * method is invoked\n\t */\n\tpublic interface OnOpenListener {\n\n\t\t/**\n\t\t * On open.\n\t\t */\n\t\tpublic void onOpen();\n\t}\n\n\t/**\n\t * The listener interface for receiving onOpened events.\n\t * The class that is interested in processing a onOpened\n\t * event implements this interface, and the object created\n\t * with that class is registered with a component using the\n\t * component's <code>addOnOpenedListener<code> method. When\n\t * the onOpened event occurs, that object's appropriate\n\t * method is invoked.\n\t *\n\t * @see OnOpenedEvent\n\t */\n\tpublic interface OnOpenedListener {\n\n\t\t/**\n\t\t * On opened.\n\t\t */\n\t\tpublic void onOpened();\n\t}\n\n\t/**\n\t * The listener interface for receiving onClose events.\n\t * The class that is interested in processing a onClose\n\t * event implements this interface, and the object created\n\t * with that class is registered with a component using the\n\t * component's <code>addOnCloseListener<code> method. When\n\t * the onClose event occurs, that object's appropriate\n\t * method is invoked.\n\t *\n\t * @see OnCloseEvent\n\t */\n\tpublic interface OnCloseListener {\n\n\t\t/**\n\t\t * On close.\n\t\t */\n\t\tpublic void onClose();\n\t}\n\n\t/**\n\t * The listener interface for receiving onClosed events.\n\t * The class that is interested in processing a onClosed\n\t * event implements this interface, and the object created\n\t * with that class is registered with a component using the\n\t * component's <code>addOnClosedListener<code> method. When\n\t * the onClosed event occurs, that object's appropriate\n\t * method is invoked.\n\t *\n\t * @see OnClosedEvent\n\t */\n\tpublic interface OnClosedListener {\n\n\t\t/**\n\t\t * On closed.\n\t\t */\n\t\tpublic void onClosed();\n\t}\n\n\t/**\n\t * The Interface CanvasTransformer.\n\t */\n\tpublic interface CanvasTransformer {\n\n\t\t/**\n\t\t * Transform canvas.\n\t\t *\n\t\t * @param canvas the canvas\n\t\t * @param percentOpen the percent open\n\t\t */\n\t\tpublic void transformCanvas(Canvas canvas, float percentOpen);\n\t}\n\n\t/**\n\t * Instantiates a new SlidingMenu.\n\t *\n\t * @param context the associated Context\n\t */\n\tpublic SlidingMenu(Context context) {\n\t\tthis(context, null);\n\t}\n\n\t/**\n\t * Instantiates a new SlidingMenu and attach to Activity.\n\t *\n\t * @param activity the activity to attach slidingmenu\n\t * @param slideStyle the slidingmenu style\n\t */\n\tpublic SlidingMenu(Activity activity, int slideStyle) {\n\t\tthis(activity, null);\n\t\tthis.attachToActivity(activity, slideStyle);\n\t}\n\n\t/**\n\t * Instantiates a new SlidingMenu.\n\t *\n\t * @param context the associated Context\n\t * @param attrs the attrs\n\t */\n\tpublic SlidingMenu(Context context, AttributeSet attrs) {\n\t\tthis(context, attrs, 0);\n\t}\n\n\t/**\n\t * Instantiates a new SlidingMenu.\n\t *\n\t * @param context the associated Context\n\t * @param attrs the attrs\n\t * @param defStyle the def style\n\t */\n\tpublic SlidingMenu(Context context, AttributeSet attrs, int defStyle) {\n\t\tsuper(context, attrs, defStyle);\n\t\t\n\t\tLayoutParams behindParams = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);\n\t\tmViewBehind = new CustomViewBehind(context);\n\t\taddView(mViewBehind, behindParams);\n\t\tLayoutParams aboveParams = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);\n\t\tmViewAbove = new CustomViewAbove(context);\n\t\taddView(mViewAbove, aboveParams);\n\t\t// register the CustomViewBehind with the CustomViewAbove\n\t\tmViewAbove.setCustomViewBehind(mViewBehind);\n\t\tmViewBehind.setCustomViewAbove(mViewAbove);\n\t\tmViewAbove.setOnPageChangeListener(new OnPageChangeListener() {\n\t\t\tpublic static final int POSITION_OPEN = 0;\n\t\t\tpublic static final int POSITION_CLOSE = 1;\n\n\t\t\tpublic void onPageScrolled(int position, float positionOffset,\n\t\t\t\t\tint positionOffsetPixels) { }\n\n\t\t\tpublic void onPageSelected(int position) {\n\t\t\t\tif (position == POSITION_OPEN && mOpenListener != null) {\n\t\t\t\t\tmOpenListener.onOpen();\n\t\t\t\t} else if (position == POSITION_CLOSE && mCloseListener != null) {\n\t\t\t\t\tmCloseListener.onClose();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// now style everything!\n\t\tTypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.SlidingMenu);\n\t\t// set the above and behind views if defined in xml\n\t\tint mode = ta.getInt(R.styleable.SlidingMenu_mode, LEFT);\n\t\tsetMode(mode);\n\t\tint viewAbove = ta.getResourceId(R.styleable.SlidingMenu_viewAbove, -1);\n\t\tif (viewAbove != -1) {\n\t\t\tsetContent(viewAbove);\n\t\t} else {\n\t\t\tsetContent(new FrameLayout(context));\n\t\t}\n\t\tint viewBehind = ta.getResourceId(R.styleable.SlidingMenu_viewBehind, -1);\n\t\tif (viewBehind != -1) {\n\t\t\tsetMenu(viewBehind); \n\t\t} else {\n\t\t\tsetMenu(new FrameLayout(context));\n\t\t}\n\t\tint touchModeAbove = ta.getInt(R.styleable.SlidingMenu_touchModeAbove, TOUCHMODE_MARGIN);\n\t\tsetTouchModeAbove(touchModeAbove);\n\t\tint touchModeBehind = ta.getInt(R.styleable.SlidingMenu_touchModeBehind, TOUCHMODE_MARGIN);\n\t\tsetTouchModeBehind(touchModeBehind);\n\n\t\tint offsetBehind = (int) ta.getDimension(R.styleable.SlidingMenu_behindOffset, -1);\n\t\tint widthBehind = (int) ta.getDimension(R.styleable.SlidingMenu_behindWidth, -1);\n\t\tif (offsetBehind != -1 && widthBehind != -1)\n\t\t\tthrow new IllegalStateException(\"Cannot set both behindOffset and behindWidth for a SlidingMenu\");\n\t\telse if (offsetBehind != -1)\n\t\t\tsetBehindOffset(offsetBehind);\n\t\telse if (widthBehind != -1)\n\t\t\tsetBehindWidth(widthBehind);\n\t\telse\n\t\t\tsetBehindOffset(0);\n\t\tfloat scrollOffsetBehind = ta.getFloat(R.styleable.SlidingMenu_behindScrollScale, 0.33f);\n\t\tsetBehindScrollScale(scrollOffsetBehind);\n\t\tint shadowRes = ta.getResourceId(R.styleable.SlidingMenu_shadowDrawable, -1);\n\t\tif (shadowRes != -1) {\n\t\t\tsetShadowDrawable(shadowRes);\n\t\t}\n\t\tint shadowWidth = (int) ta.getDimension(R.styleable.SlidingMenu_shadowWidth, 0);\n\t\tsetShadowWidth(shadowWidth);\n\t\tboolean fadeEnabled = ta.getBoolean(R.styleable.SlidingMenu_fadeEnabled, true);\n\t\tsetFadeEnabled(fadeEnabled);\n\t\tfloat fadeDeg = ta.getFloat(R.styleable.SlidingMenu_fadeDegree, 0.33f);\n\t\tsetFadeDegree(fadeDeg);\n\t\tboolean selectorEnabled = ta.getBoolean(R.styleable.SlidingMenu_selectorEnabled, false);\n\t\tsetSelectorEnabled(selectorEnabled);\n\t\tint selectorRes = ta.getResourceId(R.styleable.SlidingMenu_selectorDrawable, -1);\n\t\tif (selectorRes != -1)\n\t\t\tsetSelectorDrawable(selectorRes);\n\t\tta.recycle();\n\t}\n\n\t/**\n\t * Attaches the SlidingMenu to an entire Activity\n\t * \n\t * @param activity the Activity\n\t * @param slideStyle either SLIDING_CONTENT or SLIDING_WINDOW\n\t */\n\tpublic void attachToActivity(Activity activity, int slideStyle) {\n\t\tattachToActivity(activity, slideStyle, false);\n\t}\n\n\t/**\n\t * Attaches the SlidingMenu to an entire Activity\n\t * \n\t * @param activity the Activity\n\t * @param slideStyle either SLIDING_CONTENT or SLIDING_WINDOW\n\t * @param actionbarOverlay whether or not the ActionBar is overlaid\n\t */\n\tpublic void attachToActivity(Activity activity, int slideStyle, boolean actionbarOverlay) {\n\t\tif (slideStyle != SLIDING_WINDOW && slideStyle != SLIDING_CONTENT)\n\t\t\tthrow new IllegalArgumentException(\"slideStyle must be either SLIDING_WINDOW or SLIDING_CONTENT\");\n\n\t\tif (getParent() != null)\n\t\t\tthrow new IllegalStateException(\"This SlidingMenu appears to already be attached\");\n\n\t\t// get the window background\n\t\tTypedArray a = activity.getTheme().obtainStyledAttributes(new int[] {android.R.attr.windowBackground});\n\t\tint background = a.getResourceId(0, 0);\n\t\ta.recycle();\n\n\t\tswitch (slideStyle) {\n\t\tcase SLIDING_WINDOW:\n\t\t\tmActionbarOverlay = false;\n\t\t\tViewGroup decor = (ViewGroup) activity.getWindow().getDecorView();\n\t\t\tViewGroup decorChild = (ViewGroup) decor.getChildAt(0);\n\t\t\t// save ActionBar themes that have transparent assets\n\t\t\tdecorChild.setBackgroundResource(background);\n\t\t\tdecor.removeView(decorChild);\n\t\t\tdecor.addView(this);\n\t\t\tsetContent(decorChild);\n\t\t\tbreak;\n\t\tcase SLIDING_CONTENT:\n\t\t\tmActionbarOverlay = actionbarOverlay;\n\t\t\t// take the above view out of\n\t\t\tViewGroup contentParent = (ViewGroup)activity.findViewById(android.R.id.content);\n\t\t\tView content = contentParent.getChildAt(0);\n\t\t\tcontentParent.removeView(content);\n\t\t\tcontentParent.addView(this);\n\t\t\tsetContent(content);\n\t\t\t// save people from having transparent backgrounds\n\t\t\tif (content.getBackground() == null)\n\t\t\t\tcontent.setBackgroundResource(background);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t/**\n\t * Set the above view content from a layout resource. The resource will be inflated, adding all top-level views\n\t * to the above view.\n\t *\n\t * @param res the new content\n\t */\n\tpublic void setContent(int res) {\n\t\tsetContent(LayoutInflater.from(getContext()).inflate(res, null));\n\t}\n\n\t/**\n\t * Set the above view content to the given View.\n\t *\n\t * @param view The desired content to display.\n\t */\n\tpublic void setContent(View view) {\n\t\tmViewAbove.setContent(view);\n\t\tshowContent();\n\t}\n\n\t/**\n\t * Retrieves the current content.\n\t * @return the current content\n\t */\n\tpublic View getContent() {\n\t\treturn mViewAbove.getContent();\n\t}\n\n\t/**\n\t * Set the behind view (menu) content from a layout resource. The resource will be inflated, adding all top-level views\n\t * to the behind view.\n\t *\n\t * @param res the new content\n\t */\n\tpublic void setMenu(int res) {\n\t\tsetMenu(LayoutInflater.from(getContext()).inflate(res, null));\n\t}\n\n\t/**\n\t * Set the behind view (menu) content to the given View.\n\t *\n\t * @param view The desired content to display.\n\t */\n\tpublic void setMenu(View v) {\n\t\tmViewBehind.setContent(v);\n\t}\n\n\t/**\n\t * Retrieves the main menu.\n\t * @return the main menu\n\t */\n\tpublic View getMenu() {\n\t\treturn mViewBehind.getContent();\n\t}\n\n\t/**\n\t * Set the secondary behind view (right menu) content from a layout resource. The resource will be inflated, adding all top-level views\n\t * to the behind view.\n\t *\n\t * @param res the new content\n\t */\n\tpublic void setSecondaryMenu(int res) {\n\t\tsetSecondaryMenu(LayoutInflater.from(getContext()).inflate(res, null));\n\t}\n\n\t/**\n\t * Set the secondary behind view (right menu) content to the given View.\n\t *\n\t * @param view The desired content to display.\n\t */\n\tpublic void setSecondaryMenu(View v) {\n\t\tmViewBehind.setSecondaryContent(v);\n\t\t//\t\tmViewBehind.invalidate();\n\t}\n\n\t/**\n\t * Retrieves the current secondary menu (right).\n\t * @return the current menu\n\t */\n\tpublic View getSecondaryMenu() {\n\t\treturn mViewBehind.getSecondaryContent();\n\t}\n\n\n\t/**\n\t * Sets the sliding enabled.\n\t *\n\t * @param b true to enable sliding, false to disable it.\n\t */\n\tpublic void setSlidingEnabled(boolean b) {\n\t\tmViewAbove.setSlidingEnabled(b);\n\t}\n\n\t/**\n\t * Checks if is sliding enabled.\n\t *\n\t * @return true, if is sliding enabled\n\t */\n\tpublic boolean isSlidingEnabled() {\n\t\treturn mViewAbove.isSlidingEnabled();\n\t}\n\n\t/**\n\t * Sets which side the SlidingMenu should appear on.\n\t * @param mode must be either SlidingMenu.LEFT or SlidingMenu.RIGHT\n\t */\n\tpublic void setMode(int mode) {\n\t\tif (mode != LEFT && mode != RIGHT && mode != LEFT_RIGHT) {\n\t\t\tthrow new IllegalStateException(\"SlidingMenu mode must be LEFT, RIGHT, or LEFT_RIGHT\");\n\t\t}\n\t\tmViewBehind.setMode(mode);\n\t}\n\n\t/**\n\t * Returns the current side that the SlidingMenu is on.\n\t * @return the current mode, either SlidingMenu.LEFT or SlidingMenu.RIGHT\n\t */\n\tpublic int getMode() {\n\t\treturn mViewBehind.getMode();\n\t}\n\n\t/**\n\t * Sets whether or not the SlidingMenu is in static mode (i.e. nothing is moving and everything is showing)\n\t *\n\t * @param b true to set static mode, false to disable static mode.\n\t */\n\tpublic void setStatic(boolean b) {\n\t\tif (b) {\n\t\t\tsetSlidingEnabled(false);\n\t\t\tmViewAbove.setCustomViewBehind(null);\n\t\t\tmViewAbove.setCurrentItem(1);\n\t\t\t//\t\t\tmViewBehind.setCurrentItem(0);\t\n\t\t} else {\n\t\t\tmViewAbove.setCurrentItem(1);\n\t\t\t//\t\t\tmViewBehind.setCurrentItem(1);\n\t\t\tmViewAbove.setCustomViewBehind(mViewBehind);\n\t\t\tsetSlidingEnabled(true);\n\t\t}\n\t}\n\n\t/**\n\t * Opens the menu and shows the menu view.\n\t */\n\tpublic void showMenu() {\n\t\tshowMenu(true);\n\t}\n\n\t/**\n\t * Opens the menu and shows the menu view.\n\t *\n\t * @param animate true to animate the transition, false to ignore animation\n\t */\n\tpublic void showMenu(boolean animate) {\n\t\tmViewAbove.setCurrentItem(0, animate);\n\t}\n\n\t/**\n\t * Opens the menu and shows the secondary menu view. Will default to the regular menu\n\t * if there is only one.\n\t */\n\tpublic void showSecondaryMenu() {\n\t\tshowSecondaryMenu(true);\n\t}\n\n\t/**\n\t * Opens the menu and shows the secondary (right) menu view. Will default to the regular menu\n\t * if there is only one.\n\t *\n\t * @param animate true to animate the transition, false to ignore animation\n\t */\n\tpublic void showSecondaryMenu(boolean animate) {\n\t\tmViewAbove.setCurrentItem(2, animate);\n\t}\n\n\t/**\n\t * Closes the menu and shows the above view.\n\t */\n\tpublic void showContent() {\n\t\tshowContent(true);\n\t}\n\n\t/**\n\t * Closes the menu and shows the above view.\n\t *\n\t * @param animate true to animate the transition, false to ignore animation\n\t */\n\tpublic void showContent(boolean animate) {\n\t\tmViewAbove.setCurrentItem(1, animate);\n\t}\n\n\t/**\n\t * Toggle the SlidingMenu. If it is open, it will be closed, and vice versa.\n\t */\n\tpublic void toggle() {\n\t\ttoggle(true);\n\t}\n\n\t/**\n\t * Toggle the SlidingMenu. If it is open, it will be closed, and vice versa.\n\t *\n\t * @param animate true to animate the transition, false to ignore animation\n\t */\n\tpublic void toggle(boolean animate) {\n\t\tif (isMenuShowing()) {\n\t\t\tshowContent(animate);\n\t\t} else {\n\t\t\tshowMenu(animate);\n\t\t}\n\t}\n\n\t/**\n\t * Checks if is the behind view showing.\n\t *\n\t * @return Whether or not the behind view is showing\n\t */\n\tpublic boolean isMenuShowing() {\n\t\treturn mViewAbove.getCurrentItem() == 0 || mViewAbove.getCurrentItem() == 2;\n\t}\n\t\n\t/**\n\t * Checks if is the behind view showing.\n\t *\n\t * @return Whether or not the behind view is showing\n\t */\n\tpublic boolean isSecondaryMenuShowing() {\n\t\treturn mViewAbove.getCurrentItem() == 2;\n\t}\n\n\t/**\n\t * Gets the behind offset.\n\t *\n\t * @return The margin on the right of the screen that the behind view scrolls to\n\t */\n\tpublic int getBehindOffset() {\n\t\treturn ((RelativeLayout.LayoutParams)mViewBehind.getLayoutParams()).rightMargin;\n\t}\n\n\t/**\n\t * Sets the behind offset.\n\t *\n\t * @param i The margin, in pixels, on the right of the screen that the behind view scrolls to.\n\t */\n\tpublic void setBehindOffset(int i) {\n\t\t//\t\tRelativeLayout.LayoutParams params = ((RelativeLayout.LayoutParams)mViewBehind.getLayoutParams());\n\t\t//\t\tint bottom = params.bottomMargin;\n\t\t//\t\tint top = params.topMargin;\n\t\t//\t\tint left = params.leftMargin;\n\t\t//\t\tparams.setMargins(left, top, i, bottom);\n\t\tmViewBehind.setWidthOffset(i);\n\t}\n\n\t/**\n\t * Sets the behind offset.\n\t *\n\t * @param resID The dimension resource id to be set as the behind offset.\n\t * The menu, when open, will leave this width margin on the right of the screen.\n\t */\n\tpublic void setBehindOffsetRes(int resID) {\n\t\tint i = (int) getContext().getResources().getDimension(resID);\n\t\tsetBehindOffset(i);\n\t}\n\n\t/**\n\t * Sets the above offset.\n\t *\n\t * @param i the new above offset, in pixels\n\t */\n\tpublic void setAboveOffset(int i) {\n\t\tmViewAbove.setAboveOffset(i);\n\t}\n\n\t/**\n\t * Sets the above offset.\n\t *\n\t * @param resID The dimension resource id to be set as the above offset.\n\t */\n\tpublic void setAboveOffsetRes(int resID) {\n\t\tint i = (int) getContext().getResources().getDimension(resID);\n\t\tsetAboveOffset(i);\n\t}\n\n\t/**\n\t * Sets the behind width.\n\t *\n\t * @param i The width the Sliding Menu will open to, in pixels\n\t */\n\t@SuppressWarnings(\"deprecation\")\n\tpublic void setBehindWidth(int i) {\n\t\tint width;\n\t\tDisplay display = ((WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE))\n\t\t\t\t.getDefaultDisplay();\n\t\ttry {\n\t\t\tClass<?> cls = Display.class;\n\t\t\tClass<?>[] parameterTypes = {Point.class};\n\t\t\tPoint parameter = new Point();\n\t\t\tMethod method = cls.getMethod(\"getSize\", parameterTypes);\n\t\t\tmethod.invoke(display, parameter);\n\t\t\twidth = parameter.x;\n\t\t} catch (Exception e) {\n\t\t\twidth = display.getWidth();\n\t\t}\n\t\tsetBehindOffset(width-i);\n\t}\n\n\t/**\n\t * Sets the behind width.\n\t *\n\t * @param res The dimension resource id to be set as the behind width offset.\n\t * The menu, when open, will open this wide.\n\t */\n\tpublic void setBehindWidthRes(int res) {\n\t\tint i = (int) getContext().getResources().getDimension(res);\n\t\tsetBehindWidth(i);\n\t}\n\n\t/**\n\t * Gets the behind scroll scale.\n\t *\n\t * @return The scale of the parallax scroll\n\t */\n\tpublic float getBehindScrollScale() {\n\t\treturn mViewBehind.getScrollScale();\n\t}\n\n\t/**\n\t * Sets the behind scroll scale.\n\t *\n\t * @param f The scale of the parallax scroll (i.e. 1.0f scrolls 1 pixel for every\n\t * 1 pixel that the above view scrolls and 0.0f scrolls 0 pixels)\n\t */\n\tpublic void setBehindScrollScale(float f) {\n\t\tif (f < 0 && f > 1)\n\t\t\tthrow new IllegalStateException(\"ScrollScale must be between 0 and 1\");\n\t\tmViewBehind.setScrollScale(f);\n\t}\n\n\t/**\n\t * Sets the behind canvas transformer.\n\t *\n\t * @param t the new behind canvas transformer\n\t */\n\tpublic void setBehindCanvasTransformer(CanvasTransformer t) {\n\t\tmViewBehind.setCanvasTransformer(t);\n\t}\n\n\t/**\n\t * Gets the touch mode above.\n\t *\n\t * @return the touch mode above\n\t */\n\tpublic int getTouchModeAbove() {\n\t\treturn mViewAbove.getTouchMode();\n\t}\n\n\t/**\n\t * Controls whether the SlidingMenu can be opened with a swipe gesture.\n\t * Options are {@link #TOUCHMODE_MARGIN TOUCHMODE_MARGIN}, {@link #TOUCHMODE_FULLSCREEN TOUCHMODE_FULLSCREEN},\n\t * or {@link #TOUCHMODE_NONE TOUCHMODE_NONE}\n\t *\n\t * @param i the new touch mode\n\t */\n\tpublic void setTouchModeAbove(int i) {\n\t\tif (i != TOUCHMODE_FULLSCREEN && i != TOUCHMODE_MARGIN\n\t\t\t\t&& i != TOUCHMODE_NONE) {\n\t\t\tthrow new IllegalStateException(\"TouchMode must be set to either\" +\n\t\t\t\t\t\"TOUCHMODE_FULLSCREEN or TOUCHMODE_MARGIN or TOUCHMODE_NONE.\");\n\t\t}\n\t\tmViewAbove.setTouchMode(i);\n\t}\n\n\t/**\n\t * Controls whether the SlidingMenu can be opened with a swipe gesture.\n\t * Options are {@link #TOUCHMODE_MARGIN TOUCHMODE_MARGIN}, {@link #TOUCHMODE_FULLSCREEN TOUCHMODE_FULLSCREEN},\n\t * or {@link #TOUCHMODE_NONE TOUCHMODE_NONE}\n\t *\n\t * @param i the new touch mode\n\t */\n\tpublic void setTouchModeBehind(int i) {\n\t\tif (i != TOUCHMODE_FULLSCREEN && i != TOUCHMODE_MARGIN\n\t\t\t\t&& i != TOUCHMODE_NONE) {\n\t\t\tthrow new IllegalStateException(\"TouchMode must be set to either\" +\n\t\t\t\t\t\"TOUCHMODE_FULLSCREEN or TOUCHMODE_MARGIN or TOUCHMODE_NONE.\");\n\t\t}\n\t\tmViewBehind.setTouchMode(i);\n\t}\n\n\t/**\n\t * Sets the shadow drawable.\n\t *\n\t * @param resId the resource ID of the new shadow drawable\n\t */\n\tpublic void setShadowDrawable(int resId) {\n\t\tsetShadowDrawable(getContext().getResources().getDrawable(resId));\n\t}\n\n\t/**\n\t * Sets the shadow drawable.\n\t *\n\t * @param d the new shadow drawable\n\t */\n\tpublic void setShadowDrawable(Drawable d) {\n\t\tmViewBehind.setShadowDrawable(d);\n\t}\n\n\t/**\n\t * Sets the secondary (right) shadow drawable.\n\t *\n\t * @param resId the resource ID of the new shadow drawable\n\t */\n\tpublic void setSecondaryShadowDrawable(int resId) {\n\t\tsetSecondaryShadowDrawable(getContext().getResources().getDrawable(resId));\n\t}\n\n\t/**\n\t * Sets the secondary (right) shadow drawable.\n\t *\n\t * @param d the new shadow drawable\n\t */\n\tpublic void setSecondaryShadowDrawable(Drawable d) {\n\t\tmViewBehind.setSecondaryShadowDrawable(d);\n\t}\n\n\t/**\n\t * Sets the shadow width.\n\t *\n\t * @param resId The dimension resource id to be set as the shadow width.\n\t */\n\tpublic void setShadowWidthRes(int resId) {\n\t\tsetShadowWidth((int)getResources().getDimension(resId));\n\t}\n\n\t/**\n\t * Sets the shadow width.\n\t *\n\t * @param pixels the new shadow width, in pixels\n\t */\n\tpublic void setShadowWidth(int pixels) {\n\t\tmViewBehind.setShadowWidth(pixels);\n\t}\n\n\t/**\n\t * Enables or disables the SlidingMenu's fade in and out\n\t *\n\t * @param b true to enable fade, false to disable it\n\t */\n\tpublic void setFadeEnabled(boolean b) {\n\t\tmViewBehind.setFadeEnabled(b);\n\t}\n\n\t/**\n\t * Sets how much the SlidingMenu fades in and out. Fade must be enabled, see\n\t * {@link #setFadeEnabled(boolean) setFadeEnabled(boolean)}\n\t *\n\t * @param f the new fade degree, between 0.0f and 1.0f\n\t */\n\tpublic void setFadeDegree(float f) {\n\t\tmViewBehind.setFadeDegree(f);\n\t}\n\n\t/**\n\t * Enables or disables whether the selector is drawn\n\t *\n\t * @param b true to draw the selector, false to not draw the selector\n\t */\n\tpublic void setSelectorEnabled(boolean b) {\n\t\tmViewBehind.setSelectorEnabled(true);\n\t}\n\n\t/**\n\t * Sets the selected view. The selector will be drawn here\n\t *\n\t * @param v the new selected view\n\t */\n\tpublic void setSelectedView(View v) {\n\t\tmViewBehind.setSelectedView(v);\n\t}\n\n\t/**\n\t * Sets the selector drawable.\n\t *\n\t * @param res a resource ID for the selector drawable\n\t */\n\tpublic void setSelectorDrawable(int res) {\n\t\tmViewBehind.setSelectorBitmap(BitmapFactory.decodeResource(getResources(), res));\n\t}\n\n\t/**\n\t * Sets the selector drawable.\n\t *\n\t * @param b the new selector bitmap\n\t */\n\tpublic void setSelectorBitmap(Bitmap b) {\n\t\tmViewBehind.setSelectorBitmap(b);\n\t}\n\n\t/**\n\t * Add a View ignored by the Touch Down event when mode is Fullscreen\n\t *\n\t * @param v a view to be ignored\n\t */\n\tpublic void addIgnoredView(View v) {\n\t\tmViewAbove.addIgnoredView(v);\n\t}\n\n\t/**\n\t * Remove a View ignored by the Touch Down event when mode is Fullscreen\n\t *\n\t * @param v a view not wanted to be ignored anymore\n\t */\n\tpublic void removeIgnoredView(View v) {\n\t\tmViewAbove.removeIgnoredView(v);\n\t}\n\n\t/**\n\t * Clear the list of Views ignored by the Touch Down event when mode is Fullscreen\n\t */\n\tpublic void clearIgnoredViews() {\n\t\tmViewAbove.clearIgnoredViews();\n\t}\n\n\t/**\n\t * Sets the OnOpenListener. {@link OnOpenListener#onOpen() OnOpenListener.onOpen()} will be called when the SlidingMenu is opened\n\t *\n\t * @param listener the new OnOpenListener\n\t */\n\tpublic void setOnOpenListener(OnOpenListener listener) {\n\t\t//mViewAbove.setOnOpenListener(listener);\n\t\tmOpenListener = listener;\n\t}\n\n\t/**\n\t * Sets the OnCloseListener. {@link OnCloseListener#onClose() OnCloseListener.onClose()} will be called when the SlidingMenu is closed\n\t *\n\t * @param listener the new setOnCloseListener\n\t */\n\tpublic void setOnCloseListener(OnCloseListener listener) {\n\t\t//mViewAbove.setOnCloseListener(listener);\n\t\tmCloseListener = listener;\n\t}\n\n\t/**\n\t * Sets the OnOpenedListener. {@link OnOpenedListener#onOpened() OnOpenedListener.onOpened()} will be called after the SlidingMenu is opened\n\t *\n\t * @param listener the new OnOpenedListener\n\t */\n\tpublic void setOnOpenedListener(OnOpenedListener listener) {\n\t\tmViewAbove.setOnOpenedListener(listener);\n\t}\n\n\t/**\n\t * Sets the OnClosedListener. {@link OnClosedListener#onClosed() OnClosedListener.onClosed()} will be called after the SlidingMenu is closed\n\t *\n\t * @param listener the new OnClosedListener\n\t */\n\tpublic void setOnClosedListener(OnClosedListener listener) {\n\t\tmViewAbove.setOnClosedListener(listener);\n\t}\n\n\tpublic static class SavedState extends BaseSavedState {\n\n\t\tprivate final int mItem;\n\n\t\tpublic SavedState(Parcelable superState, int item) {\n\t\t\tsuper(superState);\n\t\t\tmItem = item;\n\t\t}\n\n\t\tprivate SavedState(Parcel in) {\n\t\t\tsuper(in);\n\t\t\tmItem = in.readInt();\n\t\t}\n\n\t\tpublic int getItem() {\n\t\t\treturn mItem;\n\t\t}\n\n\t\t/* (non-Javadoc)\n\t\t * @see android.view.AbsSavedState#writeToParcel(android.os.Parcel, int)\n\t\t */\n\t\tpublic void writeToParcel(Parcel out, int flags) {\n\t\t\tsuper.writeToParcel(out, flags);\n\t\t\tout.writeInt(mItem);\n\t\t}\n\n\t\tpublic static final Parcelable.Creator<SavedState> CREATOR =\n\t\t\t\tnew Parcelable.Creator<SavedState>() {\n\t\t\tpublic SavedState createFromParcel(Parcel in) {\n\t\t\t\treturn new SavedState(in);\n\t\t\t}\n\n\t\t\tpublic SavedState[] newArray(int size) {\n\t\t\t\treturn new SavedState[size];\n\t\t\t}\n\t\t};\n\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.view.View#onSaveInstanceState()\n\t */\n\t@Override\n\tprotected Parcelable onSaveInstanceState() {\n\t\tParcelable superState = super.onSaveInstanceState();\n\t\tSavedState ss = new SavedState(superState, mViewAbove.getCurrentItem());\n\t\treturn ss;\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.view.View#onRestoreInstanceState(android.os.Parcelable)\n\t */\n\t@Override\n\tprotected void onRestoreInstanceState(Parcelable state) {\n\t\tSavedState ss = (SavedState)state;\n\t\tsuper.onRestoreInstanceState(ss.getSuperState());\n\t\tmViewAbove.setCurrentItem(ss.getItem());\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.view.ViewGroup#fitSystemWindows(android.graphics.Rect)\n\t */\n\t@SuppressLint(\"NewApi\")\n\t@Override\n\tprotected boolean fitSystemWindows(Rect insets) {\n\t\tint leftPadding = insets.left;\n\t\tint rightPadding = insets.right;\n\t\tint topPadding = insets.top;\n\t\tint bottomPadding = insets.bottom;\n\t\tif (!mActionbarOverlay) {\n\t\t\tLog.v(TAG, \"setting padding!\");\n\t\t\tsetPadding(leftPadding, topPadding, rightPadding, bottomPadding);\n\t\t}\n\t\treturn true;\n\t}\n\t\n\tprivate Handler mHandler = new Handler();\n\n\t@TargetApi(Build.VERSION_CODES.HONEYCOMB)\n\tpublic void manageLayers(float percentOpen) {\n\t\tif (Build.VERSION.SDK_INT < 11) return;\n\n\t\tboolean layer = percentOpen > 0.0f && percentOpen < 1.0f;\n\t\tfinal int layerType = layer ? View.LAYER_TYPE_HARDWARE : View.LAYER_TYPE_NONE;\n\n\t\tif (layerType != getContent().getLayerType()) {\n\t\t\tmHandler.post(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tLog.v(TAG, \"changing layerType. hardware? \" + (layerType == View.LAYER_TYPE_HARDWARE));\n\t\t\t\t\tgetContent().setLayerType(layerType, null);\n\t\t\t\t\tgetMenu().setLayerType(layerType, null);\n\t\t\t\t\tif (getSecondaryMenu() != null) {\n\t\t\t\t\t\tgetSecondaryMenu().setLayerType(layerType, null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n}"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SlidingActivity.java",
    "content": "package com.slidingmenu.lib.app;\n\nimport android.annotation.TargetApi;\nimport android.app.Activity;\nimport android.os.Build;\nimport android.os.Bundle;\nimport android.view.KeyEvent;\nimport android.view.View;\nimport android.view.Window;\nimport android.view.WindowManager;\nimport android.view.ViewGroup.LayoutParams;\n\nimport com.slidingmenu.lib.SlidingMenu;\n\npublic class SlidingActivity extends Activity implements SlidingActivityBase {\n\n\tprivate SlidingActivityHelper mHelper;\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see android.app.Activity#onCreate(android.os.Bundle)\n\t */\n\t@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\n\t\tsuper.onCreate(savedInstanceState);\n\t\tmHelper = new SlidingActivityHelper(this);\n\t\tmHelper.onCreate(savedInstanceState);\n\n\t}\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see android.app.Activity#onPostCreate(android.os.Bundle)\n\t */\n\t@Override\n\tpublic void onPostCreate(Bundle savedInstanceState) {\n\t\tsuper.onPostCreate(savedInstanceState);\n\t\tmHelper.onPostCreate(savedInstanceState);\n\t}\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see android.app.Activity#findViewById(int)\n\t */\n\t@Override\n\tpublic View findViewById(int id) {\n\t\tView v = super.findViewById(id);\n\t\tif (v != null)\n\t\t\treturn v;\n\t\treturn mHelper.findViewById(id);\n\t}\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see android.app.Activity#onSaveInstanceState(android.os.Bundle)\n\t */\n\t@Override\n\tprotected void onSaveInstanceState(Bundle outState) {\n\t\tsuper.onSaveInstanceState(outState);\n\t\tmHelper.onSaveInstanceState(outState);\n\t}\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see android.app.Activity#setContentView(int)\n\t */\n\t@Override\n\tpublic void setContentView(int id) {\n\t\tsetContentView(getLayoutInflater().inflate(id, null));\n\t}\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see android.app.Activity#setContentView(android.view.View)\n\t */\n\t@Override\n\tpublic void setContentView(View v) {\n\t\tsetContentView(v, new LayoutParams(LayoutParams.MATCH_PARENT,\n\t\t\t\tLayoutParams.MATCH_PARENT));\n\t}\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see android.app.Activity#setContentView(android.view.View,\n\t * android.view.ViewGroup.LayoutParams)\n\t */\n\t@Override\n\tpublic void setContentView(View v, LayoutParams params) {\n\t\tsuper.setContentView(v, params);\n\t\tmHelper.registerAboveContentView(v, params);\n\t}\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see\n\t * com.slidingmenu.lib.app.SlidingActivityBase#setBehindContentView(int)\n\t */\n\tpublic void setBehindContentView(int id) {\n\t\tsetBehindContentView(getLayoutInflater().inflate(id, null));\n\t}\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see\n\t * com.slidingmenu.lib.app.SlidingActivityBase#setBehindContentView(android\n\t * .view.View)\n\t */\n\tpublic void setBehindContentView(View v) {\n\t\tsetBehindContentView(v, new LayoutParams(LayoutParams.MATCH_PARENT,\n\t\t\t\tLayoutParams.MATCH_PARENT));\n\t}\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see\n\t * com.slidingmenu.lib.app.SlidingActivityBase#setBehindContentView(android\n\t * .view.View, android.view.ViewGroup.LayoutParams)\n\t */\n\tpublic void setBehindContentView(View v, LayoutParams params) {\n\t\tmHelper.setBehindContentView(v, params);\n\t}\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#getSlidingMenu()\n\t */\n\tpublic SlidingMenu getSlidingMenu() {\n\t\treturn mHelper.getSlidingMenu();\n\t}\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#toggle()\n\t */\n\tpublic void toggle() {\n\t\tmHelper.toggle();\n\t}\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#showAbove()\n\t */\n\tpublic void showContent() {\n\t\tmHelper.showContent();\n\t}\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#showBehind()\n\t */\n\tpublic void showMenu() {\n\t\tmHelper.showMenu();\n\t}\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#showSecondaryMenu()\n\t */\n\tpublic void showSecondaryMenu() {\n\t\tmHelper.showSecondaryMenu();\n\t}\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see\n\t * com.slidingmenu.lib.app.SlidingActivityBase#setSlidingActionBarEnabled\n\t * (boolean)\n\t */\n\tpublic void setSlidingActionBarEnabled(boolean b) {\n\t\tmHelper.setSlidingActionBarEnabled(b);\n\t}\n\n\t/*\n\t * (non-Javadoc)\n\t * \n\t * @see android.app.Activity#onKeyUp(int, android.view.KeyEvent)\n\t */\n\t@Override\n\tpublic boolean onKeyUp(int keyCode, KeyEvent event) {\n\t\tboolean b = mHelper.onKeyUp(keyCode, event);\n\t\tif (b)\n\t\t\treturn b;\n\t\treturn super.onKeyUp(keyCode, event);\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SlidingActivityBase.java",
    "content": "package com.slidingmenu.lib.app;\n\nimport android.view.View;\nimport android.view.ViewGroup.LayoutParams;\n\nimport com.slidingmenu.lib.SlidingMenu;\n\npublic interface SlidingActivityBase {\n\t\n\t/**\n\t * Set the behind view content to an explicit view. This view is placed directly into the behind view 's view hierarchy.\n\t * It can itself be a complex view hierarchy.\n\t *\n\t * @param view The desired content to display.\n\t * @param layoutParams Layout parameters for the view.\n\t */\n\tpublic void setBehindContentView(View view, LayoutParams layoutParams);\n\n\t/**\n\t * Set the behind view content to an explicit view. This view is placed directly into the behind view 's view hierarchy.\n\t * It can itself be a complex view hierarchy. When calling this method, the layout parameters of the specified\n\t * view are ignored. Both the width and the height of the view are set by default to MATCH_PARENT. To use your\n\t * own layout parameters, invoke setContentView(android.view.View, android.view.ViewGroup.LayoutParams) instead.\n\t *\n\t * @param view The desired content to display.\n\t */\n\tpublic void setBehindContentView(View view);\n\n\t/**\n\t * Set the behind view content from a layout resource. The resource will be inflated, adding all top-level views\n\t * to the behind view.\n\t *\n\t * @param layoutResID Resource ID to be inflated.\n\t */\n\tpublic void setBehindContentView(int layoutResID);\n\n\t/**\n\t * Gets the SlidingMenu associated with this activity.\n\t *\n\t * @return the SlidingMenu associated with this activity.\n\t */\n\tpublic SlidingMenu getSlidingMenu();\n\t\t\n\t/**\n\t * Toggle the SlidingMenu. If it is open, it will be closed, and vice versa.\n\t */\n\tpublic void toggle();\n\t\n\t/**\n\t * Close the SlidingMenu and show the content view.\n\t */\n\tpublic void showContent();\n\t\n\t/**\n\t * Open the SlidingMenu and show the menu view.\n\t */\n\tpublic void showMenu();\n\n\t/**\n\t * Open the SlidingMenu and show the secondary (right) menu view. Will default to the regular menu\n\t * if there is only one.\n\t */\n\tpublic void showSecondaryMenu();\n\t\n\t/**\n\t * Controls whether the ActionBar slides along with the above view when the menu is opened,\n\t * or if it stays in place.\n\t *\n\t * @param slidingActionBarEnabled True if you want the ActionBar to slide along with the SlidingMenu,\n\t * false if you want the ActionBar to stay in place\n\t */\n\tpublic void setSlidingActionBarEnabled(boolean slidingActionBarEnabled);\n\t\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SlidingActivityHelper.java",
    "content": "package com.slidingmenu.lib.app;\n\nimport android.app.Activity;\nimport android.os.Bundle;\nimport android.os.Handler;\nimport android.view.KeyEvent;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup.LayoutParams;\n\nimport com.cwp.cmoneycharge.R;\nimport com.slidingmenu.lib.SlidingMenu;\n\npublic class SlidingActivityHelper {\n\n\tprivate Activity mActivity;\n\n\tprivate SlidingMenu mSlidingMenu;\n\n\tprivate View mViewAbove;\n\n\tprivate View mViewBehind;\n\n\tprivate boolean mBroadcasting = false;\n\n\tprivate boolean mOnPostCreateCalled = false;\n\n\tprivate boolean mEnableSlide = true;\n\n\t/**\n\t * Instantiates a new SlidingActivityHelper.\n\t *\n\t * @param activity the associated activity\n\t */\n\tpublic SlidingActivityHelper(Activity activity) {\n\t\tmActivity = activity;\n\t}\n\n\t/**\n\t * Sets mSlidingMenu as a newly inflated SlidingMenu. Should be called within the activitiy's onCreate()\n\t *\n\t * @param savedInstanceState the saved instance state (unused)\n\t */\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tmSlidingMenu = (SlidingMenu) LayoutInflater.from(mActivity).inflate(R.layout.slidingmenumain, null);\n\t}\n\n\t/**\n\t * Further SlidingMenu initialization. Should be called within the activitiy's onPostCreate()\n\t *\n\t * @param savedInstanceState the saved instance state (unused)\n\t */\n\tpublic void onPostCreate(Bundle savedInstanceState) {\n\t\tif (mViewBehind == null || mViewAbove == null) {\n\t\t\tthrow new IllegalStateException(\"Both setBehindContentView must be called \" +\n\t\t\t\t\t\"in onCreate in addition to setContentView.\");\n\t\t}\n\n\t\tmOnPostCreateCalled = true;\n\n\t\tmSlidingMenu.attachToActivity(mActivity, \n\t\t\t\tmEnableSlide ? SlidingMenu.SLIDING_WINDOW : SlidingMenu.SLIDING_CONTENT);\n\t\t\n\t\tfinal boolean open;\n\t\tfinal boolean secondary;\n\t\tif (savedInstanceState != null) {\n\t\t\topen = savedInstanceState.getBoolean(\"SlidingActivityHelper.open\");\n\t\t\tsecondary = savedInstanceState.getBoolean(\"SlidingActivityHelper.secondary\");\n\t\t} else {\n\t\t\topen = false;\n\t\t\tsecondary = false;\n\t\t}\n\t\tnew Handler().post(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tif (open) {\n\t\t\t\t\tif (secondary) {\n\t\t\t\t\t\tmSlidingMenu.showSecondaryMenu(false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmSlidingMenu.showMenu(false);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmSlidingMenu.showContent(false);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Controls whether the ActionBar slides along with the above view when the menu is opened,\n\t * or if it stays in place.\n\t *\n\t * @param slidingActionBarEnabled True if you want the ActionBar to slide along with the SlidingMenu,\n\t * false if you want the ActionBar to stay in place\n\t */\n\tpublic void setSlidingActionBarEnabled(boolean slidingActionBarEnabled) {\n\t\tif (mOnPostCreateCalled)\n\t\t\tthrow new IllegalStateException(\"enableSlidingActionBar must be called in onCreate.\");\n\t\tmEnableSlide = slidingActionBarEnabled;\n\t}\n\n\t/**\n\t * Finds a view that was identified by the id attribute from the XML that was processed in onCreate(Bundle).\n\t * \n\t * @param id the resource id of the desired view\n\t * @return The view if found or null otherwise.\n\t */\n\tpublic View findViewById(int id) {\n\t\tView v;\n\t\tif (mSlidingMenu != null) {\n\t\t\tv = mSlidingMenu.findViewById(id);\n\t\t\tif (v != null)\n\t\t\t\treturn v;\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t * Called to retrieve per-instance state from an activity before being killed so that the state can be\n\t * restored in onCreate(Bundle) or onRestoreInstanceState(Bundle) (the Bundle populated by this method\n\t * will be passed to both). \n\t *\n\t * @param outState Bundle in which to place your saved state.\n\t */\n\tpublic void onSaveInstanceState(Bundle outState) {\n\t\toutState.putBoolean(\"SlidingActivityHelper.open\", mSlidingMenu.isMenuShowing());\n\t\toutState.putBoolean(\"SlidingActivityHelper.secondary\", mSlidingMenu.isSecondaryMenuShowing());\n\t}\n\n\t/**\n\t * Register the above content view.\n\t *\n\t * @param v the above content view to register\n\t * @param params LayoutParams for that view (unused)\n\t */\n\tpublic void registerAboveContentView(View v, LayoutParams params) {\n\t\tif (!mBroadcasting)\n\t\t\tmViewAbove = v;\n\t}\n\n\t/**\n\t * Set the activity content to an explicit view. This view is placed directly into the activity's view\n\t * hierarchy. It can itself be a complex view hierarchy. When calling this method, the layout parameters\n\t * of the specified view are ignored. Both the width and the height of the view are set by default to\n\t * MATCH_PARENT. To use your own layout parameters, invoke setContentView(android.view.View,\n\t * android.view.ViewGroup.LayoutParams) instead.\n\t *\n\t * @param v The desired content to display.\n\t */\n\tpublic void setContentView(View v) {\n\t\tmBroadcasting = true;\n\t\tmActivity.setContentView(v);\n\t}\n\n\t/**\n\t * Set the behind view content to an explicit view. This view is placed directly into the behind view 's view hierarchy.\n\t * It can itself be a complex view hierarchy.\n\t *\n\t * @param view The desired content to display.\n\t * @param layoutParams Layout parameters for the view. (unused)\n\t */\n\tpublic void setBehindContentView(View view, LayoutParams layoutParams) {\n\t\tmViewBehind = view;\n\t\tmSlidingMenu.setMenu(mViewBehind);\n\t}\n\n\t/**\n\t * Gets the SlidingMenu associated with this activity.\n\t *\n\t * @return the SlidingMenu associated with this activity.\n\t */\n\tpublic SlidingMenu getSlidingMenu() {\n\t\treturn mSlidingMenu;\n\t}\n\n\t/**\n\t * Toggle the SlidingMenu. If it is open, it will be closed, and vice versa.\n\t */\n\tpublic void toggle() {\n\t\tmSlidingMenu.toggle();\n\t}\n\n\t/**\n\t * Close the SlidingMenu and show the content view.\n\t */\n\tpublic void showContent() {\n\t\tmSlidingMenu.showContent();\n\t}\n\n\t/**\n\t * Open the SlidingMenu and show the menu view.\n\t */\n\tpublic void showMenu() {\n\t\tmSlidingMenu.showMenu();\n\t}\n\n\t/**\n\t * Open the SlidingMenu and show the secondary menu view. Will default to the regular menu\n\t * if there is only one.\n\t */\n\tpublic void showSecondaryMenu() {\n\t\tmSlidingMenu.showSecondaryMenu();\n\t}\n\n\t/**\n\t * On key up.\n\t *\n\t * @param keyCode the key code\n\t * @param event the event\n\t * @return true, if successful\n\t */\n\tpublic boolean onKeyUp(int keyCode, KeyEvent event) {\n\t\tif (keyCode == KeyEvent.KEYCODE_BACK && mSlidingMenu.isMenuShowing()) {\n\t\t\tshowContent();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SlidingFragmentActivity.java",
    "content": "package com.slidingmenu.lib.app;\n\nimport android.os.Bundle;\nimport android.support.v4.app.FragmentActivity;\nimport android.view.KeyEvent;\nimport android.view.View;\nimport android.view.ViewGroup.LayoutParams;\n\nimport com.slidingmenu.lib.SlidingMenu;\n\npublic class SlidingFragmentActivity extends FragmentActivity implements SlidingActivityBase {\n\n\tprivate SlidingActivityHelper mHelper;\n\n\t/* (non-Javadoc)\n\t * @see android.support.v4.app.FragmentActivity#onCreate(android.os.Bundle)\n\t */\n\t@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tmHelper = new SlidingActivityHelper(this);\n\t\tmHelper.onCreate(savedInstanceState);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#onPostCreate(android.os.Bundle)\n\t */\n\t@Override\n\tpublic void onPostCreate(Bundle savedInstanceState) {\n\t\tsuper.onPostCreate(savedInstanceState);\n\t\tmHelper.onPostCreate(savedInstanceState);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#findViewById(int)\n\t */\n\t@Override\n\tpublic View findViewById(int id) {\n\t\tView v = super.findViewById(id);\n\t\tif (v != null)\n\t\t\treturn v;\n\t\treturn mHelper.findViewById(id);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.support.v4.app.FragmentActivity#onSaveInstanceState(android.os.Bundle)\n\t */\n\t@Override\n\tprotected void onSaveInstanceState(Bundle outState) {\n\t\tsuper.onSaveInstanceState(outState);\n\t\tmHelper.onSaveInstanceState(outState);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#setContentView(int)\n\t */\n\t@Override\n\tpublic void setContentView(int id) {\n\t\tsetContentView(getLayoutInflater().inflate(id, null));\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#setContentView(android.view.View)\n\t */\n\t@Override\n\tpublic void setContentView(View v) {\n\t\tsetContentView(v, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#setContentView(android.view.View, android.view.ViewGroup.LayoutParams)\n\t */\n\t@Override\n\tpublic void setContentView(View v, LayoutParams params) {\n\t\tsuper.setContentView(v, params);\n\t\tmHelper.registerAboveContentView(v, params);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#setBehindContentView(int)\n\t */\n\tpublic void setBehindContentView(int id) {\n\t\tsetBehindContentView(getLayoutInflater().inflate(id, null));\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#setBehindContentView(android.view.View)\n\t */\n\tpublic void setBehindContentView(View v) {\n\t\tsetBehindContentView(v, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#setBehindContentView(android.view.View, android.view.ViewGroup.LayoutParams)\n\t */\n\tpublic void setBehindContentView(View v, LayoutParams params) {\n\t\tmHelper.setBehindContentView(v, params);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#getSlidingMenu()\n\t */\n\tpublic SlidingMenu getSlidingMenu() {\n\t\treturn mHelper.getSlidingMenu();\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#toggle()\n\t */\n\tpublic void toggle() {\n\t\tmHelper.toggle();\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#showAbove()\n\t */\n\tpublic void showContent() {\n\t\tmHelper.showContent();\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#showBehind()\n\t */\n\tpublic void showMenu() {\n\t\tmHelper.showMenu();\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#showSecondaryMenu()\n\t */\n\tpublic void showSecondaryMenu() {\n\t\tmHelper.showSecondaryMenu();\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#setSlidingActionBarEnabled(boolean)\n\t */\n\tpublic void setSlidingActionBarEnabled(boolean b) {\n\t\tmHelper.setSlidingActionBarEnabled(b);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#onKeyUp(int, android.view.KeyEvent)\n\t */\n\t@Override\n\tpublic boolean onKeyUp(int keyCode, KeyEvent event) {\n\t\tboolean b = mHelper.onKeyUp(keyCode, event);\n\t\tif (b) return b;\n\t\treturn super.onKeyUp(keyCode, event);\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SlidingListActivity.java",
    "content": "package com.slidingmenu.lib.app;\n\nimport android.app.ListActivity;\nimport android.os.Bundle;\nimport android.view.KeyEvent;\nimport android.view.View;\nimport android.view.ViewGroup.LayoutParams;\nimport android.widget.ListView;\n\nimport com.slidingmenu.lib.SlidingMenu;\n\npublic class SlidingListActivity extends ListActivity implements SlidingActivityBase {\n\n\tprivate SlidingActivityHelper mHelper;\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#onCreate(android.os.Bundle)\n\t */\n\t@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tmHelper = new SlidingActivityHelper(this);\n\t\tmHelper.onCreate(savedInstanceState);\n\t\tListView listView = new ListView(this);\n\t\tlistView.setId(android.R.id.list);\n\t\tsetContentView(listView);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#onPostCreate(android.os.Bundle)\n\t */\n\t@Override\n\tpublic void onPostCreate(Bundle savedInstanceState) {\n\t\tsuper.onPostCreate(savedInstanceState);\n\t\tmHelper.onPostCreate(savedInstanceState);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#findViewById(int)\n\t */\n\t@Override\n\tpublic View findViewById(int id) {\n\t\tView v = super.findViewById(id);\n\t\tif (v != null)\n\t\t\treturn v;\n\t\treturn mHelper.findViewById(id);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#onSaveInstanceState(android.os.Bundle)\n\t */\n\t@Override\n\tprotected void onSaveInstanceState(Bundle outState) {\n\t\tsuper.onSaveInstanceState(outState);\n\t\tmHelper.onSaveInstanceState(outState);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#setContentView(int)\n\t */\n\t@Override\n\tpublic void setContentView(int id) {\n\t\tsetContentView(getLayoutInflater().inflate(id, null));\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#setContentView(android.view.View)\n\t */\n\t@Override\n\tpublic void setContentView(View v) {\n\t\tsetContentView(v, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#setContentView(android.view.View, android.view.ViewGroup.LayoutParams)\n\t */\n\t@Override\n\tpublic void setContentView(View v, LayoutParams params) {\n\t\tsuper.setContentView(v, params);\n\t\tmHelper.registerAboveContentView(v, params);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#setBehindContentView(int)\n\t */\n\tpublic void setBehindContentView(int id) {\n\t\tsetBehindContentView(getLayoutInflater().inflate(id, null));\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#setBehindContentView(android.view.View)\n\t */\n\tpublic void setBehindContentView(View v) {\n\t\tsetBehindContentView(v, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#setBehindContentView(android.view.View, android.view.ViewGroup.LayoutParams)\n\t */\n\tpublic void setBehindContentView(View v, LayoutParams params) {\n\t\tmHelper.setBehindContentView(v, params);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#getSlidingMenu()\n\t */\n\tpublic SlidingMenu getSlidingMenu() {\n\t\treturn mHelper.getSlidingMenu();\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#toggle()\n\t */\n\tpublic void toggle() {\n\t\tmHelper.toggle();\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#showAbove()\n\t */\n\tpublic void showContent() {\n\t\tmHelper.showContent();\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#showBehind()\n\t */\n\tpublic void showMenu() {\n\t\tmHelper.showMenu();\n\t}\n\t\n\t/*\n\t * (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#showSecondaryMenu()\n\t */\n\tpublic void showSecondaryMenu() {\n\t\tmHelper.showSecondaryMenu();\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#setSlidingActionBarEnabled(boolean)\n\t */\n\tpublic void setSlidingActionBarEnabled(boolean b) {\n\t\tmHelper.setSlidingActionBarEnabled(b);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#onKeyUp(int, android.view.KeyEvent)\n\t */\n\t@Override\n\tpublic boolean onKeyUp(int keyCode, KeyEvent event) {\n\t\tboolean b = mHelper.onKeyUp(keyCode, event);\n\t\tif (b) return b;\n\t\treturn super.onKeyUp(keyCode, event);\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SlidingMapActivity.java",
    "content": "//package com.slidingmenu.lib.app;\n//\n//import android.os.Bundle;\n//import android.view.KeyEvent;\n//import android.view.View;\n//import android.view.ViewGroup.LayoutParams;\n//\n//import com.google.android.maps.MapActivity;\n//import com.slidingmenu.lib.SlidingMenu;\n//\n//public abstract class SlidingMapActivity extends MapActivity implements SlidingActivityBase {\n//\n//\tprivate SlidingActivityHelper mHelper;\n//\n//\t/* (non-Javadoc)\n//\t * @see com.google.android.maps.MapActivity#onCreate(android.os.Bundle)\n//\t */\n//\t@Override\n//\tpublic void onCreate(Bundle savedInstanceState) {\n//\t\tsuper.onCreate(savedInstanceState);\n//\t\tmHelper = new SlidingActivityHelper(this);\n//\t\tmHelper.onCreate(savedInstanceState);\n//\t}\n//\n//\t/* (non-Javadoc)\n//\t * @see android.app.Activity#onPostCreate(android.os.Bundle)\n//\t */\n//\t@Override\n//\tpublic void onPostCreate(Bundle savedInstanceState) {\n//\t\tsuper.onPostCreate(savedInstanceState);\n//\t\tmHelper.onPostCreate(savedInstanceState);\n//\t}\n//\n//\t/* (non-Javadoc)\n//\t * @see android.app.Activity#findViewById(int)\n//\t */\n//\t@Override\n//\tpublic View findViewById(int id) {\n//\t\tView v = super.findViewById(id);\n//\t\tif (v != null)\n//\t\t\treturn v;\n//\t\treturn mHelper.findViewById(id);\n//\t}\n//\n//\t/* (non-Javadoc)\n//\t * @see android.app.Activity#onSaveInstanceState(android.os.Bundle)\n//\t */\n//\t@Override\n//\tprotected void onSaveInstanceState(Bundle outState) {\n//\t\tsuper.onSaveInstanceState(outState);\n//\t\tmHelper.onSaveInstanceState(outState);\n//\t}\n//\n//\t/* (non-Javadoc)\n//\t * @see android.app.Activity#setContentView(int)\n//\t */\n//\t@Override\n//\tpublic void setContentView(int id) {\n//\t\tsetContentView(getLayoutInflater().inflate(id, null));\n//\t}\n//\n//\t/* (non-Javadoc)\n//\t * @see android.app.Activity#setContentView(android.view.View)\n//\t */\n//\t@Override\n//\tpublic void setContentView(View v) {\n//\t\tsetContentView(v, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));\n//\t}\n//\n//\t/* (non-Javadoc)\n//\t * @see android.app.Activity#setContentView(android.view.View, android.view.ViewGroup.LayoutParams)\n//\t */\n//\t@Override\n//\tpublic void setContentView(View v, LayoutParams params) {\n//\t\tsuper.setContentView(v, params);\n//\t\tmHelper.registerAboveContentView(v, params);\n//\t}\n//\n//\t/* (non-Javadoc)\n//\t * @see com.slidingmenu.lib.app.SlidingActivityBase#setBehindContentView(int)\n//\t */\n//\tpublic void setBehindContentView(int id) {\n//\t\tsetBehindContentView(getLayoutInflater().inflate(id, null));\n//\t}\n//\n//\t/* (non-Javadoc)\n//\t * @see com.slidingmenu.lib.app.SlidingActivityBase#setBehindContentView(android.view.View)\n//\t */\n//\tpublic void setBehindContentView(View v) {\n//\t\tsetBehindContentView(v, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));\n//\t}\n//\n//\t/* (non-Javadoc)\n//\t * @see com.slidingmenu.lib.app.SlidingActivityBase#setBehindContentView(android.view.View, android.view.ViewGroup.LayoutParams)\n//\t */\n//\tpublic void setBehindContentView(View v, LayoutParams params) {\n//\t\tmHelper.setBehindContentView(v, params);\n//\t}\n//\n//\t/* (non-Javadoc)\n//\t * @see com.slidingmenu.lib.app.SlidingActivityBase#getSlidingMenu()\n//\t */\n//\tpublic SlidingMenu getSlidingMenu() {\n//\t\treturn mHelper.getSlidingMenu();\n//\t}\n//\n//\t/* (non-Javadoc)\n//\t * @see com.slidingmenu.lib.app.SlidingActivityBase#toggle()\n//\t */\n//\tpublic void toggle() {\n//\t\tmHelper.toggle();\n//\t}\n//\n//\t/* (non-Javadoc)\n//\t * @see com.slidingmenu.lib.app.SlidingActivityBase#showAbove()\n//\t */\n//\tpublic void showContent() {\n//\t\tmHelper.showContent();\n//\t}\n//\n//\t/* (non-Javadoc)\n//\t * @see com.slidingmenu.lib.app.SlidingActivityBase#showBehind()\n//\t */\n//\tpublic void showMenu() {\n//\t\tmHelper.showMenu();\n//\t}\n//\n//\t/* (non-Javadoc)\n//\t * @see com.slidingmenu.lib.app.SlidingActivityBase#showSecondaryMenu()\n//\t */\n//\tpublic void showSecondaryMenu() {\n//\t\tmHelper.showSecondaryMenu();\n//\t}\n//\n//\t/* (non-Javadoc)\n//\t * @see com.slidingmenu.lib.app.SlidingActivityBase#setSlidingActionBarEnabled(boolean)\n//\t */\n//\tpublic void setSlidingActionBarEnabled(boolean b) {\n//\t\tmHelper.setSlidingActionBarEnabled(b);\n//\t}\n//\n//\t/* (non-Javadoc)\n//\t * @see android.app.Activity#onKeyUp(int, android.view.KeyEvent)\n//\t */\n//\t@Override\n//\tpublic boolean onKeyUp(int keyCode, KeyEvent event) {\n//\t\tboolean b = mHelper.onKeyUp(keyCode, event);\n//\t\tif (b) return b;\n//\t\treturn super.onKeyUp(keyCode, event);\n//\t}\n//\n//}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SlidingPreferenceActivity.java",
    "content": "package com.slidingmenu.lib.app;\n\nimport com.slidingmenu.lib.SlidingMenu;\n\nimport android.os.Bundle;\nimport android.preference.PreferenceActivity;\nimport android.view.KeyEvent;\nimport android.view.View;\nimport android.view.ViewGroup.LayoutParams;\n\npublic class SlidingPreferenceActivity extends PreferenceActivity implements SlidingActivityBase {\n\n\tprivate SlidingActivityHelper mHelper;\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#onCreate(android.os.Bundle)\n\t */\n\t@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tmHelper = new SlidingActivityHelper(this);\n\t\tsuper.onCreate(savedInstanceState);\n\t\tmHelper.onCreate(savedInstanceState);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#onPostCreate(android.os.Bundle)\n\t */\n\t@Override\n\tpublic void onPostCreate(Bundle savedInstanceState) {\n\t\tsuper.onPostCreate(savedInstanceState);\n\t\tmHelper.onPostCreate(savedInstanceState);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#findViewById(int)\n\t */\n\t@Override\n\tpublic View findViewById(int id) {\n\t\tView v = super.findViewById(id);\n\t\tif (v != null)\n\t\t\treturn v;\n\t\treturn mHelper.findViewById(id);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#onSaveInstanceState(android.os.Bundle)\n\t */\n\t@Override\n\tprotected void onSaveInstanceState(Bundle outState) {\n\t\tsuper.onSaveInstanceState(outState);\n\t\tmHelper.onSaveInstanceState(outState);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#setContentView(int)\n\t */\n\t@Override\n\tpublic void setContentView(int id) {\n\t\tsetContentView(getLayoutInflater().inflate(id, null));\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#setContentView(android.view.View)\n\t */\n\t@Override\n\tpublic void setContentView(View v) {\n\t\tsetContentView(v, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#setContentView(android.view.View, android.view.ViewGroup.LayoutParams)\n\t */\n\t@Override\n\tpublic void setContentView(View v, LayoutParams params) {\n\t\tsuper.setContentView(v, params);\n\t\tmHelper.registerAboveContentView(v, params);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#setBehindContentView(int)\n\t */\n\tpublic void setBehindContentView(int id) {\n\t\tsetBehindContentView(getLayoutInflater().inflate(id, null));\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#setBehindContentView(android.view.View)\n\t */\n\tpublic void setBehindContentView(View v) {\n\t\tsetBehindContentView(v, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#setBehindContentView(android.view.View, android.view.ViewGroup.LayoutParams)\n\t */\n\tpublic void setBehindContentView(View v, LayoutParams params) {\n\t\tmHelper.setBehindContentView(v, params);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#getSlidingMenu()\n\t */\n\tpublic SlidingMenu getSlidingMenu() {\n\t\treturn mHelper.getSlidingMenu();\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#toggle()\n\t */\n\tpublic void toggle() {\n\t\tmHelper.toggle();\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#showAbove()\n\t */\n\tpublic void showContent() {\n\t\tmHelper.showContent();\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#showBehind()\n\t */\n\tpublic void showMenu() {\n\t\tmHelper.showMenu();\n\t}\n\t\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#showSecondaryMenu()\n\t */\n\tpublic void showSecondaryMenu() {\n\t\tmHelper.showSecondaryMenu();\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.slidingmenu.lib.app.SlidingActivityBase#setSlidingActionBarEnabled(boolean)\n\t */\n\tpublic void setSlidingActionBarEnabled(boolean b) {\n\t\tmHelper.setSlidingActionBarEnabled(b);\n\t}\n\n\t/* (non-Javadoc)\n\t * @see android.app.Activity#onKeyUp(int, android.view.KeyEvent)\n\t */\n\t@Override\n\tpublic boolean onKeyUp(int keyCode, KeyEvent event) {\n\t\tboolean b = mHelper.onKeyUp(keyCode, event);\n\t\tif (b) return b;\n\t\treturn super.onKeyUp(keyCode, event);\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SystemBarTintManager.java",
    "content": "/*\n * Copyright (C) 2013 readyState Software Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.slidingmenu.lib.app;\n\nimport java.lang.reflect.Field;\nimport java.lang.reflect.Method;\n\nimport android.annotation.SuppressLint;\nimport android.annotation.TargetApi;\nimport android.app.Activity;\nimport android.content.Context;\nimport android.content.res.Configuration;\nimport android.content.res.Resources;\nimport android.content.res.TypedArray;\nimport android.graphics.drawable.Drawable;\nimport android.os.Build;\nimport android.util.DisplayMetrics;\nimport android.util.TypedValue;\nimport android.view.Gravity;\nimport android.view.View;\nimport android.view.ViewConfiguration;\nimport android.view.ViewGroup;\nimport android.view.Window;\nimport android.view.WindowManager;\nimport android.widget.FrameLayout.LayoutParams;\n\n/**\n * Class to manage status and navigation bar tint effects when using KitKat\n * translucent system UI modes.\n *\n */\npublic class SystemBarTintManager {\n\n    /**\n     * The default system bar tint color value.\n     */\n    public static final int DEFAULT_TINT_COLOR = 0x99000000;\n\n    private final SystemBarConfig mConfig;\n    private boolean mStatusBarAvailable;\n    private boolean mNavBarAvailable;\n    private boolean mStatusBarTintEnabled;\n    private boolean mNavBarTintEnabled;\n    private View mStatusBarTintView;\n    private View mNavBarTintView;\n    private static boolean sIsMiuiV6;\n\n    static {\n        try {\n            Class<?> sysClass = Class.forName(\"android.os.SystemProperties\");\n            Method getStringMethod = sysClass.getDeclaredMethod(\"get\", String.class);\n            sIsMiuiV6 = \"V6\".equals((String) getStringMethod.invoke(sysClass, \"ro.miui.ui.version.name\"));\n        } catch (Exception e) {\n            e.printStackTrace();\n        }\n    }\n\n    /**\n     * Constructor. Call this in the host activity onCreate method after its\n     * content view has been set. You should always create new instances when\n     * the host activity is recreated.\n     *\n     * @param activity The host activity.\n     */\n    @TargetApi(19)\n    public SystemBarTintManager(Activity activity) {\n\n        Window win = activity.getWindow();\n        ViewGroup decorViewGroup = (ViewGroup) win.getDecorView();\n\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n            // check theme attrs\n            int[] attrs = {android.R.attr.windowTranslucentStatus,\n                    android.R.attr.windowTranslucentNavigation};\n            TypedArray a = activity.obtainStyledAttributes(attrs);\n            try {\n                mStatusBarAvailable = a.getBoolean(0, false);\n                mNavBarAvailable = a.getBoolean(1, false);\n            } finally {\n                a.recycle();\n            }\n\n            // check window flags\n            WindowManager.LayoutParams winParams = win.getAttributes();\n            int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;\n            if ((winParams.flags & bits) != 0) {\n                mStatusBarAvailable = true;\n            }\n            bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION;\n            if ((winParams.flags & bits) != 0) {\n                mNavBarAvailable = true;\n            }\n        }\n\n        mConfig = new SystemBarConfig(activity, mStatusBarAvailable, mNavBarAvailable);\n        // device might not have virtual navigation keys\n        if (!mConfig.hasNavigtionBar()) {\n            mNavBarAvailable = false;\n        }\n\n        if (mStatusBarAvailable) {\n            setupStatusBarView(activity, decorViewGroup);\n        }\n        if (mNavBarAvailable) {\n            setupNavBarView(activity, decorViewGroup);\n        }\n\n    }\n\n    /**\n     * Enable tinting of the system status bar.\n     *\n     * If the platform is running Jelly Bean or earlier, or translucent system\n     * UI modes have not been enabled in either the theme or via window flags,\n     * then this method does nothing.\n     *\n     * @param enabled True to enable tinting, false to disable it (default).\n     */\n    public void setStatusBarTintEnabled(boolean enabled) {\n        mStatusBarTintEnabled = enabled;\n        if (mStatusBarAvailable) {\n            mStatusBarTintView.setVisibility(enabled ? View.VISIBLE : View.GONE);\n        }\n    }\n\n    /**\n     * set status bar darkmode\n     * @param darkmode\n     * @param activity\n     */\n    public void setStatusBarDarkMode(boolean darkmode, Activity activity) {\n        if (sIsMiuiV6) {\n            Class<? extends Window> clazz = activity.getWindow().getClass();\n            try {\n            int darkModeFlag = 0;\n            Class<?> layoutParams = Class.forName(\"android.view.MiuiWindowManager$LayoutParams\");\n            Field field = layoutParams.getField(\"EXTRA_FLAG_STATUS_BAR_DARK_MODE\");\n            darkModeFlag = field.getInt(layoutParams);\n            Method extraFlagField = clazz.getMethod(\"setExtraFlags\", int.class, int.class);\n            extraFlagField.invoke(activity.getWindow(), darkmode ? darkModeFlag : 0, darkModeFlag);\n            } catch (Exception e) {\n                e.printStackTrace();\n            }\n        }\n    }\n\n    /**\n     * Enable tinting of the system navigation bar.\n     *\n     * If the platform does not have soft navigation keys, is running Jelly Bean\n     * or earlier, or translucent system UI modes have not been enabled in either\n     * the theme or via window flags, then this method does nothing.\n     *\n     * @param enabled True to enable tinting, false to disable it (default).\n     */\n    public void setNavigationBarTintEnabled(boolean enabled) {\n        mNavBarTintEnabled = enabled;\n        if (mNavBarAvailable) {\n            mNavBarTintView.setVisibility(enabled ? View.VISIBLE : View.GONE);\n        }\n    }\n\n    /**\n     * Apply the specified color tint to all system UI bars.\n     *\n     * @param color The color of the background tint.\n     */\n    public void setTintColor(int color) {\n        setStatusBarTintColor(color);\n        setNavigationBarTintColor(color);\n    }\n\n    /**\n     * Apply the specified drawable or color resource to all system UI bars.\n     *\n     * @param res The identifier of the resource.\n     */\n    public void setTintResource(int res) {\n        setStatusBarTintResource(res);\n        setNavigationBarTintResource(res);\n    }\n\n    /**\n     * Apply the specified drawable to all system UI bars.\n     *\n     * @param drawable The drawable to use as the background, or null to remove it.\n     */\n    public void setTintDrawable(Drawable drawable) {\n        setStatusBarTintDrawable(drawable);\n        setNavigationBarTintDrawable(drawable);\n    }\n\n    /**\n     * Apply the specified alpha to all system UI bars.\n     *\n     * @param alpha The alpha to use\n     */\n    public void setTintAlpha(float alpha) {\n        setStatusBarAlpha(alpha);\n        setNavigationBarAlpha(alpha);\n    }\n\n    /**\n     * Apply the specified color tint to the system status bar.\n     *\n     * @param color The color of the background tint.\n     */\n    public void setStatusBarTintColor(int color) {\n        if (mStatusBarAvailable) {\n            mStatusBarTintView.setBackgroundColor(color);\n        }\n    }\n\n    /**\n     * Apply the specified drawable or color resource to the system status bar.\n     *\n     * @param res The identifier of the resource.\n     */\n    public void setStatusBarTintResource(int res) {\n        if (mStatusBarAvailable) {\n            mStatusBarTintView.setBackgroundResource(res);\n        }\n    }\n\n    /**\n     * Apply the specified drawable to the system status bar.\n     *\n     * @param drawable The drawable to use as the background, or null to remove it.\n     */\n    @SuppressWarnings(\"deprecation\")\n    public void setStatusBarTintDrawable(Drawable drawable) {\n        if (mStatusBarAvailable) {\n            mStatusBarTintView.setBackgroundDrawable(drawable);\n        }\n    }\n\n    /**\n     * Apply the specified alpha to the system status bar.\n     *\n     * @param alpha The alpha to use\n     */\n    @TargetApi(11)\n    public void setStatusBarAlpha(float alpha) {\n        if (mStatusBarAvailable && Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {\n            mStatusBarTintView.setAlpha(alpha);\n        }\n    }\n\n    /**\n     * Apply the specified color tint to the system navigation bar.\n     *\n     * @param color The color of the background tint.\n     */\n    public void setNavigationBarTintColor(int color) {\n        if (mNavBarAvailable) {\n            mNavBarTintView.setBackgroundColor(color);\n        }\n    }\n\n    /**\n     * Apply the specified drawable or color resource to the system navigation bar.\n     *\n     * @param res The identifier of the resource.\n     */\n    public void setNavigationBarTintResource(int res) {\n        if (mNavBarAvailable) {\n            mNavBarTintView.setBackgroundResource(res);\n        }\n    }\n\n    /**\n     * Apply the specified drawable to the system navigation bar.\n     *\n     * @param drawable The drawable to use as the background, or null to remove it.\n     */\n    @SuppressWarnings(\"deprecation\")\n    public void setNavigationBarTintDrawable(Drawable drawable) {\n        if (mNavBarAvailable) {\n            mNavBarTintView.setBackgroundDrawable(drawable);\n        }\n    }\n\n    /**\n     * Apply the specified alpha to the system navigation bar.\n     *\n     * @param alpha The alpha to use\n     */\n    @TargetApi(11)\n    public void setNavigationBarAlpha(float alpha) {\n        if (mNavBarAvailable && Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {\n            mNavBarTintView.setAlpha(alpha);\n        }\n    }\n\n    /**\n     * Get the system bar configuration.\n     *\n     * @return The system bar configuration for the current device configuration.\n     */\n    public SystemBarConfig getConfig() {\n        return mConfig;\n    }\n\n    /**\n     * Is tinting enabled for the system status bar?\n     *\n     * @return True if enabled, False otherwise.\n     */\n    public boolean isStatusBarTintEnabled() {\n        return mStatusBarTintEnabled;\n    }\n\n    /**\n     * Is tinting enabled for the system navigation bar?\n     *\n     * @return True if enabled, False otherwise.\n     */\n    public boolean isNavBarTintEnabled() {\n        return mNavBarTintEnabled;\n    }\n\n    private void setupStatusBarView(Context context, ViewGroup decorViewGroup) {\n        mStatusBarTintView = new View(context);\n        LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, mConfig.getStatusBarHeight());\n        params.gravity = Gravity.TOP;\n        if (mNavBarAvailable && !mConfig.isNavigationAtBottom()) {\n            params.rightMargin = mConfig.getNavigationBarWidth();\n        }\n        mStatusBarTintView.setLayoutParams(params);\n        mStatusBarTintView.setBackgroundColor(DEFAULT_TINT_COLOR);\n        mStatusBarTintView.setVisibility(View.GONE);\n        decorViewGroup.addView(mStatusBarTintView);\n    }\n\n    private void setupNavBarView(Context context, ViewGroup decorViewGroup) {\n        mNavBarTintView = new View(context);\n        LayoutParams params;\n        if (mConfig.isNavigationAtBottom()) {\n            params = new LayoutParams(LayoutParams.MATCH_PARENT, mConfig.getNavigationBarHeight());\n            params.gravity = Gravity.BOTTOM;\n        } else {\n            params = new LayoutParams(mConfig.getNavigationBarWidth(), LayoutParams.MATCH_PARENT);\n            params.gravity = Gravity.RIGHT;\n        }\n        mNavBarTintView.setLayoutParams(params);\n        mNavBarTintView.setBackgroundColor(DEFAULT_TINT_COLOR);\n        mNavBarTintView.setVisibility(View.GONE);\n        decorViewGroup.addView(mNavBarTintView);\n    }\n\n    /**\n     * Class which describes system bar sizing and other characteristics for the current\n     * device configuration.\n     *\n     */\n    public static class SystemBarConfig {\n\n        private static final String STATUS_BAR_HEIGHT_RES_NAME = \"status_bar_height\";\n        private static final String NAV_BAR_HEIGHT_RES_NAME = \"navigation_bar_height\";\n        private static final String NAV_BAR_HEIGHT_LANDSCAPE_RES_NAME = \"navigation_bar_height_landscape\";\n        private static final String NAV_BAR_WIDTH_RES_NAME = \"navigation_bar_width\";\n\n        private final boolean mTranslucentStatusBar;\n        private final boolean mTranslucentNavBar;\n        private final int mStatusBarHeight;\n        private final int mActionBarHeight;\n        private final boolean mHasNavigationBar;\n        private final int mNavigationBarHeight;\n        private final int mNavigationBarWidth;\n        private final boolean mInPortrait;\n        private final float mSmallestWidthDp;\n\n        private SystemBarConfig(Activity activity, boolean translucentStatusBar, boolean traslucentNavBar) {\n            Resources res = activity.getResources();\n            mInPortrait = (res.getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT);\n            mSmallestWidthDp = getSmallestWidthDp(activity);\n            mStatusBarHeight = getInternalDimensionSize(res, STATUS_BAR_HEIGHT_RES_NAME);\n            mActionBarHeight = getActionBarHeight(activity);\n            mNavigationBarHeight = getNavigationBarHeight(activity);\n            mNavigationBarWidth = getNavigationBarWidth(activity);\n            mHasNavigationBar = (mNavigationBarHeight > 0);\n            mTranslucentStatusBar = translucentStatusBar;\n            mTranslucentNavBar = traslucentNavBar;\n        }\n\n        @TargetApi(14)\n        private int getActionBarHeight(Context context) {\n            int result = 0;\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n                TypedValue tv = new TypedValue();\n                context.getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true);\n                result = context.getResources().getDimensionPixelSize(tv.resourceId);\n            }\n            return result;\n        }\n\n        @TargetApi(14)\n        private int getNavigationBarHeight(Context context) {\n            Resources res = context.getResources();\n            int result = 0;\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n                if (!ViewConfiguration.get(context).hasPermanentMenuKey()) {\n                    String key;\n                    if (mInPortrait) {\n                        key = NAV_BAR_HEIGHT_RES_NAME;\n                    } else {\n                        key = NAV_BAR_HEIGHT_LANDSCAPE_RES_NAME;\n                    }\n                    return getInternalDimensionSize(res, key);\n                }\n            }\n            return result;\n        }\n\n        @TargetApi(14)\n        private int getNavigationBarWidth(Context context) {\n            Resources res = context.getResources();\n            int result = 0;\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n                if (!ViewConfiguration.get(context).hasPermanentMenuKey()) {\n                    return getInternalDimensionSize(res, NAV_BAR_WIDTH_RES_NAME);\n                }\n            }\n            return result;\n        }\n\n        private int getInternalDimensionSize(Resources res, String key) {\n            int result = 0;\n            int resourceId = res.getIdentifier(key, \"dimen\", \"android\");\n            if (resourceId > 0) {\n                result = res.getDimensionPixelSize(resourceId);\n            }\n            return result;\n        }\n\n        @SuppressLint(\"NewApi\")\n        private float getSmallestWidthDp(Activity activity) {\n            DisplayMetrics metrics = new DisplayMetrics();\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n                activity.getWindowManager().getDefaultDisplay().getRealMetrics(metrics);\n            } else {\n                // TODO this is not correct, but we don't really care pre-kitkat\n                activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);\n            }\n            float widthDp = metrics.widthPixels / metrics.density;\n            float heightDp = metrics.heightPixels / metrics.density;\n            return Math.min(widthDp, heightDp);\n        }\n\n        /**\n         * Should a navigation bar appear at the bottom of the screen in the current\n         * device configuration? A navigation bar may appear on the right side of\n         * the screen in certain configurations.\n         *\n         * @return True if navigation should appear at the bottom of the screen, False otherwise.\n         */\n        public boolean isNavigationAtBottom() {\n            return (mSmallestWidthDp >= 600 || mInPortrait);\n        }\n\n        /**\n         * Get the height of the system status bar.\n         *\n         * @return The height of the status bar (in pixels).\n         */\n        public int getStatusBarHeight() {\n            return mStatusBarHeight;\n        }\n\n        /**\n         * Get the height of the action bar.\n         *\n         * @return The height of the action bar (in pixels).\n         */\n        public int getActionBarHeight() {\n            return mActionBarHeight;\n        }\n\n        /**\n         * Does this device have a system navigation bar?\n         *\n         * @return True if this device uses soft key navigation, False otherwise.\n         */\n        public boolean hasNavigtionBar() {\n            return mHasNavigationBar;\n        }\n\n        /**\n         * Get the height of the system navigation bar.\n         *\n         * @return The height of the navigation bar (in pixels). If the device does not have\n         * soft navigation keys, this will always return 0.\n         */\n        public int getNavigationBarHeight() {\n            return mNavigationBarHeight;\n        }\n\n        /**\n         * Get the width of the system navigation bar when it is placed vertically on the screen.\n         *\n         * @return The width of the navigation bar (in pixels). If the device does not have\n         * soft navigation keys, this will always return 0.\n         */\n        public int getNavigationBarWidth() {\n            return mNavigationBarWidth;\n        }\n\n        /**\n         * Get the layout inset for any system UI that appears at the top of the screen.\n         *\n         * @param withActionBar True to include the height of the action bar, False otherwise.\n         * @return The layout inset (in pixels).\n         */\n        public int getPixelInsetTop(boolean withActionBar) {\n            return (mTranslucentStatusBar ? mStatusBarHeight : 0) + (withActionBar ? mActionBarHeight : 0);\n        }\n\n        /**\n         * Get the layout inset for any system UI that appears at the bottom of the screen.\n         *\n         * @return The layout inset (in pixels).\n         */\n        public int getPixelInsetBottom() {\n            if (mTranslucentNavBar && isNavigationAtBottom()) {\n                return mNavigationBarHeight;\n            } else {\n                return 0;\n            }\n        }\n\n        /**\n         * Get the layout inset for any system UI that appears at the right of the screen.\n         *\n         * @return The layout inset (in pixels).\n         */\n        public int getPixelInsetRight() {\n            if (mTranslucentNavBar && !isNavigationAtBottom()) {\n                return mNavigationBarWidth;\n            } else {\n                return 0;\n            }\n        }\n\n    }\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/umeng/fb/example/AppApplication.java",
    "content": "package com.umeng.fb.example;\n\nimport android.app.Application;\nimport com.umeng.fb.push.FeedbackPush;\n\n/**\n * Created by user on 2014/10/13.\n */\npublic class AppApplication extends Application {\n    @Override\n    public void onCreate() {\n        FeedbackPush.getInstance(this).init(false);\n//        AppPush.getInstance(this).init();\n    }\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/umeng/fb/example/AppPush.java",
    "content": "package com.umeng.fb.example;\n\n\nimport android.content.Context;\n\nimport com.umeng.fb.push.FBMessage;\nimport com.umeng.fb.push.FeedbackPush;\nimport com.umeng.message.PushAgent;\nimport com.umeng.message.UmengMessageHandler;\nimport com.umeng.message.entity.UMessage;\n\npublic class AppPush {\n\n    public UmengMessageHandler mMessageHandler;\n    private static AppPush mAppPush;\n    private Context context;\n\n    public static AppPush getInstance(Context context) {\n        if (mAppPush == null)\n            mAppPush = new AppPush(context);\n        return mAppPush;\n    }\n\n    public AppPush(Context context) {\n        this.context = context;\n    }\n\n    public void init() {\n        mMessageHandler = new UmengMessageHandler() {\n            @Override\n            public void dealWithCustomMessage(Context context, UMessage msg) {\n                if (FeedbackPush.getInstance(context).dealFBMessage(new FBMessage(msg.custom))) {\n                    //The push message is reply from developer.\n                    return;\n                }\n\n                //The push message is not reply from developer.\n                /*************** other code ***************/\n            }\n        };\n        PushAgent.getInstance(context).setMessageHandler(mMessageHandler);\n    }\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/umeng/fb/example/CustomActivity.java",
    "content": "package com.umeng.fb.example;\n\nimport java.text.SimpleDateFormat;\nimport java.util.Date;\nimport java.util.List;\n\nimport com.cwp.chart.SystemBarTintManager;\nimport com.cwp.cmoneycharge.R;\nimport com.cwp.cmoneycharge.SysApplication;\nimport com.umeng.fb.FeedbackAgent;\nimport com.umeng.fb.SyncListener;\nimport com.umeng.fb.model.Conversation;\nimport com.umeng.fb.model.Reply;\n\nimport android.annotation.TargetApi;\nimport android.app.Activity;\nimport android.content.Context;\nimport android.content.Intent;\nimport android.content.SharedPreferences;\nimport android.content.SharedPreferences.Editor;\nimport android.os.Build;\nimport android.os.Bundle;\nimport android.os.Handler;\nimport android.os.Message;\nimport android.support.v4.widget.SwipeRefreshLayout;\nimport android.support.v4.widget.SwipeRefreshLayout.OnRefreshListener;\nimport android.text.TextUtils;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.Window;\nimport android.view.WindowManager;\nimport android.view.View.OnClickListener;\n\nimport android.view.ViewGroup;\nimport android.widget.BaseAdapter;\nimport android.widget.Button;\nimport android.widget.EditText;\nimport android.widget.ImageView;\nimport android.widget.ListView;\nimport android.widget.ProgressBar;\nimport android.widget.TextView;\n\npublic class CustomActivity extends Activity {\n\n\tprivate ListView mListView;\n\tprivate FeedbackAgent mAgent;\n\tprivate Conversation mComversation;\n\tprivate Context mContext;\n\tprivate ReplyAdapter adapter;\n\tprivate Button sendBtn;\n\tprivate EditText inputEdit;\n\tprivate SwipeRefreshLayout mSwipeRefreshLayout;\n\tprivate final int VIEW_TYPE_COUNT = 2;\n\tprivate final int VIEW_TYPE_USER = 0;\n\tprivate final int VIEW_TYPE_DEV = 1;\n\tprivate final String TAG = CustomActivity.class.getName();\n\tString firstfb = \"true\";\n\n\tprivate Handler mHandler = new Handler() {\n\t\t@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tadapter.notifyDataSetChanged();\n\t\t}\n\t};\n\tprivate ImageView example_left2;\n\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.activity_custom);\n\n\t\tSysApplication.getInstance().addActivity(this); // 在销毁队列中添加this\n\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n\t\t\tsetTranslucentStatus(true);\n\t\t\tfindViewById(R.id.fb_top).setVisibility(View.VISIBLE);\n\t\t}\n\t\tSystemBarTintManager mTintManager = new SystemBarTintManager(this);\n\t\tmTintManager.setStatusBarTintEnabled(true);\n\t\tmTintManager.setStatusBarTintResource(R.color.statusbar_bg);\n\n\t\tmContext = this;\n\t\tSharedPreferences sp = this.getSharedPreferences(\"preferences\",\n\t\t\t\tMODE_WORLD_READABLE);\n\t\tEditor edit = sp.edit();\n\n\t\tinitView();\n\n\t\tIntent intentr = getIntent();\n\t\tBundle bundle = intentr.getExtras();// 获取传入的数据，并使用Bundle记录\n\t\tif (bundle != null) {\n\t\t\tif (bundle.containsKey(\"cwp.md\")) {\n\t\t\t\tString error = (String) bundle.getString(\"cwp.md\");// 获取Bundle中记录的信息\n\t\t\t\tinputEdit.setText(error);\n\t\t\t}\n\t\t}\n\t\tmAgent = new FeedbackAgent(this);\n\t\tmComversation = new FeedbackAgent(this).getDefaultConversation();\n\t\tif (!firstfb.equals(sp.getString(\"firstfb\", \"\"))) {\n\t\t\tmComversation.addUserReply(\"您好，欢迎使用快速记，请反馈使用产品的感受和建议\");\n\t\t\tedit.putString(\"firstfb\", \"true\"); // 一天只检查一次\n\t\t\tedit.commit();\n\t\t}\n\t\tadapter = new ReplyAdapter();\n\t\tmListView.setAdapter(adapter);\n\t\tsync();\n\n\t}\n\n\t@TargetApi(19)\n\tprivate void setTranslucentStatus(boolean on) {\n\t\tWindow win = getWindow();\n\t\tWindowManager.LayoutParams winParams = win.getAttributes();\n\t\tfinal int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;\n\t\tif (on) {\n\t\t\twinParams.flags |= bits;\n\t\t} else {\n\t\t\twinParams.flags &= ~bits;\n\t\t}\n\t\twin.setAttributes(winParams);\n\t}\n\n\tprivate void initView() {\n\t\tmListView = (ListView) findViewById(R.id.fb_reply_list);\n\t\tsendBtn = (Button) findViewById(R.id.fb_send_btn);\n\t\tinputEdit = (EditText) findViewById(R.id.fb_send_content);\n\t\texample_left2 = (ImageView) findViewById(R.id.example_left2);\n\t\t// 下拉刷新组件\n\n\t\tmSwipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.fb_reply_refresh);\n\t\texample_left2.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t\tsendBtn.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString content = inputEdit.getText().toString();\n\t\t\t\tinputEdit.getEditableText().clear();\n\t\t\t\tif (!TextUtils.isEmpty(content)) {\n\t\t\t\t\t// 将内容添加到会话列表\n\t\t\t\t\tmComversation.addUserReply(content);\n\t\t\t\t\t// 刷新新ListView\n\t\t\t\t\tmHandler.sendMessage(new Message());\n\t\t\t\t\t// 数据同步\n\t\t\t\t\tsync();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// 下拉刷新\n\t\tmSwipeRefreshLayout.setOnRefreshListener(new OnRefreshListener() {\n\t\t\t@Override\n\t\t\tpublic void onRefresh() {\n\t\t\t\tsync();\n\t\t\t}\n\t\t});\n\t}\n\n\t// 数据同步\n\tprivate void sync() {\n\n\t\tmComversation.sync(new SyncListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onSendUserReply(List<Reply> replyList) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onReceiveDevReply(List<Reply> replyList) {\n\t\t\t\t// SwipeRefreshLayout停止刷新\n\t\t\t\tmSwipeRefreshLayout.setRefreshing(false);\n\t\t\t\t// 发送消息，刷新ListView\n\t\t\t\tmHandler.sendMessage(new Message());\n\t\t\t\t// 如果开发者没有新的回复数据，则返回\n\t\t\t\tif (replyList == null || replyList.size() < 1) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t// 更新adapter，刷新ListView\n\t\tadapter.notifyDataSetChanged();\n\t}\n\n\t// adapter\n\tclass ReplyAdapter extends BaseAdapter {\n\n\t\t@Override\n\t\tpublic int getCount() {\n\t\t\treturn mComversation.getReplyList().size();\n\t\t}\n\n\t\t@Override\n\t\tpublic Object getItem(int arg0) {\n\t\t\treturn mComversation.getReplyList().get(arg0);\n\t\t}\n\n\t\t@Override\n\t\tpublic long getItemId(int arg0) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\t@Override\n\t\tpublic int getViewTypeCount() {\n\t\t\t// 两种不同的Tiem布局\n\t\t\treturn VIEW_TYPE_COUNT;\n\t\t}\n\n\t\t@Override\n\t\tpublic int getItemViewType(int position) {\n\t\t\t// 获取单条回复\n\t\t\tReply reply = mComversation.getReplyList().get(position);\n\t\t\tif (Reply.TYPE_DEV_REPLY.equals(reply.type)) {\n\t\t\t\t// 开发者回复Item布局\n\t\t\t\treturn VIEW_TYPE_DEV;\n\t\t\t} else {\n\t\t\t\t// 用户反馈、回复Item布局\n\t\t\t\treturn VIEW_TYPE_USER;\n\t\t\t}\n\t\t}\n\n\t\t@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tViewHolder holder = null;\n\n\t\t\t// 获取单条回复\n\t\t\tReply reply = mComversation.getReplyList().get(position);\n\t\t\tif (convertView == null) {\n\t\t\t\t// 根据Type的类型来加载不同的Item布局\n\t\t\t\tif (Reply.TYPE_DEV_REPLY.equals(reply.type)) {\n\t\t\t\t\t// 开发者的回复\n\t\t\t\t\tconvertView = LayoutInflater.from(mContext).inflate(\n\t\t\t\t\t\t\tR.layout.custom_fb_user_reply, null);\n\t\t\t\t} else {\n\t\t\t\t\t// 用户的反馈、回复\n\t\t\t\t\tconvertView = LayoutInflater.from(mContext).inflate(\n\t\t\t\t\t\t\tR.layout.custom_fb_dev_reply, null);\n\n\t\t\t\t\tif (position == 0) {\n\t\t\t\t\t\tconvertView = LayoutInflater.from(mContext).inflate(\n\t\t\t\t\t\t\t\tR.layout.custom_fb_user_reply, null);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// 创建ViewHolder并获取各种View\n\t\t\t\tholder = new ViewHolder();\n\t\t\t\tholder.replyContent = (TextView) convertView\n\t\t\t\t\t\t.findViewById(R.id.fb_reply_content);\n\t\t\t\tholder.replyProgressBar = (ProgressBar) convertView\n\t\t\t\t\t\t.findViewById(R.id.fb_reply_progressBar);\n\t\t\t\tholder.replyStateFailed = (ImageView) convertView\n\t\t\t\t\t\t.findViewById(R.id.fb_reply_state_failed);\n\t\t\t\tholder.replyData = (TextView) convertView\n\t\t\t\t\t\t.findViewById(R.id.fb_reply_date);\n\t\t\t\tconvertView.setTag(holder);\n\t\t\t} else {\n\t\t\t\tholder = (ViewHolder) convertView.getTag();\n\t\t\t}\n\n\t\t\t// 以下是填充数据\n\t\t\t// 设置Reply的内容\n\t\t\tholder.replyContent.setText(reply.content);\n\t\t\t// 在App应用界面，对于开发者的Reply来讲status没有意义\n\t\t\tif (!Reply.TYPE_DEV_REPLY.equals(reply.type)) {\n\t\t\t\t// 根据Reply的状态来设置replyStateFailed的状态\n\t\t\t\tif (Reply.STATUS_NOT_SENT.equals(reply.status)) {\n\t\t\t\t\tholder.replyStateFailed.setVisibility(View.VISIBLE);\n\t\t\t\t} else {\n\t\t\t\t\tholder.replyStateFailed.setVisibility(View.GONE);\n\t\t\t\t}\n\n\t\t\t\t// 根据Reply的状态来设置replyProgressBar的状态\n\t\t\t\tif (Reply.STATUS_SENDING.equals(reply.status)) {\n\t\t\t\t\tholder.replyProgressBar.setVisibility(View.VISIBLE);\n\t\t\t\t} else {\n\t\t\t\t\tholder.replyProgressBar.setVisibility(View.GONE);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// 回复的时间数据，这里仿照QQ两条Reply之间相差100000ms则展示时间\n\t\t\tif ((position + 1) < mComversation.getReplyList().size()) {\n\t\t\t\tReply nextReply = mComversation.getReplyList()\n\t\t\t\t\t\t.get(position + 1);\n\t\t\t\tif (nextReply.created_at - reply.created_at > 100000) {\n\t\t\t\t\tDate replyTime = new Date(reply.created_at);\n\t\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\n\t\t\t\t\t\t\t\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\t\tholder.replyData.setText(sdf.format(replyTime));\n\t\t\t\t\tholder.replyData.setVisibility(View.VISIBLE);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn convertView;\n\t\t}\n\n\t\tclass ViewHolder {\n\t\t\tTextView replyContent;\n\t\t\tProgressBar replyProgressBar;\n\t\t\tImageView replyStateFailed;\n\t\t\tTextView replyData;\n\t\t}\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/umeng/fb/example/MyPushIntentService.java",
    "content": "package com.umeng.fb.example;\n\nimport org.android.agoo.client.BaseConstants;\nimport org.json.JSONObject;\n\nimport android.content.Context;\nimport android.content.Intent;\n\nimport android.util.Log;\n\nimport com.umeng.fb.ConversationActivity;\nimport com.umeng.fb.push.FeedbackPush;\nimport com.umeng.message.UmengBaseIntentService;\nimport com.umeng.message.entity.UMessage;\n\n\n\n\npublic class MyPushIntentService extends UmengBaseIntentService{\n\tprivate static final String TAG = MyPushIntentService.class.getName();\n\n\t@Override\n\tprotected void onMessage(Context context, Intent intent) {\n\t\tsuper.onMessage(context, intent);\n        FeedbackPush.getInstance(context).init(ConversationActivity.class,true);\n        if(FeedbackPush.getInstance(context).onFBMessage(intent)){\n            //The push message is reply from developer.\n            return;\n        }\n\n        //The push message is not reply from developer.\n        /*************** other code ***************/\n\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/zhy/view/HorizontalProgressBarWithNumber.java",
    "content": "package com.zhy.view;\n\nimport android.content.Context;\nimport android.content.res.TypedArray;\nimport android.graphics.Canvas;\nimport android.graphics.Paint;\nimport android.util.AttributeSet;\nimport android.util.TypedValue;\nimport android.widget.ProgressBar;\n\nimport com.cwp.cmoneycharge.R;\n\npublic class HorizontalProgressBarWithNumber extends ProgressBar\n{\n\n\tprivate static final int DEFAULT_TEXT_SIZE = 10;\n\tprivate static final int DEFAULT_TEXT_COLOR = 0XFFFC00D1;\n\tprivate static final int DEFAULT_COLOR_UNREACHED_COLOR = 0xFFd3d6da;\n\tprivate static final int DEFAULT_HEIGHT_REACHED_PROGRESS_BAR = 2;\n\tprivate static final int DEFAULT_HEIGHT_UNREACHED_PROGRESS_BAR = 2;\n\tprivate static final int DEFAULT_SIZE_TEXT_OFFSET = 10;\n\n\t/**\n\t * painter of all drawing things\n\t */\n\tprotected Paint mPaint = new Paint();\n\t/**\n\t * color of progress number\n\t */\n\tprotected int mTextColor = DEFAULT_TEXT_COLOR;\n\t/**\n\t * size of text (sp)\n\t */\n\tprotected int mTextSize = sp2px(DEFAULT_TEXT_SIZE);\n\n\t/**\n\t * offset of draw progress\n\t */\n\tprotected int mTextOffset = dp2px(DEFAULT_SIZE_TEXT_OFFSET);\n\n\t/**\n\t * height of reached progress bar\n\t */\n\tprotected int mReachedProgressBarHeight = dp2px(DEFAULT_HEIGHT_REACHED_PROGRESS_BAR);\n\n\t/**\n\t * color of reached bar\n\t */\n\tprotected int mReachedBarColor = DEFAULT_TEXT_COLOR;\n\t/**\n\t * color of unreached bar\n\t */\n\tprotected int mUnReachedBarColor = DEFAULT_COLOR_UNREACHED_COLOR;\n\t/**\n\t * height of unreached progress bar\n\t */\n\tprotected int mUnReachedProgressBarHeight = dp2px(DEFAULT_HEIGHT_UNREACHED_PROGRESS_BAR);\n\t/**\n\t * view width except padding\n\t */\n\tprotected int mRealWidth;\n\n\tprotected boolean mIfDrawText = true;\n\n\tprotected static final int VISIBLE = 0;\n\n\tpublic HorizontalProgressBarWithNumber(Context context, AttributeSet attrs)\n\t{\n\t\tthis(context, attrs, 0);\n\t}\n\n\tpublic HorizontalProgressBarWithNumber(Context context, AttributeSet attrs,\n\t\t\tint defStyle)\n\t{\n\t\tsuper(context, attrs, defStyle);\n\t\tobtainStyledAttributes(attrs);\n\t\tmPaint.setTextSize(mTextSize);\n\t\tmPaint.setColor(mTextColor);\n\t}\n\n\t@Override\n\tprotected synchronized void onMeasure(int widthMeasureSpec,\n\t\t\tint heightMeasureSpec)\n\t{\n\n\t\tint width = MeasureSpec.getSize(widthMeasureSpec);\n\t\tint height = measureHeight(heightMeasureSpec);\n\t\tsetMeasuredDimension(width, height);\n\n\t\tmRealWidth = getMeasuredWidth() - getPaddingRight() - getPaddingLeft();\n\t}\n\n\tprivate int measureHeight(int measureSpec)\n\t{\n\t\tint result = 0;\n\t\tint specMode = MeasureSpec.getMode(measureSpec);\n\t\tint specSize = MeasureSpec.getSize(measureSpec);\n\t\tif (specMode == MeasureSpec.EXACTLY)\n\t\t{\n\t\t\tresult = specSize;\n\t\t} else\n\t\t{\n\t\t\tfloat textHeight = (mPaint.descent() - mPaint.ascent());\n\t\t\tresult = (int) (getPaddingTop() + getPaddingBottom() + Math.max(\n\t\t\t\t\tMath.max(mReachedProgressBarHeight,\n\t\t\t\t\t\t\tmUnReachedProgressBarHeight), Math.abs(textHeight)));\n\t\t\tif (specMode == MeasureSpec.AT_MOST)\n\t\t\t{\n\t\t\t\tresult = Math.min(result, specSize);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * get the styled attributes\n\t * \n\t * @param attrs\n\t */\n\tprivate void obtainStyledAttributes(AttributeSet attrs)\n\t{\n\t\t// init values from custom attributes\n\t\tfinal TypedArray attributes = getContext().obtainStyledAttributes(\n\t\t\t\tattrs, R.styleable.HorizontalProgressBarWithNumber);\n\n\t\tmTextColor = attributes\n\t\t\t\t.getColor(\n\t\t\t\t\t\tR.styleable.HorizontalProgressBarWithNumber_progress_text_color,\n\t\t\t\t\t\tDEFAULT_TEXT_COLOR);\n\t\tmTextSize = (int) attributes.getDimension(\n\t\t\t\tR.styleable.HorizontalProgressBarWithNumber_progress_text_size,\n\t\t\t\tmTextSize);\n\n\t\tmReachedBarColor = attributes\n\t\t\t\t.getColor(\n\t\t\t\t\t\tR.styleable.HorizontalProgressBarWithNumber_progress_reached_color,\n\t\t\t\t\t\tmTextColor);\n\t\tmUnReachedBarColor = attributes\n\t\t\t\t.getColor(\n\t\t\t\t\t\tR.styleable.HorizontalProgressBarWithNumber_progress_unreached_color,\n\t\t\t\t\t\tDEFAULT_COLOR_UNREACHED_COLOR);\n\t\tmReachedProgressBarHeight = (int) attributes\n\t\t\t\t.getDimension(\n\t\t\t\t\t\tR.styleable.HorizontalProgressBarWithNumber_progress_reached_bar_height,\n\t\t\t\t\t\tmReachedProgressBarHeight);\n\t\tmUnReachedProgressBarHeight = (int) attributes\n\t\t\t\t.getDimension(\n\t\t\t\t\t\tR.styleable.HorizontalProgressBarWithNumber_progress_unreached_bar_height,\n\t\t\t\t\t\tmUnReachedProgressBarHeight);\n\t\tmTextOffset = (int) attributes\n\t\t\t\t.getDimension(\n\t\t\t\t\t\tR.styleable.HorizontalProgressBarWithNumber_progress_text_offset,\n\t\t\t\t\t\tmTextOffset);\n\n\t\tint textVisible = attributes\n\t\t\t\t.getInt(R.styleable.HorizontalProgressBarWithNumber_progress_text_visibility,\n\t\t\t\t\t\tVISIBLE);\n\t\tif (textVisible != VISIBLE)\n\t\t{\n\t\t\tmIfDrawText = false;\n\t\t}\n\t\tattributes.recycle();\n\t}\n\n\t@Override\n\tprotected synchronized void onDraw(Canvas canvas)\n\t{\n\n\t\tcanvas.save();\n\t\tcanvas.translate(getPaddingLeft(), getHeight() / 2);\n\n\t\tboolean noNeedBg = false;\n\t\tfloat radio = getProgress() * 1.0f / getMax();\n\t\tfloat progressPosX = (int) (mRealWidth * radio);\n\t\tString text = getProgress() + \"%\";\n\t\t// mPaint.getTextBounds(text, 0, text.length(), mTextBound);\n\n\t\tfloat textWidth = mPaint.measureText(text);\n\t\tfloat textHeight = (mPaint.descent() + mPaint.ascent()) / 2;\n\n\t\tif (progressPosX + textWidth > mRealWidth)\n\t\t{\n\t\t\tprogressPosX = mRealWidth - textWidth;\n\t\t\tnoNeedBg = true;\n\t\t}\n\n\t\t// draw reached bar\n\t\tfloat endX = progressPosX - mTextOffset / 2;\n\t\tif (endX > 0)\n\t\t{\n\t\t\tmPaint.setColor(mReachedBarColor);\n\t\t\tmPaint.setStrokeWidth(mReachedProgressBarHeight);\n\t\t\tcanvas.drawLine(0, 0, endX, 0, mPaint);\n\t\t}\n\t\t// draw progress bar\n\t\t// measure text bound\n\t\tif (mIfDrawText)\n\t\t{\n\t\t\tmPaint.setColor(mTextColor);\n\t\t\tcanvas.drawText(text, progressPosX, -textHeight, mPaint);\n\t\t}\n\n\t\t// draw unreached bar\n\t\tif (!noNeedBg)\n\t\t{\n\t\t\tfloat start = progressPosX + mTextOffset / 2 + textWidth;\n\t\t\tmPaint.setColor(mUnReachedBarColor);\n\t\t\tmPaint.setStrokeWidth(mUnReachedProgressBarHeight);\n\t\t\tcanvas.drawLine(start, 0, mRealWidth, 0, mPaint);\n\t\t}\n\n\t\tcanvas.restore();\n\n\t}\n\n\t/**\n\t * dp 2 px\n\t * \n\t * @param dpVal\n\t */\n\tprotected int dp2px(int dpVal)\n\t{\n\t\treturn (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,\n\t\t\t\tdpVal, getResources().getDisplayMetrics());\n\t}\n\n\t/**\n\t * sp 2 px\n\t * \n\t * @param spVal\n\t * @return\n\t */\n\tprotected int sp2px(int spVal)\n\t{\n\t\treturn (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP,\n\t\t\t\tspVal, getResources().getDisplayMetrics());\n\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/com/zhy/view/RoundProgressBarWidthNumber.java",
    "content": "package com.zhy.view;\n\nimport android.content.Context;\nimport android.content.res.TypedArray;\nimport android.graphics.Canvas;\nimport android.graphics.Paint.Cap;\nimport android.graphics.Paint.Style;\nimport android.graphics.RectF;\nimport android.util.AttributeSet;\n\nimport com.cwp.cmoneycharge.R;\n\npublic class RoundProgressBarWidthNumber extends\n\t\tHorizontalProgressBarWithNumber\n{\n\t/**\n\t * mRadius of view\n\t */\n\tprivate int mRadius = dp2px(30);\n\tprivate int mMaxPaintWidth;\n\n\tpublic RoundProgressBarWidthNumber(Context context)\n\t{\n\t\tthis(context, null);\n\t}\n\n\tpublic RoundProgressBarWidthNumber(Context context, AttributeSet attrs)\n\t{\n\t\tsuper(context, attrs);\n\n\t\tmReachedProgressBarHeight = (int) (mUnReachedProgressBarHeight * 2.5f);\n\t\tTypedArray ta = context.obtainStyledAttributes(attrs,\n\t\t\t\tR.styleable.RoundProgressBarWidthNumber);\n\t\tmRadius = (int) ta.getDimension(\n\t\t\t\tR.styleable.RoundProgressBarWidthNumber_radius, mRadius);\n\t\tta.recycle();\n\n\t\tmPaint.setStyle(Style.STROKE);\n\t\tmPaint.setAntiAlias(true);\n\t\tmPaint.setDither(true);\n\t\tmPaint.setStrokeCap(Cap.ROUND);\n\n\t}\n\n\t/**\n\t * 这里默认在布局中padding值要么不设置，要么全部设置\n\t */\n\t@Override\n\tprotected synchronized void onMeasure(int widthMeasureSpec,\n\t\t\tint heightMeasureSpec)\n\t{\n\n\t\tmMaxPaintWidth = Math.max(mReachedProgressBarHeight,\n\t\t\t\tmUnReachedProgressBarHeight);\n\t\tint expect = mRadius * 2 + mMaxPaintWidth + getPaddingLeft()\n\t\t\t\t+ getPaddingRight();\n\t\tint width = resolveSize(expect, widthMeasureSpec);\n\t\tint height = resolveSize(expect, heightMeasureSpec);\n\t\tint realWidth = Math.min(width, height);\n\n\t\tmRadius = (realWidth - getPaddingLeft() - getPaddingRight() - mMaxPaintWidth) / 2;\n\n\t\tsetMeasuredDimension(realWidth, realWidth);\n\n\t}\n\n\t@Override\n\tprotected synchronized void onDraw(Canvas canvas)\n\t{\n\n\t\tString text = getProgress() + \"%\";\n\t\tfloat textWidth = mPaint.measureText(text);\n\t\tfloat textHeight = (mPaint.descent() + mPaint.ascent()) / 2;\n\n\t\tcanvas.save();\n\t\tcanvas.translate(getPaddingLeft() + mMaxPaintWidth / 2, getPaddingTop()\n\t\t\t\t+ mMaxPaintWidth / 2);\n\t\tmPaint.setStyle(Style.STROKE);\n\t\t// draw unreaded bar\n\t\tmPaint.setColor(mUnReachedBarColor);\n\t\tmPaint.setStrokeWidth(mUnReachedProgressBarHeight);\n\t\tcanvas.drawCircle(mRadius, mRadius, mRadius, mPaint);\n\t\t// draw reached bar\n\t\tmPaint.setColor(mReachedBarColor);\n\t\tmPaint.setStrokeWidth(mReachedProgressBarHeight);\n\t\tfloat sweepAngle = getProgress() * 1.0f / getMax() * 360;\n\t\tcanvas.drawArc(new RectF(0, 0, mRadius * 2, mRadius * 2), 0,\n\t\t\t\tsweepAngle, false, mPaint);\n\t\t// draw text\n\t\tmPaint.setStyle(Style.FILL);\n\t\tcanvas.drawText(text, mRadius - textWidth / 2, mRadius - textHeight,\n\t\t\t\tmPaint);\n\n\t\tcanvas.restore();\n\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/cwp/moneycharge/dao/AccountDAO.java",
    "content": "package cwp.moneycharge.dao;\n\nimport android.content.Context;\nimport android.database.Cursor;\nimport android.database.sqlite.SQLiteDatabase;\n\nimport cwp.moneycharge.model.*;\n\npublic class AccountDAO {\n\tprivate DBOpenHelper helper;// 创建DBOpenHelper对象\n\n\tprivate SQLiteDatabase db;// 创建SQLiteDatabase对象\n\n\tpublic AccountDAO(Context context)// 定义构造函数\n\t{\n\t\thelper = new DBOpenHelper(context);// 初始化DBOpenHelper对象\n\n\t}\n\n\t/**\n\t * 添加密码信息\n\t * \n\t * @param tb_account\n\t */\n\tpublic int add(Tb_account tb_account) {\n\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t// 执行添加密码操作\n\t\tif (tb_account.get_id() == 0) {\n\t\t\tdb.execSQL(\n\t\t\t\t\t\"insert into tb_account (username,pwd) values (?,?)\",\n\t\t\t\t\tnew Object[] { tb_account.getUsername(),tb_account.getPwd() });\n\t\t} else {\n\t\t\tdb.execSQL(\n\t\t\t\t\t\"insert into tb_account (_id,username,pwd) values (?,?,?)\",\n\t\t\t\t\tnew Object[] { tb_account.get_id(),tb_account.getUsername(), tb_account.getPwd() });\n\t\t}\n\t\tCursor cursor = db.rawQuery(\n\t\t\t\t\"select _id from tb_account where username=? and pwd=?\",\n\t\t\t\tnew String[] { tb_account.getUsername(), tb_account.getPwd() });\n\t\tif (cursor.moveToNext())// 遍历查找到的密码信息\n\t\t{\n\t\t\t// 将密码存储到Tb_account类中\n\t\t\treturn cursor.getInt(cursor.getColumnIndex(\"_id\"));\n\t\t} else\n\t\t\treturn 100000001;\n\t}\n\n\t/**\n\t * 设置密码信息\n\t * \n\t * @param tb_account\n\t */\n\tpublic void update(int id, String username, String pwd) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t// 执行修改密码操作\n\t\tdb.execSQL(\"update tb_account set username=? , pwd = ? where _id=?  \",\n\t\t\t\tnew String[] { username, pwd, String.valueOf(id) });\n\t}\n\n\tpublic void deleteById(int id) {\n\t\tdb = helper.getWritableDatabase();// 创建SQLiteDatabase对象\n\t\t// 执行删除便签信息操作\n\t\tdb.execSQL(\"delete from tb_account where _id =? \", new Object[] { id });\n\t}\n\n\t/**\n\t * 查找密码信息\n\t * \n\t * @return\n\t */\n\tpublic Tb_account find(String username, String pwd) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t// 查找密码并存储到Cursor类中\n\t\tCursor cursor = db\n\t\t\t\t.rawQuery(\n\t\t\t\t\t\t\"select _id, username, pwd from tb_account where pwd=? and username=? \",\n\t\t\t\t\t\tnew String[] { pwd, username });\n\t\tif (cursor.moveToNext())// 遍历查找到的密码信息\n\t\t{\n\t\t\t// 将密码存储到Tb_account类中\n\t\t\treturn new Tb_account(cursor.getInt(cursor.getColumnIndex(\"_id\")),\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(\"username\")),\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(\"pwd\")));\n\t\t}\n\t\treturn null;// 如果没有信息，则返回null\n\t}\n\n\tpublic String find(int id) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t// 查找密码并存储到Cursor类中\n\t\tCursor cursor = db.rawQuery(\n\t\t\t\t\"select username from tb_account where _id=? \",\n\t\t\t\tnew String[] { String.valueOf(id) });\n\t\tif (cursor.moveToNext())// 遍历查找到的密码信息\n\t\t{\n\t\t\t// 将密码存储到Tb_account类中\n\t\t\treturn cursor.getString(cursor.getColumnIndex(\"username\"));\n\n\t\t} else\n\t\t\treturn \"无名氏\";// 如果没有信息，则返回null\n\t}\n\n\tpublic long getCount() {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tCursor cursor = db.rawQuery(\"select count(_id) from tb_account \", null);// 获取密码信息的记录数\n\t\tif (cursor.moveToNext())// 判断Cursor中是否有数据\n\t\t{\n\t\t\treturn cursor.getLong(0);// 返回总记录数\n\t\t}\n\t\treturn 0;// 如果没有数据，则返回0\n\t}\n\n}"
  },
  {
    "path": "MoneyCharge/app/src/main/java/cwp/moneycharge/dao/DBOpenHelper.java",
    "content": "package cwp.moneycharge.dao;\n\nimport android.content.Context;\nimport android.database.sqlite.SQLiteDatabase;\nimport android.database.sqlite.SQLiteOpenHelper;\n\npublic class DBOpenHelper extends SQLiteOpenHelper {\n\tprivate static final int VERSION=2;\t//已经做出更新\n\tprivate static final String DBNAME=\"cmoneycharge.db\";\n\t\n\tpublic DBOpenHelper(Context context){\n\t\tsuper(context,DBNAME,null,VERSION);\n\t}\n\n\t@Override\n\tpublic void onCreate(SQLiteDatabase db) {\n\t\t// TODO Auto-generated method stub\n\t\t//用户表\n\t\tdb.execSQL(\"create  table tb_account (_id INTEGER  PRIMARY KEY AUTOINCREMENT  NOT NULL,username varchar(20) ,pwd VARCHAR(50) DEFAULT '000000' NOT NULL)\");\n\t\t//支出类型表\n\t\tdb.execSQL(\"create  table tb_ptype(_id INTEGER   NOT NULL ,no integer not null,typename varchar(50) )\");\n\t\t//收入类型表\n\t\tdb.execSQL(\"create   table tb_itype(_id INTEGER   NOT NULL,no integer  not null ,typename varchar(50) )\");\n\t\t// 支出信息表\n\t\tdb.execSQL(\"create   table tb_pay (_id INTEGER  NOT NULL,no INTEGER  NOT NULL ,money decimal,time varchar(10),\"\n\t\t\t\t+ \"type integer,address varchar(100),mark varchar(200),photo varchar(200),kind varchar(10))\");\n\t\t\n\t\t// 收入信息表\n\t\tdb.execSQL(\"create   table tb_income (_id INTEGER   NOT NULL,no INTEGER  NOT NULL  ,money decimal,time varchar(10),\"\n\t\t\t\t+ \"type integer ,handler varchar(100),mark varchar(200),photo varchar(200),kind varchar(10))\");\n\t\t\n\t\t// 便签信息表\n\t\tdb.execSQL(\"create  table tb_note (_id integer  ,no integer ,note varchar(200))\");\n\t\tdb.execSQL(\"insert into tb_account(_id,username,pwd) values(100000001,\\\"默认用户\\\",\\\"000000\\\")\");\n\t\t\n\t\t//初始化数据 收入类型表格\n\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"1\",\"工资\"});\n\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"2\",\"还款\"});\n\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"3\",\"股票\"});\n\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"4\",\"还款\"});\n\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"5\",\"基金\"});\n\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"6\",\"分红\"});\n\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"7\",\"利息\"});\n\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"8\",\"兼职\"});\n\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"9\",\"奖金\"});\n\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"10\",\"租金\"});\n\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"11\",\"销售款\"});\n\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"12\",\"应收款\"});\n\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"13\",\"报销款\"});\n\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"14\",\"其他\"});\n\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"15\",\"礼金\"});\n\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"16\",\"语音识别\"});\n\t\t//初始化数据 支出类型表格\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"1\",\"早餐\"});\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"2\",\"午餐\"});\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"3\",\"晚餐\"});\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"4\",\"夜宵\"});\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"5\",\"生活用品\"});\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"6\",\"工作用品\"});\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"7\",\"衣服\"});\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"8\",\"应酬\"});\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"9\",\"电子产品\"});\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"10\",\"食品\"});\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"11\",\"租金\"});\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"12\",\"股票\"});\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"13\",\"打的\"});\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"14\",\"基金\"});\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"15\",\"其他\"});\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(100000001),\"16\",\"语音识别\"});\n\t}\n\n\t@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\t if(oldVersion < 2) {\t//更新数据库\n\t\t        db.execSQL(\"ALTER TABLE tb_income ADD photo varchar(200)\");\n\t\t        db.execSQL(\"ALTER TABLE tb_pay ADD photo varchar(200)\");\n\t\t    }\n\t}\n\t\n\tpublic void droptable(SQLiteDatabase db){\n\t\tdb.execSQL(\"drop table tb_itype\");\n\t\tdb.execSQL(\"drop table tb_ptype\");\n\t\tdb.execSQL(\"drop table tb_account\");\n\t\tdb.execSQL(\"drop table tb_income\");\n\t\tdb.execSQL(\"drop table tb_pay\");\n\t\tdb.execSQL(\"drop table tb_note\");\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/cwp/moneycharge/dao/IncomeDAO.java",
    "content": "/**\n * \n */\npackage cwp.moneycharge.dao;\n\nimport java.text.ParseException;\nimport java.text.SimpleDateFormat;\nimport java.util.ArrayList;\nimport java.util.Calendar;\nimport java.util.Date;\nimport java.util.List;\n\nimport cwp.moneycharge.model.*;\nimport android.annotation.SuppressLint;\nimport android.content.Context;\nimport android.database.Cursor;\nimport android.database.sqlite.SQLiteDatabase;\nimport android.util.Log;\nimport android.widget.Toast;\n\n/**\n * @author cwpcc\n * \n */\npublic class IncomeDAO {\n\n\tprivate DBOpenHelper helper;// 创建DBOpenHelper对象\n\tprivate SQLiteDatabase db;// 创建SQLiteDatabase对象\n\tprivate int no = 1;// 编号\n\tprivate int userid = 100000001;\n\n\tpublic IncomeDAO(Context context) {\n\t\t// TODO Auto-generated constructor stub\n\t\thelper = new DBOpenHelper(context);// 初始化DBOpenHelper对象\n\t}\n\n\t/**\n\t * 添加收入信息\n\t * \n\t * @param tb_income\n\t */\n\tpublic void add(Tb_income tb_income) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t// 执行添加收入信息操作\n\t\tdb.execSQL(\n\t\t\t\t\"insert into tb_income (_id,no,money,time,type,handler,mark,photo,kind) values (?,?,?,?,?,?,?,?,?)\",\n\t\t\t\tnew Object[] { tb_income.get_id(), tb_income.getNo(),\n\t\t\t\t\t\ttb_income.getMoney(), tb_income.getTime(),\n\t\t\t\t\t\ttb_income.getType(), tb_income.getHandler(),\n\t\t\t\t\t\ttb_income.getMark(), tb_income.getPhoto(), \"收入\" });\n\t}\n\n\t/**\n\t * 更新收入信息\n\t * \n\t * @param Tb_income\n\t */\n\tpublic void update(Tb_income tb_income) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t// 执行修改收入信息操作\n\t\tdb.execSQL(\n\t\t\t\t\"update Tb_income set money = ?,time = ?,type = ?,handler = ?,mark = ?,photo = ?   where _id = ? and no=?\",\n\t\t\t\tnew Object[] { tb_income.getMoney(), tb_income.getTime(),\n\t\t\t\t\t\ttb_income.getType(), tb_income.getHandler(),\n\t\t\t\t\t\ttb_income.getMark(), tb_income.getPhoto(),\n\t\t\t\t\t\ttb_income.get_id(), tb_income.getNo() });\n\t}\n\n\t/**\n\t * 查找收入信息\n\t * \n\t * @param id\n\t *            ，no\n\t * @return\n\t */\n\tpublic Tb_income find(int id, int no) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tCursor cursor = db\n\t\t\t\t.rawQuery(\n\t\t\t\t\t\t\"select _id, no, money,time,type,handler,mark,photo,kind from Tb_income where _id = ? and no=?\",\n\t\t\t\t\t\tnew String[] { String.valueOf(id), String.valueOf(no) });// 根据用户和编号查找收入信息，并存储到Cursor类中\n\t\tif (cursor.moveToFirst())// 遍历查找到的收入信息\n\t\t{\n\t\t\t// 将遍历到的收入信息存储到Tb_income类中\n\t\t\treturn new Tb_income(cursor.getInt(cursor.getColumnIndex(\"_id\")),\n\t\t\t\t\tcursor.getInt(cursor.getColumnIndex(\"no\")),\n\t\t\t\t\tcursor.getDouble(cursor.getColumnIndex(\"money\")),\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(\"time\")),\n\t\t\t\t\tcursor.getInt(cursor.getColumnIndex(\"type\")),\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(\"handler\")),\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(\"mark\")),\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(\"photo\")), \"收入\");\n\t\t}\n\t\treturn null;// 如果没有信息，则返回null\n\t}\n\n\t/**\n\t * 刪除收入信息\n\t * \n\t * @param ids\n\t */\n\tpublic void detele(Integer... ids) {\n\t\tif (ids.length > 0)// 判断是否存在要删除的id\n\t\t{\n\t\t\tStringBuffer sb = new StringBuffer();// 创建StringBuffer对象\n\t\t\tfor (int i = 0; i < ids.length - 1; i++)// 遍历要删除的id集合\n\t\t\t{\n\t\t\t\tsb.append('?').append(',');// 将删除条件添加到StringBuffer对象中\n\t\t\t}\n\t\t\tsb.deleteCharAt(sb.length() - 1);// 去掉最后一个“,“字符\n\t\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t\t// 执行删除收入信息操作\n\t\t\tdb.execSQL(\"delete from Tb_income where _id in (?) and no in  (\"\n\t\t\t\t\t+ sb + \")\", (Object[]) ids);\n\t\t}\n\t}\n\n\t/**\n\t * 获取收入信息\n\t * \n\t * @param start\n\t *            起始位置\n\t * @param count\n\t *            每页显示数量\n\t * @return\n\t */\n\tpublic List<Tb_income> getScrollData(int id, int start, int count) {\n\t\tList<Tb_income> tb_income = new ArrayList<Tb_income>();// 创建集合对象\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t// 获取所有收入信息\n\t\tCursor cursor = db.rawQuery(\n\t\t\t\t\"select * from Tb_income where _id=? order by no limit ?,?\",\n\t\t\t\tnew String[] { String.valueOf(id), String.valueOf(start),\n\t\t\t\t\t\tString.valueOf(count) });\n\t\twhile (cursor.moveToNext())// 遍历所有的收入信息\n\t\t{\n\t\t\t// 将遍历到的收入信息添加到集合中\n\t\t\ttb_income.add(new Tb_income(cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"_id\")), cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"no\")), cursor.getDouble(cursor\n\t\t\t\t\t.getColumnIndex(\"money\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"time\")), cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"type\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"handler\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"mark\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"photo\")), null));\n\t\t}\n\t\treturn tb_income;// 返回集合\n\t}\n\n\tpublic List<Tb_income> getScrollData(int id, int start, int count,\n\t\t\tString date1, String date2) {\n\t\tList<Tb_income> tb_income = new ArrayList<Tb_income>();// 创建集合对象\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t// 获取所有收入信息\n\t\tCursor cursor = db\n\t\t\t\t.rawQuery(\n\t\t\t\t\t\t\"select * from Tb_income where _id=? and time >= ? and time <= ? order by time DESC\",\n\t\t\t\t\t\tnew String[] { String.valueOf(id), date1, date2 });\n\t\twhile (cursor.moveToNext())// 遍历所有的收入信息\n\t\t{\n\t\t\t// 将遍历到的收入信息添加到集合中\n\t\t\ttb_income.add(new Tb_income(cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"_id\")), cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"no\")), cursor.getDouble(cursor\n\t\t\t\t\t.getColumnIndex(\"money\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"time\")), cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"type\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"handler\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"mark\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"photo\")), null));\n\t\t}\n\t\treturn tb_income;// 返回集合\n\t}\n\n\tpublic List<Tb_income> getScrollDataTotal(int id, int start, int count,\n\t\t\tString date1, String date2) {\n\t\tList<Tb_income> tb_income = new ArrayList<Tb_income>();// 创建集合对象\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t// 获取所有收入信息\n\t\tCursor cursor = db\n\t\t\t\t.rawQuery(\n\t\t\t\t\t\t\"select * from Tb_income where _id=? and time >= ? and time <= ? UNION select * from Tb_pay  where _id=? and time >= ? and time <= ? order by time DESC\",\n\t\t\t\t\t\tnew String[] { String.valueOf(id), date1, date2,\n\t\t\t\t\t\t\t\tString.valueOf(id), date1, date2 });\n\t\twhile (cursor.moveToNext())// 遍历所有的收入信息\n\t\t{\n\t\t\t// 将遍历到的收入信息添加到集合中\n\t\t\ttb_income.add(new Tb_income(cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"_id\")), cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"no\")), cursor.getDouble(cursor\n\t\t\t\t\t.getColumnIndex(\"money\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"time\")), cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"type\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"handler\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"mark\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"photo\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"kind\"))));\n\t\t}\n\t\treturn tb_income;// 返回集合\n\t}\n\n\tpublic List<Tb_income> search(int id, String string) {\n\t\tList<Tb_income> tb_income = new ArrayList<Tb_income>();// 创建集合对象\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t// 获取所有收入信息\n\t\tCursor cursor = db\n\t\t\t\t.rawQuery(\n\t\t\t\t\t\t\"select * from Tb_income where _id=? and  money like ? union \"\n\t\t\t\t\t\t\t\t+ \"select * from Tb_income where _id=? and time like ? union \"\n\t\t\t\t\t\t\t\t+ \"select * from Tb_income where _id=? and handler like ? union \"\n\t\t\t\t\t\t\t\t+ \"select * from Tb_income where _id=? and  mark like ? union \"\n\t\t\t\t\t\t\t\t+ \"select * from Tb_income where _id=? and kind like ? union \"\n\t\t\t\t\t\t\t\t+ \"select Tb_income.* from Tb_income,tb_itype where Tb_income._id=? and Tb_income.type=tb_itype.no and tb_itype.typename like ?  union \"\n\t\t\t\t\t\t\t\t+ \"select tb_pay.* from tb_pay,tb_ptype where tb_pay._id=? and tb_pay.type=tb_ptype.no and tb_ptype.typename like ?  union \"\n\t\t\t\t\t\t\t\t+ \"select * from tb_pay where _id=? and money like ? union \"\n\t\t\t\t\t\t\t\t+ \"select * from tb_pay where _id=? and time like ? union \"\n\t\t\t\t\t\t\t\t+ \"select * from tb_pay where _id=? and address like ? union \"\n\t\t\t\t\t\t\t\t+ \"select * from tb_pay where _id=? and mark like ? union \"\n\t\t\t\t\t\t\t\t+ \"select * from tb_pay where _id=? and kind like ? \"\n\t\t\t\t\t\t\t\t+ \"order by time DESC \",\n\t\t\t\t\t\tnew String[] { String.valueOf(id), \"%\" + string + \"%\",\n\t\t\t\t\t\t\t\tString.valueOf(id), \"%\" + string + \"%\",\n\t\t\t\t\t\t\t\tString.valueOf(id), \"%\" + string + \"%\",\n\t\t\t\t\t\t\t\tString.valueOf(id), \"%\" + string + \"%\",\n\t\t\t\t\t\t\t\tString.valueOf(id), \"%\" + string + \"%\",\n\t\t\t\t\t\t\t\tString.valueOf(id), \"%\" + string + \"%\",\n\t\t\t\t\t\t\t\tString.valueOf(id), \"%\" + string + \"%\",\n\t\t\t\t\t\t\t\tString.valueOf(id), \"%\" + string + \"%\",\n\t\t\t\t\t\t\t\tString.valueOf(id), \"%\" + string + \"%\",\n\t\t\t\t\t\t\t\tString.valueOf(id), \"%\" + string + \"%\",\n\t\t\t\t\t\t\t\tString.valueOf(id), \"%\" + string + \"%\",\n\t\t\t\t\t\t\t\tString.valueOf(id), \"%\" + string + \"%\", });\n\t\twhile (cursor.moveToNext())// 遍历所有的收入信息\n\t\t{\n\t\t\t// 将遍历到的收入信息添加到集合中\n\t\t\ttb_income.add(new Tb_income(cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"_id\")), cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"no\")), cursor.getDouble(cursor\n\t\t\t\t\t.getColumnIndex(\"money\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"time\")), cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"type\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"handler\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"mark\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"photo\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"kind\"))));\n\t\t}\n\t\treturn tb_income;// 返回集合\n\t}\n\n\t/*\n\t * 高级搜索\n\t */\n\n\tpublic List<Tb_income> searchALL(int id, String date1, String date2,\n\t\t\tString[] sp, String[] sin, String string) {\n\t\tList<Tb_income> tb_income = new ArrayList<Tb_income>();// 创建集合对象\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tString[] paytype = { \"money\", \"address\", \"mark\" };\n\t\tString[] incometype = { \"money\", \"handler\", \"mark\" };\n\t\t// 获取所有收入信息\n\t\tStringBuffer sql = new StringBuffer();// 拼接sql\n\t\tfor (int i = 0; i < sin.length; i++) {\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tsql.append(\"select Tb_income.* from Tb_income,tb_itype where Tb_income._id=\"\n\t\t\t\t\t\t+ \"'\"\n\t\t\t\t\t\t+ String.valueOf(id)\n\t\t\t\t\t\t+ \"'\"\n\t\t\t\t\t\t+ \" and  time >= \"\n\t\t\t\t\t\t+ \"'\"\n\t\t\t\t\t\t+ date1\n\t\t\t\t\t\t+ \"'\"\n\t\t\t\t\t\t+ \" and time <= \"\n\t\t\t\t\t\t+ \"'\"\n\t\t\t\t\t\t+ date2\n\t\t\t\t\t\t+ \"'\"\n\t\t\t\t\t\t+ \" and Tb_income.type=tb_itype.no and tb_itype.typename=\"\n\t\t\t\t\t\t+ \"'\"\n\t\t\t\t\t\t+ sin[i]\n\t\t\t\t\t\t+ \"'\"\n\t\t\t\t\t\t+ \" and Tb_income.\"\n\t\t\t\t\t\t+ incometype[j]\n\t\t\t\t\t\t+ \" like \"\n\t\t\t\t\t\t+ \"'%\"\n\t\t\t\t\t\t+ string\n\t\t\t\t\t\t+ \"%'\"\n\t\t\t\t\t\t+ \"  union \");\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < sp.length; i++) {\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tsql.append(\"select tb_pay.* from tb_pay,tb_ptype where tb_pay._id=\"\n\t\t\t\t\t\t+ \"'\"\n\t\t\t\t\t\t+ String.valueOf(id)\n\t\t\t\t\t\t+ \"'\"\n\t\t\t\t\t\t+ \" and  time >= \"\n\t\t\t\t\t\t+ \"'\"\n\t\t\t\t\t\t+ date1\n\t\t\t\t\t\t+ \"'\"\n\t\t\t\t\t\t+ \" and time <= \"\n\t\t\t\t\t\t+ \"'\"\n\t\t\t\t\t\t+ date2\n\t\t\t\t\t\t+ \"'\"\n\t\t\t\t\t\t+ \" and tb_pay.type=tb_ptype.no and tb_ptype.typename=\"\n\t\t\t\t\t\t+ \"'\"\n\t\t\t\t\t\t+ sp[i]\n\t\t\t\t\t\t+ \"'\"\n\t\t\t\t\t\t+ \" and tb_pay.\"\n\t\t\t\t\t\t+ paytype[j]\n\t\t\t\t\t\t+ \" like \" + \"'%\" + string + \"%'\" + \"  union \");\n\t\t\t}\n\t\t}\n\t\tsql.delete(sql.length() - 6, sql.length()); // 删除最后一个uniom\n\t\tsql.append(\"order by time DESC\");\n\t\t// System.out.println(\"sql\" + sql);\n\t\tCursor cursor = db.rawQuery(sql.toString(), null);\n\t\twhile (cursor.moveToNext())// 遍历所有的收入信息\n\t\t{\n\t\t\t// 将遍历到的收入信息添加到集合中\n\t\t\ttb_income.add(new Tb_income(cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"_id\")), cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"no\")), cursor.getDouble(cursor\n\t\t\t\t\t.getColumnIndex(\"money\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"time\")), cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"type\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"handler\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"mark\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"photo\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"kind\"))));\n\t\t}\n\t\treturn tb_income;// 返回集合\n\t}\n\n\t/**\n\t * 获取总记录数\n\t * \n\t * @return\n\t */\n\tpublic long getCount() {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tCursor cursor = db.rawQuery(\"select count(no) from tb_income\", null);// 获取收入信息的记录数\n\t\tif (cursor.moveToNext())// 判断Cursor中是否有数据\n\t\t{\n\t\t\treturn cursor.getLong(0);// 返回总记录数\n\t\t}\n\t\treturn 0;// 如果没有数据，则返回0\n\t}\n\n\tpublic long getCount(int id) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tCursor cursor = db.rawQuery(\n\t\t\t\t\"select count(no) from tb_income where _id=?\",\n\t\t\t\tnew String[] { String.valueOf(id) });// 获取收入信息的记录数\n\t\tif (cursor.moveToNext())// 判断Cursor中是否有数据\n\t\t{\n\t\t\treturn cursor.getLong(0);// 返回总记录数\n\t\t}\n\t\treturn 0;// 如果没有数据，则返回0\n\t}\n\n\t/**\n\t * 获取收入最大编号\n\t * \n\t * @return\n\t */\n\tpublic int getMaxNo(int id) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tCursor cursor = db.rawQuery(\n\t\t\t\t\"select max(no) from tb_income where _id=?\",\n\t\t\t\tnew String[] { String.valueOf(id) });// 获取收入信息表中的最大编号\n\t\twhile (cursor.moveToLast()) {// 访问Cursor中的最后一条数据\n\t\t\treturn cursor.getInt(0);// 获取访问到的数据，即最大编号\n\t\t}\n\t\treturn 0;// 如果没有数据，则返回0\n\t}\n\n\t@SuppressLint(\"SimpleDateFormat\")\n\tpublic String addDays(String sdate, int days) {\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tDate date = new Date();\n\t\ttry {\n\t\t\tdate = (Date) sdf.parse(sdate);\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(date);\n\t\tcal.add(Calendar.DATE, days); // minus number would decrement the days\n\t\tdate = cal.getTime();\n\t\tString result = sdf.format(date);\n\t\treturn result;\n\t}\n\n\tpublic Double getamountData(int userid2) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tDouble data = 0.0;\n\t\tCursor cursor = db.rawQuery(\n\t\t\t\t\"select sum(money) from tb_income where _id=?\",\n\t\t\t\tnew String[] { String.valueOf(userid) });\n\t\t// 获取支出信息表中的最大编号\n\t\twhile (cursor.moveToNext())// 遍历所有的支出信息\n\t\t{\n\t\t\t// 将遍历到的支出信息添加到集合中\n\t\t\tdata = cursor.getDouble(0);\n\t\t}\n\t\tcursor.close();\n\t\treturn data;\n\t}\n\n\tpublic Datapicker getDataOnDay(String date1, String date2) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tDouble data = 0.0;\n\t\tDatapicker datapicker;\n\t\tCursor cursor = db\n\t\t\t\t.rawQuery(\n\t\t\t\t\t\t\"select total(money) as tmoney from tb_income where time >= ? and time <= ? and  _id =?\",\n\t\t\t\t\t\tnew String[] { date1, date2, String.valueOf(userid) });// 获取支出信息表中的最大编号\n\t\twhile (cursor.moveToNext())// 遍历所有的支出信息\n\t\t{\n\n\t\t\t// 将遍历到的支出信息添加到集合中\n\t\t\tdata = data + cursor.getDouble(cursor.getColumnIndex(\"tmoney\"));\n\t\t}\n\t\tcursor.close();\n\t\tdatapicker = new Datapicker(no, data, date1);\n\t\tno++;\n\t\treturn datapicker;// 返回集合\n\t\t// 将遍历到的支出信息添加到集合中\n\n\t} // 返回集合\n\n\tpublic List<Datapicker> getDataMonth(int id, int year, int month) {\n\t\tString d1, d2;\n\t\td1 = String.valueOf(year) + \"-\";\n\t\td2 = String.valueOf(year) + \"-\";\n\t\tuserid = id;\n\t\tno = 1;\n\t\tswitch (month) {\n\t\tcase 1:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tif (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {\n\t\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\t\td2 += \"0\" + String.valueOf(month) + \"-29\";\n\t\t\t} else {\n\t\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\t\td2 += \"0\" + String.valueOf(month) + \"-28\";\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-30\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-30\";\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-30\";\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\td1 += String.valueOf(month) + \"-01\";\n\t\t\td2 += String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\td1 += String.valueOf(month) + \"-01\";\n\t\t\td2 += String.valueOf(month) + \"-30\";\n\t\t\tbreak;\n\t\tcase 12:\n\t\t\td1 += String.valueOf(month) + \"-01\";\n\t\t\td2 += String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\n\t\t}\n\n\t\tList<Datapicker> datapickerlist = new ArrayList<Datapicker>();\n\t\tDatapicker datapicker;\n\t\tfor (String temp = d1; temp.compareTo(d2) <= 0;) {\n\t\t\t// 创建集合对象\n\t\t\tdatapicker = getDataOnDay(temp, temp);\n\t\t\tdatapickerlist.add(datapicker);\n\t\t\tLog.i(\"cwp\", \"===========pay\" + temp\n\t\t\t\t\t+ datapicker.getMoney().toString());\n\t\t\ttemp = addDays(temp, 1);\n\n\t\t}\n\n\t\treturn datapickerlist;\n\t}\n\n\tpublic List<Datapicker> getDataAnytime(int id, String date1, String date2) {\n\n\t\tuserid = id;\n\t\tno = 1;\n\n\t\tList<Datapicker> datapickerlist = new ArrayList<Datapicker>();\n\t\tDatapicker datapicker;\n\t\tfor (String temp = date1; temp.compareTo(date2) <= 0;) {\n\t\t\t// 创建集合对象\n\t\t\tdatapicker = getDataOnDay(temp, temp);\n\t\t\tdatapickerlist.add(datapicker);\n\t\t\ttemp = addDays(temp, 1);\n\t\t}\n\n\t\treturn datapickerlist;\n\t}\n\n\tpublic void deleteUserData(int id) {// 清空用户数据\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tdb.execSQL(\"delete from tb_income where _id=?\", new Object[] { id });\n\t}\n\n\tpublic List<KindData> getKDataOnDay(int id, String date1, String date2) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tList<KindData> kinddatalist = new ArrayList<KindData>();\n\t\tCursor cursor = db\n\t\t\t\t.rawQuery(\n\t\t\t\t\t\t\"select type,  total(money) as tmoney from tb_income  where time >= ? and time <= ? and  _id =? group by type\",\n\t\t\t\t\t\tnew String[] { date1, date2, String.valueOf(id) });// 获取支出信息表中的最大编号\n\t\twhile (cursor.moveToNext())// 遍历所有的支出信息\n\t\t{\n\n\t\t\t// 将遍历到的支出信息添加到集合中\n\t\t\tkinddatalist.add(new KindData(cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"type\")), cursor.getDouble(cursor\n\t\t\t\t\t.getColumnIndex(\"tmoney\"))));\n\t\t}\n\t\tcursor.close();\n\n\t\treturn kinddatalist;// 返回集合\n\t\t// 将遍历到的支出信息添加到集合中\n\n\t} // 返回集合\n\n\tpublic List<KindData> getKDataOnMonth(int id, int year, int month) {\n\t\tString d1, d2;\n\t\td1 = String.valueOf(year) + \"-\";\n\t\td2 = String.valueOf(year) + \"-\";\n\t\tswitch (month) {\n\t\tcase 1:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tif (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {\n\t\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\t\td2 += \"0\" + String.valueOf(month) + \"-29\";\n\t\t\t} else {\n\t\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\t\td2 += \"0\" + String.valueOf(month) + \"-28\";\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-30\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-30\";\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-30\";\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\td1 += String.valueOf(month) + \"-01\";\n\t\t\td2 += String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\td1 += String.valueOf(month) + \"-01\";\n\t\t\td2 += String.valueOf(month) + \"-30\";\n\t\t\tbreak;\n\t\tcase 12:\n\t\t\td1 += String.valueOf(month) + \"-01\";\n\t\t\td2 += String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\n\t\t}\n\t\treturn getKDataOnDay(id, d1, d2);\n\t}\n\n\tpublic String gettime(int mYear, int defaultMonth, int defaultDay,\n\t\t\tboolean first, boolean end) {\n\t\tString dall, dmonth, dday;\n\t\tif (first || end) {\n\t\t\tString d1, d2;\n\t\t\td1 = String.valueOf(mYear) + \"-\";\n\t\t\td2 = String.valueOf(mYear) + \"-\";\n\t\t\tswitch (defaultMonth) {\n\t\t\tcase 1:\n\t\t\t\td1 += \"0\" + String.valueOf(defaultMonth) + \"-01\";\n\t\t\t\td2 += \"0\" + String.valueOf(defaultMonth) + \"-31\";\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif (mYear % 4 == 0 && mYear % 100 != 0 || mYear % 400 == 0) {\n\t\t\t\t\td1 += \"0\" + String.valueOf(defaultMonth) + \"-01\";\n\t\t\t\t\td2 += \"0\" + String.valueOf(defaultMonth) + \"-29\";\n\t\t\t\t} else {\n\t\t\t\t\td1 += \"0\" + String.valueOf(defaultMonth) + \"-01\";\n\t\t\t\t\td2 += \"0\" + String.valueOf(defaultMonth) + \"-28\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\td1 += \"0\" + String.valueOf(defaultMonth) + \"-01\";\n\t\t\t\td2 += \"0\" + String.valueOf(defaultMonth) + \"-31\";\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\td1 += \"0\" + String.valueOf(defaultMonth) + \"-01\";\n\t\t\t\td2 += \"0\" + String.valueOf(defaultMonth) + \"-30\";\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\td1 += \"0\" + String.valueOf(defaultMonth) + \"-01\";\n\t\t\t\td2 += \"0\" + String.valueOf(defaultMonth) + \"-31\";\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\td1 += \"0\" + String.valueOf(defaultMonth) + \"-01\";\n\t\t\t\td2 += \"0\" + String.valueOf(defaultMonth) + \"-30\";\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\td1 += \"0\" + String.valueOf(defaultMonth) + \"-01\";\n\t\t\t\td2 += \"0\" + String.valueOf(defaultMonth) + \"-31\";\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\td1 += \"0\" + String.valueOf(defaultMonth) + \"-01\";\n\t\t\t\td2 += \"0\" + String.valueOf(defaultMonth) + \"-31\";\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\td1 += \"0\" + String.valueOf(defaultMonth) + \"-01\";\n\t\t\t\td2 += \"0\" + String.valueOf(defaultMonth) + \"-30\";\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\td1 += String.valueOf(defaultMonth) + \"-01\";\n\t\t\t\td2 += String.valueOf(defaultMonth) + \"-31\";\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\td1 += String.valueOf(defaultMonth) + \"-01\";\n\t\t\t\td2 += String.valueOf(defaultMonth) + \"-30\";\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\td1 += String.valueOf(defaultMonth) + \"-01\";\n\t\t\t\td2 += String.valueOf(defaultMonth) + \"-31\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (first) {\n\t\t\t\tdall = d1;\n\t\t\t} else {\n\t\t\t\tdall = d2;\n\t\t\t}\n\t\t} else {\n\t\t\tif (defaultMonth < 10) {\n\t\t\t\tdmonth = \"0\" + Integer.toString(defaultMonth);\n\t\t\t} else {\n\t\t\t\tdmonth = Integer.toString(defaultMonth);\n\t\t\t}\n\t\t\tif (defaultDay < 10) {\n\t\t\t\tdday = \"0\" + Integer.toString(defaultDay);\n\t\t\t} else {\n\t\t\t\tdday = Integer.toString(defaultDay);\n\t\t\t}\n\t\t\tdall = Integer.toString(mYear) + \"-\" + dmonth + \"-\" + dday;\n\t\t}\n\t\treturn dall;\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/cwp/moneycharge/dao/ItypeDAO.java",
    "content": "package cwp.moneycharge.dao;\n\nimport cwp.moneycharge.model.Datapicker;\nimport cwp.moneycharge.model.Tb_itype; \nimport cwp.moneycharge.dao.DBOpenHelper;\nimport java.util.List;\nimport java.util.ArrayList;\n\nimport com.cwp.cmoneycharge.R;\n\nimport android.database.sqlite.SQLiteDatabase;\nimport android.content.Context;\nimport android.database.Cursor;\n\n\n/**\n * @author cwpcc\n *\n */ \npublic class ItypeDAO {\n//(_id INTEGER  NOT NULL PRIMARY KEY,no not null int ,typename varchar(50) \n\tprivate DBOpenHelper helper;// 创建DBOpenHelper对象\n\tprivate SQLiteDatabase db;// 创建SQLiteDatabase对象\n\n\tint[] imageId = new int[] { R.drawable.icon_zysr_gzsr,\n\t\t\tR.drawable.icon_qtsr_zjsr, R.drawable.icon_zysr_tzsr,\n\t\t\tR.drawable.icon_qtsr, R.drawable.icon_qtzx,\n\t\t\tR.drawable.icon_jrbx_xfss, R.drawable.icon_zysr_lxsr,\n\t\t\tR.drawable.icon_zysr_jzsr, R.drawable.icon_zysr_jjsr,\n\t\t\tR.drawable.icon_lyyp_hwzb, R.drawable.icon_qtsr_jysd,\n\t\t\tR.drawable.icon_qtsr_jysd, R.drawable.icon_qtsr_jysd,\n\t\t\tR.drawable.icon_qtsr, R.drawable.icon_qtsr_ljsr, R.drawable.yysb };\n\t\n\tpublic ItypeDAO(Context context) {\n\t\t// TODO Auto-generated constructor stub\n\t\thelper = new DBOpenHelper(context);// 初始化DBOpenHelper对象\n\t}\n\n/**\t\n * 新增收入类型\n * @param Tb_itype\n*/\n\tpublic void add(Tb_itype tb_itype){\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tdb.execSQL(\"insert into tb_itype (_id,no,typename) values (?,?,?)\", new Object[] {\n\t\t\t\ttb_itype.get_id(),tb_itype.getNo(),tb_itype.getTypename()});// 执行添加收入类型操作\n\t\t\n\t}\n\t/**\t\n\t * 修改收入类型\n\t * @param Tb_itype\n\t*/\t\n\t\tpublic void modify(Tb_itype tb_itype){\n\t\t\tdb=helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t\tdb.execSQL(\"update tb_itype set typename = ? where _id = ? and no=?\", new Object[] {\n\t\t\t\t\ttb_itype.get_id(), tb_itype.getNo(),tb_itype.getTypename() });// 执行修改收入类型操作\n\t\t}\n\t/**\t\n\t * 删除收入类型\n\t * @param  ids\n\t*/\t\n\t\tpublic void delete(Integer... ids){\n\t\t\tif (ids.length > 0)// 判断是否存在要删除的id\n\t\t\t{\n\t\t\t\tStringBuffer sb = new StringBuffer();// 创建StringBuffer对象\n\t\t\t\tfor (int i = 0; i < ids.length-1; i++)// 遍历要删除的id集合\n\t\t\t\t{\n\t\t\t\t\tsb.append('?').append(',');// 将删除条件添加到StringBuffer对象中\n\t\t\t\t}\n\t\t\t\tsb.deleteCharAt(sb.length() - 1);// 去掉最后一个“,“字符\n\t\t\t\tdb = helper.getWritableDatabase();// 创建SQLiteDatabase对象\n\t\t\t\t// 执行删除便签信息操作\n\t\t\t\tdb.execSQL(\"delete from tb_itype where _id in (?) and no in (\" + sb + \")\",\n\t\t\t\t\t\t(Object[]) ids);\n\t\t\t}\n\t\t}\n\n\t\tpublic void deleteByName(int id,String typename){\n\t\t\tdb = helper.getWritableDatabase();// 创建SQLiteDatabase对象\n\t\t\t// 执行删除便签信息操作\n\t\t\tdb.execSQL(\"delete from tb_itype where _id =? and typename=?\", new Object[] { id, typename});\n\t\t}\n\n\t\tpublic void deleteById(int id){\n\t\t\tdb = helper.getWritableDatabase();// 创建SQLiteDatabase对象\n\t\t\t// 执行删除便签信息操作\n\t\t\tdb.execSQL(\"delete from tb_itype where _id =? \", new Object[] { id});\n\t\t}\n\t/**\n\t * 获取收入类型信息\n\t * \n\t * @param start\n\t *            起始位置\n\t * @param count\n\t *            每页显示数量\n\t * @return\n\t */\n\t\tpublic List<Tb_itype> getScrollData(int id,int start, int count) {\n\t\t\tList<Tb_itype> lisTb_itype = new ArrayList<Tb_itype>();// 创建集合对象\n\t\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t\t// 获取所有便签信息\n\t\t\tCursor cursor = db.rawQuery(\"select * from tb_itype where _id=? order by no limit ?,?\",\n\t\t\t\t\tnew String[] { String.valueOf(id),  String.valueOf(start), String.valueOf(count) });\n\t\t\twhile (cursor.moveToNext())// 遍历所有的便签信息\n\t\t\t{\n\t\t\t\t// 将遍历到的便签信息添加到集合中\n\t\t\t\tlisTb_itype.add(new Tb_itype(\n\t\t\t\t\t\tcursor.getInt(cursor.getColumnIndex(\"_id\")),\n\t\t\t\t\t\tcursor.getInt(cursor.getColumnIndex(\"no\")),\n\t\t\t\t\t\tcursor.getString(cursor.getColumnIndex(\"typename\"))));\n\t\t\t}\n\t\t\treturn lisTb_itype;// 返回集合\n\t\t}\n\t\t\n\t\t/**\n\t\t * 获取总记录数\n\t\t * \n\t\t * @return\n\t\t */\n\t\tpublic long getCount() {\n\t\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t\tCursor cursor = db.rawQuery(\"select count(no) from tb_itype\", null);// 获取收入类型的记录数\n\t\t\tif (cursor.moveToNext())// 判断Cursor中是否有数据\n\t\t\t{\n\t\t\t\treturn cursor.getLong(0);// 返回总记录数\n\t\t\t}\n\t\t\treturn 0;// 如果没有数据，则返回0\n\t\t}\n\t\tpublic long getCount(int id) {\n\t\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t\tCursor cursor = db\n\t\t\t\t\t.rawQuery(\"select count(no) from tb_itype where _id=?\", new String[]{String.valueOf(id)});// 获取收入信息的记录数\n\t\t\tif (cursor.moveToNext())// 判断Cursor中是否有数据\n\t\t\t{\n\t\t\t\treturn cursor.getLong(0);// 返回总记录数\n\t\t\t}\n\t\t\treturn 0;// 如果没有数据，则返回0\n\t\t}\n\t\t/**\n\t\t * 获取便签最大编号\n\t\t * \n\t\t * @return\n\t\t */\n\t\tpublic int getMaxId() {\n\t\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t\tCursor cursor = db.rawQuery(\"select max(no) from tb_itype\", null);// 获取收入类型表中的最大编号\n\t\t\twhile (cursor.moveToLast()) {// 访问Cursor中的最后一条数据\n\t\t\t\treturn cursor.getInt(0);// 获取访问到的数据，即最大编号\n\t\t\t}\n\t\t\treturn 0;// 如果没有数据，则返回0\n\t\t}\n\t\t/**\n\t\t * 获取类型名数组\n\t\t * param id\n\t\t * @return\n\t\t * */\n\t\tpublic List<String> getItypeName(int id){\n\t\t\tList<String> lisString = new ArrayList<String>();// 创建集合对象\n\t\t\tdb = helper.getWritableDatabase();\n\t\t\tCursor cursor = db.rawQuery(\"select typename from tb_itype where _id=?\",new String[]{String.valueOf(id) } );\n\t\t\twhile (cursor.moveToNext()) {// 访问Cursor中的最后一条数据\n\t\t\t\tlisString.add(cursor.getString(cursor.getColumnIndex(\"typename\")));\n\t\t\t\t\n\t\t\t}\n\t\t\treturn lisString;\n\t\t\t\n\t\t}\n\t\tpublic String getOneName(int id,int no){\n\t\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t\tCursor cursor = db.rawQuery(\"select typename from tb_itype where _id=? and no=?\",new String[]{String.valueOf(id),String.valueOf(no) } ); \n\t\t\tif (cursor.moveToNext()) { \n\t\t\t\treturn cursor.getString(cursor.getColumnIndex(\"typename\"));\n\t\t\t}\n\t\t\treturn \"\";\n\t\t\t\n\t\t}\n\t\t\n\t\tpublic int getOneImg(int id, int no) {\n\t\t\tif (imageId.length < no) {\n\t\t\t\treturn imageId[14];\n\t\t\t}\n\t\t\treturn imageId[no - 1];\n\t\t}\n\t\t\n\t\t//获取指定时间内数据库数据\n\t\t\n\t\tpublic List<Datapicker> getDataOnDay(int id,String date1,String date2){\n\t\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象 \n\t\t\tList<Datapicker> datapicker = new ArrayList<Datapicker>();// 创建集合对象\n\t\t\tString sql= \"'\"+date1+\"' and '\"+date2+\"'\";\t\t\n\t\t\tCursor cursor = db.rawQuery(\"select no, time,sum(money) as tmoney from tb_pay where time between \"+sql+\" and _id =? group BY time order by time\",new String[]{String.valueOf(id)} );// 获取支出信息表中的最大编号\n\t\t\twhile (cursor.moveToNext())// 遍历所有的支出信息\n\t\t\t{\t\t\n\t\t\t \n\t\t\t\t// 将遍历到的支出信息添加到集合中\n\t\t\t\t\tdatapicker.add(new Datapicker( \n\t\t\t\t\t\tcursor.getInt(cursor.getColumnIndex(\"no\")),\n\t\t\t\t\t\tcursor.getDouble(cursor.getColumnIndex(\"tmoney\")),\n\t\t\t\t\t\tcursor.getString(cursor.getColumnIndex(\"time\"))));\n\t\t\t}\n\t\t\treturn datapicker;// 返回集合\n\t\t\t\t// 将遍历到的支出信息添加到集合中\n\t\t\t\t \n\t\t\t} // 返回集合\n\t\t \n\t\tpublic void modifyByName(int id,String old,String now){\n\t\t\tdb = helper.getWritableDatabase();\n\t\t\tdb.execSQL(\"update tb_itype set typename = ? where _id = ? and typename=?\", new Object[] {\n\t\t\t\t\tid, now,old});// 执行修改收入类型操作\n\t\t}\n\t\t\n\t\tpublic void initData(int id) { \n\n\t\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象    \n\t\t\t\n\t\t\t// 便签信息表  \n\t\t\tdb.execSQL(\"delete from tb_itype where _id=?\",new String[]{String.valueOf(id)}); // 确保无该id\n\t\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(id),\"1\",\"工资\"});\n\t\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(id),\"2\",\"中奖\"});\n\t\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(id),\"3\",\"股票\"});\n\t\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(id),\"4\",\"还款\"});\n\t\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(id),\"5\",\"基金\"});\n\t\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(id),\"6\",\"分红\"});\n\t\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(id),\"7\",\"利息\"});\n\t\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(id),\"8\",\"兼职\"});\n\t\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(id),\"9\",\"奖金\"});\n\t\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(id),\"10\",\"租金\"});\n\t\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(id),\"11\",\"销售款\"});\n\t\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(id),\"12\",\"应收款\"});\n\t\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(id),\"13\",\"报销款\"});\n\t\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(id),\"14\",\"其他\"});\n\t\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(id),\"15\",\"礼金\"});\n\t\t\tdb.execSQL(\"insert into tb_itype(_id,no,typename) values(?,?,?)\",new String[]{String.valueOf(id),\"16\",\"语音识别\"});\n\t\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/cwp/moneycharge/dao/NoteDAO.java",
    "content": "/**\n * \n */\npackage cwp.moneycharge.dao;\n\n/**\n * @author cwpcc\n *\n */\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport cwp.moneycharge.dao.DBOpenHelper;\nimport cwp.moneycharge.model.Tb_note;\nimport android.content.Context;\nimport android.database.Cursor;\nimport android.database.sqlite.SQLiteDatabase;\n\npublic class NoteDAO {\n//_id integer primary key,no integer autoincrement,note varchar(200))\n\t/**\n\t * \n\t */\n\tprivate DBOpenHelper helper;// 创建DBOpenHelper对象\n\tprivate SQLiteDatabase db;// 创建SQLiteDatabase对象\n\n\t \n\tpublic NoteDAO(Context context) {\n\t\t// TODO Auto-generated constructor stub\n\t\thelper = new DBOpenHelper(context);// 初始化DBOpenHelper对象\n\t}\n\t/**\n\t * 添加便签信息\n\t * \n\t * @param tb_note\n\t */\n\tpublic void add(Tb_note tb_note) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tdb.execSQL(\"insert into tb_note (_id,no,note) values (?,?,?)\", new Object[] {\n\t\t\t\ttb_note.get_id(), tb_note.getNo(),tb_note.getNote() });// 执行添加便签信息操作\n\t}\n\n\t/**\n\t * 更新便签信息\n\t * \n\t * @param tb_note\n\t */\n\tpublic void update(Tb_note tb_note) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tdb.execSQL(\"update tb_note set note = ? where _id = ? and no=?\", new Object[] {\n\t\t\t\ttb_note.getNote(), tb_note.get_id(),tb_note.getNo() });// 执行修改便签信息操作\n\t}\n\n\t/**\n\t * 查找便签信息\n\t * \n\t * @param id no\n\t * @return\n\t */\n\tpublic Tb_note find(int id,int no) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tCursor cursor = db.rawQuery(\n\t\t\t\t\"select _id,no,note from tb_note where _id = ? and no=?\",\n\t\t\t\tnew String[] { String.valueOf(id) ,String.valueOf(no)});// 根据编号查找便签信息，并存储到Cursor类中\n\t\tif (cursor.moveToNext())// 遍历查找到的便签信息\n\t\t{\n\t\t\t// 将遍历到的便签信息存储到Tb_flag类中\n\t\t\treturn new Tb_note(cursor.getInt(cursor.getColumnIndex(\"_id\")),\n\t\t\t\t\tcursor.getInt(cursor.getColumnIndex(\"no\")),\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(\"note\")));\n\t\t}\n\t\treturn null;// 如果没有信息，则返回null\n\t}\n\n\t/**\n\t * 刪除便签信息\n\t * \n\t * @param ids\n\t */\n\tpublic void detele(Integer... ids) {\n\t\tif (ids.length > 0)// 判断是否存在要删除的id\n\t\t{\n\t\t\tStringBuffer sb = new StringBuffer();// 创建StringBuffer对象\n\t\t\tfor (int i = 0; i < ids.length-1; i++)// 遍历要删除的id集合\n\t\t\t{\n\t\t\t\tsb.append('?').append(',');// 将删除条件添加到StringBuffer对象中\n\t\t\t}\n\t\t\tsb.deleteCharAt(sb.length() - 1);// 去掉最后一个“,“字符\n\t\t\tdb = helper.getWritableDatabase();// 创建SQLiteDatabase对象\n\t\t\t// 执行删除便签信息操作\n\t\t\tdb.execSQL(\"delete from tb_note where _id in (?) and no in (\" + sb + \")\",\n\t\t\t\t\t(Object[]) ids);\n\t\t}\n\t}\n\n\t/**\n\t * 获取便签信息\n\t * \n\t * @param start\n\t *            起始位置\n\t * @param count\n\t *            每页显示数量\n\t * @return\n\t */\n\tpublic List<Tb_note> getScrollData(int id,int start, int count) {\n\t\tList<Tb_note> lisTb_note = new ArrayList<Tb_note>();// 创建集合对象\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t// 获取所有便签信息\n\t\tCursor cursor = db.rawQuery(\"select _id,no,note from tb_note where _id=? order by no limit ?,?\",\n\t\t\t\tnew String[] { String.valueOf(id),  String.valueOf(start), String.valueOf(count) });\n\t\twhile (cursor.moveToNext())// 遍历所有的便签信息\n\t\t{\n\t\t\t// 将遍历到的便签信息添加到集合中\n\t\t\tlisTb_note.add(new Tb_note(\n\t\t\t\t\tcursor.getInt(cursor.getColumnIndex(\"_id\")),\n\t\t\t\t\tcursor.getInt(cursor.getColumnIndex(\"no\")),\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(\"note\"))));\n\t\t}\n\t\treturn lisTb_note;// 返回集合\n\t}\n\n\t/**\n\t * 获取总记录数\n\t * \n\t * @return\n\t */\n\tpublic long getCount(int id) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tCursor cursor = db.rawQuery(\"select count(no) from tb_note where _id=?\",new String[]{String.valueOf(id)});// 获取便签信息的记录数\n\t\tif (cursor.moveToNext())// 判断Cursor中是否有数据\n\t\t{\n\t\t\treturn cursor.getLong(0);// 返回总记录数\n\t\t}\n\t\treturn 0;// 如果没有数据，则返回0\n\t}\n\n\t/**\n\t * 获取便签最大编号\n\t * \n\t * @return\n\t */\n\tpublic int getMaxNo(int id) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tCursor cursor = db.rawQuery(\"select max(no) from tb_note where _id=?\",new String[]{String.valueOf(id)});// 获取便签信息表中的最大编号\n\t\twhile (cursor.moveToLast()) {// 访问Cursor中的最后一条数据\n\t\t\treturn cursor.getInt(0);// 获取访问到的数据，即最大编号\n\t\t}\n\t\treturn 0;// 如果没有数据，则返回0\n\t}\n\tpublic void deleteUserData(int id){//清空用户数据\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象 \n\t\tdb.execSQL(\"delete from tb_note where _id=?\",new Object[]{id});\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/cwp/moneycharge/dao/PayDAO.java",
    "content": "/**\n * \n */\npackage cwp.moneycharge.dao;\n\n/**\n * @author cwpcc\n *\n */\nimport java.text.ParseException;\nimport java.text.SimpleDateFormat;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Calendar;\nimport java.util.Date;\nimport java.util.List;\nimport cwp.moneycharge.model.*;\nimport android.annotation.SuppressLint;\nimport android.content.Context;\nimport android.database.Cursor;\nimport android.database.sqlite.SQLiteDatabase;\nimport android.text.GetChars;\nimport android.util.Log;\n\npublic class PayDAO {\n\n\tprivate DBOpenHelper helper;// 创建DBOpenHelper对象\n\tprivate SQLiteDatabase db;// 创建SQLiteDatabase对象\n\tprivate int no = 1;// 编号\n\tprivate int userid = 100000001;\n\n\tpublic PayDAO(Context context) {\n\t\t// TODO Auto-generated constructor stub\n\t\thelper = new DBOpenHelper(context);// 初始化DBOpenHelper对象\n\t}\n\n\t/**\n\t * 添加支出信息\n\t * \n\t * @param tb_pay\n\t */\n\tpublic void add(Tb_pay tb_pay) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t// 执行添加支出信息操作\n\t\tdb.execSQL(\n\t\t\t\t\"insert into tb_pay (_id,no,money,time,type,address,mark,photo,kind) values (?,?,?,?,?,?,?,?,?)\",\n\t\t\t\tnew Object[] { tb_pay.get_id(), tb_pay.getNo(),\n\t\t\t\t\t\ttb_pay.getMoney(), tb_pay.getTime(), tb_pay.getType(),\n\t\t\t\t\t\ttb_pay.getAddress(), tb_pay.getMark(),\n\t\t\t\t\t\ttb_pay.getPhoto(), \"支出\" });\n\t}\n\n\t/**\n\t * 更新支出信息\n\t * \n\t * @param tb_pay\n\t */\n\tpublic void update(Tb_pay tb_pay) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t// 执行修改支出信息操作\n\t\tdb.execSQL(\n\t\t\t\t\"update tb_pay set money = ?,time = ?,type = ?,address = ?,mark = ?,photo = ? where _id = ? and no=?\",\n\t\t\t\tnew Object[] { tb_pay.getMoney(), tb_pay.getTime(),\n\t\t\t\t\t\ttb_pay.getType(), tb_pay.getAddress(),\n\t\t\t\t\t\ttb_pay.getMark(), tb_pay.getPhoto(), tb_pay.get_id(),\n\t\t\t\t\t\ttb_pay.getNo() });\n\t}\n\n\t/**\n\t * 查找支出信息\n\t * \n\t * @param id\n\t *            ,no\n\t * @return\n\t */\n\tpublic Tb_pay find(int id, int no) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tCursor cursor = db\n\t\t\t\t.rawQuery(\n\t\t\t\t\t\t\"select _id,no,money,time,type,address,mark,photo from tb_pay where _id = ? and no=?\",\n\t\t\t\t\t\tnew String[] { String.valueOf(id), String.valueOf(no) });// 根据编号查找支出信息，并存储到Cursor类中\n\t\tif (cursor.moveToNext())// 遍历查找到的支出信息\n\t\t{\n\t\t\t// 将遍历到的支出信息存储到Tb_outaccount类中\n\t\t\treturn new Tb_pay(cursor.getInt(cursor.getColumnIndex(\"_id\")),\n\t\t\t\t\tcursor.getInt(cursor.getColumnIndex(\"no\")),\n\t\t\t\t\tcursor.getDouble(cursor.getColumnIndex(\"money\")),\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(\"time\")),\n\t\t\t\t\tcursor.getInt(cursor.getColumnIndex(\"type\")),\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(\"address\")),\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(\"mark\")),\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(\"photo\")));\n\t\t}\n\t\treturn null;// 如果没有信息，则返回null\n\t}\n\n\t/**\n\t * 刪除支出信息\n\t * \n\t * @param ids\n\t */\n\tpublic void detele(Integer... ids) {\n\t\tif (ids.length > 0)// 判断是否存在要删除的id\n\t\t{\n\t\t\tStringBuffer sb = new StringBuffer();// 创建StringBuffer对象\n\t\t\tfor (int i = 0; i < ids.length - 1; i++)// 遍历要删除的id集合\n\t\t\t{\n\t\t\t\tsb.append('?').append(',');// 将删除条件添加到StringBuffer对象中\n\t\t\t}\n\t\t\tsb.deleteCharAt(sb.length() - 1);// 去掉最后一个“,“字符\n\t\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t\t// 执行删除支出信息操作\n\t\t\tdb.execSQL(\"delete from tb_pay where _id in (?) and no in (\" + sb\n\t\t\t\t\t+ \")\", (Object[]) ids);\n\t\t}\n\t}\n\n\t/**\n\t * 获取支出信息\n\t * \n\t * @param start\n\t *            起始位置\n\t * @param count\n\t *            每页显示数量\n\t * @return\n\t */\n\tpublic List<Tb_pay> getScrollData(int id, int start, int count) {\n\t\tList<Tb_pay> tb_pay = new ArrayList<Tb_pay>();// 创建集合对象\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t// 获取所有支出信息\n\t\tCursor cursor = db\n\t\t\t\t.rawQuery(\n\t\t\t\t\t\t\"select _id,no,money,time,type,address,mark,photo from tb_pay where _id=? order by no limit ?,?\",\n\t\t\t\t\t\tnew String[] { String.valueOf(id),\n\t\t\t\t\t\t\t\tString.valueOf(start), String.valueOf(count) });\n\t\twhile (cursor.moveToNext())// 遍历所有的支出信息\n\t\t{\n\t\t\t// 将遍历到的支出信息添加到集合中\n\t\t\ttb_pay.add(new Tb_pay(cursor.getInt(cursor.getColumnIndex(\"_id\")),\n\t\t\t\t\tcursor.getInt(cursor.getColumnIndex(\"no\")), cursor\n\t\t\t\t\t\t\t.getDouble(cursor.getColumnIndex(\"money\")), cursor\n\t\t\t\t\t\t\t.getString(cursor.getColumnIndex(\"time\")), cursor\n\t\t\t\t\t\t\t.getInt(cursor.getColumnIndex(\"type\")), cursor\n\t\t\t\t\t\t\t.getString(cursor.getColumnIndex(\"address\")),\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(\"mark\")), cursor\n\t\t\t\t\t\t\t.getString(cursor.getColumnIndex(\"photo\"))));\n\t\t}\n\t\treturn tb_pay;// 返回集合\n\t}\n\n\t/**\n\t * 获取总记录数\n\t * \n\t * @return\n\t */\n\tpublic long getCount() {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tCursor cursor = db.rawQuery(\"select count(no) from tb_pay\", null);// 获取支出信息的记录数\n\t\tif (cursor.moveToNext())// 判断Cursor中是否有数据\n\t\t{\n\t\t\treturn cursor.getLong(0);// 返回总记录数\n\t\t}\n\t\treturn 0;// 如果没有数据，则返回0\n\t}\n\n\tpublic long getCount(int id) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tCursor cursor = db.rawQuery(\"select count(no) from tb_pay where _id=?\",\n\t\t\t\tnew String[] { String.valueOf(id) });// 获取收入信息的记录数\n\t\tif (cursor.moveToNext())// 判断Cursor中是否有数据\n\t\t{\n\t\t\treturn cursor.getLong(0);// 返回总记录数\n\t\t}\n\t\treturn 0;// 如果没有数据，则返回0\n\t}\n\n\t/**\n\t * 获取支出最大编号\n\t * \n\t * @return\n\t */\n\tpublic int getMaxNo(int id) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tCursor cursor = db.rawQuery(\"select max(no) from tb_pay where _id=?\",\n\t\t\t\tnew String[] { String.valueOf(id) });// 获取支出信息表中的最大编号\n\t\twhile (cursor.moveToLast()) {// 访问Cursor中的最后一条数据\n\t\t\treturn cursor.getInt(0);// 获取访问到的数据，即最大编号\n\t\t}\n\t\treturn 0;// 如果没有数据，则返回0\n\t}\n\n\t@SuppressLint(\"SimpleDateFormat\")\n\tpublic String addDays(String sdate, int days) {\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tDate date = new Date();\n\t\ttry {\n\t\t\tdate = (Date) sdf.parse(sdate);\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(date);\n\t\tcal.add(Calendar.DATE, days); // minus number would decrement the days\n\t\tdate = cal.getTime();\n\t\tString result = sdf.format(date);\n\t\treturn result;\n\t}\n\n\tpublic Double getamountData(int userid) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tDouble data = 0.0;\n\t\tCursor cursor = db.rawQuery(\n\t\t\t\t\"select sum(money) from tb_pay where _id=?\",\n\t\t\t\tnew String[] { String.valueOf(userid) });\n\t\t// 获取支出信息表中的最大编号\n\t\twhile (cursor.moveToNext())// 遍历所有的支出信息\n\t\t{\n\t\t\t// 将遍历到的支出信息添加到集合中\n\t\t\tdata = cursor.getDouble(0);\n\t\t}\n\t\tcursor.close();\n\t\treturn data;\n\t}\n\n\tpublic Datapicker getDataOnDay(String date1, String date2) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tDouble data = 0.0;\n\t\tDatapicker datapicker;\n\t\tCursor cursor = db\n\t\t\t\t.rawQuery(\n\t\t\t\t\t\t\"select total(money) as tmoney from tb_pay  where time >= ? and time <= ? and  _id =?\",\n\t\t\t\t\t\tnew String[] { date1, date2, String.valueOf(userid) });// 获取支出信息表中的最大编号\n\t\twhile (cursor.moveToNext())// 遍历所有的支出信息\n\t\t{\n\n\t\t\t// 将遍历到的支出信息添加到集合中\n\t\t\tdata = cursor.getDouble(cursor.getColumnIndex(\"tmoney\"));\n\t\t}\n\t\tcursor.close();\n\t\tdatapicker = new Datapicker(no, data, date1);\n\t\tno++;\n\t\treturn datapicker;\n\t\t// 将遍历到的支出信息添加到集合中\n\n\t} // 返回集合\n\n\tpublic List<Datapicker> getDataMonth(int id, int year, int month) {\n\t\tString d1, d2;\n\t\td1 = String.valueOf(year) + \"-\";\n\t\td2 = String.valueOf(year) + \"-\";\n\t\tuserid = id;\n\t\tno = 1;\n\t\tswitch (month) {\n\t\tcase 1:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tif (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {\n\t\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\t\td2 += \"0\" + String.valueOf(month) + \"-29\";\n\t\t\t} else {\n\t\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\t\td2 += \"0\" + String.valueOf(month) + \"-28\";\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-30\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-30\";\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-30\";\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\td1 += String.valueOf(month) + \"-01\";\n\t\t\td2 += String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\td1 += String.valueOf(month) + \"-01\";\n\t\t\td2 += String.valueOf(month) + \"-30\";\n\t\t\tbreak;\n\t\tcase 12:\n\t\t\td1 += String.valueOf(month) + \"-01\";\n\t\t\td2 += String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\n\t\t}\n\t\tList<Datapicker> datapickerlist = new ArrayList<Datapicker>();\n\t\tDatapicker datapicker;\n\t\tfor (String temp = d1; temp.compareTo(d2) <= 0;) {\n\t\t\t// 创建集合对象\n\t\t\tdatapicker = getDataOnDay(temp, temp);\n\t\t\tdatapickerlist.add(datapicker);\n\t\t\ttemp = addDays(temp, 1);\n\t\t}\n\n\t\treturn datapickerlist;\n\t}\n\n\tpublic List<Datapicker> getDataAnytime(int id, String date1, String date2) {\n\n\t\tuserid = id;\n\t\tno = 1;\n\n\t\tList<Datapicker> datapickerlist = new ArrayList<Datapicker>();\n\t\tDatapicker datapicker;\n\t\tfor (String temp = date1; temp.compareTo(date2) <= 0;) {\n\t\t\t// 创建集合对象\n\t\t\tdatapicker = getDataOnDay(temp, temp);\n\t\t\tdatapickerlist.add(datapicker);\n\t\t\ttemp = addDays(temp, 1);\n\t\t}\n\n\t\treturn datapickerlist;\n\t}\n\n\tpublic void deleteUserData(int id) {// 清空用户数据\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tdb.execSQL(\"delete from tb_pay where _id=?\", new Object[] { id });\n\t}\n\n\tpublic List<Tb_pay> getScrollData(int id, int start, int count,\n\t\t\tString date1, String date2) {\n\t\tList<Tb_pay> tb_pay = new ArrayList<Tb_pay>();// 创建集合对象\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t// 获取所有支出信息\n\t\tCursor cursor = db\n\t\t\t\t.rawQuery(\n\t\t\t\t\t\t\"select _id,no,money,time,type,address,mark,photo from tb_pay where _id=? and time >= ? and time <= ? order by time DESC\",\n\t\t\t\t\t\tnew String[] { String.valueOf(id), date1, date2 });\n\t\twhile (cursor.moveToNext())// 遍历所有的支出信息\n\t\t{\n\t\t\t// 将遍历到的支出信息添加到集合中\n\t\t\ttb_pay.add(new Tb_pay(cursor.getInt(cursor.getColumnIndex(\"_id\")),\n\t\t\t\t\tcursor.getInt(cursor.getColumnIndex(\"no\")), cursor\n\t\t\t\t\t\t\t.getDouble(cursor.getColumnIndex(\"money\")), cursor\n\t\t\t\t\t\t\t.getString(cursor.getColumnIndex(\"time\")), cursor\n\t\t\t\t\t\t\t.getInt(cursor.getColumnIndex(\"type\")), cursor\n\t\t\t\t\t\t\t.getString(cursor.getColumnIndex(\"address\")),\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(\"mark\")), cursor\n\t\t\t\t\t\t\t.getString(cursor.getColumnIndex(\"photo\"))));\n\t\t}\n\t\treturn tb_pay;// 返回集合\n\t}\n\n\tpublic List<KindData> getKDataOnDay(int id, String date1, String date2) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tList<KindData> kinddatalist = new ArrayList<KindData>();\n\t\tCursor cursor = db\n\t\t\t\t.rawQuery(\n\t\t\t\t\t\t\"select type,  total(money) as tmoney from tb_pay  where time >= ? and time <= ? and  _id =? group by type\",\n\t\t\t\t\t\tnew String[] { date1, date2, String.valueOf(id) });// 获取支出信息表中的最大编号\n\t\twhile (cursor.moveToNext())// 遍历所有的支出信息\n\t\t{\n\n\t\t\t// 将遍历到的支出信息添加到集合中\n\t\t\tkinddatalist.add(new KindData(cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"type\")), cursor.getDouble(cursor\n\t\t\t\t\t.getColumnIndex(\"tmoney\"))));\n\t\t}\n\t\tcursor.close();\n\n\t\treturn kinddatalist;// 返回集合\n\t\t// 将遍历到的支出信息添加到集合中\n\n\t} // 返回集合\n\n\tpublic List<KindData> getKDataOnMonth(int id, int year, int month) {\n\t\tString d1, d2;\n\t\td1 = String.valueOf(year) + \"-\";\n\t\td2 = String.valueOf(year) + \"-\";\n\t\tswitch (month) {\n\t\tcase 1:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tif (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {\n\t\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\t\td2 += \"0\" + String.valueOf(month) + \"-29\";\n\t\t\t} else {\n\t\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\t\td2 += \"0\" + String.valueOf(month) + \"-28\";\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-30\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-30\";\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\td1 += \"0\" + String.valueOf(month) + \"-01\";\n\t\t\td2 += \"0\" + String.valueOf(month) + \"-30\";\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\td1 += String.valueOf(month) + \"-01\";\n\t\t\td2 += String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\td1 += String.valueOf(month) + \"-01\";\n\t\t\td2 += String.valueOf(month) + \"-30\";\n\t\t\tbreak;\n\t\tcase 12:\n\t\t\td1 += String.valueOf(month) + \"-01\";\n\t\t\td2 += String.valueOf(month) + \"-31\";\n\t\t\tbreak;\n\n\t\t}\n\t\treturn getKDataOnDay(id, d1, d2);\n\t}\n}"
  },
  {
    "path": "MoneyCharge/app/src/main/java/cwp/moneycharge/dao/PtypeDAO.java",
    "content": "package cwp.moneycharge.dao;\n\nimport cwp.moneycharge.model.Tb_ptype;\nimport cwp.moneycharge.dao.DBOpenHelper;\nimport java.util.List;\nimport java.util.ArrayList;\n\nimport com.cwp.cmoneycharge.R;\n\nimport android.database.sqlite.SQLiteDatabase;\nimport android.content.Context;\nimport android.database.Cursor;\n\npublic class PtypeDAO {\n\t// (_id INTEGER NOT NULL PRIMARY KEY,no not null integer ,typename\n\t// varchar(50)\n\tprivate DBOpenHelper helper;// 创建DBOpenHelper对象\n\tprivate SQLiteDatabase db;// 创建SQLiteDatabase对象\n\n\tint[] imageId = new int[] { R.drawable.icon_spjs_zwwc,\n\t\t\tR.drawable.icon_spjs_zwwc, R.drawable.icon_spjs_zwwc,\n\t\t\tR.drawable.icon_spjs_zwwc, R.drawable.icon_jjwy_rcyp,\n\t\t\tR.drawable.icon_xxyl_wg, R.drawable.icon_yfsp,\n\t\t\tR.drawable.icon_rqwl_slqk, R.drawable.icon_jltx_sjf,\n\t\t\tR.drawable.icon_spjs, R.drawable.icon_jrbx_ajhk,\n\t\t\tR.drawable.icon_jrbx, R.drawable.icon_xcjt_dczc,\n\t\t\tR.drawable.icon_qtzx, R.drawable.icon_jrbx_lxzc, R.drawable.yysb };\n\n\tpublic PtypeDAO(Context context) {\n\t\t// TODO Auto-generated constructor stub\n\t\thelper = new DBOpenHelper(context);// 初始化DBOpenHelper对象\n\t}\n\n\t/**\n\t * 新增收入类型\n\t * \n\t * @param tb_ptype\n\t */\n\tpublic void add(Tb_ptype tb_ptype) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tdb.execSQL(\n\t\t\t\t\"insert into tb_ptype (_id,no,typename) values (?,?,?)\",\n\t\t\t\tnew Object[] { tb_ptype.get_id(), tb_ptype.getNo(),\n\t\t\t\t\t\ttb_ptype.getTypename() });// 执行添加支出类型操作\n\n\t}\n\n\t/**\n\t * 修改收入类型\n\t * \n\t * @param tb_ptype\n\t */\n\tpublic void modify(Tb_ptype tb_ptype) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tdb.execSQL(\n\t\t\t\t\"update Tb_ptype set typename = ? where _id = ? and no=?\",\n\t\t\t\tnew Object[] { tb_ptype.get_id(), tb_ptype.getNo(),\n\t\t\t\t\t\ttb_ptype.getTypename() });// 执行修改支出类型操作\n\t}\n\n\tpublic void modifyByName(int id, String old, String now) {\n\t\tdb = helper.getWritableDatabase();\n\t\tdb.execSQL(\n\t\t\t\t\"update Tb_ptype set typename = ? where _id = ? and typename=?\",\n\t\t\t\tnew Object[] { id, now, old });// 执行修改收入类型操作\n\t}\n\n\t/**\n\t * 删除收入类型\n\t * \n\t * @param ids\n\t */\n\tpublic void delete(Integer... ids) {\n\t\tif (ids.length > 0)// 判断是否存在要删除的id\n\t\t{\n\t\t\tStringBuffer sb = new StringBuffer();// 创建StringBuffer对象\n\t\t\tfor (int i = 0; i < ids.length - 1; i++)// 遍历要删除的id集合\n\t\t\t{\n\t\t\t\tsb.append('?').append(',');// 将删除条件添加到StringBuffer对象中\n\t\t\t}\n\t\t\tsb.deleteCharAt(sb.length() - 1);// 去掉最后一个“,“字符\n\t\t\tdb = helper.getWritableDatabase();// 创建SQLiteDatabase对象\n\t\t\t// 执行删除便签信息操作\n\t\t\tdb.execSQL(\"delete from tb_ptype where _id in (?) and no in (\" + sb\n\t\t\t\t\t+ \")\", (Object[]) ids);\n\t\t}\n\t}\n\n\tpublic void deleteByName(int id, String typename) {\n\t\tdb = helper.getWritableDatabase();// 创建SQLiteDatabase对象\n\t\t// 执行删除便签信息操作\n\t\tdb.execSQL(\"delete from tb_ptype where _id =? and typename=?\",\n\t\t\t\tnew Object[] { id, typename });\n\t}\n\n\tpublic void deleteById(int id) {\n\t\tdb = helper.getWritableDatabase();// 创建SQLiteDatabase对象\n\t\t// 执行删除便签信息操作\n\t\tdb.execSQL(\"delete from tb_ptype where _id =? \", new Object[] { id });\n\t}\n\n\t/**\n\t * 获取收入类型信息\n\t * \n\t * @param start\n\t *            起始位置\n\t * @param count\n\t *            每页显示数量\n\t * @return\n\t */\n\tpublic List<Tb_ptype> getScrollData(int id, int start, int count) {\n\t\tList<Tb_ptype> lisTb_ptype = new ArrayList<Tb_ptype>();// 创建集合对象\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\t// 获取所有便签信息\n\t\tCursor cursor = db.rawQuery(\n\t\t\t\t\"select * from tb_ptype where _id=? order by no limit ?,?\",\n\t\t\t\tnew String[] { String.valueOf(id), String.valueOf(start),\n\t\t\t\t\t\tString.valueOf(count) });\n\t\twhile (cursor.moveToNext())// 遍历所有的便签信息\n\t\t{\n\t\t\t// 将遍历到的便签信息添加到集合中\n\t\t\tlisTb_ptype.add(new Tb_ptype(cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"_id\")), cursor.getInt(cursor\n\t\t\t\t\t.getColumnIndex(\"no\")), cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"typename\"))));\n\t\t}\n\t\treturn lisTb_ptype;// 返回集合\n\t}\n\n\t/**\n\t * 获取总记录数\n\t * \n\t * @return\n\t */\n\tpublic long getCount() {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tCursor cursor = db.rawQuery(\"select count(no) from tb_ptype\", null);// 获取支出类型的记录数\n\t\tif (cursor.moveToNext())// 判断Cursor中是否有数据\n\t\t{\n\t\t\treturn cursor.getLong(0);// 返回总记录数\n\t\t}\n\t\treturn 0;// 如果没有数据，则返回0\n\t}\n\n\tpublic long getCount(int id) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tCursor cursor = db.rawQuery(\n\t\t\t\t\"select count(no) from tb_ptype where _id=?\",\n\t\t\t\tnew String[] { String.valueOf(id) });// 获取收入信息的记录数\n\t\tif (cursor.moveToNext())// 判断Cursor中是否有数据\n\t\t{\n\t\t\treturn cursor.getLong(0);// 返回总记录数\n\t\t}\n\t\treturn 0;// 如果没有数据，则返回0\n\t}\n\n\t/**\n\t * 获取便签最大编号\n\t * \n\t * @return\n\t */\n\tpublic int getMaxId() {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tCursor cursor = db.rawQuery(\"select max(no) from tb_ptype\", null);// 获取收入类型表中的最大编号\n\t\twhile (cursor.moveToLast()) {// 访问Cursor中的最后一条数据\n\t\t\treturn cursor.getInt(0);// 获取访问到的数据，即最大编号\n\t\t}\n\t\treturn 0;// 如果没有数据，则返回0\n\t}\n\n\t/**\n\t * 获取类型名数组 param id\n\t * \n\t * @return\n\t * */\n\tpublic List<String> getPtypeName(int id) {\n\t\tList<String> lisCharSequence = new ArrayList<String>();// 创建集合对象\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tCursor cursor = db.rawQuery(\n\t\t\t\t\"select typename from tb_ptype where _id=?\",\n\t\t\t\tnew String[] { String.valueOf(id) });// 获取收入类型表中的最大编号\n\t\twhile (cursor.moveToNext()) {// 访问Cursor中的最后一条数据\n\t\t\tlisCharSequence.add(cursor.getString(cursor\n\t\t\t\t\t.getColumnIndex(\"typename\")));\n\n\t\t}\n\t\treturn lisCharSequence;// 如果没有数据，则返回0\n\n\t}\n\n\tpublic String getOneName(int id, int no) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tCursor cursor = db.rawQuery(\n\t\t\t\t\"select typename from tb_ptype where _id=? and no=?\",\n\t\t\t\tnew String[] { String.valueOf(id), String.valueOf(no) });\n\t\tif (cursor.moveToNext()) {\n\t\t\treturn cursor.getString(cursor.getColumnIndex(\"typename\"));\n\t\t}\n\t\treturn \"\";\n\t}\n\n\tpublic int getOneImg(int id, int no) {\n\t\tif (imageId.length < no) {\n\t\t\treturn imageId[14];\n\t\t}\n\t\treturn imageId[no - 1];\n\t}\n\n\tpublic void initData(int id) {\n\t\tdb = helper.getWritableDatabase();// 初始化SQLiteDatabase对象\n\t\tdb.execSQL(\"delete from tb_ptype where _id=?\",\n\t\t\t\tnew String[] { String.valueOf(id) }); // 确保无该id\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",\n\t\t\t\tnew String[] { String.valueOf(id), \"1\", \"早餐\" });\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",\n\t\t\t\tnew String[] { String.valueOf(id), \"2\", \"午餐\" });\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",\n\t\t\t\tnew String[] { String.valueOf(id), \"3\", \"晚餐\" });\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",\n\t\t\t\tnew String[] { String.valueOf(id), \"4\", \"夜宵\" });\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",\n\t\t\t\tnew String[] { String.valueOf(id), \"5\", \"生活用品\" });\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",\n\t\t\t\tnew String[] { String.valueOf(id), \"6\", \"工作用品\" });\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",\n\t\t\t\tnew String[] { String.valueOf(id), \"7\", \"衣服\" });\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",\n\t\t\t\tnew String[] { String.valueOf(id), \"8\", \"应酬\" });\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",\n\t\t\t\tnew String[] { String.valueOf(id), \"9\", \"电子产品\" });\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",\n\t\t\t\tnew String[] { String.valueOf(id), \"10\", \"食品\" });\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",\n\t\t\t\tnew String[] { String.valueOf(id), \"11\", \"租金\" });\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",\n\t\t\t\tnew String[] { String.valueOf(id), \"12\", \"股票\" });\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",\n\t\t\t\tnew String[] { String.valueOf(id), \"13\", \"打的\" });\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",\n\t\t\t\tnew String[] { String.valueOf(id), \"14\", \"基金\" });\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",\n\t\t\t\tnew String[] { String.valueOf(id), \"15\", \"其他\" });\n\t\tdb.execSQL(\"insert into tb_ptype(_id,no,typename) values(?,?,?)\",\n\t\t\t\tnew String[] { String.valueOf(id), \"16\", \"语音识别\" });\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/cwp/moneycharge/model/ActivityManager.java",
    "content": "package cwp.moneycharge.model;\n\nimport java.util.LinkedList; \nimport java.util.List; \nimport android.app.Activity; \nimport android.app.AlertDialog; \nimport android.app.Application; \nimport android.content.DialogInterface; \nimport android.content.Intent; \n\npublic class ActivityManager {\n\tprivate List<Activity> mList = new LinkedList<Activity>(); \n    private static ActivityManager instance; \n\t \n\tpublic ActivityManager() {\n\t\t// TODO Auto-generated constructor stub\n\t}\n\n \n    public synchronized static ActivityManager getInstance() { \n        if (null == instance) { \n            instance = new ActivityManager(); \n        } \n        return instance; \n    } \n    // add Activity  \n    public void addActivity(Activity activity) { \n        mList.add(activity); \n    } \n \n    public void exit() { \n        try { \n            for (Activity activity : mList) { \n                if (activity != null) \n                    activity.finish(); \n            } \n        } catch (Exception e) { \n            e.printStackTrace(); \n        } finally { \n            System.exit(0); \n        } \n    }  \n}"
  },
  {
    "path": "MoneyCharge/app/src/main/java/cwp/moneycharge/model/CustomDialog.java",
    "content": "package cwp.moneycharge.model;\n \n\nimport com.cwp.cmoneycharge.R;\nimport com.cwp.cmoneycharge.R.id;\nimport com.cwp.cmoneycharge.R.layout;\nimport com.cwp.cmoneycharge.R.style;\n\nimport android.app.Dialog;\nimport android.content.Context;\nimport android.content.DialogInterface;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup.LayoutParams;\nimport android.widget.Button;\nimport android.widget.LinearLayout;\nimport android.widget.TextView;\n \n/**\n * \n * Create custom Dialog windows for your application\n * Custom dialogs rely on custom layouts wich allow you to \n * create and use your own look & feel.\n * \n * Under GPL v3 : http://www.gnu.org/licenses/gpl-3.0.html\n * \n * <a href=\"http://my.oschina.net/arthor\" target=\"_blank\" rel=\"nofollow\">@author</a> antoine vianey\n *\n */\npublic class CustomDialog extends Dialog {\n \n    public CustomDialog(Context context, int theme) {\n        super(context, theme);\n    }\n \n    public CustomDialog(Context context) {\n        super(context);\n    }\n \n    /**\n     * Helper class for creating a custom dialog\n     */\n    public static class Builder {\n \n        private Context context;\n        private String title;\n        private String message;\n        private String positiveButtonText;\n        private String negativeButtonText;\n        private View contentView;\n \n        private DialogInterface.OnClickListener \n                        positiveButtonClickListener,\n                        negativeButtonClickListener;\n \n        public Builder(Context context) {\n            this.context = context;\n        }\n \n        /**\n         * Set the Dialog message from String\n         * @param title\n         * @return\n         */\n        public Builder setMessage(String message) {\n            this.message = message;\n            return this;\n        }\n \n        /**\n         * Set the Dialog message from resource\n         * @param title\n         * @return\n         */\n        public Builder setMessage(int message) {\n            this.message = (String) context.getText(message);\n            return this;\n        }\n \n        /**\n         * Set the Dialog title from resource\n         * @param title\n         * @return\n         */\n        public Builder setTitle(int title) {\n            this.title = (String) context.getText(title);\n            return this;\n        }\n \n        /**\n         * Set the Dialog title from String\n         * @param title\n         * @return\n         */\n        public Builder setTitle(String title) {\n            this.title = title;\n            return this;\n        }\n \n        /**\n         * Set a custom content view for the Dialog.\n         * If a message is set, the contentView is not\n         * added to the Dialog...\n         * @param v\n         * @return\n         */\n        public Builder setContentView(View v) {\n            this.contentView = v;\n            return this;\n        }\n \n        /**\n         * Set the positive button resource and it's listener\n         * @param positiveButtonText\n         * @param listener\n         * @return\n         */\n        public Builder setPositiveButton(int positiveButtonText,\n                DialogInterface.OnClickListener listener) {\n            this.positiveButtonText = (String) context\n                    .getText(positiveButtonText);\n            this.positiveButtonClickListener = listener;\n            return this;\n        }\n \n        /**\n         * Set the positive button text and it's listener\n         * @param positiveButtonText\n         * @param listener\n         * @return\n         */\n        public Builder setPositiveButton(String positiveButtonText,\n                DialogInterface.OnClickListener listener) {\n            this.positiveButtonText = positiveButtonText;\n            this.positiveButtonClickListener = listener;\n            return this;\n        }\n \n        /**\n         * Set the negative button resource and it's listener\n         * @param negativeButtonText\n         * @param listener\n         * @return\n         */\n        public Builder setNegativeButton(int negativeButtonText,\n                DialogInterface.OnClickListener listener) {\n            this.negativeButtonText = (String) context\n                    .getText(negativeButtonText);\n            this.negativeButtonClickListener = listener;\n            return this;\n        }\n \n        /**\n         * Set the negative button text and it's listener\n         * @param negativeButtonText\n         * @param listener\n         * @return\n         */\n        public Builder setNegativeButton(String negativeButtonText,\n                DialogInterface.OnClickListener listener) {\n            this.negativeButtonText = negativeButtonText;\n            this.negativeButtonClickListener = listener;\n            return this;\n        }\n \n        /**\n         * Create the custom dialog\n         */\n        public CustomDialog create() {\n            LayoutInflater inflater = (LayoutInflater) context\n                    .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n            // instantiate the dialog with the custom Theme\n            final CustomDialog dialog = new CustomDialog(context, \n            \t\tR.style.Dialog);\n            View layout = inflater.inflate(R.layout.dialog, null);\n            dialog.addContentView(layout, new LayoutParams(\n                    LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));\n            // set the dialog title\n            ((TextView) layout.findViewById(R.id.title)).setText(title);\n            // set the confirm button\n            if (positiveButtonText != null) {\n                ((Button) layout.findViewById(R.id.positiveButton))\n                        .setText(positiveButtonText);\n                if (positiveButtonClickListener != null) {\n                    ((Button) layout.findViewById(R.id.positiveButton))\n                            .setOnClickListener(new View.OnClickListener() {\n                                public void onClick(View v) {\n                                    positiveButtonClickListener.onClick(\n                                    \t\tdialog, \n                                            DialogInterface.BUTTON_POSITIVE);\n                                }\n                            });\n                }\n            } else {\n                // if no confirm button just set the visibility to GONE\n                layout.findViewById(R.id.positiveButton).setVisibility(\n                        View.GONE);\n            }\n            // set the cancel button\n            if (negativeButtonText != null) {\n                ((Button) layout.findViewById(R.id.negativeButton))\n                        .setText(negativeButtonText);\n                if (negativeButtonClickListener != null) {\n                    ((Button) layout.findViewById(R.id.negativeButton))\n                            .setOnClickListener(new View.OnClickListener() {\n                                public void onClick(View v) {\n                                \tnegativeButtonClickListener.onClick(\n                                    \t\tdialog, \n                                            DialogInterface.BUTTON_NEGATIVE);\n                                }\n                            });\n                }\n            } else {\n                // if no confirm button just set the visibility to GONE\n                layout.findViewById(R.id.negativeButton).setVisibility(\n                        View.GONE);\n            }\n            // set the content message\n            if (message != null) {\n                ((TextView) layout.findViewById(\n                \t\tR.id.message)).setText(message);\n            } else if (contentView != null) {\n                // if no message set\n                // add the contentView to the dialog body\n                ((LinearLayout) layout.findViewById(R.id.content))\n                        .removeAllViews();\n                ((LinearLayout) layout.findViewById(R.id.content))\n                        .addView(contentView, \n                                new LayoutParams(\n                                        LayoutParams.WRAP_CONTENT, \n                                        LayoutParams.WRAP_CONTENT));\n            }\n            dialog.setContentView(layout);\n            return dialog;\n        }\n \n    }\n    \n \n}"
  },
  {
    "path": "MoneyCharge/app/src/main/java/cwp/moneycharge/model/Datapicker.java",
    "content": "package cwp.moneycharge.model;\n\npublic class Datapicker {\n\tprivate int no;\n\tprivate String time;\n\tprivate Double money;\n\tpublic Datapicker(int no,Double money,String time) {\n\t\t// TODO Auto-generated constructor stub\n\t\tthis.no=no;\n\t\tthis.time=time;\n\t\tthis.money=money;\n\t}\n\tpublic int getNo() {\n\t\treturn no;\n\t}\n\tpublic void setNo(int no) {\n\t\tthis.no = no;\n\t}\n\tpublic String getTime() {\n\t\treturn time;\n\t}\n\tpublic void setTime(String time) {\n\t\tthis.time = time;\n\t}\n\tpublic Double getMoney() {\n\t\treturn money;\n\t}\n\tpublic void setMoney(Double money) {\n\t\tthis.money = money;\n\t}\n\t\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/cwp/moneycharge/model/KindData.java",
    "content": "package cwp.moneycharge.model;\n\npublic class KindData {\n\tprivate int kindname;\n\tprivate double amount;\n\tpublic KindData(int kindname,double amount) {\n\t\t// TODO Auto-generated constructor stub\n\t\tthis.kindname=kindname;\n\t\tthis.amount=amount;\n\t}\n\tpublic int getKindname() {\n\t\treturn kindname;\n\t}\n\tpublic void setKindname(int kindname) {\n\t\tthis.kindname = kindname;\n\t}\n\tpublic double getAmount() {\n\t\treturn amount;\n\t}\n\tpublic void setAmount(double amount) {\n\t\tthis.amount = amount;\n\t}\n\t\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/cwp/moneycharge/model/Tb_account.java",
    "content": "package cwp.moneycharge.model;\n\npublic class Tb_account {\n//_id INTEGER  NOT NULL PRIMARY KEY AUTOINCREMENT ,username varchar(20),pwd varchar(50)\n\tprivate int _id ;\n\tprivate String username;\n\tprivate String pwd ; \n\tpublic Tb_account( int id ,String username, String pwd ) {\n\t\t// TODO Auto-generated constructor stub\n\t\tsuper();\n\t\tthis._id=id;\n\t\tthis.pwd=pwd;\n\t\tthis.username=username;\n\t}\n\tpublic Tb_account(){\n\t\tsuper();\n\t}\n\tpublic int get_id() {\n\t\treturn _id;\n\t} \n\tpublic String getUsername() {\n\t\treturn username;\n\t}\n\tpublic void setUsername(String username) {\n\t\tthis.username = username;\n\t}\n\tpublic String getPwd() {\n\t\treturn pwd;\n\t}\n\tpublic void setPwd(String pwd) {\n\t\tthis.pwd = pwd;\n\t}\n\t\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/cwp/moneycharge/model/Tb_income.java",
    "content": "/**\n * \n */\npackage cwp.moneycharge.model;\n\nimport java.math.BigDecimal;\nimport java.text.DecimalFormat;\n\n/**\n * @author cwpcc\n * \n */\npublic class Tb_income {\n\t// _id INTEGER NOT NULL PRIMARY KEY,no not null integer ,money decimal,time\n\t// varchar(10),\n\t// type integer ,handler varchar(100),mark varchar(200))\n\tprivate int _id;// 存储用户id\n\tprivate int no;// 存储收入编号\n\tprivate double money;// 存储收入金额\n\tprivate String time;// 存储收入时间\n\tprivate int type;// 存储收入类别id\n\tprivate String handler;// 存储收入地址\n\tprivate String mark;// 存储收入备注\n\tprivate String kind;// 存储收入收支类别\n\tprivate String photo;// 存储支出备注\n\n\tpublic Tb_income(int id, int no, double d, String time, int type,\n\t\t\tString handler, String mark, String photo, String kind) {\n\n\t\tsuper();\n\t\tthis._id = id;// 为用户id\n\t\tthis.no = no;// 为收入编号赋值\n\t\tthis.money = d;// 为收入金额赋值\n\t\tthis.time = time;// 为收入时间赋值\n\t\tthis.type = type;// 为收入类别赋值\n\t\tthis.handler = handler;// 为收入付款方赋值\n\t\tthis.mark = mark;// 为收入备注赋值\n\t\tthis.kind = kind;// 为收入备注赋值\n\t\tthis.photo = photo;// 为支出备注赋值\n\t}\n\n\tpublic String getPhoto() {\n\t\treturn photo;\n\t}\n\n\tpublic void setPhoto(String photo) {\n\t\tthis.photo = photo;\n\t}\n\n\tpublic Tb_income() {\n\t\tsuper();\n\t}\n\n\tpublic int get_id() {\n\t\treturn _id;\n\t}\n\n\tpublic void set_id(int _id) {\n\t\tthis._id = _id;\n\t}\n\n\tpublic int getNo() {\n\t\treturn no;\n\t}\n\n\tpublic void setNo(int no) {\n\t\tthis.no = no;\n\t}\n\n\tpublic double getMoney() {\n\t\treturn money;\n\t}\n\n\tpublic String getMoney2() {\n\t\tdouble a = money;\n\t\tDecimalFormat df = new DecimalFormat(\"#.00\");\n\t\treturn df.format(a);\n\t}\n\n\tpublic void setMoney(double money) {\n\t\tthis.money = money;\n\t}\n\n\tpublic String getTime() {\n\t\treturn time;\n\t}\n\n\tpublic void setTime(String time) {\n\t\tthis.time = time;\n\t}\n\n\tpublic int getType() {\n\t\treturn type;\n\t}\n\n\tpublic void setType(int type) {\n\t\tthis.type = type;\n\t}\n\n\tpublic String getHandler() {\n\t\treturn handler;\n\t}\n\n\tpublic void setHandler(String handler) {\n\t\tthis.handler = handler;\n\t}\n\n\tpublic String getMark() {\n\t\treturn mark;\n\t}\n\n\tpublic void setMark(String mark) {\n\t\tthis.mark = mark;\n\t}\n\n\tpublic String getKind() {\n\t\treturn kind;\n\t}\n\n\tpublic void setKind(String kind) {\n\t\tthis.kind = kind;\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/cwp/moneycharge/model/Tb_itype.java",
    "content": "package cwp.moneycharge.model;\n\npublic class Tb_itype { \n\t//_id INTEGER  NOT NULL PRIMARY KEY,no not null integer AUTOINCREMENT ,typename varchar(50) \n\tprivate int  _id;//用户id\n\tprivate int no;//收入类型id\n\tprivate String typename;//收入类型名称\n\t\n\tpublic Tb_itype() {\n\t\t// TODO Auto-generated constructor stub\n\t\tsuper();\n\t}\n\tpublic Tb_itype(int id,int no,String typename) {\n\t\t// TODO Auto-generated constructor stub\n\t\tsuper();\n\t\tthis._id=id;\n\t\tthis.no=no;\n\t\tthis.typename=typename;\n\t}\n\tpublic int get_id() {\n\t\treturn _id;\n\t}\n\tpublic void set_id(int _id) {\n\t\tthis._id = _id;\n\t}\n\t\n\tpublic int getNo() {\n\t\treturn no;\n\t} \n\tpublic void set_No(int no) {\n\t\tthis.no = no;\n\t}\n\tpublic String getTypename() {\n\t\treturn typename;\n\t}\n\tpublic void setTypename(String typename) {\n\t\tthis.typename = typename;\n\t}\n\t\n\t\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/cwp/moneycharge/model/Tb_note.java",
    "content": "package cwp.moneycharge.model;\n\npublic class Tb_note {\n//_id integer primary key,no integer autoincrement,flag varchar(200))\n\tprivate int _id;\n\tprivate int no;\n\tprivate String note;\n\t\n\tpublic Tb_note() {\n\t\t// TODO Auto-generated constructor stub\n\t\tsuper();\n\t}\n\tpublic Tb_note(int id,int no,String note) {\n\t\t super();\n\t\t this._id=id;\n\t\t this.no=no;\n\t\t this.note=note;\n\t\t \n\t}\n\tpublic int get_id() {\n\t\treturn _id;\n\t}\n\tpublic void set_id(int _id) {\n\t\tthis._id = _id;\n\t}\n\t\n\tpublic int getNo() {\n\t\treturn no;\n\t} \n\n\tpublic void setNo(int no) {\n\t\tthis.no = no;\n\t}\n\tpublic String getNote() {\n\t\treturn note;\n\t}\n\tpublic void setNote(String note) {\n\t\tthis.note = note;\n\t}\n\t\n\t\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/cwp/moneycharge/model/Tb_pay.java",
    "content": "package cwp.moneycharge.model;\n\nimport java.math.BigDecimal;\nimport java.text.DecimalFormat;\n\npublic class Tb_pay {\n\t// _id INTEGER NOT NULL PRIMARY KEY,no not null integer AUTOINCREMENT ,money\n\t// decimal,time varchar(10),\"\n\t// + \"type integer ,address varchar(100),mark varchar(200))\n\n\tprivate int _id;\n\tprivate int no;// 存储支出编号\n\tprivate double money;// 存储支出金额\n\tprivate String time;// 存储支出时间\n\tprivate int type;// 存储支出类别\n\tprivate String address;// 存储支出地点\n\tprivate String mark;// 存储支出备注\n\tprivate String photo;// 存储支出备注\n\n\tpublic Tb_pay() {\n\t\t// TODO Auto-generated constructor stub\n\t\tsuper();\n\t}\n\n\tpublic Tb_pay(int id, int no, double d, String time, int type,\n\t\t\tString address, String mark, String photo) {\n\t\tsuper();\n\t\tthis._id = id;\n\t\tthis.no = no;// 为支出编号赋值\n\t\tthis.money = d;// 为支出金额赋值\n\t\tthis.time = time;// 为支出时间赋值\n\t\tthis.type = type;// 为支出类别赋值\n\t\tthis.address = address;// 为支出地点赋值\n\t\tthis.mark = mark;// 为支出备注赋值\n\t\tthis.photo = photo;// 为支出备注赋值\n\n\t}\n\n\tpublic int get_id() {\n\t\treturn _id;\n\t}\n\n\tpublic void set_id(int _id) {\n\t\tthis._id = _id;\n\t}\n\n\tpublic void setNo(int no) {\n\t\tthis.no = no;\n\t}\n\n\tpublic int getNo() {\n\t\treturn no;\n\t}\n\n\tpublic double getMoney() {\n\t\treturn money;\n\t}\n\n\tpublic void setMoney(double money) {\n\t\tthis.money = money;\n\t}\n\n\tpublic String getMoney2() {\n\t\tdouble a = money;\n\t\tDecimalFormat df = new DecimalFormat(\"#.00\");\n\t\treturn df.format(a);\n\t}\n\n\tpublic String getTime() {\n\t\treturn time;\n\t}\n\n\tpublic void setTime(String time) {\n\t\tthis.time = time;\n\t}\n\n\tpublic int getType() {\n\t\treturn type;\n\t}\n\n\tpublic void setType(int type) {\n\t\tthis.type = type;\n\t}\n\n\tpublic String getAddress() {\n\t\treturn address;\n\t}\n\n\tpublic void setAddress(String address) {\n\t\tthis.address = address;\n\t}\n\n\tpublic String getMark() {\n\t\treturn mark;\n\t}\n\n\tpublic void setMark(String mark) {\n\t\tthis.mark = mark;\n\t}\n\n\tpublic String getPhoto() {\n\t\treturn photo;\n\t}\n\n\tpublic void setPhoto(String photo) {\n\t\tthis.photo = photo;\n\t}\n\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/java/cwp/moneycharge/model/Tb_ptype.java",
    "content": "package cwp.moneycharge.model;\n\npublic class Tb_ptype {\n\t//_id INTEGER  NOT NULL PRIMARY KEY,no not null integer AUTOINCREMENT ,typename varchar(50) \n\t\tprivate int  _id;//用户id\n\t\tprivate int no;//支出类型id\n\t\tprivate String typename;//支出类型名称\n\t\t\n\tpublic Tb_ptype() {\n\t\t// TODO Auto-generated constructor stub\n\t\tsuper();\n\t}\n\tpublic Tb_ptype(int id,int no,String typename) {\n\t\t// TODO Auto-generated constructor stub\n\t\tsuper();\n\t\tthis._id=id;\n\t\tthis.no=no;\n\t\tthis.typename=typename;\n\t}\n\tpublic int get_id() {\n\t\treturn _id;\n\t}\n\tpublic void set_id(int _id) {\n\t\tthis._id = _id;\n\t}\n\tpublic void set_No(int no) {\n\t\tthis.no = no;\n\t}\n\tpublic int getNo() {\n\t\treturn no;\n\t} \n\tpublic String getTypename() {\n\t\treturn typename;\n\t}\n\tpublic void setTypename(String typename) {\n\t\tthis.typename = typename;\n\t}\n}\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/anim/animation_1.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<translate xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:duration=\"300\"\n    android:fillAfter=\"true\"\n    android:fromXDelta=\"0\"\n    android:fromYDelta=\"0%p\"\n    android:toXDelta=\"0\"\n    android:toYDelta=\"50%p\" >\n\n</translate>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/anim/animation_2.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<alpha xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:duration=\"400\"\n    android:fromAlpha=\"0\"\n    android:toAlpha=\"1\" >\n\n</alpha>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/anim/fade_ins.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<alpha xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:duration=\"20\"\n    android:fromAlpha=\"0.0\"\n    android:toAlpha=\"1.0\" />\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/anim/hold.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n     <translate xmlns:android=\"http://schemas.android.com/apk/res/android\"\n       android:interpolator=\"@android:anim/accelerate_interpolator\"\n       android:fromXDelta=\"0\" android:toXDelta=\"0\"\n       android:duration=\"@android:integer/config_longAnimTime\" />\n-->\n<alpha xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:duration=\"1000\"\n    android:fromAlpha=\"0.0\"\n    android:interpolator=\"@android:anim/accelerate_interpolator\"\n    android:toAlpha=\"1.0\" />\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/anim/in_from_right.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- 上滑切入 -->\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:interpolator=\"@android:anim/accelerate_interpolator\" >\n\n    <translate\n        android:duration=\"500\"\n        android:fromXDelta=\"100%p\"\n        android:toXDelta=\"0%p\" />\n\n</set>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/anim/interpolator_cycle.xml",
    "content": "<cycleInterpolator xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:cycles=\"5\" />\n<!-- 动画连续多次运行，这里是5次 -->"
  },
  {
    "path": "MoneyCharge/app/src/main/res/anim/out_to_left.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- 上滑切入 -->\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:interpolator=\"@android:anim/accelerate_interpolator\" >\n\n    <translate\n        android:duration=\"500\"\n        android:fromXDelta=\"0%p\"\n        android:toXDelta=\"-100%p\" />\n\n</set>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/anim/push_bottom_in.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n    <translate\n        android:duration=\"1000\"\n        android:fromYDelta=\"100.0%p\"\n        android:toYDelta=\"0\" />\n\n</set>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/anim/push_bottom_in_2.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<translate xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:duration=\"20\"\n    android:fromYDelta=\"100%\"\n    android:interpolator=\"@android:anim/decelerate_interpolator\"\n    android:toYDelta=\"0\" />\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/anim/push_up_in.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- 上滑切入 -->\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:interpolator=\"@android:anim/decelerate_interpolator\" >\n\n    <translate\n        android:duration=\"300\"\n        android:fromXDelta=\"0%p\"\n        android:fromYDelta=\"100%p\"\n        android:toXDelta=\"0%p\"\n        android:toYDelta=\"0%p\" />\n\n</set>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/anim/push_up_out.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- 上滑切出 -->\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:interpolator=\"@android:anim/decelerate_interpolator\" >\n\n    <translate\n        android:duration=\"300\"\n        android:fromXDelta=\"0%p\"\n        android:fromYDelta=\"-100%p\"\n        android:toXDelta=\"0%p\"\n        android:toYDelta=\"0%p\" />\n\n</set>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/anim/shake.xml",
    "content": "<translate xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:duration=\"1000\"\n    android:fromXDelta=\"0\"\n    android:fromYDelta=\"0\"\n    android:interpolator=\"@anim/interpolator_cycle\"\n    android:toXDelta=\"-10\"\n    android:toYDelta=\"10\" >\n\n</translate>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/anim/shake_x.xml",
    "content": "<translate xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:duration=\"500\"\n    android:fromXDelta=\"0\"\n    android:interpolator=\"@anim/interpolator_cycle\"\n    android:toXDelta=\"10\" >\n\n</translate>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/anim/shake_y.xml",
    "content": "<translate xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:duration=\"500\"\n    android:fromYDelta=\"0\"\n    android:interpolator=\"@anim/interpolator_cycle\"\n    android:toYDelta=\"10\" >\n\n</translate>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/color/cost_text.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:state_pressed=\"true\" android:color=\"@color/black\"/>\n    <item android:state_selected=\"true\" android:color=\"@color/black\"/>\n    <item android:state_focused=\"true\" android:color=\"@color/black\"/>\n\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/color/tab_friendfeed_text.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_selected=\"true\" android:color=\"#FFFF00\"/>\n    <item android:state_focused=\"true\" android:color=\"#FF0000\"/>\n    <item android:state_pressed=\"true\" android:color=\"#FFFF00\"/>\n    <item android:color=\"#ffffff\"/>\n</selector>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/color/tab_home_text.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_selected=\"true\" android:color=\"#FFFF00\"/>\n    <item android:state_focused=\"true\" android:color=\"#FF0000\"/>\n    <item android:state_pressed=\"true\" android:color=\"#FFFF00\"/>\n    <item android:color=\"#ffffff\"/>    \n</selector>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/color/tab_more_text.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_selected=\"true\" android:color=\"#FFFF00\"/>\n    <item android:state_focused=\"true\" android:color=\"#FF0000\"/>\n    <item android:state_pressed=\"true\" android:color=\"#FFFF00\"/>\n    <item android:color=\"#ffffff\"/>    \n</selector>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/color/tab_myfeed_text.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_selected=\"true\" android:color=\"#FFFF00\"/>\n    <item android:state_focused=\"true\" android:color=\"#FF0000\"/>\n    <item android:state_pressed=\"true\" android:color=\"#FFFF00\"/>\n    <item android:color=\"#ffffff\"/>    \n</selector>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/addphoto_btn.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/expense_camera_btn_pressed\" android:state_pressed=\"true\"/>\n    <item android:drawable=\"@drawable/expense_camera_btn_normal\"/>\n\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/bg_border.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n    <solid android:color=\"#EEEEEE\" />\n\n    <stroke\n        android:width=\"3dp\"\n        android:color=\"#EEEEEE\" />\n\n    <corners android:radius=\"0dp\" />\n\n    <padding\n        android:bottom=\"0dp\"\n        android:left=\"0dp\"\n        android:right=\"0dp\"\n        android:top=\"0dp\" />\n\n</shape>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/bgd_relatly_line.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape\n\t\txmlns:android=\"http://schemas.android.com/apk/res/android\">\n\t\t<!-- 内部颜色 -->\n\t\t<solid\n\t\t\t\tandroid:color=\"#00000000\" />\n\t\t<!-- 边缘线条颜色 -->\n\t\t<stroke\n\t\t\t\tandroid:width=\"1dp\"\n\t\t\t\tandroid:color=\"#ff495a\" />\n\t\t<!-- 圆角的幅度 -->\n\t\t<corners\n\t\t\t\tandroid:topLeftRadius=\"0dip\"\n\t\t\t\tandroid:topRightRadius=\"0dip\"\n\t\t\t\tandroid:bottomLeftRadius=\"0dip\"\n\t\t\t\tandroid:bottomRightRadius=\"0dip\" />\n\n</shape>\n\n\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/bt_add_pic.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n\t\txmlns:android=\"http://schemas.android.com/apk/res/android\"\n\t\t\n\t\t>\n\t\t<item\n\t\t\t\tandroid:state_pressed=\"true\"\n\t\t\t\tandroid:drawable=\"@drawable/icon_addpic_focused\" />\n\t\t<item\n\t\t\t\tandroid:drawable=\"@drawable/icon_addpic_unfocused\" />\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/bt_nobgd.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <!-- pressed -->\n    <item android:state_pressed=\"true\">\n        <shape android:shape=\"rectangle\">\n            <gradient android:angle=\"270\" \n                android:endColor=\"#d1d1d1\" \n                android:startColor=\"#d1d1d1\" />\n\n            <corners android:bottomLeftRadius=\"0dip\" \n                android:bottomRightRadius=\"0dip\" \n                android:topLeftRadius=\"0dip\" \n                android:topRightRadius=\"0dip\" />\n        </shape></item>\n\n    <!-- focus -->\n    <item android:state_focused=\"true\"><shape>\n            <gradient android:angle=\"270\" \n                android:endColor=\"#d1d1d1\" \n                android:startColor=\"#d1d1d1\" />\n\n            <corners android:bottomLeftRadius=\"0dip\" \n                android:bottomRightRadius=\"0dip\" \n                android:topLeftRadius=\"0dip\" \n                android:topRightRadius=\"0dip\" />\n        </shape></item>\n        \n    <item><shape android:shape=\"rectangle\">\n            <solid android:color=\"#00000000\" />\n\n             <corners android:bottomLeftRadius=\"0dip\" \n                android:bottomRightRadius=\"0dip\" \n                android:topLeftRadius=\"0dip\" \n                android:topRightRadius=\"0dip\" />\n        </shape></item>\n\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/bt_queding.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n\t\txmlns:android=\"http://schemas.android.com/apk/res/android\"\n\t\t\n\t\t>\n\t\t<item\n\t\t\t\tandroid:state_pressed=\"true\"\n\t\t\t\tandroid:drawable=\"@drawable/icon_queding_focused\" />\n\t\t<item\n\t\t\t\tandroid:drawable=\"@drawable/icon_queding_unfocused\" />\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/bt_quxiao.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n\t\txmlns:android=\"http://schemas.android.com/apk/res/android\"\n\t\t\n\t\t>\n\t\t<item\n\t\t\t\tandroid:state_pressed=\"true\"\n\t\t\t\tandroid:drawable=\"@drawable/icon_quxiao_focused\" />\n\t\t<item\n\t\t\t\tandroid:drawable=\"@drawable/icon_quxiao_unfocused\" />\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/bt_shanchu.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n\t\txmlns:android=\"http://schemas.android.com/apk/res/android\"\n\t\t\n\t\t>\n\t\t<item\n\t\t\t\tandroid:state_pressed=\"true\"\n\t\t\t\tandroid:drawable=\"@drawable/icon_shanchu_focused\" />\n\t\t<item\n\t\t\t\tandroid:drawable=\"@drawable/icon_shanchu_unfocused\" />\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/btn_cancel_selector.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n  xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\t<item android:state_enabled=\"true\" android:state_pressed=\"true\" android:drawable=\"@drawable/btn_cancel_pressed\" />\n\t<item android:state_enabled=\"true\" android:drawable=\"@drawable/btn_cancel\" />\n</selector>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/btn_login_selector.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n  xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\t<item android:state_pressed=\"true\" android:drawable=\"@drawable/btn_login_pressed\" />\n\t<item android:drawable=\"@drawable/btn_login_normal\" />\n</selector>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/btn_press.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n    <corners android:radius=\"2dp\" />\n    <solid android:color=\"@color/btn_press_color\" />\n</shape>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/btn_selector.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_pressed=\"true\" android:drawable=\"@drawable/btn_press\" />\n    <item android:state_enabled=\"false\" android:drawable=\"@drawable/btn_press\" />\n    <item android:drawable=\"@drawable/btn_unpress\" />\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/btn_unpress.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n    <corners android:radius=\"2dp\" />\n    <solid android:color=\"@color/btn_unpress_color\" />\n</shape>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/chart_left_btn.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/left_buttom_pressd\" android:state_selected=\"true\"/>\n    <item android:drawable=\"@drawable/left_buttom\"/>\n\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/chart_right_btn.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/right_buttom_pressd\" android:state_pressed=\"true\"/>\n    <item android:drawable=\"@drawable/right_buttom\"/>\n\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/chart_silding_btn.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/left_sildselect\" android:state_pressed=\"true\"/>\n    <item android:drawable=\"@drawable/left_sild\"/>\n\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/checkbox.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <!-- checked -->\n    <item android:drawable=\"@drawable/chinapay_help_bank_list_icon1\" android:state_checked=\"true\"/>\n    <!-- default -->\n    <item android:drawable=\"@drawable/chinapay_help_bank_list_icon2\" android:state_checked=\"false\"/>\n\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/common_btn_green.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n  xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_pressed=\"true\" android:drawable=\"@drawable/skin_common_btn_green_pressed\" />\n    <item android:state_enabled=\"false\" android:drawable=\"@drawable/skin_common_btn_green_disable\" />\n    <item android:drawable=\"@drawable/skin_common_btn_green_normal\" />\n</selector>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/common_btn_red.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n  xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_enabled=\"true\" android:state_pressed=\"true\" android:drawable=\"@drawable/skin_common_btn_red_pressed\" />\n    <item android:state_enabled=\"true\" android:drawable=\"@drawable/skin_common_btn_red_unpressed\" />\n    <item android:state_enabled=\"false\" android:drawable=\"@drawable/skin_common_btn_red_disabled\" />\n</selector>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/corner_bdbdbd.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" >\r\n\r\n    <solid android:color=\"#bdbdbd\" />\r\n\r\n    <!-- 描边 ：边框宽度与颜色 -->\r\n    <stroke\r\n        android:width=\"0.5dip\"\r\n        android:color=\"#bababa\" />\r\n\r\n    <!--\r\n圆角的半径  也可以统一设置半径 android:radius=\"9dip\" \r\n\t\t android:topRightRadius=\"20dp\" 右上角  \r\n     \t android:bottomLeftRadius=\"20dp\"    右下角  \r\n         android:topLeftRadius=\"1dp\"    左上角  \r\n     \t android:bottomRightRadius=\"0dp\"    左下角\r\r\r\n    -->\r\n    <corners android:radius=\"0px\" />\r\n    <!--\r\n\t渐变 \r\n    <gradient\r\n        android:angle=\"270\"\r\n        android:endColor=\"#FFFFFF\"\r\n        android:startColor=\"#ff8c00\" />\r\r\r\n    -->\r\n\r\n</shape>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/corner_e0e0e0.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" >\r\n\r\n    <solid android:color=\"#e0e0e0\" />\r\n\r\n    <!-- 描边 ：边框宽度与颜色 -->\r\n    <stroke\r\n        android:width=\"0.5dip\"\r\n        android:color=\"#bababa\" />\r\n\r\n    <!--\r\n圆角的半径  也可以统一设置半径 android:radius=\"9dip\" \r\n\t\t android:topRightRadius=\"20dp\" 右上角  \r\n     \t android:bottomLeftRadius=\"20dp\"    右下角  \r\n         android:topLeftRadius=\"1dp\"    左上角  \r\n     \t android:bottomRightRadius=\"0dp\"    左下角\r\r\r\n    -->\r\n    <corners android:radius=\"0px\" />\r\n    <!--\r\n\t渐变 \r\n    <gradient\r\n        android:angle=\"270\"\r\n        android:endColor=\"#FFFFFF\"\r\n        android:startColor=\"#ff8c00\" />\r\r\r\n    -->\r\n\r\n</shape>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/corner_f2f2f2.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" >\r\n\r\n    <solid android:color=\"#ffffff\" />\r\n\r\n    <!-- 描边 ：边框宽度与颜色 -->\r\n    <stroke\r\n        android:width=\"0.5dip\"\r\n        android:color=\"#bababa\" />\r\n\r\n    <!--\r\n圆角的半径  也可以统一设置半径 android:radius=\"9dip\" \r\n\t\t android:topRightRadius=\"20dp\" 右上角  \r\n     \t android:bottomLeftRadius=\"20dp\"    右下角  \r\n         android:topLeftRadius=\"1dp\"    左上角  \r\n     \t android:bottomRightRadius=\"0dp\"    左下角\r\r\r\n    -->\r\n    <corners android:radius=\"0px\" />\r\n    <!--\r\n\t渐变 \r\n    <gradient\r\n        android:angle=\"270\"\r\n        android:endColor=\"#FFFFFF\"\r\n        android:startColor=\"#ff8c00\" />\r\r\r\n    -->\r\n\r\n</shape>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/dialog_bg.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n    \n\t<corners android:radius=\"2dp\" />\n\t<solid android:color=\"@color/dialog_bg\" />\n</shape>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/dialog_bottom_bg.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list\n  xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\t<item>\n\t\t<shape android:shape=\"rectangle\">\n\t\t\t<gradient android:startColor=\"@color/dialog_buttom_bg\" \n\t\t\t    android:endColor=\"@color/dialog_buttom_bg\" android:angle=\"0.0\" />\n\t\t\t<corners android:topLeftRadius=\"0.0dip\" android:topRightRadius=\"0.0dip\" android:bottomLeftRadius=\"5.0px\" android:bottomRightRadius=\"5.0px\" />\n\t\t</shape>\n\t</item>\n</layer-list>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/fb_send_btn_bg.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:drawable=\"@drawable/fb_send_btn_pressed\" android:state_pressed=\"true\"/>\n    <item android:drawable=\"@drawable/fb_send_btn_unpressed\" android:state_pressed=\"false\"/>\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/keyboard_key.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n  xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_pressed=\"true\" android:drawable=\"@drawable/corner_e0e0e0\" />\n    <item android:state_selected=\"true\" android:drawable=\"@drawable/corner_bdbdbd\" />\n    <item android:drawable=\"@drawable/corner_f2f2f2\" />\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/locate_btn.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/locate_pressed\" android:state_pressed=\"true\"/>\n    <item android:drawable=\"@drawable/locate\"/>\n\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/search_button_type.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n    <corners android:radius=\"5dp\" />\n\n    <padding\n        android:bottom=\"3dp\"\n        android:left=\"5dp\"\n        android:right=\"5dp\"\n        android:top=\"3dp\" />\n\n    <solid android:color=\"@android:color/white\" />\n\n</shape>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/selector.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>  \n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\" >  \n      \n    <!-- 按钮按下时显示bg_pressed图片 -->  \n    <item   \n        android:state_pressed=\"true\"  \n        android:drawable=\"@color/grey\"/>  \n      \n    <!-- 按钮抬起的时候显示bg_normal图片 -->  \n    \n  \n</selector> "
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/shadow.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n    <gradient\n        android:endColor=\"#33000000\"\n        android:centerColor=\"#11000000\"\n        android:startColor=\"#00000000\" />\n\n</shape>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/skin_color_button.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:state_enabled=\"false\" android:color=\"#ff777777\"/>\n    <item android:color=\"#ffffffff\"/>\n\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/tab_friendfeed_btn.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>  \n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">  \n  \n    <item android:drawable=\"@drawable/tab_myfeed_btn_pressed\" android:state_selected=\"true\"/>  \n    <item android:drawable=\"@drawable/tab_myfeed_btn_normal\"/>  \n  \n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/tab_home_btn.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>  \n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">  \n  \n    <item android:drawable=\"@drawable/tab_home_btn_pressed\" android:state_selected=\"true\"/>  \n    <item android:drawable=\"@drawable/tab_home_btn_normal\"/>  \n  \n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/tab_more_btn.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>  \n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">  \n  \n    <item android:drawable=\"@drawable/tab_more_btn_pressed\" android:state_selected=\"true\"/>  \n    <item android:drawable=\"@drawable/tab_more_btn_normal\"/>  \n  \n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/tab_myfeed_btn.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>  \n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">  \n  \n    <item android:drawable=\"@drawable/tab_friendfeed_btn_pressed\" android:state_selected=\"true\"/>  \n    <item android:drawable=\"@drawable/tab_friendfeed_btn_normal\"/>  \n  \n</selector>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/text_while.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:state_pressed=\"true\" android:color=\"#5aaef0\"/>\n    <item android:state_focused=\"true\" android:color=\"#5afea0\"/>\n    <item android:color=\"#ffffff\"/> \n\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable/welcome_bg.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<bitmap android:src=\"@drawable/application_bg_welcome\" android:tileMode=\"repeat\"\n  xmlns:android=\"http://schemas.android.com/apk/res/android\" />\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable-hdpi/common_lv_item_for_metadata_bg.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n  xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_window_focused=\"false\" android:drawable=\"@drawable/common_lv_item_for_metadata_normal\" />\n    <item android:state_pressed=\"true\" android:drawable=\"@color/transparent\" />\n    <item android:state_focused=\"true\" android:state_pressed=\"false\" android:drawable=\"@color/transparent\" />\n    <item android:state_selected=\"true\" android:drawable=\"@color/transparent\" />\n    <item android:drawable=\"@drawable/common_lv_item_for_metadata_normal\" />\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable-hdpi/common_lv_item_higher_bg.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n  xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_window_focused=\"false\" android:drawable=\"@drawable/common_lv_item_for_metadata_normal\" />\n    <item android:state_pressed=\"true\" android:drawable=\"@color/transparent\" />\n    <item android:state_focused=\"true\" android:state_pressed=\"false\" android:drawable=\"@drawable/common_lv_item_higher_selected\" />\n    <item android:state_selected=\"true\" android:drawable=\"@color/transparent\" />\n    <item android:drawable=\"@drawable/common_lv_item_for_metadata_normal\" />\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable-hdpi/common_toolbar_btn.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n  xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_window_focused=\"false\" android:drawable=\"@drawable/common_titlebar_common_btn_normal\" />\n    <item android:state_pressed=\"true\" android:drawable=\"@drawable/common_titlebar_common_btn_selected\" />\n    <item android:state_focused=\"true\" android:state_pressed=\"false\" android:drawable=\"@drawable/common_titlebar_common_btn_normal\" />\n    <item android:drawable=\"@drawable/common_titlebar_common_btn_normal\" />\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable-hdpi/common_toolbar_btn_small.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n  xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_window_focused=\"false\" android:drawable=\"@drawable/common_btn_bg_normal\" />\n    <item android:state_pressed=\"true\" android:drawable=\"@drawable/common_btn_bg_pressed\" />\n    <item android:state_focused=\"true\" android:state_pressed=\"false\" android:drawable=\"@drawable/common_btn_bg_normal\" />\n    <item android:drawable=\"@drawable/common_btn_bg_normal\" />\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable-hdpi/form_row_input_middle.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n  xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_pressed=\"true\" android:drawable=\"@drawable/transcolor\" />\n    <item android:state_focused=\"true\" android:state_pressed=\"false\" android:drawable=\"@drawable/transcolor\" />\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable-hdpi/form_row_input_middle_short_left.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n  xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_window_focused=\"false\" android:drawable=\"@color/transparent\" />\n    <item android:state_pressed=\"true\" android:drawable=\"@drawable/form_row_input_middle_short_left_seleted\" />\n    <item android:state_focused=\"true\" android:state_pressed=\"false\" android:drawable=\"@drawable/form_row_input_middle_short_left_seleted\" />\n    <item android:drawable=\"@color/transparent\" />\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable-hdpi/form_row_input_middle_short_right.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n  xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_window_focused=\"false\" android:drawable=\"@color/transparent\" />\n    <item android:state_pressed=\"true\" android:drawable=\"@drawable/form_row_input_middle_short_right_seleted\" />\n    <item android:state_focused=\"true\" android:state_pressed=\"false\" android:drawable=\"@drawable/form_row_input_middle_short_right_seleted\" />\n    <item android:drawable=\"@color/transparent\" />\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable-hdpi/form_row_input_top.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n  xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_pressed=\"true\" android:drawable=\"@drawable/transcolor\" />\n    <item android:state_focused=\"true\" android:state_pressed=\"false\" android:drawable=\"@drawable/transcolor\" />\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable-hdpi/income_tab_btn_radio.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n  xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_checked=\"false\" android:drawable=\"@drawable/report_bar_chart_tab_indicator_bg_normal\" />\n    <item android:state_checked=\"true\" android:drawable=\"@drawable/report_bar_chart_tab_indicator_bg_selected\" />\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable-hdpi/main_add_expense_quickly.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n  xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_window_focused=\"false\" android:drawable=\"@drawable/main_add_expense_quickly_new_normal\" />\n    <item android:state_pressed=\"true\" android:drawable=\"@drawable/main_add_expense_quickly_new_selected\" />\n    <item android:state_focused=\"true\" android:state_pressed=\"false\" android:drawable=\"@drawable/main_add_expense_quickly_new_selected\" />\n    <item android:drawable=\"@drawable/main_add_expense_quickly_new_normal\" />\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable-hdpi/main_row_stat.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n  xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_window_focused=\"false\" android:drawable=\"@drawable/main_row_stat_normal\" />\n    <item android:state_pressed=\"true\" android:drawable=\"@drawable/main_row_stat_pressed\" />\n    <item android:state_focused=\"true\" android:state_pressed=\"false\" android:drawable=\"@drawable/main_row_stat_focused\" />\n    <item android:drawable=\"@drawable/main_row_stat_normal\" />\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/drawable-hdpi/payout_tab_btn_radio.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n  xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_checked=\"false\" android:drawable=\"@drawable/report_pie_chart_tab_indicator_bg_normal\" />\n    <item android:state_checked=\"true\" android:drawable=\"@drawable/report_pie_chart_tab_indicator_bg_selected\" />\n</selector>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/about.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<TableLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"wrap_content\"\n    android:layout_margin=\"10dp\"\n    android:background=\"#820000\"\n    android:stretchColumns=\"1\" >\n\n    <LinearLayout\n        android:id=\"@+id/about_top\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"30dp\"\n        android:background=\"#e6e6e6\"\n        android:orientation=\"vertical\" >\n    </LinearLayout>\n\n    <TableRow\n        android:layout_height=\"60dp\"\n        android:layout_marginTop=\"3dp\"\n        android:background=\"#e6e6e6\" >\n\n        <TextView\n            android:layout_height=\"match_parent\"\n            android:layout_marginBottom=\"1dp\"\n            android:layout_marginLeft=\"1dp\"\n            android:layout_marginTop=\"1dp\"\n            android:background=\"#ffffff\"\n            android:paddingBottom=\"13dp\"\n            android:paddingLeft=\"15dp\"\n            android:paddingTop=\"13dp\"\n            android:text=\"当前用户\"\n            android:textColor=\"#500000\"\n            android:textSize=\"16sp\" />\n\n        <TextView\n            android:id=\"@+id/useracc\"\n            android:layout_height=\"match_parent\"\n            android:layout_marginBottom=\"1dp\"\n            android:layout_marginRight=\"1dp\"\n            android:layout_marginTop=\"1dp\"\n            android:background=\"#ffffff\"\n            android:gravity=\"right\"\n            android:paddingBottom=\"15dp\"\n            android:paddingRight=\"15dp\"\n            android:paddingTop=\"15dp\"\n            android:text=\"默认用户\"\n            android:textColor=\"#464646\"\n            android:textSize=\"14sp\" />\n    </TableRow>\n\n    <TableRow\n        android:layout_height=\"fill_parent\"\n        android:background=\"#e6e6e6\" >\n\n        <TextView\n            android:layout_height=\"match_parent\"\n            android:layout_marginBottom=\"1dp\"\n            android:layout_marginLeft=\"1dp\"\n            android:layout_marginTop=\"1dp\"\n            android:background=\"#ffffff\"\n            android:paddingBottom=\"13dp\"\n            android:paddingLeft=\"15dp\"\n            android:paddingTop=\"13dp\"\n            android:text=\"系统用户个数\"\n            android:textColor=\"#500000\"\n            android:textSize=\"16sp\" />\n\n        <TextView\n            android:id=\"@+id/countuser\"\n            android:layout_height=\"match_parent\"\n            android:layout_marginBottom=\"1dp\"\n            android:layout_marginRight=\"1dp\"\n            android:layout_marginTop=\"1dp\"\n            android:background=\"#ffffff\"\n            android:gravity=\"right\"\n            android:paddingBottom=\"13dp\"\n            android:paddingRight=\"15dp\"\n            android:paddingTop=\"9dp\"\n            android:text=\"1个\"\n            android:textColor=\"#464646\"\n            android:textSize=\"14sp\" />\n    </TableRow>\n\n    <TableRow\n        android:layout_height=\"fill_parent\"\n        android:background=\"#e6e6e6\" >\n\n        <TextView\n            android:layout_height=\"match_parent\"\n            android:layout_marginBottom=\"1dp\"\n            android:layout_marginLeft=\"1dp\"\n            android:layout_marginTop=\"1dp\"\n            android:background=\"#ffffff\"\n            android:paddingBottom=\"13dp\"\n            android:paddingLeft=\"15dp\"\n            android:paddingTop=\"13dp\"\n            android:text=\"支出记录\"\n            android:textColor=\"#500000\"\n            android:textSize=\"16sp\" />\n\n        <TextView\n            android:id=\"@+id/countpay\"\n            android:layout_height=\"match_parent\"\n            android:layout_marginBottom=\"1dp\"\n            android:layout_marginRight=\"1dp\"\n            android:layout_marginTop=\"1dp\"\n            android:background=\"#ffffff\"\n            android:gravity=\"right\"\n            android:paddingBottom=\"13dp\"\n            android:paddingRight=\"15dp\"\n            android:paddingTop=\"9dp\"\n            android:text=\"0条\"\n            android:textColor=\"#464646\"\n            android:textSize=\"14sp\" />\n    </TableRow>\n\n    <TableRow\n        android:layout_height=\"fill_parent\"\n        android:background=\"#e6e6e6\" >\n\n        <TextView\n            android:layout_height=\"match_parent\"\n            android:layout_marginBottom=\"1dp\"\n            android:layout_marginLeft=\"1dp\"\n            android:layout_marginTop=\"1dp\"\n            android:background=\"#ffffff\"\n            android:paddingBottom=\"13dp\"\n            android:paddingLeft=\"15dp\"\n            android:paddingTop=\"13dp\"\n            android:text=\"收入记录\"\n            android:textColor=\"#500000\"\n            android:textSize=\"16sp\" />\n\n        <TextView\n            android:id=\"@+id/countincome\"\n            android:layout_height=\"match_parent\"\n            android:layout_marginBottom=\"1dp\"\n            android:layout_marginRight=\"1dp\"\n            android:layout_marginTop=\"1dp\"\n            android:background=\"#ffffff\"\n            android:gravity=\"right\"\n            android:paddingBottom=\"13dp\"\n            android:paddingRight=\"15dp\"\n            android:paddingTop=\"9dp\"\n            android:text=\"0条\"\n            android:textColor=\"#464646\"\n            android:textSize=\"14sp\" />\n    </TableRow>\n\n    <TableRow\n        android:layout_height=\"fill_parent\"\n        android:background=\"#e6e6e6\" >\n\n        <TextView\n            android:layout_height=\"match_parent\"\n            android:layout_marginBottom=\"1dp\"\n            android:layout_marginLeft=\"1dp\"\n            android:layout_marginTop=\"1dp\"\n            android:background=\"#ffffff\"\n            android:paddingBottom=\"13dp\"\n            android:paddingLeft=\"15dp\"\n            android:paddingTop=\"13dp\"\n            android:text=\"手势密码\"\n            android:textColor=\"#500000\"\n            android:textSize=\"16sp\" />\n\n        <TextView\n            android:id=\"@+id/gesturepw\"\n            android:layout_height=\"match_parent\"\n            android:layout_marginBottom=\"1dp\"\n            android:layout_marginRight=\"1dp\"\n            android:layout_marginTop=\"1dp\"\n            android:background=\"#ffffff\"\n            android:gravity=\"right\"\n            android:paddingBottom=\"13dp\"\n            android:paddingRight=\"15dp\"\n            android:paddingTop=\"9dp\"\n            android:text=\"关\"\n            android:textColor=\"#464646\"\n            android:textSize=\"14sp\" />\n    </TableRow>\n\n    <TableRow\n        android:id=\"@+id/gesturepwmd\"\n        android:layout_height=\"fill_parent\"\n        android:background=\"#e6e6e6\"\n        android:visibility=\"gone\" >\n\n        <TextView\n            android:id=\"@+id/gesturepwmdtext\"\n            android:layout_height=\"match_parent\"\n            android:layout_marginBottom=\"1dp\"\n            android:layout_marginLeft=\"1dp\"\n            android:layout_marginTop=\"1dp\"\n            android:background=\"#ffffff\"\n            android:paddingBottom=\"13dp\"\n            android:paddingLeft=\"15dp\"\n            android:paddingTop=\"13dp\"\n            android:text=\"修改手势密码\"\n            android:textColor=\"#500000\"\n            android:textSize=\"16sp\" />\n\n        <TextView\n            android:layout_height=\"match_parent\"\n            android:layout_marginBottom=\"1dp\"\n            android:layout_marginRight=\"1dp\"\n            android:layout_marginTop=\"1dp\"\n            android:background=\"#ffffff\"\n            android:drawableRight=\"@drawable/hint\"\n            android:gravity=\"right\"\n            android:paddingBottom=\"13dp\"\n            android:paddingRight=\"15dp\"\n            android:paddingTop=\"9dp\"\n            android:textColor=\"#464646\"\n            android:textSize=\"14sp\" />\n    </TableRow>\n\n    <TableRow\n        android:layout_height=\"fill_parent\"\n        android:background=\"#e6e6e6\" >\n\n        <TextView\n            android:layout_height=\"match_parent\"\n            android:layout_marginBottom=\"1dp\"\n            android:layout_marginLeft=\"1dp\"\n            android:layout_marginTop=\"1dp\"\n            android:background=\"#ffffff\"\n            android:paddingBottom=\"13dp\"\n            android:paddingLeft=\"15dp\"\n            android:paddingTop=\"13dp\"\n            android:text=\"发送错误日志功能\"\n            android:textColor=\"#500000\"\n            android:textSize=\"16sp\" />\n\n        <TextView\n            android:id=\"@+id/sendlog\"\n            android:layout_height=\"match_parent\"\n            android:layout_marginBottom=\"1dp\"\n            android:layout_marginRight=\"1dp\"\n            android:layout_marginTop=\"1dp\"\n            android:background=\"#ffffff\"\n            android:gravity=\"right\"\n            android:paddingBottom=\"13dp\"\n            android:paddingRight=\"15dp\"\n            android:paddingTop=\"9dp\"\n            android:text=\"关\"\n            android:textColor=\"#464646\"\n            android:textSize=\"14sp\" />\n    </TableRow>\n\n    <TableRow\n        android:layout_height=\"fill_parent\"\n        android:background=\"#e6e6e6\" >\n\n        <TextView\n            android:layout_height=\"match_parent\"\n            android:layout_marginBottom=\"1dp\"\n            android:layout_marginLeft=\"1dp\"\n            android:layout_marginTop=\"1dp\"\n            android:background=\"#ffffff\"\n            android:paddingBottom=\"13dp\"\n            android:paddingLeft=\"15dp\"\n            android:paddingTop=\"13dp\"\n            android:text=\"用户反馈\"\n            android:textColor=\"#500000\"\n            android:textSize=\"16sp\" />\n\n        <TextView\n            android:id=\"@+id/feedback\"\n            android:layout_height=\"match_parent\"\n            android:layout_marginBottom=\"1dp\"\n            android:layout_marginRight=\"1dp\"\n            android:layout_marginTop=\"1dp\"\n            android:background=\"#ffffff\"\n            android:gravity=\"right\"\n            android:paddingBottom=\"13dp\"\n            android:paddingRight=\"15dp\"\n            android:paddingTop=\"9dp\"\n            android:text=\"点此进入\"\n            android:textColor=\"#464646\"\n            android:textSize=\"14sp\" />\n    </TableRow>\n\n    <TableRow\n        android:id=\"@+id/description\"\n        android:layout_height=\"fill_parent\"\n        android:layout_marginBottom=\"2dp\"\n        android:background=\"#e6e6e6\" >\n\n        <TextView\n            android:layout_height=\"match_parent\"\n            android:layout_marginLeft=\"1dp\"\n            android:layout_marginTop=\"1dp\"\n            android:background=\"#ffffff\"\n            android:paddingBottom=\"13dp\"\n            android:paddingLeft=\"15dp\"\n            android:paddingTop=\"13dp\"\n            android:text=\"系统使用说明书\"\n            android:textColor=\"#500000\"\n            android:textSize=\"16sp\" />\n\n        <TextView\n            android:layout_height=\"match_parent\"\n            android:layout_marginRight=\"1dp\"\n            android:layout_marginTop=\"1dp\"\n            android:background=\"#ffffff\"\n            android:drawableRight=\"@drawable/hint\"\n            android:gravity=\"right\"\n            android:paddingBottom=\"13dp\"\n            android:paddingRight=\"15dp\"\n            android:paddingTop=\"9dp\"\n            android:textColor=\"#464646\"\n            android:textSize=\"14sp\" />\n    </TableRow>\n\n    <TableRow\n        android:layout_height=\"60dp\"\n        android:background=\"#e6e6e6\" >\n\n        <TextView\n            android:layout_height=\"match_parent\"\n            android:layout_marginBottom=\"1dp\"\n            android:layout_marginLeft=\"1dp\"\n            android:background=\"#ffffff\"\n            android:paddingBottom=\"13dp\"\n            android:paddingLeft=\"15dp\"\n            android:paddingTop=\"13dp\"\n            android:text=\"系统版本\"\n            android:textColor=\"#500000\"\n            android:textSize=\"16sp\" />\n\n        <TextView\n            android:id=\"@+id/app_version\"\n            android:layout_height=\"match_parent\"\n            android:layout_marginBottom=\"1dp\"\n            android:layout_marginRight=\"1dp\"\n            android:background=\"#ffffff\"\n            android:gravity=\"right\"\n            android:paddingBottom=\"15dp\"\n            android:paddingRight=\"15dp\"\n            android:paddingTop=\"15dp\"\n            android:text=\"1.0.0.1\"\n            android:textColor=\"#464646\"\n            android:textSize=\"14sp\" />\n    </TableRow>\n\n    <TableRow\n        android:layout_height=\"60dp\"\n        android:layout_marginBottom=\"3dp\"\n        android:background=\"#e6e6e6\" >\n\n        <TextView\n            android:layout_height=\"match_parent\"\n            android:layout_marginBottom=\"1dp\"\n            android:layout_marginLeft=\"1dp\"\n            android:background=\"#ffffff\"\n            android:paddingBottom=\"13dp\"\n            android:paddingLeft=\"15dp\"\n            android:paddingTop=\"13dp\"\n            android:textColor=\"#500000\"\n            android:textSize=\"16sp\" />\n\n        <TextView\n            android:id=\"@+id/updateapp\"\n            android:layout_height=\"match_parent\"\n            android:layout_marginBottom=\"1dp\"\n            android:layout_marginRight=\"1dp\"\n            android:background=\"#ffffff\"\n            android:gravity=\"right\"\n            android:paddingBottom=\"15dp\"\n            android:paddingRight=\"15dp\"\n            android:paddingTop=\"15dp\"\n            android:text=\"检查更新\"\n            android:textColor=\"#464646\"\n            android:textSize=\"14sp\" />\n    </TableRow>\n\n</TableLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/account.xml",
    "content": "<LinearLayout  xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n\tandroid:layout_width=\"fill_parent\"\n\tandroid:layout_height=\"wrap_content\" \n\tandroid:orientation=\"vertical\"\n\tandroid:gravity=\"center_horizontal\">\n\t<TextView android:layout_width=\"fill_parent\"\n\t    android:layout_height=\"fill_parent\"\n\t    android:layout_marginTop=\"10dp\"\n\t    android:textColor=\"#6e6e6e\"\n\t    android:text=\"目前登陆的用户为：\"\n\t    android:textSize=\"16sp\"\n\t    android:gravity=\"left\">\n\t</TextView>\n\t<TextView \n\t    android:id=\"@+id/usernow\"\n\t    android:layout_width=\"fill_parent\"\n\t    android:layout_height=\"wrap_content\"\n\t    android:layout_marginTop=\"5dp\"\n\t    android:layout_marginBottom=\"10dp\"\n\t    android:textColor=\"#a00000\" \n\t    android:textSize=\"18sp\"\n\t    android:gravity=\"center_horizontal\">\n\t</TextView>\n\t<Button   \n\t    android:id=\"@+id/accregister\"\n        android:layout_width=\"fill_parent\"  \n        android:layout_height=\"wrap_content\"  \n        android:text=\"用户注册\"   \n        android:layout_marginTop=\"20dp\" \n        android:layout_marginLeft=\"20dp\"\n        android:layout_marginRight=\"20dp\"\n\t    android:background=\"#21a0a0\" \n\t\tandroid:textColor=\"#ffffff\"\n\t    android:textSize=\"22sp\"/> \n\t<Button  android:id=\"@+id/acclogin\" \n        android:layout_width=\"fill_parent\"  \n        android:layout_height=\"wrap_content\"  \n        android:text=\"切换用户\"    \n        android:layout_marginTop=\"10dp\"\n        android:layout_marginLeft=\"20dp\"\n        android:layout_marginRight=\"20dp\"\n\t    android:background=\"#21a0a0\" \n\t\tandroid:textColor=\"#ffffff\"\n\t    android:textSize=\"22sp\"/> \n\t<Button   \n\t    android:id=\"@+id/accchange\"\n        android:layout_width=\"fill_parent\"  \n        android:layout_height=\"wrap_content\"  \n        android:text=\"修改用户名密码\"   \n        android:layout_marginTop=\"10dp\"\n        android:layout_marginLeft=\"20dp\"\n        android:layout_marginRight=\"20dp\"\n\t    android:background=\"#21a0a0\" \n\t\tandroid:textColor=\"#ffffff\"\n\t    android:textSize=\"22sp\"/> \n\t<Button   \n\t    android:id=\"@+id/alldelete\"\n        android:layout_width=\"fill_parent\"  \n        android:layout_height=\"wrap_content\"  \n        android:text=\"删除当前用户及所有数据\"   \n        android:layout_marginTop=\"10dp\"\n        android:layout_marginLeft=\"20dp\"\n        android:layout_marginRight=\"20dp\"\n\t    android:background=\"#21a0a0\" \n\t\tandroid:textColor=\"#ffffff\"\n\t    android:textSize=\"22sp\"/> \n    <Button   \n\t    android:id=\"@+id/accadminlogin\"\n        android:layout_width=\"fill_parent\"  \n        android:layout_height=\"wrap_content\"  \n        android:text=\"使用默认用户登录\"   \n        android:layout_marginTop=\"10dp\"\n        android:layout_marginLeft=\"20dp\"\n        android:layout_marginRight=\"20dp\" \n\t\tandroid:textColor=\"#ffffff\"\n\t    android:textSize=\"22sp\"/> \n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/activity_custom.xml",
    "content": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"fill_parent\" >\n\n    <LinearLayout\n        android:id=\"@+id/fb_top\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"20dp\"\n        android:background=\"@drawable/fb_send_btn_bg\"\n        android:orientation=\"vertical\"\n        android:visibility=\"gone\" >\n    </LinearLayout>\n\n    <RelativeLayout\n        android:id=\"@+id/actionbar\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_below=\"@+id/fb_top\"\n        android:background=\"@drawable/fb_send_btn_bg\"\n        android:paddingBottom=\"5dip\"\n        android:paddingLeft=\"10dip\"\n        android:paddingRight=\"10dip\"\n        android:paddingTop=\"5dip\" >\n\n        <ImageView\n            android:id=\"@+id/example_left2\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentLeft=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:src=\"@drawable/show_trans_back_arrow\" />\n\n        <ImageView\n            android:id=\"@+id/example_right2\"\n            android:layout_width=\"30dp\"\n            android:layout_height=\"30dp\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_centerVertical=\"true\" />\n\n        <TextView\n            android:id=\"@+id/example_center\"\n            style=\"@style/TextView.Middle.White\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_centerHorizontal=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:text=\"用户反馈\"\n            android:textColor=\"@android:color/white\" />\n    </RelativeLayout>\n\n    <LinearLayout\n        android:id=\"@+id/fb_input_layout\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:orientation=\"vertical\" >\n\n        <View\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"@dimen/umeng_fb_item_line_height\"\n            android:background=\"@color/umeng_fb_line\" />\n\n        <RelativeLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:clickable=\"true\"\n            android:focusable=\"true\"\n            android:focusableInTouchMode=\"true\"\n            android:orientation=\"horizontal\"\n            android:paddingBottom=\"8dp\"\n            android:paddingLeft=\"15dp\"\n            android:paddingRight=\"15dp\"\n            android:paddingTop=\"8dp\" >\n\n            <Button\n                android:id=\"@+id/fb_send_btn\"\n                android:layout_width=\"70dp\"\n                android:layout_height=\"33dp\"\n                android:layout_alignParentEnd=\"true\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:background=\"@drawable/fb_send_btn_bg\"\n                android:gravity=\"center\"\n                android:text=\"发送\"\n                android:textColor=\"@android:color/white\"\n                android:textSize=\"16sp\" />\n\n            <EditText\n                android:id=\"@+id/fb_send_content\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"10dp\"\n                android:layout_toLeftOf=\"@id/fb_send_btn\"\n                android:layout_toStartOf=\"@id/fb_send_btn\"\n                android:background=\"@drawable/fb_input_bg\"\n                android:hint=\"意见反馈\"\n                android:maxLines=\"5\"\n                android:minHeight=\"33dp\"\n                android:paddingLeft=\"10dp\"\n                android:paddingRight=\"10dp\"\n                android:scrollbars=\"vertical\"\n                android:textSize=\"16sp\" />\n        </RelativeLayout>\n    </LinearLayout>\n\n    <android.support.v4.widget.SwipeRefreshLayout\n        android:id=\"@+id/fb_reply_refresh\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:layout_above=\"@id/fb_input_layout\"\n        android:layout_below=\"@+id/actionbar\" >\n\n        <ListView\n            android:id=\"@+id/fb_reply_list\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:divider=\"@null\"\n            android:listSelector=\"#00000000\" >\n        </ListView>\n    </android.support.v4.widget.SwipeRefreshLayout>\n\n</RelativeLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/activity_image_bucket.xml",
    "content": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"#f1eff5\"\n    android:orientation=\"vertical\" >\n\n    <RelativeLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"60dp\"\n        android:background=\"#ff495a\" >\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_centerInParent=\"true\"\n            android:text=\"相册\"\n            android:textColor=\"#ffffff\"\n            android:textSize=\"20sp\" />\n\n        <TextView\n             android:id=\"@+id/gridview_cancel\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"40dp\"\n            android:gravity=\"center\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:layout_marginRight=\"8dp\"         \n            android:textColor=\"@drawable/text_while\"\n            android:text=\"取消\"\n            android:textSize=\"20sp\" />\n              \n    </RelativeLayout>\n\n    <GridView\n        android:id=\"@+id/gridview\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:layout_margin=\"10dp\"\n        android:horizontalSpacing=\"20dp\"\n        android:numColumns=\"2\"\n        android:scrollbars=\"none\"\n        android:verticalSpacing=\"20dp\" >\n    </GridView>\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/activity_image_grid.xml",
    "content": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"#ffffff\"\n    android:orientation=\"vertical\" >\n\n    <RelativeLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"60dp\"\n        android:background=\"#ff495a\" >\n\n        <ImageView\n            android:id=\"@+id/bt_back\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentLeft=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:layout_marginLeft=\"13dp\"\n            android:background=\"@drawable/btn_back2\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_centerInParent=\"true\"\n            android:text=\"相册\"\n            android:textColor=\"#ffffff\"\n            android:textSize=\"20sp\" />\n\n        <TextView\n            android:id=\"@+id/bt_cancel\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"40dp\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:layout_marginRight=\"8dp\"\n            android:gravity=\"center\"\n            android:text=\"取消\"\n            android:textColor=\"@drawable/text_while\"\n            android:textSize=\"20sp\" />\n    </RelativeLayout>\n\n    <LinearLayout\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"fill_parent\"\n        android:orientation=\"vertical\" >\n\n        <GridView\n            android:id=\"@+id/gridview\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"490dp\"\n            android:layout_margin=\"8dp\"\n            android:horizontalSpacing=\"8dp\"\n            android:numColumns=\"3\"\n            android:scrollbars=\"none\"\n            android:verticalSpacing=\"8dp\" >\n        </GridView>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:orientation=\"vertical\" >\n\n            <TextView\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"1dp\"\n                android:background=\"#ff495a\" />\n\n            <Button\n                android:id=\"@+id/bt\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:background=\"@drawable/bt_nobgd\"\n                android:text=\"完成\"\n                android:textColor=\"#ff495a\"\n                android:textSize=\"20sp\" />\n        </LinearLayout>\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/activity_index.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<GridView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:id=\"@+id/gvInfo\"\n\tandroid:layout_width=\"fill_parent\"\n\tandroid:layout_height=\"fill_parent\"\n\tandroid:columnWidth=\"90dp\"\n\tandroid:numColumns=\"auto_fit\"\n\tandroid:verticalSpacing=\"10dp\"\n\tandroid:horizontalSpacing=\"10dp\"\n\tandroid:stretchMode=\"spacingWidthUniform\"\n\tandroid:gravity=\"center\"\n\t android:listSelector=\"@drawable/selector\"\n\t android:cacheColorHint=\"@android:color/transparent\"\n/>\n\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/activity_main.xml",
    "content": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"fill_parent\">\n\n    <FrameLayout\n        android:id=\"@+id/frame_content\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_above=\"@+id/frame_foot\"\n        android:layout_alignParentLeft=\"true\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_alignParentTop=\"true\" >\n    </FrameLayout>\n\n    <FrameLayout\n        android:id=\"@+id/frame_foot\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"66dp\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_alignParentLeft=\"true\"\n        android:background=\"@drawable/toolbar_bg_normal\" >\n    </FrameLayout>\n\n</RelativeLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/activity_photo.xml",
    "content": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\" >\n\n    <android.support.v4.view.ViewPager\n        android:id=\"@+id/viewpager\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\" >\n    </android.support.v4.view.ViewPager>\n\n    <RelativeLayout\n        android:id=\"@+id/photo_relativeLayout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"60dp\"\n        android:layout_alignParentBottom=\"true\" >\n\n        <Button\n            android:id=\"@+id/photo_bt_exit\"  \n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            android:layout_alignParentLeft=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:background=\"@drawable/bt_quxiao\" />\n\n        <Button\n            android:id=\"@+id/photo_bt_del\"\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            android:layout_centerInParent=\"true\"\n            android:background=\"@drawable/bt_shanchu\" />\n\n        <Button\n            android:id=\"@+id/photo_bt_enter\"\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:background=\"@drawable/bt_queding\" />\n    </RelativeLayout>\n\n</RelativeLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/activity_selectimg.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\" >\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:background=\"#ffffff\"\n        android:orientation=\"vertical\" >\n\n        <RelativeLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"60dp\"\n            android:background=\"#ff495a\" >\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_centerInParent=\"true\"\n                android:text=\"添加图片\"\n                android:textColor=\"#ffffff\"\n                android:textSize=\"20sp\" />\n\n            <TextView\n                android:id=\"@+id/activity_selectimg_send\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"40dp\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"8dp\"\n                android:gravity=\"center\"\n                android:text=\"确定\"\n                android:textColor=\"@drawable/text_while\"\n                android:textSize=\"20sp\" />\n        </RelativeLayout>\n\n        <GridView\n            android:id=\"@+id/noScrollgridview\"\n            android:layout_width=\"290dp\"\n            android:layout_height=\"300dp\"\n            android:layout_gravity=\"center_horizontal\"\n            android:layout_marginBottom=\"20dp\"\n            android:layout_marginTop=\"20dp\"\n            android:horizontalSpacing=\"3dp\"\n            android:numColumns=\"4\"\n            android:scrollbars=\"none\"\n            android:verticalSpacing=\"5dp\" >\n        </GridView>\n    </LinearLayout>\n\n</RelativeLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/add.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    style=\"@style/common_bg\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"fill_parent\" >\n\n    <LinearLayout\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginBottom=\"10dp\"\n        android:orientation=\"vertical\" >\n\n        <LinearLayout\n            android:id=\"@+id/top\"\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"20dp\"\n            android:background=\"@color/fragment2\"\n            android:orientation=\"vertical\"\n            android:visibility=\"gone\" >\n        </LinearLayout>\n\n        <RelativeLayout\n            android:id=\"@+id/actionbar\"\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"wrap_content\"\n            android:background=\"@color/fragment2\"\n            android:paddingBottom=\"5dip\"\n            android:paddingLeft=\"5dp\"\n            android:paddingRight=\"10dip\" >\n\n            <ImageView\n                android:id=\"@+id/example_left3\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentLeft=\"true\"\n                android:src=\"@drawable/left_back\" />\n\n            <ImageView\n                android:id=\"@+id/example_right3\"\n                android:layout_width=\"30dp\"\n                android:layout_height=\"30dp\"\n                android:layout_alignParentRight=\"true\" />\n\n            <TextView\n                style=\"@style/TextView.Middle.White\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_centerHorizontal=\"true\"\n                android:layout_marginTop=\"10dp\"\n                android:text=\"记一笔\"\n                android:textColor=\"@android:color/black\"\n                android:textSize=\"20.0sp\" />\n        </RelativeLayout>\n\n        <LinearLayout\n            android:id=\"@+id/main_ly\"\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"fill_parent\"\n            android:orientation=\"vertical\" >\n\n            <RadioGroup\n                android:id=\"@+id/trans_type_tab_rg\"\n                android:layout_width=\"144dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_gravity=\"center_horizontal\"\n                android:layout_marginTop=\"15dp\"\n                android:orientation=\"horizontal\" >\n\n                <RadioButton\n                    android:id=\"@+id/payout_tab_rb\"\n                    android:layout_width=\"fill_parent\"\n                    android:layout_height=\"34.0dip\"\n                    android:layout_weight=\"1\"\n                    android:background=\"@drawable/payout_tab_btn_radio\"\n                    android:button=\"@null\"\n                    android:gravity=\"left\"\n                    android:paddingLeft=\"22dp\"\n                    android:paddingTop=\"8dp\"\n                    android:text=\"支出\"\n                    android:textColor=\"@color/white\"\n                    android:textColorHint=\"@color/white\" />\n\n                <RadioButton\n                    android:id=\"@+id/income_tab_rb\"\n                    android:layout_width=\"fill_parent\"\n                    android:layout_height=\"34.0dip\"\n                    android:layout_weight=\"1\"\n                    android:background=\"@drawable/income_tab_btn_radio\"\n                    android:button=\"@null\"\n                    android:gravity=\"right\"\n                    android:paddingRight=\"22dp\"\n                    android:paddingTop=\"8dp\"\n                    android:text=\"收入\"\n                    android:textColor=\"@color/white\"\n                    android:textColorHint=\"@color/white\" />\n            </RadioGroup>\n\n            <ScrollView\n                android:layout_width=\"fill_parent\"\n                android:layout_height=\"fill_parent\"\n                android:scrollbars=\"none\" >\n\n                <LinearLayout\n                    android:layout_width=\"fill_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:orientation=\"vertical\" >\n\n                    <RelativeLayout\n                        android:layout_width=\"fill_parent\"\n                        android:layout_height=\"wrap_content\"\n                        android:orientation=\"horizontal\" >\n\n                        <EditText\n                            android:id=\"@+id/txtMoney\"\n                            android:layout_width=\"fill_parent\"\n                            android:layout_height=\"wrap_content\"\n                            android:layout_gravity=\"center_vertical\"\n                            android:layout_marginTop=\"5.0dip\"\n                            android:background=\"@drawable/add_trans_paper_top_row\"\n                            android:editable=\"false\"\n                            android:focusable=\"true\"\n                            android:focusableInTouchMode=\"true\"\n                            android:gravity=\"right|center\"\n                            android:hint=\"输入金额\"\n                            android:paddingRight=\"30.0dip\"\n                            android:paddingTop=\"5.0dp\"\n                            android:textColor=\"@color/cost_text\"\n                            android:textColorHint=\"@color/black\"\n                            android:textSize=\"35.0dp\"\n                            android:textStyle=\"bold\" />\n                    </RelativeLayout>\n\n                    <LinearLayout\n                        android:layout_width=\"fill_parent\"\n                        android:layout_height=\"wrap_content\"\n                        android:orientation=\"vertical\" >\n\n                        <FrameLayout\n                            android:layout_width=\"fill_parent\"\n                            android:layout_height=\"50.0dip\"\n                            android:background=\"@drawable/add_trans_paper_middle_row_normal\" >\n\n                            <TextView\n                                android:id=\"@+id/tvType\"\n                                style=\"@style/form_row_label\"\n                                android:text=\"类别\" />\n\n                            <Spinner\n                                android:id=\"@+id/spType\"\n                                style=\"@style/form_row_input_top\"\n                                android:layout_toRightOf=\"@id/tvType\"\n                                android:dropDownWidth=\"150dp\"\n                                android:paddingRight=\"20.0dip\"\n                                android:prompt=\"@string/spn_prompt_category\" />\n\n                            <ImageView style=\"@style/form_row_go_detail\" />\n                        </FrameLayout>\n\n                        <FrameLayout\n                            android:id=\"@+id/corporation_fl\"\n                            android:layout_width=\"fill_parent\"\n                            android:layout_height=\"wrap_content\"\n                            android:background=\"@drawable/add_trans_paper_middle_row_normal\"\n                            android:visibility=\"gone\" >\n\n                            <TextView\n                                style=\"@style/form_row_label\"\n                                android:text=\"付款人\" />\n\n                            <EditText\n                                android:id=\"@+id/txtInhandler\"\n                                style=\"@style/form_row_input_middle\"\n                                android:layout_gravity=\"center_vertical\"\n                                android:singleLine=\"false\"\n                                android:hint=\"请输入...\" />\n                        </FrameLayout>\n\n                        <FrameLayout\n                            android:id=\"@+id/bottom_empty\"\n                            android:layout_width=\"fill_parent\"\n                            android:layout_height=\"wrap_content\"\n                            android:background=\"@drawable/add_trans_income_bottom_row_bg\" >\n\n                            <ImageView\n                                android:layout_width=\"30dp\"\n                                android:layout_height=\"30dp\"\n                                android:layout_gravity=\"center_horizontal|center_vertical\"\n                                android:layout_marginBottom=\"5dp\"\n                                android:background=\"@drawable/bottom_more\" />\n                        </FrameLayout>\n\n                        <LinearLayout\n                            android:id=\"@+id/bottom_full\"\n                            android:layout_width=\"fill_parent\"\n                            android:layout_height=\"wrap_content\"\n                            android:orientation=\"vertical\"\n                            android:visibility=\"gone\" >\n\n                            <FrameLayout\n                                android:layout_width=\"fill_parent\"\n                                android:layout_height=\"wrap_content\"\n                                android:background=\"@drawable/add_trans_paper_middle_row_normal\" >\n\n                                <EditText\n                                    android:id=\"@+id/txtTime\"\n                                    style=\"@style/form_row_input_middle\"\n                                    android:editable=\"false\"\n                                    android:prompt=\"@string/spn_prompt_account\"\n                                    android:textColorHint=\"@color/white\" />\n\n                                <TextView\n                                    style=\"@style/form_row_label\"\n                                    android:text=\"时间\" />\n\n                                <ImageView style=\"@style/form_row_go_detail\" />\n                            </FrameLayout>\n\n                            <FrameLayout\n                                android:id=\"@+id/address_fl\"\n                                android:layout_width=\"fill_parent\"\n                                android:layout_height=\"wrap_content\"\n                                android:background=\"@drawable/add_trans_paper_middle_row_normal\" >\n\n                                <TextView\n                                    android:id=\"@+id/tvAddress\"\n                                    style=\"@style/form_row_label\"\n                                    android:text=\"地点\" />\n\n                                <EditText\n                                    android:id=\"@+id/txtAddress\"\n                                    style=\"@style/form_row_input_middle\"\n                                    android:layout_gravity=\"center_vertical\"\n                                    android:layout_marginRight=\"40dp\"\n                                    android:singleLine=\"false\"\n                                    android:hint=\"请输入...\" />\n\n                                <ImageView\n                                    android:id=\"@+id/btn_loacte\"\n                                    android:layout_width=\"wrap_content\"\n                                    android:layout_height=\"wrap_content\"\n                                    android:layout_gravity=\"right\"\n                                    android:layout_marginRight=\"20dp\"\n                                    android:layout_marginTop=\"5dp\"\n                                    android:background=\"@drawable/locate_btn\" />\n                            </FrameLayout>\n\n                            <FrameLayout\n                                android:layout_width=\"fill_parent\"\n                                android:layout_height=\"90dp\"\n                                android:background=\"@drawable/add_trans_income_memo_row_bg\" >\n\n                                <TextView\n                                    android:id=\"@+id/tvMark\"\n                                    style=\"@style/form_row_label\"\n                                    android:text=\"备注\" />\n\n                                <EditText\n                                    android:id=\"@+id/txtMark\"\n                                    style=\"@style/form_row_input_middle\"\n                                    android:layout_gravity=\"center_vertical\"\n                                    android:layout_marginRight=\"60dp\"\n                                    android:singleLine=\"false\"\n                                    android:hint=\"请输入...\" />\n\n                                <RelativeLayout\n                                    android:layout_width=\"74dp\"\n                                    android:layout_height=\"74dp\"\n                                    android:layout_gravity=\"right\"\n                                    android:layout_marginLeft=\"5dp\"\n                                    android:layout_marginRight=\"20dp\"\n                                    android:layout_marginTop=\"5dp\"\n                                    android:background=\"@drawable/expense_camera_btn_normal_2\" >\n\n                                    <ImageView\n                                        android:id=\"@+id/addphoto\"\n                                        android:layout_width=\"68dp\"\n                                        android:layout_height=\"68dp\"\n                                        android:layout_centerInParent=\"true\"\n                                        android:scaleType=\"centerCrop\"\n                                        android:src=\"@drawable/addphoto_btn\" />\n                                </RelativeLayout>\n                            </FrameLayout>\n\n                            <FrameLayout\n                                android:id=\"@+id/empty_fl\"\n                                style=\"@style/form_row_input_middle\"\n                                android:visibility=\"gone\" />\n                        </LinearLayout>\n\n                        <RelativeLayout\n                            android:id=\"@+id/addmode\"\n                            android:layout_width=\"fill_parent\"\n                            android:layout_height=\"wrap_content\"\n                            android:layout_alignParentBottom=\"true\" >\n\n                            <Button\n                                android:id=\"@+id/btnVoice\"\n                                style=\"@style/common_toolbar_btn_for_addexpense\"\n                                android:layout_alignParentRight=\"true\"\n                                android:layout_marginRight=\"130.0dip\"\n                                android:text=\"语音识别\"\n                                android:textColor=\"@color/black\" />\n\n                            <Button\n                                android:id=\"@+id/btnSave\"\n                                style=\"@style/common_toolbar_btn_for_addexpense\"\n                                android:layout_alignParentRight=\"true\"\n                                android:layout_marginRight=\"10.0dip\"\n                                android:text=\"保存\"\n                                android:textColor=\"@color/black\" />\n\n                            <Button\n                                android:id=\"@+id/btnCancel\"\n                                style=\"@style/common_toolbar_btn_for_addexpense\"\n                                android:layout_alignParentLeft=\"true\"\n                                android:layout_marginLeft=\"10.0dip\"\n                                android:text=\"取消\"\n                                android:textColor=\"@color/black\" />\n                        </RelativeLayout>\n                    </LinearLayout>\n                </LinearLayout>\n            </ScrollView>\n        </LinearLayout>\n    </LinearLayout>\n\n    <RelativeLayout\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\" >\n\n        <android.inputmethodservice.KeyboardView\n            android:id=\"@+id/keyboard_view\"\n            style=\"@style/Widget.KeyboardView\"\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentBottom=\"true\"\n            android:background=\"#ffffff\"\n            android:focusable=\"true\"\n            android:focusableInTouchMode=\"true\"\n            android:keyBackground=\"@drawable/keyboard_key\"\n            android:keyPreviewLayout=\"@layout/preview_layout\"\n            android:keyTextColor=\"#353535\"\n            android:keyTextSize=\"21.5sp\"\n            android:labelTextSize=\"21.5sp\"\n            android:popupLayout=\"@layout/preview_layout\"\n            android:visibility=\"gone\" />\n    </RelativeLayout>\n\n</FrameLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/addincome.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:id=\"@+id/initem\"\n\tandroid:orientation=\"vertical\"\n\tandroid:layout_width=\"fill_parent\"\n\tandroid:layout_height=\"fill_parent\"\n\t>\n\t<LinearLayout \n\t\tandroid:orientation=\"vertical\"\n\t\tandroid:layout_width=\"fill_parent\"\n\t\tandroid:layout_height=\"fill_parent\"\n\t\tandroid:layout_weight=\"3\"\n\t\t>\n\t\t<TextView \n\t\t\tandroid:layout_width=\"match_parent\"\n\t\t\tandroid:layout_gravity=\"center\"\n\t\t\tandroid:gravity=\"center_horizontal\"\n\t\t\tandroid:text=\"新增收入\" \n\t\t\tandroid:textColor=\"#a00000\"\n\t\t\tandroid:textSize=\"40sp\" \n\t\t\tandroid:textStyle=\"bold\" \n\t\t\tandroid:layout_height=\"wrap_content\"/>\n\t</LinearLayout>\n\t<LinearLayout \n\t\tandroid:orientation=\"vertical\"\n\t\tandroid:layout_width=\"fill_parent\"\n\t\tandroid:layout_height=\"fill_parent\"\n\t\tandroid:layout_weight=\"1\"\n\t\t>\n\t\t<RelativeLayout android:layout_width=\"fill_parent\"\n\t\t    android:layout_height=\"fill_parent\"\n\t\t    android:padding=\"10dp\"\n\t\t    >\n\t\t    <TextView android:layout_width=\"90dp\" \n\t\t    android:id=\"@+id/tvInMoney\" \n\t\t    android:textSize=\"20sp\" \n\t\t    android:text=\"金  额：\" \n\t\t    android:layout_height=\"wrap_content\" \n\t\t    android:layout_alignBaseline=\"@+id/txtInMoney\" \n\t\t    android:layout_alignBottom=\"@+id/txtInMoney\" \n\t\t    android:layout_alignParentLeft=\"true\" \n\t\t    android:layout_marginLeft=\"16dp\">\n\t\t    </TextView>\n\t\t    <EditText \n\t\t    android:id=\"@+id/txtInMoney\"\n\t\t    android:layout_width=\"210dp\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t    android:layout_toRightOf=\"@id/tvInMoney\"\n\t\t    android:inputType=\"number\"\n\t\t    android:numeric=\"integer\"\n\t\t    android:maxLength=\"9\"\n\t\t    android:hint=\"0.00\"\n\t\t    />\n\t\t    <TextView android:layout_width=\"90dp\" \n\t\t    android:id=\"@+id/tvInTime\" \n\t\t    android:textSize=\"20sp\" \n\t\t    android:text=\"时  间：\" \n\t\t    android:layout_height=\"wrap_content\" \n\t\t    android:layout_alignBaseline=\"@+id/txtInTime\" \n\t\t    android:layout_alignBottom=\"@+id/txtInTime\" \n\t\t    android:layout_toLeftOf=\"@+id/txtInMoney\">\n\t\t    </TextView>\n\t\t    <EditText \n\t\t    android:id=\"@+id/txtInTime\"\n\t\t    android:layout_width=\"210dp\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t    android:layout_toRightOf=\"@id/tvInTime\"\n\t\t    android:layout_below=\"@id/txtInMoney\"\n\t\t    android:inputType=\"datetime\"\n\t\t    android:hint=\"2011-01-01\"\n\t\t    />\n\t\t    <TextView android:layout_width=\"90dp\" \n\t\t    android:id=\"@+id/tvInType\" \n\t\t    android:textSize=\"20sp\" \n\t\t    android:text=\"类  别：\" \n\t\t    android:layout_height=\"wrap_content\" \n\t\t    android:layout_alignBaseline=\"@+id/spInType\" \n\t\t    android:layout_alignBottom=\"@+id/spInType\" \n\t\t    android:layout_alignLeft=\"@+id/tvInTime\">\n\t\t    </TextView>\n\t\t    <Spinner android:id=\"@+id/spInType\"\n\t\t    android:layout_width=\"210dp\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t    android:layout_toRightOf=\"@id/tvInType\"\n\t\t    android:layout_below=\"@id/txtInTime\"\n\t\t    />\n\t\t    <TextView android:layout_width=\"90dp\" \n\t\t    android:id=\"@+id/tvInhandler\" \n\t\t    android:textSize=\"20sp\" \n\t\t    android:text=\"放款方：\" \n\t\t    android:layout_height=\"wrap_content\" \n\t\t    android:layout_alignBaseline=\"@+id/txtInhandler\" \n\t\t    android:layout_alignBottom=\"@+id/txtInhandler\" \n\t\t    android:layout_toLeftOf=\"@+id/spInType\">\n\t\t    </TextView>\n\t\t    <EditText \n\t\t    android:id=\"@+id/txtInhandler\"\n\t\t    android:layout_width=\"210dp\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t    android:layout_toRightOf=\"@id/tvInhandler\"\n\t\t    android:layout_below=\"@id/spInType\"\n\t\t    android:singleLine=\"false\"\n\t\t    />\n\t\t    <TextView android:layout_width=\"90dp\" \n\t\t    android:id=\"@+id/tvInMark\" \n\t\t    android:textSize=\"20sp\" \n\t\t    android:text=\"备  注：\" \n\t\t    android:layout_height=\"wrap_content\" \n\t\t    android:layout_alignTop=\"@+id/txtInMark\" \n\t\t    android:layout_toLeftOf=\"@+id/txtInhandler\">\n\t\t    </TextView>\n\t\t    <EditText \n\t\t    android:id=\"@+id/txtInMark\"\n\t\t    android:layout_width=\"210dp\"\n\t\t    android:layout_height=\"150dp\"\n\t\t    android:layout_toRightOf=\"@id/tvInMark\"\n\t\t    android:layout_below=\"@id/txtInhandler\"\n\t\t    android:gravity=\"top\"\n\t\t\tandroid:background=\"#21a0a0\"\n\t\t\tandroid:textColor=\"#ffffff\"\n\t\t    android:singleLine=\"false\"\n\t\t    />\n\t\t    </RelativeLayout>\n\t</LinearLayout>\n\t<LinearLayout \n\t\tandroid:orientation=\"horizontal\"\n\t\tandroid:layout_width=\"match_parent\"\n\t\tandroid:layout_height=\"wrap_content\" \n\t\tandroid:gravity=\"center_horizontal\"\n\t\t> \n\t\t<Button\n\t\t    android:id=\"@+id/btnInCancel\" \n\t\t    android:layout_width=\"wrap_content\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t\tandroid:background=\"#a00000\"\n\t\t\tandroid:textColor=\"#ffffff\"\n\t\t    android:textSize=\"22sp\"  \n\t\t\tandroid:layout_margin=\"10dp\" \n\t\t\tandroid:paddingRight=\"20dp\"\n\t\t\tandroid:paddingLeft=\"20dp\"\n\t\t    android:text=\"取消\"\n\t\t    />\n\t\t    <Button \n\t\t\tandroid:id=\"@+id/btnInSave\" \n\t\t    android:layout_width=\"wrap_content\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t\tandroid:background=\"#a00000\"\n\t\t\tandroid:textColor=\"#ffffff\"\n\t\t    android:textSize=\"22sp\" \n\t\t\tandroid:layout_margin=\"10dp\"\n\t\t\tandroid:paddingRight=\"20dp\"\n\t\t\tandroid:paddingLeft=\"20dp\"\n\t\t\tandroid:text=\"保存\"    \n\t\t    /> \n\t</LinearLayout>\t\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/addnote.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:id=\"@+id/itemNote\"\n\tandroid:orientation=\"vertical\"\n\tandroid:layout_width=\"fill_parent\"\n\tandroid:layout_height=\"fill_parent\"\n\t>\n\t<LinearLayout \n\t\tandroid:orientation=\"vertical\"\n\t\tandroid:layout_width=\"fill_parent\"\n\t\tandroid:layout_height=\"fill_parent\"\n\t\tandroid:layout_weight=\"3.6\"\n\t\t>\n\t\t<TextView \n\t\t\tandroid:layout_width=\"wrap_content\"\n\t\t\tandroid:layout_gravity=\"center\"\n\t\t\tandroid:gravity=\"center_horizontal\"\n\t\t\tandroid:text=\"新增便签\"\n\t\t\tandroid:textSize=\"40sp\"\n\t\t\tandroid:textColor=\"#a00000\"\n\t\t\tandroid:textStyle=\"bold\" \n\t\t\tandroid:layout_height=\"wrap_content\"/>\n\t</LinearLayout>\n\t<LinearLayout \n\t\tandroid:orientation=\"vertical\"\n\t\tandroid:layout_width=\"fill_parent\"\n\t\tandroid:layout_height=\"fill_parent\"\n\t\tandroid:layout_weight=\"1\"\n\t\t>\n\t\t<RelativeLayout android:layout_width=\"fill_parent\"\n\t\t    android:layout_height=\"fill_parent\"\n\t\t    android:padding=\"5dp\"\n\t\t    >\n\t\t    <TextView android:layout_width=\"350dp\"\t\n\t\t    android:id=\"@+id/tvNote\" \n\t\t    android:textSize=\"20sp\" \n\t\t    android:text=\"请输入便签，最多输入200字\" \n\t    android:textColor=\"#6e6e6e\"\n\t\t    android:layout_alignParentRight=\"true\"\n\t\t    android:layout_height=\"wrap_content\" \n\t\t    />\n\t\t    <EditText \n\t\t    android:id=\"@+id/txtNote\"\n\t\t    android:layout_width=\"350dp\"\n\t\t    android:layout_height=\"400dp\"\n\t\t    android:layout_below=\"@id/tvNote\"\n\t\t    android:padding=\"20dp\"\n\t\t    android:gravity=\"top\"\n\t\t\tandroid:background=\"#21a0a0\"\n\t\t\tandroid:textColor=\"#ffffff\"\n\t\t    android:singleLine=\"false\"\n\t\t    />\n\t\t    </RelativeLayout>\n\t</LinearLayout>\n\t<LinearLayout \n\t\tandroid:orientation=\"horizontal\"\n\t\tandroid:layout_width=\"match_parent\"\n\t\tandroid:layout_height=\"wrap_content\" \n\t\tandroid:gravity=\"center_horizontal\"\n\t\t> \n\t\t \n\t\t<Button\n\t\t    android:id=\"@+id/btnNoteCancel\"\n\t\t    android:layout_width=\"wrap_content\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t\tandroid:background=\"#a00000\"\n\t\t\tandroid:textColor=\"#ffffff\"\n\t\t    android:textSize=\"22sp\"  \n\t\t\tandroid:layout_margin=\"10dp\" \n\t\t\tandroid:paddingRight=\"20dp\"\n\t\t\tandroid:paddingLeft=\"20dp\"\n\t\t\tandroid:text=\"取消\"\n\t\t    />\n\t\t    <Button \n\t\t\tandroid:id=\"@+id/btnNoteSave\"\n\t\t    android:layout_width=\"wrap_content\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t\tandroid:background=\"#a00000\"\n\t\t\tandroid:textColor=\"#ffffff\"\n\t\t    android:textSize=\"22sp\" \n\t\t\tandroid:layout_margin=\"10dp\"\n\t\t\tandroid:paddingRight=\"20dp\"\n\t\t\tandroid:paddingLeft=\"20dp\"\n\t\t\tandroid:text=\"保存\"    \n\t\t    /> \n\t</LinearLayout>\t\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/addpay.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/item\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"fill_parent\"\n    android:orientation=\"vertical\" >\n\n    <LinearLayout\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"fill_parent\"\n        android:layout_weight=\"3\"\n        android:orientation=\"vertical\" >\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\"\n            android:gravity=\"center_horizontal\"\n            android:text=\"新增支出\"\n            android:textColor=\"#a00000\"\n            android:textSize=\"40sp\"\n            android:textStyle=\"bold\" />\n    </LinearLayout>\n\n    <LinearLayout\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"fill_parent\"\n        android:layout_weight=\"1\"\n        android:orientation=\"vertical\" >\n\n        <RelativeLayout\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"fill_parent\"\n            android:padding=\"10dp\" >\n\n            <TextView\n                android:id=\"@+id/tvMoney\"\n                android:layout_width=\"90dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignBaseline=\"@+id/txtMoney\"\n                android:layout_alignBottom=\"@+id/txtMoney\"\n                android:layout_alignParentLeft=\"true\"\n                android:layout_marginLeft=\"16dp\"\n                android:text=\"金  额：\"\n                android:textSize=\"20sp\" >\n            </TextView>\n\n            <EditText\n                android:id=\"@+id/txtMoney\"\n                android:layout_width=\"210dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_toRightOf=\"@id/tvMoney\"\n                android:hint=\"0.00\"\n                android:inputType=\"numberDecimal\"\n                android:maxLength=\"9\" />\n\n            <TextView\n                android:id=\"@+id/tvTime\"\n                android:layout_width=\"90dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignBaseline=\"@+id/txtTime\"\n                android:layout_alignBottom=\"@+id/txtTime\"\n                android:layout_toLeftOf=\"@+id/txtMoney\"\n                android:text=\"时  间：\"\n                android:textSize=\"20sp\" >\n            </TextView>\n\n            <EditText\n                android:id=\"@+id/txtTime\"\n                android:layout_width=\"210dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_below=\"@id/txtMoney\"\n                android:layout_toRightOf=\"@id/tvTime\"\n                android:hint=\"2011-01-01\"\n                android:inputType=\"datetime\" />\n\n            <TextView\n                android:id=\"@+id/tvType\"\n                android:layout_width=\"90dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignBaseline=\"@+id/spType\"\n                android:layout_alignBottom=\"@+id/spType\"\n                android:layout_alignLeft=\"@+id/tvTime\"\n                android:text=\"类  别：\"\n                android:textSize=\"20sp\" >\n            </TextView>\n\n            <Spinner\n                android:id=\"@+id/spType\"\n                android:layout_width=\"210dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_below=\"@id/txtTime\"\n                android:layout_toRightOf=\"@id/tvType\" />\n\n            <TextView\n                android:id=\"@+id/tvAddress\"\n                android:layout_width=\"90dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignBaseline=\"@+id/txtAddress\"\n                android:layout_alignBottom=\"@+id/txtAddress\"\n                android:layout_toLeftOf=\"@+id/spType\"\n                android:text=\"地  点：\"\n                android:textSize=\"20sp\" >\n            </TextView>\n\n            <EditText\n                android:id=\"@+id/txtAddress\"\n                android:layout_width=\"210dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_below=\"@id/spType\"\n                android:layout_toRightOf=\"@id/tvAddress\"\n                android:singleLine=\"false\" />\n\n            <TextView\n                android:id=\"@+id/tvMark\"\n                android:layout_width=\"90dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignTop=\"@+id/txtMark\"\n                android:layout_toLeftOf=\"@+id/txtAddress\"\n                android:text=\"备  注：\"\n                android:textSize=\"20sp\" >\n            </TextView>\n\n            <EditText\n                android:id=\"@+id/txtMark\"\n                android:layout_width=\"210dp\"\n                android:layout_height=\"150dp\"\n                android:layout_below=\"@id/txtAddress\"\n                android:layout_toRightOf=\"@id/tvMark\"\n                android:background=\"#21a0a0\"\n                android:gravity=\"top\"\n                android:singleLine=\"false\"\n                android:textColor=\"#ffffff\" />\n        </RelativeLayout>\n    </LinearLayout>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center_horizontal\"\n        android:orientation=\"horizontal\" >\n\n        <Button\n            android:id=\"@+id/btnCancel\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_margin=\"10dp\"\n            android:background=\"#a00000\"\n            android:paddingLeft=\"20dp\"\n            android:paddingRight=\"20dp\"\n            android:text=\"取消\"\n            android:textColor=\"#ffffff\"\n            android:textSize=\"22sp\" />\n\n        <Button\n            android:id=\"@+id/btnSave\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_margin=\"10dp\"\n            android:background=\"#a00000\"\n            android:paddingLeft=\"20dp\"\n            android:paddingRight=\"20dp\"\n            android:text=\"保存\"\n            android:textColor=\"#ffffff\"\n            android:textSize=\"22sp\" />\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/author.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<TableLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\t android:layout_width=\"fill_parent\"\n\t android:layout_height=\"wrap_content\"\n\t android:layout_margin=\"10dp\"\n\t android:stretchColumns=\"1\"\n\t android:background=\"#820000\"> \n\t <TableRow \n\t     android:layout_height=\"60dp\"\n\t     android:background=\"#e6e6e6\"\n\t     android:layout_marginTop=\"3dp\" >\n\t     <TextView android:layout_height=\"match_parent\"\n\t         android:layout_marginLeft=\"1dp\"\n\t         android:layout_marginTop=\"1dp\"\n\t         android:layout_marginBottom=\"1dp\"\n\t         android:paddingTop=\"13dp\"\n\t         android:paddingBottom=\"13dp\"\n\t         android:paddingLeft=\"15dp\"\n\t         android:background=\"#ffffff\"\n\t         android:textColor=\"#500000\"\n\t         android:textSize=\"16sp\"\n\t         android:text=\"姓名\"/>\n\t     <TextView  android:id=\"@+id/countuser\"\n\t         android:layout_height=\"match_parent\"\n\t         android:layout_marginRight=\"1dp\"\n\t         android:layout_marginTop=\"1dp\"\n\t         android:layout_marginBottom=\"1dp\"\n\t         android:paddingTop=\"17dp\"\n\t         android:paddingBottom=\"15dp\"\n\t         android:paddingRight=\"15dp\" \n\t         android:gravity=\"right\"\n\t         android:background=\"#ffffff\"\n\t         android:textSize=\"14sp\"\n\t         android:textColor=\"#464646\"\n\t         android:text=\"陈文萍\"/>\n\t </TableRow> \n\t <TableRow \n\t     android:layout_height=\"fill_parent\"\n\t     android:background=\"#e6e6e6\"  >\n\t     <TextView android:layout_height=\"match_parent\"\n\t         android:layout_marginLeft=\"1dp\"\n\t         android:layout_marginTop=\"1dp\"\n\t         android:layout_marginBottom=\"1dp\"\n\t         android:paddingTop=\"13dp\"\n\t         android:paddingBottom=\"15dp\"\n\t         android:paddingLeft=\"15dp\"\n\t         android:background=\"#ffffff\"\n\t         android:textColor=\"#500000\"\n\t         android:textSize=\"16sp\"\n\t         android:text=\"学校\"/>\n\t     <TextView   \n\t         android:layout_height=\"match_parent\"\n\t         android:layout_marginRight=\"1dp\"\n\t         android:layout_marginBottom=\"1dp\"\n\t         android:paddingTop=\"17dp\"\n\t         android:paddingBottom=\"15dp\"\n\t         android:paddingRight=\"15dp\" \n\t         android:gravity=\"right\"\n\t         android:background=\"#ffffff\"\n\t         android:textSize=\"14sp\"\n\t         android:textColor=\"#464646\" \n\t         android:text=\"福建工程学院\" />\n\t </TableRow>\n\t <TableRow \n\t     android:layout_height=\"fill_parent\"\n\t     android:background=\"#e6e6e6\"  >\n\t     <TextView android:layout_height=\"match_parent\"\n\t         android:layout_marginLeft=\"1dp\"\n\t         android:layout_marginTop=\"1dp\"\n\t         android:layout_marginBottom=\"1dp\"\n\t         android:paddingTop=\"13dp\"\n\t         android:paddingBottom=\"13dp\"\n\t         android:paddingLeft=\"15dp\"\n\t         android:background=\"#ffffff\"\n\t         android:textColor=\"#500000\"\n\t         android:textSize=\"16sp\"\n\t         android:text=\"院系\"/>\n\t     <TextView   android:layout_height=\"match_parent\"\n\t         android:layout_marginRight=\"1dp\"\n\t         android:layout_marginBottom=\"1dp\"\n\t         android:paddingTop=\"17dp\"\n\t         android:paddingBottom=\"15dp\"\n\t         android:paddingRight=\"15dp\" \n\t         android:gravity=\"right\"\n\t         android:background=\"#ffffff\"\n\t         android:textSize=\"14sp\"\n\t         android:textColor=\"#464646\" \n\t         android:text=\"信息科学与工程\" />\n\t </TableRow>\n\t <TableRow \n\t     android:layout_height=\"fill_parent\"\n\t     android:background=\"#e6e6e6\"  >\n\t     <TextView android:layout_height=\"match_parent\"\n\t         android:layout_marginLeft=\"1dp\"\n\t         android:layout_marginTop=\"1dp\"\n\t         android:layout_marginBottom=\"1dp\"\n\t         android:paddingTop=\"13dp\"\n\t         android:paddingBottom=\"13dp\"\n\t         android:paddingLeft=\"15dp\"\n\t         android:background=\"#ffffff\"\n\t         android:textColor=\"#500000\"\n\t         android:textSize=\"16sp\"\n\t         android:text=\"专业\"/>\n\t     <TextView   android:layout_height=\"match_parent\"\n\t         android:layout_marginRight=\"1dp\"\n\t         android:layout_marginBottom=\"1dp\"\n\t         android:paddingTop=\"17dp\"\n\t         android:paddingBottom=\"15dp\"\n\t         android:paddingRight=\"15dp\" \n\t         android:gravity=\"right\"\n\t         android:background=\"#ffffff\"\n\t         android:textSize=\"14sp\"\n\t         android:textColor=\"#464646\" \n\t         android:text=\"计算机科学与技术\" />\n\t </TableRow>\n\t <TableRow \n\t     android:layout_height=\"fill_parent\"\n\t     android:background=\"#e6e6e6\"  >\n\t     <TextView android:layout_height=\"match_parent\"\n\t         android:layout_marginLeft=\"1dp\"\n\t         android:layout_marginTop=\"1dp\"\n\t         android:layout_marginBottom=\"1dp\"\n\t         android:paddingTop=\"13dp\"\n\t         android:paddingBottom=\"13dp\"\n\t         android:paddingLeft=\"15dp\"\n\t         android:background=\"#ffffff\"\n\t         android:textColor=\"#500000\"\n\t         android:textSize=\"16sp\"\n\t         android:text=\"学号\"/>\n\t     <TextView   android:layout_height=\"match_parent\"\n\t         android:layout_marginRight=\"1dp\"\n\t         android:layout_marginBottom=\"1dp\"\n\t         android:paddingTop=\"17dp\"\n\t         android:paddingBottom=\"15dp\"\n\t         android:paddingRight=\"15dp\" \n\t         android:gravity=\"right\"\n\t         android:background=\"#ffffff\"\n\t         android:textSize=\"14sp\"\n\t         android:textColor=\"#464646\" \n\t         android:text=\"3101301105\" />\n\t </TableRow>\n\t <TableRow \n\t     android:layout_height=\"fill_parent\"\n\t     android:background=\"#e6e6e6\"\n\t     android:layout_marginBottom=\"2dp\" >\n\t     <TextView android:layout_height=\"match_parent\"\n\t         android:layout_marginLeft=\"1dp\"\n\t         android:layout_marginTop=\"1dp\"\n\t         android:layout_marginBottom=\"1dp\"\n\t         android:paddingTop=\"13dp\"\n\t         android:paddingBottom=\"13dp\"\n\t         android:paddingLeft=\"15dp\"\n\t         android:background=\"#ffffff\"\n\t         android:textColor=\"#500000\"\n\t         android:textSize=\"16sp\"\n\t         android:text=\"E-mail\"/>\n\t     <TextView   \n\t         android:layout_height=\"match_parent\"\n\t         android:layout_marginRight=\"1dp\"\n\t         android:layout_marginBottom=\"1dp\"\n\t         android:paddingTop=\"17dp\"\n\t         android:paddingBottom=\"15dp\"\n\t         android:paddingRight=\"15dp\" \n\t         android:gravity=\"right\"\n\t         android:background=\"#ffffff\"\n\t         android:textSize=\"14sp\"\n\t         android:textColor=\"#464646\"\n\t         android:text=\"cwp0c0@gmail.com\"/>\n\t </TableRow> \n\t <TableRow \n\t     android:layout_height=\"60dp\"\n\t     android:background=\"#e6e6e6\" \n         android:layout_marginBottom=\"3dp\">\n\t     <TextView android:layout_height=\"match_parent\"\n\t         android:layout_marginLeft=\"1dp\"\n\t         android:layout_marginBottom=\"1dp\"\n\t         android:paddingTop=\"13dp\"\n\t         android:paddingBottom=\"13dp\"\n\t         android:paddingLeft=\"15dp\"\n\t         android:background=\"#ffffff\"\n\t         android:textColor=\"#500000\"\n\t         android:textSize=\"16sp\"\n\t         android:text=\"指导老师\"/>\n\t     <TextView   \n\t         android:layout_height=\"match_parent\"\n\t         android:layout_marginRight=\"1dp\"\n\t         android:layout_marginBottom=\"1dp\"\n\t         android:paddingTop=\"17dp\"\n\t         android:paddingBottom=\"15dp\"\n\t         android:paddingRight=\"15dp\" \n\t         android:gravity=\"right\"\n\t         android:background=\"#ffffff\"\n\t         android:textSize=\"14sp\"\n\t         android:textColor=\"#464646\"\n\t         android:text=\"张国安 教授\"/>\n\t </TableRow> \n</TableLayout>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/changepwd.xml",
    "content": "<TableLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n\tandroid:layout_width=\"fill_parent\"\n\tandroid:layout_height=\"fill_parent\"\n\tandroid:gravity=\"center_vertical\"\n\tandroid:stretchColumns=\"0,3\" \n\tandroid:id=\"@+id/oldTableL\"\n\t> \n     <LinearLayout android:layout_width=\"fill_parent\"\n        android:id=\"@+id/cpyanzheng\"\n    \tandroid:layout_height=\"wrap_content\"\n    \tandroid:orientation=\"vertical\"\n    \tandroid:gravity=\"center_horizontal\"\n    \tandroid:layout_marginBottom=\"15dp\"  >\n\t    <TextView\n\t\t    android:id=\"@+id/cptitle\"\n\t\t    android:layout_width=\"fill_parent\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t    android:layout_gravity=\"left\"\n\t    \tandroid:textSize=\"20sp\"\n\t\t    android:layout_margin=\"15dp\"\n\t\t    android:text=\"请先验证账户：\" />\n\t    <TableRow \tandroid:layout_width=\"wrap_content\"\n\t\t   \tandroid:layout_height=\"wrap_content\"\n\t\t   \tandroid:layout_marginBottom=\"15dp\">    \n\t\t   <TextView/>\n\t\t   <TextView\n\t\t   \tandroid:text=\"用   户  名：\"  \n\t\t\tandroid:textColor=\"#a00000\"\n\t\t   \tandroid:layout_width=\"wrap_content\"\n\t    \tandroid:textSize=\"20sp\"\n\t\t   \tandroid:layout_height=\"wrap_content\"/>\n\t\t   <EditText android:id=\"@+id/cpusername\" \n\t\t   \tandroid:layout_width=\"wrap_content\"\n\t\t   \tandroid:minWidth=\"120dp\"\n\t    \tandroid:textSize=\"20sp\"\n\t\t   \tandroid:maxWidth=\"220dp\"\n    \t\tandroid:singleLine=\"true\"\n\t\t   \tandroid:layout_height=\"wrap_content\" \n\t\t   \tandroid:background=\"#dcdcc8\"/>\n\t\t   <TextView/>\n\t\t   </TableRow>\n\t\t   <TableRow android:layout_width=\"wrap_content\"\n\t\t   \tandroid:layout_height=\"wrap_content\"\n\t\t   \tandroid:layout_marginBottom=\"15dp\">\n\t\t   <TextView/>\n\t\t   <TextView \n\t\t   \tandroid:text=\"密         码：\"  \n\t\t\tandroid:textColor=\"#a00000\"\n\t\t   \tandroid:layout_width=\"wrap_content\"\n\t    \tandroid:textSize=\"20sp\"\n\t\t   \tandroid:layout_height=\"wrap_content\"/>\n\t\t   <EditText android:id=\"@+id/cppassword\" \n\t\t   \tandroid:layout_width=\"wrap_content\"\n\t\t   \tandroid:minWidth=\"120dp\"\n    \t\tandroid:singleLine=\"true\"\n\t\t   \tandroid:layout_height=\"wrap_content\" \n\t    \tandroid:textSize=\"20sp\"\n\t\t   \tandroid:inputType=\"textPassword\" \n\t\t   \tandroid:maxWidth=\"220dp\"\n\t\t   \tandroid:background=\"#dcdcc8\"/>\n\t\t   </TableRow>\n\t\t    \n\t\t   <TableRow android:layout_width=\"wrap_content\"\n\t\t   \tandroid:layout_height=\"wrap_content\"\n\t\t   \tandroid:layout_margin=\"15dp\" >\n\t\t   <TextView/>\n\t\t \n\t\t<Button android:id=\"@+id/btncpCancle\" \n\t\t\tandroid:layout_height=\"wrap_content\"  \n\t\t\tandroid:background=\"#a00000\"\n\t\t\tandroid:textColor=\"#ffffff\"  \n\t\t\tandroid:layout_marginRight=\"20dp\"\n\t\t\tandroid:layout_width=\"100dp\"\n\t\t\tandroid:text=\"取消\"\n\t\t/>\t\n\t\t \n\t\t<Button android:id=\"@+id/btncpsure\" \n\t\t\tandroid:layout_height=\"wrap_content\"  \n\t\t\tandroid:background=\"#a00000\"\n\t\t\tandroid:textColor=\"#ffffff\"  \n\t\t\tandroid:layout_width=\"100dp\"\n\t\t\tandroid:text=\"验证\"/>  \n\t\t<TextView/>  \n\t\t</TableRow>\n    </LinearLayout>\n    <LinearLayout android:layout_width=\"fill_parent\"\n        android:id=\"@+id/cphint\"\n    \tandroid:layout_height=\"wrap_content\"\n    \tandroid:orientation=\"vertical\"\n    \tandroid:gravity=\"center_horizontal\"\n    \tandroid:layout_marginBottom=\"15dp\" \n    \tandroid:visibility=\"gone\">\n\t    <TextView\n\t       android:id=\"@+id/cptitle2\"\n\t\t   android:layout_width=\"fill_parent\"\n\t\t   android:layout_height=\"wrap_content\"\n\t       android:layout_gravity=\"left\"\n\t    \tandroid:textSize=\"20sp\"\n\t       android:layout_margin=\"15dp\"\n\t       android:text=\"请修改用户名密码：\" /> \n\t    <TableRow \tandroid:layout_width=\"wrap_content\"\n\t    \tandroid:layout_height=\"wrap_content\"\n\t    \tandroid:layout_marginBottom=\"15dp\">    \n\t    <TextView/>\n\t    <TextView\n\t    \tandroid:text=\"用   户  名：\" \n\t\t\tandroid:textColor=\"#a00000\"\n\t    \tandroid:textSize=\"20sp\"\n\t    \tandroid:layout_width=\"wrap_content\"\n\t    \tandroid:layout_height=\"wrap_content\"/>\n\t    <EditText android:id=\"@+id/cptusername\"\n\t    \tandroid:textSize=\"20sp\"\n\t    \tandroid:layout_width=\"wrap_content\"\n\t\t   \tandroid:minWidth=\"80dp\"\n\t\t   \tandroid:singleLine=\"true\"\n\t\t   \tandroid:maxWidth=\"120dp\"\n\t    \tandroid:layout_height=\"wrap_content\" \n\t    \tandroid:background=\"#dcdcc8\"/>\n\t    <TextView/>\n\t    </TableRow>\n\t    <TableRow android:layout_width=\"wrap_content\"\n\t    \tandroid:layout_height=\"wrap_content\"\n\t    \tandroid:layout_margin=\"15dp\">\n\t    <TextView/>\n\t    <TextView \n\t    \tandroid:text=\"密         码：\" \n\t\t\tandroid:textColor=\"#a00000\"\n\t    \tandroid:textSize=\"20sp\"\n\t    \tandroid:layout_width=\"wrap_content\"\n\t    \tandroid:layout_height=\"wrap_content\"/>\n\t    <EditText android:id=\"@+id/cptpassword\"\n\t    \tandroid:textSize=\"20sp\"\n\t\t   \tandroid:minWidth=\"80dp\"\n\t\t   \tandroid:singleLine=\"true\"\n\t\t   \tandroid:maxWidth=\"120dp\"\n\t    \tandroid:layout_width=\"wrap_content\" \n\t    \tandroid:layout_height=\"wrap_content\"   \n\t    \tandroid:background=\"#dcdcc8\"/>\n\t    </TableRow>    \n\t     <TableRow android:layout_width=\"wrap_content\"\n\t    \tandroid:layout_height=\"wrap_content\"\n\t    \tandroid:layout_marginBottom=\"15dp\" >\n\t    <TextView/>\n\t  \n\t\t<Button android:id=\"@+id/btncptCancle\" \n\t\t\tandroid:layout_height=\"wrap_content\"    \n\t\t\tandroid:background=\"#a00000\"\n\t\t\tandroid:textColor=\"#ffffff\"\n\t\t\tandroid:layout_marginRight=\"20dp\"\n\t\t\tandroid:layout_width=\"100dp\"\n\t\t\tandroid:text=\"取消\"\n\t\t/>\t\n\t\t \n\t\t<Button android:id=\"@+id/btncptsure\"\n\t\t\tandroid:layout_width=\"100dp\"\n\t\t\tandroid:layout_height=\"wrap_content\"    \n\t\t\tandroid:background=\"#a00000\"\n\t\t\tandroid:textColor=\"#ffffff\"\n\t\t\tandroid:text=\"修改\"/>  \n\t    <TextView/>  \n\t    </TableRow>\n    </LinearLayout>\n     \n\t    \n    \n  \n</TableLayout>  \n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/child.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"fill_parent\" >\n\n    <RelativeLayout\n        android:id=\"@+id/frag3_nodata\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"fill_parent\"\n        android:paddingBottom=\"100dp\"\n        android:paddingTop=\"100dp\" >\n\n        <ImageView\n            android:id=\"@+id/search_img_nodata2\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentTop=\"true\"\n            android:layout_centerHorizontal=\"true\"\n            android:background=\"@drawable/image_cry_man\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_below=\"@id/search_img_nodata2\"\n            android:layout_centerHorizontal=\"true\"\n            android:text=\"无数据\"\n            android:textColor=\"#797b7e\"\n            android:textSize=\"20sp\"\n            android:textStyle=\"bold\" />\n    </RelativeLayout>\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/custom_fb_dev_reply.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:padding=\"10dp\" >\n\n    <ImageView\n        android:id=\"@+id/user_portrait\"\n        android:layout_width=\"41dp\"\n        android:layout_height=\"41dp\"\n        android:layout_alignParentRight=\"true\"\n        android:scaleType=\"centerCrop\"\n        android:src=\"@drawable/fb_default_dev_portrait\" />\n\n    <LinearLayout\n        android:id=\"@+id/fb_reply_layout\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignTop=\"@id/user_portrait\"\n        android:layout_marginLeft=\"35dp\"\n        android:layout_marginRight=\"5dp\"\n        android:layout_toLeftOf=\"@id/user_portrait\"\n        android:orientation=\"horizontal\" >\n\n        <ImageView\n            android:id=\"@+id/fb_reply_state_failed\"\n            android:layout_width=\"18dp\"\n            android:layout_height=\"18dp\"\n            android:layout_gravity=\"center_vertical\"\n            android:layout_marginRight=\"8dp\"\n            android:adjustViewBounds=\"true\"\n            android:contentDescription=\"图片\"\n            android:src=\"@drawable/fb_msg_tip\"\n            android:visibility=\"gone\" />\n\n        <ProgressBar\n            android:id=\"@+id/fb_reply_progressBar\"\n            style=\"?android:attr/progressBarStyleSmall\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center_vertical\"\n            android:layout_marginRight=\"8dp\"\n            android:visibility=\"gone\" />\n\n        <TextView\n            android:id=\"@+id/fb_reply_content\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"0dp\"\n            android:background=\"@drawable/fb_dev_reply_bg\"\n            android:gravity=\"left\"\n            android:paddingBottom=\"12dp\"\n            android:paddingLeft=\"12dp\"\n            android:paddingRight=\"20dp\"\n            android:paddingTop=\"12dp\"\n            android:text=\"回复内容\"\n            android:textColor=\"#eeeeee\"\n            android:textSize=\"14sp\" />\n    </LinearLayout>\n\n    <TextView\n        android:id=\"@+id/fb_reply_date\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_below=\"@id/fb_reply_layout\"\n        android:layout_marginTop=\"6dp\"\n        android:gravity=\"center\"\n        android:textColor=\"#666666\"\n        android:textSize=\"10sp\"\n        android:visibility=\"gone\" />\n\n</RelativeLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/custom_fb_user_reply.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:padding=\"10dp\" >\n\n    <ImageView\n        android:id=\"@+id/user_portrait\"\n        android:layout_width=\"41dp\"\n        android:layout_height=\"41dp\"\n        android:scaleType=\"centerCrop\"\n        android:src=\"@drawable/ic_launcher\" />\n\n    <LinearLayout\n        android:id=\"@+id/fb_reply_layout\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"5dp\"\n        android:layout_marginRight=\"35dp\"\n        android:layout_toRightOf=\"@id/user_portrait\"\n        android:orientation=\"vertical\" >\n\n        <LinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"0dp\"\n            android:layout_marginRight=\"35dp\"\n            android:layout_toRightOf=\"@id/user_portrait\"\n            android:orientation=\"horizontal\" >\n\n            <TextView\n                android:id=\"@+id/fb_reply_content\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:background=\"@drawable/fb_user_reply_bg\"\n                android:gravity=\"left\"\n                android:paddingBottom=\"12dp\"\n                android:paddingLeft=\"20dp\"\n                android:paddingRight=\"12dp\"\n                android:paddingTop=\"12dp\"\n                android:textColor=\"#070707\"\n                android:textSize=\"14sp\" />\n\n            <ImageView\n                android:id=\"@+id/fb_reply_state_failed\"\n                android:layout_width=\"15dp\"\n                android:layout_height=\"15dp\"\n                android:layout_gravity=\"center_vertical\"\n                android:adjustViewBounds=\"true\"\n                android:contentDescription=\"图片\"\n                android:src=\"@drawable/fb_msg_tip\"\n                android:visibility=\"gone\" />\n\n            <ProgressBar\n                android:id=\"@+id/fb_reply_progressBar\"\n                style=\"?android:attr/progressBarStyleSmall\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_gravity=\"center_vertical\"\n                android:visibility=\"gone\" />\n        </LinearLayout>\n    </LinearLayout>\n\n    <TextView\n        android:id=\"@+id/fb_reply_date\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_below=\"@id/fb_reply_layout\"\n        android:layout_marginTop=\"6dp\"\n        android:gravity=\"center\"\n        android:textColor=\"#666666\"\n        android:textSize=\"10sp\"\n        android:visibility=\"gone\" />\n\n</RelativeLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/custom_view.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:orientation=\"vertical\" android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\">\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:textColor=\"#FFFFFFFF\"\n        android:layout_margin=\"15dp\"\n        android:textSize=\"18sp\"\n       />\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/data.xml",
    "content": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"wrap_content\"\n    android:gravity=\"center_horizontal\"\n    android:orientation=\"vertical\" >\n\n    <Button\n        android:id=\"@+id/paydata\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"20dp\"\n        android:layout_marginRight=\"20dp\"\n        android:layout_marginTop=\"20dp\"\n        android:background=\"#21a0a0\"\n        android:text=\"分类支出统计\"\n        android:textColor=\"#ffffff\"\n        android:textSize=\"22sp\" />\n\n    <Button\n        android:id=\"@+id/incomedata\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"20dp\"\n        android:layout_marginRight=\"20dp\"\n        android:layout_marginTop=\"10dp\"\n        android:background=\"#21a0a0\"\n        android:text=\"分类收入统计\"\n        android:textColor=\"#ffffff\"\n        android:textSize=\"22sp\" />\n\n    <Button\n        android:id=\"@+id/pidata\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"20dp\"\n        android:layout_marginRight=\"20dp\"\n        android:layout_marginTop=\"10dp\"\n        android:background=\"#21a0a0\"\n        android:text=\"收-支 统计\"\n        android:textColor=\"#ffffff\"\n        android:textSize=\"22sp\" />\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/description.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<TableLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\t android:layout_width=\"fill_parent\"\n\t android:layout_height=\"wrap_content\"\n\t android:layout_margin=\"10dp\"\n\t android:stretchColumns=\"1\"\n\t android:background=\"#820000\"> \n\t <TableRow  \n\t     android:layout_height=\"wrap_content\"\n\t     android:background=\"#e6e6e6\"\n\t     android:layout_marginTop=\"3dp\" > \n\t     <TextView android:layout_height=\"match_parent\"\n\t         android:layout_width=\"40dp\"\n\t         android:layout_marginLeft=\"1dp\"\n\t         android:layout_marginTop=\"1dp\" \n\t         android:paddingTop=\"10dp\"\n\t         android:paddingRight=\"10dp\" \n\t         android:background=\"#ffffff\"\n\t         android:textColor=\"#500000\"\n\t         android:textSize=\"16sp\" \n\t\t\t android:drawableTop=\"@drawable/description\"/>\n\t     <TextView  \n\t         android:layout_height=\"match_parent\"\n\t         android:layout_marginRight=\"1dp\"\n\t         android:layout_marginTop=\"1dp\" \n\t         android:paddingTop=\"13dp\" \n\t         android:paddingRight=\"15dp\" \n\t         android:gravity=\"left\"\n\t         android:background=\"#ffffff\"\n\t         android:textSize=\"14sp\"\n\t         android:textColor=\"#464646\"\n\t         android:singleLine=\"false\"\n\t         android:lineSpacingExtra=\"5dp\"\n\t         android:text=\"@string/desc1\"/>\n\t </TableRow> \n\t  <TableRow  \n\t     android:layout_height=\"wrap_content\"\n\t     android:background=\"#e6e6e6\" >\n\t     <TextView android:layout_height=\"match_parent\"\n\t         android:layout_width=\"40dp\"\n\t         android:layout_marginLeft=\"1dp\"\n\t         android:layout_marginTop=\"1dp\" \n\t         android:paddingTop=\"10dp\"\n\t         android:paddingRight=\"10dp\" \n\t         android:background=\"#ffffff\"\n\t         android:textColor=\"#500000\"\n\t         android:textSize=\"16sp\" \n\t\t\t android:drawableTop=\"@drawable/description\"/>\n\t     <TextView  \n\t         android:layout_height=\"match_parent\"\n\t         android:layout_marginRight=\"1dp\"\n\t         android:layout_marginTop=\"1dp\" \n\t         android:paddingTop=\"13dp\" \n\t         android:paddingRight=\"15dp\" \n\t         android:gravity=\"left\"\n\t         android:background=\"#ffffff\"\n\t         android:textSize=\"14sp\"\n\t         android:textColor=\"#464646\"\n\t         android:singleLine=\"false\"\n\t         android:lineSpacingExtra=\"5dp\"\n\t         android:text=\"@string/desc2\"/>\n\t </TableRow> \n\t  <TableRow  \n\t     android:layout_height=\"wrap_content\"\n\t     android:background=\"#e6e6e6\" >\n\t     <TextView android:layout_height=\"match_parent\"\n\t         android:layout_width=\"40dp\"\n\t         android:layout_marginLeft=\"1dp\"\n\t         android:layout_marginTop=\"1dp\" \n\t         android:paddingTop=\"10dp\"\n\t         android:paddingRight=\"10dp\" \n\t         android:background=\"#ffffff\"\n\t         android:textColor=\"#500000\"\n\t         android:textSize=\"16sp\" \n\t\t\t android:drawableTop=\"@drawable/description\"/>\n\t     <TextView  \n\t         android:layout_height=\"match_parent\"\n\t         android:layout_marginRight=\"1dp\"\n\t         android:layout_marginTop=\"1dp\" \n\t         android:paddingTop=\"13dp\" \n\t         android:paddingRight=\"15dp\" \n\t         android:gravity=\"left\"\n\t         android:background=\"#ffffff\"\n\t         android:textSize=\"14sp\"\n\t         android:textColor=\"#464646\"\n\t         android:singleLine=\"false\"\n\t         android:lineSpacingExtra=\"5dp\"\n\t         android:text=\"@string/desc3\"/>\n\t </TableRow> \n\t  <TableRow  \n\t     android:layout_height=\"wrap_content\"\n\t     android:background=\"#e6e6e6\"\n\t     android:layout_marginBottom=\"6px\" >\n\t     <TextView android:layout_height=\"match_parent\"\n\t         android:layout_width=\"40dp\"\n\t         android:layout_marginLeft=\"1dp\"\n\t         android:layout_marginTop=\"1dp\" \n\t         android:paddingTop=\"10dp\"\n\t         android:paddingRight=\"10dp\" \n\t         android:background=\"#ffffff\"\n\t         android:textColor=\"#500000\"\n\t         android:textSize=\"16sp\" \n\t\t\t android:drawableTop=\"@drawable/description\"/>\n\t     <TextView  \n\t         android:layout_height=\"match_parent\"\n\t         android:layout_marginRight=\"1dp\"\n\t         android:layout_marginTop=\"1dp\" \n\t         android:paddingTop=\"13dp\" \n\t         android:paddingRight=\"15dp\" \n\t         android:gravity=\"left\"\n\t         android:background=\"#ffffff\"\n\t         android:textSize=\"14sp\"\n\t         android:textColor=\"#464646\"\n\t         android:singleLine=\"false\"\n\t         android:lineSpacingExtra=\"5dp\"\n\t         android:text=\"@string/desc4\"/>\n\t </TableRow> \n</TableLayout>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/dialog.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:orientation=\"vertical\"\n    android:layout_width=\"fill_parent\"\n    android:minWidth=\"280dip\"\n    android:layout_height=\"wrap_content\">\n \n    <LinearLayout \n        android:orientation=\"vertical\"\n        android:background=\"#6e6e6e\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\">\n \n        <TextView\n            style=\"@style/DialogText.Title\"\n            android:id=\"@+id/title\"\n            android:paddingRight=\"8dip\"\n            android:paddingLeft=\"8dip\" \n            android:textColor=\"#ffffff\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"/>\n \n    </LinearLayout>\n \n    <LinearLayout \n        android:id=\"@+id/content\"\n        android:orientation=\"vertical\"  \n        android:background=\"#ffffff\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"100dp\">\n \n        <TextView\n            style=\"@style/DialogText\"\n            android:id=\"@+id/message\"\n            android:padding=\"5dip\" \n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"wrap_content\"/>\n \n    </LinearLayout>\n \n    <LinearLayout \n        android:orientation=\"horizontal\" \n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\">\n       \n        \n         <Button \n            android:id=\"@+id/negativeButton\"\n            android:layout_marginTop=\"3dip\"\n            android:layout_width=\"0dip\"\n            android:layout_weight=\"1\"\n            android:background=\"#ffffff\"\n            android:textColor=\"#6e6e6e\"\n            android:layout_height=\"wrap_content\"\n            android:singleLine=\"true\"/>\n \n         <Button \n            android:id=\"@+id/positiveButton\"\n            android:layout_marginTop=\"3dip\"\n            android:layout_width=\"0dip\"\n            android:background=\"#6e0000\"\n            android:textColor=\"#ffffff\"\n            android:layout_weight=\"1\"\n            android:layout_height=\"wrap_content\"\n            android:singleLine=\"true\"/>\n        \n       \n\t\t \n       \n \n    </LinearLayout>\n \n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/dialog_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?><!--\n/*\n** Copyright 2010, The Android Open Source Project\n**\n** Licensed under the Apache License, Version 2.0 (the \"License\");\n** you may not use this file except in compliance with the License.\n** You may obtain a copy of the License at\n**\n**     http://www.apache.org/licenses/LICENSE-2.0\n**\n** Unless required by applicable law or agreed to in writing, software\n** distributed under the License is distributed on an \"AS IS\" BASIS,\n** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n** See the License for the specific language governing permissions and\n** limitations under the License.\n*/\n\nhttps://github.com/android/platform_frameworks_base/blob/master/core/res/res/layout/alert_dialog_holo.xml\n\n-->\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/main\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:paddingLeft=\"@dimen/dialog_padding\"\n    android:paddingRight=\"@dimen/dialog_padding\">\n\n    <LinearLayout\n\n        android:id=\"@+id/parentPanel\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_centerInParent=\"true\"\n        android:background=\"@drawable/dialog_bg\"\n        android:clickable=\"false\"\n        android:orientation=\"vertical\"\n        android:visibility=\"visible\">\n\n        <LinearLayout\n            android:id=\"@+id/topPanel\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:background=\"#22000000\"\n            android:orientation=\"vertical\">\n\n            <RelativeLayout\n                android:id=\"@+id/title_template\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"48dp\"\n                android:layout_marginEnd=\"16dip\"\n                android:layout_marginStart=\"16dip\">\n\n                <ImageView\n                    android:id=\"@+id/icon\"\n                    android:layout_width=\"32dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_centerVertical=\"true\"\n                    android:layout_margin=\"8dip\"\n                    android:scaleType=\"centerInside\"\n                    android:src=\"@null\" />\n\n                <TextView\n                    android:id=\"@+id/alertTitle\"\n                    style=\"@style/DialogWindowTitle\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_centerInParent=\"true\"\n                    android:layout_marginLeft=\"8dip\"\n                    android:ellipsize=\"end\"\n                    android:gravity=\"center\"\n                    android:singleLine=\"true\" />\n            </RelativeLayout>\n\n            <View\n                android:id=\"@+id/titleDivider\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"0.5dp\"\n                android:background=\"@color/divider_color\"\n                android:visibility=\"visible\" />\n        </LinearLayout>\n\n        <LinearLayout\n            android:id=\"@+id/contentPanel\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:orientation=\"vertical\">\n\n            <TextView\n                android:id=\"@+id/message\"\n                style=\"?android:attr/textAppearanceMedium\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"15dp\"\n                android:layout_marginRight=\"15dp\"\n                android:paddingBottom=\"8dip\"\n                android:paddingEnd=\"16dip\"\n                android:paddingStart=\"16dip\"\n                android:paddingTop=\"8dip\"\n                android:textColor=\"@color/msg_color\"\n                android:textIsSelectable=\"true\" />\n        </LinearLayout>\n\n        <FrameLayout\n            android:id=\"@+id/customPanel\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"></FrameLayout>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\">\n\n            <Button\n                android:id=\"@+id/button1\"\n                style=\"@style/dialog_btn\"\n                android:layout_marginLeft=\"10dp\"\n                android:layout_marginRight=\"5dp\"\n                android:text=\"OK\"\n                android:visibility=\"gone\" />\n\n            <Button\n                android:id=\"@+id/button2\"\n                style=\"@style/dialog_btn\"\n                android:layout_marginLeft=\"5dp\"\n                android:layout_marginRight=\"10dp\"\n                android:text=\"Cancle\"\n                android:visibility=\"gone\" />\n        </LinearLayout>\n    </LinearLayout>\n</RelativeLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/dialog_multichoice_item.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"fill_parent\"\n    android:background=\"@color/white\"\n    android:focusable=\"false\"\n    android:gravity=\"center\"\n    android:minHeight=\"46.0dip\"\n    android:orientation=\"horizontal\" >\n\n    <TextView\n        android:id=\"@+id/contact_name\"\n        android:layout_width=\"0.0dip\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"left|center\"\n        android:layout_weight=\"6\"\n        android:paddingLeft=\"10dp\"\n        android:textColor=\"@color/black\"\n        android:textSize=\"19sp\" />\n    \n    <CheckBox\n        android:id=\"@+id/chk_selectone\"\n        android:layout_width=\"0.0dip\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"right|center\"\n        android:layout_weight=\"1\"\n        android:button=\"@drawable/checkbox\"\n        android:checked=\"false\"\n        android:clickable=\"false\"\n        android:focusable=\"false\"\n        android:gravity=\"right|center\" />\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/dialog_multichoice_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"fill_parent\"\n    android:clickable=\"true\"\n    android:orientation=\"vertical\"\n    android:padding=\"10dp\" >\n\n    <LinearLayout\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center\"\n        android:background=\"@drawable/bg_bombbox\"\n        android:orientation=\"vertical\" >\n\n        <RelativeLayout\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"40dp\"\n            android:layout_gravity=\"center\"\n            android:orientation=\"horizontal\" >\n\n            <TextView\n                android:id=\"@+id/multichoic_title\"\n                style=\"@style/text_18_ffffff\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_centerHorizontal=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_weight=\"6\"\n                android:paddingLeft=\"10.0dip\"\n                android:text=\"@string/please_select\"\n                android:visibility=\"visible\" />\n\n            <ImageView\n                android:id=\"@+id/chk_selectall\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"10dp\"\n                android:focusable=\"false\"\n                android:src=\"@drawable/abc_ic_clear_normal\" />\n        </RelativeLayout>\n\n        <LinearLayout\n            android:id=\"@+id/content\"\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"wrap_content\"\n            android:gravity=\"center\" >\n\n            <ListView\n                android:id=\"@+id/multichoiceList\"\n                android:layout_width=\"fill_parent\"\n                android:layout_height=\"400dip\"\n                android:cacheColorHint=\"@color/transparent\"\n                android:divider=\"@color/listview_divider\"\n                android:dividerHeight=\"1dp\"\n                android:minHeight=\"120.0dip\" />\n        </LinearLayout>\n\n        <View\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"1.0px\"\n            android:background=\"@color/ffd0d0d0\" />\n\n        <LinearLayout\n            android:id=\"@+id/dialog_bottom\"\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"60.0dip\"\n            android:layout_gravity=\"bottom\"\n            android:background=\"@drawable/dialog_bottom_bg\"\n            android:gravity=\"center\"\n            android:orientation=\"horizontal\" >\n\n            <Button\n                android:id=\"@+id/negativeButton\"\n                style=\"@style/text_15_666666_sdw\"\n                android:layout_width=\"114.0dip\"\n                android:layout_height=\"40.0dip\"\n                android:background=\"@drawable/btn_cancel_selector\"\n                android:gravity=\"center\"\n                android:text=\"@string/cancel\" />\n\n            <Button\n                android:id=\"@+id/positiveButton\"\n                style=\"@style/text_15_ffffff_sdw\"\n                android:layout_width=\"114.0dip\"\n                android:layout_height=\"40.0dip\"\n                android:layout_marginLeft=\"20.0dip\"\n                android:background=\"@drawable/btn_login_selector\"\n                android:gravity=\"center\"\n                android:text=\"@string/ok\" />\n        </LinearLayout>\n    </LinearLayout>\n\n    <View\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:visibility=\"gone\" />\n\n</FrameLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/fragment_1.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"fill_parent\"\n    android:orientation=\"vertical\" >\n\n    <LinearLayout\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"270dp\"\n        android:background=\"@drawable/main_bg\"\n        android:orientation=\"vertical\"\n        android:paddingTop=\"20dp\" >\n\n        <LinearLayout\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"10dp\"\n            android:layout_marginRight=\"10dp\"\n            android:layout_marginTop=\"15dp\"\n            android:background=\"@drawable/main_top_month_report_bg\"\n            android:orientation=\"horizontal\"\n            android:paddingLeft=\"20dp\"\n            android:paddingTop=\"30dp\" >\n\n            <LinearLayout\n                android:id=\"@+id/month_expense_ly\"\n                android:layout_width=\"255dp\"\n                android:layout_height=\"wrap_content\"\n                android:clickable=\"true\"\n                android:focusable=\"true\"\n                android:orientation=\"vertical\" >\n\n                <LinearLayout\n                    android:layout_width=\"fill_parent\"\n                    android:layout_height=\"40dp\"\n                    android:orientation=\"horizontal\" >\n\n                    <TextView\n                        style=\"@style/main_money_label_hdpi\"\n                        android:text=\"收入总额:\"\n                        android:textColor=\"@color/white\" />\n\n                    <TextView\n                        android:id=\"@+id/income_amount\"\n                        style=\"@style/main_money_hdpi\"\n                        android:textColor=\"@color/white\" />\n                </LinearLayout>\n\n                <LinearLayout\n                    android:layout_width=\"fill_parent\"\n                    android:layout_height=\"70dp\"\n                    android:orientation=\"horizontal\" >\n\n                    <TextView\n                        style=\"@style/main_money_label_hdpi\"\n                        android:text=\"支出总额:\"\n                        android:textColor=\"@color/white\" />\n\n                    <TextView\n                        android:id=\"@+id/expense_amount\"\n                        style=\"@style/main_money_hdpi\"\n                        android:textColor=\"@color/white\" />\n                </LinearLayout>\n            </LinearLayout>\n        </LinearLayout>\n\n        <Button\n            android:id=\"@+id/add_expense_quickly_btn\"\n            android:layout_width=\"310dp\"\n            android:layout_height=\"50dp\"\n            android:layout_gravity=\"center_horizontal\"\n            android:layout_marginBottom=\"15dp\"\n            android:layout_marginTop=\"15dp\"\n            android:background=\"@drawable/main_add_expense_quickly\"\n            android:text=\"记一笔\"\n            android:textColor=\"#ffffff\"\n            android:textSize=\"26dp\"\n            android:textStyle=\"bold\" />\n    </LinearLayout>\n\n    <RelativeLayout\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"#ffca39\"\n        android:orientation=\"vertical\"\n        android:paddingBottom=\"5dp\"\n        android:paddingTop=\"5dp\" >\n\n        <TextView\n            android:id=\"@+id/lvtime\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_centerHorizontal=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:text=\"2015-4-10\"\n            android:textColor=\"#602a08\"\n            android:textSize=\"20dp\" />\n    </RelativeLayout>\n\n    <LinearLayout\n        android:id=\"@+id/linearLayout2\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"0dp\"\n        android:layout_marginLeft=\"4dp\"\n        android:layout_marginRight=\"4dp\"\n        android:layout_weight=\"0.95\"\n        android:orientation=\"vertical\" >\n\n        <ListView\n            android:id=\"@+id/lvoutaccountinfo\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:cacheColorHint=\"@android:color/transparent\"\n            android:listSelector=\"@drawable/selector\"\n            android:scrollbarAlwaysDrawVerticalTrack=\"true\" />\n\n        <RelativeLayout\n            android:id=\"@+id/lvnodata\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:visibility=\"gone\" >\n\n            <ImageView\n                android:id=\"@+id/search_img_nodata\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentTop=\"true\"\n                android:layout_centerHorizontal=\"true\"\n                android:layout_marginTop=\"40dp\"\n                android:background=\"@drawable/image_cry_man\" />\n\n            <TextView\n                android:id=\"@+id/lv_text1\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_below=\"@id/search_img_nodata\"\n                android:layout_centerHorizontal=\"true\"\n                android:layout_marginTop=\"15dp\"\n                android:text=\"今天还没有收入/消费\"\n                android:textColor=\"#b3b4b7\"\n                android:textSize=\"20sp\"\n                android:textStyle=\"bold\" />\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_below=\"@id/lv_text1\"\n                android:layout_centerHorizontal=\"true\"\n                android:layout_marginTop=\"15dp\"\n                android:text=\"赶紧买买买！\"\n                android:textColor=\"#b3b4b7\"\n                android:textSize=\"20sp\"\n                android:textStyle=\"bold\" />\n        </RelativeLayout>\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/fragment_2.xml",
    "content": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\" >\n    \n      <FrameLayout  \n        android:id=\"@+id/frameLayout1\"  \n        android:layout_width=\"wrap_content\"  \n        android:layout_height=\"66dp\"  \n        android:layout_alignParentBottom=\"true\"  \n        android:layout_alignParentLeft=\"true\"  \n        android:background=\"@drawable/toolbar_bg_normal\" >  \n  \n        <LinearLayout  \n            android:layout_width=\"fill_parent\"  \n            android:layout_height=\"fill_parent\"  \n            android:layout_marginTop=\"1dp\"  \n            android:gravity=\"center_horizontal\" >  \n  \n            <FrameLayout  \n                android:id=\"@+id/layout_friendfeed\"  \n                android:layout_width=\"fill_parent\"  \n                android:layout_height=\"60dp\"  \n                android:layout_weight=\"1\">  \n  \n                <ImageView  \n                    android:id=\"@+id/image_friendfeed\"  \n                    android:layout_width=\"wrap_content\"  \n                    android:layout_height=\"wrap_content\"  \n                    android:layout_gravity=\"top|center\"  \n                    android:layout_marginTop=\"16.0dip\"  \n                    android:src=\"@drawable/tab_friendfeed_btn\" />  \n  \n                <TextView  \n                    android:layout_width=\"wrap_content\"  \n                    android:layout_height=\"wrap_content\"  \n                    android:layout_gravity=\"bottom|center\"  \n                    android:layout_marginTop=\"6.0dip\"   \n                    android:text=\"明细\"  \n                    android:textColor=\"@color/tab_friendfeed_text\"  \n                    android:textSize=\"12sp\" />  \n            </FrameLayout>  \n  \n            <FrameLayout  \n                android:id=\"@+id/layout_myfeed\"  \n                android:layout_width=\"fill_parent\"  \n                android:layout_height=\"60dp\"  \n                android:layout_weight=\"1\" >  \n  \n                <ImageView  \n                    android:id=\"@+id/image_myfeed\"  \n                    android:layout_width=\"wrap_content\"  \n                    android:layout_height=\"wrap_content\"  \n                    android:layout_gravity=\"top|center\"  \n                    android:layout_marginTop=\"16.0dip\"  \n                    android:src=\"@drawable/tab_myfeed_btn\" />  \n  \n                <TextView  \n                    android:layout_width=\"wrap_content\"  \n                    android:layout_height=\"wrap_content\"  \n                    android:layout_gravity=\"bottom|center\"  \n                    android:layout_marginTop=\"6.0dip\"    \n                    android:text=\"报表\"  \n                    android:textColor=\"@color/tab_myfeed_text\"  \n                    android:textSize=\"12sp\" />  \n            </FrameLayout>  \n  \n            <FrameLayout  \n                android:layout_width=\"fill_parent\"  \n                android:layout_height=\"wrap_content\"  \n                android:layout_weight=\"1\" >  \n            </FrameLayout>  \n  \n            <FrameLayout  \n                android:id=\"@+id/layout_home\"  \n                android:layout_width=\"fill_parent\"  \n                android:layout_height=\"60dp\"  \n                android:layout_weight=\"1\" >  \n  \n                <ImageView  \n                    android:id=\"@+id/image_home\"  \n                    android:layout_width=\"wrap_content\"  \n                    android:layout_height=\"wrap_content\"  \n                    android:layout_gravity=\"top|center\"  \n                    android:layout_marginTop=\"16.0dip\"  \n                    android:src=\"@drawable/tab_home_btn\" />  \n  \n                <TextView  \n                    android:layout_width=\"wrap_content\"  \n                    android:layout_height=\"wrap_content\"  \n                    android:layout_gravity=\"bottom|center\"  \n                    android:layout_marginTop=\"6.0dip\"  \n                    android:text=\"账户\"  \n                    android:textColor=\"@color/tab_home_text\"  \n                    android:textSize=\"12sp\" />  \n            </FrameLayout>  \n  \n            <FrameLayout  \n                android:id=\"@+id/layout_more\"  \n                android:layout_width=\"fill_parent\"  \n                android:layout_height=\"60dp\"  \n                android:layout_weight=\"1\" >  \n  \n                <ImageView  \n                    android:id=\"@+id/image_more\"  \n                    android:layout_width=\"wrap_content\"  \n                    android:layout_height=\"wrap_content\"  \n                    android:layout_gravity=\"top|center\"  \n                    android:layout_marginTop=\"16.0dip\"  \n                    android:src=\"@drawable/tab_more_btn\" />  \n  \n                <TextView  \n                    android:layout_width=\"wrap_content\"  \n                    android:layout_height=\"wrap_content\"  \n                    android:layout_gravity=\"bottom|center\"  \n                    android:layout_marginTop=\"6.0dip\"  \n                    android:text=\"更多\"  \n                    android:textColor=\"@color/tab_more_text\"  \n                    android:textSize=\"12sp\" />  \n            </FrameLayout>  \n        </LinearLayout>  \n    </FrameLayout>  \n<!--  \n    <FrameLayout  \n        android:id=\"@+id/toggle_btnLayout\" \n        android:layout_width=\"fill_parent\"  \n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\" \n        android:layout_alignParentLeft=\"true\" >\n -->\n    <ImageView  \n        android:id=\"@+id/toggle_btn\"  \n        android:layout_width=\"wrap_content\"  \n        android:layout_height=\"wrap_content\"  \n        android:layout_alignParentBottom=\"true\"  \n        android:layout_centerHorizontal=\"true\"\n        android:src=\"@drawable/toolbar_btn_normal\" /> \n<!--  \n  \t</FrameLayout>\n--> \n    <ImageView  \n        android:id=\"@+id/plus_btn\"  \n        android:layout_width=\"fill_parent\"  \n        android:layout_height=\"wrap_content\"  \n        android:layout_alignTop=\"@+id/frameLayout1\"  \n        android:layout_centerHorizontal=\"true\"  \n        android:layout_marginTop=\"24dip\"  \n        android:src=\"@drawable/toolbar_plus\" />  \n    \n    \n</RelativeLayout>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/fragment_3.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/fragall\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\" >\n\n    <LinearLayout\n        android:id=\"@+id/top3\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"20dp\"\n        android:background=\"#ff8e6b\"\n        android:orientation=\"vertical\" >\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/frag3\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"vertical\" >\n\n        <RelativeLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"50dp\"\n            android:background=\"#ff8e6b\"\n            android:paddingLeft=\"10dip\"\n            android:paddingRight=\"10dip\"\n            android:paddingTop=\"10dip\" >\n\n            <TextView\n                android:id=\"@+id/sum_title\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"match_parent\"\n                android:layout_gravity=\"center_vertical\"\n                android:text=\"2015年结余\"\n                android:textColor=\"@android:color/white\"\n                android:textSize=\"26sp\" />\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"match_parent\"\n                android:layout_gravity=\"center_vertical\"\n                android:layout_toLeftOf=\"@+id/sum_total\"\n                android:text=\"￥ \"\n                android:textColor=\"@android:color/white\"\n                android:textSize=\"26sp\" />\n\n            <com.cwp.chart.RiseNumberTextView\n                android:id=\"@+id/sum_total\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"match_parent\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_gravity=\"center_vertical\"\n                android:text=\"50000.0\"\n                android:textColor=\"@android:color/white\"\n                android:textSize=\"26sp\" />\n        </RelativeLayout>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"40dp\"\n            android:orientation=\"horizontal\" >\n\n            <RelativeLayout\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"match_parent\"\n                android:layout_weight=\"1\"\n                android:background=\"#e04157\"\n                android:orientation=\"horizontal\"\n                android:paddingLeft=\"10dip\"\n                android:paddingRight=\"10dip\" >\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_alignParentLeft=\"true\"\n                    android:gravity=\"center_vertical|center\"\n                    android:text=\"收入\"\n                    android:textColor=\"@android:color/white\"\n                    android:textSize=\"18sp\" />\n\n                <TextView\n                    android:id=\"@+id/sum_income\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_alignParentRight=\"true\"\n                    android:gravity=\"center_vertical|center\"\n                    android:text=\"￥ 50000.0\"\n                    android:textColor=\"@android:color/white\"\n                    android:textSize=\"18sp\" />\n            </RelativeLayout>\n\n            <RelativeLayout\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"match_parent\"\n                android:layout_weight=\"1\"\n                android:background=\"#33cd91\"\n                android:gravity=\"right\"\n                android:orientation=\"horizontal\"\n                android:paddingLeft=\"10dip\"\n                android:paddingRight=\"10dip\" >\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_alignParentLeft=\"true\"\n                    android:gravity=\"center_vertical|center\"\n                    android:text=\"支出\"\n                    android:textColor=\"@android:color/white\"\n                    android:textSize=\"18sp\" />\n\n                <TextView\n                    android:id=\"@+id/sum_pay\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_alignParentRight=\"true\"\n                    android:gravity=\"center_vertical|center\"\n                    android:text=\"￥ 50000.0\"\n                    android:textColor=\"@android:color/white\"\n                    android:textSize=\"18sp\" />\n            </RelativeLayout>\n        </LinearLayout>\n    </LinearLayout>\n\n    <RelativeLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"50dp\"\n        android:background=\"#ffca39\"\n        android:paddingBottom=\"7dp\"\n        android:paddingLeft=\"10dp\"\n        android:paddingRight=\"10dp\"\n        android:paddingTop=\"7dp\" >\n\n        <RelativeLayout\n            android:id=\"@+id/search_button\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:background=\"@drawable/search_button_type\" >\n\n            <LinearLayout\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_centerInParent=\"true\"\n                android:orientation=\"horizontal\" >\n\n                <ImageView\n                    android:id=\"@+id/iv_search\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:alpha=\"0.5\"\n                    android:src=\"@drawable/ic_menu_search\" />\n\n                <TextView\n                    android:id=\"@+id/tv_search\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_gravity=\"center\"\n                    android:gravity=\"center\"\n                    android:text=\"搜索\"\n                    android:textColor=\"#999999\"\n                    android:textSize=\"15dp\" />\n            </LinearLayout>\n        </RelativeLayout>\n    </RelativeLayout>\n\n    <com.cwp.chart.PullToRefreshView\n        android:id=\"@+id/main_pull_refresh_view\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"match_parent\"\n        android:background=\"#ff8e6b\"\n        android:orientation=\"vertical\" >\n\n        <ExpandableListView\n            android:id=\"@+id/expandableListView\"\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"fill_parent\"\n            android:background=\"@drawable/rect_white_bg\"\n            android:drawSelectorOnTop=\"false\" >\n        </ExpandableListView>\n    </com.cwp.chart.PullToRefreshView>\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/fragment_4.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"wrap_content\"\n    android:background=\"#820000\"\n    android:orientation=\"vertical\" >\n\n    <ListView\n        android:id=\"@+id/settinglisv\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginBottom=\"5dp\"\n        android:layout_marginTop=\"50dp\"\n        android:background=\"#ffffff\"\n        android:cacheColorHint=\"@android:color/transparent\"\n        android:divider=\"#e6e6e6\"\n        android:dividerHeight=\"1px\"\n        android:entries=\"@array/settingtype\"\n        android:listSelector=\"@drawable/selector\"\n        android:padding=\"10dp\" >\n    </ListView>\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/fragment_5.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"wrap_content\"\n    android:gravity=\"center_horizontal\"\n    android:orientation=\"vertical\" >\n\n    <TextView\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"10dp\"\n        android:gravity=\"left\"\n        android:text=\"目前登陆的用户为：\"\n        android:textColor=\"#6e6e6e\"\n        android:textSize=\"16sp\" >\n    </TextView>\n\n    <TextView\n        android:id=\"@+id/usernow\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginBottom=\"10dp\"\n        android:layout_marginTop=\"5dp\"\n        android:gravity=\"center_horizontal\"\n        android:text=\"test\"\n        android:textColor=\"#a00000\"\n        android:textSize=\"18sp\" >\n    </TextView>\n\n    <Button\n        android:id=\"@+id/accregister\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"20dp\"\n        android:layout_marginRight=\"20dp\"\n        android:layout_marginTop=\"20dp\"\n        android:background=\"#21a0a0\"\n        android:text=\"用户注册\"\n        android:textColor=\"#ffffff\"\n        android:textSize=\"22sp\" />\n\n    <Button\n        android:id=\"@+id/acclogin\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"20dp\"\n        android:layout_marginRight=\"20dp\"\n        android:layout_marginTop=\"10dp\"\n        android:background=\"#21a0a0\"\n        android:text=\"切换用户\"\n        android:textColor=\"#ffffff\"\n        android:textSize=\"22sp\" />\n\n    <Button\n        android:id=\"@+id/accchange\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"20dp\"\n        android:layout_marginRight=\"20dp\"\n        android:layout_marginTop=\"10dp\"\n        android:background=\"#21a0a0\"\n        android:text=\"修改用户名密码\"\n        android:textColor=\"#ffffff\"\n        android:textSize=\"22sp\" />\n\n    <Button\n        android:id=\"@+id/alldelete\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"20dp\"\n        android:layout_marginRight=\"20dp\"\n        android:layout_marginTop=\"10dp\"\n        android:background=\"#21a0a0\"\n        android:text=\"删除当前用户及所有数据\"\n        android:textColor=\"#ffffff\"\n        android:textSize=\"22sp\" />\n\n    <Button\n        android:id=\"@+id/accadminlogin\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"20dp\"\n        android:layout_marginRight=\"20dp\"\n        android:layout_marginTop=\"10dp\"\n        android:text=\"使用默认用户登录\"\n        android:textColor=\"#ffffff\"\n        android:textSize=\"22sp\" />\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/fragnew_3.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"vertical\" >\n\n    <LinearLayout\n        android:id=\"@+id/December_layout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"5dp\"\n        android:layout_marginRight=\"5dp\"\n        android:orientation=\"vertical\"\n >\n\n        <RelativeLayout\n            android:id=\"@+id/December_bar_layout\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"70dp\"\n            android:background=\"@drawable/rect_white_bg\"\n            android:paddingBottom=\"5dp\"\n            android:paddingTop=\"5dp\" >\n\n            <TextView\n                android:id=\"@+id/December_day\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"12月\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"25dp\" />\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_below=\"@id/December_day\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"12.01-12.31\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"13dp\" />\n\n            <TextView\n                android:id=\"@+id/December_text_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_marginRight=\"45dp\"\n                android:text=\"结余\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"15dp\" />\n\n            <TextView\n                android:id=\"@+id/December_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_below=\"@id/December_text_money\"\n                android:layout_marginRight=\"45dp\"\n                android:paddingTop=\"5dp\"\n                android:tag=\"money_arrow\"\n                android:text=\"-500.0\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"20dp\" />\n\n            <ImageView\n                android:layout_width=\"12dp\"\n                android:layout_height=\"6dp\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"10dp\"\n                android:background=\"@drawable/service_arrow_down\"\n                android:tag=\"service_arrow\" />\n        </RelativeLayout>\n\n        <com.cwp.chart.FoldingLayout\n            android:id=\"@+id/December_item\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"100dp\"\n            android:tag=\"service_item\" >\n\n            <LinearLayout\n                android:id=\"@+id/December_item_layout\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:background=\"#699bf9\"\n                android:orientation=\"vertical\"\n                android:tag=\"item_arrow\" >\n\n                <ListView\n                    android:id=\"@+id/December_list\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_marginLeft=\"5dp\"\n                    android:layout_marginRight=\"5dp\"\n                    android:background=\"#f3f3f3\"\n                    android:cacheColorHint=\"@android:color/transparent\"\n                    android:listSelector=\"@drawable/selector\"\n                    android:scrollbarAlwaysDrawVerticalTrack=\"false\"\n                    android:tag=\"list_arrow\" />\n\n                <TextView\n                    android:id=\"@+id/December_nodata\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:gravity=\"center_vertical|center\"\n                    android:tag=\"nodata_arrow\"\n                    android:text=\"无记录\"\n                    android:textColor=\"#fff0f0f0\"\n                    android:textSize=\"40sp\"\n                    android:visibility=\"gone\" />\n            </LinearLayout>\n        </com.cwp.chart.FoldingLayout>\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/November_layout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"5dp\"\n        android:layout_marginRight=\"5dp\"\n        android:orientation=\"vertical\"\n        android:visibility=\"gone\" >\n\n        <RelativeLayout\n            android:id=\"@+id/November_bar_layout\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"70dp\"\n            android:background=\"@drawable/rect_white_bg\"\n            android:paddingBottom=\"5dp\"\n            android:paddingTop=\"5dp\" >\n\n            <TextView\n                android:id=\"@+id/November_day\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"11月\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"25dp\" />\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_below=\"@id/November_day\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"11.01-11.30\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"13dp\" />\n\n            <TextView\n                android:id=\"@+id/November_text_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_marginRight=\"45dp\"\n                android:text=\"结余\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"15dp\" />\n\n            <TextView\n                android:id=\"@+id/November_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_below=\"@id/November_text_money\"\n                android:layout_marginRight=\"45dp\"\n                android:paddingTop=\"5dp\"\n                android:tag=\"money_arrow\"\n                android:text=\"-500.0\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"20dp\" />\n\n            <ImageView\n                android:layout_width=\"12dp\"\n                android:layout_height=\"6dp\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"10dp\"\n                android:background=\"@drawable/service_arrow_down\"\n                android:tag=\"service_arrow\" />\n        </RelativeLayout>\n\n        <com.cwp.chart.FoldingLayout\n            android:id=\"@+id/November_item\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"100dp\"\n            android:tag=\"service_item\" >\n\n            <LinearLayout\n                android:id=\"@+id/November_item_layout\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:background=\"#699bf9\"\n                android:orientation=\"vertical\"\n                android:tag=\"item_arrow\" >\n\n                <ListView\n                    android:id=\"@+id/November_list\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_marginLeft=\"5dp\"\n                    android:layout_marginRight=\"5dp\"\n                    android:background=\"#f3f3f3\"\n                    android:cacheColorHint=\"@android:color/transparent\"\n                    android:listSelector=\"@drawable/selector\"\n                    android:scrollbarAlwaysDrawVerticalTrack=\"false\"\n                    android:tag=\"list_arrow\" />\n\n                <TextView\n                    android:id=\"@+id/November_nodata\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:gravity=\"center_vertical|center\"\n                    android:tag=\"nodata_arrow\"\n                    android:text=\"无记录\"\n                    android:textColor=\"#fff0f0f0\"\n                    android:textSize=\"40sp\"\n                    android:visibility=\"gone\" />\n            </LinearLayout>\n        </com.cwp.chart.FoldingLayout>\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/October_layout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"5dp\"\n        android:layout_marginRight=\"5dp\"\n        android:orientation=\"vertical\"\n        android:visibility=\"gone\" >\n\n        <RelativeLayout\n            android:id=\"@+id/October_bar_layout\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"70dp\"\n            android:background=\"@drawable/rect_white_bg\"\n            android:paddingBottom=\"5dp\"\n            android:paddingTop=\"5dp\" >\n\n            <TextView\n                android:id=\"@+id/October_day\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"10月\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"25dp\" />\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_below=\"@id/October_day\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"10.01-10.31\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"13dp\" />\n\n            <TextView\n                android:id=\"@+id/October_text_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_marginRight=\"45dp\"\n                android:text=\"结余\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"15dp\" />\n\n            <TextView\n                android:id=\"@+id/October_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_below=\"@id/October_text_money\"\n                android:layout_marginRight=\"45dp\"\n                android:paddingTop=\"5dp\"\n                android:tag=\"money_arrow\"\n                android:text=\"-500.0\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"20dp\" />\n\n            <ImageView\n                android:layout_width=\"12dp\"\n                android:layout_height=\"6dp\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"10dp\"\n                android:background=\"@drawable/service_arrow_down\"\n                android:tag=\"service_arrow\" />\n        </RelativeLayout>\n\n        <com.cwp.chart.FoldingLayout\n            android:id=\"@+id/October_item\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"100dp\"\n            android:tag=\"service_item\" >\n\n            <LinearLayout\n                android:id=\"@+id/October_item_layout\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:background=\"#699bf9\"\n                android:orientation=\"vertical\"\n                android:tag=\"item_arrow\" >\n\n                <ListView\n                    android:id=\"@+id/October_list\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_marginLeft=\"5dp\"\n                    android:layout_marginRight=\"5dp\"\n                    android:background=\"#f3f3f3\"\n                    android:cacheColorHint=\"@android:color/transparent\"\n                    android:listSelector=\"@drawable/selector\"\n                    android:scrollbarAlwaysDrawVerticalTrack=\"false\"\n                    android:tag=\"list_arrow\" />\n\n                <TextView\n                    android:id=\"@+id/October_nodata\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:gravity=\"center_vertical|center\"\n                    android:tag=\"nodata_arrow\"\n                    android:text=\"无记录\"\n                    android:textColor=\"#fff0f0f0\"\n                    android:textSize=\"40sp\"\n                    android:visibility=\"gone\" />\n            </LinearLayout>\n        </com.cwp.chart.FoldingLayout>\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/September_layout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"5dp\"\n        android:layout_marginRight=\"5dp\"\n        android:orientation=\"vertical\"\n        android:visibility=\"gone\" >\n\n        <RelativeLayout\n            android:id=\"@+id/September_bar_layout\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"70dp\"\n            android:background=\"@drawable/rect_white_bg\"\n            android:paddingBottom=\"5dp\"\n            android:paddingTop=\"5dp\" >\n\n            <TextView\n                android:id=\"@+id/September_day\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"09月\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"25dp\" />\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_below=\"@id/September_day\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"09.01-09.30\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"13dp\" />\n\n            <TextView\n                android:id=\"@+id/September_text_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_marginRight=\"45dp\"\n                android:text=\"结余\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"15dp\" />\n\n            <TextView\n                android:id=\"@+id/September_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_below=\"@id/September_text_money\"\n                android:layout_marginRight=\"45dp\"\n                android:paddingTop=\"5dp\"\n                android:tag=\"money_arrow\"\n                android:text=\"-500.0\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"20dp\" />\n\n            <ImageView\n                android:layout_width=\"12dp\"\n                android:layout_height=\"6dp\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"10dp\"\n                android:background=\"@drawable/service_arrow_down\"\n                android:tag=\"service_arrow\" />\n        </RelativeLayout>\n\n        <com.cwp.chart.FoldingLayout\n            android:id=\"@+id/September_item\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"100dp\"\n            android:tag=\"service_item\" >\n\n            <LinearLayout\n                android:id=\"@+id/September_item_layout\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:background=\"#699bf9\"\n                android:orientation=\"vertical\"\n                android:tag=\"item_arrow\" >\n\n                <ListView\n                    android:id=\"@+id/September_list\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_marginLeft=\"5dp\"\n                    android:layout_marginRight=\"5dp\"\n                    android:background=\"#f3f3f3\"\n                    android:cacheColorHint=\"@android:color/transparent\"\n                    android:listSelector=\"@drawable/selector\"\n                    android:scrollbarAlwaysDrawVerticalTrack=\"false\"\n                    android:tag=\"list_arrow\" />\n\n                <TextView\n                    android:id=\"@+id/September_nodata\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:gravity=\"center_vertical|center\"\n                    android:tag=\"nodata_arrow\"\n                    android:text=\"无记录\"\n                    android:textColor=\"#fff0f0f0\"\n                    android:textSize=\"40sp\"\n                    android:visibility=\"gone\" />\n            </LinearLayout>\n        </com.cwp.chart.FoldingLayout>\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/August_layout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"5dp\"\n        android:layout_marginRight=\"5dp\"\n        android:orientation=\"vertical\"\n        android:visibility=\"gone\" >\n\n        <RelativeLayout\n            android:id=\"@+id/August_bar_layout\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"70dp\"\n            android:background=\"@drawable/rect_white_bg\"\n            android:paddingBottom=\"5dp\"\n            android:paddingTop=\"5dp\" >\n\n            <TextView\n                android:id=\"@+id/August_day\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"08月\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"25dp\" />\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_below=\"@id/August_day\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"08.01-08.31\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"13dp\" />\n\n            <TextView\n                android:id=\"@+id/August_text_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_marginRight=\"45dp\"\n                android:text=\"结余\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"15dp\" />\n\n            <TextView\n                android:id=\"@+id/August_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_below=\"@id/August_text_money\"\n                android:layout_marginRight=\"45dp\"\n                android:paddingTop=\"5dp\"\n                android:tag=\"money_arrow\"\n                android:text=\"-500.0\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"20dp\" />\n\n            <ImageView\n                android:layout_width=\"12dp\"\n                android:layout_height=\"6dp\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"10dp\"\n                android:background=\"@drawable/service_arrow_down\"\n                android:tag=\"service_arrow\" />\n        </RelativeLayout>\n\n        <com.cwp.chart.FoldingLayout\n            android:id=\"@+id/August_item\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"100dp\"\n            android:tag=\"service_item\" >\n\n            <LinearLayout\n                android:id=\"@+id/August_item_layout\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:background=\"#699bf9\"\n                android:orientation=\"vertical\"\n                android:tag=\"item_arrow\" >\n\n                <ListView\n                    android:id=\"@+id/August_list\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_marginLeft=\"5dp\"\n                    android:layout_marginRight=\"5dp\"\n                    android:background=\"#f3f3f3\"\n                    android:cacheColorHint=\"@android:color/transparent\"\n                    android:listSelector=\"@drawable/selector\"\n                    android:scrollbarAlwaysDrawVerticalTrack=\"false\"\n                    android:tag=\"list_arrow\" />\n\n                <TextView\n                    android:id=\"@+id/August_nodata\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:gravity=\"center_vertical|center\"\n                    android:tag=\"nodata_arrow\"\n                    android:text=\"无记录\"\n                    android:textColor=\"#fff0f0f0\"\n                    android:textSize=\"40sp\"\n                    android:visibility=\"gone\" />\n            </LinearLayout>\n        </com.cwp.chart.FoldingLayout>\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/July_layout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"5dp\"\n        android:layout_marginRight=\"5dp\"\n        android:orientation=\"vertical\"\n        android:visibility=\"gone\" >\n\n        <RelativeLayout\n            android:id=\"@+id/July_bar_layout\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"70dp\"\n            android:background=\"@drawable/rect_white_bg\"\n            android:paddingBottom=\"5dp\"\n            android:paddingTop=\"5dp\" >\n\n            <TextView\n                android:id=\"@+id/July_day\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"07月\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"25dp\" />\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_below=\"@id/July_day\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"07.01-07.31\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"13dp\" />\n\n            <TextView\n                android:id=\"@+id/July_text_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_marginRight=\"45dp\"\n                android:text=\"结余\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"15dp\" />\n\n            <TextView\n                android:id=\"@+id/July_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_below=\"@id/July_text_money\"\n                android:layout_marginRight=\"45dp\"\n                android:paddingTop=\"5dp\"\n                android:tag=\"money_arrow\"\n                android:text=\"-500.0\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"20dp\" />\n\n            <ImageView\n                android:layout_width=\"12dp\"\n                android:layout_height=\"6dp\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"10dp\"\n                android:background=\"@drawable/service_arrow_down\"\n                android:tag=\"service_arrow\" />\n        </RelativeLayout>\n\n        <com.cwp.chart.FoldingLayout\n            android:id=\"@+id/July_item\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"100dp\"\n            android:tag=\"service_item\" >\n\n            <LinearLayout\n                android:id=\"@+id/July_item_layout\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:background=\"#699bf9\"\n                android:orientation=\"vertical\"\n                android:tag=\"item_arrow\" >\n\n                <ListView\n                    android:id=\"@+id/July_list\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_marginLeft=\"5dp\"\n                    android:layout_marginRight=\"5dp\"\n                    android:background=\"#f3f3f3\"\n                    android:cacheColorHint=\"@android:color/transparent\"\n                    android:listSelector=\"@drawable/selector\"\n                    android:scrollbarAlwaysDrawVerticalTrack=\"false\"\n                    android:tag=\"list_arrow\" />\n\n                <TextView\n                    android:id=\"@+id/July_nodata\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:gravity=\"center_vertical|center\"\n                    android:tag=\"nodata_arrow\"\n                    android:text=\"无记录\"\n                    android:textColor=\"#fff0f0f0\"\n                    android:textSize=\"40sp\"\n                    android:visibility=\"gone\" />\n            </LinearLayout>\n        </com.cwp.chart.FoldingLayout>\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/June_layout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"5dp\"\n        android:layout_marginRight=\"5dp\"\n        android:orientation=\"vertical\"\n        android:visibility=\"gone\" >\n\n        <RelativeLayout\n            android:id=\"@+id/June_bar_layout\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"70dp\"\n            android:background=\"@drawable/rect_white_bg\"\n            android:paddingBottom=\"5dp\"\n            android:paddingTop=\"5dp\" >\n\n            <TextView\n                android:id=\"@+id/June_day\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"06月\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"25dp\" />\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_below=\"@id/June_day\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"06.01-06.30\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"13dp\" />\n\n            <TextView\n                android:id=\"@+id/June_text_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_marginRight=\"45dp\"\n                android:text=\"结余\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"15dp\" />\n\n            <TextView\n                android:id=\"@+id/June_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_below=\"@id/June_text_money\"\n                android:layout_marginRight=\"45dp\"\n                android:paddingTop=\"5dp\"\n                android:tag=\"money_arrow\"\n                android:text=\"-500.0\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"20dp\" />\n\n            <ImageView\n                android:layout_width=\"12dp\"\n                android:layout_height=\"6dp\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"10dp\"\n                android:background=\"@drawable/service_arrow_down\"\n                android:tag=\"service_arrow\" />\n        </RelativeLayout>\n\n        <com.cwp.chart.FoldingLayout\n            android:id=\"@+id/June_item\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"100dp\"\n            android:tag=\"service_item\" >\n\n            <LinearLayout\n                android:id=\"@+id/June_item_layout\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:background=\"#699bf9\"\n                android:orientation=\"vertical\"\n                android:tag=\"item_arrow\" >\n\n                <ListView\n                    android:id=\"@+id/June_list\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_marginLeft=\"5dp\"\n                    android:layout_marginRight=\"5dp\"\n                    android:background=\"#f3f3f3\"\n                    android:cacheColorHint=\"@android:color/transparent\"\n                    android:listSelector=\"@drawable/selector\"\n                    android:scrollbarAlwaysDrawVerticalTrack=\"false\"\n                    android:tag=\"list_arrow\" />\n\n                <TextView\n                    android:id=\"@+id/June_nodata\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:gravity=\"center_vertical|center\"\n                    android:tag=\"nodata_arrow\"\n                    android:text=\"无记录\"\n                    android:textColor=\"#fff0f0f0\"\n                    android:textSize=\"40sp\"\n                    android:visibility=\"gone\" />\n            </LinearLayout>\n        </com.cwp.chart.FoldingLayout>\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/May_layout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"5dp\"\n        android:layout_marginRight=\"5dp\"\n        android:orientation=\"vertical\"\n        android:visibility=\"gone\" >\n\n        <RelativeLayout\n            android:id=\"@+id/May_bar_layout\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"70dp\"\n            android:background=\"@drawable/rect_white_bg\"\n            android:paddingBottom=\"5dp\"\n            android:paddingTop=\"5dp\" >\n\n            <TextView\n                android:id=\"@+id/May_day\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"05月\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"25dp\" />\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_below=\"@id/May_day\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"05.01-05.31\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"13dp\" />\n\n            <TextView\n                android:id=\"@+id/May_text_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_marginRight=\"45dp\"\n                android:text=\"结余\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"15dp\" />\n\n            <TextView\n                android:id=\"@+id/May_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_below=\"@id/May_text_money\"\n                android:layout_marginRight=\"45dp\"\n                android:paddingTop=\"5dp\"\n                android:tag=\"money_arrow\"\n                android:text=\"-500.0\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"20dp\" />\n\n            <ImageView\n                android:id=\"@+id/traffic_arrow\"\n                android:layout_width=\"12dp\"\n                android:layout_height=\"6dp\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"10dp\"\n                android:background=\"@drawable/service_arrow_down\"\n                android:tag=\"service_arrow\" />\n        </RelativeLayout>\n\n        <com.cwp.chart.FoldingLayout\n            android:id=\"@+id/May_item\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"100dp\"\n            android:tag=\"service_item\" >\n\n            <LinearLayout\n                android:id=\"@+id/May_item_layout\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:background=\"#ff8e6b\"\n                android:orientation=\"vertical\"\n                android:tag=\"item_arrow\" >\n\n                <ListView\n                    android:id=\"@+id/May_list\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_marginLeft=\"5dp\"\n                    android:layout_marginRight=\"5dp\"\n                    android:background=\"#f3f3f3\"\n                    android:cacheColorHint=\"@android:color/transparent\"\n                    android:listSelector=\"@drawable/selector\"\n                    android:scrollbarAlwaysDrawVerticalTrack=\"false\"\n                    android:tag=\"list_arrow\" />\n\n                <TextView\n                    android:id=\"@+id/May_nodata\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:gravity=\"center_vertical|center\"\n                    android:tag=\"nodata_arrow\"\n                    android:text=\"无记录\"\n                    android:textColor=\"#fff0f0f0\"\n                    android:textSize=\"40sp\"\n                    android:visibility=\"gone\" />\n            </LinearLayout>\n        </com.cwp.chart.FoldingLayout>\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/April_layout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"5dp\"\n        android:layout_marginRight=\"5dp\"\n        android:orientation=\"vertical\"\n        android:visibility=\"gone\" >\n\n        <RelativeLayout\n            android:id=\"@+id/April_bar_layout\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"70dp\"\n            android:background=\"@drawable/rect_white_bg\"\n            android:paddingBottom=\"5dp\"\n            android:paddingTop=\"5dp\" >\n\n            <TextView\n                android:id=\"@+id/April_day\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"04月\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"25dp\" />\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_below=\"@id/April_day\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"04.01-04.30\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"13dp\" />\n\n            <TextView\n                android:id=\"@+id/April_text_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_marginRight=\"45dp\"\n                android:text=\"结余\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"15dp\" />\n\n            <TextView\n                android:id=\"@+id/April_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_below=\"@id/April_text_money\"\n                android:layout_marginRight=\"45dp\"\n                android:paddingTop=\"5dp\"\n                android:tag=\"money_arrow\"\n                android:text=\"-500.0\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"20dp\" />\n\n            <ImageView\n                android:layout_width=\"12dp\"\n                android:layout_height=\"6dp\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"10dp\"\n                android:background=\"@drawable/service_arrow_down\"\n                android:tag=\"service_arrow\" />\n        </RelativeLayout>\n\n        <com.cwp.chart.FoldingLayout\n            android:id=\"@+id/April_item\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"100dp\"\n            android:tag=\"service_item\" >\n\n            <LinearLayout\n                android:id=\"@+id/April_item_layout\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:background=\"#699bf9\"\n                android:orientation=\"vertical\"\n                android:tag=\"item_arrow\" >\n\n                <ListView\n                    android:id=\"@+id/April_list\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_marginLeft=\"5dp\"\n                    android:layout_marginRight=\"5dp\"\n                    android:background=\"#f3f3f3\"\n                    android:cacheColorHint=\"@android:color/transparent\"\n                    android:listSelector=\"@drawable/selector\"\n                    android:scrollbarAlwaysDrawVerticalTrack=\"false\"\n                    android:tag=\"list_arrow\" />\n\n                <TextView\n                    android:id=\"@+id/April_nodata\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:gravity=\"center_vertical|center\"\n                    android:tag=\"nodata_arrow\"\n                    android:text=\"无记录\"\n                    android:textColor=\"#fff0f0f0\"\n                    android:textSize=\"40sp\"\n                    android:visibility=\"gone\" />\n            </LinearLayout>\n        </com.cwp.chart.FoldingLayout>\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/March_layout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"5dp\"\n        android:layout_marginRight=\"5dp\"\n        android:orientation=\"vertical\"\n        android:visibility=\"gone\" >\n\n        <RelativeLayout\n            android:id=\"@+id/March_bar_layout\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"70dp\"\n            android:background=\"@drawable/rect_white_bg\"\n            android:paddingBottom=\"5dp\"\n            android:paddingTop=\"5dp\" >\n\n            <TextView\n                android:id=\"@+id/March_day\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"03月\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"25dp\" />\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_below=\"@id/March_day\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"03.01-03.31\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"13dp\" />\n\n            <TextView\n                android:id=\"@+id/March_text_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_marginRight=\"45dp\"\n                android:text=\"结余\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"15dp\" />\n\n            <TextView\n                android:id=\"@+id/March_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_below=\"@id/March_text_money\"\n                android:layout_marginRight=\"45dp\"\n                android:paddingTop=\"5dp\"\n                android:tag=\"money_arrow\"\n                android:text=\"-500.0\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"20dp\" />\n\n            <ImageView\n                android:layout_width=\"12dp\"\n                android:layout_height=\"6dp\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"10dp\"\n                android:background=\"@drawable/service_arrow_down\"\n                android:tag=\"service_arrow\" />\n        </RelativeLayout>\n\n        <com.cwp.chart.FoldingLayout\n            android:id=\"@+id/March_item\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"100dp\"\n            android:tag=\"service_item\" >\n\n            <LinearLayout\n                android:id=\"@+id/March_item_layout\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:background=\"#699bf9\"\n                android:orientation=\"vertical\"\n                android:tag=\"item_arrow\" >\n\n                <ListView\n                    android:id=\"@+id/March_list\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_marginLeft=\"5dp\"\n                    android:layout_marginRight=\"5dp\"\n                    android:background=\"#f3f3f3\"\n                    android:cacheColorHint=\"@android:color/transparent\"\n                    android:listSelector=\"@drawable/selector\"\n                    android:scrollbarAlwaysDrawVerticalTrack=\"false\"\n                    android:tag=\"list_arrow\" />\n\n                <TextView\n                    android:id=\"@+id/March_nodata\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:gravity=\"center_vertical|center\"\n                    android:tag=\"nodata_arrow\"\n                    android:text=\"无记录\"\n                    android:textColor=\"#fff0f0f0\"\n                    android:textSize=\"40sp\"\n                    android:visibility=\"gone\" />\n            </LinearLayout>\n        </com.cwp.chart.FoldingLayout>\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/February_layout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"5dp\"\n        android:layout_marginRight=\"5dp\"\n        android:orientation=\"vertical\"\n        android:visibility=\"gone\" >\n\n        <RelativeLayout\n            android:id=\"@+id/February_bar_layout\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"70dp\"\n            android:background=\"@drawable/rect_white_bg\"\n            android:paddingBottom=\"5dp\"\n            android:paddingTop=\"5dp\" >\n\n            <TextView\n                android:id=\"@+id/February_day\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"02月\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"25dp\" />\n\n            <TextView\n                android:id=\"@+id/February_date\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_below=\"@id/February_day\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"02.01-02.28\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"13dp\" />\n\n            <TextView\n                android:id=\"@+id/February_text_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_marginRight=\"45dp\"\n                android:text=\"结余\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"15dp\" />\n\n            <TextView\n                android:id=\"@+id/February_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_below=\"@id/February_text_money\"\n                android:layout_marginRight=\"45dp\"\n                android:paddingTop=\"5dp\"\n                android:tag=\"money_arrow\"\n                android:text=\"-500.0\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"20dp\" />\n\n            <ImageView\n                android:layout_width=\"12dp\"\n                android:layout_height=\"6dp\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"10dp\"\n                android:background=\"@drawable/service_arrow_down\"\n                android:tag=\"service_arrow\" />\n        </RelativeLayout>\n\n        <com.cwp.chart.FoldingLayout\n            android:id=\"@+id/February_item\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"100dp\"\n            android:tag=\"service_item\" >\n\n            <LinearLayout\n                android:id=\"@+id/February_item_layout\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:background=\"#699bf9\"\n                android:orientation=\"vertical\"\n                android:tag=\"item_arrow\" >\n\n                <ListView\n                    android:id=\"@+id/February_list\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_marginLeft=\"5dp\"\n                    android:layout_marginRight=\"5dp\"\n                    android:background=\"#f3f3f3\"\n                    android:cacheColorHint=\"@android:color/transparent\"\n                    android:listSelector=\"@drawable/selector\"\n                    android:scrollbarAlwaysDrawVerticalTrack=\"false\"\n                    android:tag=\"list_arrow\" />\n\n                <TextView\n                    android:id=\"@+id/February_nodata\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:gravity=\"center_vertical|center\"\n                    android:tag=\"nodata_arrow\"\n                    android:text=\"无记录\"\n                    android:textColor=\"#fff0f0f0\"\n                    android:textSize=\"40sp\"\n                    android:visibility=\"gone\" />\n            </LinearLayout>\n        </com.cwp.chart.FoldingLayout>\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/January_layout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"5dp\"\n        android:layout_marginRight=\"5dp\"\n        android:orientation=\"vertical\"\n        android:visibility=\"gone\" >\n\n        <RelativeLayout\n            android:id=\"@+id/January_bar_layout\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"70dp\"\n            android:background=\"@drawable/rect_white_bg\"\n            android:paddingBottom=\"5dp\"\n            android:paddingTop=\"5dp\" >\n\n            <TextView\n                android:id=\"@+id/January_day\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"01月\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"25dp\" />\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_below=\"@id/January_day\"\n                android:layout_marginLeft=\"10dp\"\n                android:text=\"01.01-01.31\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"13dp\" />\n\n            <TextView\n                android:id=\"@+id/January_text_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_marginRight=\"45dp\"\n                android:text=\"结余\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"15dp\" />\n\n            <TextView\n                android:id=\"@+id/January_money\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_below=\"@id/January_text_money\"\n                android:layout_marginRight=\"45dp\"\n                android:paddingTop=\"5dp\"\n                android:tag=\"money_arrow\"\n                android:text=\"-500.0\"\n                android:textColor=\"#4b4b47\"\n                android:textSize=\"20dp\" />\n\n            <ImageView\n                android:layout_width=\"12dp\"\n                android:layout_height=\"6dp\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"10dp\"\n                android:background=\"@drawable/service_arrow_down\"\n                android:tag=\"service_arrow\" />\n        </RelativeLayout>\n\n        <com.cwp.chart.FoldingLayout\n            android:id=\"@+id/January_item\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"100dp\"\n            android:tag=\"service_item\" >\n\n            <LinearLayout\n                android:id=\"@+id/January_item_layout\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:background=\"#699bf9\"\n                android:orientation=\"vertical\"\n                android:tag=\"item_arrow\" >\n\n                <ListView\n                    android:id=\"@+id/January_list\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:layout_marginLeft=\"5dp\"\n                    android:layout_marginRight=\"5dp\"\n                    android:background=\"#f3f3f3\"\n                    android:cacheColorHint=\"@android:color/transparent\"\n                    android:listSelector=\"@drawable/selector\"\n                    android:scrollbarAlwaysDrawVerticalTrack=\"false\"\n                    android:tag=\"list_arrow\" />\n\n                <TextView\n                    android:id=\"@+id/January_nodata\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:gravity=\"center_vertical|center\"\n                    android:tag=\"nodata_arrow\"\n                    android:text=\"无记录\"\n                    android:textColor=\"#fff0f0f0\"\n                    android:textSize=\"40sp\"\n                    android:visibility=\"gone\" />\n            </LinearLayout>\n        </com.cwp.chart.FoldingLayout>\n    </LinearLayout>\n\n    <View\n        android:id=\"@+id/bottom_view\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:layout_marginTop=\"10dp\" />\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/frame_menu.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/menu\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\" />"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/gesturepassword_create.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:mqq=\"http://schemas.android.com/apk/res/com.tencent.mobileqq\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"fill_parent\"\n    android:background=\"@color/gesture_background\"\n    android:orientation=\"vertical\" >\n\n    <View\n        android:id=\"@+id/gesturepwd_creat_gap1\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"30.0dip\"\n        android:layout_weight=\"1.0\" />\n\n    <LinearLayout\n        android:id=\"@+id/gesturepwd_setting_preview\"\n        android:layout_width=\"40.0dip\"\n        android:layout_height=\"40.0dip\"\n        android:layout_gravity=\"center_horizontal\"\n        android:background=\"@drawable/gesture_create_grid_bg\"\n        android:orientation=\"vertical\"\n        android:padding=\"5.0dip\" >\n\n        <LinearLayout\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"6.0dip\" >\n\n            <View\n                android:id=\"@+id/gesturepwd_setting_preview_0\"\n                android:layout_width=\"6.0dip\"\n                android:layout_height=\"6.0dip\"\n                android:background=\"@drawable/trans\" />\n\n            <View\n                android:id=\"@+id/gesturepwd_setting_preview_1\"\n                android:layout_width=\"6.0dip\"\n                android:layout_height=\"6.0dip\"\n                android:layout_marginLeft=\"6.0dip\"\n                android:background=\"@drawable/trans\" />\n\n            <View\n                android:id=\"@+id/gesturepwd_setting_preview_2\"\n                android:layout_width=\"6.0dip\"\n                android:layout_height=\"6.0dip\"\n                android:layout_marginLeft=\"6.0dip\"\n                android:background=\"@drawable/trans\" />\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"6.0dip\"\n            android:layout_marginTop=\"6.0dip\" >\n\n            <View\n                android:id=\"@+id/gesturepwd_setting_preview_3\"\n                android:layout_width=\"6.0dip\"\n                android:layout_height=\"6.0dip\"\n                android:background=\"@drawable/trans\" />\n\n            <View\n                android:id=\"@+id/gesturepwd_setting_preview_4\"\n                android:layout_width=\"6.0dip\"\n                android:layout_height=\"6.0dip\"\n                android:layout_marginLeft=\"6.0dip\"\n                android:background=\"@drawable/trans\" />\n\n            <View\n                android:id=\"@+id/gesturepwd_setting_preview_5\"\n                android:layout_width=\"6.0dip\"\n                android:layout_height=\"6.0dip\"\n                android:layout_marginLeft=\"6.0dip\"\n                android:background=\"@drawable/trans\" />\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"6.0dip\"\n            android:layout_marginTop=\"6.0dip\" >\n\n            <View\n                android:id=\"@+id/gesturepwd_setting_preview_6\"\n                android:layout_width=\"6.0dip\"\n                android:layout_height=\"6.0dip\"\n                android:background=\"@drawable/trans\" />\n\n            <View\n                android:id=\"@+id/gesturepwd_setting_preview_7\"\n                android:layout_width=\"6.0dip\"\n                android:layout_height=\"6.0dip\"\n                android:layout_marginLeft=\"6.0dip\"\n                android:background=\"@drawable/trans\" />\n\n            <View\n                android:id=\"@+id/gesturepwd_setting_preview_8\"\n                android:layout_width=\"6.0dip\"\n                android:layout_height=\"6.0dip\"\n                android:layout_marginLeft=\"6.0dip\"\n                android:background=\"@drawable/trans\" />\n        </LinearLayout>\n    </LinearLayout>\n\"\n\n    <View\n        android:id=\"@+id/gesturepwd_creat_gap2\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"20.0dip\"\n        android:layout_weight=\"1.0\" />\n\n    <TextView\n        android:id=\"@+id/gesturepwd_create_text\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"40.0dip\"\n        android:layout_marginRight=\"40.0dip\"\n        android:layout_marginTop=\"0.0dip\"\n        android:gravity=\"center_horizontal\"\n        android:shadowColor=\"#b3000000\"\n        android:shadowRadius=\"1.0\"\n        android:text=\"绘制解锁图案\"\n        android:textColor=\"@android:color/white\"\n        android:textSize=\"16.0sp\" />\n\n    <View\n        android:id=\"@+id/gesturepwd_creat_gap3\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"8.0dip\"\n        android:layout_weight=\"1.0\" />\n\n    <com.cwp.pattern.LockPatternView\n        android:id=\"@+id/gesturepwd_create_lockview\"\n        android:layout_width=\"288.0dip\"\n        android:layout_height=\"288.0dip\"\n        android:layout_gravity=\"center_horizontal\"\n        android:layout_marginTop=\"10.0dip\" />\n\n    <View\n        android:id=\"@+id/gesturepwd_creat_gap4\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"10.0dip\"\n        android:layout_weight=\"1.0\" />\n\n    <LinearLayout\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"horizontal\" >\n\n        <Button\n            android:id=\"@+id/reset_btn\"\n            style=\"@style/ButtonRed\"\n            android:layout_width=\"0.0dip\"\n            android:layout_height=\"wrap_content\"\n            android:layout_margin=\"15dip\"\n            android:layout_weight=\"1\"\n            android:gravity=\"center\"\n            android:text=\"重绘\" />\n\n        <Button\n            android:id=\"@+id/right_btn\"\n            style=\"@style/ButtonGreen\"\n            android:layout_width=\"0.0dip\"\n            android:layout_height=\"wrap_content\"\n            android:layout_margin=\"15dip\"\n            android:layout_weight=\"1\"\n            android:gravity=\"center\"\n            android:text=\"保存\" />\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/gesturepassword_guide.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"fill_parent\"\n    android:layout_weight=\"1.0\"\n    android:background=\"@color/gesture_background\"\n    android:focusable=\"true\"\n    android:focusableInTouchMode=\"true\"\n    android:scrollbarThumbVertical=\"@drawable/scrollbar_handle_vertical\"\n    android:visibility=\"visible\" >\n\n    <LinearLayout\n        android:id=\"@+id/gesturepwd_titlebar\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"fill_parent\"\n        android:layout_marginTop=\"30dp\"\n        android:orientation=\"vertical\" >\n\n        <TextView\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"30.0dip\"\n            android:layout_marginRight=\"30.0dip\"\n            android:layout_marginTop=\"30.0dip\"\n            android:gravity=\"center_horizontal\"\n            android:shadowColor=\"#b3000000\"\n            android:shadowRadius=\"1.0\"\n            android:text=\"欢迎使用快速记！\"\n            android:textColor=\"@android:color/white\"\n            android:textSize=\"30.0sp\" />\n\n        <TextView\n            android:id=\"@+id/gesturepwd_guide_text\"\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"30.0dip\"\n            android:layout_marginRight=\"30.0dip\"\n            android:layout_marginTop=\"40.0dip\"\n            android:gravity=\"center_horizontal\"\n            android:shadowColor=\"#b3000000\"\n            android:shadowRadius=\"1.0\"\n            android:text=\"@string/gesture_password_guide_text\"\n            android:textColor=\"@android:color/white\"\n            android:textSize=\"16.0sp\" />\n\n        <ImageView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center_horizontal\"\n            android:layout_marginTop=\"30.0dip\"\n            android:src=\"@drawable/gesture_guide_pic\" />\n\n        <Button\n            android:id=\"@+id/gesturepwd_guide_btn\"\n            style=\"@style/ButtonGreen\"\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"30.0dip\"\n            android:layout_marginRight=\"30.0dip\"\n            android:layout_marginTop=\"60.0dip\"\n            android:text=\"@string/gesture_password_guide_creat_btn\" />\n    </LinearLayout>\n\n</ScrollView>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/gesturepassword_unlock.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/gesturepwd_root\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"fill_parent\"\n    android:background=\"@drawable/welcome_bg\"\n    android:orientation=\"vertical\" >\n\n    <View\n        android:id=\"@id/gesturepwd_creat_gap1\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"50.0dip\"\n        android:layout_weight=\"1.0\" />\n\n    <ImageView\n        android:id=\"@+id/gesturepwd_unlock_face\"\n        android:layout_width=\"80.0dip\"\n        android:layout_height=\"80.0dip\"\n        android:layout_gravity=\"center_horizontal\"\n        android:layout_marginTop=\"0.0dip\"\n        android:background=\"@drawable/card_avatar\"\n        android:padding=\"4.0dip\"\n        android:scaleType=\"fitXY\"\n        android:src=\"@drawable/login_default_avatar\" />\n\n    <View\n        android:id=\"@id/gesturepwd_creat_gap1\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"30.0dip\"\n        android:layout_weight=\"1.0\" />\n\n    <TextView\n        android:id=\"@+id/gesturepwd_unlock_text\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"40.0dip\"\n        android:layout_marginRight=\"40.0dip\"\n        android:layout_marginTop=\"0.0dip\"\n        android:gravity=\"center_horizontal\"\n        android:shadowColor=\"#b3ffffff\"\n        android:shadowRadius=\"1.0\"\n        android:text=\"请绘制手势密码\"\n        android:textColor=\"@android:color/white\"\n        android:textSize=\"20.0sp\" />\n\n    <View\n        android:id=\"@id/gesturepwd_creat_gap1\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"4.0dip\"\n        android:layout_weight=\"1.0\" />\n\n    <TextView\n        android:id=\"@+id/gesturepwd_unlock_failtip\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"40.0dip\"\n        android:layout_marginRight=\"40.0dip\"\n        android:layout_marginTop=\"0.0dip\"\n        android:gravity=\"center_horizontal\"\n        android:shadowColor=\"#b3ffffff\"\n        android:shadowRadius=\"1.0\"\n        android:text=\"5次失败后，需要重新登录。\"\n        android:textColor=\"@android:color/white\"\n        android:textSize=\"12.0sp\"\n        android:visibility=\"invisible\" />\n\n    <View\n        android:id=\"@id/gesturepwd_creat_gap1\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"0.0dip\"\n        android:layout_weight=\"1.0\" />\n\n    <com.cwp.pattern.LockPatternView\n        android:id=\"@+id/gesturepwd_unlock_lockview\"\n        android:layout_width=\"280.0dip\"\n        android:layout_height=\"280.0dip\"\n        android:layout_gravity=\"center_horizontal\"\n        android:layout_marginTop=\"0.0dip\" />\n\n    <View\n        android:id=\"@id/gesturepwd_creat_gap1\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"40.0dip\"\n        android:layout_weight=\"1.0\" />\n\n    <TextView\n        android:id=\"@+id/gesturepwd_unlock_forget\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"0.0dip\"\n        android:gravity=\"center_horizontal\"\n        android:shadowColor=\"#e0ffffff\"\n        android:shadowDy=\"1.0\"\n        android:shadowRadius=\"1.0\"\n        android:text=\"忘记密码\"\n        android:textColor=\"@android:color/white\"\n        android:textSize=\"14.0sp\" />\n\n    <View\n        android:id=\"@id/gesturepwd_creat_gap1\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"75.0dip\"\n        android:layout_weight=\"1.0\" />\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/group.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"horizontal\" >\n\n    <RelativeLayout\n        android:id=\"@+id/bar_layout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"@drawable/rect_white_bg\"\n        android:padding=\"10dp\" >\n\n        <TextView\n            android:id=\"@+id/day\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"10dp\"\n            android:text=\"12月\"\n            android:textColor=\"#4b4b47\"\n            android:textSize=\"25dp\" />\n\n        <TextView\n            android:id=\"@+id/time\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_below=\"@id/day\"\n            android:layout_marginLeft=\"10dp\"\n            android:text=\"12.01-12.31\"\n            android:textColor=\"#4b4b47\"\n            android:textSize=\"13dp\" />\n\n        <TextView\n            android:id=\"@+id/text_money\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_marginRight=\"45dp\"\n            android:text=\"结余\"\n            android:textColor=\"#4b4b47\"\n            android:textSize=\"15dp\" />\n\n        <TextView\n            android:id=\"@+id/money\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_below=\"@id/text_money\"\n            android:layout_marginRight=\"45dp\"\n            android:paddingTop=\"5dp\"\n            android:tag=\"money_arrow\"\n            android:text=\"-500.0\"\n            android:textColor=\"#4b4b47\"\n            android:textSize=\"20dp\" />\n\n        <ImageView\n            android:id=\"@+id/service_arrow\"\n            android:layout_width=\"12dp\"\n            android:layout_height=\"6dp\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:layout_marginRight=\"10dp\"\n            android:background=\"@drawable/service_arrow_down\" />\n    </RelativeLayout>\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/gvitem.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:id=\"@+id/item\"\n\tandroid:orientation=\"vertical\"\n\tandroid:layout_width=\"wrap_content\"\n\tandroid:layout_height=\"wrap_content\"\n\tandroid:layout_marginTop=\"5dp\"\n\t>\n\t\n\t<ImageView android:id=\"@+id/ItemImage\"\n\t\tandroid:layout_width=\"100dp\"\n\t\tandroid:layout_height=\"100dp\"\n\t\tandroid:layout_gravity=\"center\"\n\t\tandroid:scaleType=\"fitXY\"\n\t\tandroid:padding=\"5dp\"\n\t/>\n\t<TextView android:id=\"@+id/ItemTitle\"\n\t\tandroid:layout_width=\"wrap_content\"\n\t\tandroid:layout_height=\"wrap_content\"\n\t\tandroid:layout_gravity=\"center\"\n\t\tandroid:gravity=\"center_horizontal\"\n\t/>\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/income.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:id=\"@+id/iteminfo\" android:orientation=\"vertical\"\n\tandroid:layout_width=\"wrap_content\" android:layout_height=\"wrap_content\"\n\tandroid:layout_marginTop=\"5dp\"\n\tandroid:weightSum=\"1\">\n\t<LinearLayout android:id=\"@+id/linearLayout1\"\n\t\t\tandroid:layout_height=\"match_parent\" \n\t\t\tandroid:layout_width=\"fill_parent\"\n\t\t\tandroid:layout_weight=\"0.04\"\n\t\t\tandroid:orientation=\"vertical\">\n\t\t<RelativeLayout android:layout_height=\"wrap_content\" \n\t\t\tandroid:layout_width=\"match_parent\">\n\t\t<TextView android:text=\"我的收入\" \n\t\t\tandroid:layout_width=\"fill_parent\"\n\t\t\tandroid:layout_height=\"wrap_content\"\n\t\t\tandroid:gravity=\"center\" \n\t\t\tandroid:textSize=\"32dp\"\n\t\t\tandroid:textColor=\"#820000\"\n\t\t\tandroid:padding=\"10dp\"\n\t\t/>\n\t\t</RelativeLayout>\n\t</LinearLayout>\n\t\t<LinearLayout android:id=\"@+id/linearLayout2\"\n\t\t\tandroid:layout_height=\"0dp\" \n\t\t\tandroid:layout_width=\"fill_parent\"\n\t\t\tandroid:layout_marginLeft=\"4dp\"\n\t\t\tandroid:layout_marginRight=\"4dp\"\n\t\t\tandroid:orientation=\"vertical\" \n\t\t\tandroid:layout_weight=\"0.95\">\n\t\t<ListView android:id=\"@+id/lvinaccountinfo\" \n\t\t\tandroid:layout_width=\"match_parent\" \n\t\t\tandroid:layout_height=\"match_parent\" \n\t\t \tandroid:listSelector=\"@drawable/selector\"\n\t\t \tandroid:cacheColorHint=\"@android:color/transparent\"\n\t\t\tandroid:scrollbarAlwaysDrawVerticalTrack=\"true\"\n\t\t\t/>\n\t</LinearLayout> \n\t<LinearLayout \n\t\tandroid:layout_width=\"fill_parent\"\n\t\tandroid:layout_height=\"wrap_content\"\n\t\tandroid:gravity=\"bottom\"\n\t\tandroid:orientation=\"vertical\">\n\t<Button\n\t    android:id=\"@+id/baddincome\"\n\t    android:layout_width=\"fill_parent\"\n\t\tandroid:background=\"#a00000\"\n\t\tandroid:textColor=\"#ffffff\"\n\t    android:textSize=\"22sp\"\n\t\tandroid:layout_weight=\"0.6\"\n\t    android:layout_height=\"0dp\"\n\t    android:gravity=\"center_vertical|center_horizontal\"\n\t    android:text=\"新增\">\n\t</Button> \n\t</LinearLayout>\n</LinearLayout>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/incomedata.xml",
    "content": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"fill_parent\"\n    android:orientation=\"vertical\" >\n\n    <LinearLayout\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center_horizontal\" >\n\n        <TextView\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"40dp\"\n            android:background=\"#800000\"\n            android:gravity=\"center_vertical|center_horizontal\"\n            android:text=\"分类收入统计表\"\n            android:textColor=\"#ffffff\"\n            android:textSize=\"28dp\" />\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/ichart\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_weight=\"4\"\n        android:orientation=\"vertical\" >\n\n        <TextView\n            android:id=\"@+id/nodata\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center_vertical|center_horizontal\"\n            android:layout_marginTop=\"100dp\"\n            android:background=\"@drawable/nodata\"\n            android:visibility=\"gone\" />\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/idataselect\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"-70dp\"\n        android:layout_weight=\"0.01\"\n        android:background=\"#800000\"\n        android:orientation=\"horizontal\"\n        android:padding=\"10dp\" >\n\n        <LinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"9\"\n            android:orientation=\"vertical\" >\n\n            <LinearLayout\n                android:layout_width=\"fill_parent\"\n                android:layout_height=\"fill_parent\"\n                android:layout_marginBottom=\"10dp\"\n                android:orientation=\"horizontal\" >\n\n                <Spinner\n                    android:id=\"@+id/iyear\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#ffffff\"\n                    android:gravity=\"center_horizontal\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:gravity=\"center_horizontal\"\n                    android:text=\"年\"\n                    android:textColor=\"#ffffff\" />\n\n                <Spinner\n                    android:id=\"@+id/imonth\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#ffffff\"\n                    android:entries=\"@array/time_month\"\n                    android:gravity=\"center_horizontal\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:gravity=\"center_horizontal\"\n                    android:text=\"月\"\n                    android:textColor=\"#ffffff\" />\n\n                <Spinner\n                    android:id=\"@+id/iday\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#ffffff\"\n                    android:entries=\"@array/time_day\"\n                    android:gravity=\"center_horizontal\" />\n            </LinearLayout>\n\n            <LinearLayout\n                android:layout_width=\"fill_parent\"\n                android:layout_height=\"fill_parent\"\n                android:orientation=\"horizontal\" >\n\n                <Spinner\n                    android:id=\"@+id/iyeare\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#ffffff\"\n                    android:gravity=\"center_horizontal\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:gravity=\"center_horizontal\"\n                    android:text=\"年\"\n                    android:textColor=\"#ffffff\" />\n\n                <Spinner\n                    android:id=\"@+id/imonthe\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#ffffff\"\n                    android:entries=\"@array/time_month\"\n                    android:gravity=\"center_horizontal\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:gravity=\"center_horizontal\"\n                    android:text=\"月\"\n                    android:textColor=\"#ffffff\" />\n\n                <Spinner\n                    android:id=\"@+id/idaye\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#ffffff\"\n                    android:entries=\"@array/time_day\"\n                    android:gravity=\"center_horizontal\" />\n            </LinearLayout>\n        </LinearLayout>\n\n        <Button\n            android:id=\"@+id/ianytime\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"10dp\"\n            android:layout_weight=\"2\"\n            android:background=\"#e6e6e6\"\n            android:listSelector=\"@drawable/selector\"\n            android:text=\"任意时间段\"\n            android:textColor=\"#800000\" />\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/dataselect\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_weight=\"1\"\n        android:orientation=\"horizontal\" >\n\n        <Button\n            android:id=\"@+id/ibefore\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_margin=\"5dp\"\n            android:layout_weight=\"1\"\n            android:background=\"#800000\"\n            android:listSelector=\"@drawable/selector\"\n            android:text=\"上一月\"\n            android:textColor=\"#ffffff\" />\n\n        <Button\n            android:id=\"@+id/iafter\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_margin=\"5dp\"\n            android:layout_weight=\"1\"\n            android:background=\"#800000\"\n            android:listSelector=\"@drawable/selector\"\n            android:text=\"下一月\"\n            android:textColor=\"#ffffff\" />\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/infomanage.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:id=\"@+id/inoutitem\"\n\tandroid:orientation=\"vertical\"\n\tandroid:layout_width=\"fill_parent\"\n\tandroid:layout_height=\"fill_parent\"\n\t>\n\t<LinearLayout \n\t\tandroid:orientation=\"vertical\"\n\t\tandroid:layout_width=\"fill_parent\"\n\t\tandroid:layout_height=\"fill_parent\"\n\t\tandroid:layout_weight=\"3\"\n\t\t>\n\t\t<TextView android:id=\"@+id/inouttitle\"\n\t\t\tandroid:layout_width=\"wrap_content\"\n\t\t\tandroid:layout_gravity=\"center\"\n\t\t\tandroid:gravity=\"center_horizontal\"\n\t\t\tandroid:text=\"支出管理\"\n\t\t\tandroid:textColor=\"#ffffff\"\n\t\t\tandroid:textSize=\"40sp\"\n\t\t\tandroid:textStyle=\"bold\" \n\t\t\tandroid:layout_height=\"wrap_content\"/>\n\t</LinearLayout>\n\t<LinearLayout \n\t\tandroid:orientation=\"vertical\"\n\t\tandroid:layout_width=\"fill_parent\"\n\t\tandroid:layout_height=\"fill_parent\"\n\t\tandroid:layout_weight=\"1\"\n\t\t>\n\t\t<RelativeLayout android:layout_width=\"fill_parent\"\n\t\t    android:layout_height=\"fill_parent\"\n\t\t    android:padding=\"10dp\"\n\t\t    >\n\t\t    <TextView android:layout_width=\"90dp\" \n\t\t    android:id=\"@+id/tvInOutMoney\" \n\t\t    android:textSize=\"20sp\" \n\t\t    android:text=\"金  额：\" \n\t\t    android:layout_height=\"wrap_content\" \n\t\t    android:layout_alignBaseline=\"@+id/txtInOutMoney\" \n\t\t    android:layout_alignBottom=\"@+id/txtInOutMoney\" \n\t\t    android:layout_alignParentLeft=\"true\" \n\t\t    android:layout_marginLeft=\"16dp\">\n\t\t    </TextView>\n\t\t    <EditText \n\t\t    android:id=\"@+id/txtInOutMoney\"\n\t\t    android:layout_width=\"210dp\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t    android:layout_toRightOf=\"@id/tvInOutMoney\"\n\t\t    android:inputType=\"number\"\n\t\t    android:numeric=\"integer\"\n\t\t    android:maxLength=\"9\"\n\t\t    />\n\t\t    <TextView android:layout_width=\"90dp\" \n\t\t    android:id=\"@+id/tvInOutTime\" \n\t\t    android:textSize=\"20sp\" \n\t\t    android:text=\"时  间：\" \n\t\t    android:layout_height=\"wrap_content\" \n\t\t    android:layout_alignBaseline=\"@+id/txtInOutTime\" \n\t\t    android:layout_alignBottom=\"@+id/txtInOutTime\" \n\t\t    android:layout_toLeftOf=\"@+id/txtInOutMoney\">\n\t\t    </TextView>\n\t\t    <EditText \n\t\t    android:id=\"@+id/txtInOutTime\"\n\t\t    android:layout_width=\"210dp\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t    android:layout_toRightOf=\"@id/tvInOutTime\"\n\t\t    android:layout_below=\"@id/txtInOutMoney\"\n\t\t    android:inputType=\"datetime\"\n\t\t    />\n\t\t    <TextView android:layout_width=\"90dp\" \n\t\t    android:id=\"@+id/tvInOutType\" \n\t\t    android:textSize=\"20sp\" \n\t\t    android:text=\"类  别：\" \n\t\t    android:layout_height=\"wrap_content\" \n\t\t    android:layout_alignBaseline=\"@+id/spInOutType\" \n\t\t    android:layout_alignBottom=\"@+id/spInOutType\" \n\t\t    android:layout_alignLeft=\"@+id/tvInOutTime\">\n\t\t    </TextView>\n\t\t    <Spinner android:id=\"@+id/spInOutType\"\n\t\t    android:layout_width=\"210dp\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t    android:layout_toRightOf=\"@id/tvInOutType\"\n\t\t    android:layout_below=\"@id/txtInOutTime\" \n\t\t    android:textColor=\"#000000\"\n\t\t    />\n\t\t    <TextView android:layout_width=\"90dp\" \n\t\t    android:id=\"@+id/tvInOut\" \n\t\t    android:textSize=\"20sp\" \n\t\t    android:text=\"付款方：\" \n\t\t    android:layout_height=\"wrap_content\" \n\t\t    android:layout_alignBaseline=\"@+id/txtInOut\" \n\t\t    android:layout_alignBottom=\"@+id/txtInOut\" \n\t\t    android:layout_toLeftOf=\"@+id/spInOutType\">\n\t\t    </TextView>\n\t\t    <EditText \n\t\t    android:id=\"@+id/txtInOut\"\n\t\t    android:layout_width=\"210dp\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t    android:layout_toRightOf=\"@id/tvInOut\"\n\t\t    android:layout_below=\"@id/spInOutType\"\n\t\t    android:singleLine=\"false\"\n\t\t    />\n\t\t    <TextView android:layout_width=\"90dp\" \n\t\t    android:id=\"@+id/tvInOutMark\" \n\t\t    android:textSize=\"20sp\" \n\t\t    android:text=\"备  注：\" \n\t\t    android:layout_height=\"wrap_content\" \n\t\t    android:layout_alignTop=\"@+id/txtInOutMark\" \n\t\t    android:layout_toLeftOf=\"@+id/txtInOut\">\n\t\t    </TextView>\n\t\t    <EditText \n\t\t    android:id=\"@+id/txtInOutMark\"\n\t\t    android:layout_width=\"210dp\"\n\t\t    android:layout_height=\"150dp\"\n\t\t    android:layout_toRightOf=\"@id/tvInOutMark\"\n\t\t    android:layout_below=\"@id/txtInOut\"\n\t\t    android:gravity=\"top\"\n\t\t    android:singleLine=\"false\"\n\t\t    />\n\t\t    </RelativeLayout>\n\t</LinearLayout>\n\t<LinearLayout \n\t\tandroid:orientation=\"vertical\"\n\t\tandroid:layout_width=\"fill_parent\"\n\t\tandroid:layout_height=\"fill_parent\"\n\t\tandroid:layout_weight=\"3\"\n\t\t>\n\t\t<RelativeLayout android:layout_width=\"fill_parent\"\n\t\t    android:layout_height=\"fill_parent\"\n\t\t    android:padding=\"10dp\"\n\t\t    >\n\t\t<Button\n\t\t    android:id=\"@+id/btnInOutDelete\"\n\t\t    android:layout_width=\"80dp\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t    android:layout_alignParentRight=\"true\"\n\t\t    android:layout_marginLeft=\"10dp\"\n\t\t    android:text=\"删除\"\n\t\t    />\n\t\t    <Button \n\t\t\tandroid:id=\"@+id/btnInOutEdit\"\n\t\t\tandroid:layout_width=\"80dp\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t\tandroid:layout_toLeftOf=\"@id/btnInOutDelete\"\n\t\t\tandroid:text=\"修改\"    \n\t\t    />\n\t\t</RelativeLayout>\n\t</LinearLayout>\t\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/inptypemanager.xml",
    "content": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"fill_parent\"\n    android:background=\"#820000\"\n    android:orientation=\"vertical\" >\n\n    <LinearLayout\n        android:id=\"@+id/inptext_top\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"30dp\"\n        android:orientation=\"vertical\" >\n    </LinearLayout>\n\n    <TextView\n        android:id=\"@+id/inptext\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginBottom=\"3dp\"\n        android:layout_weight=\"0.1\"\n        android:background=\"#ebeae9\"\n        android:gravity=\"center_vertical|center_horizontal\"\n        android:text=\"收入类型管理\"\n        android:textColor=\"#820000\"\n        android:textSize=\"32sp\" />\n\n    <ListView\n        android:id=\"@+id/typelist\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_weight=\"6\"\n        android:background=\"#ffffff\"\n        android:cacheColorHint=\"@android:color/transparent\"\n        android:choiceMode=\"multipleChoice\"\n        android:descendantFocusability=\"blocksDescendants\"\n        android:listSelector=\"@drawable/selector\"\n        android:orientation=\"vertical\"\n        android:paddingLeft=\"25dp\"\n        android:paddingRight=\"25dp\"\n        android:scrollbarStyle=\"outsideOverlay\"\n        android:verticalScrollbarPosition=\"right\" >\n    </ListView>\n\n    <LinearLayout\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"50dp\"\n        android:layout_gravity=\"bottom\"\n        android:layout_marginTop=\"3dp\"\n        android:layout_weight=\"0.05\"\n        android:background=\"#ebeae9\"\n        android:orientation=\"horizontal\"\n        android:paddingTop=\"5dp\" >\n\n        <Button\n            android:id=\"@+id/addtype\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"40dp\"\n            android:layout_gravity=\"center_horizontal|center_horizontal\"\n            android:layout_margin=\"15dp\"\n            android:layout_weight=\"1\"\n            android:background=\"#820000\"\n            android:text=\"添加\"\n            android:textColor=\"#ffffff\" />\n\n        <Button\n            android:id=\"@+id/deletetype\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"40dp\"\n            android:layout_gravity=\"center_horizontal|center_horizontal\"\n            android:layout_margin=\"15dp\"\n            android:layout_weight=\"1\"\n            android:background=\"#820000\"\n            android:text=\"删除\"\n            android:textColor=\"#ffffff\" />\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/item_image_bucket.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    android:background=\"#ffffff\"\n    android:orientation=\"vertical\"\n    android:padding=\"5dp\" >\n\n    <ImageView\n        android:id=\"@+id/image\"\n        android:layout_width=\"156dp\"\n        android:layout_height=\"128dp\"\n        android:layout_gravity=\"center\"\n        android:scaleType=\"centerCrop\"\n        android:src=\"@drawable/ic_launcher\" >\n    </ImageView>\n\n    <ImageView\n        android:id=\"@+id/isselected\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_alignParentTop=\"true\"\n       />\n\n    <LinearLayout\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"vertical\" >\n\n        <TextView\n            android:id=\"@+id/name\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:ellipsize=\"end\"\n            android:gravity=\"left\"\n            android:singleLine=\"true\"\n            android:text=\"share\" />\n\n        <TextView\n            android:id=\"@+id/count\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:gravity=\"left\"\n            android:text=\"8\" />\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/item_image_grid.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    android:gravity=\"center\" >\n\n    <TextView\n        android:id=\"@+id/item_image_grid_text\"\n        android:layout_width=\"128dp\"\n        android:layout_height=\"102dp\"\n        android:layout_centerInParent=\"true\" />\n\n    <ImageView\n        android:id=\"@+id/image\"\n        android:layout_width=\"128dp\"\n        android:layout_height=\"100dp\"\n        android:layout_centerInParent=\"true\"\n        android:layout_margin=\"1dp\"\n        android:scaleType=\"centerCrop\"\n         >\n    </ImageView>\n\n    <ImageView\n        android:id=\"@+id/isselected\"\n        android:layout_margin=\"3dp\"\n        android:layout_width=\"26dp\"\n        android:layout_height=\"26dp\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_alignParentTop=\"true\" />\n\n</RelativeLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/item_popupwindows.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"@drawable/bg_transparent\" >\n\n    <LinearLayout\n        android:id=\"@+id/ll_popup\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:background=\"#ffffff\"\n        android:orientation=\"vertical\" >\n\n        <TextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"1dp\"\n            android:background=\"#ff495a\" />\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"55dp\"\n            android:orientation=\"horizontal\" >\n\n            <Button\n                android:id=\"@+id/item_popupwindows_camera\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"55dp\"\n                android:background=\"@drawable/bt_nobgd\"\n                android:textColor=\"#585858\"\n                android:textSize=\"18sp\"\n                android:text=\"拍照\" />\n        </LinearLayout>\n\n        <TextView\n            android:layout_marginLeft=\"80dp\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"1px\"\n            android:background=\"#f2f2f2\" />\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"55dp\"\n            android:orientation=\"horizontal\" >\n\n            <Button\n                android:id=\"@+id/item_popupwindows_Photo\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"55dp\"\n                android:background=\"@drawable/bt_nobgd\"\n                android:textColor=\"#585858\"\n                android:textSize=\"18sp\"\n                android:text=\"从相册中选取\" />\n        </LinearLayout>\n\n        <TextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"2dp\"\n            android:background=\"#f3f3f3\" />\n\n        <Button\n            android:id=\"@+id/item_popupwindows_cancel\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"55dp\"\n            android:background=\"@drawable/bt_nobgd\"\n            android:textColor=\"#585858\"\n            android:textSize=\"18sp\"\n            android:text=\"取消\" />\n    </LinearLayout>\n\n</RelativeLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/item_published_grida.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"vertical\" >\n\n    <ImageView\n        android:id=\"@+id/item_grida_image\"\n        android:layout_width=\"62dp\"\n        android:layout_height=\"62dp\"\n        android:layout_centerInParent=\"true\"\n        android:scaleType=\"centerCrop\" >\n    </ImageView>\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/list.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\" >\n\n    <RelativeLayout\n        android:id=\"@+id/titlebar\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"#e8e8e8\"\n        android:orientation=\"horizontal\"\n        android:padding=\"5dp\" >\n\n        <TextView\n            android:id=\"@+id/info\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"-500.0\"\n            android:textColor=\"#666872\"\n            android:textSize=\"18dp\" />\n\n        <TextView\n            android:id=\"@+id/address\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_marginLeft=\"70dp\"\n            android:gravity=\"right\"\n            android:text=\"-500.0\"\n            android:textColor=\"#666872\"\n            android:textSize=\"18dp\" />\n    </RelativeLayout>\n\n    <RelativeLayout\n        android:id=\"@+id/list_full\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"#f5f5f5\"\n        android:orientation=\"horizontal\"\n        android:padding=\"10dp\" >\n\n        <RelativeLayout\n            android:id=\"@+id/search_img2\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentLeft=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:layout_marginLeft=\"5dp\"\n            android:layout_marginRight=\"5dp\"\n            android:visibility=\"gone\" >\n\n            <TextView\n                android:id=\"@+id/search_date\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"01\"\n                android:textColor=\"#666872\"\n                android:textSize=\"18sp\" />\n\n            <TextView\n                android:id=\"@+id/search_date2\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_below=\"@id/search_date\"\n                android:layout_gravity=\"center_vertical\"\n                android:text=\"周三\"\n                android:textColor=\"#666872\"\n                android:textSize=\"14sp\" />\n        </RelativeLayout>\n\n        <ImageView\n            android:id=\"@+id/search_img\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_centerVertical=\"true\"\n            android:layout_toRightOf=\"@id/search_img2\"\n            android:background=\"@drawable/icon_spjs_zwwc\" >\n        </ImageView>\n\n        <TextView\n            android:id=\"@+id/no\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentTop=\"true\"\n            android:text=\"0.0\"\n            android:textColor=\"#666872\"\n            android:textSize=\"18dp\"\n            android:visibility=\"gone\" />\n\n        <TextView\n            android:id=\"@+id/title\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentTop=\"true\"\n            android:layout_marginLeft=\"10dp\"\n            android:layout_toRightOf=\"@id/search_img\"\n            android:text=\"早餐\"\n            android:textColor=\"@color/black\"\n            android:textSize=\"18sp\" />\n\n        <TextView\n            android:id=\"@+id/kind\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_below=\"@id/title\"\n            android:layout_marginLeft=\"10dp\"\n            android:layout_toRightOf=\"@id/search_img\"\n            android:text=\"[支出]\"\n            android:textColor=\"@color/black\"\n            android:textSize=\"14sp\" />\n\n        <TextView\n            android:id=\"@+id/money\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:layout_marginRight=\"30dp\"\n            android:text=\"-500.0\"\n            android:textColor=\"#666872\"\n            android:textSize=\"18dp\" />\n\n        <ImageView\n            android:id=\"@+id/search_arrow\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:layout_marginRight=\"10dp\"\n            android:background=\"@drawable/nav_to_message_arrow_dark\" >\n        </ImageView>\n    </RelativeLayout>\n\n    <LinearLayout\n        android:id=\"@+id/gridview\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"#f5f5f5\"\n        android:gravity=\"center_horizontal\"\n        android:orientation=\"horizontal\"\n        android:visibility=\"gone\" >\n\n        <GridView\n            android:id=\"@+id/noScrollgridview\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_margin=\"10dp\"\n            android:gravity=\"center\"\n            android:horizontalSpacing=\"8dp\"\n            android:numColumns=\"4\"\n            android:scrollbars=\"none\"\n            android:verticalSpacing=\"5dp\" >\n        </GridView>\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/login.xml",
    "content": "<TableLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n\tandroid:layout_width=\"fill_parent\"\n\tandroid:layout_height=\"fill_parent\" \n\tandroid:stretchColumns=\"0,3\" \n\t>\n\t\n    <TableRow android:layout_width=\"wrap_content\"\n    \tandroid:layout_height=\"wrap_content\"\n\t\tandroid:layout_margin=\"10dp\"\n\t\tandroid:layout_weight=\"0.2\"\n\t\tandroid:gravity=\"bottom\">    \n    <TextView/>\n    <TextView\n    \tandroid:text=\"用  户  名：\"   \n    \tandroid:layout_width=\"wrap_content\"\n    \tandroid:textSize=\"20sp\"\n\t\tandroid:textColor=\"#a00000\"\n    \tandroid:layout_height=\"wrap_content\"/>\n    <EditText android:id=\"@+id/username\" \n    \tandroid:layout_width=\"wrap_content\"\n    \tandroid:minWidth=\"80dp\"\n    \tandroid:textSize=\"20sp\"\n    \tandroid:singleLine=\"true\"\n    \tandroid:maxWidth=\"120dp\"\n    \tandroid:layout_height=\"wrap_content\" \n    \tandroid:background=\"#dcdcc8\"/>\n    <TextView/>\n    </TableRow>\n    <TableRow android:layout_width=\"wrap_content\"\n    \tandroid:layout_height=\"wrap_content\"\n\t\tandroid:layout_margin=\"10dp\"\n\t\tandroid:layout_weight=\"0.1\"\n\t\tandroid:gravity=\"top\">\n    <TextView/>\n    <TextView \n    \tandroid:text=\"密        码：\"   \n\t\tandroid:textColor=\"#a00000\"\n    \tandroid:layout_width=\"wrap_content\"\n    \tandroid:textSize=\"20sp\"\n    \tandroid:layout_height=\"wrap_content\"/>\n    <EditText android:id=\"@+id/password\" \n    \tandroid:layout_width=\"wrap_content\" \n    \tandroid:layout_height=\"wrap_content\" \n    \tandroid:inputType=\"textPassword\" \n    \tandroid:minWidth=\"80dp\"\n    \tandroid:singleLine=\"true\"\n    \tandroid:maxWidth=\"120dp\"\n    \tandroid:textSize=\"20sp\"\n    \tandroid:background=\"#dcdcc8\"/>\n    </TableRow>\n    <TableRow android:layout_width=\"wrap_content\"\n    \tandroid:layout_height=\"wrap_content\"\n    \tandroid:layout_marginBottom=\"15dp\"\n    \tandroid:layout_marginTop=\"15dp\" \n\t\tandroid:layout_weight=\"0.6\"\n\t\tandroid:gravity=\"top\">\n    <TextView/>\n  \n\t<Button android:id=\"@+id/btnCancle\" \n\t\tandroid:layout_height=\"wrap_content\"  \n\t\tandroid:background=\"#a00000\"\n\t\tandroid:textColor=\"#ffffff\"  \n\t\tandroid:layout_width=\"100dp\"\n\t\tandroid:layout_marginRight=\"20dp\"\n\t\tandroid:text=\"取消\"\n\t/>\t\n\t  <Button android:id=\"@+id/btnLogin\" \n\t\tandroid:layout_height=\"wrap_content\"  \n\t\tandroid:text=\"登陆\" \n\t\tandroid:background=\"#a00000\"\n\t\tandroid:textColor=\"#ffffff\"  \n\t\tandroid:layout_width=\"100dp\"\n\t/>\n    <TextView/>  \n    </TableRow>\n     \n\t    \n    \n  \n</TableLayout>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/modifyinp.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:id=\"@+id/inoutitem\"\n\tandroid:orientation=\"vertical\"\n\tandroid:layout_width=\"fill_parent\"\n\tandroid:layout_height=\"fill_parent\"\n\t>\n\t<LinearLayout \n\t\tandroid:orientation=\"vertical\"\n\t\tandroid:layout_width=\"fill_parent\"\n\t\tandroid:layout_height=\"fill_parent\"\n\t\tandroid:layout_weight=\"3\"\n\t\t>\n\t\t<TextView android:id=\"@+id/inouttitle\"\n\t\t\tandroid:layout_width=\"wrap_content\"\n\t\t\tandroid:layout_gravity=\"center\"\n\t\t\tandroid:gravity=\"center_horizontal\"\n\t\t\tandroid:text=\"支出管理\"\n\t\t\tandroid:textSize=\"40sp\"\n\t\t\tandroid:textColor=\"#a00000\"\n\t\t\tandroid:textStyle=\"bold\" \n\t\t\tandroid:layout_height=\"wrap_content\"/>\n\t</LinearLayout>\n\t<LinearLayout \n\t\tandroid:orientation=\"vertical\"\n\t\tandroid:layout_width=\"fill_parent\"\n\t\tandroid:layout_height=\"fill_parent\"\n\t\tandroid:layout_weight=\"1\"\n\t\t>\n\t\t<RelativeLayout android:layout_width=\"fill_parent\"\n\t\t    android:layout_height=\"fill_parent\"\n\t\t    android:padding=\"10dp\"\n\t\t    >\n\t\t    <TextView android:layout_width=\"90dp\" \n\t\t    android:id=\"@+id/tvInOutMoney\" \n\t\t    android:textSize=\"20sp\" \n\t\t    android:text=\"金  额：\" \n\t\t    android:layout_height=\"wrap_content\" \n\t\t    android:layout_alignBaseline=\"@+id/txtInOutMoney\" \n\t\t    android:layout_alignBottom=\"@+id/txtInOutMoney\" \n\t\t    android:layout_alignParentLeft=\"true\" \n\t\t    android:layout_marginLeft=\"16dp\">\n\t\t    </TextView>\n\t\t    <EditText \n\t\t    android:id=\"@+id/txtInOutMoney\"\n\t\t    android:layout_width=\"210dp\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t    android:layout_toRightOf=\"@id/tvInOutMoney\"\n\t\t    android:inputType=\"number\"\n\t\t    android:numeric=\"integer\"\n\t\t    android:maxLength=\"9\"\n\t\t    />\n\t\t    <TextView android:layout_width=\"90dp\" \n\t\t    android:id=\"@+id/tvInOutTime\" \n\t\t    android:textSize=\"20sp\" \n\t\t    android:text=\"时  间：\" \n\t\t    android:layout_height=\"wrap_content\" \n\t\t    android:layout_alignBaseline=\"@+id/txtInOutTime\" \n\t\t    android:layout_alignBottom=\"@+id/txtInOutTime\" \n\t\t    android:layout_toLeftOf=\"@+id/txtInOutMoney\">\n\t\t    </TextView>\n\t\t    <EditText \n\t\t    android:id=\"@+id/txtInOutTime\"\n\t\t    android:layout_width=\"210dp\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t    android:layout_toRightOf=\"@id/tvInOutTime\"\n\t\t    android:layout_below=\"@id/txtInOutMoney\"\n\t\t    android:inputType=\"datetime\"\n\t\t    />\n\t\t    <TextView android:layout_width=\"90dp\" \n\t\t    android:id=\"@+id/tvInOutType\" \n\t\t    android:textSize=\"20sp\" \n\t\t    android:text=\"类  别：\" \n\t\t    android:layout_height=\"wrap_content\" \n\t\t    android:layout_alignBaseline=\"@+id/spInOutType\" \n\t\t    android:layout_alignBottom=\"@+id/spInOutType\" \n\t\t    android:layout_alignLeft=\"@+id/tvInOutTime\">\n\t\t    </TextView>\n\t\t    <Spinner android:id=\"@+id/spInOutType\"\n\t\t    android:layout_width=\"210dp\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t    android:layout_toRightOf=\"@id/tvInOutType\"\n\t\t    android:layout_below=\"@id/txtInOutTime\" \n\t\t    android:textColor=\"#000000\"\n\t\t    />\n\t\t    <TextView android:layout_width=\"90dp\" \n\t\t    android:id=\"@+id/tvInOut\" \n\t\t    android:textSize=\"20sp\" \n\t\t    android:text=\"付款方：\" \n\t\t    android:layout_height=\"wrap_content\" \n\t\t    android:layout_alignBaseline=\"@+id/txtInOut\" \n\t\t    android:layout_alignBottom=\"@+id/txtInOut\" \n\t\t    android:layout_toLeftOf=\"@+id/spInOutType\">\n\t\t    </TextView>\n\t\t    <EditText \n\t\t    android:id=\"@+id/txtInOut\"\n\t\t    android:layout_width=\"210dp\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t    android:layout_toRightOf=\"@id/tvInOut\"\n\t\t    android:layout_below=\"@id/spInOutType\"\n\t\t    android:singleLine=\"false\"\n\t\t    />\n\t\t    <TextView android:layout_width=\"90dp\" \n\t\t    android:id=\"@+id/tvInOutMark\" \n\t\t    android:textSize=\"20sp\" \n\t\t    android:text=\"备  注：\" \n\t\t    android:layout_height=\"wrap_content\" \n\t\t    android:layout_alignTop=\"@+id/txtInOutMark\" \n\t\t    android:layout_toLeftOf=\"@+id/txtInOut\">\n\t\t    </TextView>\n\t\t    <EditText \n\t\t    android:id=\"@+id/txtInOutMark\"\n\t\t    android:layout_width=\"210dp\"\n\t\t    android:layout_height=\"150dp\"\n\t\t    android:layout_toRightOf=\"@id/tvInOutMark\"\n\t\t    android:layout_below=\"@id/txtInOut\"\n\t\t    android:gravity=\"top\"\n\t\t\tandroid:background=\"#21a0a0\"\n\t\t\tandroid:textColor=\"#ffffff\"\n\t\t    android:singleLine=\"false\"\n\t\t    />\n\t\t    </RelativeLayout>\n\t</LinearLayout>\n\t<LinearLayout \n\t\tandroid:orientation=\"horizontal\"\n\t\tandroid:layout_width=\"match_parent\"\n\t\tandroid:layout_height=\"wrap_content\" \n\t\tandroid:gravity=\"center_horizontal\"\n\t\t> \n\t\t \n\t\t \n\t\t<Button\n\t\t    android:id=\"@+id/btnInOutDelete\"\n\t\t    android:layout_width=\"wrap_content\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t\tandroid:background=\"#a00000\"\n\t\t\tandroid:textColor=\"#ffffff\"\n\t\t    android:textSize=\"22sp\"  \n\t\t\tandroid:layout_margin=\"10dp\" \n\t\t\tandroid:paddingRight=\"20dp\"\n\t\t\tandroid:paddingLeft=\"20dp\"\n\t\t    android:text=\"删除\"\n\t\t    />\n\t\t    <Button \n\t\t\tandroid:id=\"@+id/btnInOutEdit\"\n\t\t \tandroid:layout_width=\"wrap_content\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t\tandroid:background=\"#a00000\"\n\t\t\tandroid:textColor=\"#ffffff\"\n\t\t    android:textSize=\"22sp\" \n\t\t\tandroid:layout_margin=\"10dp\"\n\t\t\tandroid:paddingRight=\"20dp\"\n\t\t\tandroid:paddingLeft=\"20dp\"\n\t\t\tandroid:text=\"修改\"    \n\t\t    /> \n\t</LinearLayout>\t\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/modifynote.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:id=\"@+id/itemNote\"\n\tandroid:orientation=\"vertical\"\n\tandroid:layout_width=\"fill_parent\"\n\tandroid:layout_height=\"fill_parent\"\n\t>\n\t<LinearLayout \n\t\tandroid:orientation=\"vertical\"\n\t\tandroid:layout_width=\"fill_parent\"\n\t\tandroid:layout_height=\"fill_parent\"\n\t\tandroid:layout_weight=\"3.6\"\n\t\t>\n\t\t<TextView \n\t\t\tandroid:layout_width=\"wrap_content\"\n\t\t\tandroid:layout_gravity=\"center\"\n\t\t\tandroid:gravity=\"center_horizontal\"\n\t\t\tandroid:text=\"便签管理\"\n\t\t\tandroid:textSize=\"40sp\"\n\t\t\tandroid:textColor=\"#a00000\"\n\t\t\tandroid:textStyle=\"bold\" \n\t\t\tandroid:layout_height=\"wrap_content\"/>\n\t</LinearLayout>\n\t<LinearLayout \n\t\tandroid:orientation=\"vertical\"\n\t\tandroid:layout_width=\"fill_parent\"\n\t\tandroid:layout_height=\"fill_parent\"\n\t\tandroid:layout_weight=\"1\"\n\t\t>\n\t\t<RelativeLayout android:layout_width=\"fill_parent\"\n\t\t    android:layout_height=\"fill_parent\"\n\t\t    android:padding=\"5dp\"\n\t\t    >\n\t\t    <TextView android:layout_width=\"350dp\"\t\n\t\t    android:id=\"@+id/tvNote\" \n\t\t    android:textSize=\"20sp\" \n\t\t    android:text=\"请输入便签，最多输入200字\" \n\t    \tandroid:textColor=\"#6e6e6e\"\n\t\t    android:layout_alignParentRight=\"true\"\n\t\t    android:layout_height=\"wrap_content\" \n\t\t    />\n\t\t    <EditText \n\t\t    android:id=\"@+id/txtNote\"\n\t\t    android:layout_width=\"350dp\"\n\t\t    android:layout_height=\"400dp\"\n\t\t    android:padding=\"20dp\"\n\t\t    android:layout_below=\"@id/tvNote\"\n\t\t    android:gravity=\"top\"\n\t\t\tandroid:background=\"#21a0a0\"\n\t\t\tandroid:textColor=\"#ffffff\"\n\t\t    android:singleLine=\"false\"\n\t\t    />\n\t\t    </RelativeLayout>\n\t</LinearLayout>\n\t<LinearLayout \n\t\tandroid:orientation=\"horizontal\"\n\t\tandroid:layout_width=\"match_parent\"\n\t\tandroid:layout_height=\"wrap_content\" \n\t\tandroid:gravity=\"center_horizontal\"\n\t\t> \n\t\t \n\t\t<Button\n\t\t    android:id=\"@+id/btnnoteManageDelete\"\n\t\t    android:layout_width=\"wrap_content\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t\tandroid:background=\"#a00000\"\n\t\t\tandroid:textColor=\"#ffffff\"\n\t\t    android:textSize=\"22sp\"  \n\t\t\tandroid:layout_margin=\"10dp\" \n\t\t\tandroid:paddingRight=\"20dp\"\n\t\t\tandroid:paddingLeft=\"20dp\"\n\t\t\tandroid:text=\"删除\"\n\t\t    />\n\t\t    <Button \n\t\t\tandroid:id=\"@+id/btnnoteManageEdit\"\n\t\t    android:layout_width=\"wrap_content\"\n\t\t    android:layout_height=\"wrap_content\"\n\t\t\tandroid:background=\"#a00000\"\n\t\t\tandroid:textColor=\"#ffffff\"\n\t\t    android:textSize=\"22sp\" \n\t\t\tandroid:layout_margin=\"10dp\"\n\t\t\tandroid:paddingRight=\"20dp\"\n\t\t\tandroid:paddingLeft=\"20dp\"\n\t\t\tandroid:text=\"修改\"    \n\t\t    /> \n\t</LinearLayout>\t\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/note.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:id=\"@+id/iteminfo\" android:orientation=\"vertical\"\n\tandroid:layout_width=\"wrap_content\" android:layout_height=\"wrap_content\"\n\tandroid:layout_marginTop=\"5dp\"\n\tandroid:weightSum=\"1\">\n\t<LinearLayout android:id=\"@+id/linearLayout1\"\n\t\t\tandroid:layout_height=\"match_parent\" \n\t\t\tandroid:layout_width=\"fill_parent\"\n\t\t\tandroid:layout_weight=\"0.04\"\n\t\t\tandroid:orientation=\"vertical\">\n\t\t<RelativeLayout android:layout_height=\"wrap_content\" \n\t\t\tandroid:layout_width=\"match_parent\">\n\t\t<TextView android:text=\"我的便签\" \n\t\t\tandroid:layout_width=\"fill_parent\"\n\t\t\tandroid:layout_height=\"wrap_content\"\n\t\t\tandroid:gravity=\"center\"\n\t\t\tandroid:textSize=\"20dp\"\n\t\t\tandroid:textColor=\"#8C6931\"\n\t\t/>\n\t\t</RelativeLayout>\n\t</LinearLayout>\n\t\t<LinearLayout android:id=\"@+id/linearLayout2\"\n\t\t\tandroid:layout_height=\"0dp\" \n\t\t\tandroid:layout_width=\"fill_parent\"\n\t\t\tandroid:layout_marginLeft=\"4dp\"\n\t\t\tandroid:layout_marginRight=\"4dp\"\n\t\t\tandroid:orientation=\"vertical\" \n\t\t\tandroid:layout_weight=\"0.95\">\n\t\t<ListView android:id=\"@+id/lvinnoteinfo\" \n\t\t\tandroid:layout_width=\"match_parent\" \n\t\t\tandroid:layout_height=\"match_parent\"\n\t\t\tandroid:listSelector=\"@drawable/selector\"\n\t\t\tandroid:cacheColorHint=\"@android:color/transparent\"\n\t\t\tandroid:scrollbarAlwaysDrawVerticalTrack=\"true\"\n\t\t\t/>\n\t</LinearLayout> \n\t<LinearLayout \n\t\tandroid:layout_width=\"fill_parent\"\n\t\tandroid:layout_height=\"wrap_content\"\n\t\tandroid:gravity=\"bottom\"\n\t\tandroid:orientation=\"vertical\">\n\t<Button\n\t    android:id=\"@+id/baddnote\"\n\t    android:layout_width=\"fill_parent\"\n\t\tandroid:background=\"#a00000\"\n\t\tandroid:textColor=\"#ffffff\"\n\t    android:textSize=\"22sp\"\n\t\tandroid:layout_weight=\"0.6\"\n\t    android:layout_height=\"0dp\"\n\t    android:gravity=\"center_vertical|center_horizontal\"\n\t    android:text=\"新增\">\n\t</Button> \n\t</LinearLayout>\n</LinearLayout>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/notification_item.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"fill_parent\"\n    android:padding=\"3dp\" >\n\n    <ImageView\n        android:id=\"@+id/notificationImage\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:src=\"@android:drawable/stat_sys_download\" \n        android:paddingLeft=\"16dp\"/>\n\n    <TextView\n        android:id=\"@+id/notificationTitle\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_toRightOf=\"@id/notificationImage\"\n        android:paddingLeft=\"26dp\"\n        android:textColor=\"#FFFFFFFF\" />\n    <!-- android:textColor=\"#FF000000\"  -->\n\n    <TextView\n        android:id=\"@+id/notificationPercent\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_below=\"@id/notificationImage\"\n        android:paddingTop=\"2dp\"\n        android:textColor=\"#FFFFFFFF\" \n        android:paddingLeft=\"16dp\"/>\n\n    <ProgressBar\n        android:id=\"@+id/notificationProgress\"\n        style=\"?android:attr/progressBarStyleHorizontal\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignLeft=\"@id/notificationTitle\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_alignTop=\"@id/notificationPercent\"\n        android:layout_below=\"@id/notificationTitle\"\n        android:paddingLeft=\"26dp\"\n        android:paddingRight=\"3dp\"\n        android:paddingTop=\"2dp\" />\n\n</RelativeLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/pay.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:id=\"@+id/iteminfo\" android:orientation=\"vertical\"\n\tandroid:layout_width=\"wrap_content\" android:layout_height=\"wrap_content\"\n\tandroid:layout_marginTop=\"5dp\"\n\tandroid:weightSum=\"1\">\n\t<LinearLayout android:id=\"@+id/linearLayout1\"\n\t\t\tandroid:layout_height=\"match_parent\" \n\t\t\tandroid:layout_width=\"fill_parent\"\n\t\t\tandroid:layout_weight=\"0.04\"\n\t\t\tandroid:orientation=\"vertical\">\n\t\t<RelativeLayout android:layout_height=\"wrap_content\" \n\t\t\tandroid:layout_width=\"match_parent\">\n\t\t<TextView android:text=\"我的支出\" \n\t\t\tandroid:layout_width=\"fill_parent\"\n\t\t\tandroid:layout_height=\"wrap_content\"\n\t\t\tandroid:gravity=\"center\" \n\t\t\tandroid:textSize=\"32dp\"\n\t\t\tandroid:textColor=\"#820000\"\n\t\t\tandroid:padding=\"10dp\"\n\t\t/>\n\t\t</RelativeLayout>\n\t</LinearLayout>\n\t\t<LinearLayout android:id=\"@+id/linearLayout2\"\n\t\t\tandroid:layout_height=\"0dp\" \n\t\t\tandroid:layout_width=\"fill_parent\"\n\t\t\tandroid:orientation=\"vertical\" \n\t\t\tandroid:layout_marginLeft=\"4dp\"\n\t\t\tandroid:layout_marginRight=\"4dp\"\n\t\t\tandroid:layout_weight=\"0.95\">\n\t\t<ListView android:id=\"@+id/lvoutaccountinfo\" \n\t\t\tandroid:layout_width=\"match_parent\" \n\t\t\tandroid:layout_height=\"match_parent\"\n\t \t\tandroid:listSelector=\"@drawable/selector\"\n\t\t\tandroid:cacheColorHint=\"@android:color/transparent\"\n\t\t\tandroid:scrollbarAlwaysDrawVerticalTrack=\"true\"\n\t\t\t/>\n\t</LinearLayout>\n\t\n\t<LinearLayout \n\t\tandroid:layout_width=\"fill_parent\"\n\t\tandroid:layout_height=\"wrap_content\"\n\t\tandroid:gravity=\"bottom\"\n\t\tandroid:orientation=\"vertical\">\n\t<Button\n\t    android:id=\"@+id/baddpay\"\n\t    android:layout_width=\"fill_parent\"\n\t\tandroid:background=\"#a00000\"\n\t\tandroid:textColor=\"#ffffff\"\n\t    android:textSize=\"22sp\"\n\t\tandroid:layout_weight=\"0.6\"\n\t    android:layout_height=\"0dp\"\n\t    android:gravity=\"center_vertical|center_horizontal\"\n\t    android:text=\"新增\">\n\t</Button> \n\t</LinearLayout>\n</LinearLayout>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/paychart.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"fill_parent\"\n    android:background=\"@drawable/report_activity_bg\"\n    tools:context=\".PayChart\" >\n\n    <RelativeLayout\n        android:id=\"@+id/actionbar\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"@color/fragment2\"\n        android:paddingBottom=\"5dip\"\n        android:paddingRight=\"10dip\"\n        android:paddingTop=\"5dip\" >\n\n        <ImageView\n            android:id=\"@+id/example_left2\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentLeft=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:src=\"@drawable/left_sild\" />\n\n        <ImageView\n            android:id=\"@+id/example_right2\"\n            android:layout_width=\"30dp\"\n            android:layout_height=\"30dp\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_centerVertical=\"true\" />\n\n        <TextView\n            android:id=\"@+id/example_center\"\n            style=\"@style/TextView.Middle.White\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_centerHorizontal=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:text=\"记账\"\n            android:textColor=\"@android:color/black\" />\n    </RelativeLayout>\n\n    <RelativeLayout\n        android:id=\"@+id/controlbar\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_below=\"@id/actionbar\"\n        android:layout_marginTop=\"20dp\" >\n\n        <ImageView\n            android:id=\"@+id/example_left\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentLeft=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:src=\"@drawable/chart_left_btn\" />\n\n        <ImageView\n            android:id=\"@+id/example_right\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:src=\"@drawable/chart_right_btn\" />\n    </RelativeLayout>\n\n    <com.cwp.chart.PieChart\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginBottom=\"10dp\"\n        android:layout_marginLeft=\"10dp\"\n        android:layout_marginRight=\"10dp\"\n        android:layout_marginTop=\"30dp\" >\n\n        <com.cwp.chart.PieView\n            android:id=\"@+id/lotteryView\"\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"fill_parent\"\n            android:layout_gravity=\"center\"\n            android:tag=\"pieView\" />\n\n        <TextView\n            android:id=\"@+id/MyTV\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center_horizontal|top\"\n            android:layout_marginBottom=\"25dip\"\n            android:gravity=\"center\"\n            android:paddingBottom=\"20dip\"\n            android:tag=\"pieText\"\n            android:textColor=\"#FFF\"\n            android:textSize=\"12sp\" />\n\n        <TextView\n            android:id=\"@+id/MyTVbottom\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center_horizontal|top\"\n            android:layout_marginBottom=\"8dip\"\n            android:gravity=\"center\"\n            android:paddingTop=\"28dip\"\n            android:tag=\"pieText\"\n            android:textColor=\"#ffffffff\"\n            android:textSize=\"12sp\" />\n    </com.cwp.chart.PieChart>\n\n    <LinearLayout\n        android:id=\"@+id/pdataselect\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_marginBottom=\"65dp\"\n        android:layout_weight=\"0.01\"\n        android:background=\"#800000\"\n        android:orientation=\"horizontal\"\n        android:padding=\"10dp\"\n        android:visibility=\"gone\" >\n\n        <LinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"9\"\n            android:orientation=\"vertical\" >\n\n            <LinearLayout\n                android:layout_width=\"fill_parent\"\n                android:layout_height=\"fill_parent\"\n                android:layout_marginBottom=\"10dp\"\n                android:orientation=\"horizontal\" >\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:gravity=\"center_horizontal\"\n                    android:text=\"从：\"\n                    android:textColor=\"#ffffff\" />\n\n                <Spinner\n                    android:id=\"@+id/pyear\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#ffffff\"\n                    android:gravity=\"center_horizontal\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:gravity=\"center_horizontal\"\n                    android:text=\"年\"\n                    android:textColor=\"#ffffff\" />\n\n                <Spinner\n                    android:id=\"@+id/pmonth\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#ffffff\"\n                    android:entries=\"@array/time_month\"\n                    android:gravity=\"center_horizontal\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:gravity=\"center_horizontal\"\n                    android:text=\"月\"\n                    android:textColor=\"#ffffff\" />\n\n                <Spinner\n                    android:id=\"@+id/pday\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#ffffff\"\n                    android:entries=\"@array/time_day\"\n                    android:gravity=\"center_horizontal\" />\n            </LinearLayout>\n\n            <LinearLayout\n                android:layout_width=\"fill_parent\"\n                android:layout_height=\"fill_parent\"\n                android:orientation=\"horizontal\" >\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:gravity=\"center_horizontal\"\n                    android:text=\"到：\"\n                    android:textColor=\"#ffffff\" />\n\n                <Spinner\n                    android:id=\"@+id/pyeare\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#ffffff\"\n                    android:gravity=\"center_horizontal\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:gravity=\"center_horizontal\"\n                    android:text=\"年\"\n                    android:textColor=\"#ffffff\" />\n\n                <Spinner\n                    android:id=\"@+id/pmonthe\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#ffffff\"\n                    android:entries=\"@array/time_month\"\n                    android:gravity=\"center_horizontal\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:gravity=\"center_horizontal\"\n                    android:text=\"月\"\n                    android:textColor=\"#ffffff\" />\n\n                <Spinner\n                    android:id=\"@+id/pdaye\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#ffffff\"\n                    android:entries=\"@array/time_day\"\n                    android:gravity=\"center_horizontal\" />\n            </LinearLayout>\n        </LinearLayout>\n\n        <Button\n            android:id=\"@+id/panytime\"\n            android:layout_width=\"30dp\"\n            android:layout_height=\"match_parent\"\n            android:layout_marginLeft=\"5dp\"\n            android:layout_weight=\"2\"\n            android:background=\"#e6e6e6\"\n            android:listSelector=\"@drawable/selector\"\n            android:text=\"设置\"\n            android:textColor=\"#800000\" />\n    </LinearLayout>\n\n    <FrameLayout\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"66dp\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_alignParentLeft=\"true\"\n        android:background=\"@drawable/toolbar_bg_normal\" >\n\n        <LinearLayout\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"fill_parent\"\n            android:layout_marginTop=\"1dp\"\n            android:gravity=\"center_horizontal\" >\n\n            <FrameLayout\n                android:id=\"@+id/layout_friendfeed2\"\n                android:layout_width=\"fill_parent\"\n                android:layout_height=\"60dp\"\n                android:layout_weight=\"1\" >\n\n                <ImageView\n                    android:id=\"@+id/image_friendfeed2\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_gravity=\"top|center\"\n                    android:layout_marginTop=\"16.0dip\"\n                    android:src=\"@drawable/tab_friendfeed_btn\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_gravity=\"bottom|center\"\n                    android:layout_marginTop=\"6.0dip\"\n                    android:text=\"明细\"\n                    android:textColor=\"@color/tab_friendfeed_text\"\n                    android:textSize=\"12sp\" />\n            </FrameLayout>\n\n            <FrameLayout\n                android:id=\"@+id/layout_myfeed2\"\n                android:layout_width=\"fill_parent\"\n                android:layout_height=\"60dp\"\n                android:layout_weight=\"1\" >\n\n                <ImageView\n                    android:id=\"@+id/image_myfeed2\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_gravity=\"top|center\"\n                    android:layout_marginTop=\"16.0dip\"\n                    android:src=\"@drawable/tab_myfeed_btn\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_gravity=\"bottom|center\"\n                    android:layout_marginTop=\"6.0dip\"\n                    android:text=\"报表\"\n                    android:textColor=\"@color/tab_myfeed_text\"\n                    android:textSize=\"12sp\" />\n            </FrameLayout>\n\n            <FrameLayout\n                android:layout_width=\"fill_parent\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\" >\n            </FrameLayout>\n\n            <FrameLayout\n                android:id=\"@+id/layout_home2\"\n                android:layout_width=\"fill_parent\"\n                android:layout_height=\"60dp\"\n                android:layout_weight=\"1\" >\n\n                <ImageView\n                    android:id=\"@+id/image_home2\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_gravity=\"top|center\"\n                    android:layout_marginTop=\"16.0dip\"\n                    android:src=\"@drawable/tab_home_btn\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_gravity=\"bottom|center\"\n                    android:layout_marginTop=\"6.0dip\"\n                    android:text=\"账户\"\n                    android:textColor=\"@color/tab_home_text\"\n                    android:textSize=\"12sp\" />\n            </FrameLayout>\n\n            <FrameLayout\n                android:id=\"@+id/layout_more2\"\n                android:layout_width=\"fill_parent\"\n                android:layout_height=\"60dp\"\n                android:layout_weight=\"1\" >\n\n                <ImageView\n                    android:id=\"@+id/image_more2\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_gravity=\"top|center\"\n                    android:layout_marginTop=\"16.0dip\"\n                    android:src=\"@drawable/tab_more_btn\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_gravity=\"bottom|center\"\n                    android:layout_marginTop=\"6.0dip\"\n                    android:text=\"更多\"\n                    android:textColor=\"@color/tab_more_text\"\n                    android:textSize=\"12sp\" />\n            </FrameLayout>\n        </LinearLayout>\n    </FrameLayout>\n\n    <ImageView\n        android:id=\"@+id/toggle_btn2\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_centerHorizontal=\"true\"\n        android:src=\"@drawable/toolbar_btn_normal\" />\n\n    <ImageView\n        android:id=\"@+id/plus_btn2\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_alignTop=\"@+id/frameLayout1\"\n        android:layout_centerHorizontal=\"true\"\n        android:layout_marginTop=\"24dip\"\n        android:paddingBottom=\"18dip\"\n        android:src=\"@drawable/toolbar_plus\" />\n\n</RelativeLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/paydata.xml",
    "content": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"fill_parent\"\n    android:orientation=\"vertical\" >\n\n    <LinearLayout\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center_horizontal\" >\n\n        <TextView\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"40dp\"\n            android:background=\"#800000\"\n            android:gravity=\"center_vertical|center_horizontal\"\n            android:text=\"分类支出统计表\"\n            android:textColor=\"#ffffff\"\n            android:textSize=\"28dp\" />\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/pchart\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_weight=\"9\"\n        android:orientation=\"vertical\" >\n\n        <TextView\n            android:id=\"@+id/nodata\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center_vertical|center_horizontal\"\n            android:layout_marginTop=\"100dp\"\n            android:background=\"@drawable/nodata\"\n            android:visibility=\"gone\" />\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/pdataselect\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_weight=\"0.01\"\n        android:background=\"#800000\"\n        android:orientation=\"horizontal\"\n        android:padding=\"10dp\" >\n\n        <LinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"9\"\n            android:orientation=\"vertical\" >\n\n            <LinearLayout\n                android:layout_width=\"fill_parent\"\n                android:layout_height=\"fill_parent\"\n                android:layout_marginBottom=\"10dp\"\n                android:orientation=\"horizontal\" >\n\n                <Spinner\n                    android:id=\"@+id/pyear\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#ffffff\"\n                    android:gravity=\"center_horizontal\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:gravity=\"center_horizontal\"\n                    android:text=\"年\"\n                    android:textColor=\"#ffffff\" />\n\n                <Spinner\n                    android:id=\"@+id/pmonth\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#ffffff\"\n                    android:entries=\"@array/time_month\"\n                    android:gravity=\"center_horizontal\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:gravity=\"center_horizontal\"\n                    android:text=\"月\"\n                    android:textColor=\"#ffffff\" />\n\n                <Spinner\n                    android:id=\"@+id/pday\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#ffffff\"\n                    android:entries=\"@array/time_day\"\n                    android:gravity=\"center_horizontal\" />\n            </LinearLayout>\n\n            <LinearLayout\n                android:layout_width=\"fill_parent\"\n                android:layout_height=\"fill_parent\"\n                android:orientation=\"horizontal\" >\n\n                <Spinner\n                    android:id=\"@+id/pyeare\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#ffffff\"\n                    android:gravity=\"center_horizontal\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:gravity=\"center_horizontal\"\n                    android:text=\"年\"\n                    android:textColor=\"#ffffff\" />\n\n                <Spinner\n                    android:id=\"@+id/pmonthe\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#ffffff\"\n                    android:entries=\"@array/time_month\"\n                    android:gravity=\"center_horizontal\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:gravity=\"center_horizontal\"\n                    android:text=\"月\"\n                    android:textColor=\"#ffffff\" />\n\n                <Spinner\n                    android:id=\"@+id/pdaye\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:background=\"#ffffff\"\n                    android:entries=\"@array/time_day\"\n                    android:gravity=\"center_horizontal\" />\n            </LinearLayout>\n        </LinearLayout>\n\n        <Button\n            android:id=\"@+id/panytime\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"10dp\"\n            android:layout_weight=\"2\"\n            android:background=\"#e6e6e6\"\n            android:listSelector=\"@drawable/selector\"\n            android:text=\"任意时间段\"\n            android:textColor=\"#800000\" />\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/dataselect\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_weight=\"1\"\n        android:orientation=\"horizontal\" >\n\n        <Button\n            android:id=\"@+id/pbefore\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_margin=\"5dp\"\n            android:layout_weight=\"1\"\n            android:background=\"#800000\"\n            android:listSelector=\"@drawable/selector\"\n            android:text=\"上一月\"\n            android:textColor=\"#ffffff\" />\n\n        <Button\n            android:id=\"@+id/pafter\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_margin=\"5dp\"\n            android:layout_weight=\"1\"\n            android:background=\"#800000\"\n            android:listSelector=\"@drawable/selector\"\n            android:text=\"下一月\"\n            android:textColor=\"#ffffff\" />\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/pidata.xml",
    "content": "<LinearLayout\n    android:layout_width=\"fill_parent\" xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_height=\"fill_parent\" \n    android:orientation=\"vertical\">\n\t<LinearLayout android:layout_width=\"fill_parent\"\n\t    android:layout_height=\"wrap_content\"\n\t    android:gravity=\"center_horizontal\">\n\t    <TextView \n\t        android:layout_width=\"fill_parent\"\n\t        android:gravity=\"center_vertical|center_horizontal\"\n\t        android:layout_height=\"40dp\"\n\t        android:text=\"收-支 总统计表\"\n\t        android:background=\"#800000\"\n\t        android:textColor=\"#ffffff\"\n\t        android:textSize=\"28dp\"\n\t        />\n\t</LinearLayout>\n    <LinearLayout\n        android:id=\"@+id/chart\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_weight=\"4\" \n        android:orientation=\"vertical\" >\n\t</LinearLayout>\n\n\t<LinearLayout\n\t    android:id=\"@+id/dataselect\"\n\t    android:layout_width=\"fill_parent\"\n\t    android:layout_height=\"wrap_content\"\n\t    android:layout_weight=\"0.01\"\n\t    android:layout_marginTop=\"-70dp\"\n\t    android:background=\"#800000\"\n\t    android:padding=\"10dp\"\n\t    android:orientation=\"horizontal\" > \n\t    <LinearLayout \n\t        android:orientation=\"vertical\"\n\t        android:layout_width=\"wrap_content\" \n\t\t    android:layout_height=\"wrap_content\"\n\t\t    android:layout_weight=\"9\">\n\t        <LinearLayout android:orientation=\"horizontal\"\n\t\t        android:layout_width=\"fill_parent\"\n\t\t        android:layout_height=\"fill_parent\" \n\t\t        android:layout_marginBottom=\"10dp\">\n\t            <Spinner android:id=\"@+id/year\"\n\t\t\t        android:layout_weight=\"1\"\n\t\t\t\t    android:layout_height=\"wrap_content\"\n\t\t\t        android:gravity=\"center_horizontal\"\n\t\t\t        android:background=\"#ffffff\"\n\t\t\t        android:layout_width=\"wrap_content\"  />  \n\t\t\t    \n\t\t\t    <TextView \n\t\t\t        android:layout_width=\"wrap_content\"\n\t\t\t        android:layout_height=\"wrap_content\" \n\t\t\t        android:layout_weight=\"1\"\n\t\t\t        android:textColor=\"#ffffff\"\n\t\t\t        android:gravity=\"center_horizontal\"\n\t\t\t        android:text=\"年\"\n\t\t\t        /> \n\t\t\t        \n\t\t\t\t<Spinner android:id=\"@+id/month\"\n\t\t\t        android:layout_weight=\"1\"\n\t\t\t        android:background=\"#ffffff\"\n\t\t\t        android:gravity=\"center_horizontal\"\n\t\t\t\t    android:layout_height=\"wrap_content\"\n\t\t\t        android:layout_width=\"wrap_content\" \n\t\t\t\t    android:entries=\"@array/time_month\"/> \n\t\t         \n\t\t\t    \n\t\t\t    <TextView \n\t\t\t        android:layout_width=\"wrap_content\"\n\t\t\t        android:layout_height=\"wrap_content\" \n\t\t\t        android:gravity=\"center_horizontal\"\n\t\t\t        android:layout_weight=\"1\"\n\t\t\t        android:textColor=\"#ffffff\"\n\t\t\t        android:text=\"月\"\n\t\t\t        />\n\t\t\t     \n\t\t\t        \n\t\t\t\t<Spinner android:id=\"@+id/day\"\n\t\t\t        android:layout_weight=\"1\"\n\t\t\t        android:gravity=\"center_horizontal\"\n\t\t\t        android:background=\"#ffffff\"\n\t\t\t\t    android:layout_height=\"wrap_content\"\n\t\t\t        android:layout_width=\"wrap_content\" \n\t\t\t        android:entries=\"@array/time_day\" /> \n         \n\t        </LinearLayout>\n\t        <LinearLayout android:orientation=\"horizontal\"\n\t\t        android:layout_width=\"fill_parent\" \n\t\t        android:layout_height=\"fill_parent\">\n\t              <Spinner android:id=\"@+id/yeare\"\n\t\t\t        android:layout_weight=\"1\"\n\t\t\t\t    android:layout_height=\"wrap_content\"\n\t\t\t        android:gravity=\"center_horizontal\"\n\t\t\t        android:background=\"#ffffff\"\n\t\t\t        android:layout_width=\"wrap_content\"  />  \n\t\t\t    \n\t\t\t    <TextView \n\t\t\t        android:layout_width=\"wrap_content\"\n\t\t\t        android:layout_height=\"wrap_content\" \n\t\t\t        android:layout_weight=\"1\"\n\t\t\t        android:textColor=\"#ffffff\"\n\t\t\t        android:gravity=\"center_horizontal\"\n\t\t\t        android:text=\"年\"\n\t\t\t        /> \n\t\t\t        \n\t\t\t\t<Spinner android:id=\"@+id/monthe\"\n\t\t\t        android:layout_weight=\"1\"\n\t\t\t        android:background=\"#ffffff\"\n\t\t\t        android:gravity=\"center_horizontal\"\n\t\t\t\t    android:layout_height=\"wrap_content\"\n\t\t\t        android:layout_width=\"wrap_content\" \n\t\t\t\t    android:entries=\"@array/time_month\"/> \n\t\t         \n\t\t\t    \n\t\t\t    <TextView \n\t\t\t        android:layout_width=\"wrap_content\"\n\t\t\t        android:layout_height=\"wrap_content\" \n\t\t\t        android:gravity=\"center_horizontal\" \n\t\t\t        android:layout_weight=\"1\"\n\t\t\t        android:textColor=\"#ffffff\"\n\t\t\t        android:text=\"月\"\n\t\t\t        />\n\t\t\t     \n\t\t\t        \n\t\t\t\t<Spinner android:id=\"@+id/daye\"\n\t\t\t        android:layout_weight=\"1\"\n\t\t\t        android:gravity=\"center_horizontal\"\n\t\t\t        android:background=\"#ffffff\"\n\t\t\t\t    android:layout_height=\"wrap_content\"\n\t\t\t        android:layout_width=\"wrap_content\" \n\t\t\t        android:entries=\"@array/time_day\" /> \n\t        </LinearLayout>\n\t    </LinearLayout>\n\t        \n\t\t\n\t    \n\t    <Button\n\t        android:id=\"@+id/anytime\"\n\t        android:layout_width=\"wrap_content\"\n\t        android:layout_height=\"wrap_content\" \n\t        android:layout_weight=\"2\"\n\t        android:layout_marginLeft=\"10dp\"\n\t        android:background=\"#e6e6e6\"\n\t        android:text=\"任意时间段\"\n\t\t \tandroid:listSelector=\"@drawable/selector\" \n\t        android:textColor=\"#800000\" />\n\n\t    \n\t    \n\t</LinearLayout>  \n\t<LinearLayout\n\t    android:id=\"@+id/dataselect\"\n\t    android:layout_width=\"fill_parent\"\n\t    android:layout_height=\"wrap_content\"\n\t    android:layout_weight=\"1\"\n\t    android:orientation=\"horizontal\" >\n\n\t    <Button\n\t        android:id=\"@+id/before\"\n\t        android:layout_width=\"wrap_content\"\n\t        android:layout_height=\"wrap_content\"\n\t        android:layout_margin=\"5dp\"\n\t        android:layout_weight=\"1\"\n\t        android:background=\"#800000\"\n\t        android:text=\"上月\"\n\t\t \tandroid:listSelector=\"@drawable/selector\" \n\t        android:textColor=\"#ffffff\" />\n\n\t     \n\n\t    <Button\n\t        android:id=\"@+id/after\"\n\t        android:layout_width=\"wrap_content\"\n\t        android:layout_height=\"wrap_content\"\n\t        android:layout_margin=\"5dp\"\n\t        android:layout_weight=\"1\"\n\t\t \tandroid:listSelector=\"@drawable/selector\" \n\t        android:background=\"#800000\"\n\t        android:text=\"下月\"\n\t        android:textColor=\"#ffffff\" />\n\t    \n\t</LinearLayout>    \n</LinearLayout>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/popwindow_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"fill_parent\" >\n\n    <LinearLayout\n        android:id=\"@+id/popwindow\"\n        android:layout_width=\"317.32812dip\"\n        android:layout_height=\"217.33331dip\"\n        android:layout_alignParentBottom=\"true\"\n        android:background=\"@drawable/write_operation_bg\"\n        android:orientation=\"vertical\"\n        android:visibility=\"visible\"\n        tools:ignore=\"UselessParent\" >\n\n        <LinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"20.0dip\"\n            android:layout_gravity=\"center_horizontal\"\n            android:layout_marginBottom=\"15.0dip\"\n            android:layout_marginTop=\"20.0dip\"\n            android:orientation=\"horizontal\" >\n\n            <LinearLayout\n                android:layout_width=\"30.0dip\"\n                android:layout_height=\"1.0dip\"\n                android:layout_gravity=\"center_vertical\"\n                android:background=\"#ffffffff\" />\n\n            <LinearLayout\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"fill_parent\"\n                android:layout_gravity=\"center\"\n                android:layout_marginLeft=\"10.0dip\"\n                android:layout_marginRight=\"10.0dip\" >\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_centerVertical=\"true\"\n                    android:text=\"记账生活，记住感动\"\n                    android:textColor=\"#ffcecece\"\n                    android:textSize=\"16.0dip\" />\n            </LinearLayout>\n\n            <LinearLayout\n                android:layout_width=\"30.0dip\"\n                android:layout_height=\"1.0dip\"\n                android:layout_gravity=\"center_vertical\"\n                android:background=\"#ffffffff\" />\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center_horizontal\"\n            android:orientation=\"horizontal\" >\n\n            <LinearLayout\n                android:id=\"@+id/pop_photo\"\n                android:layout_width=\"69.329987dip\"\n                android:layout_height=\"63.329987dip\"\n                android:orientation=\"vertical\" >\n\n                <ImageView\n                    android:layout_width=\"36.666595dip\"\n                    android:layout_height=\"36.666595dip\"\n                    android:layout_gravity=\"center_horizontal\"\n                    android:layout_marginTop=\"1.0dip\"\n                    android:src=\"@drawable/write_operation_photo\"\n                    android:visibility=\"visible\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_centerVertical=\"true\"\n                    android:layout_gravity=\"center_horizontal\"\n                    android:layout_marginTop=\"5.0dip\"\n                    android:shadowColor=\"#ff000000\"\n                    android:shadowDx=\"1.0\"\n                    android:shadowDy=\"1.0\"\n                    android:shadowRadius=\"1.0\"\n                    android:text=\"拍照记账\"\n                    android:textColor=\"#ffffffff\"\n                    android:textSize=\"13.0dip\" />\n            </LinearLayout>\n\n            <LinearLayout\n                android:id=\"@+id/pop_voice\"\n                android:layout_width=\"63.329987dip\"\n                android:layout_height=\"63.329987dip\"\n                android:layout_marginLeft=\"30.0dip\"\n                android:orientation=\"vertical\" >\n\n                <ImageView\n                    android:layout_width=\"36.666595dip\"\n                    android:layout_height=\"36.666595dip\"\n                    android:layout_gravity=\"center_horizontal\"\n                    android:layout_marginTop=\"1.0dip\"\n                    android:src=\"@drawable/write_operation_pic\"\n                    android:visibility=\"visible\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_centerVertical=\"true\"\n                    android:layout_gravity=\"center_horizontal\"\n                    android:layout_marginTop=\"5.0dip\"\n                    android:shadowColor=\"#ff000000\"\n                    android:shadowDx=\"1.0\"\n                    android:shadowDy=\"1.0\"\n                    android:shadowRadius=\"1.0\"\n                    android:text=\"语音记账\"\n                    android:textColor=\"#ffffffff\"\n                    android:textSize=\"13.0dip\" />\n            </LinearLayout>\n\n            <LinearLayout\n                android:id=\"@+id/pop_quick\"\n                android:layout_width=\"63.329987dip\"\n                android:layout_height=\"63.329987dip\"\n                android:layout_marginLeft=\"30.0dip\"\n                android:orientation=\"vertical\" >\n\n                <ImageView\n                    android:layout_width=\"36.666595dip\"\n                    android:layout_height=\"36.666595dip\"\n                    android:layout_gravity=\"center_horizontal\"\n                    android:layout_marginTop=\"1.0dip\"\n                    android:src=\"@drawable/write_operation_talk\"\n                    android:visibility=\"visible\" />\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_centerVertical=\"true\"\n                    android:layout_gravity=\"center_horizontal\"\n                    android:layout_marginTop=\"5.0dip\"\n                    android:shadowColor=\"#ff000000\"\n                    android:shadowDx=\"1.0\"\n                    android:shadowDy=\"1.0\"\n                    android:shadowRadius=\"1.0\"\n                    android:text=\"快速记账\"\n                    android:textColor=\"#ffffffff\"\n                    android:textSize=\"13.0dip\" />\n            </LinearLayout>\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center_horizontal\"\n            android:layout_marginTop=\"10.0dip\"\n            android:orientation=\"horizontal\" >\n        </LinearLayout>\n    </LinearLayout>\n\n</RelativeLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/preview_layout.xml",
    "content": "<TextView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"1dip\"\n    android:layout_height=\"wrap_content\"\n    android:textColor=\"#00000000\" \n    android:background=\"#00000000\"/>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/refresh_footer.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/pull_to_refresh_header\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"wrap_content\"\n    android:background=\"#ff8e6b\"\n    android:gravity=\"center\"\n    android:paddingBottom=\"10dip\"\n    android:paddingTop=\"10dip\" >\n\n    <ProgressBar\n        android:id=\"@+id/pull_to_load_progress\"\n        style=\"?android:attr/progressBarStyleSmall\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"30dip\"\n        android:layout_marginRight=\"20dip\"\n        android:layout_marginTop=\"10dip\"\n        android:indeterminate=\"true\"\n        android:visibility=\"gone\" />\n\n    <ImageView\n        android:id=\"@+id/pull_to_load_image\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center\"\n        android:layout_marginLeft=\"30dip\"\n        android:layout_marginRight=\"20dip\"\n        android:gravity=\"center\"\n        android:src=\"@drawable/ic_pulltorefresh_arrow_up\"\n        android:visibility=\"visible\" />\n\n    <TextView\n        android:id=\"@+id/pull_to_load_text\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center\"\n        android:gravity=\"center\"\n        android:textColor=\"@android:color/white\"\n        android:text=\"@string/pull_to_refresh_footer_pull_label\"\n        android:textAppearance=\"?android:attr/textAppearanceMedium\"\n        android:textStyle=\"bold\" />\n\n</RelativeLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/refresh_header.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/pull_to_refresh_header\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"wrap_content\"\n    android:background=\"#ff8e6b\"\n    android:gravity=\"center\"\n    android:paddingBottom=\"10dip\"\n    android:paddingTop=\"10dip\"  >\n\n    <ProgressBar\n        android:id=\"@+id/pull_to_refresh_progress\"\n        style=\"?android:attr/progressBarStyleSmall\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_marginLeft=\"30dip\"\n        android:layout_marginRight=\"20dip\"\n        android:indeterminate=\"true\"\n        android:visibility=\"gone\" />\n\n    <ImageView\n        android:id=\"@+id/pull_to_refresh_image\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center\"\n        android:layout_marginLeft=\"30dip\"\n        android:layout_marginRight=\"20dip\"\n        android:gravity=\"center\"\n        android:src=\"@drawable/ic_pulltorefresh_arrow\"\n        android:visibility=\"visible\" />\n\n    <TextView\n        android:id=\"@+id/pull_to_refresh_text\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_marginBottom=\"10dp\"\n        android:gravity=\"center\"\n        android:text=\"@string/pull_to_refresh_pull_label\"\n        android:textAppearance=\"?android:attr/textAppearanceMedium\"\n        android:textColor=\"@android:color/white\"\n        android:textStyle=\"bold\" />\n\n    <TextView\n        android:id=\"@+id/pull_to_refresh_updated_at\"\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"30dip\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_below=\"@+id/pull_to_refresh_text\"\n        android:gravity=\"center\"\n        android:textAppearance=\"?android:attr/textAppearanceSmall\"\n        android:visibility=\"gone\" />\n\n</RelativeLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/register.xml",
    "content": "\n<TableLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n\tandroid:layout_width=\"fill_parent\"\n\tandroid:layout_height=\"fill_parent\" \n\tandroid:stretchColumns=\"0,3\" \n\t>\n\t\n    <TableRow \tandroid:layout_width=\"wrap_content\"\n    \tandroid:layout_height=\"wrap_content\" \n\t\tandroid:layout_margin=\"10dp\"\n\t\tandroid:layout_weight=\"0.2\"\n\t\tandroid:gravity=\"bottom\">      \n    <TextView/>\n    <TextView\n    \tandroid:text=\"用   户  名：\"  \n    \tandroid:layout_width=\"wrap_content\"\n    \tandroid:textSize=\"20sp\"\n\t\tandroid:textColor=\"#a00000\" \n    \tandroid:layout_height=\"wrap_content\"/>\n    <EditText android:id=\"@+id/rusername\" \n    \tandroid:layout_width=\"wrap_content\"\n    \tandroid:minWidth=\"80dp\"\n    \tandroid:singleLine=\"true\"\n    \tandroid:maxWidth=\"120dp\"\n    \tandroid:textSize=\"20sp\"\n    \tandroid:layout_height=\"wrap_content\" \n    \tandroid:background=\"#dcdcc8\"/>\n    <TextView/>\n    </TableRow>\n    <TableRow android:layout_width=\"wrap_content\"\n    \tandroid:layout_height=\"wrap_content\"\n\t\tandroid:layout_margin=\"10dp\"\n\t\tandroid:layout_weight=\"0.02\"\n\t\tandroid:gravity=\"center_vertical\">    \n    <TextView/>\n    <TextView \n    \tandroid:text=\"密         码：\"  \n    \tandroid:layout_width=\"wrap_content\"\n    \tandroid:textSize=\"20sp\"\n\t\tandroid:textColor=\"#a00000\" \n    \tandroid:layout_height=\"wrap_content\"/>\n    <EditText android:id=\"@+id/rpassword\" \n    \tandroid:layout_width=\"wrap_content\"\n    \tandroid:textSize=\"20sp\"\n    \tandroid:minWidth=\"80dp\"\n    \tandroid:singleLine=\"true\"\n    \tandroid:maxWidth=\"120dp\"\n    \tandroid:layout_height=\"wrap_content\" \n    \tandroid:inputType=\"textPassword\"  \n    \tandroid:background=\"#dcdcc8\"/>\n    </TableRow>\n     <TableRow android:id=\"@+id/tablerow4\"\n    \tandroid:layout_width=\"wrap_content\"\n    \tandroid:layout_height=\"wrap_content\" \n\t\tandroid:layout_margin=\"10dp\"\n\t\tandroid:layout_weight=\"0.02\"\n\t\tandroid:gravity=\"center_vertical\">   \n    <TextView/>\n    <TextView \n    \tandroid:text=\"确认密码：\"  \n    \tandroid:layout_width=\"wrap_content\"\n    \tandroid:textSize=\"20sp\"\n\t\tandroid:textColor=\"#a00000\" \n    \tandroid:layout_height=\"wrap_content\"/>\n    <EditText android:id=\"@+id/rrpassword\" \n    \tandroid:layout_width=\"wrap_content\"\n    \tandroid:minWidth=\"80dp\"\n    \tandroid:singleLine=\"true\"\n    \tandroid:maxWidth=\"120dp\"\n    \tandroid:textSize=\"20sp\"\n    \tandroid:layout_height=\"wrap_content\" \n    \tandroid:inputType=\"textPassword\"  \n    \tandroid:background=\"#dcdcc8\"/>\n    </TableRow>\n    <TableRow android:layout_width=\"wrap_content\"\n    \tandroid:layout_height=\"wrap_content\"\n\t\tandroid:layout_margin=\"15dp\"\n\t\tandroid:layout_weight=\"0.6\"\n\t\tandroid:gravity=\"top\">    \n    <TextView/>\n  \n\t<Button android:id=\"@+id/btnrCancle\"  \n\t\tandroid:layout_height=\"wrap_content\"  \n\t\tandroid:background=\"#a00000\"\n\t\tandroid:textColor=\"#ffffff\" \n\t\tandroid:layout_marginRight=\"15dp\"\n\t\tandroid:layout_width=\"100dp\"\n\t\tandroid:text=\"取消\"\n\t/>\t\n\t \n\t<Button android:id=\"@+id/btnrRegister\" \n\t\tandroid:layout_height=\"wrap_content\" \n\t\tandroid:background=\"#a00000\"\n\t\tandroid:textColor=\"#ffffff\"  \n\t\tandroid:layout_width=\"100dp\"\n\t\tandroid:text=\"注册\"/>  \n    <TextView/>  \n    </TableRow>\n     \n\t    \n    \n  \n</TableLayout>\n\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/search_activity.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\" >\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"20dp\"\n        android:background=\"#ffca39\"\n        android:orientation=\"vertical\" >\n    </LinearLayout>\n\n    <LinearLayout\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"50dp\"\n        android:background=\"#ffca39\"\n        android:padding=\"5dp\" >\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center_vertical\"\n            android:background=\"#ffca39\"\n            android:orientation=\"horizontal\" >\n\n            <EditText\n                android:id=\"@+id/query_dialog\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_gravity=\"center\"\n                android:layout_marginLeft=\"4dp\"\n                android:layout_marginRight=\"4dp\"\n                android:layout_weight=\"1\"\n                android:background=\"@drawable/seabar_input\"\n                android:drawableLeft=\"@drawable/ic_menu_search\"\n                android:hint=\"输入关键字搜索流水\"\n                android:paddingBottom=\"5dp\"\n                android:paddingLeft=\"5dp\"\n                android:paddingTop=\"5dp\"\n                android:singleLine=\"true\"\n                android:textColor=\"@color/black_deep\"\n                android:textColorHint=\"#b3b3b3\"\n                android:textCursorDrawable=\"@null\"\n                android:textSize=\"18sp\" />\n\n            <TextView\n                android:id=\"@+id/search_quit\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_margin=\"5dp\"\n                android:text=\"取消\"\n                android:textColor=\"#866e54\"\n                android:textSize=\"18dp\" />\n        </LinearLayout>\n    </LinearLayout>\n\n    <RelativeLayout\n        android:id=\"@+id/search_more\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\" >\n\n        <RelativeLayout\n            android:layout_width=\"40dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_centerHorizontal=\"true\"\n            android:background=\"#ffca39\"\n            android:paddingBottom=\"5dp\"\n            android:paddingTop=\"5dp\" >\n\n            <ImageView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_centerHorizontal=\"true\"\n                android:background=\"@drawable/icon_expanded\" />\n        </RelativeLayout>\n    </RelativeLayout>\n\n    <LinearLayout\n        android:id=\"@+id/search_more_list\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"#e8e8e8\"\n        android:orientation=\"vertical\"\n        android:visibility=\"gone\" >\n\n        <RelativeLayout\n            android:id=\"@+id/search_list_time\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"70dp\"\n            android:background=\"@drawable/rect_white_bg\"\n            android:padding=\"10dp\" >\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentLeft=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:text=\"时间范围\"\n                android:textColor=\"#797b7e\"\n                android:textSize=\"20sp\"\n                android:textStyle=\"bold\" />\n\n            <TextView\n                android:id=\"@+id/search_list_time_text\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"40dp\"\n                android:text=\"本年\"\n                android:textColor=\"@color/black\"\n                android:textSize=\"20sp\"\n                android:textStyle=\"bold\" />\n\n            <ImageView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"10dp\"\n                android:background=\"@drawable/nav_to_message_arrow_dark\" >\n            </ImageView>\n        </RelativeLayout>\n\n        <LinearLayout\n            android:id=\"@+id/search_list_timeall\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"vertical\"\n            android:visibility=\"gone\" >\n\n            <RelativeLayout\n                android:id=\"@+id/search_list_starttime\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"70dp\"\n                android:background=\"@drawable/rect_white_bg\"\n                android:padding=\"10dp\" >\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_alignParentLeft=\"true\"\n                    android:layout_centerVertical=\"true\"\n                    android:text=\"开始日期\"\n                    android:textColor=\"#797b7e\"\n                    android:textSize=\"20sp\"\n                    android:textStyle=\"bold\" />\n\n                <TextView\n                    android:id=\"@+id/search_starttime\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_alignParentRight=\"true\"\n                    android:layout_centerVertical=\"true\"\n                    android:layout_marginRight=\"40dp\"\n                    android:text=\"2015-01-01\"\n                    android:textColor=\"@color/black\"\n                    android:textSize=\"20sp\"\n                    android:textStyle=\"bold\" />\n\n                <ImageView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_alignParentRight=\"true\"\n                    android:layout_centerVertical=\"true\"\n                    android:layout_marginRight=\"10dp\"\n                    android:background=\"@drawable/nav_to_message_arrow_dark\" >\n                </ImageView>\n            </RelativeLayout>\n\n            <RelativeLayout\n                android:id=\"@+id/search_list_endtime\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"70dp\"\n                android:background=\"@drawable/rect_white_bg\"\n                android:padding=\"10dp\" >\n\n                <TextView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_alignParentLeft=\"true\"\n                    android:layout_centerVertical=\"true\"\n                    android:text=\"结束日期\"\n                    android:textColor=\"#797b7e\"\n                    android:textSize=\"20sp\"\n                    android:textStyle=\"bold\" />\n\n                <TextView\n                    android:id=\"@+id/search_endtime\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_alignParentRight=\"true\"\n                    android:layout_centerVertical=\"true\"\n                    android:layout_marginRight=\"40dp\"\n                    android:text=\"2015-01-01\"\n                    android:textColor=\"@color/black\"\n                    android:textSize=\"20sp\"\n                    android:textStyle=\"bold\" />\n\n                <ImageView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_alignParentRight=\"true\"\n                    android:layout_centerVertical=\"true\"\n                    android:layout_marginRight=\"10dp\"\n                    android:background=\"@drawable/nav_to_message_arrow_dark\" >\n                </ImageView>\n            </RelativeLayout>\n        </LinearLayout>\n\n        <RelativeLayout\n            android:id=\"@+id/search_list_paytype\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"70dp\"\n            android:layout_marginTop=\"30dp\"\n            android:background=\"@drawable/rect_white_bg\"\n            android:padding=\"10dp\" >\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentLeft=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:text=\"支出类别\"\n                android:textColor=\"#797b7e\"\n                android:textSize=\"20sp\"\n                android:textStyle=\"bold\" />\n\n            <TextView\n                android:id=\"@+id/search_paytype\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"40dp\"\n                android:text=\"早餐\"\n                android:textColor=\"@color/black\"\n                android:textSize=\"20sp\"\n                android:textStyle=\"bold\" />\n\n            <ImageView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"10dp\"\n                android:background=\"@drawable/nav_to_message_arrow_dark\" >\n            </ImageView>\n        </RelativeLayout>\n\n        <RelativeLayout\n            android:id=\"@+id/search_list_incometype\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"70dp\"\n            android:background=\"@drawable/rect_white_bg\"\n            android:padding=\"10dp\" >\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentLeft=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:text=\"收入类别\"\n                android:textColor=\"#797b7e\"\n                android:textSize=\"20sp\"\n                android:textStyle=\"bold\" />\n\n            <TextView\n                android:id=\"@+id/search_incometype\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"40dp\"\n                android:text=\"工资\"\n                android:textColor=\"@color/black\"\n                android:textSize=\"20sp\"\n                android:textStyle=\"bold\" />\n\n            <ImageView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"10dp\"\n                android:background=\"@drawable/nav_to_message_arrow_dark\" >\n            </ImageView>\n        </RelativeLayout>\n\n        <RelativeLayout\n            android:id=\"@+id/search_more_close\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"50dp\" >\n\n            <RelativeLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:layout_centerHorizontal=\"true\"\n                android:background=\"#ffca39\"\n                android:paddingBottom=\"5dp\"\n                android:paddingTop=\"5dp\" >\n\n                <ImageView\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_centerHorizontal=\"true\"\n                    android:background=\"@drawable/icon_expanded_up\" />\n            </RelativeLayout>\n        </RelativeLayout>\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/mlayout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"fill_parent\"\n        android:background=\"@drawable/rect_white_bg\"\n        android:orientation=\"vertical\"\n        android:visibility=\"invisible\" >\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"60dp\"\n            android:background=\"#e8e8e8\"\n            android:orientation=\"horizontal\"\n            android:padding=\"5dp\" >\n\n            <RelativeLayout\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"match_parent\"\n                android:layout_weight=\"1\" >\n\n                <TextView\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_alignParentTop=\"true\"\n                    android:gravity=\"center\"\n                    android:text=\"收入\"\n                    android:textColor=\"@android:color/black\"\n                    android:textSize=\"18sp\"\n                    android:textStyle=\"bold\" />\n\n                <TextView\n                    android:id=\"@+id/searchincome\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_alignParentBottom=\"true\"\n                    android:gravity=\"center\"\n                    android:text=\"￥ 0.0\"\n                    android:textColor=\"@color/red\"\n                    android:textSize=\"18sp\"\n                    android:textStyle=\"bold\" />\n            </RelativeLayout>\n\n            <RelativeLayout\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"match_parent\"\n                android:layout_weight=\"1\" >\n\n                <TextView\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_alignParentTop=\"true\"\n                    android:gravity=\"center\"\n                    android:text=\"支出\"\n                    android:textColor=\"@android:color/black\"\n                    android:textSize=\"18sp\"\n                    android:textStyle=\"bold\" />\n\n                <TextView\n                    android:id=\"@+id/searchpay\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_alignParentBottom=\"true\"\n                    android:gravity=\"center\"\n                    android:text=\"￥ 0.0\"\n                    android:textColor=\"#5ea98d\"\n                    android:textSize=\"18sp\"\n                    android:textStyle=\"bold\" />\n            </RelativeLayout>\n\n            <RelativeLayout\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"match_parent\"\n                android:layout_weight=\"1\" >\n\n                <TextView\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_alignParentTop=\"true\"\n                    android:gravity=\"center\"\n                    android:text=\"结余\"\n                    android:textColor=\"@android:color/black\"\n                    android:textSize=\"18sp\"\n                    android:textStyle=\"bold\" />\n\n                <TextView\n                    android:id=\"@+id/seachbalance\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_alignParentBottom=\"true\"\n                    android:gravity=\"center\"\n                    android:text=\"￥ 0.0\"\n                    android:textColor=\"#797b7e\"\n                    android:textSize=\"18sp\"\n                    android:textStyle=\"bold\" />\n            </RelativeLayout>\n        </LinearLayout>\n\n        <ListView\n            android:id=\"@+id/mListView\"\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"fill_parent\"\n            android:textColor=\"@color/black\"\n            android:textStyle=\"bold\" >\n        </ListView>\n\n        <RelativeLayout\n            android:id=\"@+id/search_nodata\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\" >\n\n            <ImageView\n                android:id=\"@+id/search_img_nodata\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentTop=\"true\"\n                android:layout_centerHorizontal=\"true\"\n                android:layout_marginTop=\"40dp\"\n                android:background=\"@drawable/image_cry_man\" />\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_below=\"@id/search_img_nodata\"\n                android:layout_centerHorizontal=\"true\"\n                android:text=\"无数据\"\n                android:textColor=\"#797b7e\"\n                android:textSize=\"20sp\"\n                android:textStyle=\"bold\" />\n        </RelativeLayout>\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/setting.xml",
    "content": " <LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"vertical\" \n    android:background=\"#820000\"\n    >\n\t<ListView   android:layout_width=\"fill_parent\"\n\t    android:id=\"@+id/settinglisv\"\n\t    android:layout_height=\"wrap_content\" \n\t    android:divider=\"#e6e6e6\"\n\t    android:dividerHeight=\"1px\"\n\t    android:layout_marginTop=\"5dp\"\n\t    android:layout_marginBottom=\"5dp\"\n\t    android:padding=\"10dp\"\n\t \tandroid:listSelector=\"@drawable/selector\"\n\t \tandroid:cacheColorHint=\"@android:color/transparent\"\n\t    android:entries=\"@array/settingtype\" \n\t    android:background=\"#ffffff\"\n\t     > \n\t</ListView>\n</LinearLayout >"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/showinfo.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:id=\"@+id/iteminfo\" android:orientation=\"vertical\"\n\tandroid:layout_width=\"wrap_content\" android:layout_height=\"wrap_content\"\n\tandroid:layout_marginTop=\"5dp\"\n\tandroid:weightSum=\"1\">\n\t<LinearLayout android:id=\"@+id/linearLayout1\"\n\t\t\tandroid:layout_height=\"wrap_content\" \n\t\t\tandroid:layout_width=\"match_parent\"\n\t\t\tandroid:orientation=\"vertical\" \n\t\t\tandroid:layout_weight=\"0.06\">\n\t\t<RelativeLayout android:layout_height=\"wrap_content\" \n\t\t\tandroid:layout_width=\"match_parent\">\n\t\t<Button android:text=\"支出信息\" \n\t\t\tandroid:id=\"@+id/btnoutinfo\"\n\t\t\tandroid:layout_width=\"wrap_content\" \n\t\t\tandroid:layout_height=\"wrap_content\"\n\t\t\tandroid:textSize=\"20dp\"\n\t\t\tandroid:textColor=\"#8C6931\"\n\t\t/>\n\t\t<Button android:text=\"收入信息\" \n\t\t\tandroid:id=\"@+id/btnininfo\"\n\t\t\tandroid:layout_width=\"wrap_content\" \n\t\t\tandroid:layout_height=\"wrap_content\"\n\t\t\tandroid:layout_toRightOf=\"@id/btnoutinfo\"\n\t\t\tandroid:textSize=\"20dp\"\n\t\t\tandroid:textColor=\"#8C6931\"\n\t\t\t/>\n\t\t<Button android:text=\"便签信息\" \n\t\t\tandroid:id=\"@+id/btnflaginfo\"\n\t\t\tandroid:layout_width=\"wrap_content\" \n\t\t\tandroid:layout_height=\"wrap_content\"\n\t\t\tandroid:layout_toRightOf=\"@id/btnininfo\"\n\t\t\tandroid:textSize=\"20dp\"\n\t\t\tandroid:textColor=\"#8C6931\"\n\t\t\t/>\n\t\t</RelativeLayout>\n\t\t</LinearLayout>\n\t\t<LinearLayout android:id=\"@+id/linearLayout2\"\n\t\t\tandroid:layout_height=\"wrap_content\" \n\t\t\tandroid:layout_width=\"match_parent\"\n\t\t\tandroid:orientation=\"vertical\" \n\t\t\tandroid:layout_weight=\"0.94\">\n\t\t<ListView android:id=\"@+id/lvinfo\" \n\t\t\tandroid:layout_width=\"match_parent\" \n\t\t\tandroid:layout_height=\"match_parent\"\n\t\t\tandroid:scrollbarAlwaysDrawVerticalTrack=\"true\"\n\t\t\t/>\n\t</LinearLayout>\n</LinearLayout>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/slidingmenumain.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<com.slidingmenu.lib.SlidingMenu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/slidingmenumain\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"fill_parent\" />"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/softupdate_progress.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:zhy=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"fill_parent\"\n    android:layout_height=\"wrap_content\" >\n\n    <LinearLayout\n        android:layout_width=\"fill_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"vertical\" >\n\n        <com.zhy.view.RoundProgressBarWidthNumber\n            android:id=\"@+id/id_progress02\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"100dp\"\n            android:layout_gravity=\"center\"\n            android:layout_marginTop=\"30dip\"\n            android:layout_marginBottom=\"30dip\"\n            android:progress=\"0\"\n            zhy:progress_text_color=\"#00a1ea\"\n            zhy:progress_text_size=\"28sp\"\n            zhy:progress_unreached_color=\"#00a1ea\" />\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/spinner.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<TextView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@android:id/text1\"\n    android:paddingLeft=\"10dip\"\n        android:paddingTop=\"10dip\"\n            android:paddingBottom=\"10dip\"\n    android:textStyle=\"bold\"\n    android:textSize=\"18dp\"\n    android:singleLine=\"true\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:ellipsize=\"marquee\" />"
  },
  {
    "path": "MoneyCharge/app/src/main/res/layout/voice_setting.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\" >\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"vertical\" >\n\n        <RelativeLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:paddingBottom=\"14dp\"\n            android:paddingLeft=\"10dp\"\n            android:paddingRight=\"10dp\"\n            android:paddingTop=\"14dp\" >\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentLeft=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:text=\"@string/play_start_sound\"\n                android:textColor=\"#ff000000\"\n                android:textSize=\"18sp\" />\n\n            <CheckBox\n                android:id=\"@+id/cb_play_start_sound\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"5dp\" />\n        </RelativeLayout>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"0.5dp\"\n            android:background=\"#435345\" >\n        </LinearLayout>\n\n        <RelativeLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:paddingBottom=\"14dp\"\n            android:paddingLeft=\"10dp\"\n            android:paddingRight=\"10dp\"\n            android:paddingTop=\"14dp\" >\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentLeft=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:text=\"@string/play_end_sound\"\n                android:textColor=\"#ff000000\"\n                android:textSize=\"18sp\" />\n\n            <CheckBox\n                android:id=\"@+id/cb_play_end_sound\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"5dp\" />\n        </RelativeLayout>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"0.5dp\"\n            android:background=\"#435345\" >\n        </LinearLayout>\n\n        <RelativeLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:paddingBottom=\"14dp\"\n            android:paddingLeft=\"10dp\"\n            android:paddingRight=\"10dp\"\n            android:paddingTop=\"14dp\" >\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentLeft=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:text=\"@string/dialog_tips_sound\"\n                android:textColor=\"#ff000000\"\n                android:textSize=\"18sp\" />\n\n            <CheckBox\n                android:id=\"@+id/cb_dialog_tips_sound\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"5dp\" />\n        </RelativeLayout>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"0.5dp\"\n            android:background=\"#435345\" >\n        </LinearLayout>\n\n        <RelativeLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:paddingBottom=\"14dp\"\n            android:paddingLeft=\"10dp\"\n            android:paddingRight=\"10dp\"\n            android:paddingTop=\"14dp\" >\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentLeft=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:text=\"@string/show_vol\"\n                android:textColor=\"#ff000000\"\n                android:textSize=\"18sp\" />\n\n            <CheckBox\n                android:id=\"@+id/cb_show_vol\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_alignParentRight=\"true\"\n                android:layout_centerVertical=\"true\"\n                android:layout_marginRight=\"5dp\" />\n        </RelativeLayout>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"0.5dp\"\n            android:background=\"#435345\" >\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"0.5dp\"\n            android:background=\"#435345\" >\n        </LinearLayout>\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"10dp\"\n            android:layout_marginTop=\"5dp\"\n            android:text=\"@string/choose_prop_type\"\n            android:textColor=\"#ff000000\"\n            android:textSize=\"18sp\" />\n\n        <Spinner\n            android:id=\"@+id/propType\"\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"3dp\"\n            android:entries=\"@array/prop_tpye\" >\n        </Spinner>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"0.5dp\"\n            android:background=\"#435345\" >\n        </LinearLayout>\n\n        <TextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"10dp\"\n            android:layout_marginTop=\"5dp\"\n            android:text=\"@string/choose_language\"\n            android:textColor=\"#ff000000\"\n            android:textSize=\"18sp\" />\n\n        <Spinner\n            android:id=\"@+id/languages\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"3dp\"\n            android:entries=\"@array/languages\" >\n        </Spinner>\n\n        <!-- 定义一个下拉菜单 -->\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"0.5dp\"\n            android:background=\"#435345\" >\n        </LinearLayout>\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"10dp\"\n            android:layout_marginTop=\"5dp\"\n            android:text=\"@string/choose_dialog_theme\"\n            android:textColor=\"#ff000000\"\n            android:textSize=\"18sp\" />\n\n        <Spinner\n            android:id=\"@+id/dialogTheme\"\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"3dp\"\n            android:entries=\"@array/dialog_theme\" >\n        </Spinner>\n        <!-- 定义一个下拉菜单 -->\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"0.5dp\"\n            android:background=\"#435345\" >\n        </LinearLayout>\n    </LinearLayout>\n\n</ScrollView>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/menu/index.xml",
    "content": "<menu xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n    <item\n        android:id=\"@+id/action_settings\"\n        android:orderInCategory=\"100\"\n        android:showAsAction=\"never\"\n        android:title=\"@string/action_settings\"/>\n\n</menu>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/values/attr_progress_bar.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <declare-styleable name=\"HorizontalProgressBarWithNumber\">\n        <attr name=\"progress_unreached_color\" format=\"color\" />\n        <attr name=\"progress_reached_color\" format=\"color\" />\n        <attr name=\"progress_reached_bar_height\" format=\"dimension\" />\n        <attr name=\"progress_unreached_bar_height\" format=\"dimension\" />\n        <attr name=\"progress_text_size\" format=\"dimension\" />\n        <attr name=\"progress_text_color\" format=\"color\" />\n        <attr name=\"progress_text_offset\" format=\"dimension\" />\n        <attr name=\"progress_text_visibility\" format=\"enum\">\n            <enum name=\"visible\" value=\"0\" />\n            <enum name=\"invisible\" value=\"1\" />\n        </attr>\n    </declare-styleable>\n    \n    <declare-styleable name=\"RoundProgressBarWidthNumber\">\n        <attr name=\"radius\" format=\"dimension\" />\n    </declare-styleable>\n\n</resources>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/values/attrs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<resources>\r\n\r\n    <declare-styleable name=\"Switch\">\r\n        <attr name=\"textOn\" format=\"string\" />\r\n        <attr name=\"textOff\" format=\"string\" />\r\n        <attr name=\"thumbTextPadding\" format=\"dimension\" />\r\n        <attr name=\"switchTextAppearance\" format=\"reference\" />\r\n        <attr name=\"switchMinWidth\" format=\"dimension\" />\r\n        <attr name=\"switchPadding\" format=\"dimension\" />\r\n        <attr name=\"thumb\" format=\"reference\" />\r\n        <attr name=\"track\" format=\"reference\" />\r\n    </declare-styleable>\r\n    <declare-styleable name=\"TextAppearance\">\r\n        <attr name=\"android:textColor\" />\r\n        <attr name=\"android:textSize\" />\r\n        <attr name=\"android:textStyle\" />\r\n        <attr name=\"android:typeface\" />\r\n        <attr name=\"android:textColorHighlight\" />\r\n        <attr name=\"android:textColorHint\" />\r\n        <attr name=\"android:textColorLink\" />\r\n        <attr name=\"textAllCaps\" format=\"boolean\" />\r\n    </declare-styleable>\r\n    <declare-styleable name=\"PullToRefresh\">\r\n\r\n        <!-- A drawable to use as the background of the Refreshable View -->\r\n        <attr name=\"ptrRefreshableViewBackground\" format=\"reference|color\" />\r\n\r\n        <!-- A drawable to use as the background of the Header and Footer Loading Views -->\r\n        <attr name=\"ptrHeaderBackground\" format=\"reference|color\" />\r\n\r\n        <!-- Text Color of the Header and Footer Loading Views -->\r\n        <attr name=\"ptrHeaderTextColor\" format=\"reference|color\" />\r\n\r\n        <!-- Text Color of the Header and Footer Loading Views Sub Header -->\r\n        <attr name=\"ptrHeaderSubTextColor\" format=\"reference|color\" />\r\n\r\n        <!-- Mode of Pull-to-Refresh that should be used -->\r\n        <attr name=\"ptrMode\">\r\n            <flag name=\"disabled\" value=\"0x0\" />\r\n            <flag name=\"pullFromStart\" value=\"0x1\" />\r\n            <flag name=\"pullFromEnd\" value=\"0x2\" />\r\n            <flag name=\"both\" value=\"0x3\" />\r\n            <flag name=\"manualOnly\" value=\"0x4\" />\r\n\r\n            <!-- These last two are depreacted -->\r\n            <flag name=\"pullDownFromTop\" value=\"0x1\" />\r\n            <flag name=\"pullUpFromBottom\" value=\"0x2\" />\r\n        </attr>\r\n\r\n        <!-- Whether the Indicator overlay(s) should be used -->\r\n        <attr name=\"ptrShowIndicator\" format=\"reference|boolean\" />\r\n\r\n        <!-- Drawable to use as Loading Indicator. Changes both Header and Footer. -->\r\n        <attr name=\"ptrDrawable\" format=\"reference\" />\r\n\r\n        <!-- Drawable to use as Loading Indicator in the Header View. Overrides value set in ptrDrawable. -->\r\n        <attr name=\"ptrDrawableStart\" format=\"reference\" />\r\n\r\n        <!-- Drawable to use as Loading Indicator in the Footer View. Overrides value set in ptrDrawable. -->\r\n        <attr name=\"ptrDrawableEnd\" format=\"reference\" />\r\n\r\n        <!-- Whether Android's built-in Over Scroll should be utilised for Pull-to-Refresh. -->\r\n        <attr name=\"ptrOverScroll\" format=\"reference|boolean\" />\r\n\r\n        <!-- Base text color, typeface, size, and style for Header and Footer Loading Views -->\r\n        <attr name=\"ptrHeaderTextAppearance\" format=\"reference\" />\r\n\r\n        <!-- Base text color, typeface, size, and style for Header and Footer Loading Views Sub Header -->\r\n        <attr name=\"ptrSubHeaderTextAppearance\" format=\"reference\" />\r\n\r\n        <!-- Style of Animation should be used displayed when pulling. -->\r\n        <attr name=\"ptrAnimationStyle\">\r\n            <flag name=\"rotate\" value=\"0x0\" />\r\n            <flag name=\"flip\" value=\"0x1\" />\r\n        </attr>\r\n\r\n        <!-- Whether the user can scroll while the View is Refreshing -->\r\n        <attr name=\"ptrScrollingWhileRefreshingEnabled\" format=\"reference|boolean\" />\r\n\r\n        <!--\r\n        \tWhether PullToRefreshListView has it's extras enabled. This allows the user to be \r\n        \table to scroll while refreshing, and behaves better. It acheives this by adding\r\n        \tHeader and/or Footer Views to the ListView.\r\r\n        -->\r\n        <attr name=\"ptrListViewExtrasEnabled\" format=\"reference|boolean\" />\r\n\r\n        <!--\r\n        \tWhether the Drawable should be continually rotated as you pull. This only\r\n        \ttakes effect when using the 'Rotate' Animation Style.\r\r\n        -->\r\n        <attr name=\"ptrRotateDrawableWhilePulling\" format=\"reference|boolean\" />\r\n\r\n        <!-- BELOW HERE ARE DEPRECEATED. DO NOT USE. -->\r\n        <attr name=\"ptrAdapterViewBackground\" format=\"reference|color\" />\r\n        <attr name=\"ptrDrawableTop\" format=\"reference\" />\r\n        <attr name=\"ptrDrawableBottom\" format=\"reference\" />\r\n    </declare-styleable>\r\n    <declare-styleable name=\"FoldingMenu\">\r\n        <attr name=\"foldNumber\" format=\"integer\" />\r\n    </declare-styleable>\r\n\r\n    <!-- LockPatternView class attributes -->\r\n    <declare-styleable name=\"LockPatternView\">\r\n\r\n        <!--\r\n             Aspect to use when drawing LockPatternView. Choices are \"square\"(default), \"lock_width\"\r\n             or \"lock_height\"\r\r\n        -->\r\n        <attr name=\"aspect\">\r\n            <enum name=\"square\" value=\"0\" />\r\n            <enum name=\"lockWidth\" value=\"1\" />\r\n            <enum name=\"lockHeight\" value=\"2\" />\r\n        </attr>\r\n        <attr name=\"line\" format=\"color\" />\r\n        <attr name=\"btnNormal\" format=\"reference\" />\r\n        <attr name=\"btnTouched\" format=\"reference\" />\r\n        <attr name=\"circleNormal\" format=\"reference\" />\r\n        <attr name=\"circleGreen\" format=\"reference\" />\r\n        <attr name=\"circleRed\" format=\"reference\" />\r\n        <attr name=\"arrowGreenUp\" format=\"reference\" />\r\n        <attr name=\"arrowRedUp\" format=\"reference\" />\r\n    </declare-styleable>\r\n    <declare-styleable name=\"SlidingMenu\">\r\n        <attr name=\"mode\">\r\n            <enum name=\"left\" value=\"0\" />\r\n            <enum name=\"right\" value=\"1\" />\r\n        </attr>\r\n        <attr name=\"viewAbove\" format=\"reference\" />\r\n        <attr name=\"viewBehind\" format=\"reference\" />\r\n        <attr name=\"behindOffset\" format=\"dimension\" />\r\n        <attr name=\"behindWidth\" format=\"dimension\" />\r\n        <attr name=\"behindScrollScale\" format=\"float\" />\r\n        <attr name=\"touchModeAbove\">\r\n            <enum name=\"margin\" value=\"0\" />\r\n            <enum name=\"fullscreen\" value=\"1\" />\r\n        </attr>\r\n        <attr name=\"touchModeBehind\">\r\n            <enum name=\"margin\" value=\"0\" />\r\n            <enum name=\"fullscreen\" value=\"1\" />\r\n        </attr>\r\n        <attr name=\"shadowDrawable\" format=\"reference\" />\r\n        <attr name=\"shadowWidth\" format=\"dimension\" />\r\n        <attr name=\"fadeEnabled\" format=\"boolean\" />\r\n        <attr name=\"fadeDegree\" format=\"float\" />\r\n        <attr name=\"selectorEnabled\" format=\"boolean\" />\r\n        <attr name=\"selectorDrawable\" format=\"reference\" />\r\n    </declare-styleable>\r\n\r\n</resources>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <color name=\"red\">#ffff0000</color>\n    <color name=\"statusbar_bg\">#00000000</color>\n    <color name=\"black\">#ff000000</color>\n    <color name=\"fragment2\">#fabd31</color>\n    <color name=\"black_25\">#40000000</color>\n    <color name=\"black_50\">#80000000</color>\n    <color name=\"white\">#ffffffff</color>\n    <color name=\"white_25\">#40ffffff</color>\n    <color name=\"white_50\">#80ffffff</color>\n    <color name=\"grey\">#fff0f0f0</color>\n    <color name=\"color_hei_8\">#00000000</color>\n\n    <drawable name=\"trans\">@color/color_hei_8</drawable>\n\n    <color name=\"gesture_background\">#ff303237</color>\n    <color name=\"month_day_number\">#ff6d5630</color>\n    <color name=\"month_today_number\">#ffffffff</color>\n    <color name=\"month_other_month\">#ff595959</color>\n    <color name=\"month_other_month_day_number\">#ffb4a283</color>\n    <color name=\"month_other_month_name\">#ff84868c</color>\n    <color name=\"month_other_month_banner\">#ffd3d2d7</color>\n    <color name=\"month_day_grid_line_color\">#ffc0a884</color>\n    <color name=\"month_week_banner\">#ffd3d2d7</color>\n    <color name=\"transparent\">#00000000</color>\n    <color name=\"calendar_daybox_all_pay\">#ff1ba400</color>\n    <color name=\"calendar_daybox_has_expired\">#ffa40017</color>\n    <color name=\"calendar_daybox_other\">#ff919191</color>\n    <color name=\"calendar_lv_item_text_color\">#ffd1b890</color>\n    <color name=\"budget_balance_tips_for_addexpense_normal\">#ff63594a</color>\n    <color name=\"budget_balance_tips_for_addexpense_red\">#ffff0000</color>\n    <color name=\"transaction_payout_amount\">#ff54b45d</color>\n    <color name=\"transaction_income_amount\">#ffff0000</color>\n    <color name=\"buy_sync_service_seleted_color\">#ffff9900</color>\n    <color name=\"RoyalBlue\">#4169E1</color>\n    <color name=\"LightSteelBlue\">#B0C4DE</color>\n    <color name=\"text_color\">#FFFFFF</color>\n    <color name=\"divider_color\">#11000000</color>\n    <color name=\"msg_color\">#FFFFFFFF</color>\n    <color name=\"dialog_bg\">#ffe74c3c</color>\n    <color name=\"btn_press_color\">#FFa5281b</color>\n    <color name=\"btn_unpress_color\">#FFc0392b</color>\n    <color name=\"black_deep\">#FF000000</color>\n    <color name=\"half_transparent\">#80000000</color>\n    <color name=\"dialog_buttom_bg\">#ffe7e7e7</color>\n    <color name=\"listview_divider\">#E0E0E0</color>\n    <color name=\"ffd0d0d0\">#ffd0d0d0</color>\n    <color name=\"ff778799\">#ff778799</color>\n    <color name=\"ff515c68\">#ff515c68</color>\n    <color name=\"ff79351b\">#ff79351b</color>\n    <color name=\"c_33000000\">#33000000</color>\n    <color name=\"c_7fffffff\">#7fffffff</color>\n    <color name=\"c_666666\">#666666</color>\n    <color name=\"c_808080\">#808080</color>\n    <color name=\"ffffffff\">#FFFFFFFF</color>\n    <color name=\"ff666666\">#ff666666</color>\n    <color name=\"umeng_fb_lightblue\">#FF0FB0A8</color>\n    <color name=\"umeng_fb_gray\">#FFD8D8D8</color>\n    <color name=\"umeng_fb_line\">#DCDCDC</color>\n    <color name=\"umeng_fb_secondary_text_light\">#8A000000</color>\n    <color name=\"umeng_fb_white\">#FFFFFF</color>\n\n</resources>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/values/dimens.xml",
    "content": "<resources>\n\n    <!-- Default screen margins, per the Android Design guidelines. -->\n    <dimen name=\"activity_horizontal_margin\">16dp</dimen>\n    <dimen name=\"activity_vertical_margin\">16dp</dimen>\n    <dimen name=\"key_height\">59dip</dimen>\n    <dimen name=\"width_input_tv_cutline\">1dip</dimen>\n    <dimen name=\"dialog_padding\">25dp</dimen>\n    <dimen name=\"umeng_fb_item_height\">48dp</dimen>\n    <dimen name=\"umeng_fb_item_content_size\">14sp</dimen>\n    <dimen name=\"umeng_fb_item_time_size\">12sp</dimen>\n    <dimen name=\"umeng_fb_item_line_height\">0.8dp</dimen>\n    <dimen name=\"umeng_fb_spinner_padding_left\">12dp</dimen>\n\n</resources>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/values/ids.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <item name=\"selected_view\" type=\"id\"/>\n    \n</resources>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/values/moneychargetype.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n   <string-array name=\"settingtype\">\n       <item>清空收入数据</item>\n       <item>清空支出数据</item>\n       <item>百度语音管理</item>\n       <item>收入类型管理</item>\n       <item>支出类型管理</item>\n       <item>还原默认设置</item> \n       <item>关于系统</item>\n   </string-array> \n   <string-array name=\"time_month\">\n       <item>01</item>\n       <item>02</item>\n       <item>03</item>\n       <item>04</item>\n       <item>05</item>\n       <item>06</item> \n       <item>07</item>\n       <item>08</item>\n       <item>09</item>\n       <item>10</item> \n       <item>11</item>\n       <item>12</item>\n   </string-array> \n   <string-array name=\"time_day\">\n       <item>01</item>\n       <item>02</item>\n       <item>03</item>\n       <item>04</item>\n       <item>05</item>\n       <item>06</item> \n       <item>07</item>\n       <item>08</item>\n       <item>09</item>\n       <item>10</item> \n       <item>11</item>\n       <item>12</item>\n       <item>13</item>\n       <item>14</item>\n       <item>15</item>\n       <item>16</item> \n       <item>17</item>\n       <item>18</item>\n       <item>19</item>\n       <item>20</item>\n       <item>21</item>\n       <item>22</item>\n       <item>23</item>\n       <item>24</item>\n       <item>25</item>\n       <item>26</item> \n       <item>27</item>\n       <item>28</item>\n       <item>29</item>\n       <item>30</item>\n       <item>31</item> \n   </string-array> \n</resources>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/values/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <string name=\"app_name\">快速记</string>\n    <string name=\"action_settings\">Settings</string>\n\n    <style name=\"Dialog\" parent=\"android:style/Theme.Dialog\">\n        <item name=\"android:windowBackground\">@null</item>\n        <item name=\"android:windowNoTitle\">true</item>\n        <item name=\"android:windowIsFloating\">true</item>\n    </style>\n\n    <style name=\"DialogText\">\n        <item name=\"android:textColor\">#6e0000</item>\n        <item name=\"android:textSize\">18sp</item>\n    </style>\n\n    <style name=\"enable\">\n        <item name=\"android:background\">#21a0a0</item>\n    </style>\n\n    <style name=\"disable\">\n        <item name=\"android:background\">#6e6e6e</item>\n    </style>\n\n    <style name=\"DialogText.Title\">\n        <item name=\"android:textSize\">16sp</item>\n        <item name=\"android:textStyle\">bold</item>\n    </style>\n\n    <string name=\"spn_prompt_category\">类别</string>\n    <string name=\"spn_prompt_subcategory\">子类别</string>\n    <string name=\"spn_prompt_account\">账户</string>\n    <string name=\"spn_prompt_corporation\">商家</string>\n    <string name=\"spn_prompt_project\">项目</string>\n    <string name=\"desc1\">系统默认用户无密码保护，若需要建立私\\n密记账，请建立个人账户</string>\n    <string name=\"desc2\">用户注册时，用户名密码无特殊限制，但\\n请记牢，系统不提供找回服务</string>\n    <string name=\"desc3\">还原默认设置将会把当前用户的收入、支\\n出类型重置为初始状态,此操作请慎重</string>\n    <string name=\"desc4\">在使用过程中遇到任何问题或有良好的建\\n议，欢迎发送邮件到:\\n linmp4@126.com 反馈! 谢谢！</string>\n    <string name=\"please_speak\">请说话</string>\n    <string name=\"speaking\">说话中</string>\n    <string name=\"start\">开始</string>\n    <string name=\"start_dialog\">调用语音识别对话框</string>\n    <string name=\"status\">状态：</string>\n    <string name=\"tofinish\">说完</string>\n    <string name=\"in_recog\">正在识别</string>\n    <string name=\"finished\">完成:</string>\n    <string name=\"error_occur\">出错: 0x%1$s</string>\n    <string name=\"error_start\">启动失败: 0x%1$s</string>\n    <string name=\"is_canceled\">已取消</string>\n    <string name=\"try_again\">重试</string>\n    <string name=\"volume\">音量</string>\n    <string name=\"start_tune\">开始音</string>\n    <string name=\"end_tune\">结束音</string>\n    <string name=\"setting\">设置</string>\n    <string name=\"choose_prop_type\">请选择垂直领域类型：</string>\n    <string name=\"choose_language\">请选择识别语言：</string>\n    <string name=\"choose_dialog_theme\">请选择识别对话框样式：</string>\n    <string name=\"play_start_sound\">播放开始音</string>\n    <string name=\"play_end_sound\">播放结束音</string>\n    <string name=\"dialog_tips_sound\">对话框提示音</string>\n    <string name=\"show_vol\">显示识别音量</string>\n    <string name=\"use_default_audio_source\">使用麦克风输入</string>\n    <string name=\"nlp\">启用语义解析</string>\n    <string name=\"more\">更多示例</string>\n    <string name=\"view_html\">点击查看Html效果</string>\n    <string name=\"activity_label_dialog_tips\">识别对话框提示语</string>\n    <string name=\"activity_label_api\">Api方式识别</string>\n    <string name=\"activity_desc_api\">开发者可以自定义识别的UI</string>\n    <string name=\"activity_label_external\">外部音频识别</string>\n    <string name=\"activity_desc_external\">不使用麦克风录音，使用外部音频识别。只支持PCM16位单声道音频。采样率16K或者8K</string>\n    <string name=\"activity_label_nlu\">语义理解示例</string>\n    <string name=\"activity_desc_nlu\">将语音转换为意图</string>\n    <string name=\"dialog_show_tips_onstart\">启动时显示提示列表</string>\n    <string name=\"dialog_show_tips_onstart_summary\">语音识别对话框展示后，不启动识别，首先展示提示列表，需要用户手工点击开始按钮</string>\n    <string name=\"dialog_show_tip_onsilent\">静音时显示一条提示</string>\n    <string name=\"dialog_show_tip_onsilent_summary\">识别启动后，如果3秒没有检测到语音起点，在声音动效下方显示一条提示语</string>\n    <string name=\"dialog_show_help_onsilent\">静音异常时显示帮助按钮</string>\n    <string name=\"dialog_show_help_onsilent_summary\">由于没有检测到用户语音，超时异常后将取消按钮替换为帮助按钮</string>\n\n    <string-array name=\"prop_tpye\">\n        <item>输入</item>\n        <item>热词</item>\n        <item>地图</item>\n        <item>音乐</item>\n        <item>视频</item>\n        <item>应用</item>\n        <item>网页</item>\n        <item>健康</item>\n        <item>购物</item>\n        <item>打电话</item>\n    </string-array>\n    <string-array name=\"languages\">\n        <item>普通话(中国)</item>\n        <item>粤语(中国)</item>\n        <item>英语(美国)</item>\n    </string-array>\n    <string-array name=\"dialog_theme\">\n        <item>暗蓝</item>\n        <item>亮蓝</item>\n        <item>暗绿</item>\n        <item>亮绿</item>\n        <item>暗橙</item>\n        <item>亮橙</item>\n        <item>暗红</item>\n        <item>亮红</item>\n    </string-array>\n    <string-array name=\"command_tips\">\n        <item>北京天气怎么样</item>\n        <item>打电话给移动客服</item>\n        <item>北京到上海的飞机票</item>\n        <item>讲个笑话</item>\n        <item>百度大厦怎么走</item>\n    </string-array>\n\n    <string name=\"pull_to_refresh_pull_label\">下拉刷新</string>\n    <string name=\"pull_to_refresh_release_label\">松开后刷新</string>\n    <string name=\"pull_to_refresh_refreshing_label\">正在刷新\\u2026</string>\n    <string name=\"pull_to_refresh_footer_release_label\">松开后加载</string>\n    <string name=\"pull_to_refresh_footer_pull_label\">上拉加载更多</string>\n    <string name=\"pull_to_refresh_footer_refreshing_label\">正在加载中\\u2026</string>\n    <string name=\"lockscreen_access_pattern_start\">\"开始绘制图案\"</string>\n    <string name=\"lockscreen_access_pattern_cleared\">\"图案已清除\"</string>\n    <string name=\"lockscreen_access_pattern_cell_added\">\"已添加单元格\"</string>\n    <string name=\"lockscreen_access_pattern_detected\">\"图案绘制完成\"</string>\n    <string name=\"lockpattern_retry_button_text\">\"重试\"</string>\n    <string name=\"lockpattern_continue_button_text\">\"继续\"</string>\n    <string name=\"lockpattern_confirm_button_text\">\"确认\"</string>\n    <string name=\"lockpattern_recording_intro_header\">\"绘制解锁图案\"</string>\n    <string name=\"lockpattern_settings_help_how_to_record\">\"如何绘制解锁图案\"</string>\n    <string name=\"lockpattern_recording_incorrect_too_short\">\"至少连接4个点，请重试\"</string>\n    <string name=\"lockpattern_pattern_entered_header\">\"图案已记录\"</string>\n    <string name=\"lockpattern_need_to_confirm\">\"请再次绘制解锁图案\"</string>\n    <string name=\"lockpattern_need_to_unlock_wrong\">\"与上次输入不一致，请重试\"</string>\n    <string name=\"lockpattern_pattern_confirmed_header\">\"确认保存新解锁图案\"</string>\n    <string name=\"lockpattern_recording_inprogress\">\"完成后松开手指\"</string>\n    <string name=\"gesture_password_guide_text\">你可以创建一个解锁图案，这样他人在借用你的手机时，将无法打开应用。</string>\n    <string name=\"gesture_password_guide_creat_btn\">创建手势密码</string>\n    <string name=\"please_select\">请选择</string>\n    <string name=\"ok\">确定</string>\n    <string name=\"cancel\">取消</string>\n    <string name=\"multi_choice\">弹出多选框</string>\n\n</resources>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/values/styles.xml",
    "content": "<resources>\r\n\r\n    <!--\r\n        Base application theme, dependent on API level. This theme is replaced\n        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.\r\r\r\r\r\r\r\r\r\n    -->\r\n    <style name=\"AppBaseTheme\" parent=\"android:Theme.Light\">\r\n        <!--\r\n            Theme customizations available in newer API levels can go in\n            res/values-vXX/styles.xml, while customizations related to\n            backward-compatibility can go here.\r\r\r\r\r\r\r\r\r\n        -->\r\n    </style>\r\n\r\n    <!-- Application theme. -->\r\n    <style name=\"AppTheme\" parent=\"AppBaseTheme\">\r\n        <!-- All customizations that are NOT specific to a particular API-level can go here. -->\r\n    </style>\r\n\r\n    <style name=\"common_bg\">\r\n        <item name=\"android:background\">@drawable/mymoney_bg</item>\r\n        <item name=\"android:layout_width\">wrap_content</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n    </style>\r\n\r\n    <style name=\"main_budget_lable\">\r\n        <item name=\"android:textColor\">#ffa22815</item>\r\n        <item name=\"android:gravity\">center_vertical</item>\r\n        <item name=\"android:layout_width\">wrap_content</item>\r\n        <item name=\"android:layout_height\">40.0dip</item>\r\n    </style>\r\n\r\n    <style name=\"main_budget_lable_hdpi\" parent=\"@style/main_budget_lable\">\r\n        <item name=\"android:layout_height\">60.0px</item>\r\n    </style>\r\n\r\n    <style name=\"main_budget_lable_ldpi\" parent=\"@style/main_budget_lable\">\r\n        <item name=\"android:layout_height\">30.0px</item>\r\n    </style>\r\n\r\n    <style name=\"main_money_label\">\r\n        <item name=\"android:textColor\">#ff7e430b</item>\r\n        <item name=\"android:gravity\">right</item>\r\n        <item name=\"android:layout_gravity\">center_vertical</item>\r\n        <item name=\"android:paddingLeft\">10.0dip</item>\r\n        <item name=\"android:layout_width\">80.0dip</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n    </style>\r\n\r\n    <style name=\"main_money_label_hdpi\" parent=\"@style/main_money_label\">\r\n        <item name=\"android:paddingLeft\">7.5dp</item>\r\n        <item name=\"android:layout_width\">wrap_content</item>\r\n        <item name=\"android:textSize\">22dp</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n        <item name=\"android:shadowColor\">#40000000</item>\r\n        <item name=\"android:shadowDx\">0</item>\r\n        <item name=\"android:shadowDy\">8</item>\r\n        <item name=\"android:shadowRadius\">1</item>\r\n    </style>\r\n\r\n    <style name=\"main_money_label_ldpi\" parent=\"@style/main_money_label\">\r\n        <item name=\"android:paddingLeft\">8.0px</item>\r\n        <item name=\"android:layout_width\">60.0px</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n    </style>\r\n\r\n    <style name=\"main_money\">\r\n        <item name=\"android:textSize\">16.0dip</item>\r\n        <item name=\"android:textStyle\">bold</item>\r\n        <item name=\"android:textColor\">@color/black</item>\r\n        <item name=\"android:gravity\">right</item>\r\n        <item name=\"android:layout_gravity\">center_vertical</item>\r\n        <item name=\"android:layout_width\">100.0dip</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n        <item name=\"android:layout_marginLeft\">6.0dip</item>\r\n        <item name=\"android:singleLine\">true</item>\r\n    </style>\r\n\r\n    <style name=\"main_money_hdpi\" parent=\"@style/main_money\">\r\n        <item name=\"android:layout_width\">wrap_content</item>\r\n        <item name=\"android:textSize\">22dp</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n        <item name=\"android:layout_marginLeft\">10dp</item>\r\n        <item name=\"android:shadowColor\">#40000000</item>\r\n        <item name=\"android:shadowDx\">0</item>\r\n        <item name=\"android:shadowDy\">8</item>\r\n        <item name=\"android:shadowRadius\">1</item>\r\n    </style>\r\n\r\n    <style name=\"main_money_ldpi\" parent=\"@style/main_money\">\r\n        <item name=\"android:layout_width\">75.0px</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n        <item name=\"android:layout_marginLeft\">5.0px</item>\r\n    </style>\r\n\r\n    <style name=\"main_row_stat_icon\">\r\n        <item name=\"android:layout_gravity\">center_vertical</item>\r\n        <item name=\"android:layout_width\">wrap_content</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n        <item name=\"android:layout_marginLeft\">10.0dip</item>\r\n        <item name=\"android:layout_alignParentLeft\">true</item>\r\n        <item name=\"android:layout_centerVertical\">true</item>\r\n    </style>\r\n\r\n    <style name=\"form_row_input_middle\" parent=\"@style/form_row_input\">\r\n        <item name=\"android:background\">@drawable/form_row_input_middle</item>\r\n    </style>\r\n\r\n    <style name=\"common_toolbar_btn\">\r\n        <item name=\"android:textSize\">15.0dip</item>\r\n        <item name=\"android:textColor\">@color/white</item>\r\n        <item name=\"android:background\">@drawable/common_toolbar_btn</item>\r\n        <item name=\"android:layout_width\">145.0dip</item>\r\n        <item name=\"android:layout_height\">46.0dip</item>\r\n        <item name=\"android:layout_marginTop\">15dip</item>\r\n        <item name=\"android:layout_weight\">1.0</item>\r\n    </style>\r\n\r\n    <style name=\"common_toolbar_btn_for_addexpense\" parent=\"@style/common_toolbar_btn\">\r\n        <item name=\"android:layout_width\">100.0dip</item>\r\n        <item name=\"android:layout_height\">50.0dip</item>\r\n    </style>\r\n\r\n    <style name=\"go_detail\">\r\n        <item name=\"android:layout_gravity\">center_vertical</item>\r\n        <item name=\"android:background\">@drawable/toggle_account_popu_btn_expanded</item>\r\n        <item name=\"android:layout_width\">wrap_content</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n        <item name=\"android:layout_marginLeft\">10.0dip</item>\r\n    </style>\r\n\r\n    <style name=\"form_row_go_detail\" parent=\"@style/go_detail\">\r\n        <item name=\"android:layout_marginLeft\">270.0dip</item>\r\n    </style>\r\n\r\n    <style name=\"budget_balance_tips_for_addexpense\">\r\n        <item name=\"android:textSize\">12.0dip</item>\r\n        <item name=\"android:textColor\">#ff63594a</item>\r\n        <item name=\"android:layout_gravity\">right</item>\r\n        <item name=\"android:layout_width\">wrap_content</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n        <item name=\"android:layout_marginBottom\">17.0dip</item>\r\n        <item name=\"android:layout_alignParentBottom\">true</item>\r\n    </style>\r\n\r\n    <style name=\"common_row_label\">\r\n        <item name=\"android:textSize\">15.0dip</item>\r\n        <item name=\"android:textColor\">#ff826d28</item>\r\n        <item name=\"android:ellipsize\">marquee</item>\r\n        <item name=\"android:gravity\">left</item>\r\n        <item name=\"android:layout_gravity\">center</item>\r\n        <item name=\"android:paddingLeft\">15.0dip</item>\r\n        <item name=\"android:layout_width\">75.0dip</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n        <item name=\"android:singleLine\">true</item>\r\n    </style>\r\n\r\n    <style name=\"form_row_label\" parent=\"@style/common_row_label\">\r\n        <item name=\"android:textSize\">16.0dip</item>\r\n        <item name=\"android:gravity\">right</item>\r\n        <item name=\"android:textColor\">@color/black</item>\r\n        <item name=\"android:layout_gravity\">center_vertical</item>\r\n        <item name=\"android:layout_width\">75.0dip</item>\r\n    </style>\r\n\r\n    <style name=\"form_row_input\">\r\n        <item name=\"android:textSize\">18.0dip</item>\r\n        <item name=\"android:textColor\">@color/black</item>\r\n        <item name=\"android:gravity\">left|center</item>\r\n        <item name=\"android:paddingLeft\">90.0dip</item>\r\n        <item name=\"android:paddingRight\">55.0dip</item>\r\n        <item name=\"android:layout_width\">fill_parent</item>\r\n        <item name=\"android:layout_height\">42.0dip</item>\r\n    </style>\r\n\r\n    <style name=\"form_row_input_top\" parent=\"@style/form_row_input\">\r\n        <item name=\"android:background\">@drawable/form_row_input_top</item>\r\n        <item name=\"android:layout_height\">50.0dip</item>\r\n    </style>\r\n\r\n    <style name=\"main_row_stat_icon_hdpi\" parent=\"@style/main_row_stat_icon\">\r\n        <item name=\"android:layout_marginLeft\">12dp</item>\r\n    </style>\r\n\r\n    <style name=\"common_title\">\r\n        <item name=\"android:textSize\">20dip</item>\r\n        <item name=\"android:textColor\">@color/black</item>\r\n        <item name=\"android:gravity\">center_vertical</item>\r\n        <item name=\"android:background\">@drawable/titlebar_bg_nor</item>\r\n        <item name=\"android:paddingLeft\">10.0dip</item>\r\n        <item name=\"android:layout_width\">fill_parent</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n    </style>\r\n\r\n    <style name=\"main_row_stat_time_ly\">\r\n        <item name=\"android:layout_gravity\">center_vertical</item>\r\n        <item name=\"android:orientation\">vertical</item>\r\n        <item name=\"android:layout_width\">wrap_content</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n        <item name=\"android:layout_marginLeft\">10.0dip</item>\r\n        <item name=\"android:layout_centerVertical\">true</item>\r\n    </style>\r\n\r\n    <style name=\"main_row_stat_time_ly_hdpi\" parent=\"@style/main_row_stat_time_ly\">\r\n        <item name=\"android:layout_marginLeft\">12dp</item>\r\n    </style>\r\n\r\n    <style name=\"main_row_stat_time_ly_ldpi\" parent=\"@style/main_row_stat_time_ly\">\r\n        <item name=\"android:layout_marginLeft\">7.0px</item>\r\n    </style>\r\n\r\n    <style name=\"main_row_stat_time_tips\">\r\n        <item name=\"android:textSize\">17.0dip</item>\r\n        <item name=\"android:textStyle\">bold</item>\r\n        <item name=\"android:textColor\">@color/black</item>\r\n        <item name=\"android:gravity\">left</item>\r\n        <item name=\"android:layout_width\">wrap_content</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n        <item name=\"android:singleLine\">true</item>\r\n    </style>\r\n\r\n    <style name=\"main_row_stat_time_tips_hdpi\" parent=\"@style/main_row_stat_time_tips\">\r\n        <item name=\"android:layout_width\">wrap_content</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n    </style>\r\n\r\n    <style name=\"main_row_stat_time_str\">\r\n        <item name=\"android:textColor\">#ff848383</item>\r\n        <item name=\"android:gravity\">left</item>\r\n        <item name=\"android:layout_width\">wrap_content</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n        <item name=\"android:singleLine\">true</item>\r\n    </style>\r\n\r\n    <style name=\"main_row_stat_time_str_hdpi\" parent=\"@style/main_row_stat_time_str\">\r\n        <item name=\"android:layout_width\">wrap_content</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n    </style>\r\n\r\n    <style name=\"main_row_amount\">\r\n        <item name=\"android:textSize\">16.0dip</item>\r\n        <item name=\"android:textStyle\">bold</item>\r\n        <item name=\"android:ellipsize\">marquee</item>\r\n        <item name=\"android:gravity\">right</item>\r\n        <item name=\"android:layout_gravity\">right</item>\r\n        <item name=\"android:fadingEdge\">horizontal</item>\r\n        <item name=\"android:layout_width\">200.0dip</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n        <item name=\"android:layout_marginRight\">30.0dip</item>\r\n        <item name=\"android:singleLine\">true</item>\r\n        <item name=\"android:layout_alignParentRight\">true</item>\r\n    </style>\r\n\r\n    <style name=\"main_row_go_detail\">\r\n        <item name=\"android:layout_gravity\">center_vertical</item>\r\n        <item name=\"android:background\">@drawable/go_detail_arrow</item>\r\n        <item name=\"android:layout_width\">wrap_content</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n        <item name=\"android:layout_marginTop\">20.0dip</item>\r\n        <item name=\"android:layout_marginRight\">10.0dip</item>\r\n        <item name=\"android:layout_alignParentRight\">true</item>\r\n    </style>\r\n\r\n    <style name=\"main_row_expense_amount\" parent=\"@style/main_row_amount\">\r\n        <item name=\"android:textColor\">@color/transaction_payout_amount</item>\r\n        <item name=\"android:layout_marginTop\">12dp</item>\r\n        <item name=\"android:layout_alignParentTop\">true</item>\r\n    </style>\r\n\r\n    <style name=\"main_row_income_amount\" parent=\"@style/main_row_amount\">\r\n        <item name=\"android:textColor\">@color/transaction_income_amount</item>\r\n        <item name=\"android:layout_marginBottom\">12dp</item>\r\n        <item name=\"android:layout_alignParentBottom\">true</item>\r\n    </style>\r\n\r\n    <style name=\"main_row_expense_amount_hdpi\" parent=\"@style/main_row_expense_amount\">\r\n        <item name=\"android:layout_width\">wrap_content</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n        <item name=\"android:layout_marginRight\">22dp</item>\r\n    </style>\r\n\r\n    <style name=\"main_row_income_amount_hdpi\" parent=\"@style/main_row_income_amount\">\r\n        <item name=\"android:layout_width\">wrap_content</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n        <item name=\"android:layout_marginRight\">22dp</item>\r\n    </style>\r\n\r\n    <style name=\"main_row_go_detail_hdpi\" parent=\"@style/main_row_go_detail\">\r\n        <item name=\"android:layout_marginTop\">33dp</item>\r\n    </style>\r\n\r\n    <style name=\"Widget.KeyboardView\" parent=\"android:Widget\">\r\n        <item name=\"android:keyTextSize\">22sp</item>\r\n        <item name=\"android:keyTextColor\">#ffffffff</item>\r\n        <item name=\"android:keyPreviewOffset\">-12dip</item>\r\n        <item name=\"android:keyPreviewHeight\">80dip</item>\r\n        <item name=\"android:labelTextSize\">14sp</item>\r\n        <item name=\"android:verticalCorrection\">-10dip</item>\r\n        <item name=\"android:shadowColor\">#bb000000</item>\r\n        <item name=\"android:shadowRadius\">2.75</item>\r\n    </style>\r\n\r\n    <style name=\"dialog_tran\" parent=\"android:style/Theme.Dialog\">\r\n        <item name=\"android:windowFrame\">@null</item>\r\n        <item name=\"android:windowNoTitle\">true</item>\r\n        <item name=\"android:windowBackground\">@android:color/transparent</item>\r\n        <item name=\"android:windowIsFloating\">true</item>\r\n        <item name=\"android:windowContentOverlay\">@null</item>\r\n        <item name=\"android:windowIsTranslucent\">true</item>\r\n        <item name=\"android:backgroundDimEnabled\">false</item>\r\n        <item name=\"android:backgroundDimAmount\">0.4</item>\r\n    </style>\r\n\r\n    <style name=\"dialog_untran\" parent=\"dialog_tran\">\r\n        <item name=\"android:backgroundDimEnabled\">true</item>\r\n    </style>\r\n\r\n    <style name=\"DialogWindowTitle\">\r\n        <item name=\"android:textSize\">22sp</item>\r\n        <item name=\"android:textColor\">@color/text_color</item>\r\n    </style>\r\n\r\n    <style name=\"dialog_btn\">\r\n        <item name=\"android:layout_width\">0dp</item>\r\n        <item name=\"android:layout_height\">wrap_content</item>\r\n        <item name=\"android:minHeight\">36dp</item>\r\n        <item name=\"android:layout_weight\">1</item>\r\n        <item name=\"android:layout_marginBottom\">10dp</item>\r\n        <item name=\"android:background\">@drawable/btn_selector</item>\r\n        <item name=\"android:textColor\">#ffffff</item>\r\n        <item name=\"android:gravity\">center</item>\r\n    </style>\r\n\r\n    <style name=\"row_stat\">\r\n        <item name=\"android:background\">@drawable/main_row_stat</item>\r\n        <item name=\"android:focusable\">true</item>\r\n        <item name=\"android:clickable\">true</item>\r\n        <item name=\"android:layout_width\">fill_parent</item>\r\n        <item name=\"android:layout_height\">54.0dip</item>\r\n    </style>\r\n\r\n    <style name=\"row_stat_hdpi\" parent=\"@style/row_stat\">\r\n        <item name=\"android:layout_height\">70dp</item>\r\n    </style>\r\n\r\n    <style name=\"Widget.ListView\" parent=\"@android:style/Widget.ListView\">\r\n        <item name=\"android:background\">@null</item>\r\n        <item name=\"android:scrollbars\">none</item>\r\n        <item name=\"android:fadingEdge\">none</item>\r\n        <item name=\"android:listSelector\">@drawable/common_lv_item_selected</item>\r\n        <item name=\"android:drawSelectorOnTop\">false</item>\r\n        <item name=\"android:cacheColorHint\">@color/transparent</item>\r\n        <item name=\"android:divider\">@drawable/common_lv_item_divider</item>\r\n    </style>\r\n\r\n    <style name=\"TextView\"></style>\r\n\r\n    <style name=\"TextView.Middle\">\r\n        <item name=\"android:textSize\">18dip</item>\r\n    </style>\r\n\r\n    <style name=\"TextView.Middle.White\">\r\n        <item name=\"android:textColor\">@android:color/white</item>\r\n    </style>\r\n\r\n    <style name=\"TextView.Middle.Black\">\r\n        <item name=\"android:textColor\">@android:color/black</item>\r\n    </style>\r\n\r\n    <style name=\"ButtonGreen\" parent=\"@android:style/Widget.Button\">\r\n        <item name=\"android:textSize\">18.0sp</item>\r\n        <item name=\"android:textColor\">@drawable/skin_color_button</item>\r\n        <item name=\"android:background\">@drawable/common_btn_green</item>\r\n    </style>\r\n\r\n    <style name=\"ButtonRed\" parent=\"@android:style/Widget.Button\">\r\n        <item name=\"android:textSize\">18.0sp</item>\r\n        <item name=\"android:textColor\">@drawable/skin_color_button</item>\r\n        <item name=\"android:background\">@drawable/common_btn_red</item>\r\n    </style>\r\n\r\n    <style name=\"HalfTransparent\">\r\n        <item name=\"android:windowBackground\">@color/half_transparent</item>\r\n        <item name=\"android:windowNoTitle\">true</item>\r\n        <item name=\"android:windowIsTranslucent\">true</item>\r\n        <item name=\"android:windowAnimationStyle\">@style/Animation</item>\r\n    </style>\r\n\r\n    <style name=\"Animation\">\r\n        <item name=\"android:activityOpenEnterAnimation\">@null</item>\r\n        <item name=\"android:activityOpenExitAnimation\">@null</item>\r\n        <item name=\"android:activityCloseEnterAnimation\">@null</item>\r\n        <item name=\"android:activityCloseExitAnimation\">@null</item>\r\n        <item name=\"android:taskOpenEnterAnimation\">@null</item>\r\n        <item name=\"android:taskOpenExitAnimation\">@null</item>\r\n        <item name=\"android:taskCloseEnterAnimation\">@null</item>\r\n        <item name=\"android:taskCloseExitAnimation\">@null</item>\r\n        <item name=\"android:taskToFrontEnterAnimation\">@null</item>\r\n        <item name=\"android:taskToFrontExitAnimation\">@null</item>\r\n        <item name=\"android:taskToBackEnterAnimation\">@null</item>\r\n        <item name=\"android:taskToBackExitAnimation\">@null</item>\r\n    </style>\r\n\r\n    <style name=\"sdw_79351b\">\r\n        <item name=\"android:shadowColor\">@color/ff79351b</item>\r\n        <item name=\"android:shadowDx\">0.0</item>\r\n        <item name=\"android:shadowDy\">1.0</item>\r\n        <item name=\"android:shadowRadius\">1.0</item>\r\n    </style>\r\n\r\n    <style name=\"sdw_white\">\r\n        <item name=\"android:shadowColor\">@color/c_7fffffff</item>\r\n        <item name=\"android:shadowDx\">0.0</item>\r\n        <item name=\"android:shadowDy\">0.65</item>\r\n        <item name=\"android:shadowRadius\">1.0</item>\r\n    </style>\r\n\r\n    <style name=\"text_15_ffffff_sdw\" parent=\"@style/sdw_79351b\">\r\n        <item name=\"android:textSize\">15.0dip</item>\r\n        <item name=\"android:textColor\">@color/ffffffff</item>\r\n    </style>\r\n\r\n    <style name=\"text_15_666666_sdw\" parent=\"@style/sdw_white\">\r\n        <item name=\"android:textSize\">15.0dip</item>\r\n        <item name=\"android:textColor\">@color/ff666666</item>\r\n    </style>\r\n\r\n    <style name=\"text_18_ffffff\">\r\n        <item name=\"android:textSize\">18.0dip</item>\r\n        <item name=\"android:textColor\">@color/black</item>\r\n    </style>\r\n\r\n</resources>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/values-sw600dp/dimens.xml",
    "content": "<resources>\n\n    <!--\n         Customize dimensions originally defined in res/values/dimens.xml (such as\n         screen margins) for sw600dp devices (e.g. 7\" tablets) here.\n    -->\n\n</resources>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/values-sw720dp-land/dimens.xml",
    "content": "<resources>\n\n    <!--\n         Customize dimensions originally defined in res/values/dimens.xml (such as\n         screen margins) for sw720dp devices (e.g. 10\" tablets) in landscape here.\n    -->\n    <dimen name=\"activity_horizontal_margin\">128dp</dimen>\n\n</resources>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/values-v11/styles.xml",
    "content": "<resources>\n\n    <!--\n        Base application theme for API 11+. This theme completely replaces\n        AppBaseTheme from res/values/styles.xml on API 11+ devices.\n    -->\n    <style name=\"AppBaseTheme\" parent=\"android:Theme.Holo.Light\">\n        <!-- API 11 theme customizations can go here. -->\n    </style>\n\n</resources>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/values-v14/styles.xml",
    "content": "<resources>\n\n    <!--\n        Base application theme for API 14+. This theme completely replaces\n        AppBaseTheme from BOTH res/values/styles.xml and\n        res/values-v11/styles.xml on API 14+ devices.\n    -->\n    <style name=\"AppBaseTheme\" parent=\"android:Theme.Holo.Light.DarkActionBar\">\n        <!-- API 14 theme customizations can go here. -->\n    </style>\n\n</resources>\n"
  },
  {
    "path": "MoneyCharge/app/src/main/res/xml/menu.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<PreferenceScreen xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n    <PreferenceCategory android:title=\"支出图表\" >\n        <Preference\n            android:key=\"mpaychart\"\n            android:summary=\"按月份显示支出图表\"\n            android:title=\"分类支出（按月）\" />\n        <Preference\n            android:key=\"dpaychart\"\n            android:summary=\"自定义范围显示支出图表\"\n            android:title=\"分类支出（自定义）\" />\n    </PreferenceCategory>\n    <PreferenceCategory android:title=\"收入图表\" >\n        <Preference\n            android:key=\"mincomechart\"\n            android:summary=\"按月份显示收入图表\"\n            android:title=\"分类收入（按月）\" />\n        <Preference\n            android:key=\"dincomehart\"\n            android:summary=\"自定义范围显示收入图表\"\n            android:title=\"分类收入（自定义）\" />\n    </PreferenceCategory>\n\n</PreferenceScreen>"
  },
  {
    "path": "MoneyCharge/app/src/main/res/xml/symbols_num.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Keyboard xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:horizontalGap=\"0px\"\n    android:keyHeight=\"@dimen/key_height\"\n    android:keyWidth=\"27%p\"\n    android:verticalGap=\"0px\" >\n\n    <Row>\n        <Key\n            android:codes=\"49\"\n            android:keyIcon=\"@drawable/key_1\" />\n        <Key\n            android:codes=\"50\"\n            android:keyIcon=\"@drawable/key_2\" />\n        <Key\n            android:codes=\"51\"\n            android:keyIcon=\"@drawable/key_3\" />\n        <Key\n            android:codes=\"-7\"\n            android:keyIcon=\"@drawable/keyboard_done_2\"\n            android:keyWidth=\"19%p\" />\n    </Row>\n    <Row>\n        <Key\n            android:codes=\"52\"\n            android:keyIcon=\"@drawable/key_4\" />\n        <Key\n            android:codes=\"53\"\n            android:keyIcon=\"@drawable/key_5\" />\n        <Key\n            android:codes=\"54\"\n            android:keyIcon=\"@drawable/key_6\" />\n        <Key\n            android:codes=\"-9\"\n            android:keyIcon=\"@drawable/keyboard_voice\"\n            android:keyWidth=\"19%p\" />\n    </Row>\n    <Row>\n        <Key\n            android:codes=\"55\"\n            android:keyIcon=\"@drawable/key_7\" />\n        <Key\n            android:codes=\"56\"\n            android:keyIcon=\"@drawable/key_8\" />\n        <Key\n            android:codes=\"57\"\n            android:keyIcon=\"@drawable/key_9\" />\n        <Key\n            android:codes=\"-7\"\n            android:keyHeight=\"118dip\"\n            android:keyIcon=\"@drawable/keyboard_done\"\n            android:keyWidth=\"19%p\" />\n    </Row>\n    <Row>\n        <Key\n            android:codes=\"-8\"\n            android:keyIcon=\"@drawable/key_point\" />\n        <Key\n            android:codes=\"48\"\n            android:keyIcon=\"@drawable/key_0\" />\n        <Key\n            android:codes=\"-5\"\n            android:keyIcon=\"@drawable/keyboard_delete\" />\n    </Row>\n\n</Keyboard>"
  },
  {
    "path": "MoneyCharge/build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\nbuildscript {\n    repositories {\n        jcenter()\n        google()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:3.1.2'\n    }\n}\n\nallprojects {\n    repositories {\n        jcenter()\n        google()\n    }\n}\n"
  },
  {
    "path": "MoneyCharge/gradle/wrapper/gradle-wrapper.properties",
    "content": "#Sat Jan 13 09:12:34 PST 2018\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-4.4.1-all.zip\n"
  },
  {
    "path": "MoneyCharge/gradlew",
    "content": "#!/usr/bin/env sh\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn () {\n    echo \"$*\"\n}\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\n  NONSTOP* )\n    nonstop=true\n    ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" -a \"$nonstop\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Escape application args\nsave () {\n    for i do printf %s\\\\n \"$i\" | sed \"s/'/'\\\\\\\\''/g;1s/^/'/;\\$s/\\$/' \\\\\\\\/\" ; done\n    echo \" \"\n}\nAPP_ARGS=$(save \"$@\")\n\n# Collect all arguments for the java command, following the shell quoting and substitution rules\neval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS \"\\\"-Dorg.gradle.appname=$APP_BASE_NAME\\\"\" -classpath \"\\\"$CLASSPATH\\\"\" org.gradle.wrapper.GradleWrapperMain \"$APP_ARGS\"\n\n# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong\nif [ \"$(uname)\" = \"Darwin\" ] && [ \"$HOME\" = \"$PWD\" ]; then\n  cd \"$(dirname \"$0\")\"\nfi\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "MoneyCharge/gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif \"%ERRORLEVEL%\" == \"0\" goto init\n\necho.\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto init\n\necho.\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:init\n@rem Get command-line arguments, handling Windows variants\n\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\n\n:win9xME_args\n@rem Slurp the command line arguments.\nset CMD_LINE_ARGS=\nset _SKIP=2\n\n:win9xME_args_slurp\nif \"x%~1\" == \"x\" goto execute\n\nset CMD_LINE_ARGS=%*\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\n\n:end\n@rem End local scope for the variables with windows NT shell\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\nexit /b 1\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "MoneyCharge/import-summary.txt",
    "content": "ECLIPSE ANDROID PROJECT IMPORT SUMMARY\n======================================\n\nIgnored Files:\n--------------\nThe following files were *not* copied into the new Gradle project; you\nshould evaluate whether these are still needed in your project and if\nso manually move them:\n\n* ic_launcher-web.png\n* proguard-project.txt\n* version.xml\n\nReplaced Jars with Dependencies:\n--------------------------------\nThe importer recognized the following .jar files as third party\nlibraries and replaced them with Gradle dependencies instead. This has\nthe advantage that more explicit version information is known, and the\nlibraries can be updated automatically. However, it is possible that\nthe .jar file in your project was of an older version than the\ndependency we picked, which could render the project not compileable.\nYou can disable the jar replacement in the import wizard and try again:\n\nandroid-support-v4.jar => com.android.support:support-v4:19.1.0\n\nMoved Files:\n------------\nAndroid Gradle projects use a different directory structure than ADT\nEclipse projects. Here's how the projects were restructured:\n\n* AndroidManifest.xml => app\\src\\main\\AndroidManifest.xml\n* libs\\achartengine-1.1.0.jar => app\\libs\\achartengine-1.1.0.jar\n* libs\\Android_Location_V1.3.2.jar => app\\libs\\Android_Location_V1.3.2.jar\n* libs\\androidpiechart.jar => app\\libs\\androidpiechart.jar\n* libs\\armeabi\\libBDVoiceRecognitionClient_MFE_V1.so => app\\src\\main\\jniLibs\\armeabi\\libBDVoiceRecognitionClient_MFE_V1.so\n* libs\\Baidu-SpeechRecognitionUI-SDK-Android-1.6.2.jar => app\\libs\\Baidu-SpeechRecognitionUI-SDK-Android-1.6.2.jar\n* libs\\com.umeng.fb.v5.0.0.jar => app\\libs\\com.umeng.fb.v5.0.0.jar\n* libs\\com.umeng.message.lib1.4.1.jar => app\\libs\\com.umeng.message.lib1.4.1.jar\n* libs\\galaxy.jar => app\\libs\\galaxy.jar\n* libs\\mips\\libBDVoiceRecognitionClient_MFE_V1.so => app\\src\\main\\jniLibs\\mips\\libBDVoiceRecognitionClient_MFE_V1.so\n* libs\\nineoldandroids-2.4.0.jar => app\\libs\\nineoldandroids-2.4.0.jar\n* libs\\VoiceRecognition-1.6.2.jar => app\\libs\\VoiceRecognition-1.6.2.jar\n* libs\\x86\\libBDVoiceRecognitionClient_MFE_V1.so => app\\src\\main\\jniLibs\\x86\\libBDVoiceRecognitionClient_MFE_V1.so\n* lint.xml => app\\lint.xml\n* res\\ => app\\src\\main\\res\\\n* src\\ => app\\src\\main\\java\\\n\nNext Steps:\n-----------\nYou can now build the project. The Gradle project needs network\nconnectivity to download dependencies.\n\nBugs:\n-----\nIf for some reason your project does not build, and you determine that\nit is due to a bug or limitation of the Eclipse to Gradle importer,\nplease file a bug at http://b.android.com with category\nComponent-Tools.\n\n(This import summary is for your information only, and can be deleted\nafter import once you are satisfied with the results.)\n"
  },
  {
    "path": "MoneyCharge/settings.gradle",
    "content": "include ':app'\n"
  },
  {
    "path": "README.md",
    "content": "# quickmark 快速记\n\n快速记（个人记账安卓app），2015.4毕业设计<br><br>\n特色功能是：语音记账，地点记账，照片/图片记账<br><br>\n毕设题目为《基于Android平台的个人理财软件的设计与实现》<br>\n###需要答辩ppt和毕业论文的请在下面链接中<br>下载:[基于Android平台的个人理财软件的设计与实现-源代码](http://download.csdn.net/detail/linmp4/8693147 \"基于Android平台的个人理财软件的设计与实现-源代码\")\n<br>\n\n>项目目录：<br>\n>-MoneyCharge (主目录)<br>\n>--com.cwp.chart (饼图统计库)<br>\n>--com.cwp.cmoneycharge (主界面逻辑)<br>\n>--com.cwp.pattern (手势密码库)<br>\n>--com.example.testpic (图片记账库)<br>\n>--com.slidingmenu.lib (侧滑栏库)<br>\n>--com.slidingmenu.lib.app (侧滑栏库)<br>\n>--com.umeng.fb.example (友盟，用户反馈库)<br>\n>--com.zhy.view (环形进度条库)<br>\n>--cwp.moneycharge.dao (业务类)<br>\n>--cwp.moneycharge.model (数据库类)<br>\n\n<br>\n> [基于安卓的个人理财软件的设计与实现--项目心得](http://www.cnblogs.com/linmp4/p/4404347.html \"基于安卓的个人理财软件的设计与实现--项目心得\")<br><br>\n> [快速记更新日志](http://www.cnblogs.com/linmp4/p/4415285.html \"快速记 beta 1.08\")<br><br>\n>[基于安卓的个人理财软件的设计与实现--动图预览](http://www.eoeandroid.com/thread-574362-1-1.html \"基于安卓的个人理财软件的设计与实现--动图预览\")<br>\n>[基于安卓的个人理财软件的设计与实现--动图预览2](http://www.cnblogs.com/linmp4/p/4415672.html \"基于安卓的个人理财软件的设计与实现--动图预览2\")\n<br>\n\n<br>\n图片预览：<br>\n<img src=\"http://images.cnitblog.com/blog2015/742046/201504/102113330559472.png\" alt=\"\" width=\"306\" height=\"544\" />\n<img src=\"http://images.cnitblog.com/blog2015/742046/201504/102114008053195.png\" alt=\"\" width=\"305\" height=\"542\" />\n<img src=\"http://images.cnitblog.com/blog2015/742046/201504/102114244305877.png\" alt=\"\" width=\"305\" height=\"542\" />\n<img src=\"http://images.cnitblog.com/blog2015/742046/201504/102114438996763.png\" alt=\"\" width=\"306\" height=\"544\" />"
  }
]