Showing preview only (1,170K chars total). Download the full file or copy to clipboard to get everything.
Repository: linmp4/quickmark
Branch: master
Commit: b933e8aa9f63
Files: 278
Total size: 1.0 MB
Directory structure:
gitextract_1ebxno1h/
├── LICENSE
├── MoneyCharge/
│ ├── .gitignore
│ ├── app/
│ │ ├── build.gradle
│ │ ├── libs/
│ │ │ ├── Android_Location_V1.3.2.jar
│ │ │ ├── Baidu-SpeechRecognitionUI-SDK-Android-1.6.2.jar
│ │ │ ├── VoiceRecognition-1.6.2.jar
│ │ │ ├── achartengine-1.1.0.jar
│ │ │ ├── androidpiechart.jar
│ │ │ ├── com.umeng.fb.v5.0.0.jar
│ │ │ ├── com.umeng.message.lib1.4.1.jar
│ │ │ ├── galaxy.jar
│ │ │ └── nineoldandroids-2.4.0.jar
│ │ ├── lint.xml
│ │ └── src/
│ │ └── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ ├── com/
│ │ │ │ ├── cwp/
│ │ │ │ │ ├── chart/
│ │ │ │ │ │ ├── BaseFoldingLayout.java
│ │ │ │ │ │ ├── ChartProp.java
│ │ │ │ │ │ ├── ChartPropChangeListener.java
│ │ │ │ │ │ ├── CheckAdapter.java
│ │ │ │ │ │ ├── CustomMultiChoiceDialog.java
│ │ │ │ │ │ ├── FoldingLayout.java
│ │ │ │ │ │ ├── MenuFragment.java
│ │ │ │ │ │ ├── MyAdspter.java
│ │ │ │ │ │ ├── MyButton.java
│ │ │ │ │ │ ├── MyButtonClickListener.java
│ │ │ │ │ │ ├── OnFoldListener.java
│ │ │ │ │ │ ├── PieChart.java
│ │ │ │ │ │ ├── PieView.java
│ │ │ │ │ │ ├── PiewController.java
│ │ │ │ │ │ ├── PullToRefreshView.java
│ │ │ │ │ │ ├── RiseNumberBase.java
│ │ │ │ │ │ ├── RiseNumberTextView.java
│ │ │ │ │ │ ├── SystemBarTintManager.java
│ │ │ │ │ │ └── Util.java
│ │ │ │ │ ├── cmoneycharge/
│ │ │ │ │ │ ├── About.java
│ │ │ │ │ │ ├── AddPay.java
│ │ │ │ │ │ ├── Author.java
│ │ │ │ │ │ ├── BaseEffects.java
│ │ │ │ │ │ ├── BaseFrament.java
│ │ │ │ │ │ ├── Config.java
│ │ │ │ │ │ ├── Constants.java
│ │ │ │ │ │ ├── CrashApplication.java
│ │ │ │ │ │ ├── CrashHandler.java
│ │ │ │ │ │ ├── Description.java
│ │ │ │ │ │ ├── DialogShowUtil.java
│ │ │ │ │ │ ├── DigitUtil.java
│ │ │ │ │ │ ├── Effectstype.java
│ │ │ │ │ │ ├── FragmentPage1.java
│ │ │ │ │ │ ├── FragmentPage2.java
│ │ │ │ │ │ ├── FragmentPage3.java
│ │ │ │ │ │ ├── FragmentPage4.java
│ │ │ │ │ │ ├── InPtypeManager.java
│ │ │ │ │ │ ├── IncomeData.java
│ │ │ │ │ │ ├── KeyboardUtil.java
│ │ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ │ ├── ModifyInP.java
│ │ │ │ │ │ ├── NiftyDialogBuilder.java
│ │ │ │ │ │ ├── PayChart.java
│ │ │ │ │ │ ├── PayData.java
│ │ │ │ │ │ ├── RotateBottom.java
│ │ │ │ │ │ ├── SearchActivity.java
│ │ │ │ │ │ ├── SettingActivity.java
│ │ │ │ │ │ ├── Shake.java
│ │ │ │ │ │ ├── SlideTop.java
│ │ │ │ │ │ └── SysApplication.java
│ │ │ │ │ └── pattern/
│ │ │ │ │ ├── CreateGesturePasswordActivity.java
│ │ │ │ │ ├── GuideGesturePasswordActivity.java
│ │ │ │ │ ├── LockPatternUtils.java
│ │ │ │ │ ├── LockPatternView.java
│ │ │ │ │ ├── ParseXmlService.java
│ │ │ │ │ ├── UnlockGesturePasswordActivity.java
│ │ │ │ │ └── UpdateManager.java
│ │ │ │ ├── example/
│ │ │ │ │ └── testpic/
│ │ │ │ │ ├── AlbumHelper.java
│ │ │ │ │ ├── Bimp.java
│ │ │ │ │ ├── BitmapCache.java
│ │ │ │ │ ├── FileUtils.java
│ │ │ │ │ ├── ImageBucket.java
│ │ │ │ │ ├── ImageBucketAdapter.java
│ │ │ │ │ ├── ImageGridActivity.java
│ │ │ │ │ ├── ImageGridAdapter.java
│ │ │ │ │ ├── ImageItem.java
│ │ │ │ │ ├── NoScrollGridView.java
│ │ │ │ │ ├── PhotoActivity.java
│ │ │ │ │ ├── PublishedActivity.java
│ │ │ │ │ └── TestPicActivity.java
│ │ │ │ ├── slidingmenu/
│ │ │ │ │ └── lib/
│ │ │ │ │ ├── CanvasTransformerBuilder.java
│ │ │ │ │ ├── CustomViewAbove.java
│ │ │ │ │ ├── CustomViewBehind.java
│ │ │ │ │ ├── MenuInterface.java
│ │ │ │ │ ├── SlidingMenu.java
│ │ │ │ │ └── app/
│ │ │ │ │ ├── SlidingActivity.java
│ │ │ │ │ ├── SlidingActivityBase.java
│ │ │ │ │ ├── SlidingActivityHelper.java
│ │ │ │ │ ├── SlidingFragmentActivity.java
│ │ │ │ │ ├── SlidingListActivity.java
│ │ │ │ │ ├── SlidingMapActivity.java
│ │ │ │ │ ├── SlidingPreferenceActivity.java
│ │ │ │ │ └── SystemBarTintManager.java
│ │ │ │ ├── umeng/
│ │ │ │ │ └── fb/
│ │ │ │ │ └── example/
│ │ │ │ │ ├── AppApplication.java
│ │ │ │ │ ├── AppPush.java
│ │ │ │ │ ├── CustomActivity.java
│ │ │ │ │ └── MyPushIntentService.java
│ │ │ │ └── zhy/
│ │ │ │ └── view/
│ │ │ │ ├── HorizontalProgressBarWithNumber.java
│ │ │ │ └── RoundProgressBarWidthNumber.java
│ │ │ └── cwp/
│ │ │ └── moneycharge/
│ │ │ ├── dao/
│ │ │ │ ├── AccountDAO.java
│ │ │ │ ├── DBOpenHelper.java
│ │ │ │ ├── IncomeDAO.java
│ │ │ │ ├── ItypeDAO.java
│ │ │ │ ├── NoteDAO.java
│ │ │ │ ├── PayDAO.java
│ │ │ │ └── PtypeDAO.java
│ │ │ └── model/
│ │ │ ├── ActivityManager.java
│ │ │ ├── CustomDialog.java
│ │ │ ├── Datapicker.java
│ │ │ ├── KindData.java
│ │ │ ├── Tb_account.java
│ │ │ ├── Tb_income.java
│ │ │ ├── Tb_itype.java
│ │ │ ├── Tb_note.java
│ │ │ ├── Tb_pay.java
│ │ │ └── Tb_ptype.java
│ │ └── res/
│ │ ├── anim/
│ │ │ ├── animation_1.xml
│ │ │ ├── animation_2.xml
│ │ │ ├── fade_ins.xml
│ │ │ ├── hold.xml
│ │ │ ├── in_from_right.xml
│ │ │ ├── interpolator_cycle.xml
│ │ │ ├── out_to_left.xml
│ │ │ ├── push_bottom_in.xml
│ │ │ ├── push_bottom_in_2.xml
│ │ │ ├── push_up_in.xml
│ │ │ ├── push_up_out.xml
│ │ │ ├── shake.xml
│ │ │ ├── shake_x.xml
│ │ │ └── shake_y.xml
│ │ ├── color/
│ │ │ ├── cost_text.xml
│ │ │ ├── tab_friendfeed_text.xml
│ │ │ ├── tab_home_text.xml
│ │ │ ├── tab_more_text.xml
│ │ │ └── tab_myfeed_text.xml
│ │ ├── drawable/
│ │ │ ├── addphoto_btn.xml
│ │ │ ├── bg_border.xml
│ │ │ ├── bgd_relatly_line.xml
│ │ │ ├── bt_add_pic.xml
│ │ │ ├── bt_nobgd.xml
│ │ │ ├── bt_queding.xml
│ │ │ ├── bt_quxiao.xml
│ │ │ ├── bt_shanchu.xml
│ │ │ ├── btn_cancel_selector.xml
│ │ │ ├── btn_login_selector.xml
│ │ │ ├── btn_press.xml
│ │ │ ├── btn_selector.xml
│ │ │ ├── btn_unpress.xml
│ │ │ ├── chart_left_btn.xml
│ │ │ ├── chart_right_btn.xml
│ │ │ ├── chart_silding_btn.xml
│ │ │ ├── checkbox.xml
│ │ │ ├── common_btn_green.xml
│ │ │ ├── common_btn_red.xml
│ │ │ ├── corner_bdbdbd.xml
│ │ │ ├── corner_e0e0e0.xml
│ │ │ ├── corner_f2f2f2.xml
│ │ │ ├── dialog_bg.xml
│ │ │ ├── dialog_bottom_bg.xml
│ │ │ ├── fb_send_btn_bg.xml
│ │ │ ├── keyboard_key.xml
│ │ │ ├── locate_btn.xml
│ │ │ ├── search_button_type.xml
│ │ │ ├── selector.xml
│ │ │ ├── shadow.xml
│ │ │ ├── skin_color_button.xml
│ │ │ ├── tab_friendfeed_btn.xml
│ │ │ ├── tab_home_btn.xml
│ │ │ ├── tab_more_btn.xml
│ │ │ ├── tab_myfeed_btn.xml
│ │ │ ├── text_while.xml
│ │ │ └── welcome_bg.xml
│ │ ├── drawable-hdpi/
│ │ │ ├── common_lv_item_for_metadata_bg.xml
│ │ │ ├── common_lv_item_higher_bg.xml
│ │ │ ├── common_toolbar_btn.xml
│ │ │ ├── common_toolbar_btn_small.xml
│ │ │ ├── form_row_input_middle.xml
│ │ │ ├── form_row_input_middle_short_left.xml
│ │ │ ├── form_row_input_middle_short_right.xml
│ │ │ ├── form_row_input_top.xml
│ │ │ ├── income_tab_btn_radio.xml
│ │ │ ├── main_add_expense_quickly.xml
│ │ │ ├── main_row_stat.xml
│ │ │ └── payout_tab_btn_radio.xml
│ │ ├── layout/
│ │ │ ├── about.xml
│ │ │ ├── account.xml
│ │ │ ├── activity_custom.xml
│ │ │ ├── activity_image_bucket.xml
│ │ │ ├── activity_image_grid.xml
│ │ │ ├── activity_index.xml
│ │ │ ├── activity_main.xml
│ │ │ ├── activity_photo.xml
│ │ │ ├── activity_selectimg.xml
│ │ │ ├── add.xml
│ │ │ ├── addincome.xml
│ │ │ ├── addnote.xml
│ │ │ ├── addpay.xml
│ │ │ ├── author.xml
│ │ │ ├── changepwd.xml
│ │ │ ├── child.xml
│ │ │ ├── custom_fb_dev_reply.xml
│ │ │ ├── custom_fb_user_reply.xml
│ │ │ ├── custom_view.xml
│ │ │ ├── data.xml
│ │ │ ├── description.xml
│ │ │ ├── dialog.xml
│ │ │ ├── dialog_layout.xml
│ │ │ ├── dialog_multichoice_item.xml
│ │ │ ├── dialog_multichoice_layout.xml
│ │ │ ├── fragment_1.xml
│ │ │ ├── fragment_2.xml
│ │ │ ├── fragment_3.xml
│ │ │ ├── fragment_4.xml
│ │ │ ├── fragment_5.xml
│ │ │ ├── fragnew_3.xml
│ │ │ ├── frame_menu.xml
│ │ │ ├── gesturepassword_create.xml
│ │ │ ├── gesturepassword_guide.xml
│ │ │ ├── gesturepassword_unlock.xml
│ │ │ ├── group.xml
│ │ │ ├── gvitem.xml
│ │ │ ├── income.xml
│ │ │ ├── incomedata.xml
│ │ │ ├── infomanage.xml
│ │ │ ├── inptypemanager.xml
│ │ │ ├── item_image_bucket.xml
│ │ │ ├── item_image_grid.xml
│ │ │ ├── item_popupwindows.xml
│ │ │ ├── item_published_grida.xml
│ │ │ ├── list.xml
│ │ │ ├── login.xml
│ │ │ ├── modifyinp.xml
│ │ │ ├── modifynote.xml
│ │ │ ├── note.xml
│ │ │ ├── notification_item.xml
│ │ │ ├── pay.xml
│ │ │ ├── paychart.xml
│ │ │ ├── paydata.xml
│ │ │ ├── pidata.xml
│ │ │ ├── popwindow_layout.xml
│ │ │ ├── preview_layout.xml
│ │ │ ├── refresh_footer.xml
│ │ │ ├── refresh_header.xml
│ │ │ ├── register.xml
│ │ │ ├── search_activity.xml
│ │ │ ├── setting.xml
│ │ │ ├── showinfo.xml
│ │ │ ├── slidingmenumain.xml
│ │ │ ├── softupdate_progress.xml
│ │ │ ├── spinner.xml
│ │ │ └── voice_setting.xml
│ │ ├── menu/
│ │ │ └── index.xml
│ │ ├── values/
│ │ │ ├── attr_progress_bar.xml
│ │ │ ├── attrs.xml
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── ids.xml
│ │ │ ├── moneychargetype.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ ├── values-sw600dp/
│ │ │ └── dimens.xml
│ │ ├── values-sw720dp-land/
│ │ │ └── dimens.xml
│ │ ├── values-v11/
│ │ │ └── styles.xml
│ │ ├── values-v14/
│ │ │ └── styles.xml
│ │ └── xml/
│ │ ├── menu.xml
│ │ └── symbols_num.xml
│ ├── build.gradle
│ ├── gradle/
│ │ └── wrapper/
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── import-summary.txt
│ └── settings.gradle
└── README.md
================================================
FILE CONTENTS
================================================
================================================
FILE: LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2015 linmp4
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: MoneyCharge/.gitignore
================================================
### Android ###
.gradle
/local.properties
.DS_Store
/captures
.externalNativeBuild
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**
!**/src/test/**
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
### VS Code ###
.vscode/
### log ###
*.log
### Java build package###
src/main/java/META-INF/MANIFEST.MF
================================================
FILE: MoneyCharge/app/build.gradle
================================================
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.cwp.cmoneycharge"
minSdkVersion 15
targetSdkVersion 18
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:22.2.1'
compile files('libs/achartengine-1.1.0.jar')
compile files('libs/Android_Location_V1.3.2.jar')
compile files('libs/androidpiechart.jar')
compile files('libs/Baidu-SpeechRecognitionUI-SDK-Android-1.6.2.jar')
compile files('libs/com.umeng.fb.v5.0.0.jar')
compile files('libs/com.umeng.message.lib1.4.1.jar')
compile files('libs/galaxy.jar')
compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/VoiceRecognition-1.6.2.jar')
}
================================================
FILE: MoneyCharge/app/lint.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<lint>
</lint>
================================================
FILE: MoneyCharge/app/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cwp.cmoneycharge"
android:versionCode="2"
android:versionName="1.08" >
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<application
android:name=".CrashApplication"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<meta-data
android:name="com.amap.api.v2.apikey"
android:value="40fd2c7bc96ff0fc9eccdbabc2b96984" />
<meta-data
android:name="UMENG_APPKEY"
android:value="552bc81efd98c518a50008b2" />
<!-- Push UMENG_MESSAGE_SECRET -->
<meta-data
android:name="UMENG_MESSAGE_SECRET"
android:value="UMENG_MESSAGE_SECRET" >
</meta-data>
<!-- umeng push -->
<meta-data
android:name="UMENG_CHANNEL"
android:value="Umeng" />
<activity
android:name="com.cwp.cmoneycharge.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.cwp.cmoneycharge.About" />
<activity android:name="com.cwp.cmoneycharge.Account" />
<activity android:name="com.cwp.cmoneycharge.AddIncome" />
<activity android:name="com.cwp.cmoneycharge.AddNote" />
<activity android:name="com.cwp.cmoneycharge.AddPay" />
<activity android:name="com.cwp.cmoneycharge.Author" />
<activity android:name="com.cwp.cmoneycharge.ChangePwd" />
<activity android:name="com.cwp.cmoneycharge.Data" />
<activity android:name="com.cwp.cmoneycharge.Description" />
<activity android:name="com.cwp.cmoneycharge.Income" />
<activity android:name="com.cwp.cmoneycharge.IncomeData" />
<activity android:name="com.cwp.cmoneycharge.InPtypeManager" />
<activity android:name="com.cwp.cmoneycharge.Login" />
<activity android:name="com.cwp.cmoneycharge.ModifyInP" />
<activity android:name="com.cwp.cmoneycharge.ModifyNote" />
<activity android:name="com.cwp.cmoneycharge.Note" />
<activity android:name="com.cwp.cmoneycharge.Pay" />
<activity android:name="com.cwp.cmoneycharge.PayData" />
<activity android:name="com.cwp.cmoneycharge.PIData" />
<activity android:name="com.cwp.cmoneycharge.Register" />
<activity android:name="com.cwp.cmoneycharge.Setting" />
<activity android:name="cwp.moneycharge.dao.AccountDAO" />
<activity android:name="cwp.moneycharge.dao.DBOpenHelper" />
<activity android:name="cwp.moneycharge.dao.IncomeDAO" />
<activity android:name="cwp.moneycharge.dao.ItypeDAO" />
<activity android:name="cwp.moneycharge.dao.NoteDAO" />
<activity android:name="cwp.moneycharge.dao.PayDAO" />
<activity android:name="cwp.moneycharge.dao.PtypeDAO" />
<activity android:name="cwp.moneycharge.model.ActivityManager" />
<activity android:name="cwp.moneycharge.model.CustomDialog" />
<activity android:name="cwp.moneycharge.model.Datapicker" />
<activity android:name="cwp.moneycharge.model.KindData" />
<activity android:name="cwp.moneycharge.model.Tb_account" />
<activity android:name="cwp.moneycharge.model.Tb_income" />
<activity android:name="cwp.moneycharge.model.Tb_itype" />
<activity android:name="cwp.moneycharge.model.Tb_note" />
<activity android:name="cwp.moneycharge.model.Tb_pay" />
<activity android:name="cwp.moneycharge.model.Tb_ptype" />
<activity android:name="com.cwp.cmoneycharge.SettingActivity" />
<activity android:name="com.cwp.cmoneycharge.PayChart" />
<activity
android:name="com.umeng.fb.example.CustomActivity"
android:windowSoftInputMode="adjustPan" />
<activity
android:name="com.example.testpic.PublishedActivity"
android:theme="@style/HalfTransparent" />
<activity
android:name="com.cwp.cmoneycharge.SearchActivity"
android:theme="@style/HalfTransparent"
android:windowSoftInputMode="stateVisible|adjustPan" />
<activity
android:name="com.cwp.pattern.CreateGesturePasswordActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.cwp.pattern.GuideGesturePasswordActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.cwp.pattern.UnlockGesturePasswordActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.example.testpic.ImageGridActivity"
android:theme="@android:style/Theme.NoTitleBar" >
</activity>
<activity
android:name="com.example.testpic.TestPicActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="@android:style/Theme.NoTitleBar" >
</activity>
<activity
android:name="com.example.testpic.PhotoActivity"
android:theme="@android:style/Theme.NoTitleBar" >
</activity>
</application>
</manifest>
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/BaseFoldingLayout.java
================================================
/*
* Copyright (C) 2013 Priboi Tiberiu
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.cwp.chart;
import com.cwp.cmoneycharge.R;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.LinearGradient;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.Rect;
import android.graphics.Shader.TileMode;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
/**
* The folding layout where the number of folds, the anchor point and the
* orientation of the fold can be specified. Each of these parameters can be
* modified individually and updates and resets the fold to a default (unfolded)
* state. The fold factor varies between 0 (completely unfolded flat image) to
* 1.0 (completely folded, non-visible image).
*
* This layout throws an exception if there is more than one child added to the
* view. For more complicated view hierarchy's inside the folding layout, the
* views should all be nested inside 1 parent layout.
*
* This layout folds the contents of its child in real time. By applying matrix
* transformations when drawing to canvas, the contents of the child may change
* as the fold takes place. It is important to note that there are jagged edges
* about the perimeter of the layout as a result of applying transformations to
* a rectangle. This can be avoided by having the child of this layout wrap its
* content inside a 1 pixel transparent border. This will cause an anti-aliasing
* like effect and smoothen out the edges.
*
*/
public class BaseFoldingLayout extends ViewGroup {
/*
* A bug was introduced in Android 4.3 that ignores changes to the Canvas
* state between multiple calls to super.dispatchDraw() when running with
* hardware acceleration. To account for this bug, a slightly different
* approach was taken to fold a static image whereby a bitmap of the
* original contents is captured and drawn in segments onto the canvas.
* However, this method does not permit the folding of a TextureView hosting
* a live camera feed which continuously updates. Furthermore, the sepia
* effect was removed from the bitmap variation of the demo to simplify the
* logic when running with this workaround."
*/
public static enum Orientation {
VERTICAL, HORIZONTAL
}
private final String FOLDING_VIEW_EXCEPTION_MESSAGE = "Folding Layout can only 1 child at "
+ "most";
private final float SHADING_ALPHA = 0.8f;
private final float SHADING_FACTOR = 0.5f;
private final int DEPTH_CONSTANT = 1500;
private final int NUM_OF_POLY_POINTS = 8;
private Rect[] mFoldRectArray;
private Matrix[] mMatrix;
protected Orientation mOrientation = Orientation.VERTICAL;
protected float mAnchorFactor = 0;
private float mFoldFactor = 0;
private int mNumberOfFolds = 2;
private boolean mIsHorizontal = true;
private int mOriginalWidth = 0;
private int mOriginalHeight = 0;
private float mFoldMaxWidth = 0;
private float mFoldMaxHeight = 0;
private float mFoldDrawWidth = 0;
private float mFoldDrawHeight = 0;
private boolean mIsFoldPrepared = false;
private boolean mShouldDraw = true;
private Paint mSolidShadow;
private Paint mGradientShadow;
private LinearGradient mShadowLinearGradient;
private Matrix mShadowGradientMatrix;
private float[] mSrc;
private float[] mDst;
private OnFoldListener mFoldListener;
private float mPreviousFoldFactor = 0;
private Bitmap mFullBitmap;
private Rect mDstRect;
public BaseFoldingLayout(Context context) {
super(context);
}
public BaseFoldingLayout(Context context, AttributeSet attrs) {
super(context, attrs);
init(context, attrs);
}
public BaseFoldingLayout(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init(context, attrs);
}
public void init(Context context, AttributeSet attrs) {
// now style everything!
TypedArray ta = context.obtainStyledAttributes(attrs,
R.styleable.FoldingMenu);
int mFoldNumber = ta.getInt(R.styleable.FoldingMenu_foldNumber,
mNumberOfFolds);
if (mFoldNumber > 0 && mFoldNumber < 7) {
mNumberOfFolds = mFoldNumber;
} else {
mNumberOfFolds = 2;
}
ta.recycle();
}
@Override
protected boolean addViewInLayout(View child, int index,
LayoutParams params, boolean preventRequestLayout) {
throwCustomException(getChildCount());
boolean returnValue = super.addViewInLayout(child, index, params,
preventRequestLayout);
return returnValue;
}
@Override
public void addView(View child, int index, LayoutParams params) {
throwCustomException(getChildCount());
super.addView(child, index, params);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
View child = getChildAt(0);
measureChild(child, widthMeasureSpec, heightMeasureSpec);
setMeasuredDimension(widthMeasureSpec, heightMeasureSpec);
}
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
View child = getChildAt(0);
child.layout(0, 0, child.getMeasuredWidth(), child.getMeasuredHeight());
updateFold();
}
/**
* The custom exception to be thrown so as to limit the number of views in
* this layout to at most one.
*/
private class NumberOfFoldingLayoutChildrenException extends
RuntimeException {
/**
*
*/
private static final long serialVersionUID = 1L;
public NumberOfFoldingLayoutChildrenException(String message) {
super(message);
}
}
/**
* Throws an exception if the number of views added to this layout exceeds
* one.
*/
private void throwCustomException(int numOfChildViews) {
if (numOfChildViews == 1) {
throw new NumberOfFoldingLayoutChildrenException(
FOLDING_VIEW_EXCEPTION_MESSAGE);
}
}
public void setFoldListener(OnFoldListener foldListener) {
mFoldListener = foldListener;
}
/**
* Sets the fold factor of the folding view and updates all the
* corresponding matrices and values to account for the new fold factor.
* Once that is complete, it redraws itself with the new fold.
*/
public void setFoldFactor(float foldFactor) {
if (foldFactor != mFoldFactor) {
mFoldFactor = foldFactor;
calculateMatrices();
invalidate();
}
}
public void setOrientation(Orientation orientation) {
if (orientation != mOrientation) {
mOrientation = orientation;
updateFold();
}
}
public void setAnchorFactor(float anchorFactor) {
if (anchorFactor != mAnchorFactor) {
mAnchorFactor = anchorFactor;
updateFold();
}
}
public void setNumberOfFolds(int numberOfFolds) {
if (numberOfFolds != mNumberOfFolds) {
mNumberOfFolds = numberOfFolds;
updateFold();
}
}
public float getAnchorFactor() {
return mAnchorFactor;
}
public Orientation getOrientation() {
return mOrientation;
}
public float getFoldFactor() {
return mFoldFactor;
}
public int getNumberOfFolds() {
return mNumberOfFolds;
}
private void updateFold() {
prepareFold(mOrientation, mAnchorFactor, mNumberOfFolds);
calculateMatrices();
invalidate();
}
/**
* This method is called in order to update the fold's orientation, anchor
* point and number of folds. This creates the necessary setup in order to
* prepare the layout for a fold with the specified parameters. Some of the
* dimensions required for the folding transformation are also acquired
* here.
*
* After this method is called, it will be in a completely unfolded state by
* default.
*/
private void prepareFold(Orientation orientation, float anchorFactor,
int numberOfFolds) {
mSrc = new float[NUM_OF_POLY_POINTS];
mDst = new float[NUM_OF_POLY_POINTS];
mDstRect = new Rect();
mFoldFactor = 0;
mPreviousFoldFactor = 0;
mIsFoldPrepared = false;
mSolidShadow = new Paint();
mGradientShadow = new Paint();
mOrientation = orientation;
mIsHorizontal = (orientation == Orientation.HORIZONTAL);
if (mIsHorizontal) {
mShadowLinearGradient = new LinearGradient(0, 0, SHADING_FACTOR, 0,
Color.BLACK, Color.TRANSPARENT, TileMode.CLAMP);
} else {
mShadowLinearGradient = new LinearGradient(0, 0, 0, SHADING_FACTOR,
Color.BLACK, Color.TRANSPARENT, TileMode.CLAMP);
}
mGradientShadow.setStyle(Style.FILL);
mGradientShadow.setShader(mShadowLinearGradient);
mShadowGradientMatrix = new Matrix();
mAnchorFactor = anchorFactor;
mNumberOfFolds = numberOfFolds;
mOriginalWidth = getMeasuredWidth();
mOriginalHeight = getMeasuredHeight();
mFoldRectArray = new Rect[mNumberOfFolds];
mMatrix = new Matrix[mNumberOfFolds];
for (int x = 0; x < mNumberOfFolds; x++) {
mMatrix[x] = new Matrix();
}
int h = mOriginalHeight;
int w = mOriginalWidth;
if (Util.IS_JBMR2 && h != 0 && w != 0) {
mFullBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(mFullBitmap);
getChildAt(0).draw(canvas);
}
int delta = Math.round(mIsHorizontal ? ((float) w)
/ ((float) mNumberOfFolds) : ((float) h)
/ ((float) mNumberOfFolds));
/*
* Loops through the number of folds and segments the full layout into a
* number of smaller equal components. If the number of folds is odd,
* then one of the components will be smaller than all the rest. Note
* that deltap below handles the calculation for an odd number of folds.
*/
for (int x = 0; x < mNumberOfFolds; x++) {
if (mIsHorizontal) {
int deltap = (x + 1) * delta > w ? w - x * delta : delta;
mFoldRectArray[x] = new Rect(x * delta, 0, x * delta + deltap,
h);
} else {
int deltap = (x + 1) * delta > h ? h - x * delta : delta;
mFoldRectArray[x] = new Rect(0, x * delta, w, x * delta
+ deltap);
}
}
if (mIsHorizontal) {
mFoldMaxHeight = h;
mFoldMaxWidth = delta;
} else {
mFoldMaxHeight = delta;
mFoldMaxWidth = w;
}
mIsFoldPrepared = true;
}
/*
* Calculates the transformation matrices used to draw each of the separate
* folding segments from this view.
*/
private void calculateMatrices() {
mShouldDraw = true;
if (!mIsFoldPrepared) {
return;
}
/**
* If the fold factor is 1 than the folding view should not be seen and
* the canvas can be left completely empty.
*/
if (mFoldFactor == 1) {
mShouldDraw = false;
return;
}
// if (mFoldFactor == 0 && mPreviousFoldFactor > 0
// && mFoldListener != null) {
//
// mFoldListener.onEndFold(mFoldFactor);
// }else if (mPreviousFoldFactor == 0 && mFoldFactor > 0
// && mFoldListener != null) {
//
// mFoldListener.onStartFold(mFoldFactor);
// } else if(mFoldListener != null) {
// mFoldListener.onFoldingState(mFoldFactor);
// }
if (mFoldFactor > 0.9f && mFoldFactor > mPreviousFoldFactor
&& mFoldListener != null) {
mFoldListener.onEndFold(mFoldFactor);
} else if (mFoldFactor < 0.1f && mFoldFactor < mPreviousFoldFactor
&& mFoldListener != null) {
mFoldListener.onStartFold(mFoldFactor);
} else if (mFoldListener != null) {
mFoldListener.onFoldingState(mFoldFactor, mFoldDrawHeight);
}
// if(mFoldFactor == 0 && mFoldListener != null) {
// mFoldListener.onStartFold(mFoldFactor);
// } else if(mFoldFactor == 1 && mFoldListener != null) {
// mFoldListener.onEndFold(mFoldFactor);
// } else {
// mFoldListener.onFoldingState(mFoldFactor);
// }
mPreviousFoldFactor = mFoldFactor;
/*
* Reset all the transformation matrices back to identity before
* computing the new transformation
*/
for (int x = 0; x < mNumberOfFolds; x++) {
mMatrix[x].reset();
}
float cTranslationFactor = 1 - mFoldFactor;
float translatedDistance = mIsHorizontal ? mOriginalWidth
* cTranslationFactor : mOriginalHeight * cTranslationFactor;
float translatedDistancePerFold = Math.round(translatedDistance
/ mNumberOfFolds);
/*
* For an odd number of folds, the rounding error may cause the
* translatedDistancePerFold to be grater than the max fold width or
* height.
*/
mFoldDrawWidth = mFoldMaxWidth < translatedDistancePerFold ? translatedDistancePerFold
: mFoldMaxWidth;
mFoldDrawHeight = mFoldMaxHeight < translatedDistancePerFold ? translatedDistancePerFold
: mFoldMaxHeight;
float translatedDistanceFoldSquared = translatedDistancePerFold
* translatedDistancePerFold;
/*
* Calculate the depth of the fold into the screen using pythagorean
* theorem.
*/
float depth = mIsHorizontal ? (float) Math
.sqrt((double) (mFoldDrawWidth * mFoldDrawWidth - translatedDistanceFoldSquared))
: (float) Math
.sqrt((double) (mFoldDrawHeight * mFoldDrawHeight - translatedDistanceFoldSquared));
/*
* The size of some object is always inversely proportional to the
* distance it is away from the viewpoint. The constant can be varied to
* to affect the amount of perspective.
*/
float scaleFactor = DEPTH_CONSTANT / (DEPTH_CONSTANT + depth);
float scaledWidth, scaledHeight, bottomScaledPoint, topScaledPoint, rightScaledPoint, leftScaledPoint;
if (mIsHorizontal) {
scaledWidth = mFoldDrawWidth * cTranslationFactor;
scaledHeight = mFoldDrawHeight * scaleFactor;
} else {
scaledWidth = mFoldDrawWidth * scaleFactor;
scaledHeight = mFoldDrawHeight * cTranslationFactor;
}
topScaledPoint = (mFoldDrawHeight - scaledHeight) / 2.0f;
bottomScaledPoint = topScaledPoint + scaledHeight;
leftScaledPoint = (mFoldDrawWidth - scaledWidth) / 2.0f;
rightScaledPoint = leftScaledPoint + scaledWidth;
float anchorPoint = mIsHorizontal ? mAnchorFactor * mOriginalWidth
: mAnchorFactor * mOriginalHeight;
/* The fold along which the anchor point is located. */
float midFold = mIsHorizontal ? (anchorPoint / mFoldDrawWidth)
: anchorPoint / mFoldDrawHeight;
mSrc[0] = 0;
mSrc[1] = 0;
mSrc[2] = 0;
mSrc[3] = mFoldDrawHeight;
mSrc[4] = mFoldDrawWidth;
mSrc[5] = 0;
mSrc[6] = mFoldDrawWidth;
mSrc[7] = mFoldDrawHeight;
/*
* Computes the transformation matrix for each fold using the values
* calculated above.
*/
for (int x = 0; x < mNumberOfFolds; x++) {
boolean isEven = (x % 2 == 0);
if (mIsHorizontal) {
mDst[0] = (anchorPoint > x * mFoldDrawWidth) ? anchorPoint
+ (x - midFold) * scaledWidth : anchorPoint
- (midFold - x) * scaledWidth;
mDst[1] = isEven ? 0 : topScaledPoint;
mDst[2] = mDst[0];
mDst[3] = isEven ? mFoldDrawHeight : bottomScaledPoint;
mDst[4] = (anchorPoint > (x + 1) * mFoldDrawWidth) ? anchorPoint
+ (x + 1 - midFold) * scaledWidth
: anchorPoint - (midFold - x - 1) * scaledWidth;
mDst[5] = isEven ? topScaledPoint : 0;
mDst[6] = mDst[4];
mDst[7] = isEven ? bottomScaledPoint : mFoldDrawHeight;
} else {
mDst[0] = isEven ? 0 : leftScaledPoint;
mDst[1] = (anchorPoint > x * mFoldDrawHeight) ? anchorPoint
+ (x - midFold) * scaledHeight : anchorPoint
- (midFold - x) * scaledHeight;
mDst[2] = isEven ? leftScaledPoint : 0;
mDst[3] = (anchorPoint > (x + 1) * mFoldDrawHeight) ? anchorPoint
+ (x + 1 - midFold) * scaledHeight
: anchorPoint - (midFold - x - 1) * scaledHeight;
mDst[4] = isEven ? mFoldDrawWidth : rightScaledPoint;
mDst[5] = mDst[1];
mDst[6] = isEven ? rightScaledPoint : mFoldDrawWidth;
mDst[7] = mDst[3];
}
/*
* Pixel fractions are present for odd number of folds which need to
* be rounded off here.
*/
for (int y = 0; y < 8; y++) {
mDst[y] = Math.round(mDst[y]);
}
/*
* If it so happens that any of the folds have reached a point where
* the width or height of that fold is 0, then nothing needs to be
* drawn onto the canvas because the view is essentially completely
* folded.
*/
if (mIsHorizontal) {
if (mDst[4] <= mDst[0] || mDst[6] <= mDst[2]) {
mShouldDraw = false;
return;
}
} else {
if (mDst[3] <= mDst[1] || mDst[7] <= mDst[5]) {
mShouldDraw = false;
return;
}
}
/* Sets the shadow and bitmap transformation matrices. */
mMatrix[x].setPolyToPoly(mSrc, 0, mDst, 0, NUM_OF_POLY_POINTS / 2);
}
/*
* The shadows on the folds are split into two parts: Solid shadows and
* gradients. Every other fold has a solid shadow which overlays the
* whole fold. Similarly, the folds in between these alternating folds
* also have an overlaying shadow. However, it is a gradient that takes
* up part of the fold as opposed to a solid shadow overlaying the whole
* fold.
*/
/* Solid shadow paint object. */
int alpha = (int) (mFoldFactor * 255 * SHADING_ALPHA);
mSolidShadow.setColor(Color.argb(alpha, 0, 0, 0));
if (mIsHorizontal) {
mShadowGradientMatrix.setScale(mFoldDrawWidth, 1);
mShadowLinearGradient.setLocalMatrix(mShadowGradientMatrix);
} else {
mShadowGradientMatrix.setScale(1, mFoldDrawHeight);
mShadowLinearGradient.setLocalMatrix(mShadowGradientMatrix);
}
mGradientShadow.setAlpha(alpha);
}
@Override
protected void dispatchDraw(Canvas canvas) {
/**
* If prepareFold has not been called or if preparation has not
* completed yet, then no custom drawing will take place so only need to
* invoke super's onDraw and return.
*/
if (!mIsFoldPrepared || mFoldFactor == 0) {
super.dispatchDraw(canvas);
return;
}
if (!mShouldDraw) {
return;
}
Rect src;
/*
* Draws the bitmaps and shadows on the canvas with the appropriate
* transformations.
*/
for (int x = 0; x < mNumberOfFolds; x++) {
src = mFoldRectArray[x];
/* The canvas is saved and restored for every individual fold */
canvas.save();
/*
* Concatenates the canvas with the transformation matrix for the
* the segment of the view corresponding to the actual image being
* displayed.
*/
canvas.concat(mMatrix[x]);
if (Util.IS_JBMR2) {
mDstRect.set(0, 0, src.width(), src.height());
canvas.drawBitmap(mFullBitmap, src, mDstRect, null);
} else {
/*
* The same transformation matrix is used for both the shadow
* and the image segment. The canvas is clipped to account for
* the size of each fold and is translated so they are drawn in
* the right place. The shadow is then drawn on top of the
* different folds using the sametransformation matrix.
*/
canvas.clipRect(0, 0, src.right - src.left, src.bottom
- src.top);
if (mIsHorizontal) {
canvas.translate(-src.left, 0);
} else {
canvas.translate(0, -src.top);
}
super.dispatchDraw(canvas);
if (mIsHorizontal) {
canvas.translate(src.left, 0);
} else {
canvas.translate(0, src.top);
}
}
/* Draws the shadows corresponding to this specific fold. */
if (x % 2 == 0) {
canvas.drawRect(0, 0, mFoldDrawWidth, mFoldDrawHeight,
mSolidShadow);
} else {
canvas.drawRect(0, 0, mFoldDrawWidth, mFoldDrawHeight,
mGradientShadow);
}
canvas.restore();
}
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/ChartProp.java
================================================
package com.cwp.chart;
import android.graphics.Color;
import android.util.Log;
import android.view.View;
public class ChartProp {
private int mId = 0;
private float mPercent = 1.0f;
private View mParent = null;
private int mColor = Color.WHITE;
private float mSweepAngle = 0f;
private String mName = "";
private String mName2 = "";
private float mStartAngle = 0f;
private float mEndAngle = 0f;
public ChartProp(View chartView) {
mParent = chartView;
}
public void setId(int id) {
mId = id;
}
public int getId() {
return mId;
}
/**
* the percent ,such as 0.5f,0.05f, NEIGHTER 50% NOR 50
*
* @param percent
*/
public void setPercent(float percent) {
// Log.e("caizh", "percent="+percent);
mPercent = percent;
mSweepAngle = percent * 360;
// invalidate();
}
public float getPercent() {
return mPercent;
}
public float getSweepAngle() {
return mSweepAngle;
}
public void setColor(int color) {
mColor = color;
// invalidate();
}
public int getColor() {
return mColor;
}
public String getName() {
return mName;
}
public void setName(String name) {
this.mName = name;
// invalidate();
}
public String getName2() {
return mName2;
}
public void setName2(String name) {
this.mName2 = name;
// invalidate();
}
private void invalidate() {
if (mParent != null) {
mParent.invalidate();
}
}
public float getStartAngle() {
return mStartAngle;
}
public void setStartAngle(float startAngle) {
this.mStartAngle = (startAngle);
}
public float getEndAngle() {
return mEndAngle;
}
public void setEndAngle(float endAngle) {
this.mEndAngle = (endAngle);
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/ChartPropChangeListener.java
================================================
package com.cwp.chart;
public interface ChartPropChangeListener {
public void getChartProp(ChartProp chartProp);
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/CheckAdapter.java
================================================
package com.cwp.chart;
import com.cwp.cmoneycharge.R;
import android.content.Context;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.CheckBox;
import android.widget.TextView;
public class CheckAdapter extends BaseAdapter {
private class ViewHolder {
public TextView name;
public CheckBox checkBox;
}
private String[] names;
private LayoutInflater mInflater;
private Context mContext;
private boolean[] checkedItem;
public CheckAdapter(Context context, String[] names, boolean[] checkedItem) {
this.names = names;
this.checkedItem = checkedItem;
this.mContext = context;
mInflater = (LayoutInflater) mContext
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
@Override
public int getCount() {
return names.length;
}
@Override
public Object getItem(int position) {
return names[position];
}
@Override
public long getItemId(int position) {
return position;
}
public View getItemView(int position) {
return lmap.get(position);
}
public boolean[] getCheckedItem() {
for (int i = 0; i < getCount(); i++) {
View view = this.getView(i, null, null);
CheckBox box = (CheckBox)view.findViewById(R.id.chk_selectone);
checkedItem[i] = box.isChecked();
}
return checkedItem;
}
SparseArray<View> lmap = new SparseArray<View>();
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder = null;
View view;
if (lmap.get(position) == null) {
view = mInflater.inflate(R.layout.dialog_multichoice_item, null);
holder = new ViewHolder();
holder.name = (TextView) view.findViewById(R.id.contact_name);
holder.checkBox = (CheckBox) view.findViewById(R.id.chk_selectone);
lmap.put(position, view);
if (names != null && names.length > 0) {
String name = (String) names[position];
holder.name.setText(name);
holder.checkBox.setChecked(checkedItem[position]);
}
view.setTag(holder);
} else {
view = lmap.get(position);
holder = (ViewHolder) view.getTag();
}
return view;
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/CustomMultiChoiceDialog.java
================================================
package com.cwp.chart;
import com.cwp.cmoneycharge.R;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
public class CustomMultiChoiceDialog extends Dialog {
public CustomMultiChoiceDialog(Context context) {
super(context);
}
public CustomMultiChoiceDialog(Context context, int theme) {
super(context, theme);
}
public static class Builder {
private Context context;
private String title;
private String message;
private String positiveButtonText;
private String negativeButtonText;
private View contentView;
private ListView listView;
private DialogInterface.OnClickListener positiveButtonClickListener;
private DialogInterface.OnClickListener negativeButtonClickListener;
private OnItemClickListener onItemClickListener;
private String[] items;
private boolean[] checkedItems;
private boolean showSelectAll;
private static boolean isMultiChoice = false;
public static String contact_name;
public Builder(Context context) {
this.context = context;
}
public Builder setMessage(String message) {
this.message = message;
return this;
}
public ListView getListView() {
return listView;
}
public boolean[] getCheckedItems() {
if (listView != null) {
CheckAdapter adapter = (CheckAdapter) listView.getAdapter();
checkedItems = adapter.getCheckedItem();
}
return checkedItems;
}
/**
* Set the Dialog message from resource
*
* @param title
* @return
*/
public Builder setMessage(int message) {
this.message = (String) context.getText(message);
return this;
}
/**
* Set the Dialog title from resource
*
* @param title
* @return
*/
public Builder setTitle(int title) {
this.title = (String) context.getText(title);
return this;
}
/**
* Set the Dialog title from String
*
* @param title
* @return
*/
public Builder setTitle(String title) {
this.title = title;
return this;
}
public Builder setContentView(View v) {
this.contentView = v;
return this;
}
/**
* Set the positive button resource and it's listener
*
* @param positiveButtonText
* @return
*/
public Builder setPositiveButton(int positiveButtonText,
DialogInterface.OnClickListener listener) {
this.positiveButtonText = (String) context
.getText(positiveButtonText);
this.positiveButtonClickListener = listener;
return this;
}
public Builder setPositiveButton(String positiveButtonText,
DialogInterface.OnClickListener listener) {
this.positiveButtonText = positiveButtonText;
this.positiveButtonClickListener = listener;
return this;
}
public Builder setNegativeButton(int negativeButtonText,
DialogInterface.OnClickListener listener) {
this.negativeButtonText = (String) context
.getText(negativeButtonText);
this.negativeButtonClickListener = listener;
return this;
}
public Builder setNegativeButton(String negativeButtonText,
DialogInterface.OnClickListener listener) {
this.negativeButtonText = negativeButtonText;
this.negativeButtonClickListener = listener;
return this;
}
/**
*
*
* @param items
* @param checkedItems
* @param onItemClickListener
* Listening the item click event.
* @param showSelectAll
* Whether to display the full checkbox.
* @return
*/
public Builder setMultiChoiceItems(boolean isMultiChoice,
String[] items, boolean[] checkedItems,
OnItemClickListener onItemClickListener, boolean showSelectAll) {
this.isMultiChoice = isMultiChoice;
this.items = items;
this.checkedItems = checkedItems;
this.onItemClickListener = onItemClickListener;
this.showSelectAll = showSelectAll;
return this;
}
public CustomMultiChoiceDialog create() {
LayoutInflater inflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
// instantiate the dialog with the custom Theme
final CustomMultiChoiceDialog dialog = new CustomMultiChoiceDialog(
context, R.style.Dialog);
View layout = inflater.inflate(R.layout.dialog_multichoice_layout,
null);
// set the dialog title
TextView multichoicTitle = (TextView) layout
.findViewById(R.id.multichoic_title);
multichoicTitle.setText(title);
ImageView checkAll = (ImageView) layout
.findViewById(R.id.chk_selectall);
LinearLayout dialog_bottom = (LinearLayout) layout
.findViewById(R.id.dialog_bottom);
Button positiveButton = (Button) layout
.findViewById(R.id.positiveButton);
Button negativeButton = (Button) layout
.findViewById(R.id.negativeButton);
listView = (ListView) layout.findViewById(R.id.multichoiceList);
dialog.addContentView(layout, new LayoutParams(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
// set the confirm button
if (positiveButtonText != null) {
positiveButton.setText(positiveButtonText);
if (positiveButtonClickListener != null) {
positiveButton
.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
positiveButtonClickListener.onClick(dialog,
DialogInterface.BUTTON_POSITIVE);
dialog.dismiss();
}
});
} else {
positiveButton
.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
dialog.dismiss();
}
});
}
} else {
// if no confirm button just set the visibility to GONE
positiveButton.setVisibility(View.GONE);
dialog_bottom.setVisibility(View.GONE);
}
// set the cancel button
if (negativeButtonText != null) {
negativeButton.setText(negativeButtonText);
if (negativeButtonClickListener != null) {
negativeButton
.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
negativeButtonClickListener.onClick(dialog,
DialogInterface.BUTTON_NEGATIVE);
dialog.dismiss();
}
});
} else {
negativeButton
.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
dialog.dismiss();
}
});
}
} else {
// if no confirm button just set the visibility to GONE
negativeButton.setVisibility(View.GONE);
}
// is the Multichoice(澶氶?妗?
if (isMultiChoice == true) {
final CheckAdapter checkAdapter = new CheckAdapter(context,
items, checkedItems);
listView.setAdapter(checkAdapter);
listView.setItemsCanFocus(true);
if (onItemClickListener != null) {
listView.setOnItemClickListener(onItemClickListener);
} else {
listView.setOnItemClickListener(new OnMultiItemClick());
}
// show the all selectButton or not
if (showSelectAll) {
// checkAll.setVisibility( View.VISIBLE);
// checkAll.setOnCheckedChangeListener(new
// OnCheckedChangeListener() {
//
// @Override
// public void onCheckedChanged(CompoundButton buttonView,
// boolean isChecked) {
// int count = listView.getAdapter().getCount();
// if (isChecked) {
// // update the status of all checkbox to checked
// if (count > 0) {
// for (int i = 0; i < count; i++) {
// CheckBox itemCheckBox = (CheckBox) listView
// .getAdapter()
// .getView(i, null, null)
// .findViewById(
// R.id.chk_selectone);
// itemCheckBox.setChecked(true);
// }
// }
// } else {
// // update the status of checkbox to unchecked
// if (count > 0) {
// for (int i = 0; i < count; i++) {
// CheckBox itemCheckBox = (CheckBox) listView
// .getAdapter()
// .getView(i, null, null)
// .findViewById(
// R.id.chk_selectone);
// itemCheckBox.setChecked(false);
// }
// }
// }
// }
// });
checkAll.setOnClickListener(new android.view.View.OnClickListener() {
@Override
public void onClick(View v) {
dialog.dismiss();
}
});
} else {
checkAll.setVisibility(View.GONE);
}
} else { // 如果是单选模式
final CheckAdapter checkAdapter = new CheckAdapter(context,
items, checkedItems);
listView.setAdapter(checkAdapter);
listView.setItemsCanFocus(true);
for (int i = 0; i < items.length; i++) { // 隐藏CheckBox
CheckBox itemCheckBox = (CheckBox) listView.getAdapter()
.getView(i, null, null)
.findViewById(R.id.chk_selectone);
itemCheckBox.setVisibility(View.GONE);
}
listView.setOnItemClickListener(onItemClickListener);
// show the all selectButton or not
if (showSelectAll) {
checkAll.setOnClickListener(new android.view.View.OnClickListener() {
@Override
public void onClick(View v) {
dialog.dismiss();
}
});
} else {
checkAll.setVisibility(View.GONE);
}
}
// set the content message
if (message != null) {
// ((TextView)layout.findViewById(R.id.message)).setText(message);
} else if (contentView != null) {
// if no message set add the contentView to the dialog body
((LinearLayout) layout.findViewById(R.id.content))
.removeAllViews();
((LinearLayout) layout.findViewById(R.id.content)).addView(
contentView, new LayoutParams(
LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));
}
dialog.setContentView(layout);
return dialog;
}
class OnMultiItemClick implements OnItemClickListener {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int positon, long arg3) {
CheckBox box = (CheckBox) view.findViewById(R.id.chk_selectone);
if (box.isChecked()) {
box.setChecked(false);
} else {
box.setChecked(true);
}
}
}
public static boolean getisMultiChoice() {
return isMultiChoice;
}
public static String getcontact_name() {
return contact_name;
}
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/FoldingLayout.java
================================================
/*
* Copyright (C) 2013 Priboi Tiberiu
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.cwp.chart;
import android.content.Context;
import android.util.AttributeSet;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
/**
* The folding layout where the number of folds, the anchor point and the
* orientation of the fold can be specified. Each of these parameters can be
* modified individually and updates and resets the fold to a default (unfolded)
* state. The fold factor varies between 0 (completely unfolded flat image) to
* 1.0 (completely folded, non-visible image).
*
* This layout throws an exception if there is more than one child added to the
* view. For more complicated view hierarchy's inside the folding layout, the
* views should all be nested inside 1 parent layout.
*
* This layout folds the contents of its child in real time. By applying matrix
* transformations when drawing to canvas, the contents of the child may change
* as the fold takes place. It is important to note that there are jagged edges
* about the perimeter of the layout as a result of applying transformations to
* a rectangle. This can be avoided by having the child of this layout wrap its
* content inside a 1 pixel transparent border. This will cause an anti-aliasing
* like effect and smoothen out the edges.
*
*/
public class FoldingLayout extends BaseFoldingLayout {
private final String FOLDING_VIEW_EXCEPTION_MESSAGE = "Folding Layout can only 1 child at "
+ "most";
private GestureDetector mScrollGestureDetector;
FoldingLayout that = null;
private int mTranslation = 0;
private int mParentPositionY = -1;
private int mTouchSlop = -1;
private boolean mDidNotStartScroll = true;
public FoldingLayout(Context context) {
super(context);
init(context, null);
that = this;
}
public FoldingLayout(Context context, AttributeSet attrs) {
super(context, attrs);
init(context, attrs);
that = this;
}
public FoldingLayout(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init(context, attrs);
that = this;
}
public void init(Context context, AttributeSet attrs) {
mScrollGestureDetector = new GestureDetector(context,
new ScrollGestureDetector());
mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
setAnchorFactor(0);
super.init(context, attrs);
}
@Override
protected boolean addViewInLayout(View child, int index,
LayoutParams params, boolean preventRequestLayout) {
throwCustomException(getChildCount());
boolean returnValue = super.addViewInLayout(child, index, params,
preventRequestLayout);
return returnValue;
}
/**
* The custom exception to be thrown so as to limit the number of views in
* this layout to at most one.
*/
private class NumberOfFoldingLayoutChildrenException extends
RuntimeException {
/**
*
*/
private static final long serialVersionUID = 1L;
public NumberOfFoldingLayoutChildrenException(String message) {
super(message);
}
}
/**
* Throws an exception if the number of views added to this layout exceeds
* one.
*/
private void throwCustomException(int numOfChildViews) {
if (numOfChildViews == 1) {
throw new NumberOfFoldingLayoutChildrenException(
FOLDING_VIEW_EXCEPTION_MESSAGE);
}
}
/** This class uses user touch events to fold and unfold the folding view. */
private class ScrollGestureDetector extends
GestureDetector.SimpleOnGestureListener {
@Override
public boolean onDown(MotionEvent e) {
mDidNotStartScroll = true;
return true;
}
/**
* All the logic here is used to determine by what factor the paper view
* should be folded in response to the user's touch events. The logic
* here uses vertical scrolling to fold a vertically oriented view and
* horizontal scrolling to fold a horizontally oriented fold. Depending
* on where the anchor point of the fold is, movements towards or away
* from the anchor point will either fold or unfold the paper
* respectively.
*
* The translation logic here also accounts for the touch slop when a
* new user touch begins, but before a scroll event is first invoked.
*/
@Override
public boolean onScroll(MotionEvent e1, MotionEvent e2,
float distanceX, float distanceY) {
int touchSlop = 0;
float factor;
if (mOrientation == Orientation.VERTICAL) {
factor = Math.abs((float) (mTranslation)
/ (float) (that.getHeight()));
if (e2.getY() - mParentPositionY <= that.getHeight()
&& e2.getY() - mParentPositionY >= 0) {
if ((e2.getY() - mParentPositionY) > that.getHeight()
* getAnchorFactor()) {
mTranslation -= (int) distanceY;
touchSlop = distanceY < 0 ? -mTouchSlop : mTouchSlop;
} else {
mTranslation += (int) distanceY;
touchSlop = distanceY < 0 ? mTouchSlop : -mTouchSlop;
}
mTranslation = mDidNotStartScroll ? mTranslation
+ touchSlop : mTranslation;
if (mTranslation < -that.getHeight()) {
mTranslation = -that.getHeight();
}
}
} else {
factor = Math.abs(((float) mTranslation)
/ ((float) that.getWidth()));
if (e2.getRawX() > that.getWidth() * getAnchorFactor()) {
mTranslation -= (int) distanceX;
touchSlop = distanceX < 0 ? -mTouchSlop : mTouchSlop;
} else {
mTranslation += (int) distanceX;
touchSlop = distanceX < 0 ? mTouchSlop : -mTouchSlop;
}
mTranslation = mDidNotStartScroll ? mTranslation + touchSlop
: mTranslation;
if (mTranslation < -that.getWidth()) {
mTranslation = -that.getWidth();
}
}
mDidNotStartScroll = false;
if (mTranslation > 0) {
mTranslation = 0;
}
that.setFoldFactor(factor);
return true;
}
}
@Override
public boolean onTouchEvent(MotionEvent me) {
return mScrollGestureDetector.onTouchEvent(me);
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/MenuFragment.java
================================================
package com.cwp.chart;
import com.cwp.cmoneycharge.PayChart;
import com.cwp.cmoneycharge.PayData;
import com.cwp.cmoneycharge.R;
import android.annotation.TargetApi;
import android.app.FragmentManager;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceFragment;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Toast;
/**
* menu fragment ,主要是用于显示menu菜单
*
* @author <a href="mailto:kris@krislq.com">Kris.lee</a>
* @since Mar 12, 2013
* @version 1.0.0
*/
public class MenuFragment extends PreferenceFragment implements
OnPreferenceClickListener {
int index = -1;
@Override
public void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setRetainInstance(true);
// set the preference xml to the content view
addPreferencesFromResource(R.xml.menu);
// add listener
findPreference("mpaychart").setOnPreferenceClickListener(this);
findPreference("mincomechart").setOnPreferenceClickListener(this);
findPreference("dpaychart").setOnPreferenceClickListener(this);
findPreference("dincomehart").setOnPreferenceClickListener(this);
// findPreference("comparechart").setOnPreferenceClickListener(this);
// findPreference("mincomechart").setOnPreferenceClickListener(this);
SystemBarTintManager mTintManager;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
setTranslucentStatus(true);
}
mTintManager = new SystemBarTintManager(getActivity());
mTintManager.setStatusBarTintEnabled(true);
mTintManager.setStatusBarTintResource(R.color.statusbar_bg);
}
@TargetApi(19)
protected void setTranslucentStatus(boolean on) {
Window win = getActivity().getWindow();
WindowManager.LayoutParams winParams = win.getAttributes();
final int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
if (on) {
winParams.flags |= bits;
} else {
winParams.flags &= ~bits;
}
win.setAttributes(winParams);
}
@Override
public boolean onPreferenceClick(Preference preference) {
String key = preference.getKey();
if ("mpaychart".equals(key)) {
Intent intentl = new Intent(getActivity(), PayChart.class);
intentl.putExtra("datatype", "pay");
intentl.putExtra("type", 0);
startActivity(intentl);
} else if ("mincomechart".equals(key)) {
Intent intentl = new Intent(getActivity(), PayChart.class);
intentl.putExtra("datatype", "income");
intentl.putExtra("type", 0);
startActivity(intentl);
} else if ("dpaychart".equals(key)) {
Intent intentp = new Intent(getActivity(), PayChart.class);
intentp.putExtra("datatype", "pay");
intentp.putExtra("type", 1);
startActivity(intentp);
} else if ("dincomehart".equals(key)) {
Intent intentp = new Intent(getActivity(), PayChart.class);
intentp.putExtra("datatype", "income");
intentp.putExtra("type", 1);
startActivity(intentp);
} else if ("comparechart".equals(key)) {
// Intent intentp = new Intent(getActivity(), PIData.class);
// intent.putExtra("cwp.id", userid);
// intentp.putExtra("datatype", "income");
// intentp.putExtra("type", 1);
// startActivity(intentp);
}
// anyway , show the sliding menu
// ((MainActivity) getActivity()).getSlidingMenu().toggle();
return false;
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/MyAdspter.java
================================================
package com.cwp.chart;
import java.util.List;
import java.util.Map;
import com.cwp.cmoneycharge.R;
import android.R.bool;
import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
public class MyAdspter extends BaseAdapter {
private List<Map<String, Object>> data;
private LayoutInflater layoutInflater;
private Context context;
private Boolean time;
private String textaddress;
public MyAdspter(Context context, List<Map<String, Object>> data,
Boolean time) {
this.context = context;
this.data = data;
this.layoutInflater = LayoutInflater.from(context);
this.time = time;
}
@Override
public int getCount() {
return data.size();
}
/**
* 获得某一位置的数据
*/
@Override
public Object getItem(int position) {
return data.get(position);
}
/**
* 获得唯一标识
*/
@Override
public long getItemId(int position) {
return position;
}
/**
* 组件集合,对应list.xml中的控件
*
* @author Administrator
*/
public final class Zujian {
public ImageView image;
public TextView no;
public TextView info;
public TextView title;
public TextView kind;
public TextView money;
public TextView address;
public RelativeLayout titlebar;
public TextView search_date;
public TextView search_date2;
public RelativeLayout search_img2;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
Zujian zujian = null;
if (convertView == null) {
zujian = new Zujian();
// 获得组件,实例化组件
convertView = layoutInflater.inflate(R.layout.list, null);
zujian.image = (ImageView) convertView
.findViewById(R.id.search_img);
zujian.no = (TextView) convertView.findViewById(R.id.no);
zujian.info = (TextView) convertView.findViewById(R.id.info);
zujian.title = (TextView) convertView.findViewById(R.id.title);
zujian.kind = (TextView) convertView.findViewById(R.id.kind);
zujian.money = (TextView) convertView.findViewById(R.id.money);
zujian.address = (TextView) convertView.findViewById(R.id.address);
zujian.search_date = (TextView) convertView
.findViewById(R.id.search_date);
zujian.search_date2 = (TextView) convertView
.findViewById(R.id.search_date2);
zujian.search_img2 = (RelativeLayout) convertView
.findViewById(R.id.search_img2);
zujian.titlebar = (RelativeLayout) convertView
.findViewById(R.id.titlebar);
convertView.setTag(zujian);
} else {
zujian = (Zujian) convertView.getTag();
}
// 绑定数据
zujian.image.setBackgroundResource((Integer) data.get(position).get(
"img"));
zujian.no.setText((String) data.get(position).get("no"));
zujian.title.setText((String) data.get(position).get("title"));
zujian.kind.setText((String) data.get(position).get("kind"));
zujian.money.setText((String) data.get(position).get("money"));
if (data.get(position).get("date") != null) {
zujian.search_img2.setVisibility(View.VISIBLE);
zujian.search_date
.setText(((String) data.get(position).get("info"))
.substring(8, 10));
zujian.search_date2
.setText((String) data.get(position).get("date"));
}
if (data.get(position).get("kind").toString().equals("[收入]")) {
zujian.money.setTextColor(Color.parseColor("#ffff0000"));
} else {
zujian.money.setTextColor(Color.parseColor("#5ea98d"));
}
if (time) {
zujian.titlebar.setVisibility(View.VISIBLE);
zujian.info.setText((String) data.get(position).get("info"));
textaddress = (String) data.get(position).get("address");
if (textaddress.indexOf("[") > -1) {
zujian.address.setText(textaddress.substring(0,
textaddress.indexOf("[")));
} else {
zujian.address.setText(textaddress);
}
} else {
zujian.titlebar.setVisibility(View.GONE);
}
return convertView;
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/MyButton.java
================================================
package com.cwp.chart;
import com.cwp.cmoneycharge.R;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Bitmap.Config;
import android.graphics.Paint.FontMetrics;
import android.text.style.BackgroundColorSpan;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
public class MyButton extends View implements View.OnTouchListener {
private String text = ">";
private Paint backgroundPaint;
private MyButtonClickListener listener;
private Bitmap bitmap;
private float width = 0;
private float height = 0;
public void setWidth(float width) {
this.width = width;
}
public void setHeight(float height) {
this.height = height;
}
public void setMyButtonClickListener(MyButtonClickListener listener) {
this.listener = listener;
}
public void setBackgroundPaintColor(int color) {
backgroundPaint.setColor(color);
invalidate();
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
if (width != 0) {
width = (float) PiewController.measureWidth(widthMeasureSpec);
}
if (height != 0) {
height = (float) PiewController.measureHeight(heightMeasureSpec);
}
setMeasuredDimension(100, 100);
}
@Override
public void draw(Canvas canvas) {
// TODO Auto-generated method stub
super.draw(canvas);
float Radius = getRadius();
bitmap = createBitmap(bitmap, Radius, Radius);
Paint paint = new Paint();
paint.setColor(Color.WHITE);
paint.setAntiAlias(true);
canvas.drawCircle(Radius, Radius, Radius, paint);
canvas.drawCircle(Radius, Radius, Radius * 4 / 5, backgroundPaint);
paint.setTextAlign(Paint.Align.CENTER);
paint.setTextSize(Radius * 5 / 3);
canvas.drawText(text, (Radius+Radius * 1 / 10),(Radius+Radius * 1 / 2), paint);
canvas.drawBitmap(bitmap, 0, 0, null);
}
public MyButton(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init();
}
public MyButton(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
public MyButton(Context context) {
super(context);
init();
}
private void init() {
this.setOnTouchListener(this);
backgroundPaint = new Paint();
backgroundPaint.setAntiAlias(true);
backgroundPaint.setColor(Color.RED);
bitmap = BitmapFactory.decodeResource(getResources(),
R.drawable.common_btn_pressed);
}
private float getRadius() {
int height = getHeight();
int width = getWidth();
if (height < width) {
return height / 2;
}
return width / 2;
}
@Override
public boolean onTouch(View v, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
// bitmap = BitmapFactory.decodeResource(getResources(),
// R.drawable.common_shine_btn_bg);
invalidate();
}
if (event.getAction() == MotionEvent.ACTION_UP) {
// bitmap = BitmapFactory.decodeResource(getResources(),
// R.drawable.common_btn_pressed);
invalidate();
if (listener != null) {
listener.onclick();
}
}
return true;
}
public Bitmap createBitmap(Bitmap b, float x, float y) {
int w = b.getWidth();
int h = b.getHeight();
float sx = (float) x / w;
float sy = (float) y / h;
Matrix matrix = new Matrix();
matrix.postScale(sx, sy);
Bitmap resizeBmp = Bitmap.createBitmap(b, 0, 0, w, h, matrix, true);
return resizeBmp;
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/MyButtonClickListener.java
================================================
package com.cwp.chart;
public interface MyButtonClickListener {
public void onclick();
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/OnFoldListener.java
================================================
/*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.cwp.chart;
/**
* This interface listens for when the folding layout begins folding (enters
* a folded state from a completely unfolded state), or ends folding (enters a
* completely unfolded state from a folded state).
*/
public interface OnFoldListener {
public void onStartFold(float foldFactor);
public void onFoldingState(float foldFactor, float foldDrawHeight);
public void onEndFold(float foldFactor);
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/PieChart.java
================================================
package com.cwp.chart;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.view.View.MeasureSpec;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.TextView;
public class PieChart extends ViewGroup {
public PieChart(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init();
}
public PieChart(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
public PieChart(Context context) {
super(context);
init();
}
private void init() {
}
private int m_measureWidth = 0;
private int m_measureHeight = 0;
/**
* 计算控件的大尿
*/
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
m_measureWidth = PiewController.measureWidth(widthMeasureSpec);
Log.e("caizh", "m_measureWidth=" + m_measureWidth);
m_measureHeight = PiewController.measureHeight(heightMeasureSpec);
// 计算自定义的ViewGroup中所有子控件的大尿
measureChildren(widthMeasureSpec, heightMeasureSpec);
// 设置自定义的控件MyViewGroup的大尿
setMeasuredDimension(m_measureWidth, m_measureHeight);
}
/**
* 覆写onLayout,其目的是为了指定视图的显示位置,方法执行的前后顺序是在onMeasure之后,因为视图肯定是只有知道大小的情况下_
* 才能确定怎么摆放
*/
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
// 记录总高庿
Log.e("caizh", "l=" + l);
// 遍历承?子视囿
int childCount = getChildCount();
for (int i = 0; i < childCount; i++) {
View childView = getChildAt(i);
// 获取在onMeasure中计算的视图尺寸
int measureHeight = childView.getMeasuredHeight();
int measuredWidth = childView.getMeasuredWidth();
if (childView.getTag().equals("pieButton")) {
childView.layout(
(m_measureWidth * 6 / 7 - m_measureWidth / 25),
(int) ((m_measureWidth * 19 / 16)) - m_measureWidth
/ 25,
(m_measureWidth * 6 / 7 + m_measureWidth / 25),
(int) ((m_measureWidth * 19 / 16)) + m_measureWidth
/ 25);
} else if (childView.getTag().equals("pieText")) {
TextView textView = (TextView) childView;
if (m_measureWidth == 680) {
textView.setTextSize(m_measureWidth / 30);
} else if (m_measureWidth == 1020) {
textView.setTextSize(m_measureWidth / 40);
} else {
textView.setTextSize(m_measureWidth / 30);
}
childView.layout((int) ((m_measureWidth - measuredWidth) / 2),
(int) ((m_measureWidth * 19 / 16)) - measureHeight / 2,
(int) ((m_measureWidth + measuredWidth) / 2),
(int) ((m_measureWidth * 19 / 16)) + measureHeight / 2);
} else {
// Log.e("caizh", "measuredWidth=" + measuredWidth);
childView.layout(0, 0, measuredWidth, measureHeight);
}
}
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/PieView.java
================================================
package com.cwp.chart;
import java.util.ArrayList;
import com.cwp.cmoneycharge.PayChart;
import com.cwp.cmoneycharge.R;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Point;
import android.graphics.RectF;
import android.graphics.Paint;
import android.graphics.Paint.FontMetrics;
import android.os.Handler;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.MeasureSpec;
public class PieView extends View implements View.OnTouchListener, Runnable {
private float m_x = 0;
private float m_y = 0;
private static ArrayList<ChartProp> mChartProps;
private float screenHight, screenWidth;// 屏幕的宽和高
private float radius;// 绘制圆的半径
private float startAngle;// 弿?角度
private float sweepAngle = 0.0f; // 扫过的角庿
private int itemCount;// 选项个数
private float startSpeed = 0;
private boolean firstEnter = true; // 程序是否已经逿?
private boolean rotateEnabled = false;
private boolean tounched = false;
private boolean done = false;
private Paint mPaint;
private Paint textPaint;
private Canvas mCanvas;
private ChartPropChangeListener listener;
private static ChartProp mChartProp = null;
private static ChartProp tChartProp = null;
private static float[] percents;
private Point centerPoint;
private Bitmap myBg;
private String amount;
private Thread myThread;
public void setBackgroundPaintColor(int color) {
invalidate();
}
private void writeLog(String string) {
Log.e("caizh", string);
}
public void destory() {
// myBg.recycle();
done = true;
}
@Override
public void draw(Canvas canvas) {
// TODO Auto-generated method stub
super.draw(canvas);
if (firstEnter) {
firstInit();
} else {
if (!tounched) {
float middleAngle = ((mChartProp.getEndAngle() + mChartProp
.getStartAngle()) / 2);
float distance = (middleAngle - getBorderAngle());
startAngle -= (distance / 2);
// startAngle=()
}
}
mCanvas = canvas;
float f1 = centerPoint.x;
float f2 = centerPoint.y;
// 填充背景艿
/*
* mCanvas.drawColor(0xff639EC3); mCanvas.save();
*/
// *********************************确定参逥?域*************************************
float f3 = f1 - radius;// X轿- 巿
float f4 = f2 - radius; // Y轿- 丿
float f5 = f1 + radius; // X轿- 叿
float f6 = f2 + radius; // Y轿- 丿
RectF rectF = new RectF(f3, f4, f5, f6);
// *********************************画每个区域的颜色坿********************************
drawItem(rectF);
// *********************************画边上渐变的圆环出来*******************************
drawableCenterCircle(f1, f2);
// 解锁Canvas,并渲染当前图像
if (!(mChartProp == tChartProp)) {
listener.getChartProp(mChartProp);
tChartProp = mChartProp;
}
}
public PieView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init();
}
public PieView(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
public PieView(Context context) {
super(context);
init();
}
private void init() {
myThread = new Thread(this);
// 创建丿?新的SurfaceHolder_并分配这个类作为它的回调(callback)
mChartProps = new ArrayList<ChartProp>();
// 图像画笔
mPaint = new Paint();
mPaint.setAntiAlias(true);
// 文字画笔
textPaint = new Paint();
textPaint.setTextSize(22);
textPaint.setColor(Color.WHITE);
textPaint.setAntiAlias(true);
// 半径
startAngle = 90f;
myBg = BitmapFactory.decodeResource(getResources(),
R.drawable.mask_piechartformymoney);
this.setOnTouchListener(this);
}
public void start() {
myThread.start();
}
@Override
public void run() {
while (!done) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (rotateEnabled) {
postInvalidate();
}
}
}
private Bitmap createBitmap(Bitmap b, float x, float y) {
int w = b.getWidth();
int h = b.getHeight();
float sx = (float) x / w;
float sy = (float) y / h;
Matrix matrix = new Matrix();
matrix.postScale(sx, sy);
Bitmap resizeBmp = Bitmap.createBitmap(b, 0, 0, w, h, matrix, true);
return resizeBmp;
}
/**
* create charts' property 创建饼状图的属濍
*
* @param chartsNum
* charts' number 饼状图的个数
* @return charts' property's list 饼状图属性的list
*/
public ArrayList<ChartProp> createCharts(int itemCount) {
this.itemCount = itemCount;
percents = new float[itemCount];
mChartProps.clear();
createChartProp(itemCount);
return mChartProps;
}
// 重新初始匿
public void reInit() {
startAngle = 90f;
firstEnter = true; // 程序是否已经逿?
}
// 第一次参数进行改变后的初始化调用
public void initPercents() {
for (int i = 0; i < itemCount; i++) {
percents[i] = mChartProps.get(i).getPercent();
mChartProps.get(i).setPercent(0.01f);
}
}
public void setChartPropChangeListener(ChartPropChangeListener listener) {
this.listener = listener;
}
/**
* actually create chartProp objects. 真正创建扇形属瀧?方泿
*
* @param chartsNum
* charts' number 饼状图的个数
*/
private void createChartProp(int chartsNum) {
for (int i = 0; i < chartsNum; i++) {
ChartProp chartProp = new ChartProp(this);
chartProp.setId(i);
mChartProps.add(chartProp);
}
}
public ChartProp createNullChartProp() {
mChartProps.clear();
ChartProp chartProp = new ChartProp(this);
mChartProps.add(chartProp);
return chartProp;
}
private void initResoure() {
float y = myBg.getHeight();
float x = myBg.getWidth();
float r;
if (screenHight > screenWidth) {
r = screenWidth;
myBg = createBitmap(myBg, screenWidth, (screenWidth * y) / x);
} else {
r = screenHight;
myBg = createBitmap(myBg, screenHight, (screenHight * y) / x);
}
centerPoint = new Point();
centerPoint.x = (int) (r / 2);
centerPoint.y = (int) ((r * 19) / 32);
radius = (centerPoint.x * 0.8843f);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
// 高度
screenHight = (float) PiewController.measureWidth(heightMeasureSpec);
screenWidth = (float) PiewController.measureHeight(widthMeasureSpec);
Log.e("caizh", "screenWidth01=" + screenWidth);
initResoure();
setMeasuredDimension((int) screenWidth, (int) screenHight);
}
private int measureWidth(int pWidthMeasureSpec) {
int result = 0;
int widthMode = MeasureSpec.getMode(pWidthMeasureSpec);// 得到模式
int widthSize = MeasureSpec.getSize(pWidthMeasureSpec);// 得到尺寸
switch (widthMode) {
/**
* mode共有三种情况,取值分别为MeasureSpec.UNSPECIFIED, MeasureSpec.EXACTLY,
* MeasureSpec.AT_MOST?
*
*
* MeasureSpec.EXACTLY是精确尺寸,
* 当我们将控件的layout_width或layout_height指定为具体数值时如andorid
* :layout_width="50dip",或者为FILL_PARENT是,都是控件大小已经确定的情况,都是精确尺寸?
*
*
* MeasureSpec.AT_MOST是最大尺寸,
* 当控件的layout_width或layout_height指定为WRAP_CONTENT旿
* ,控件大小一般随睿Χ件的子空间或内容进行变化,此时控件尺寸只要不超过父控件允许的朿?尺寸即可
* 。因此,此时的mode是AT_MOST,size给出了父控件允许的最大尺寸?
*
*
* MeasureSpec.UNSPECIFIED是未指定尺寸,这种情况不多,丿?都是父控件是AdapterView_
* 通过measure方法传入的模式?
*/
case MeasureSpec.AT_MOST:
case MeasureSpec.EXACTLY:
result = widthSize;
break;
}
return result;
}
private int measureHeight(int pHeightMeasureSpec) {
int result = 0;
int heightMode = MeasureSpec.getMode(pHeightMeasureSpec);
int heightSize = MeasureSpec.getSize(pHeightMeasureSpec);
switch (heightMode) {
case MeasureSpec.AT_MOST:
case MeasureSpec.EXACTLY:
result = heightSize;
break;
}
return result;
}
private void firstInit() {
startSpeed += 0.05f;
if (startSpeed >= 1) {
startSpeed = 0.9f;
}
float total = 0f;
if (!mChartProps.isEmpty()) {
for (int i = 0; i < itemCount; i++) {
if (i < mChartProps.size()) {
float percent = mChartProps.get(i).getPercent();
// writeLog("percent="+percent);
float distancePercent = (percents[i] - percent);
if (distancePercent < 0.0001) {
mChartProps.get(i).setPercent(percents[i]);
} else {
mChartProps.get(i).setPercent(
percent + (distancePercent * startSpeed));
}
total = total + mChartProps.get(i).getPercent();
}
}
}
if (total >= 1) {
firstEnter = false;
}
}
public void getCurrentChartProp(ChartProp chartProp, float f) {
if ((chartProp.getStartAngle() <= f) && (chartProp.getEndAngle() > f)) {
mChartProp = chartProp;
}
}
public void drawableCenterCircle(float x, float y) {
/*
* Paint centerCirclePaint = new Paint();
* centerCirclePaint.setColor(Color.BLACK);
*
* centerCirclePaint.setAlpha(150); mCanvas.drawCircle(x, y, radius / 3,
* centerCirclePaint);
*/
// Paint localPaint = new Paint();
// 设置取消锯齿效果
// localPaint.setAntiAlias(true);
// 风格为圆玿
/*
* localPaint.setStyle(Paint.Style.STROKE); // 圆环宽度
* localPaint.setStrokeWidth(circleRadius);
*/
// 圆环背景
mCanvas.drawBitmap(myBg, 0, 0, null);
mCanvas.save();
textPaint.setColor(Color.WHITE);
textPaint.setTextAlign(Paint.Align.CENTER);
textPaint.setTextSize(x / 10);
mCanvas.drawText("总计", x, y - x / 12, textPaint);
mCanvas.drawText(PayChart.getamount(), x, y + x / 10, textPaint); // 总计
mCanvas.save();
}
private float getBorderAngle() {
float borderAngle;
int circleCount = 0;
if (startAngle >= 0) {
circleCount = (int) (startAngle / 360);
if ((startAngle % 360) > (90)) {
borderAngle = (float) (90 + 360 * (circleCount + 1));
} else {
borderAngle = (float) (90 + 360 * circleCount);
}
} else {
circleCount = (int) (startAngle / 360);
if ((startAngle % 360) < (-270)) {
borderAngle = (float) (90 + 360 * (circleCount - 1));
} else {
borderAngle = (float) (90 + 360 * circleCount);
}
}
return borderAngle;
}
public ChartProp getCurrentChartProp() {
if (mChartProp != null) {
return mChartProp;
}
float temp = startAngle;
float borderAngle = getBorderAngle();
for (int i = 0; i < itemCount; i++) {
sweepAngle = mChartProps.get(i).getSweepAngle();
mChartProps.get(i).setStartAngle(temp);
temp += sweepAngle;
mChartProps.get(i).setEndAngle(temp);
getCurrentChartProp(mChartProps.get(i), borderAngle);
}
return mChartProp;
}
// *********************************画每个扇彿********************************
public void drawItem(RectF localRectf) {
float temp = startAngle;
float borderAngle = getBorderAngle();
// System.out.println("itemCount" + itemCount);
if (!mChartProps.isEmpty()) {
if (itemCount > 0) {
for (int i = 0; i < itemCount; i++) {
if (i < mChartProps.size()) {
mPaint.setColor(mChartProps.get(i).getColor());
// startAngle为每次移动的角度大小
sweepAngle = mChartProps.get(i).getSweepAngle();
mChartProps.get(i).setStartAngle(temp);
/*
* oval:圆弧所在的椭圆对象?startAngle:圆弧的起始角度。sweepAngle:圆弧的角度?
* useCenter:
* 是否显示半径连线,true表示显示圆弧与圆心的半径连线,false表示不显示?paint
* :绘制时承?用的画笔
*/
mCanvas.drawArc(localRectf, temp, sweepAngle, true,
mPaint);
// mCanvas.drawText(localRectf, temp, sweepAngle,
// mChartProps.get(i).getName());
mCanvas.save();
temp += sweepAngle;
mChartProps.get(i).setEndAngle(temp);
getCurrentChartProp(mChartProps.get(i), borderAngle);
}
}
}
}
}
public boolean isRotateEnabled() {
return rotateEnabled;
}
public void setRotateEnabled(boolean rotateEnabled) {
this.rotateEnabled = rotateEnabled;
}
public void rotateEnable() {
rotateEnabled = true;
}
public void rotateDisable() {
rotateEnabled = false;
}
@Override
public boolean onTouch(View v, MotionEvent event) {
boolean enable = true;
float x = centerPoint.x;
float y = centerPoint.y;
float y1 = event.getY();
float x1 = event.getX();
float x2 = v.getLeft();
float y2 = v.getTop();
float x3 = x1 - x2;
float y3 = y1 - y2;
if (event.getAction() == MotionEvent.ACTION_DOWN) {
m_x = x3;
m_y = y3;
tounched = true;
}
if (event.getAction() == MotionEvent.ACTION_UP) {
m_x = 0;
m_y = 0;
tounched = false;
}
float d = (float) Math.sqrt((Math.pow(Math.abs((x - x3)), 2) + Math
.pow(Math.abs((y - y3)), 2)));
if (d > radius) {
m_x = 0;
m_y = 0;
enable = false;
}
if (event.getAction() == MotionEvent.ACTION_MOVE) {
if ((m_x == 0) && (m_y == 0)) {
enable = false;
}
if (enable) {
float c = (float) Math
.sqrt((Math.pow(Math.abs((m_x - x3)), 2) + Math.pow(
Math.abs((m_y - y3)), 2)));
float a = (float) Math
.sqrt((Math.pow(Math.abs(m_x - x), 2) + Math.pow(
Math.abs((m_y - y)), 2)));
float b = (float) Math
.sqrt((Math.pow(Math.abs(x3 - x), 2) + Math.pow(
Math.abs((y3 - y)), 2)));
float cosc = (float) (Math.pow(a, 2) + Math.pow(b, 2) - Math
.pow(c, 2)) / (2 * a * b);
float m_angle = getAngle((m_x - x), (m_y - y));
float angle3 = getAngle((x3 - x), (y3 - y));
if ((90 > m_angle) && (angle3 > 270)) {
m_angle = m_angle + (float) 360;
}
if ((90 > angle3) && (m_angle > 270)) {
angle3 = angle3 + (float) 360;
}
if (angle3 - m_angle > 0) {
startAngle = (float) (startAngle + Math.acos(cosc) * 180
/ Math.PI);
} else {
startAngle = (float) (startAngle - Math.acos(cosc) * 180
/ Math.PI);
}
m_x = x3;
m_y = y3;
}
}
return true;
}
private float getAngle(float x, float y) {
if ((x == 0) && (y == 0)) {
return 0;
}
float angle = (float) (Math.atan(y / x) * 180 / Math.PI);
if (x == 0) {
if (y > 0) {
return 90;
} else {
return 270;
}
}
if (x > 0) {
if (y < 0) {
return (float) 360 + angle;
}
}
if (x < 0) {
if (y > 0) {
return (float) 180 + angle;
} else if (y == 0) {
return 180;
} else if (y < 0) {
return (float) 180 + angle;
}
}
return angle;
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/PiewController.java
================================================
package com.cwp.chart;
import android.view.View;
import android.view.View.MeasureSpec;
import android.view.ViewGroup.MarginLayoutParams;
import android.widget.FrameLayout;
import android.widget.RelativeLayout;
public class PiewController {
/*
* 获取控件宿
*/
public static int getWidth(View view) {
int w = View.MeasureSpec.makeMeasureSpec(0,
View.MeasureSpec.UNSPECIFIED);
int h = View.MeasureSpec.makeMeasureSpec(0,
View.MeasureSpec.UNSPECIFIED);
view.measure(w, h);
return (view.getMeasuredWidth());
}
/*
* 获取控件髿
*/
public static int getHeight(View view) {
int w = View.MeasureSpec.makeMeasureSpec(0,
View.MeasureSpec.UNSPECIFIED);
int h = View.MeasureSpec.makeMeasureSpec(0,
View.MeasureSpec.UNSPECIFIED);
view.measure(w, h);
return (view.getMeasuredHeight());
}
/*
* 设置控件承?的位置X,并且不改变宽高_X为绝对位置,此时Y可能彿
*/
public static void setLayoutX(View view, int x) {
MarginLayoutParams margin = new MarginLayoutParams(
view.getLayoutParams());
margin.setMargins(x, margin.topMargin, x + margin.width,
margin.bottomMargin);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
margin);
view.setLayoutParams(layoutParams);
}
/*
* 设置控件承?的位置Y,并且不改变宽高_Y为绝对位置,此时X可能彿
*/
public static void setLayoutY(View view, int y) {
MarginLayoutParams margin = new MarginLayoutParams(
view.getLayoutParams());
margin.setMargins(margin.leftMargin, y, margin.rightMargin, y
+ margin.height);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
margin);
view.setLayoutParams(layoutParams);
}
/*
* 设置控件承?的位置YY,并且不改变宽高_XY为绝对位罿
*/
public static void setLayout(View view, int x, int y) {
MarginLayoutParams margin = new MarginLayoutParams(
view.getLayoutParams());
margin.setMargins(x, y, x + margin.width, y + margin.height);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
margin);
view.setLayoutParams(layoutParams);
}
public static int measureWidth(int pWidthMeasureSpec) {
int result = 0;
int widthMode = MeasureSpec.getMode(pWidthMeasureSpec);// 得到模式
int widthSize = MeasureSpec.getSize(pWidthMeasureSpec);// 得到尺寸
switch (widthMode) {
/**
* mode共有三种情况,取值分别为MeasureSpec.UNSPECIFIED, MeasureSpec.EXACTLY,
* MeasureSpec.AT_MOST?
*
*
* MeasureSpec.EXACTLY是精确尺寸,
* 当我们将控件的layout_width或layout_height指定为具体数值时如andorid
* :layout_width="50dip",或者为FILL_PARENT是,都是控件大小已经确定的情况,都是精确尺寸?
*
*
* MeasureSpec.AT_MOST是最大尺寸,
* 当控件的layout_width或layout_height指定为WRAP_CONTENT旿
* ,控件大小一般随睿Χ件的子空间或内容进行变化,此时控件尺寸只要不超过父控件允许的朿?尺寸即可
* 。因此,此时的mode是AT_MOST,size给出了父控件允许的最大尺寸?
*
*
* MeasureSpec.UNSPECIFIED是未指定尺寸,这种情况不多,丿?都是父控件是AdapterView_
* 通过measure方法传入的模式?
*/
case MeasureSpec.AT_MOST:
case MeasureSpec.EXACTLY:
result = widthSize;
break;
}
return result;
}
public static int measureHeight(int pHeightMeasureSpec) {
int result = 0;
int heightMode = MeasureSpec.getMode(pHeightMeasureSpec);
int heightSize = MeasureSpec.getSize(pHeightMeasureSpec);
switch (heightMode) {
case MeasureSpec.AT_MOST:
case MeasureSpec.EXACTLY:
result = heightSize;
break;
}
return result;
}
public static void mySetMargins(View view, int left, int top, int right,
int bottom) {
FrameLayout.LayoutParams layoutParam = (FrameLayout.LayoutParams) view
.getLayoutParams();
layoutParam.setMargins(left, top, right, bottom);
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/PullToRefreshView.java
================================================
package com.cwp.chart;
import java.util.Date;
import com.cwp.cmoneycharge.FragmentPage3;
import com.cwp.cmoneycharge.R;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.LinearInterpolator;
import android.view.animation.RotateAnimation;
import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.ScrollView;
import android.widget.TextView;
/**
* @description自定义容器,盛放listview,gridview,scrollview
* @author 袁东卿
* @date 2014-7-21 下午5:56:00
*/
public class PullToRefreshView extends LinearLayout {
private static final String TAG = "PullToRefreshView";
// 刷新状濍
private static final int PULL_TO_REFRESH = 2;
private static final int RELEASE_TO_REFRESH = 3;
private static final int REFRESHING = 4;
// 拉动状濍
private static final int PULL_UP_STATE = 0;
private static final int PULL_DOWN_STATE = 1;
private boolean enablePullTorefresh = true;
private boolean enablePullLoadMoreDataStatus = true;
private int mLastMotionY;
private boolean mLock;
/**
* 头部view
*/
private View mHeaderView;
/**
* 底部view
*/
private View mFooterView;
private AdapterView<?> mAdapterView;
private ScrollView mScrollView;
/**
* 头部view的高
*/
private int mHeaderViewHeight;
/**
* 底部view的高
*/
private int mFooterViewHeight;
/**
* 头部箭头
*/
private ImageView mHeaderImageView;
/**
* 底部箭头
*/
private ImageView mFooterImageView;
/**
* 头部文字
*/
private TextView mHeaderTextView;
/**
* 底部文字
*/
private TextView mFooterTextView;
/**
* 头部刷新时间
*/
private TextView mHeaderUpdateTextView;
/**
* 底部刷新时间
*/
private TextView mFooterUpdateTextView;
/**
* 头部进度板
*/
private ProgressBar mHeaderProgressBar;
/**
* 底部进度板
*/
private ProgressBar mFooterProgressBar;
/**
* layout inflater
*/
private LayoutInflater mInflater;
/**
* 头部view的当前状怿
*/
private int mHeaderState;
/**
* 底部view的当前状怿
*/
private int mFooterState;
/**
* 拉动状濍
*/
private int mPullState;
/**
* 变为向下的箭夿改变箭头方向
*/
private RotateAnimation mFlipAnimation;
/**
* 变为逆向的箭夿旋转
*/
private RotateAnimation mReverseFlipAnimation;
/**
* 底部view的刷新监吿
*/
private OnFooterRefreshListener mOnFooterRefreshListener;
/**
* 头部view的刷新监吿
*/
private OnHeaderRefreshListener mOnHeaderRefreshListener;
/**
* 朿?更新时间
*/
private String mLastUpdateTime;
public PullToRefreshView(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
public PullToRefreshView(Context context) {
super(context);
init();
}
private void init() {
// Load all of the animations we need in code rather than through XML
mFlipAnimation = new RotateAnimation(0, -180,
RotateAnimation.RELATIVE_TO_SELF, 0.5f,
RotateAnimation.RELATIVE_TO_SELF, 0.5f);
mFlipAnimation.setInterpolator(new LinearInterpolator());
mFlipAnimation.setDuration(250);
mFlipAnimation.setFillAfter(true);
mReverseFlipAnimation = new RotateAnimation(-180, 0,
RotateAnimation.RELATIVE_TO_SELF, 0.5f,
RotateAnimation.RELATIVE_TO_SELF, 0.5f);
mReverseFlipAnimation.setInterpolator(new LinearInterpolator());
mReverseFlipAnimation.setDuration(250);
mReverseFlipAnimation.setFillAfter(true);
mInflater = LayoutInflater.from(getContext());
// header view 在此添加,保证是第丿?添加到linearlayout的最上端
addHeaderView();
}
private void addHeaderView() {
// header view
mHeaderView = mInflater.inflate(R.layout.refresh_header, this, false);
mHeaderImageView = (ImageView) mHeaderView
.findViewById(R.id.pull_to_refresh_image);
mHeaderTextView = (TextView) mHeaderView
.findViewById(R.id.pull_to_refresh_text);
mHeaderUpdateTextView = (TextView) mHeaderView
.findViewById(R.id.pull_to_refresh_updated_at);
// mHeaderProgressBar = (ProgressBar) mHeaderView
// .findViewById(R.id.pull_to_refresh_progress);
// header layout
measureView(mHeaderView);
mHeaderViewHeight = mHeaderView.getMeasuredHeight();
LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT,
mHeaderViewHeight);
// 设置topMargin的怤?负的header View高度,即将其隐藏在朿?斿
params.topMargin = -(mHeaderViewHeight);
// mHeaderView.setLayoutParams(params1);
addView(mHeaderView, params);
}
private void addFooterView() {
// footer view
mFooterView = mInflater.inflate(R.layout.refresh_footer, this, false);
mFooterImageView = (ImageView) mFooterView
.findViewById(R.id.pull_to_load_image);
mFooterTextView = (TextView) mFooterView
.findViewById(R.id.pull_to_load_text);
// mFooterProgressBar = (ProgressBar) mFooterView
// .findViewById(R.id.pull_to_load_progress);
// footer layout
measureView(mFooterView);
mFooterViewHeight = mFooterView.getMeasuredHeight();
LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT,
mFooterViewHeight);
// int top = getHeight();
// params.topMargin
// =getHeight();//在这里getHeight()==0,但在onInterceptTouchEvent()方法里getHeight()已经有怤?不再昿;
// getHeight()仿?时怤?赋倿稍急?研究一丿
// 由于是线性布屿?以直接添势只要AdapterView的高度是MATCH_PARENT,那么footer view就会被添加到朿?,并隐藿
addView(mFooterView, params);
}
@Override
protected void onFinishInflate() {
super.onFinishInflate();
// footer view 在此添加保证添加到linearlayout中的朿?
addFooterView();
initContentAdapterView();
}
private void initContentAdapterView() {
int count = getChildCount();
if (count < 3) {
Log.e(TAG, "子view的个数小亿----------------");
}
View view = null;
for (int i = 0; i < count - 1; ++i) {
view = getChildAt(i);
if (view instanceof AdapterView<?>) {
mAdapterView = (AdapterView<?>) view;
}
if (view instanceof ScrollView) {
// finish later
mScrollView = (ScrollView) view;
}
}
if (mAdapterView == null && mScrollView == null) {
Log.e(TAG, "view为空-------------------");
}
}
private void measureView(View child) {
ViewGroup.LayoutParams p = child.getLayoutParams();
if (p == null) {
p = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
}
int childWidthSpec = ViewGroup.getChildMeasureSpec(0, 0 + 0, p.width);
int lpHeight = p.height;
int childHeightSpec;
if (lpHeight > 0) {
childHeightSpec = MeasureSpec.makeMeasureSpec(lpHeight,
MeasureSpec.EXACTLY);
} else {
childHeightSpec = MeasureSpec.makeMeasureSpec(0,
MeasureSpec.UNSPECIFIED);
}
child.measure(childWidthSpec, childHeightSpec);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent e) {
int y = (int) e.getRawY();
switch (e.getAction()) {
case MotionEvent.ACTION_DOWN:
// 首先拦截down事件,记录y坐标
mLastMotionY = y;
break;
case MotionEvent.ACTION_MOVE:
// deltaY > 0 是向下运势< 0是向上运势
int deltaY = y - mLastMotionY;
if (isRefreshViewScroll(deltaY)) {
return true;
}
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:
break;
}
return false;
}
/*
* 如果在onInterceptTouchEvent()方法中没有拦房即onInterceptTouchEvent()方法丿return
* false)则由PullToRefreshView 的子View来处琿否则由下面的方法来处琿即由PullToRefreshView自己来处琿
*/
@Override
public boolean onTouchEvent(MotionEvent event) {
if (mLock) {
return true;
}
int y = (int) event.getRawY();
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
// onInterceptTouchEvent已经记录
// mLastMotionY = y;
break;
case MotionEvent.ACTION_MOVE:
int deltaY = y - mLastMotionY;
if (mPullState == PULL_DOWN_STATE) {
// PullToRefreshView执行下拉
// Log.i(TAG, " pull down!parent view move!");
headerPrepareToRefresh(deltaY);
// setHeaderPadding(-mHeaderViewHeight);
} else if (mPullState == PULL_UP_STATE) {
// PullToRefreshView执行上拉
// Log.i(TAG, "pull up!parent view move!");
footerPrepareToRefresh(deltaY);
}
mLastMotionY = y;
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:
int topMargin = getHeaderTopMargin();
if (mPullState == PULL_DOWN_STATE) {
if (topMargin >= 0) {
// 弿?刷新
headerRefreshing();
} else {
// 还没有执行刷新,重新隐藏
setHeaderTopMargin(-mHeaderViewHeight);
}
} else if (mPullState == PULL_UP_STATE) {
if (Math.abs(topMargin) >= mHeaderViewHeight
+ mFooterViewHeight) {
// 弿?执行footer 刷新
footerRefreshing();
} else {
// 还没有执行刷新,重新隐藏
setHeaderTopMargin(-mHeaderViewHeight);
}
}
break;
}
return super.onTouchEvent(event);
}
/**
* 是否应该到了父View,即PullToRefreshView滑动
*
* @param deltaY
* , deltaY > 0 是向下运势< 0是向上运势
* @return
*/
private boolean isRefreshViewScroll(int deltaY) {
if (mHeaderState == REFRESHING || mFooterState == REFRESHING) {
return false;
}
// 对于ListView和GridView
if (mAdapterView != null) {
// 子view(ListView or GridView)滑动到最顶端
if (deltaY > 0) {
// 判断是否禁用下拉刷新操作
if (!enablePullTorefresh) {
return false;
}
View child = mAdapterView.getChildAt(0);
if (child == null) {
// 如果mAdapterView中没有数捿不拦房
return false;
}
if (mAdapterView.getFirstVisiblePosition() == 0
&& child.getTop() == 0) {
mPullState = PULL_DOWN_STATE;
return true;
}
int top = child.getTop();
int padding = mAdapterView.getPaddingTop();
if (mAdapterView.getFirstVisiblePosition() == 0
&& Math.abs(top - padding) <= 11) {// 这里之前甿可以判断,但现在不衿还没找到原因
mPullState = PULL_DOWN_STATE;
return true;
}
} else if (deltaY < 0) {
// 判断是否禁用上拉加载更多操作
if (!enablePullLoadMoreDataStatus) {
return false;
}
View lastChild = mAdapterView.getChildAt(mAdapterView
.getChildCount() - 1);
if (lastChild == null) {
// 如果mAdapterView中没有数捿不拦房
return false;
}
// 朿?丿?子view的Bottom小于父View的高度说明mAdapterView的数据没有填满父view,
// 等于父View的高度说明mAdapterView已经滑动到最吿
if (lastChild.getBottom() <= getHeight()
&& mAdapterView.getLastVisiblePosition() == mAdapterView
.getCount() - 1) {
mPullState = PULL_UP_STATE;
return true;
}
}
}
// 对于ScrollView
if (mScrollView != null) {
// 子scroll view滑动到最顶端
View child = mScrollView.getChildAt(0);
if (deltaY > 0 && mScrollView.getScrollY() == 0) {
mPullState = PULL_DOWN_STATE;
return true;
} else if (deltaY < 0
&& child.getMeasuredHeight() <= getHeight()
+ mScrollView.getScrollY()) {
mPullState = PULL_UP_STATE;
return true;
}
}
return false;
}
/**
* header 准备刷新,手指移动过程,还没有释政
*
* @param deltaY
* ,手指滑动的距禿
*/
private void headerPrepareToRefresh(int deltaY) {
int newTopMargin = changingHeaderViewTopMargin(deltaY);
// 当header view的topMargin>=0时,说明已经完全显示出来亿修改header view 的提示状怿
if (newTopMargin >= 0 && mHeaderState != RELEASE_TO_REFRESH) {
mHeaderTextView.setText("放开切换到"
+ Integer.toString(FragmentPage3.getyear() + 1) + "年流水");
mHeaderUpdateTextView.setVisibility(View.VISIBLE);
mHeaderImageView.clearAnimation();
mHeaderImageView.startAnimation(mFlipAnimation);
mHeaderState = RELEASE_TO_REFRESH;
} else if (newTopMargin < 0 && newTopMargin > -mHeaderViewHeight) {// 拖动时没有释政
mHeaderImageView.clearAnimation();
mHeaderImageView.startAnimation(mFlipAnimation);
// mHeaderImageView.
mHeaderTextView.setText("下拉切换到"
+ Integer.toString(FragmentPage3.getyear() + 1) + "年流水");
mHeaderState = PULL_TO_REFRESH;
}
}
/**
* footer 准备刷新,手指移动过程,还没有释政移动footer view高度同样和移动header view
* 高度是一样,都是通过修改header view的topmargin的怦?达刿
*
* @param deltaY
* ,手指滑动的距禿
*/
private void footerPrepareToRefresh(int deltaY) {
int newTopMargin = changingHeaderViewTopMargin(deltaY);
// 如果header view topMargin 的绝对急?于或等于header + footer 的高庿
// 说明footer view 完全显示出来了,修改footer view 的提示状怿
if (Math.abs(newTopMargin) >= (mHeaderViewHeight + mFooterViewHeight)
&& mFooterState != RELEASE_TO_REFRESH) {
mFooterTextView.setText("放开切换到"
+ Integer.toString(FragmentPage3.getyear() - 1) + "年流水");
mFooterImageView.clearAnimation();
mFooterImageView.startAnimation(mFlipAnimation);
mFooterState = RELEASE_TO_REFRESH;
} else if (Math.abs(newTopMargin) < (mHeaderViewHeight + mFooterViewHeight)) {
mFooterImageView.clearAnimation();
mFooterImageView.startAnimation(mFlipAnimation);
mFooterTextView.setText("上拉切换到"
+ Integer.toString(FragmentPage3.getyear() - 1) + "年流水");
mFooterState = PULL_TO_REFRESH;
}
}
private int changingHeaderViewTopMargin(int deltaY) {
LayoutParams params = (LayoutParams) mHeaderView.getLayoutParams();
float newTopMargin = params.topMargin + deltaY * 0.3f;
// 这里对上拉做丿?限制,因为当前上拉后然后不释放手指直接下拉,会把下拉刷新给触发了,感谢网友yufengzungzhe的指凿
// 表示如果是在上拉后一段距禿然后直接下拉
if (deltaY > 0 && mPullState == PULL_UP_STATE
&& Math.abs(params.topMargin) <= mHeaderViewHeight) {
return params.topMargin;
}
// 同样圿对下拉做丿?限制,避免出现跟上拉操作时丿7的bug
if (deltaY < 0 && mPullState == PULL_DOWN_STATE
&& Math.abs(params.topMargin) >= mHeaderViewHeight) {
return params.topMargin;
}
params.topMargin = (int) newTopMargin;
mHeaderView.setLayoutParams(params);
invalidate();
return params.topMargin;
}
public void headerRefreshing() {
mHeaderState = REFRESHING;
setHeaderTopMargin(0);
mHeaderImageView.setVisibility(View.GONE);
mHeaderImageView.clearAnimation();
mHeaderImageView.setImageDrawable(null);
// mHeaderProgressBar.setVisibility(View.VISIBLE);
mHeaderTextView.setText(R.string.pull_to_refresh_refreshing_label);
if (mOnHeaderRefreshListener != null) {
mOnHeaderRefreshListener.onHeaderRefresh(this);
}
}
private void footerRefreshing() {
mFooterState = REFRESHING;
int top = mHeaderViewHeight + mFooterViewHeight;
setHeaderTopMargin(-top);
mFooterImageView.setVisibility(View.GONE);
mFooterImageView.clearAnimation();
mFooterImageView.setImageDrawable(null);
// mFooterProgressBar.setVisibility(View.VISIBLE);
mFooterTextView
.setText(R.string.pull_to_refresh_footer_refreshing_label);
if (mOnFooterRefreshListener != null) {
mOnFooterRefreshListener.onFooterRefresh(this);
}
}
/**
* 设置header view 的topMargin的忍
*/
private void setHeaderTopMargin(int topMargin) {
LayoutParams params = (LayoutParams) mHeaderView.getLayoutParams();
params.topMargin = topMargin;
mHeaderView.setLayoutParams(params);
invalidate();
}
/**
* header view 完成更新后恢复初始状怿
*
*/
public void onHeaderRefreshComplete() {
setHeaderTopMargin(-mHeaderViewHeight);
mHeaderImageView.setVisibility(View.VISIBLE);
mHeaderImageView.setImageResource(R.drawable.ic_pulltorefresh_arrow);
mHeaderTextView.setText(R.string.pull_to_refresh_pull_label);
// mHeaderProgressBar.setVisibility(View.GONE);
mHeaderState = PULL_TO_REFRESH;
setLastUpdated("朿?更新:" + new Date().toLocaleString());
}
public void onHeaderRefreshComplete(CharSequence lastUpdated) {
setLastUpdated(lastUpdated);
onHeaderRefreshComplete();
}
/**
* footer view 完成更新后恢复初始状怿
*/
public void onFooterRefreshComplete() {
setHeaderTopMargin(-mHeaderViewHeight);
mFooterImageView.setVisibility(View.VISIBLE);
mFooterImageView.setImageResource(R.drawable.ic_pulltorefresh_arrow_up);
mFooterTextView.setText(R.string.pull_to_refresh_footer_pull_label);
// mFooterProgressBar.setVisibility(View.GONE);
// mHeaderUpdateTextView.setText("");
mFooterState = PULL_TO_REFRESH;
}
/**
* footer view 完成更新后恢复初始状怿
*/
public void onFooterRefreshComplete(int size) {
if (size > 0) {
mFooterView.setVisibility(View.VISIBLE);
} else {
mFooterView.setVisibility(View.GONE);
}
setHeaderTopMargin(-mHeaderViewHeight);
mFooterImageView.setVisibility(View.VISIBLE);
mFooterImageView.setImageResource(R.drawable.ic_pulltorefresh_arrow_up);
mFooterTextView.setText(R.string.pull_to_refresh_footer_pull_label);
// mFooterProgressBar.setVisibility(View.GONE);
// mHeaderUpdateTextView.setText("");
mFooterState = PULL_TO_REFRESH;
}
public void setLastUpdated(CharSequence lastUpdated) {
if (lastUpdated != null) {
mHeaderUpdateTextView.setVisibility(View.VISIBLE);
mHeaderUpdateTextView.setText(lastUpdated);
} else {
mHeaderUpdateTextView.setVisibility(View.GONE);
}
}
private int getHeaderTopMargin() {
LayoutParams params = (LayoutParams) mHeaderView.getLayoutParams();
return params.topMargin;
}
// /**
// * lock
// */
// private void lock() {
// mLock = true;
// }
//
// /**
// * unlock
// *
// private void unlock() {
// mLock = false;
// }
/**
* @description
* @param headerRefreshListener
*/
public void setOnHeaderRefreshListener(
OnHeaderRefreshListener headerRefreshListener) {
mOnHeaderRefreshListener = headerRefreshListener;
}
public void setOnFooterRefreshListener(
OnFooterRefreshListener footerRefreshListener) {
mOnFooterRefreshListener = footerRefreshListener;
}
public interface OnFooterRefreshListener {
public void onFooterRefresh(PullToRefreshView view);
}
public interface OnHeaderRefreshListener {
public void onHeaderRefresh(PullToRefreshView view);
}
public boolean isEnablePullTorefresh() {
return enablePullTorefresh;
}
public void setEnablePullTorefresh(boolean enablePullTorefresh) {
this.enablePullTorefresh = enablePullTorefresh;
}
public boolean isEnablePullLoadMoreDataStatus() {
return enablePullLoadMoreDataStatus;
}
public void setEnablePullLoadMoreDataStatus(
boolean enablePullLoadMoreDataStatus) {
this.enablePullLoadMoreDataStatus = enablePullLoadMoreDataStatus;
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/RiseNumberBase.java
================================================
package com.cwp.chart;
public interface RiseNumberBase {
public void start();
public RiseNumberTextView withNumber(float number);
public RiseNumberTextView withNumber(int number);
public RiseNumberTextView setDuration(long duration);
public void setOnEnd(RiseNumberTextView.EndListener callback);
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/RiseNumberTextView.java
================================================
package com.cwp.chart;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.TextView;
import com.nineoldandroids.animation.ValueAnimator;
import java.text.DecimalFormat;
public class RiseNumberTextView extends TextView implements RiseNumberBase {
private static final int STOPPED = 0;
private static final int RUNNING = 1;
private int mPlayingState = STOPPED;
private float number;
private float fromNumber;
private long duration = 1500;
/**
* 1.int 2.float
*/
private int numberType = 2;
private DecimalFormat fnum;
private EndListener mEndListener = null;
final static int[] sizeTable = { 9, 99, 999, 9999, 99999, 999999, 9999999,
99999999, 999999999, Integer.MAX_VALUE };
public RiseNumberTextView(Context context) {
super(context);
}
public RiseNumberTextView(Context context, AttributeSet attr) {
super(context, attr);
}
public RiseNumberTextView(Context context, AttributeSet attr, int defStyle) {
super(context, attr, defStyle);
}
public interface EndListener {
public void onEndFinish();
}
public boolean isRunning() {
return (mPlayingState == RUNNING);
}
private void runFloat() {
ValueAnimator valueAnimator = ValueAnimator.ofFloat(fromNumber, number);
valueAnimator.setDuration(duration);
valueAnimator
.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator valueAnimator) {
setText(fnum.format(Float.parseFloat(valueAnimator
.getAnimatedValue().toString())));
if (valueAnimator.getAnimatedFraction() >= 1) {
mPlayingState = STOPPED;
if (mEndListener != null)
mEndListener.onEndFinish();
}
}
});
valueAnimator.start();
}
private void runInt() {
ValueAnimator valueAnimator = ValueAnimator.ofInt((int) fromNumber,
(int) number);
valueAnimator.setDuration(duration);
valueAnimator
.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator valueAnimator) {
setText(valueAnimator.getAnimatedValue().toString());
if (valueAnimator.getAnimatedFraction() >= 1) {
mPlayingState = STOPPED;
if (mEndListener != null)
mEndListener.onEndFinish();
}
}
});
valueAnimator.start();
}
static int sizeOfInt(int x) {
for (int i = 0;; i++)
if (x <= sizeTable[i])
return i + 1;
}
@Override
protected void onFinishInflate() {
super.onFinishInflate();
fnum = new DecimalFormat("##0.00");
}
@Override
public void start() {
if (!isRunning()) {
mPlayingState = RUNNING;
if (numberType == 1)
runInt();
else
runFloat();
}
}
@Override
public RiseNumberTextView withNumber(float number) {
this.number = number;
numberType = 2;
// if (number > 1000) {
// fromNumber = number
// - (float) Math.pow(10, sizeOfInt((int) number) - 2);
// } else {
// fromNumber = number / 2;
// }
fromNumber = 0;
return this;
}
@Override
public RiseNumberTextView withNumber(int number) {
this.number = number;
numberType = 1;
// if (number>1000){
// fromNumber=number-(float)Math.pow(10,sizeOfInt((int)number)-2);
// }else {
// fromNumber=number/2;
// }
fromNumber = 0;
return this;
}
@Override
public RiseNumberTextView setDuration(long duration) {
this.duration = duration;
return this;
}
@Override
public void setOnEnd(EndListener callback) {
mEndListener = callback;
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/SystemBarTintManager.java
================================================
/*
* Copyright (C) 2013 readyState Software Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.cwp.chart;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.FrameLayout.LayoutParams;
/**
* Class to manage status and navigation bar tint effects when using KitKat
* translucent system UI modes.
*
*/
public class SystemBarTintManager {
/**
* The default system bar tint color value.
*/
public static final int DEFAULT_TINT_COLOR = 0x99000000;
private final SystemBarConfig mConfig;
private boolean mStatusBarAvailable;
private boolean mNavBarAvailable;
private boolean mStatusBarTintEnabled;
private boolean mNavBarTintEnabled;
private View mStatusBarTintView;
private View mNavBarTintView;
private static boolean sIsMiuiV6;
static {
try {
Class<?> sysClass = Class.forName("android.os.SystemProperties");
Method getStringMethod = sysClass.getDeclaredMethod("get", String.class);
sIsMiuiV6 = "V6".equals((String) getStringMethod.invoke(sysClass, "ro.miui.ui.version.name"));
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* Constructor. Call this in the host activity onCreate method after its
* content view has been set. You should always create new instances when
* the host activity is recreated.
*
* @param activity The host activity.
*/
@TargetApi(19)
public SystemBarTintManager(Activity activity) {
Window win = activity.getWindow();
ViewGroup decorViewGroup = (ViewGroup) win.getDecorView();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
// check theme attrs
int[] attrs = {android.R.attr.windowTranslucentStatus,
android.R.attr.windowTranslucentNavigation};
TypedArray a = activity.obtainStyledAttributes(attrs);
try {
mStatusBarAvailable = a.getBoolean(0, false);
mNavBarAvailable = a.getBoolean(1, false);
} finally {
a.recycle();
}
// check window flags
WindowManager.LayoutParams winParams = win.getAttributes();
int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
if ((winParams.flags & bits) != 0) {
mStatusBarAvailable = true;
}
bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION;
if ((winParams.flags & bits) != 0) {
mNavBarAvailable = true;
}
}
mConfig = new SystemBarConfig(activity, mStatusBarAvailable, mNavBarAvailable);
// device might not have virtual navigation keys
if (!mConfig.hasNavigtionBar()) {
mNavBarAvailable = false;
}
if (mStatusBarAvailable) {
setupStatusBarView(activity, decorViewGroup);
}
if (mNavBarAvailable) {
setupNavBarView(activity, decorViewGroup);
}
}
/**
* Enable tinting of the system status bar.
*
* If the platform is running Jelly Bean or earlier, or translucent system
* UI modes have not been enabled in either the theme or via window flags,
* then this method does nothing.
*
* @param enabled True to enable tinting, false to disable it (default).
*/
public void setStatusBarTintEnabled(boolean enabled) {
mStatusBarTintEnabled = enabled;
if (mStatusBarAvailable) {
mStatusBarTintView.setVisibility(enabled ? View.VISIBLE : View.GONE);
}
}
/**
* set status bar darkmode
* @param darkmode
* @param activity
*/
public void setStatusBarDarkMode(boolean darkmode, Activity activity) {
if (sIsMiuiV6) {
Class<? extends Window> clazz = activity.getWindow().getClass();
try {
int darkModeFlag = 0;
Class<?> layoutParams = Class.forName("android.view.MiuiWindowManager$LayoutParams");
Field field = layoutParams.getField("EXTRA_FLAG_STATUS_BAR_DARK_MODE");
darkModeFlag = field.getInt(layoutParams);
Method extraFlagField = clazz.getMethod("setExtraFlags", int.class, int.class);
extraFlagField.invoke(activity.getWindow(), darkmode ? darkModeFlag : 0, darkModeFlag);
} catch (Exception e) {
e.printStackTrace();
}
}
}
/**
* Enable tinting of the system navigation bar.
*
* If the platform does not have soft navigation keys, is running Jelly Bean
* or earlier, or translucent system UI modes have not been enabled in either
* the theme or via window flags, then this method does nothing.
*
* @param enabled True to enable tinting, false to disable it (default).
*/
public void setNavigationBarTintEnabled(boolean enabled) {
mNavBarTintEnabled = enabled;
if (mNavBarAvailable) {
mNavBarTintView.setVisibility(enabled ? View.VISIBLE : View.GONE);
}
}
/**
* Apply the specified color tint to all system UI bars.
*
* @param color The color of the background tint.
*/
public void setTintColor(int color) {
setStatusBarTintColor(color);
setNavigationBarTintColor(color);
}
/**
* Apply the specified drawable or color resource to all system UI bars.
*
* @param res The identifier of the resource.
*/
public void setTintResource(int res) {
setStatusBarTintResource(res);
setNavigationBarTintResource(res);
}
/**
* Apply the specified drawable to all system UI bars.
*
* @param drawable The drawable to use as the background, or null to remove it.
*/
public void setTintDrawable(Drawable drawable) {
setStatusBarTintDrawable(drawable);
setNavigationBarTintDrawable(drawable);
}
/**
* Apply the specified alpha to all system UI bars.
*
* @param alpha The alpha to use
*/
public void setTintAlpha(float alpha) {
setStatusBarAlpha(alpha);
setNavigationBarAlpha(alpha);
}
/**
* Apply the specified color tint to the system status bar.
*
* @param color The color of the background tint.
*/
public void setStatusBarTintColor(int color) {
if (mStatusBarAvailable) {
mStatusBarTintView.setBackgroundColor(color);
}
}
/**
* Apply the specified drawable or color resource to the system status bar.
*
* @param res The identifier of the resource.
*/
public void setStatusBarTintResource(int res) {
if (mStatusBarAvailable) {
mStatusBarTintView.setBackgroundResource(res);
}
}
/**
* Apply the specified drawable to the system status bar.
*
* @param drawable The drawable to use as the background, or null to remove it.
*/
@SuppressWarnings("deprecation")
public void setStatusBarTintDrawable(Drawable drawable) {
if (mStatusBarAvailable) {
mStatusBarTintView.setBackgroundDrawable(drawable);
}
}
/**
* Apply the specified alpha to the system status bar.
*
* @param alpha The alpha to use
*/
@TargetApi(11)
public void setStatusBarAlpha(float alpha) {
if (mStatusBarAvailable && Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
mStatusBarTintView.setAlpha(alpha);
}
}
/**
* Apply the specified color tint to the system navigation bar.
*
* @param color The color of the background tint.
*/
public void setNavigationBarTintColor(int color) {
if (mNavBarAvailable) {
mNavBarTintView.setBackgroundColor(color);
}
}
/**
* Apply the specified drawable or color resource to the system navigation bar.
*
* @param res The identifier of the resource.
*/
public void setNavigationBarTintResource(int res) {
if (mNavBarAvailable) {
mNavBarTintView.setBackgroundResource(res);
}
}
/**
* Apply the specified drawable to the system navigation bar.
*
* @param drawable The drawable to use as the background, or null to remove it.
*/
@SuppressWarnings("deprecation")
public void setNavigationBarTintDrawable(Drawable drawable) {
if (mNavBarAvailable) {
mNavBarTintView.setBackgroundDrawable(drawable);
}
}
/**
* Apply the specified alpha to the system navigation bar.
*
* @param alpha The alpha to use
*/
@TargetApi(11)
public void setNavigationBarAlpha(float alpha) {
if (mNavBarAvailable && Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
mNavBarTintView.setAlpha(alpha);
}
}
/**
* Get the system bar configuration.
*
* @return The system bar configuration for the current device configuration.
*/
public SystemBarConfig getConfig() {
return mConfig;
}
/**
* Is tinting enabled for the system status bar?
*
* @return True if enabled, False otherwise.
*/
public boolean isStatusBarTintEnabled() {
return mStatusBarTintEnabled;
}
/**
* Is tinting enabled for the system navigation bar?
*
* @return True if enabled, False otherwise.
*/
public boolean isNavBarTintEnabled() {
return mNavBarTintEnabled;
}
private void setupStatusBarView(Context context, ViewGroup decorViewGroup) {
mStatusBarTintView = new View(context);
LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, mConfig.getStatusBarHeight());
params.gravity = Gravity.TOP;
if (mNavBarAvailable && !mConfig.isNavigationAtBottom()) {
params.rightMargin = mConfig.getNavigationBarWidth();
}
mStatusBarTintView.setLayoutParams(params);
mStatusBarTintView.setBackgroundColor(DEFAULT_TINT_COLOR);
mStatusBarTintView.setVisibility(View.GONE);
decorViewGroup.addView(mStatusBarTintView);
}
private void setupNavBarView(Context context, ViewGroup decorViewGroup) {
mNavBarTintView = new View(context);
LayoutParams params;
if (mConfig.isNavigationAtBottom()) {
params = new LayoutParams(LayoutParams.MATCH_PARENT, mConfig.getNavigationBarHeight());
params.gravity = Gravity.BOTTOM;
} else {
params = new LayoutParams(mConfig.getNavigationBarWidth(), LayoutParams.MATCH_PARENT);
params.gravity = Gravity.RIGHT;
}
mNavBarTintView.setLayoutParams(params);
mNavBarTintView.setBackgroundColor(DEFAULT_TINT_COLOR);
mNavBarTintView.setVisibility(View.GONE);
decorViewGroup.addView(mNavBarTintView);
}
/**
* Class which describes system bar sizing and other characteristics for the current
* device configuration.
*
*/
public static class SystemBarConfig {
private static final String STATUS_BAR_HEIGHT_RES_NAME = "status_bar_height";
private static final String NAV_BAR_HEIGHT_RES_NAME = "navigation_bar_height";
private static final String NAV_BAR_HEIGHT_LANDSCAPE_RES_NAME = "navigation_bar_height_landscape";
private static final String NAV_BAR_WIDTH_RES_NAME = "navigation_bar_width";
private final boolean mTranslucentStatusBar;
private final boolean mTranslucentNavBar;
private final int mStatusBarHeight;
private final int mActionBarHeight;
private final boolean mHasNavigationBar;
private final int mNavigationBarHeight;
private final int mNavigationBarWidth;
private final boolean mInPortrait;
private final float mSmallestWidthDp;
private SystemBarConfig(Activity activity, boolean translucentStatusBar, boolean traslucentNavBar) {
Resources res = activity.getResources();
mInPortrait = (res.getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT);
mSmallestWidthDp = getSmallestWidthDp(activity);
mStatusBarHeight = getInternalDimensionSize(res, STATUS_BAR_HEIGHT_RES_NAME);
mActionBarHeight = getActionBarHeight(activity);
mNavigationBarHeight = getNavigationBarHeight(activity);
mNavigationBarWidth = getNavigationBarWidth(activity);
mHasNavigationBar = (mNavigationBarHeight > 0);
mTranslucentStatusBar = translucentStatusBar;
mTranslucentNavBar = traslucentNavBar;
}
@TargetApi(14)
private int getActionBarHeight(Context context) {
int result = 0;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
TypedValue tv = new TypedValue();
context.getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true);
result = context.getResources().getDimensionPixelSize(tv.resourceId);
}
return result;
}
@TargetApi(14)
private int getNavigationBarHeight(Context context) {
Resources res = context.getResources();
int result = 0;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
if (!ViewConfiguration.get(context).hasPermanentMenuKey()) {
String key;
if (mInPortrait) {
key = NAV_BAR_HEIGHT_RES_NAME;
} else {
key = NAV_BAR_HEIGHT_LANDSCAPE_RES_NAME;
}
return getInternalDimensionSize(res, key);
}
}
return result;
}
@TargetApi(14)
private int getNavigationBarWidth(Context context) {
Resources res = context.getResources();
int result = 0;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
if (!ViewConfiguration.get(context).hasPermanentMenuKey()) {
return getInternalDimensionSize(res, NAV_BAR_WIDTH_RES_NAME);
}
}
return result;
}
private int getInternalDimensionSize(Resources res, String key) {
int result = 0;
int resourceId = res.getIdentifier(key, "dimen", "android");
if (resourceId > 0) {
result = res.getDimensionPixelSize(resourceId);
}
return result;
}
@SuppressLint("NewApi")
private float getSmallestWidthDp(Activity activity) {
DisplayMetrics metrics = new DisplayMetrics();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
activity.getWindowManager().getDefaultDisplay().getRealMetrics(metrics);
} else {
// TODO this is not correct, but we don't really care pre-kitkat
activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
}
float widthDp = metrics.widthPixels / metrics.density;
float heightDp = metrics.heightPixels / metrics.density;
return Math.min(widthDp, heightDp);
}
/**
* Should a navigation bar appear at the bottom of the screen in the current
* device configuration? A navigation bar may appear on the right side of
* the screen in certain configurations.
*
* @return True if navigation should appear at the bottom of the screen, False otherwise.
*/
public boolean isNavigationAtBottom() {
return (mSmallestWidthDp >= 600 || mInPortrait);
}
/**
* Get the height of the system status bar.
*
* @return The height of the status bar (in pixels).
*/
public int getStatusBarHeight() {
return mStatusBarHeight;
}
/**
* Get the height of the action bar.
*
* @return The height of the action bar (in pixels).
*/
public int getActionBarHeight() {
return mActionBarHeight;
}
/**
* Does this device have a system navigation bar?
*
* @return True if this device uses soft key navigation, False otherwise.
*/
public boolean hasNavigtionBar() {
return mHasNavigationBar;
}
/**
* Get the height of the system navigation bar.
*
* @return The height of the navigation bar (in pixels). If the device does not have
* soft navigation keys, this will always return 0.
*/
public int getNavigationBarHeight() {
return mNavigationBarHeight;
}
/**
* Get the width of the system navigation bar when it is placed vertically on the screen.
*
* @return The width of the navigation bar (in pixels). If the device does not have
* soft navigation keys, this will always return 0.
*/
public int getNavigationBarWidth() {
return mNavigationBarWidth;
}
/**
* Get the layout inset for any system UI that appears at the top of the screen.
*
* @param withActionBar True to include the height of the action bar, False otherwise.
* @return The layout inset (in pixels).
*/
public int getPixelInsetTop(boolean withActionBar) {
return (mTranslucentStatusBar ? mStatusBarHeight : 0) + (withActionBar ? mActionBarHeight : 0);
}
/**
* Get the layout inset for any system UI that appears at the bottom of the screen.
*
* @return The layout inset (in pixels).
*/
public int getPixelInsetBottom() {
if (mTranslucentNavBar && isNavigationAtBottom()) {
return mNavigationBarHeight;
} else {
return 0;
}
}
/**
* Get the layout inset for any system UI that appears at the right of the screen.
*
* @return The layout inset (in pixels).
*/
public int getPixelInsetRight() {
if (mTranslucentNavBar && !isNavigationAtBottom()) {
return mNavigationBarWidth;
} else {
return 0;
}
}
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/Util.java
================================================
package com.cwp.chart;
import android.os.Build;
public class Util {
static final boolean IS_JBMR2 = Build.VERSION.SDK_INT == Build.VERSION_CODES.JELLY_BEAN_MR2;
static final boolean IS_ISC = Build.VERSION.SDK_INT == Build.VERSION_CODES.ICE_CREAM_SANDWICH;
static final boolean IS_GINGERBREAD_MR1 = Build.VERSION.SDK_INT == Build.VERSION_CODES.GINGERBREAD_MR1;
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/About.java
================================================
package com.cwp.cmoneycharge;
import com.cwp.chart.SystemBarTintManager;
import com.cwp.pattern.GuideGesturePasswordActivity;
import com.cwp.pattern.UnlockGesturePasswordActivity;
import com.cwp.pattern.UpdateManager;
import com.umeng.fb.example.CustomActivity;
import cwp.moneycharge.dao.AccountDAO;
import cwp.moneycharge.dao.IncomeDAO;
import cwp.moneycharge.dao.ItypeDAO;
import cwp.moneycharge.dao.NoteDAO;
import cwp.moneycharge.dao.PayDAO;
import cwp.moneycharge.dao.PtypeDAO;
import cwp.moneycharge.model.ActivityManager;
import cwp.moneycharge.model.CustomDialog;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Build;
import android.os.Bundle;
import android.os.StrictMode;
import android.preference.PreferenceManager;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.view.View.OnFocusChangeListener;
import android.widget.TableRow;
import android.widget.TextView;
import android.widget.Toast;
public class About extends Activity {
TextView usernow, countuser, countpay, countincome, sendlog, gesturepw,
gesturepwmdtext, gesturepwcleartext;
TableRow author, description, gesturepwmd;
Intent intentr;
int userid;
AccountDAO accountDAO = new AccountDAO(About.this);
PayDAO payDAO = new PayDAO(About.this);
IncomeDAO incomeDAO = new IncomeDAO(About.this);
NoteDAO noteDAO = new NoteDAO(About.this);
static SharedPreferences sp;
Editor edit;
private final int REQUESTCODE = 1; // 返回的结果码
private TextView app_version;
private TextView updateapp;
private TextView feedback;
public About() {
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.about);
SysApplication.getInstance().addActivity(this); // 在销毁队列中添加this
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
setTranslucentStatus(true);
findViewById(R.id.about_top).setVisibility(View.VISIBLE);
}
SystemBarTintManager mTintManager = new SystemBarTintManager(this);
mTintManager.setStatusBarTintEnabled(true);
mTintManager.setStatusBarTintResource(R.color.statusbar_bg);
usernow = (TextView) findViewById(R.id.useracc);
countpay = (TextView) findViewById(R.id.countpay);
countuser = (TextView) findViewById(R.id.countuser);
countincome = (TextView) findViewById(R.id.countincome);
description = (TableRow) findViewById(R.id.description);
sendlog = (TextView) findViewById(R.id.sendlog);
gesturepw = (TextView) findViewById(R.id.gesturepw);
gesturepwmd = (TableRow) findViewById(R.id.gesturepwmd);
gesturepwmdtext = (TextView) findViewById(R.id.gesturepwmdtext);
app_version = (TextView) findViewById(R.id.app_version);
updateapp = (TextView) findViewById(R.id.updateapp);
feedback = (TextView) findViewById(R.id.feedback);
sp = this.getSharedPreferences("preferences", MODE_WORLD_READABLE);
edit = sp.edit();
}
@TargetApi(19)
private void setTranslucentStatus(boolean on) {
Window win = getWindow();
WindowManager.LayoutParams winParams = win.getAttributes();
final int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
if (on) {
winParams.flags |= bits;
} else {
winParams.flags &= ~bits;
}
win.setAttributes(winParams);
}
@Override
protected void onStart() {
super.onStart();
intentr = getIntent();
userid = intentr.getIntExtra("cwp.id", 100000001);
if (userid == 100000001)
usernow.setText("默认用户");
else {
usernow.setText(accountDAO.find(userid));
}
app_version.setText(getVersion(this));
feedback.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(About.this, CustomActivity.class);
// intent.putExtra("cwp.md", "md");
startActivity(intent);
}
});
updateapp.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
UpdateManager manager = new UpdateManager(About.this);
// 检查软件更新
manager.checkUpdate("show");
}
});
class OnClickListenermd implements OnClickListener { // 修改密码
@Override
public void onClick(View v) {
Intent intent = new Intent(About.this,
UnlockGesturePasswordActivity.class);
intent.putExtra("cwp.md", "md");
startActivity(intent);
}
}
if (sp.getString("gesturepw", "").equals("关")
|| sp.getString("gesturepw", "").equals("")) {
gesturepw.setText("关");
} else {
gesturepw.setText("开");
gesturepwmd.setVisibility(View.VISIBLE);
if (CrashApplication.getInstance().getLockPatternUtils()
.savedPatternExists()) {
gesturepwmd.setOnClickListener(new OnClickListenermd()); // 修改密码
}
}
if (sp.getString("sendlog", "").equals("关")
|| sp.getString("sendlog", "").equals("")) {
sendlog.setText("关");
} else {
sendlog.setText("开");
}
countuser.setText(String.valueOf(accountDAO.getCount()));
countpay.setText(String.valueOf(payDAO.getCount(userid)));
countincome.setText(String.valueOf(incomeDAO.getCount(userid)));
gesturepw.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
CustomDialog.Builder customBuilder = new CustomDialog.Builder(
About.this);
customBuilder.setTitle("提示"); // 创建标题
customBuilder
.setMessage("是否开启/关闭手势密码?\n注意:关闭手势密码需输入原密码!")
.setPositiveButton("开启",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int which) {
dialog.dismiss();
if (!sp.getString("gesturepw", "")
.equals("开")) {
Intent intent = new Intent(
About.this,
UnlockGesturePasswordActivity.class);
intent.putExtra("cwp.pwenable",
"enable");
startActivityForResult(intent,
REQUESTCODE); // 表示可以返回结果
}
}
})
.setNegativeButton("关闭",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int which) {
dialog.dismiss();
Intent intent = new Intent(
About.this,
UnlockGesturePasswordActivity.class);
intent.putExtra("cwp.pwclear", "clear");
startActivityForResult(intent,
REQUESTCODE); // 表示可以返回结果
}
});
Dialog dialog = customBuilder.create();// 创建对话框
dialog.show(); // 显示对话框
}
});
sendlog.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
CustomDialog.Builder customBuilder = new CustomDialog.Builder(
About.this);
customBuilder.setTitle("提示"); // 创建标题
customBuilder
.setMessage("是否开启/关闭发送错误日志功能?\n注意:需退出程序重新进入完成初始化!")
.setPositiveButton("开启",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int which) {
edit.putString("sendlog", "开");
edit.commit();
sendlog.setText("开");
dialog.dismiss();
}
})
.setNegativeButton("关闭",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int which) {
edit.putString("sendlog", "关");
edit.commit();
sendlog.setText("关");
dialog.dismiss();
}
});
Dialog dialog = customBuilder.create();// 创建对话框
dialog.show(); // 显示对话框
}
});
description.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Intent intent = new Intent(About.this, Description.class);
intent.putExtra("cwp.id", userid);
startActivity(intent);
}
});
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// TODO Auto-generated method stub
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == REQUESTCODE) {
if (resultCode == 2) {
edit.putString("gesturepw", "关");
edit.commit();
gesturepw.setText("关");
gesturepwmd.setVisibility(View.GONE);
}
if (resultCode == 3) {
edit.putString("gesturepw", "开");
edit.commit();
gesturepw.setText("开");
gesturepwmd.setVisibility(View.VISIBLE);
}
} else {
Toast.makeText(About.this, "操作失败!", Toast.LENGTH_LONG).show();
}
}
public static String getVersion(Context context)// 获取版本号
{
try {
PackageInfo pi = context.getPackageManager().getPackageInfo(
context.getPackageName(), 0);
return pi.versionName;
} catch (NameNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return "beta 1.0";
}
}
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) { // 监控/拦截/屏蔽返回键
Intent intent = new Intent(About.this, MainActivity.class);
intent.putExtra("cwp.id", userid);
intent.putExtra("cwp.Fragment", "4");// 设置传递数据
startActivity(intent);
return true;
}
return super.onKeyDown(keyCode, event);
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/AddPay.java
================================================
package com.cwp.cmoneycharge;
import java.io.IOException;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Random;
import com.amap.api.location.AMapLocation;
import com.amap.api.location.AMapLocationListener;
import com.amap.api.location.LocationManagerProxy;
import com.amap.api.location.LocationProviderProxy;
import com.baidu.voicerecognition.android.ui.BaiduASRDigitalDialog;
import com.baidu.voicerecognition.android.ui.DialogRecognitionListener;
import com.cwp.chart.SystemBarTintManager;
import com.cwp.cmoneycharge.Config;
import com.cwp.cmoneycharge.Constants;
import com.cwp.cmoneycharge.DigitUtil;
import com.cwp.cmoneycharge.Effectstype;
import com.cwp.cmoneycharge.KeyboardUtil;
import com.cwp.cmoneycharge.MainActivity;
import com.cwp.cmoneycharge.NiftyDialogBuilder;
import com.cwp.pattern.UnlockGesturePasswordActivity;
import com.example.testpic.Bimp;
import com.example.testpic.PublishedActivity;
import cwp.moneycharge.dao.IncomeDAO;
import cwp.moneycharge.dao.ItypeDAO;
import cwp.moneycharge.dao.PayDAO;
import cwp.moneycharge.dao.PtypeDAO;
import cwp.moneycharge.model.Datapicker;
import cwp.moneycharge.model.Tb_income;
import cwp.moneycharge.model.Tb_pay;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.DatePickerDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.location.Location;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.view.View.OnFocusChangeListener;
import android.view.View.OnTouchListener;
import android.view.inputmethod.InputMethodManager;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.Spinner;
import android.widget.Toast;
public class AddPay extends Activity implements AMapLocationListener,
OnClickListener {
protected static final int DATE_DIALOG_ID = 0;// 创建日期对话框常量
static String type = "pay";
String VoiceDefault = "";
protected static String typemode = "add";
EditText txtMoney, txtTime, txtAddress, txtMark;// 创建EditText对象
Spinner spType;// 创建Spinner对象
Button btnSaveButton;// 创建Button对象“保存”
Button btnCancelButton;// 创建Button对象“取消”
Button btnVoice;// 创建Button对象“语音识别”
int userid;
int Selection = 0;
Bundle bundle = null;
String[] strInfos = null;// 定义字符串数组
String strno, strType;// 定义两个字符串变量,分别用来记录信息编号和管理类型
private FrameLayout corporation_fl, address_fl = null;
private RadioButton rb1 = null;
private RadioButton rb2 = null;
ImageView left_back;
private BaiduASRDigitalDialog mDialog = null; // 百度语音定义
private DialogRecognitionListener mRecognitionListener;
private int mCurrentTheme = Config.DIALOG_THEME;
private Effectstype effect; // 自定义Dialog
NiftyDialogBuilder dialogBuilder = null;
Boolean firstin = true;
private int mYear;// 年
private int mMonth;// 月
private int mDay;// 日
private ArrayAdapter<String> adapter;
private String[] spdata;
private LocationManagerProxy mLocationManagerProxy;// 高德地图api
private Random mRandom = new Random();
String[] number = { "一", "二", "两", "三", "四", "五", "六", "七", "八", "九", "十" };
String[] money = { "元", "块", "钱" };
String[] money2 = { "十", "百", "千", "万", "亿" };
String[] voice_pay = { "买", "吃" };
String[] voice_income = { "卖", "获" };
String[] VoiceSave = new String[6];
static DialogShowUtil dialogShowUtil;
PtypeDAO ptypeDAO = new PtypeDAO(AddPay.this);
ItypeDAO itypeDAO = new ItypeDAO(AddPay.this);
PayDAO payDAO = new PayDAO(AddPay.this);// 创建PayDAO对象
IncomeDAO incomeDAO = new IncomeDAO(AddPay.this);// 创建IncomeDAO对象
List<String> spdatalist, spdatalist2;
private SystemBarTintManager mTintManager;
private ImageView btn_loacte;
private ImageView addphoto;
protected String textphoto = "";
private int incount = 0;
private boolean keycount = true;
private FrameLayout bottom_empty;
private LinearLayout bottom_full;
private KeyboardUtil keyBoard;
public AddPay() {
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.add);// 设置布局文件
SysApplication.getInstance().addActivity(this); // 在销毁队列中添加this
super.onStart();// 实现基类中的方法
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
setTranslucentStatus(true);
findViewById(R.id.top).setVisibility(View.VISIBLE);
}
mTintManager = new SystemBarTintManager(this);
mTintManager.setStatusBarTintEnabled(true);
mTintManager.setStatusBarTintResource(R.color.statusbar_bg);
txtMoney = (EditText) findViewById(R.id.txtMoney);// 获取金额文本框
txtTime = (EditText) findViewById(R.id.txtTime);// 获取时间文本框
txtAddress = (EditText) findViewById(R.id.txtAddress);// 获取地点文本框
txtMark = (EditText) findViewById(R.id.txtMark);// 获取备注文本框
spType = (Spinner) findViewById(R.id.spType);// 获取类别下拉列表
btnSaveButton = (Button) findViewById(R.id.btnSave);// 获取保存按钮
btnCancelButton = (Button) findViewById(R.id.btnCancel);// 获取取消按钮
btnVoice = (Button) findViewById(R.id.btnVoice);// 获取语音识别按钮
rb1 = (RadioButton) findViewById(R.id.payout_tab_rb);
rb2 = (RadioButton) findViewById(R.id.income_tab_rb);
left_back = (ImageView) findViewById(R.id.example_left3);
btn_loacte = (ImageView) findViewById(R.id.btn_loacte);
addphoto = (ImageView) findViewById(R.id.addphoto);
bottom_empty = (FrameLayout) findViewById(R.id.bottom_empty);
bottom_full = (LinearLayout) findViewById(R.id.bottom_full);
dialogShowUtil = new DialogShowUtil(this, this, VoiceSave, type, // 初始化dialog
VoiceDefault);
btn_loacte.setOnClickListener(this); // 定位
// 隐藏菜单
bottom_empty.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
keyBoard.hideKeyboard();
bottom_empty.setVisibility(View.GONE);
bottom_full.setVisibility(View.VISIBLE);
}
});
// 添加图片
addphoto.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Intent intent = new Intent(AddPay.this, PublishedActivity.class);
intent.putExtra("cwp.id", userid);
startActivityForResult(intent, 102);
}
});
// 初始化定位,只采用网络定位
mLocationManagerProxy = LocationManagerProxy.getInstance(this);
mLocationManagerProxy.setGpsEnable(false);
// 此方法为每隔固定时间会发起一次定位请求,为了减少电量消耗或网络流量消耗,
// 注意设置合适的定位时间的间隔(最小间隔支持为2000ms),并且在合适时间调用removeUpdates()方法来取消定位请求
// 在定位结束后,在合适的生命周期调用destroy()方法
// 其中如果间隔时间为-1,则定位只定一次,
// 在单次定位情况下,定位无论成功与否,都无需调用removeUpdates()方法移除请求,定位sdk内部会移除
left_back.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Intent intent = null;
type = "pay";
typemode = "add";
if (bundle.containsKey("cwp.frament3")) {
intent = new Intent(AddPay.this, MainActivity.class);
intent.putExtra("cwp.Fragment", "3");// 设置传递数据
} else {
intent = new Intent(AddPay.this, MainActivity.class);
}
intent.putExtra("cwp.id", userid);
startActivity(intent);
finish();// 这个是关键
}
});
mRecognitionListener = new DialogRecognitionListener() { // 百度识别返回数据
@Override
public void onResults(Bundle results) {
ArrayList<String> rs = results != null ? results
.getStringArrayList(RESULTS_RECOGNITION) : null;
if (rs != null && rs.size() > 0) {
Recognition(rs.get(0)); // 把识别数据传入识别方法
// Toast.makeText(AddPay.this, rs.get(0),
// Toast.LENGTH_SHORT).show();
}
}
};
corporation_fl = (FrameLayout) findViewById(R.id.corporation_fl);
address_fl = (FrameLayout) findViewById(R.id.address_fl);
rb1.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView,
boolean isChecked) {
if (rb1.isChecked()) { // 支出
type = "pay";
} else // 收入
{
type = "income";
}
updatetype();
}
});
final Calendar c = Calendar.getInstance();// 获取当前系统日期
mYear = c.get(Calendar.YEAR);// 获取年份
mMonth = c.get(Calendar.MONTH);// 获取月份
mDay = c.get(Calendar.DAY_OF_MONTH);// 获取天数
}
@TargetApi(19)
private void setTranslucentStatus(boolean on) {
Window win = getWindow();
WindowManager.LayoutParams winParams = win.getAttributes();
final int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
if (on) {
winParams.flags |= bits;
} else {
winParams.flags &= ~bits;
}
win.setAttributes(winParams);
}
private void initData(int userid) { // 初始化数据
if (typemode == "add") { // 添加模式
if (type == "pay") { // 支出
rb1.setChecked(true);
spdatalist = ptypeDAO.getPtypeName(userid);
txtMoney.setTextColor(Color.parseColor("#5ea98d"));
} else { // 收入
rb2.setChecked(true);
spdatalist = itypeDAO.getItypeName(userid);
txtMoney.setTextColor(Color.parseColor("#ffff0000"));
}
} else { // 修改模式
bottom_empty.setVisibility(View.GONE);
bottom_full.setVisibility(View.VISIBLE);
rb1.setOnCheckedChangeListener(null);
btnSaveButton.setText("修改"); // 替换修改按钮
btnCancelButton.setText("删除"); // 替换删除按钮
CharSequence textreAddres;
String textreMark;
if (type == "pay") { // 支出
rb1.setChecked(true);
rb1.setClickable(false);
rb2.setClickable(false);
// 选择列表初始化
spdatalist = ptypeDAO.getPtypeName(userid);
// 根据编号查找支出信息,并存储到Tb_pay对象中
Tb_pay tb_pay = payDAO.find(userid, Integer.parseInt(strno));
txtMoney.setText(tb_pay.getMoney2());// 显示金额
txtMoney.setTextColor(Color.parseColor("#5ea98d"));
txtTime.setText(tb_pay.getTime());// 显示时间
Selection = tb_pay.getType() - 1;
initphotodata(tb_pay.getPhoto());
textreAddres = tb_pay.getAddress();
textreMark = tb_pay.getMark();
txtAddress.setText(textreAddres);// 显示地点
txtMark.setText(textreMark);// 显示备注
} else { // 收入
// 选择列表初始化
rb2.setChecked(true);
rb1.setClickable(false);
rb2.setClickable(false);
spdatalist = itypeDAO.getItypeName(userid);
// 根据编号查找收入信息,并存储到Tb_pay对象中
Tb_income tb_income = incomeDAO.find(userid,
Integer.parseInt(strno));
txtMoney.setText(tb_income.getMoney2());// 显示金额
txtMoney.setTextColor(Color.parseColor("#ffff0000"));
txtTime.setText(tb_income.getTime());// 显示时间
Selection = tb_income.getType() - 1; // 显示类别
initphotodata(tb_income.getPhoto());
textreAddres = tb_income.getHandler();
textreMark = tb_income.getMark();
txtAddress.setText(textreAddres);// 显示地点
txtMark.setText(textreMark);// 显示备注
}
}
}
private void initphotodata(String photo) { // 初始化图片数据
if ((incount == 0) && (!photo.equals(""))) {
String[] photoall = photo.split(",");
for (int i = 0; i < photoall.length / 2; i++) {
if (Bimp.drr.size() < 9) {
Bimp.drr.add(photoall[i]);
}
}
for (int i = photoall.length / 2; i < photoall.length; i++) {
if (Bimp.smdrr.size() < 9) {
Bimp.smdrr.add(photoall[i]);
}
}
textphoto = photo;
initphoto();
incount++;
}
}
@SuppressWarnings("deprecation")
private void initphoto() {// 初始化图片
try {
if (textphoto.equals("")) {
addphoto.setImageResource(R.drawable.addphoto_btn);
} else if (Bimp.getbitmap(Bimp.smdrr.get(0)) == null) {
Toast.makeText(AddPay.this, "图片不存在", Toast.LENGTH_SHORT).show();
} else {
addphoto.setImageBitmap(Bimp.getbitmap(Bimp.smdrr.get(0)));
}
} catch (IOException e) {
e.printStackTrace();
}
}
private void updatetype() { // 更新类别
initData(userid);
spdata = spdatalist.toArray(new String[spdatalist.size()]);// 在tb_itype中按用户id读取
adapter = new ArrayAdapter<String>(AddPay.this, R.layout.spinner,
spdata); // 动态生成收入类型列表
spType.setAdapter(adapter);
if (Selection > 0) {
spType.setSelection(Selection);// 显示类别
}
}
@Override
protected void onStart() { // 复写onstart
super.onStart();// 实现基类中的方法
updateDisplay();// 显示当前系统时间
Intent intentr = getIntent();
userid = intentr.getIntExtra("cwp.id", 100000001);
bundle = intentr.getExtras();// 获取传入的数据,并使用Bundle记录
if (bundle.containsKey("cwp.message")) {
strInfos = bundle.getStringArray("cwp.message");// 获取Bundle中记录的信息
strno = strInfos[0];// 记录id
strType = strInfos[1];// 记录类型
typemode = "ModifyInP";
if (strType.equals("btnininfo")) { // 收入
type = "income";
} else {
type = "pay";
}
}
keyBoard = new KeyboardUtil(this, this, txtMoney, typemode); // 数字软键盘
if (bundle.containsKey("cwp.voice")) { // 进来调用语音记账
if (firstin) {
bottom_empty.setVisibility(View.GONE);
bottom_full.setVisibility(View.VISIBLE);
dialogShowUtil.dialogShow("rotatebottom", "first", "", "");
firstin = false;
}
}
if (bundle.containsKey("cwp.photo")) {// 进来调用拍照
if (firstin) {
bottom_empty.setVisibility(View.GONE);
bottom_full.setVisibility(View.VISIBLE);
Intent intent = new Intent(AddPay.this, PublishedActivity.class);
intent.putExtra("cwp.id", userid);
intent.putExtra("cwp.photo", "photo");
startActivityForResult(intent, 102);
firstin = false;
}
}
if (bundle.containsKey("keyboard")) { // 进来显示键盘
if (keycount) {
InputMethodManager imm = (InputMethodManager) getSystemService(AddPay.this.INPUT_METHOD_SERVICE); // 显示键盘
imm.hideSoftInputFromWindow(txtMoney.getWindowToken(), 0); // 隐藏键盘
keyBoard.showKeyboard();
keycount = false;
}
}
updatetype();
txtTime.setOnTouchListener(new OnTouchListener() { // 为时间文本框设置单击监听事件
@Override
public boolean onTouch(View v, MotionEvent event) {
showDialog(DATE_DIALOG_ID);// 显示日期选择对话框
return false;
}
});
txtMoney.setOnTouchListener(new OnTouchListener() { // 数字软键盘监听
@Override
public boolean onTouch(View v, MotionEvent event) {
InputMethodManager imm = (InputMethodManager) getSystemService(AddPay.this.INPUT_METHOD_SERVICE); // 显示键盘
imm.hideSoftInputFromWindow(txtMoney.getWindowToken(), 0); // 隐藏键盘
keyBoard.showKeyboard();
return false;
}
});
btnVoice.setOnClickListener(new OnClickListener() {// 语音识别监听
@Override
public void onClick(View v) {
dialogShowUtil.dialogShow("rotatebottom", "first", "", "");
}
});
btnSaveButton.setOnClickListener(new OnClickListener() {// 为保存按钮设置监听事件
private String textreAddres;
private String textreMark;
@SuppressLint("NewApi")
@Override
public void onClick(View arg0) {
textreAddres = txtAddress.getText().toString();
textreMark = txtMark.getText().toString();
if (textphoto == null) {
textphoto = "";
}
if (typemode == "add") { // 添加模式
String strMoney = txtMoney.getText().toString();// 获取金额文本框的值
if (type == "pay") { // 支出
if (!strMoney.isEmpty()) {// 判断金额不为空
// 创建InaccountDAO对象
PayDAO payDAO = new PayDAO(AddPay.this);
// 创建Tb_inaccount对象
Tb_pay tb_pay = new Tb_pay(
userid,
payDAO.getMaxNo(userid) + 1,
get2Double(strMoney),
setTimeFormat(null),
(spType.getSelectedItemPosition() + 1),
textreAddres, textreMark, textphoto);
payDAO.add(tb_pay);// 添加收入信息
Toast.makeText(AddPay.this,
"〖新增收入〗数据添加成功!", Toast.LENGTH_SHORT)
.show();
gotoback();
} else {
Toast.makeText(AddPay.this, "请输入收入金额!",
Toast.LENGTH_SHORT).show();
}
} else { // 收入
if (!strMoney.isEmpty()) {// 判断金额不为空
// 创建InaccountDAO对象
IncomeDAO incomeDAO = new IncomeDAO(
AddPay.this);
// 创建Tb_inaccount对象
Tb_income tb_income = new Tb_income(
userid,
payDAO.getMaxNo(userid) + 1,
get2Double(strMoney),
setTimeFormat(null),
(spType.getSelectedItemPosition() + 1),
// txtInhandler.getText().toString(),
textreAddres, textreMark,
textphoto, "支出");
incomeDAO.add(tb_income);// 添加收入信息
// 弹出信息提示
Toast.makeText(AddPay.this,
"〖新增收入〗数据添加成功!", Toast.LENGTH_SHORT)
.show();
gotoback();
} else {
Toast.makeText(AddPay.this, "请输入收入金额!",
Toast.LENGTH_SHORT).show();
}
}
} else { // 修改模式
if (type == "pay") { // 支出
if (!txtMoney.getText().toString().isEmpty()) {// 判断金额不为空
Tb_pay tb_pay = new Tb_pay(); // 创建Tb_pay对象
tb_pay.set_id(userid); // 设置userid
tb_pay.setNo(Integer.parseInt(strno)); // 设置编号
tb_pay.setMoney(get2Double(txtMoney
.getText().toString()));// 设置金额
tb_pay.setTime(setTimeFormat(txtTime
.getText().toString()));// 设置时间
tb_pay.setType(spType
.getSelectedItemPosition() + 1);// 设置类别
tb_pay.setAddress(textreAddres);// 设置地点
tb_pay.setMark(textreMark);// 设置备注
tb_pay.setPhoto(textphoto);// 设置备注
payDAO.update(tb_pay);// 更新支出信息
Toast.makeText(AddPay.this, "〖数据〗修改成功!",
Toast.LENGTH_SHORT).show();
gotoback();
} else {
Toast.makeText(AddPay.this, "请输入收入金额!",
Toast.LENGTH_SHORT).show();
}
} else { // 收入
if (!txtMoney.getText().toString().isEmpty()) {// 判断金额不为空
Tb_income tb_income = new Tb_income();// 创建Tb_income对象
tb_income.set_id(userid);// 设置编号
tb_income.setNo(Integer.parseInt(strno));// 设置编号
tb_income.setMoney(get2Double(txtMoney
.getText().toString()));// 设置金额
tb_income.setTime(setTimeFormat(txtTime
.getText().toString()));// 设置时间
tb_income.setType(spType
.getSelectedItemPosition() + 1);// 设置类别
tb_income.setHandler(textreAddres);// 设置付款方
tb_income.setMark(textreMark);// 设置备注
tb_income.setPhoto(textphoto);// 设置备注
incomeDAO.update(tb_income);// 更新收入信息
Toast.makeText(AddPay.this, "〖数据〗修改成功!",
Toast.LENGTH_SHORT).show();
gotoback();
} else {
Toast.makeText(AddPay.this, "请输入收入金额!",
Toast.LENGTH_SHORT).show();
}
}
}
}
});
btnCancelButton.setOnClickListener(new OnClickListener() {// 为取消按钮设置单击监听事件
@Override
public void onClick(View arg0) {
if (typemode == "add") { // 添加模式执行返回
txtMoney.setText("");// 设置金额文本框为空
txtMoney.setHint("0.00");// 为金额文本框设置提示
txtTime.setText("");// 设置时间文本框为空
txtAddress.setText("");// 设置地址文本框为空
txtMark.setText("");// 设置备注文本框为空
// txtInhandler.setText("");// 设置备注文本框为空
spType.setSelection(0);// 设置类别下拉列表默认选择第一项
gotoback();
} else { // 修改模式执行删除
if (type == "pay") { // 支出
payDAO.detele(userid, Integer.parseInt(strno));// 根据编号删除支出信息
gotoback();
} else { // 收入
incomeDAO.detele(userid,
Integer.parseInt(strno));// 根据编号删除收入信息
gotoback();
}
Toast.makeText(AddPay.this, "〖数据〗删除成功!",
Toast.LENGTH_SHORT).show();
}
}
});
}
// 保留2位小数
public static double get2Double(String strMoney) { // 处理小数点
Double a = Double.parseDouble(strMoney);
DecimalFormat df = new DecimalFormat("0.00");
return new Double(df.format(a));
}
@Override
protected Dialog onCreateDialog(int id)// 重写onCreateDialog方法
{
switch (id) {
case DATE_DIALOG_ID:// 弹出日期选择对话框
return new DatePickerDialog(this, mDateSetListener, mYear, mMonth,
mDay);
}
return null;
}
private DatePickerDialog.OnDateSetListener mDateSetListener = new DatePickerDialog.OnDateSetListener() {
public void onDateSet(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {
mYear = year;// 为年份赋值
mMonth = monthOfYear;// 为月份赋值
mDay = dayOfMonth;// 为天赋值
updateDisplay();// 显示设置的日期
}
};
private void updateDisplay() {
// 显示设置的时间
txtTime.setText(new StringBuilder().append(mYear).append("-")
.append(mMonth + 1).append("-").append(mDay));
}
private String setTimeFormat(String newtxtTime) { // 设置日期格式
String date;
if (typemode == "add") {
date = txtTime.getText().toString();
} else {
date = newtxtTime;
}
int y, m, d;
String sm, sd;
int i = 0, j = 0, k = 0;
for (i = 0; i < date.length(); i++) {
if (date.substring(i, i + 1).equals("-") && j == 0)
j = i;
else if (date.substring(i, i + 1).equals("-"))
k = i;
}
y = Integer.valueOf(date.substring(0, j));
m = Integer.valueOf(date.substring(j + 1, k));
d = Integer.valueOf(date.substring(k + 1));
if (m < 10) {
sm = "0" + String.valueOf(m);
} else
sm = String.valueOf(m);
if (d < 10) {
sd = "0" + String.valueOf(d);
} else
sd = String.valueOf(d);
return String.valueOf(y) + "-" + sm + "-" + sd;
}
void VoiceRecognition() { // 调用百度语音识别
// mResult.setText(null);
mCurrentTheme = Config.DIALOG_THEME;
if (mDialog != null) {
mDialog.dismiss();
}
Bundle params = new Bundle();
params.putString(BaiduASRDigitalDialog.PARAM_API_KEY, Constants.API_KEY); // 百度语音api_key
params.putString(BaiduASRDigitalDialog.PARAM_SECRET_KEY,
Constants.SECRET_KEY);
params.putInt(BaiduASRDigitalDialog.PARAM_DIALOG_THEME, // 百度语音主题
Config.DIALOG_THEME);
mDialog = new BaiduASRDigitalDialog(this, params);
mDialog.setDialogRecognitionListener(mRecognitionListener);
mDialog.getParams().putInt(BaiduASRDigitalDialog.PARAM_PROP, // 百度识别类别
Config.CURRENT_PROP);
mDialog.getParams().putString(BaiduASRDigitalDialog.PARAM_LANGUAGE, // 百度识别语言
Config.getCurrentLanguage());
mDialog.getParams().putBoolean(
// 百度识别音效相关
BaiduASRDigitalDialog.PARAM_START_TONE_ENABLE,
Config.PLAY_START_SOUND);
mDialog.getParams().putBoolean(
BaiduASRDigitalDialog.PARAM_END_TONE_ENABLE,
Config.PLAY_END_SOUND);
mDialog.getParams().putBoolean(
BaiduASRDigitalDialog.PARAM_TIPS_TONE_ENABLE,
Config.DIALOG_TIPS_SOUND);
mDialog.show();
}
void VoiceSuccess() { // 识别成功录入数据
if (DialogShowUtil.dialoggettype() != null) {
type = DialogShowUtil.dialoggettype();
}
VoiceDefault = DialogShowUtil.dialogVoiceDefault();
String textreMark = txtMark.getText().toString();
if (typemode == "add") { // 添加模式
if (type == "pay") { // 支出
rb1.setChecked(true);
// corporation_fl.setVisibility(View.GONE);
// address_fl.setVisibility(View.VISIBLE);
spdatalist = ptypeDAO.getPtypeName(userid);
txtMoney.setText(VoiceSave[1]);// 显示金额
txtMoney.setTextColor(Color.parseColor("#5ea98d"));
if (VoiceDefault == "notype") { // 如果没有默认类别
spType.setSelection(Integer.parseInt(VoiceSave[5]));// 显示语音识别类别
} else {
spType.setSelection(Integer.parseInt(VoiceSave[0]));// 显示类别
}
txtMark.setText(textreMark + " " + VoiceSave[2]);// 显示备注
} else { // 收入
rb2.setChecked(true);
// corporation_fl.setVisibility(View.VISIBLE);
// address_fl.setVisibility(View.GONE);
spdatalist = ptypeDAO.getPtypeName(userid);
txtMoney.setText(VoiceSave[1]);// 显示金额
txtMoney.setTextColor(Color.parseColor("#ffff0000"));
if (VoiceDefault == "notype") { // 如果没有默认类别
spType.setSelection(Integer.parseInt(VoiceSave[5]));// 显示类别
} else {
spType.setSelection(Integer.parseInt(VoiceSave[4]));// 显示类别
}
txtMark.setText(textreMark + " " + VoiceSave[2]);// 显示备注
}
} else { // 修改模式
if (type == "pay") { // 支出
rb1.setChecked(true);
// 选择列表初始化
spdatalist = ptypeDAO.getPtypeName(userid);
spdata = spdatalist.toArray(new String[spdatalist.size()]);// 在tb_itype中按用户id读取
adapter = new ArrayAdapter<String>(AddPay.this,
R.layout.spinner, spdata); // 动态生成收入类型列表
spType.setAdapter(adapter);
txtMoney.setText(VoiceSave[1]);// 显示金额
txtMoney.setTextColor(Color.parseColor("#5ea98d"));
if (VoiceDefault == "notype") { // 如果没有默认类别
spType.setSelection(Integer.parseInt(VoiceSave[5]));// 显示语音识别类别
} else {
spType.setSelection(Integer.parseInt(VoiceSave[0]));// 显示类别
}
txtMark.setText(textreMark + " " + VoiceSave[2]);// 显示备注
} else { // 收入
// 选择列表初始化
rb2.setChecked(true);
spdatalist = itypeDAO.getItypeName(userid);
spdata = spdatalist.toArray(new String[spdatalist.size()]);// 在tb_itype中按用户id读取
adapter = new ArrayAdapter<String>(AddPay.this,
R.layout.spinner, spdata); // 动态生成收入类型列表
spType.setAdapter(adapter);
txtMoney.setText(VoiceSave[1]);// 显示金额
txtMoney.setTextColor(Color.parseColor("#ffff0000"));
if (VoiceDefault == "notype") { // 如果没有默认类别
spType.setSelection(Integer.parseInt(VoiceSave[5]));// 显示类别
} else {
spType.setSelection(Integer.parseInt(VoiceSave[4]));// 显示类别
}
txtMark.setText(textreMark + " " + VoiceSave[2]);// 显示备注
}
}
}
/*
* 识别结果处理函数
*
* @param VoiceSave[0] 收入类别的值
*
* @param VoiceSave[1] 金额的值
*
* @param VoiceSave[3] 重复类别的值,仅用于显示提醒
*
* @param VoiceSave[4] 支出类别的值
*
* @param VoiceSave[5] "语音识别"类别的值
*/
private void Recognition(String t) {
int mfirst = 100, mend = 0, temp = 0;
Boolean ismoney = false, intype = false, outtype = false;
Boolean voice_ptype = false, voice_intype = false;
String w = "", strmoney = "", inname = "1", outname = "2";
spdatalist = ptypeDAO.getPtypeName(userid);
spdatalist2 = itypeDAO.getItypeName(userid);
VoiceSave[2] = t;
for (int i = 0; i < spdatalist.size(); i++) { // 判断是否包含支出
if (t.indexOf(spdatalist.get(i).toString()) > -1) {
type = "pay";
intype = true;
inname = spdatalist.get(i).toString();
VoiceSave[0] = Integer.toString(i); // VoiceSave[0]为收入类别的值
}
}
for (int i = 0; i < voice_pay.length; i++) { // 判断是否包含支出的动词
if (t.indexOf(voice_pay[i]) > -1) {
voice_ptype = true;
}
}
for (int i = 0; i < voice_income.length; i++) { // 判断是否包含支出的动词
if (t.indexOf(voice_income[i]) > -1) {
voice_intype = true;
}
}
for (int i = 0; i < spdatalist2.size(); i++) { // 判断是否包含收入
if (t.indexOf(spdatalist2.get(i).toString()) > -1) {
type = "income";
outtype = true;
outname = spdatalist2.get(i).toString();
VoiceSave[4] = Integer.toString(i); // VoiceSave[4]为支出类别的值
}
}
for (int i = 0; i < number.length; i++) { // 判断是否包含金额,获得开头
if (t.indexOf(number[i]) > -1) {
temp = t.indexOf(number[i]);
if (temp < mfirst) {
mfirst = temp;
}
}
}
for (int i = 0; i < money.length; i++) { // 判断是否包含金额,获得结尾
if (t.indexOf(money[i]) > -1) {
temp = t.indexOf(money[i]);
if (temp > -1 && temp >= mend) {
mend = temp;
}
}
}
for (int i = 0; i < money2.length; i++) { // 判断是否包含金额,获得结尾
if (t.indexOf(money2[i]) > -1) {
temp = t.indexOf(money2[i]);
if (temp > -1 && temp >= mend) {
mend = temp;
}
mend = mend + 1;
}
}
if (!(mfirst == 100 || mend == 0)) { // 转换为阿拉伯数字
ismoney = true;
strmoney = t.substring(mfirst, mend);
// 判断语句是否包含非数字
char[] chs = strmoney.toCharArray();
List<String> num = Arrays.asList(number);
List<String> mon = Arrays.asList(money);
List<String> mon2 = Arrays.asList(money2);
for (int l = 0; l < chs.length; l++)
if (!num.contains(String.valueOf(chs[l])))
if (!mon.contains(String.valueOf(chs[l])))
if (!mon2.contains(String.valueOf(chs[l])))
ismoney = false;
if (ismoney) {
DigitUtil Util = new DigitUtil();
VoiceSave[1] = Integer.toString(Util.parse(strmoney)); // 调用工具类处理汉字的金额
}
}
if (intype && outtype) { // 如果同时含有收入/支出的类别
if (outname.equals(inname)) {
if (ismoney) {
if (voice_intype) {
type = "income";
dialogShowUtil.dialogShow("rotatebottom", "OK", t, w);
} else if (voice_ptype) {
type = "pay";
dialogShowUtil.dialogShow("rotatebottom", "OK", t, w);
} else {
VoiceSave[3] = outname; // VoiceSave[3]为重复类别的值,仅用于显示提醒
dialogShowUtil.dialogShow("shake", "judge", t, w); // 如果含有金额
}
} else {
w = "提示:\n你的话中没有包含消费或开支的<金额>\n";
dialogShowUtil.dialogShow("shake", "wrong", t, w);
}
} else {
w = "**提示:\n一次只能记录一条记录哦\n"; // 如果含有收入并且支出的类别
dialogShowUtil.dialogShow("shake", "wrong", t, w);
}
} else {
if (!((intype || outtype) || ismoney)) { // 如果不含金额
w = "**提示:\n你的话中没有包含<类别>(" + listToString(spdatalist, ',')
+ "," + listToString(spdatalist2, ',')
+ ")\n\n**提示:\n你的话中没有包含消费或开支的<金额>";
dialogShowUtil.dialogShow("shake", "wrong", t, w);
} else if ((intype || outtype) && (!ismoney)) {
w = "提示:\n你的话中没有包含消费或开支的<金额>\n或者出现多次金额";
dialogShowUtil.dialogShow("shake", "wrong", t, w);
} else if ((!(intype || outtype)) && ismoney) {
for (int i = 0; i < spdatalist.size(); i++) { // 判断是否包含支出
if ("语音识别".indexOf(spdatalist.get(i).toString()) > -1) {
VoiceSave[5] = Integer.toString(i);
VoiceSave[3] = "语音识别";
}
}
w = "**提示:\n你的话中没有包含<(默认)类别>(" + listToString(spdatalist, ',')
+ ")\n\n\n将会记录为<语音识别>类别,是否依然记录?\n";
dialogShowUtil.dialogShow("shake", "notype", t, w);
} else {
dialogShowUtil.dialogShow("rotatebottom", "OK", t, w);
}
}
}
public String listToString(List list, char separator) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < list.size(); i++) {
sb.append(list.get(i));
if (i < list.size() - 1) {
sb.append(separator);
}
}
return sb.toString();
}
private boolean gotoback() { // 返回
Intent intent = null;
type = "pay";
typemode = "add";
Bimp.drr = new ArrayList<String>();
Bimp.smdrr = new ArrayList<String>();
Bimp.bmp = new ArrayList<Bitmap>();
Bimp.max = 0;
Bimp.flag = 0;
if (bundle.containsKey("cwp.frament3")) {
intent = new Intent(AddPay.this, MainActivity.class);
intent.putExtra("cwp.Fragment", "3");// 设置传递数据
} else if (bundle.containsKey("cwp.search")) {
this.setResult(3);
this.finish();
return true;
} else {
intent = new Intent(AddPay.this, MainActivity.class);
intent.putExtra("cwp.Fragment", "1");
}
intent.putExtra("cwp.id", userid);
startActivity(intent);
finish();
return true;
}
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) { // 监控/拦截/屏蔽返回键
gotoback();
}
return super.onKeyDown(keyCode, event);
}
@Override
protected void onDestroy() {
if (mDialog != null) {
mDialog.dismiss();
}
if (dialogBuilder != null) {
dialogBuilder.dismiss();
}
super.onDestroy();
}
@Override
protected void onPause() {
super.onPause();
// 移除定位请求
mLocationManagerProxy.removeUpdates(this);
// 销毁定位
mLocationManagerProxy.destroy();
}
protected void onResume() {
super.onResume();
SharedPreferences sp = this.getSharedPreferences("preferences",
MODE_WORLD_READABLE);
CrashApplication myApplaction = (CrashApplication) getApplication();
if ((myApplaction.isLocked)
&& (sp.getString("gesturepw", "").equals("开"))) {// 判断是否需要跳转到密码界面
Intent intent = new Intent(this,
UnlockGesturePasswordActivity.class);
startActivity(intent);
}
}
@Override
public void onLocationChanged(Location location) {
}
@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
}
@Override
public void onProviderEnabled(String provider) {
}
@Override
public void onProviderDisabled(String provider) {
}
@Override
public void onLocationChanged(AMapLocation amapLocation) {
if (amapLocation != null
&& amapLocation.getAMapException().getErrorCode() == 0) {
// 定位成功回调信息,设置相关消息
txtAddress.setText(amapLocation.getPoiName() + " [ "
+ amapLocation.getAddress() + " 区号:"
+ amapLocation.getCityCode() + " ]");
} else {
Log.e("AmapErr", "Location ERR:"
+ amapLocation.getAMapException().getErrorCode());
}
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.btn_loacte:
// 注意更换定位时间后,需要先将定位请求删除,再进行定位请求
mLocationManagerProxy.removeUpdates(this);
int randomTime = mRandom.nextInt(1000);
mLocationManagerProxy.requestLocationData(
LocationProviderProxy.AMapNetwork, 60 * 1000 + randomTime,
15, this);
mLocationManagerProxy.setGpsEnable(false);
break;
}
}
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode) {
case 102:
if (resultCode == 3 || resultCode == 0) {
// for (int i = 0; i < Bimp.drr.size(); i++) {
// System.out.println("Bimp.drr" + i + " " + Bimp.drr.get(i));
// System.out.println("list" + i + " " + Bimp.smdrr.get(i));
// }
if ((Bimp.drr.size() != 0) && (Bimp.smdrr.size() != 0)) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < Bimp.drr.size(); i++) {
sb.append(Bimp.drr.get(i) + ",");
}
for (int i = 0; i < Bimp.drr.size(); i++) {
sb.append(Bimp.smdrr.get(i) + ",");
}
textphoto = sb.toString().substring(0, sb.length() - 1);
initphoto();
} else {
textphoto = "";
initphoto();
}
break;
}
}
}
public static void showVoiveDialog() {
dialogShowUtil.dialogShow("rotatebottom", "first", "", "");
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Author.java
================================================
package com.cwp.cmoneycharge;
import cwp.moneycharge.model.ActivityManager;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.widget.ArrayAdapter;
import android.widget.ListView;
public class Author extends Activity {
Intent intentr;
int userid;
public Author() {
// TODO Auto-generated constructor stub
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.author);
ActivityManager.getInstance().addActivity(this);
}
@Override
protected void onStart() {
// TODO Auto-generated method stub
super.onStart();// 实现基类中的方法// 调用自定义方法显示收入信息
Intent intentr=getIntent();
userid=intentr.getIntExtra("cwp.id",100000001);}
public boolean onKeyDown(int keyCode, KeyEvent event) {
if(keyCode == KeyEvent.KEYCODE_BACK) { //监控/拦截/屏蔽返回键
Intent intent=new Intent(Author.this,About.class);
intent.putExtra("cwp.id",userid);
startActivity(intent);
return true;
}
return super.onKeyDown(keyCode, event);
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/BaseEffects.java
================================================
package com.cwp.cmoneycharge;
import android.view.View;
import com.nineoldandroids.animation.AnimatorSet;
import com.nineoldandroids.view.ViewHelper;
/**
* Created by lee on 2014/7/30.
*
*
* The MIT License (MIT)
*
* Copyright (c) 2014 daimajia
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Acknowledgements daimajia
* https://github.com/daimajia
*/
public abstract class BaseEffects {
private static final int DURATION = 1 * 700;
protected long mDuration =DURATION ;
private AnimatorSet mAnimatorSet;
{
mAnimatorSet = new AnimatorSet();
}
protected abstract void setupAnimation(View view);
public void start(View view) {
reset(view);
setupAnimation(view);
mAnimatorSet.start();
}
public void reset(View view) {
ViewHelper.setPivotX(view, view.getMeasuredWidth() / 2.0f);
ViewHelper.setPivotY(view, view.getMeasuredHeight() / 2.0f);
}
public AnimatorSet getAnimatorSet() {
return mAnimatorSet;
}
public void setDuration(long duration) {
this.mDuration = duration;
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/BaseFrament.java
================================================
package com.cwp.cmoneycharge;
import android.support.v4.app.Fragment;
abstract public class BaseFrament extends Fragment {
public void filngtonext() {
}
public void filngtonpre(){
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Config.java
================================================
package com.cwp.cmoneycharge;
import com.baidu.voicerecognition.android.VoiceRecognitionConfig;
import com.baidu.voicerecognition.android.ui.BaiduASRDigitalDialog;
/**
* 临时保存参数信息,Demo演示使用
*
* @author yangliang02
*/
public class Config {
/** 对话框样式 */
public static int DIALOG_THEME = BaiduASRDigitalDialog.THEME_BLUE_LIGHTBG;
/** 对话框样式 */
public static int pushlogindex = 0;
public static int getPushlog() {
return pushlogindex;
}
public static void setPushlog(int pushlog) {
pushlogindex = pushlog;
}
/**
* 当前识别语言
*/
public static String CURRENT_LANGUAGE = VoiceRecognitionConfig.LANGUAGE_CHINESE;
private static int CURRENT_LANGUAGE_INDEX = 0;
/**
* 当前垂直领域类型
*/
public static int CURRENT_PROP = VoiceRecognitionConfig.PROP_INPUT;
private static int CURRENT_PROP_INDEX = 0;
public static String getCurrentLanguage() {
return CURRENT_LANGUAGE;
}
public static int getCurrentLanguageIndex() {
return CURRENT_LANGUAGE_INDEX;
}
public static void setCurrentLanguageIndex(int index) {
switch (index) {
case 1:
CURRENT_LANGUAGE = VoiceRecognitionConfig.LANGUAGE_CANTONESE;
break;
case 2:
CURRENT_LANGUAGE = VoiceRecognitionConfig.LANGUAGE_ENGLISH;
break;
default:
CURRENT_LANGUAGE = VoiceRecognitionConfig.LANGUAGE_CHINESE;
index = 0;
break;
}
CURRENT_LANGUAGE_INDEX = index;
}
public static int getCurrentPropIndex() {
return CURRENT_PROP_INDEX;
}
public static void setCurrentPropIndex(int index) {
switch (index) {
case 1:
CURRENT_PROP = VoiceRecognitionConfig.PROP_SEARCH;
break;
case 2:
CURRENT_PROP = VoiceRecognitionConfig.PROP_MAP;
break;
case 3:
CURRENT_PROP = VoiceRecognitionConfig.PROP_MUSIC;
break;
case 4:
CURRENT_PROP = VoiceRecognitionConfig.PROP_VIDEO;
break;
case 5:
CURRENT_PROP = VoiceRecognitionConfig.PROP_APP;
break;
case 6:
CURRENT_PROP = VoiceRecognitionConfig.PROP_WEB;
break;
case 7:
CURRENT_PROP = VoiceRecognitionConfig.PROP_HEALTH;
break;
case 8:
CURRENT_PROP = VoiceRecognitionConfig.PROP_SHOPPING;
break;
case 9:
CURRENT_PROP = VoiceRecognitionConfig.PROP_PHONE;
break;
default:
CURRENT_PROP = VoiceRecognitionConfig.PROP_INPUT;
index = 0;
break;
}
CURRENT_PROP_INDEX = index;
}
/**
* 播放声音
*/
public static boolean PLAY_START_SOUND = true;
/**
* 播放结束
*/
public static boolean PLAY_END_SOUND = true;
/**
* 对话框提示音
*/
public static boolean DIALOG_TIPS_SOUND = true;
/**
* 显示音量
*/
public static boolean SHOW_VOL = true;
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Constants.java
================================================
package com.cwp.cmoneycharge;
public class Constants {
/*
* 请登录http://developer.baidu.com,注册成为百度开发
* 将对应的ApiKey和SecretKey填写后再测试
*/
public static final String API_KEY = "8MAxI5o7VjKSZOKeBzS4XtxO";
public static final String SECRET_KEY = "Ge5GXVdGQpaxOmLzc8fOM8309ATCz9Ha";
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/CrashApplication.java
================================================
package com.cwp.cmoneycharge;
import com.cwp.pattern.LockPatternUtils;
import android.app.Application;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
public class CrashApplication extends Application {
public boolean isLocked = true;
private static CrashApplication mInstance;
private LockPatternUtils mLockPatternUtils;
LockScreenReceiver receiver ;
IntentFilter filter ;
public static CrashApplication getInstance() {
return mInstance;
}
@Override
public void onCreate() {
super.onCreate();
mInstance = this;
mLockPatternUtils = new LockPatternUtils(this);
receiver = new LockScreenReceiver();
filter = new IntentFilter();
filter.addAction(Intent.ACTION_SCREEN_OFF);
this.registerReceiver(receiver, filter);
CrashHandler crashHandler = CrashHandler.getInstance();
crashHandler.init(this);
}
public LockPatternUtils getLockPatternUtils() {
return mLockPatternUtils;
}
class LockScreenReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
/* 在这里处理广播 */
if (Intent.ACTION_SCREEN_OFF.equals(intent.getAction())) {
isLocked = true;
}
}
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/CrashHandler.java
================================================
package com.cwp.cmoneycharge;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.Writer;
import java.lang.Thread.UncaughtExceptionHandler;
import java.lang.reflect.Field;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Timer;
import java.util.TimerTask;
import com.umeng.fb.example.CustomActivity;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.os.Looper;
import android.util.Log;
import android.widget.Toast;
/**
* UncaughtException处理类,当程序发生Uncaught异常的时候,由该类来接管程序,并记录发送错误报告.
*
* @author way
*
*/
public class CrashHandler implements UncaughtExceptionHandler {
StringBuffer sb;
String result;
private static final String TAG = "CrashHandler";
private static final int MODE_WORLD_READABLE = 0x0001;
private Thread.UncaughtExceptionHandler mDefaultHandler;// 系统默认的UncaughtException处理类
private static CrashHandler INSTANCE = new CrashHandler();// CrashHandler实例
private Context mContext;// 程序的Context对象
private Map<String, String> info = new HashMap<String, String>();// 用来存储设备信息和异常信息
private SimpleDateFormat format = new SimpleDateFormat(
"yyyy-MM-dd-HH-mm-ss");// 用于格式化日期,作为日志文件名的一部分
/** 保证只有一个CrashHandler实例 */
private CrashHandler() {
}
/** 获取CrashHandler实例 ,单例模式 */
public static CrashHandler getInstance() {
return INSTANCE;
}
/**
* 初始化
*
* @param context
*/
public void init(Context context) {
mContext = context;
ContextWrapper a = (ContextWrapper) mContext.getApplicationContext();
SharedPreferences sp = a.getSharedPreferences("preferences",
MODE_WORLD_READABLE);
if (sp.getString("sendlog", "").equals("开")
|| sp.getString("sendlog", "").equals("")) {
mDefaultHandler = Thread.getDefaultUncaughtExceptionHandler();// 获取系统默认的UncaughtException处理器
Thread.setDefaultUncaughtExceptionHandler(this);// 设置该CrashHandler为程序的默认处理器
}
}
/**
* 当UncaughtException发生时会转入该重写的方法来处理
*/
@SuppressWarnings("static-access")
public void uncaughtException(Thread thread, Throwable ex) {
if (!handleException(ex) && mDefaultHandler != null) {
// 如果自定义的没有处理则让系统默认的异常处理器来处理
mDefaultHandler.uncaughtException(thread, ex);
} else {
try {
thread.sleep(3000);// 如果处理了,让程序继续运行3秒再退出,保证文件保存并上传到服务器
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
/**
* 自定义错误处理,收集错误信息 发送错误报告等操作均在此完成.
*
* @param ex
* 异常信息
* @return true:如果处理了该异常信息;否则返回false.
*/
public boolean handleException(Throwable ex) {
if (ex == null || mContext == null)
return false;
new Thread() {
public void run() {
Looper.prepare();
Toast.makeText(mContext, "很抱歉,程序出现异常,即将退出", 0).show();
Toast.makeText(mContext, "请把错误日志反馈给开发者", Toast.LENGTH_LONG)
.show();
Looper.loop();
}
}.start();
// 收集设备参数信息
collectDeviceInfo(mContext);
// 保存日志文件
final File file = saveCrashInfo2File(ex);
TimerTask task = new TimerTask() {
public void run() {
// sendAppCrashReport(mContext, file);
sendreport(mContext);
}
};
Timer timer = new Timer();
timer.schedule(task, 4000);
return true;
}
protected void sendreport(Context mContext) {
Intent intent = new Intent(mContext, CustomActivity.class);
intent.putExtra("cwp.md", result);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
| Intent.FLAG_ACTIVITY_NEW_TASK);
mContext.startActivity(intent);
SysApplication.getInstance().exit();
}
public void sendAppCrashReport(Context mContext, File file) { // 通过系统分享发送文件
try {
Intent intent = new Intent();
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);// 设置intent的Action属性
intent.setAction(Intent.ACTION_VIEW);// 获取文件file的MIME类型
String type = "text/plain";// 设置intent的data和Type属性。
intent.setDataAndType(Uri.fromFile(file), type);// 跳转
mContext.startActivity(intent);
// Toast.makeText(mContext, "很抱歉,程序出现异常,即将退出", 0).show();
} catch (Exception e) {
} finally {
SysApplication.getInstance().exit();
}
}
/**
* 收集设备参数信息
*
* @param context
*/
public void collectDeviceInfo(Context context) {
try {
PackageManager pm = context.getPackageManager();// 获得包管理器
PackageInfo pi = pm.getPackageInfo(context.getPackageName(),
PackageManager.GET_ACTIVITIES);// 得到该应用的信息,即主Activity
if (pi != null) {
String versionName = pi.versionName == null ? "null"
: pi.versionName;
String versionCode = pi.versionCode + "";
info.put("versionName", versionName);
info.put("versionCode", versionCode);
}
} catch (NameNotFoundException e) {
e.printStackTrace();
}
Field[] fields = Build.class.getDeclaredFields();// 反射机制
for (Field field : fields) {
try {
field.setAccessible(true);
info.put(field.getName(), field.get("").toString());
Log.d(TAG, field.getName() + ":" + field.get(""));
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
private File saveCrashInfo2File(Throwable ex) {
sb = new StringBuffer();
for (Map.Entry<String, String> entry : info.entrySet()) {
String key = entry.getKey();
String value = entry.getValue();
sb.append(key + "=" + value + "\r\n");
}
Writer writer = new StringWriter();
PrintWriter pw = new PrintWriter(writer);
ex.printStackTrace(pw);
Throwable cause = ex.getCause();
// 循环着把所有的异常信息写入writer中
while (cause != null) {
cause.printStackTrace(pw);
cause = cause.getCause();
}
pw.close();// 记得关闭
result = writer.toString();
sb.append(result);
// 保存文件
long timetamp = System.currentTimeMillis();
String time = format.format(new Date());
String fileName = "crash-" + time + "-" + timetamp + ".log";
if (Environment.getExternalStorageState().equals(
Environment.MEDIA_MOUNTED)) {
try {
File dir = new File(Environment.getExternalStorageDirectory()
+ "/crash/");
if (!dir.exists())
dir.mkdir();
File file = new File(dir, fileName);
FileOutputStream fos = new FileOutputStream(file);
fos.write(sb.toString().getBytes());
fos.close();
return file;
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
return null;
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Description.java
================================================
package com.cwp.cmoneycharge;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import cwp.moneycharge.model.ActivityManager;
public class Description extends Activity{
Intent intentr;
int userid;
public Description() {
// TODO Auto-generated constructor stub
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.description);
ActivityManager.getInstance().addActivity(this);
}
@Override
protected void onStart() {
// TODO Auto-generated method stub
super.onStart();// 实现基类中的方法// 调用自定义方法显示收入信息
Intent intentr=getIntent();
userid=intentr.getIntExtra("cwp.id",100000001);}
public boolean onKeyDown(int keyCode, KeyEvent event) {
if(keyCode == KeyEvent.KEYCODE_BACK) { //监控/拦截/屏蔽返回键
Intent intent=new Intent(Description.this,About.class);
intent.putExtra("cwp.id",userid);
startActivity(intent);
return true;
}
return super.onKeyDown(keyCode, event);
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/DialogShowUtil.java
================================================
package com.cwp.cmoneycharge;
import android.app.Activity;
import android.content.Context;
import android.view.View;
import android.widget.EditText;
public class DialogShowUtil {
private Context ctx;
private Activity act;
NiftyDialogBuilder dialogBuilder = null;
private Effectstype effect; // 自定义Dialog
String[] VoiceSave;
static String type;
static String VoiceDefault;
public DialogShowUtil(Activity act, Context ctx, String[] VoiceSave,
String type, String VoiceDefault) {
this.ctx = ctx;
this.act = act;
this.VoiceSave = VoiceSave;
this.type = type;
this.VoiceDefault = VoiceDefault;
}
public void dialogShow(String showtype, String style,
final String context1, String context2) {
dialogBuilder = new NiftyDialogBuilder(ctx, R.style.dialog_untran); // 自定义dialogBuilder
switch (showtype) {
case "rotatebottom":
effect = Effectstype.RotateBottom;
break;
case "shake":
effect = Effectstype.Shake;
break;
}
switch (style) {
case "first":
dialogBuilder.withTitle("语音记账")
// .withTitle(null) no title
.withTitleColor("#FFFFFF")
// def
.withDividerColor("#11000000")
// def
.withMessage("语音格式:\n早餐在餐厅食了20元。\n\n")
// .withMessage(null) no Msg
.withMessageColor("#FFFFFF")
// def
.withIcon(ctx.getResources().getDrawable(R.drawable.icon))
.isCancelableOnTouchOutside(false) // def |//
// isCancelable(true)
.withDuration(700) // def
.withEffect(effect) // def Effectstype.Slidetop
.withButton1Text("取消") // def gone
.withButton2Text("开始语音") // def gone
.setButton1Click(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialogBuilder.dismiss();
}
}).setButton2Click(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialogBuilder.dismiss();
((AddPay) act).VoiceRecognition();
}
}).show();
break;
case "notype":
dialogBuilder.withTitle("识别成功")
// .withTitle(null) no title
.withTitleColor("#FFFFFF")
// def
.withDividerColor("#11000000")
// def
.withMessage("你刚刚说了“ " + context1 + "”\n\n" + context2)
// .withMessage(null) no Msg
.withMessageColor("#FFFFFF")
// def
.withIcon(ctx.getResources().getDrawable(R.drawable.icon))
.isCancelableOnTouchOutside(false) // def |//
.withDuration(700) // def
.withEffect(effect) // def Effectstype.Slidetop
.withButton1Text("取消") // def gone
.withButton2Text("是") // def gone
.setButton1Click(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialogBuilder.dismiss();
}
}).setButton2Click(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialogBuilder.dismiss();
VoiceDefault = "notype";
VoiceSave[3] = VoiceSave[3];
dialogShow("shake", "judge", context1, "");
}
}).show();
break;
case "wrong":
dialogBuilder
.withTitle("识别失败")
// .withTitle(null) no title
.withTitleColor("#FFFFFF")
// def
.withDividerColor("#11000000")
// def
.withMessage(
"你刚刚说了“ " + context1 + "”不符合格式,请再试一次\n\n"
+ context2)
// .withMessage(null) no Msg
.withMessageColor("#FFFFFF")
// def
.withIcon(ctx.getResources().getDrawable(R.drawable.icon))
.isCancelableOnTouchOutside(false) // def |
// isCancelable(true)
.withDuration(700) // def
.withEffect(effect) // def Effectstype.Slidetop
.withButton1Text("取消") // def gone
.withButton2Text("再次语音") // def gone
.setButton1Click(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialogBuilder.dismiss();
}
}).setButton2Click(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialogBuilder.dismiss();
((AddPay) act).VoiceRecognition();
}
}).show();
break;
case "OK":
dialogBuilder.withTitle("识别成功")
// .withTitle(null) no title
.withTitleColor("#FFFFFF")
// def
.withDividerColor("#11000000")
// def
.withMessage("成功!\n你刚刚说了“" + context1 + "”,\n是否确定要记录这条数据?")
// .withMessage(null) no Msg
.withMessageColor("#FFFFFF")
// def
.withIcon(ctx.getResources().getDrawable(R.drawable.icon))
.isCancelableOnTouchOutside(false) // def |
// isCancelable(true)
.withDuration(700) // def
.withEffect(effect) // def Effectstype.Slidetop
.withButton1Text("取消") // def gone
.withButton2Text("确定") // def gone
.setButton1Click(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialogBuilder.dismiss();
}
}).setButton2Click(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialogBuilder.dismiss();
((AddPay) act).VoiceSuccess();
}
}).show();
break;
case "judge":
dialogBuilder
.withTitle("识别成功")
// .withTitle(null) no title
.withTitleColor("#FFFFFF")
// def
.withDividerColor("#11000000")
// def
.withMessage(
"成功!\n你刚刚说了“" + context1 + "”,\n<" + VoiceSave[3]
+ ">类别需要你请确认该笔是<开支>还是<收入>?\n")
// .withMessage(null) no Msg
.withMessageColor("#FFFFFF")
// def
.withIcon(ctx.getResources().getDrawable(R.drawable.icon))
.isCancelableOnTouchOutside(false) // def |
// isCancelable(true)
.withDuration(700) // def
.withEffect(effect) // def Effectstype.Slidetop
.withButton1Text("开支") // def gone
.withButton2Text("收入") // def gone
.setButton1Click(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialogBuilder.dismiss();
type = "pay";
((AddPay) act).VoiceSuccess();
}
}).setButton2Click(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialogBuilder.dismiss();
type = "income";
((AddPay) act).VoiceSuccess();
}
}).show();
break;
case "quit":
dialogBuilder.withTitle("退出程序")
// .withTitle(null) no title
.withTitleColor("#FFFFFF")
// def
.withDividerColor("#11000000")
// def
.withMessage("是否要退出程序?\n\n")
// .withMessage(null) no Msg
.withMessageColor("#FFFFFF")
// def
.withIcon(ctx.getResources().getDrawable(R.drawable.icon))
.isCancelableOnTouchOutside(false) // def |
// isCancelable(true)
.withDuration(700) // def
.withEffect(effect) // def Effectstype.Slidetop
.withButton1Text("取消") // def gone
.withButton2Text("退出") // def gone
.setButton1Click(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialogBuilder.dismiss();
}
}).setButton2Click(new View.OnClickListener() {
@Override
public void onClick(View v) {
SysApplication.getInstance().exit();
}
}).show();
break;
}
}
public static String dialoggettype() {
return type;
}
public static String dialogVoiceDefault() {
return VoiceDefault;
}
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/DigitUtil.java
================================================
package com.cwp.cmoneycharge;
/**
* @author loiy
* www.agrilink.cn
* 2012.11.30
*/
import java.util.Hashtable;
public class DigitUtil {
/**
* 汉字中的数字字符
*/
private static final Character[] SCDigits = { '零', '一', '二', '两', '三', '四',
'五', '六', '七', '八', '九' };
/**
* 阿拉伯数字
*/
private static final Character[] araDigits = { '0', '1', '2', '2', '3',
'4', '5', '6', '7', '8', '9' };
/**
* 阿拉伯数字
*/
private static Hashtable<Character, Character> araHash = new Hashtable<Character, Character>();
/**
* 阿拉伯数字
*/
private static Hashtable<Character, Integer> YWQBSHash = new Hashtable<Character, Integer>();
static {
for (int i = 0; i < SCDigits.length; i++) {
araHash.put(SCDigits[i], araDigits[i]);
}
YWQBSHash.put('亿', 100000000);
YWQBSHash.put('万', 10000);
YWQBSHash.put('千', 1000);
YWQBSHash.put('百', 100);
YWQBSHash.put('十', 10);
}
/**
* @param remain
* 剩下多少个字符
* @param curchar
* 当前分析的字符
*/
private static int ywqbs(int num, Boolean bool, int no, int remain,
char curchar, char lastshow) {
if (num == 0) {
num += no;
return num;
} else {
String numString = String.valueOf(num); // 将num转换成String
String last = numString.substring(numString.length() - 1,
numString.length()); // 获取最后一个字符
String exceptlast = numString.substring(0, numString.length() - 1); // 获取除了最后一个字符所有字符串
if (exceptlast.length() == 0) { // 说明num是个位值
num = Integer.parseInt(last) * no;
return num;
} else {
/***** 针对有连续的这些字符[十百千万亿] start *****/
if (bool && YWQBSHash.get(curchar) > YWQBSHash.get(lastshow)) { // 说明上个字符属于[十百千万亿]
num *= no;
return num;
}
/***** 针对有连续的这些字符[十百千万亿] end *****/
/***** 分析到最后一个字符 start *****/
/**** 针对这种情况(一千二百二十一万) ****/
if (remain == 1
&& YWQBSHash.get(curchar) > YWQBSHash.get(lastshow)) {
num *= YWQBSHash.get(curchar);
return num;
}
/**** 针对这种情况(一千二百二十一万) ****/
/***** 分析到最后一个字符 end *****/
/***** last如果为0 start *****/
if (last.equals("0")) { // 循环到最后一位字符,last等于0
last = "1"; //
}
/***** last如果为0 end *****/
exceptlast = exceptlast + "0"; // 缺少最后一位,需要补上
num = Integer.parseInt(exceptlast) + Integer.parseInt(last)
* no;
return num;
}
}
}
public static int parse(String word) {
int num = 0;
char lastchar = '一'; // 上次字符,字符特指[十百千万亿],默认随便填写一个'一'
char lastshow = '一'; // 上次出现的字符,字符特指[十百千万亿],默认随便填写一个'一'
char[] ch = word.toCharArray();
Boolean bool = false; // 是否连续出现[十百千万亿]
for (int i = 0; i < ch.length; i++) {
Character find = araHash.get(ch[i]);// 获取阿拉伯数字数组[1,2,3...]
if (find != null) {
num += Integer.parseInt(String.valueOf(find.charValue()));
bool = false;
lastchar = '一'; // 恢复到默认值
continue;
} else if (ch[i] == '十') {
num = ywqbs(num, bool, 10, ch.length - i, ch[i], lastshow);
bool = true;
lastchar = '十';
lastshow = '十';
} else if (ch[i] == '千') {
num = ywqbs(num, bool, 1000, ch.length - i, ch[i], lastshow);
bool = true;
lastchar = '千';
lastshow = '千';
} else if (ch[i] == '百') {
num = ywqbs(num, bool, 100, ch.length - i, ch[i], lastshow);
bool = true;
lastchar = '百';
lastshow = '百';
} else if (ch[i] == '万') {
num = ywqbs(num, bool, 10000, ch.length - i, ch[i], lastshow);
bool = true;
lastchar = '万';
lastshow = '万';
}
}
ch = null;
return num;
}
// public static void main(String args[]) {
// String wordes[] = {
// "一千二百二十一万",
// "一千二百二十一",
// "一千零十",
// "一万零一百",
// "一千零十一",
// "一万零一百十一",
// "一千二百十九",
// "一千万",
// "五十五"
// };
// for(int i = 0; i < wordes.length; i++) {
// DigitUtil t = new DigitUtil();
// int num = t.parse(wordes[i]);
// System.out.println(wordes[i] + " " + num);
// }
// }
}
================================================
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Effectstype.java
================================================
package com.cwp.cmoneycharge;
import com.cwp.cmoneycharge.RotateBottom;
import com.cwp.cmoneycharge.Shake;
/**
* Created by lee on 2014/7/30.
*/
public enum Effectstype {
Slidetop(SlideTop.class),
RotateBottom(RotateBottom.class),
Shake(Shake.class);
private Class effectsClazz;
private Effectstype(Class mclass) {
effectsClazz = mclass;
}
publ
gitextract_1ebxno1h/ ├── LICENSE ├── MoneyCharge/ │ ├── .gitignore │ ├── app/ │ │ ├── build.gradle │ │ ├── libs/ │ │ │ ├── Android_Location_V1.3.2.jar │ │ │ ├── Baidu-SpeechRecognitionUI-SDK-Android-1.6.2.jar │ │ │ ├── VoiceRecognition-1.6.2.jar │ │ │ ├── achartengine-1.1.0.jar │ │ │ ├── androidpiechart.jar │ │ │ ├── com.umeng.fb.v5.0.0.jar │ │ │ ├── com.umeng.message.lib1.4.1.jar │ │ │ ├── galaxy.jar │ │ │ └── nineoldandroids-2.4.0.jar │ │ ├── lint.xml │ │ └── src/ │ │ └── main/ │ │ ├── AndroidManifest.xml │ │ ├── java/ │ │ │ ├── com/ │ │ │ │ ├── cwp/ │ │ │ │ │ ├── chart/ │ │ │ │ │ │ ├── BaseFoldingLayout.java │ │ │ │ │ │ ├── ChartProp.java │ │ │ │ │ │ ├── ChartPropChangeListener.java │ │ │ │ │ │ ├── CheckAdapter.java │ │ │ │ │ │ ├── CustomMultiChoiceDialog.java │ │ │ │ │ │ ├── FoldingLayout.java │ │ │ │ │ │ ├── MenuFragment.java │ │ │ │ │ │ ├── MyAdspter.java │ │ │ │ │ │ ├── MyButton.java │ │ │ │ │ │ ├── MyButtonClickListener.java │ │ │ │ │ │ ├── OnFoldListener.java │ │ │ │ │ │ ├── PieChart.java │ │ │ │ │ │ ├── PieView.java │ │ │ │ │ │ ├── PiewController.java │ │ │ │ │ │ ├── PullToRefreshView.java │ │ │ │ │ │ ├── RiseNumberBase.java │ │ │ │ │ │ ├── RiseNumberTextView.java │ │ │ │ │ │ ├── SystemBarTintManager.java │ │ │ │ │ │ └── Util.java │ │ │ │ │ ├── cmoneycharge/ │ │ │ │ │ │ ├── About.java │ │ │ │ │ │ ├── AddPay.java │ │ │ │ │ │ ├── Author.java │ │ │ │ │ │ ├── BaseEffects.java │ │ │ │ │ │ ├── BaseFrament.java │ │ │ │ │ │ ├── Config.java │ │ │ │ │ │ ├── Constants.java │ │ │ │ │ │ ├── CrashApplication.java │ │ │ │ │ │ ├── CrashHandler.java │ │ │ │ │ │ ├── Description.java │ │ │ │ │ │ ├── DialogShowUtil.java │ │ │ │ │ │ ├── DigitUtil.java │ │ │ │ │ │ ├── Effectstype.java │ │ │ │ │ │ ├── FragmentPage1.java │ │ │ │ │ │ ├── FragmentPage2.java │ │ │ │ │ │ ├── FragmentPage3.java │ │ │ │ │ │ ├── FragmentPage4.java │ │ │ │ │ │ ├── InPtypeManager.java │ │ │ │ │ │ ├── IncomeData.java │ │ │ │ │ │ ├── KeyboardUtil.java │ │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ │ ├── ModifyInP.java │ │ │ │ │ │ ├── NiftyDialogBuilder.java │ │ │ │ │ │ ├── PayChart.java │ │ │ │ │ │ ├── PayData.java │ │ │ │ │ │ ├── RotateBottom.java │ │ │ │ │ │ ├── SearchActivity.java │ │ │ │ │ │ ├── SettingActivity.java │ │ │ │ │ │ ├── Shake.java │ │ │ │ │ │ ├── SlideTop.java │ │ │ │ │ │ └── SysApplication.java │ │ │ │ │ └── pattern/ │ │ │ │ │ ├── CreateGesturePasswordActivity.java │ │ │ │ │ ├── GuideGesturePasswordActivity.java │ │ │ │ │ ├── LockPatternUtils.java │ │ │ │ │ ├── LockPatternView.java │ │ │ │ │ ├── ParseXmlService.java │ │ │ │ │ ├── UnlockGesturePasswordActivity.java │ │ │ │ │ └── UpdateManager.java │ │ │ │ ├── example/ │ │ │ │ │ └── testpic/ │ │ │ │ │ ├── AlbumHelper.java │ │ │ │ │ ├── Bimp.java │ │ │ │ │ ├── BitmapCache.java │ │ │ │ │ ├── FileUtils.java │ │ │ │ │ ├── ImageBucket.java │ │ │ │ │ ├── ImageBucketAdapter.java │ │ │ │ │ ├── ImageGridActivity.java │ │ │ │ │ ├── ImageGridAdapter.java │ │ │ │ │ ├── ImageItem.java │ │ │ │ │ ├── NoScrollGridView.java │ │ │ │ │ ├── PhotoActivity.java │ │ │ │ │ ├── PublishedActivity.java │ │ │ │ │ └── TestPicActivity.java │ │ │ │ ├── slidingmenu/ │ │ │ │ │ └── lib/ │ │ │ │ │ ├── CanvasTransformerBuilder.java │ │ │ │ │ ├── CustomViewAbove.java │ │ │ │ │ ├── CustomViewBehind.java │ │ │ │ │ ├── MenuInterface.java │ │ │ │ │ ├── SlidingMenu.java │ │ │ │ │ └── app/ │ │ │ │ │ ├── SlidingActivity.java │ │ │ │ │ ├── SlidingActivityBase.java │ │ │ │ │ ├── SlidingActivityHelper.java │ │ │ │ │ ├── SlidingFragmentActivity.java │ │ │ │ │ ├── SlidingListActivity.java │ │ │ │ │ ├── SlidingMapActivity.java │ │ │ │ │ ├── SlidingPreferenceActivity.java │ │ │ │ │ └── SystemBarTintManager.java │ │ │ │ ├── umeng/ │ │ │ │ │ └── fb/ │ │ │ │ │ └── example/ │ │ │ │ │ ├── AppApplication.java │ │ │ │ │ ├── AppPush.java │ │ │ │ │ ├── CustomActivity.java │ │ │ │ │ └── MyPushIntentService.java │ │ │ │ └── zhy/ │ │ │ │ └── view/ │ │ │ │ ├── HorizontalProgressBarWithNumber.java │ │ │ │ └── RoundProgressBarWidthNumber.java │ │ │ └── cwp/ │ │ │ └── moneycharge/ │ │ │ ├── dao/ │ │ │ │ ├── AccountDAO.java │ │ │ │ ├── DBOpenHelper.java │ │ │ │ ├── IncomeDAO.java │ │ │ │ ├── ItypeDAO.java │ │ │ │ ├── NoteDAO.java │ │ │ │ ├── PayDAO.java │ │ │ │ └── PtypeDAO.java │ │ │ └── model/ │ │ │ ├── ActivityManager.java │ │ │ ├── CustomDialog.java │ │ │ ├── Datapicker.java │ │ │ ├── KindData.java │ │ │ ├── Tb_account.java │ │ │ ├── Tb_income.java │ │ │ ├── Tb_itype.java │ │ │ ├── Tb_note.java │ │ │ ├── Tb_pay.java │ │ │ └── Tb_ptype.java │ │ └── res/ │ │ ├── anim/ │ │ │ ├── animation_1.xml │ │ │ ├── animation_2.xml │ │ │ ├── fade_ins.xml │ │ │ ├── hold.xml │ │ │ ├── in_from_right.xml │ │ │ ├── interpolator_cycle.xml │ │ │ ├── out_to_left.xml │ │ │ ├── push_bottom_in.xml │ │ │ ├── push_bottom_in_2.xml │ │ │ ├── push_up_in.xml │ │ │ ├── push_up_out.xml │ │ │ ├── shake.xml │ │ │ ├── shake_x.xml │ │ │ └── shake_y.xml │ │ ├── color/ │ │ │ ├── cost_text.xml │ │ │ ├── tab_friendfeed_text.xml │ │ │ ├── tab_home_text.xml │ │ │ ├── tab_more_text.xml │ │ │ └── tab_myfeed_text.xml │ │ ├── drawable/ │ │ │ ├── addphoto_btn.xml │ │ │ ├── bg_border.xml │ │ │ ├── bgd_relatly_line.xml │ │ │ ├── bt_add_pic.xml │ │ │ ├── bt_nobgd.xml │ │ │ ├── bt_queding.xml │ │ │ ├── bt_quxiao.xml │ │ │ ├── bt_shanchu.xml │ │ │ ├── btn_cancel_selector.xml │ │ │ ├── btn_login_selector.xml │ │ │ ├── btn_press.xml │ │ │ ├── btn_selector.xml │ │ │ ├── btn_unpress.xml │ │ │ ├── chart_left_btn.xml │ │ │ ├── chart_right_btn.xml │ │ │ ├── chart_silding_btn.xml │ │ │ ├── checkbox.xml │ │ │ ├── common_btn_green.xml │ │ │ ├── common_btn_red.xml │ │ │ ├── corner_bdbdbd.xml │ │ │ ├── corner_e0e0e0.xml │ │ │ ├── corner_f2f2f2.xml │ │ │ ├── dialog_bg.xml │ │ │ ├── dialog_bottom_bg.xml │ │ │ ├── fb_send_btn_bg.xml │ │ │ ├── keyboard_key.xml │ │ │ ├── locate_btn.xml │ │ │ ├── search_button_type.xml │ │ │ ├── selector.xml │ │ │ ├── shadow.xml │ │ │ ├── skin_color_button.xml │ │ │ ├── tab_friendfeed_btn.xml │ │ │ ├── tab_home_btn.xml │ │ │ ├── tab_more_btn.xml │ │ │ ├── tab_myfeed_btn.xml │ │ │ ├── text_while.xml │ │ │ └── welcome_bg.xml │ │ ├── drawable-hdpi/ │ │ │ ├── common_lv_item_for_metadata_bg.xml │ │ │ ├── common_lv_item_higher_bg.xml │ │ │ ├── common_toolbar_btn.xml │ │ │ ├── common_toolbar_btn_small.xml │ │ │ ├── form_row_input_middle.xml │ │ │ ├── form_row_input_middle_short_left.xml │ │ │ ├── form_row_input_middle_short_right.xml │ │ │ ├── form_row_input_top.xml │ │ │ ├── income_tab_btn_radio.xml │ │ │ ├── main_add_expense_quickly.xml │ │ │ ├── main_row_stat.xml │ │ │ └── payout_tab_btn_radio.xml │ │ ├── layout/ │ │ │ ├── about.xml │ │ │ ├── account.xml │ │ │ ├── activity_custom.xml │ │ │ ├── activity_image_bucket.xml │ │ │ ├── activity_image_grid.xml │ │ │ ├── activity_index.xml │ │ │ ├── activity_main.xml │ │ │ ├── activity_photo.xml │ │ │ ├── activity_selectimg.xml │ │ │ ├── add.xml │ │ │ ├── addincome.xml │ │ │ ├── addnote.xml │ │ │ ├── addpay.xml │ │ │ ├── author.xml │ │ │ ├── changepwd.xml │ │ │ ├── child.xml │ │ │ ├── custom_fb_dev_reply.xml │ │ │ ├── custom_fb_user_reply.xml │ │ │ ├── custom_view.xml │ │ │ ├── data.xml │ │ │ ├── description.xml │ │ │ ├── dialog.xml │ │ │ ├── dialog_layout.xml │ │ │ ├── dialog_multichoice_item.xml │ │ │ ├── dialog_multichoice_layout.xml │ │ │ ├── fragment_1.xml │ │ │ ├── fragment_2.xml │ │ │ ├── fragment_3.xml │ │ │ ├── fragment_4.xml │ │ │ ├── fragment_5.xml │ │ │ ├── fragnew_3.xml │ │ │ ├── frame_menu.xml │ │ │ ├── gesturepassword_create.xml │ │ │ ├── gesturepassword_guide.xml │ │ │ ├── gesturepassword_unlock.xml │ │ │ ├── group.xml │ │ │ ├── gvitem.xml │ │ │ ├── income.xml │ │ │ ├── incomedata.xml │ │ │ ├── infomanage.xml │ │ │ ├── inptypemanager.xml │ │ │ ├── item_image_bucket.xml │ │ │ ├── item_image_grid.xml │ │ │ ├── item_popupwindows.xml │ │ │ ├── item_published_grida.xml │ │ │ ├── list.xml │ │ │ ├── login.xml │ │ │ ├── modifyinp.xml │ │ │ ├── modifynote.xml │ │ │ ├── note.xml │ │ │ ├── notification_item.xml │ │ │ ├── pay.xml │ │ │ ├── paychart.xml │ │ │ ├── paydata.xml │ │ │ ├── pidata.xml │ │ │ ├── popwindow_layout.xml │ │ │ ├── preview_layout.xml │ │ │ ├── refresh_footer.xml │ │ │ ├── refresh_header.xml │ │ │ ├── register.xml │ │ │ ├── search_activity.xml │ │ │ ├── setting.xml │ │ │ ├── showinfo.xml │ │ │ ├── slidingmenumain.xml │ │ │ ├── softupdate_progress.xml │ │ │ ├── spinner.xml │ │ │ └── voice_setting.xml │ │ ├── menu/ │ │ │ └── index.xml │ │ ├── values/ │ │ │ ├── attr_progress_bar.xml │ │ │ ├── attrs.xml │ │ │ ├── colors.xml │ │ │ ├── dimens.xml │ │ │ ├── ids.xml │ │ │ ├── moneychargetype.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ ├── values-sw600dp/ │ │ │ └── dimens.xml │ │ ├── values-sw720dp-land/ │ │ │ └── dimens.xml │ │ ├── values-v11/ │ │ │ └── styles.xml │ │ ├── values-v14/ │ │ │ └── styles.xml │ │ └── xml/ │ │ ├── menu.xml │ │ └── symbols_num.xml │ ├── build.gradle │ ├── gradle/ │ │ └── wrapper/ │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── import-summary.txt │ └── settings.gradle └── README.md
SYMBOL INDEX (1408 symbols across 105 files)
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/BaseFoldingLayout.java
class BaseFoldingLayout (line 57) | public class BaseFoldingLayout extends ViewGroup {
type Orientation (line 71) | public static enum Orientation {
method BaseFoldingLayout (line 122) | public BaseFoldingLayout(Context context) {
method BaseFoldingLayout (line 126) | public BaseFoldingLayout(Context context, AttributeSet attrs) {
method BaseFoldingLayout (line 131) | public BaseFoldingLayout(Context context, AttributeSet attrs, int defS...
method init (line 136) | public void init(Context context, AttributeSet attrs) {
method addViewInLayout (line 150) | @Override
method addView (line 159) | @Override
method onMeasure (line 165) | @Override
method onLayout (line 172) | @Override
class NumberOfFoldingLayoutChildrenException (line 183) | private class NumberOfFoldingLayoutChildrenException extends
method NumberOfFoldingLayoutChildrenException (line 190) | public NumberOfFoldingLayoutChildrenException(String message) {
method throwCustomException (line 199) | private void throwCustomException(int numOfChildViews) {
method setFoldListener (line 206) | public void setFoldListener(OnFoldListener foldListener) {
method setFoldFactor (line 215) | public void setFoldFactor(float foldFactor) {
method setOrientation (line 223) | public void setOrientation(Orientation orientation) {
method setAnchorFactor (line 230) | public void setAnchorFactor(float anchorFactor) {
method setNumberOfFolds (line 237) | public void setNumberOfFolds(int numberOfFolds) {
method getAnchorFactor (line 244) | public float getAnchorFactor() {
method getOrientation (line 248) | public Orientation getOrientation() {
method getFoldFactor (line 252) | public float getFoldFactor() {
method getNumberOfFolds (line 256) | public int getNumberOfFolds() {
method updateFold (line 260) | private void updateFold() {
method prepareFold (line 276) | private void prepareFold(Orientation orientation, float anchorFactor,
method calculateMatrices (line 366) | private void calculateMatrices() {
method dispatchDraw (line 586) | @Override
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/ChartProp.java
class ChartProp (line 7) | public class ChartProp {
method ChartProp (line 20) | public ChartProp(View chartView) {
method setId (line 24) | public void setId(int id) {
method getId (line 29) | public int getId() {
method setPercent (line 38) | public void setPercent(float percent) {
method getPercent (line 46) | public float getPercent() {
method getSweepAngle (line 50) | public float getSweepAngle() {
method setColor (line 54) | public void setColor(int color) {
method getColor (line 59) | public int getColor() {
method getName (line 63) | public String getName() {
method setName (line 67) | public void setName(String name) {
method getName2 (line 72) | public String getName2() {
method setName2 (line 76) | public void setName2(String name) {
method invalidate (line 81) | private void invalidate() {
method getStartAngle (line 87) | public float getStartAngle() {
method setStartAngle (line 91) | public void setStartAngle(float startAngle) {
method getEndAngle (line 95) | public float getEndAngle() {
method setEndAngle (line 99) | public void setEndAngle(float endAngle) {
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/ChartPropChangeListener.java
type ChartPropChangeListener (line 3) | public interface ChartPropChangeListener {
method getChartProp (line 4) | public void getChartProp(ChartProp chartProp);
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/CheckAdapter.java
class CheckAdapter (line 14) | public class CheckAdapter extends BaseAdapter {
class ViewHolder (line 16) | private class ViewHolder {
method CheckAdapter (line 26) | public CheckAdapter(Context context, String[] names, boolean[] checked...
method getCount (line 35) | @Override
method getItem (line 40) | @Override
method getItemId (line 45) | @Override
method getItemView (line 50) | public View getItemView(int position) {
method getCheckedItem (line 54) | public boolean[] getCheckedItem() {
method getView (line 67) | public View getView(int position, View convertView, ViewGroup parent) {
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/CustomMultiChoiceDialog.java
class CustomMultiChoiceDialog (line 22) | public class CustomMultiChoiceDialog extends Dialog {
method CustomMultiChoiceDialog (line 24) | public CustomMultiChoiceDialog(Context context) {
method CustomMultiChoiceDialog (line 28) | public CustomMultiChoiceDialog(Context context, int theme) {
class Builder (line 32) | public static class Builder {
method Builder (line 50) | public Builder(Context context) {
method setMessage (line 54) | public Builder setMessage(String message) {
method getListView (line 59) | public ListView getListView() {
method getCheckedItems (line 63) | public boolean[] getCheckedItems() {
method setMessage (line 77) | public Builder setMessage(int message) {
method setTitle (line 88) | public Builder setTitle(int title) {
method setTitle (line 100) | public Builder setTitle(String title) {
method setContentView (line 105) | public Builder setContentView(View v) {
method setPositiveButton (line 116) | public Builder setPositiveButton(int positiveButtonText,
method setPositiveButton (line 124) | public Builder setPositiveButton(String positiveButtonText,
method setNegativeButton (line 131) | public Builder setNegativeButton(int negativeButtonText,
method setNegativeButton (line 139) | public Builder setNegativeButton(String negativeButtonText,
method setMultiChoiceItems (line 157) | public Builder setMultiChoiceItems(boolean isMultiChoice,
method create (line 168) | public CustomMultiChoiceDialog create() {
class OnMultiItemClick (line 351) | class OnMultiItemClick implements OnItemClickListener {
method onItemClick (line 352) | @Override
method getisMultiChoice (line 364) | public static boolean getisMultiChoice() {
method getcontact_name (line 368) | public static String getcontact_name() {
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/FoldingLayout.java
class FoldingLayout (line 47) | public class FoldingLayout extends BaseFoldingLayout {
method FoldingLayout (line 61) | public FoldingLayout(Context context) {
method FoldingLayout (line 67) | public FoldingLayout(Context context, AttributeSet attrs) {
method FoldingLayout (line 73) | public FoldingLayout(Context context, AttributeSet attrs, int defStyle) {
method init (line 79) | public void init(Context context, AttributeSet attrs) {
method addViewInLayout (line 87) | @Override
class NumberOfFoldingLayoutChildrenException (line 100) | private class NumberOfFoldingLayoutChildrenException extends
method NumberOfFoldingLayoutChildrenException (line 107) | public NumberOfFoldingLayoutChildrenException(String message) {
method throwCustomException (line 116) | private void throwCustomException(int numOfChildViews) {
class ScrollGestureDetector (line 124) | private class ScrollGestureDetector extends
method onDown (line 126) | @Override
method onScroll (line 144) | @Override
method onTouchEvent (line 201) | @Override
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/MenuFragment.java
class MenuFragment (line 26) | public class MenuFragment extends PreferenceFragment implements
method onCreate (line 30) | @Override
method setTranslucentStatus (line 55) | @TargetApi(19)
method onPreferenceClick (line 68) | @Override
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/MyAdspter.java
class MyAdspter (line 20) | public class MyAdspter extends BaseAdapter {
method MyAdspter (line 28) | public MyAdspter(Context context, List<Map<String, Object>> data,
method getCount (line 36) | @Override
method getItem (line 44) | @Override
method getItemId (line 52) | @Override
class Zujian (line 62) | public final class Zujian {
method getView (line 76) | @Override
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/MyButton.java
class MyButton (line 23) | public class MyButton extends View implements View.OnTouchListener {
method setWidth (line 35) | public void setWidth(float width) {
method setHeight (line 39) | public void setHeight(float height) {
method setMyButtonClickListener (line 43) | public void setMyButtonClickListener(MyButtonClickListener listener) {
method setBackgroundPaintColor (line 47) | public void setBackgroundPaintColor(int color) {
method onMeasure (line 52) | @Override
method draw (line 65) | @Override
method MyButton (line 87) | public MyButton(Context context, AttributeSet attrs, int defStyle) {
method MyButton (line 92) | public MyButton(Context context, AttributeSet attrs) {
method MyButton (line 97) | public MyButton(Context context) {
method init (line 102) | private void init() {
method getRadius (line 113) | private float getRadius() {
method onTouch (line 122) | @Override
method createBitmap (line 145) | public Bitmap createBitmap(Bitmap b, float x, float y) {
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/MyButtonClickListener.java
type MyButtonClickListener (line 3) | public interface MyButtonClickListener {
method onclick (line 4) | public void onclick();
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/OnFoldListener.java
type OnFoldListener (line 24) | public interface OnFoldListener {
method onStartFold (line 25) | public void onStartFold(float foldFactor);
method onFoldingState (line 26) | public void onFoldingState(float foldFactor, float foldDrawHeight);
method onEndFold (line 27) | public void onEndFold(float foldFactor);
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/PieChart.java
class PieChart (line 13) | public class PieChart extends ViewGroup {
method PieChart (line 15) | public PieChart(Context context, AttributeSet attrs, int defStyle) {
method PieChart (line 20) | public PieChart(Context context, AttributeSet attrs) {
method PieChart (line 25) | public PieChart(Context context) {
method init (line 30) | private void init() {
method onMeasure (line 40) | @Override
method onLayout (line 56) | @Override
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/PieView.java
class PieView (line 30) | public class PieView extends View implements View.OnTouchListener, Runna...
method setBackgroundPaintColor (line 64) | public void setBackgroundPaintColor(int color) {
method writeLog (line 69) | private void writeLog(String string) {
method destory (line 73) | public void destory() {
method draw (line 78) | @Override
method PieView (line 131) | public PieView(Context context, AttributeSet attrs, int defStyle) {
method PieView (line 136) | public PieView(Context context, AttributeSet attrs) {
method PieView (line 141) | public PieView(Context context) {
method init (line 146) | private void init() {
method start (line 174) | public void start() {
method run (line 178) | @Override
method createBitmap (line 198) | private Bitmap createBitmap(Bitmap b, float x, float y) {
method createCharts (line 217) | public ArrayList<ChartProp> createCharts(int itemCount) {
method reInit (line 227) | public void reInit() {
method initPercents (line 233) | public void initPercents() {
method setChartPropChangeListener (line 244) | public void setChartPropChangeListener(ChartPropChangeListener listene...
method createChartProp (line 254) | private void createChartProp(int chartsNum) {
method createNullChartProp (line 262) | public ChartProp createNullChartProp() {
method initResoure (line 269) | private void initResoure() {
method onMeasure (line 290) | @Override
method measureWidth (line 302) | private int measureWidth(int pWidthMeasureSpec) {
method measureHeight (line 335) | private int measureHeight(int pHeightMeasureSpec) {
method firstInit (line 350) | private void firstInit() {
method getCurrentChartProp (line 383) | public void getCurrentChartProp(ChartProp chartProp, float f) {
method drawableCenterCircle (line 392) | public void drawableCenterCircle(float x, float y) {
method getBorderAngle (line 423) | private float getBorderAngle() {
method getCurrentChartProp (line 448) | public ChartProp getCurrentChartProp() {
method drawItem (line 470) | public void drawItem(RectF localRectf) {
method isRotateEnabled (line 507) | public boolean isRotateEnabled() {
method setRotateEnabled (line 511) | public void setRotateEnabled(boolean rotateEnabled) {
method rotateEnable (line 515) | public void rotateEnable() {
method rotateDisable (line 519) | public void rotateDisable() {
method onTouch (line 523) | @Override
method getAngle (line 606) | private float getAngle(float x, float y) {
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/PiewController.java
class PiewController (line 9) | public class PiewController {
method getWidth (line 14) | public static int getWidth(View view) {
method getHeight (line 26) | public static int getHeight(View view) {
method setLayoutX (line 38) | public static void setLayoutX(View view, int x) {
method setLayoutY (line 51) | public static void setLayoutY(View view, int y) {
method setLayout (line 64) | public static void setLayout(View view, int x, int y) {
method measureWidth (line 73) | public static int measureWidth(int pWidthMeasureSpec) {
method measureHeight (line 106) | public static int measureHeight(int pHeightMeasureSpec) {
method mySetMargins (line 121) | public static void mySetMargins(View view, int left, int top, int right,
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/PullToRefreshView.java
class PullToRefreshView (line 29) | public class PullToRefreshView extends LinearLayout {
method PullToRefreshView (line 130) | public PullToRefreshView(Context context, AttributeSet attrs) {
method PullToRefreshView (line 135) | public PullToRefreshView(Context context) {
method init (line 140) | private void init() {
method addHeaderView (line 160) | private void addHeaderView() {
method addFooterView (line 184) | private void addFooterView() {
method onFinishInflate (line 206) | @Override
method initContentAdapterView (line 214) | private void initContentAdapterView() {
method measureView (line 235) | private void measureView(View child) {
method onInterceptTouchEvent (line 255) | @Override
method onTouchEvent (line 281) | @Override
method isRefreshViewScroll (line 339) | private boolean isRefreshViewScroll(int deltaY) {
method headerPrepareToRefresh (line 413) | private void headerPrepareToRefresh(int deltaY) {
method footerPrepareToRefresh (line 441) | private void footerPrepareToRefresh(int deltaY) {
method changingHeaderViewTopMargin (line 461) | private int changingHeaderViewTopMargin(int deltaY) {
method headerRefreshing (line 481) | public void headerRefreshing() {
method footerRefreshing (line 494) | private void footerRefreshing() {
method setHeaderTopMargin (line 512) | private void setHeaderTopMargin(int topMargin) {
method onHeaderRefreshComplete (line 523) | public void onHeaderRefreshComplete() {
method onHeaderRefreshComplete (line 533) | public void onHeaderRefreshComplete(CharSequence lastUpdated) {
method onFooterRefreshComplete (line 541) | public void onFooterRefreshComplete() {
method onFooterRefreshComplete (line 554) | public void onFooterRefreshComplete(int size) {
method setLastUpdated (line 569) | public void setLastUpdated(CharSequence lastUpdated) {
method getHeaderTopMargin (line 578) | private int getHeaderTopMargin() {
method setOnHeaderRefreshListener (line 601) | public void setOnHeaderRefreshListener(
method setOnFooterRefreshListener (line 606) | public void setOnFooterRefreshListener(
type OnFooterRefreshListener (line 611) | public interface OnFooterRefreshListener {
method onFooterRefresh (line 612) | public void onFooterRefresh(PullToRefreshView view);
type OnHeaderRefreshListener (line 615) | public interface OnHeaderRefreshListener {
method onHeaderRefresh (line 616) | public void onHeaderRefresh(PullToRefreshView view);
method isEnablePullTorefresh (line 619) | public boolean isEnablePullTorefresh() {
method setEnablePullTorefresh (line 623) | public void setEnablePullTorefresh(boolean enablePullTorefresh) {
method isEnablePullLoadMoreDataStatus (line 627) | public boolean isEnablePullLoadMoreDataStatus() {
method setEnablePullLoadMoreDataStatus (line 631) | public void setEnablePullLoadMoreDataStatus(
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/RiseNumberBase.java
type RiseNumberBase (line 3) | public interface RiseNumberBase {
method start (line 4) | public void start();
method withNumber (line 5) | public RiseNumberTextView withNumber(float number);
method withNumber (line 6) | public RiseNumberTextView withNumber(int number);
method setDuration (line 7) | public RiseNumberTextView setDuration(long duration);
method setOnEnd (line 8) | public void setOnEnd(RiseNumberTextView.EndListener callback);
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/RiseNumberTextView.java
class RiseNumberTextView (line 11) | public class RiseNumberTextView extends TextView implements RiseNumberBa...
method RiseNumberTextView (line 36) | public RiseNumberTextView(Context context) {
method RiseNumberTextView (line 40) | public RiseNumberTextView(Context context, AttributeSet attr) {
method RiseNumberTextView (line 44) | public RiseNumberTextView(Context context, AttributeSet attr, int defS...
type EndListener (line 48) | public interface EndListener {
method onEndFinish (line 49) | public void onEndFinish();
method isRunning (line 52) | public boolean isRunning() {
method runFloat (line 56) | private void runFloat() {
method runInt (line 78) | private void runInt() {
method sizeOfInt (line 99) | static int sizeOfInt(int x) {
method onFinishInflate (line 105) | @Override
method start (line 111) | @Override
method withNumber (line 123) | @Override
method withNumber (line 139) | @Override
method setDuration (line 154) | @Override
method setOnEnd (line 160) | @Override
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/SystemBarTintManager.java
class SystemBarTintManager (line 46) | public class SystemBarTintManager {
method SystemBarTintManager (line 79) | @TargetApi(19)
method setStatusBarTintEnabled (line 133) | public void setStatusBarTintEnabled(boolean enabled) {
method setStatusBarDarkMode (line 145) | public void setStatusBarDarkMode(boolean darkmode, Activity activity) {
method setNavigationBarTintEnabled (line 170) | public void setNavigationBarTintEnabled(boolean enabled) {
method setTintColor (line 182) | public void setTintColor(int color) {
method setTintResource (line 192) | public void setTintResource(int res) {
method setTintDrawable (line 202) | public void setTintDrawable(Drawable drawable) {
method setTintAlpha (line 212) | public void setTintAlpha(float alpha) {
method setStatusBarTintColor (line 222) | public void setStatusBarTintColor(int color) {
method setStatusBarTintResource (line 233) | public void setStatusBarTintResource(int res) {
method setStatusBarTintDrawable (line 244) | @SuppressWarnings("deprecation")
method setStatusBarAlpha (line 256) | @TargetApi(11)
method setNavigationBarTintColor (line 268) | public void setNavigationBarTintColor(int color) {
method setNavigationBarTintResource (line 279) | public void setNavigationBarTintResource(int res) {
method setNavigationBarTintDrawable (line 290) | @SuppressWarnings("deprecation")
method setNavigationBarAlpha (line 302) | @TargetApi(11)
method getConfig (line 314) | public SystemBarConfig getConfig() {
method isStatusBarTintEnabled (line 323) | public boolean isStatusBarTintEnabled() {
method isNavBarTintEnabled (line 332) | public boolean isNavBarTintEnabled() {
method setupStatusBarView (line 336) | private void setupStatusBarView(Context context, ViewGroup decorViewGr...
method setupNavBarView (line 349) | private void setupNavBarView(Context context, ViewGroup decorViewGroup) {
class SystemBarConfig (line 370) | public static class SystemBarConfig {
method SystemBarConfig (line 387) | private SystemBarConfig(Activity activity, boolean translucentStatus...
method getActionBarHeight (line 400) | @TargetApi(14)
method getNavigationBarHeight (line 411) | @TargetApi(14)
method getNavigationBarWidth (line 429) | @TargetApi(14)
method getInternalDimensionSize (line 441) | private int getInternalDimensionSize(Resources res, String key) {
method getSmallestWidthDp (line 450) | @SuppressLint("NewApi")
method isNavigationAtBottom (line 471) | public boolean isNavigationAtBottom() {
method getStatusBarHeight (line 480) | public int getStatusBarHeight() {
method getActionBarHeight (line 489) | public int getActionBarHeight() {
method hasNavigtionBar (line 498) | public boolean hasNavigtionBar() {
method getNavigationBarHeight (line 508) | public int getNavigationBarHeight() {
method getNavigationBarWidth (line 518) | public int getNavigationBarWidth() {
method getPixelInsetTop (line 528) | public int getPixelInsetTop(boolean withActionBar) {
method getPixelInsetBottom (line 537) | public int getPixelInsetBottom() {
method getPixelInsetRight (line 550) | public int getPixelInsetRight() {
FILE: MoneyCharge/app/src/main/java/com/cwp/chart/Util.java
class Util (line 5) | public class Util {
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/About.java
class About (line 41) | public class About extends Activity {
method About (line 58) | public About() {
method onCreate (line 62) | @Override
method setTranslucentStatus (line 95) | @TargetApi(19)
method onStart (line 108) | @Override
method onActivityResult (line 264) | @Override
method getVersion (line 287) | public static String getVersion(Context context)// 获取版本号
method onKeyDown (line 300) | public boolean onKeyDown(int keyCode, KeyEvent event) {
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/AddPay.java
class AddPay (line 81) | public class AddPay extends Activity implements AMapLocationListener,
method AddPay (line 142) | public AddPay() {
method onCreate (line 146) | @Override
method setTranslucentStatus (line 267) | @TargetApi(19)
method initData (line 280) | private void initData(int userid) { // 初始化数据
method initphotodata (line 338) | private void initphotodata(String photo) { // 初始化图片数据
method initphoto (line 357) | @SuppressWarnings("deprecation")
method updatetype (line 372) | private void updatetype() { // 更新类别
method onStart (line 383) | @Override
method get2Double (line 598) | public static double get2Double(String strMoney) { // 处理小数点
method onCreateDialog (line 604) | @Override
method onDateSet (line 616) | public void onDateSet(DatePicker view, int year, int monthOfYear,
method updateDisplay (line 625) | private void updateDisplay() {
method setTimeFormat (line 633) | private String setTimeFormat(String newtxtTime) { // 设置日期格式
method VoiceRecognition (line 667) | void VoiceRecognition() { // 调用百度语音识别
method VoiceSuccess (line 698) | void VoiceSuccess() { // 识别成功录入数据
method Recognition (line 783) | private void Recognition(String t) {
method listToString (line 906) | public String listToString(List list, char separator) {
method gotoback (line 917) | private boolean gotoback() { // 返回
method onKeyDown (line 943) | public boolean onKeyDown(int keyCode, KeyEvent event) {
method onDestroy (line 950) | @Override
method onPause (line 961) | @Override
method onResume (line 970) | protected void onResume() {
method onLocationChanged (line 983) | @Override
method onStatusChanged (line 987) | @Override
method onProviderEnabled (line 991) | @Override
method onProviderDisabled (line 995) | @Override
method onLocationChanged (line 999) | @Override
method onClick (line 1013) | @Override
method onActivityResult (line 1028) | protected void onActivityResult(int requestCode, int resultCode, Inten...
method showVoiveDialog (line 1057) | public static void showVoiveDialog() {
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Author.java
class Author (line 11) | public class Author extends Activity {
method Author (line 14) | public Author() {
method onCreate (line 17) | @Override
method onStart (line 24) | @Override
method onKeyDown (line 32) | public boolean onKeyDown(int keyCode, KeyEvent event) {
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/BaseEffects.java
class BaseEffects (line 37) | public abstract class BaseEffects {
method setupAnimation (line 49) | protected abstract void setupAnimation(View view);
method start (line 51) | public void start(View view) {
method reset (line 56) | public void reset(View view) {
method getAnimatorSet (line 62) | public AnimatorSet getAnimatorSet() {
method setDuration (line 66) | public void setDuration(long duration) {
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/BaseFrament.java
class BaseFrament (line 5) | abstract public class BaseFrament extends Fragment {
method filngtonext (line 6) | public void filngtonext() {
method filngtonpre (line 10) | public void filngtonpre(){
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Config.java
class Config (line 11) | public class Config {
method getPushlog (line 18) | public static int getPushlog() {
method setPushlog (line 22) | public static void setPushlog(int pushlog) {
method getCurrentLanguage (line 40) | public static String getCurrentLanguage() {
method getCurrentLanguageIndex (line 44) | public static int getCurrentLanguageIndex() {
method setCurrentLanguageIndex (line 48) | public static void setCurrentLanguageIndex(int index) {
method getCurrentPropIndex (line 65) | public static int getCurrentPropIndex() {
method setCurrentPropIndex (line 69) | public static void setCurrentPropIndex(int index) {
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Constants.java
class Constants (line 3) | public class Constants {
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/CrashApplication.java
class CrashApplication (line 11) | public class CrashApplication extends Application {
method getInstance (line 19) | public static CrashApplication getInstance() {
method onCreate (line 23) | @Override
method getLockPatternUtils (line 37) | public LockPatternUtils getLockPatternUtils() {
class LockScreenReceiver (line 41) | class LockScreenReceiver extends BroadcastReceiver {
method onReceive (line 42) | @Override
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/CrashHandler.java
class CrashHandler (line 42) | public class CrashHandler implements UncaughtExceptionHandler {
method CrashHandler (line 55) | private CrashHandler() {
method getInstance (line 60) | public static CrashHandler getInstance() {
method init (line 69) | public void init(Context context) {
method uncaughtException (line 84) | @SuppressWarnings("static-access")
method handleException (line 107) | public boolean handleException(Throwable ex) {
method sendreport (line 135) | protected void sendreport(Context mContext) {
method sendAppCrashReport (line 144) | public void sendAppCrashReport(Context mContext, File file) { // 通过系统分...
method collectDeviceInfo (line 166) | public void collectDeviceInfo(Context context) {
method saveCrashInfo2File (line 196) | private File saveCrashInfo2File(Throwable ex) {
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Description.java
class Description (line 9) | public class Description extends Activity{
method Description (line 13) | public Description() {
method onCreate (line 17) | @Override
method onStart (line 24) | @Override
method onKeyDown (line 31) | public boolean onKeyDown(int keyCode, KeyEvent event) {
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/DialogShowUtil.java
class DialogShowUtil (line 8) | public class DialogShowUtil {
method DialogShowUtil (line 17) | public DialogShowUtil(Activity act, Context ctx, String[] VoiceSave,
method dialogShow (line 26) | public void dialogShow(String showtype, String style,
method dialoggettype (line 238) | public static String dialoggettype() {
method dialogVoiceDefault (line 242) | public static String dialogVoiceDefault() {
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/DigitUtil.java
class DigitUtil (line 10) | public class DigitUtil {
method ywqbs (line 51) | private static int ywqbs(int num, Boolean bool, int no, int remain,
method parse (line 93) | public static int parse(String word) {
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Effectstype.java
type Effectstype (line 10) | public enum Effectstype {
method Effectstype (line 18) | private Effectstype(Class mclass) {
method getAnimator (line 22) | public BaseEffects getAnimator() {
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/FragmentPage1.java
class FragmentPage1 (line 40) | public class FragmentPage1 extends BaseFrament {
method Pay (line 49) | public void Pay() {
method onCreateView (line 66) | @Override
method onActivityCreated (line 73) | public void onActivityCreated(Bundle savedInstanceState) {
method onStart (line 85) | @Override
method Showamount (line 129) | private void Showamount() {
method ShowInfo (line 140) | private void ShowInfo(int intType) {// 用来根据传入的管理类型,显示相应的信息
method filngtonext (line 208) | @Override
method filngtonpre (line 213) | @Override
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/FragmentPage2.java
class FragmentPage2 (line 27) | public class FragmentPage2 extends Fragment implements OnClickListener {
method FragmentPage2 (line 61) | public FragmentPage2(FragmentActivity activity) {
method FragmentPage2 (line 65) | public FragmentPage2() {
method onCreateView (line 68) | @Override
method onActivityCreated (line 75) | public void onActivityCreated(Bundle savedInstanceState) {
method initView (line 106) | public void initView() {
method initData (line 128) | private void initData() {
method onClick (line 139) | @Override
method clickPop_photoViewBtn (line 176) | private void clickPop_photoViewBtn() {
method showPopupWindow (line 186) | private void showPopupWindow(View parent) {
method clickFriendfeedBtn (line 252) | public static void clickFriendfeedBtn() {
method clickMyfeedBtn (line 281) | public static void clickMyfeedBtn() {
method clickHomeBtn (line 296) | public static void clickHomeBtn() {
method clickMoreBtn (line 323) | public static void clickMoreBtn() {
method clickPop_voiceBtn (line 347) | private void clickPop_voiceBtn() {
method clickPop_quickBtn (line 355) | private void clickPop_quickBtn() {
method clickToggleBtn (line 366) | private void clickToggleBtn() {
method changeButtonImage (line 376) | private void changeButtonImage() {
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/FragmentPage3.java
class FragmentPage3 (line 56) | @SuppressLint("InflateParams")
method onCreateView (line 89) | @Override
method onActivityCreated (line 96) | public void onActivityCreated(Bundle savedInstanceState) {
method initData (line 134) | private void initData(int newyear) {
method gofordate (line 286) | static String gofordate(String s) {
method findViews (line 304) | private void findViews() {
class ExpandableAdapter (line 366) | class ExpandableAdapter extends BaseExpandableListAdapter {
method ExpandableAdapter (line 374) | public ExpandableAdapter(Context context,
method getChild (line 382) | @Override
method getChildId (line 387) | @Override
method getChildView (line 393) | @SuppressWarnings("unchecked")
method getChildrenCount (line 445) | @Override
method getGroup (line 454) | @Override
method getGroupCount (line 459) | @Override
method getGroupId (line 464) | @Override
method getGroupView (line 470) | @Override
method hasStableIds (line 511) | @Override
method isChildSelectable (line 516) | @Override
method onFooterRefresh (line 523) | @Override
method onHeaderRefresh (line 535) | @Override
method handleMessage (line 550) | @Override
method onActivityResult (line 571) | @Override
method getyear (line 580) | public static int getyear() {
method filngtonext (line 584) | @Override
method filngtonpre (line 590) | @Override
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/FragmentPage4.java
class FragmentPage4 (line 28) | public class FragmentPage4 extends BaseFrament{
method Setting (line 34) | public void Setting() {
method onCreateView (line 38) | @Override
method onActivityCreated (line 45) | public void onActivityCreated(Bundle savedInstanceState) {
method onStart (line 56) | @Override
method alarmDialog (line 107) | private void alarmDialog(int type) { // 退出程序的方法
method filngtonext (line 206) | @Override
method filngtonpre (line 212) | @Override
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/InPtypeManager.java
class InPtypeManager (line 39) | public class InPtypeManager extends Activity {
method InPtypeManager (line 41) | public InPtypeManager() {
method onCreate (line 55) | @Override
method setTranslucentStatus (line 78) | @TargetApi(19)
method onStart (line 91) | @Override
method inputTitleDialog (line 127) | private void inputTitleDialog() {
method deleteDialog (line 155) | private void deleteDialog() { // 退出程序的方法
method onDeleteClick (line 189) | public void onDeleteClick() {
method refresh (line 214) | public void refresh() {
method onKeyDown (line 222) | public boolean onKeyDown(int keyCode, KeyEvent event) {
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/IncomeData.java
class IncomeData (line 37) | public class IncomeData extends Activity {
method IncomeData (line 61) | public IncomeData() {
method onCreate (line 64) | @Override
method onStart (line 101) | @Override
method getAnyDate (line 274) | public void getAnyDate(){
method getRandomColor (line 279) | private int getRandomColor() {// 分别产生RBG数值
method onKeyDown (line 287) | public boolean onKeyDown(int keyCode, KeyEvent event) {
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/KeyboardUtil.java
class KeyboardUtil (line 18) | public class KeyboardUtil {
method KeyboardUtil (line 31) | public KeyboardUtil(Activity act, Context ctx, EditText edit,
method swipeUp (line 48) | @Override
method swipeRight (line 52) | @Override
method swipeLeft (line 56) | @Override
method swipeDown (line 60) | @Override
method onText (line 64) | @Override
method onRelease (line 68) | @Override
method onPress (line 72) | @Override
method onKey (line 76) | @Override
method goforkey (line 81) | private void goforkey(int primaryCode, int[] keyCodes) {
method showKeyboard (line 138) | public void showKeyboard() {
method hideKeyboard (line 145) | public void hideKeyboard() {
method isword (line 152) | private boolean isword(String str) {
type InputFinishListener (line 160) | public interface InputFinishListener {
method inputHasOver (line 161) | public void inputHasOver(String text);
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/MainActivity.java
class MainActivity (line 39) | public class MainActivity extends FragmentActivity implements OnClickLis...
method onCreate (line 53) | @Override
method initdefault (line 100) | private void initdefault() { // 初始化数据
method onClick (line 106) | @Override
method onKeyDown (line 111) | public boolean onKeyDown(int keyCode, KeyEvent event) {
method getValueFM (line 118) | public static int getValueFM() {
method setTranslucentStatus (line 122) | @TargetApi(19)
method onResume (line 135) | protected void onResume() {
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/ModifyInP.java
class ModifyInP (line 34) | public class ModifyInP extends Activity{
method ModifyInP (line 55) | public ModifyInP() {
method onCreate (line 58) | @Override
method onStart (line 74) | @Override
method onCreateDialog (line 191) | @Override
method onDateSet (line 203) | public void onDateSet(DatePicker view, int year, int monthOfYear,
method updateDisplay (line 212) | private void updateDisplay() {
method gotoback (line 218) | private void gotoback(){
method setTimeFormat (line 225) | private String setTimeFormat(String txtTime){
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/NiftyDialogBuilder.java
class NiftyDialogBuilder (line 25) | public class NiftyDialogBuilder extends Dialog implements DialogInterface {
method NiftyDialogBuilder (line 71) | public NiftyDialogBuilder(Context context) {
method NiftyDialogBuilder (line 76) | public NiftyDialogBuilder(Context context,int theme) {
method onCreate (line 81) | @Override
method getInstance (line 91) | public static NiftyDialogBuilder getInstance(Context context) {
method init (line 110) | private void init(Context context) {
method toDefault (line 151) | public void toDefault(){
method withDividerColor (line 158) | public NiftyDialogBuilder withDividerColor(String colorString) {
method withTitle (line 164) | public NiftyDialogBuilder withTitle(CharSequence title) {
method withTitleColor (line 170) | public NiftyDialogBuilder withTitleColor(String colorString) {
method withMessage (line 175) | public NiftyDialogBuilder withMessage(int textResId) {
method withMessage (line 181) | public NiftyDialogBuilder withMessage(CharSequence msg) {
method withMessageColor (line 186) | public NiftyDialogBuilder withMessageColor(String colorString) {
method withIcon (line 191) | public NiftyDialogBuilder withIcon(int drawableResId) {
method withIcon (line 196) | public NiftyDialogBuilder withIcon(Drawable icon) {
method withDuration (line 201) | public NiftyDialogBuilder withDuration(int duration) {
method withEffect (line 206) | public NiftyDialogBuilder withEffect(Effectstype type) {
method withButtonDrawable (line 211) | public NiftyDialogBuilder withButtonDrawable(int resid) {
method withButton1Text (line 216) | public NiftyDialogBuilder withButton1Text(CharSequence text) {
method withButton2Text (line 222) | public NiftyDialogBuilder withButton2Text(CharSequence text) {
method setButton1Click (line 227) | public NiftyDialogBuilder setButton1Click(View.OnClickListener click) {
method setButton2Click (line 232) | public NiftyDialogBuilder setButton2Click(View.OnClickListener click) {
method setCustomView (line 238) | public NiftyDialogBuilder setCustomView(int resId, Context context) {
method setCustomView (line 247) | public NiftyDialogBuilder setCustomView(View view, Context context) {
method isCancelableOnTouchOutside (line 255) | public NiftyDialogBuilder isCancelableOnTouchOutside(boolean cancelabl...
method isCancelable (line 261) | public NiftyDialogBuilder isCancelable(boolean cancelable) {
method toggleView (line 267) | private void toggleView(View view,Object obj){
method show (line 274) | @Override
method start (line 282) | private void start(Effectstype type){
method dismiss (line 290) | @Override
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/PayChart.java
class PayChart (line 61) | public class PayChart extends SlidingActivity implements OnClickListener {
method onCreate (line 112) | @Override
method setTranslucentStatus (line 166) | @TargetApi(19)
method onStart (line 179) | @Override
method onResume (line 186) | @Override
method onPause (line 201) | protected void onPause() {
method initView (line 215) | public void initView() {
method handleMessage (line 351) | public void handleMessage(android.os.Message msg) {
method initItem (line 367) | public void initItem() {
method getRandomColor (line 426) | private int getRandomColor() {// 分别产生RBG数值
method getamount (line 434) | public static String getamount() {
method onClick (line 438) | @Override
method clickPop_photoViewBtn (line 521) | private void clickPop_photoViewBtn() {
method clickSwitchBtn (line 528) | private void clickSwitchBtn(String i) {
method onOptionsItemSelected (line 537) | @Override
method showPopupWindow (line 554) | private void showPopupWindow(View parent) {
method clickToggleBtn (line 620) | private void clickToggleBtn() {
method changeButtonImage (line 630) | private void changeButtonImage() {
method clickPop_voiceBtn (line 635) | private void clickPop_voiceBtn() {
method clickPop_quickBtn (line 643) | private void clickPop_quickBtn() {
method initData (line 650) | private void initData() {
method getAnyDate (line 664) | public void getAnyDate() {// 处理任意时间
method change (line 687) | private void change() {
method onKeyDown (line 693) | public boolean onKeyDown(int keyCode, KeyEvent event) {
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/PayData.java
class PayData (line 41) | public class PayData extends Activity {
method PayData (line 69) | public PayData() {
method onCreate (line 73) | @Override
method onStart (line 112) | @Override
method getAnyDate (line 266) | public void getAnyDate() {
method getRandomColor (line 275) | private int getRandomColor() {// 分别产生RBG数值
method onKeyDown (line 283) | public boolean onKeyDown(int keyCode, KeyEvent event) {
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/RotateBottom.java
class RotateBottom (line 12) | public class RotateBottom extends BaseEffects{
method setupAnimation (line 14) | @Override
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/SearchActivity.java
class SearchActivity (line 52) | public class SearchActivity extends Activity {
method onCreate (line 115) | @Override
method init (line 133) | public void init() {
method closemore (line 361) | protected void closemore() {
method getQuarterInMonth (line 372) | int getQuarterInMonth(int month, boolean isQuarterStart) {
method showMultiChoiceDialog (line 387) | public void showMultiChoiceDialog(View view, String type) { // 类型选择
class PositiveClickListener (line 421) | class PositiveClickListener implements DialogInterface.OnClickListener...
method onClick (line 422) | @Override
class onitem (line 485) | class onitem implements OnItemClickListener { // 时间范围响应事件
method onItemClick (line 487) | @Override
method update (line 631) | protected void update(String string) {
method dispay (line 636) | private void dispay(List<Tb_income> listinfos2) {
method onActivityResult (line 694) | @Override
method onDateSet (line 707) | public void onDateSet(DatePicker view, int year, int monthOfYear,
method onCreateDialog (line 716) | @Override
method updateDisplay (line 727) | private void updateDisplay() {
method DateCompare (line 737) | public static void DateCompare(CharSequence s1, CharSequence s2)
method setTranslucentStatus (line 752) | @TargetApi(19)
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/SettingActivity.java
class SettingActivity (line 23) | public class SettingActivity extends Activity implements
method onCreate (line 42) | @Override
method onCheckedChanged (line 177) | @Override
method onKeyDown (line 193) | public boolean onKeyDown(int keyCode, KeyEvent event) {
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Shake.java
class Shake (line 10) | public class Shake extends BaseEffects{
method setupAnimation (line 12) | @Override
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/SlideTop.java
class SlideTop (line 10) | public class SlideTop extends BaseEffects{
method setupAnimation (line 12) | @Override
FILE: MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/SysApplication.java
class SysApplication (line 10) | public class SysApplication extends Application {
method SysApplication (line 14) | private SysApplication() {
method getInstance (line 17) | public synchronized static SysApplication getInstance() {
method addActivity (line 25) | public void addActivity(Activity activity) {
method exit (line 29) | public void exit() {
method onLowMemory (line 42) | @Override
FILE: MoneyCharge/app/src/main/java/com/cwp/pattern/CreateGesturePasswordActivity.java
class CreateGesturePasswordActivity (line 28) | public class CreateGesturePasswordActivity extends Activity implements
type LeftButtonMode (line 49) | enum LeftButtonMode {
method LeftButtonMode (line 62) | LeftButtonMode(int text, boolean enabled) {
type RightButtonMode (line 74) | enum RightButtonMode {
method RightButtonMode (line 87) | RightButtonMode(int text, boolean enabled) {
type Stage (line 99) | protected enum Stage {
method Stage (line 134) | Stage(int headerMessage, LeftButtonMode leftMode,
method showToast (line 151) | private void showToast(CharSequence message) {
method onCreate (line 161) | @Override
method initPreviewViews (line 211) | private void initPreviewViews() {
method updatePreviewViews (line 224) | private void updatePreviewViews() {
method onSaveInstanceState (line 237) | @Override
method onKeyDown (line 247) | @Override
method run (line 263) | public void run() {
method onPatternStart (line 270) | public void onPatternStart() {
method onPatternCleared (line 275) | public void onPatternCleared() {
method onPatternDetected (line 279) | public void onPatternDetected(List<LockPatternView.Cell> pattern) {
method patternInProgress (line 308) | private void patternInProgress() {
method onPatternCellAdded (line 314) | @Override
method updateStage (line 320) | private void updateStage(Stage stage) {
method postClearPatternRunnable (line 378) | private void postClearPatternRunnable() {
method onClick (line 383) | @Override
method setTranslucentStatus (line 430) | @TargetApi(19)
method saveChosenPatternAndFinish (line 443) | private void saveChosenPatternAndFinish() {
FILE: MoneyCharge/app/src/main/java/com/cwp/pattern/GuideGesturePasswordActivity.java
class GuideGesturePasswordActivity (line 20) | public class GuideGesturePasswordActivity extends Activity {
method onCreate (line 22) | @Override
method setTranslucentStatus (line 53) | @TargetApi(19)
method onActivityResult (line 66) | @Override
FILE: MoneyCharge/app/src/main/java/com/cwp/pattern/LockPatternUtils.java
class LockPatternUtils (line 24) | public class LockPatternUtils {
class LockPatternFileObserver (line 54) | private static class LockPatternFileObserver extends FileObserver {
method LockPatternFileObserver (line 55) | public LockPatternFileObserver(String path, int mask) {
method onEvent (line 59) | @Override
method LockPatternUtils (line 69) | public LockPatternUtils(Context context) {
method savedPatternExists (line 90) | public boolean savedPatternExists() {
method clearLock (line 94) | public void clearLock() {
method stringToPattern (line 104) | public static List<LockPatternView.Cell> stringToPattern(String string) {
method patternToString (line 122) | public static String patternToString(List<LockPatternView.Cell> patter...
method saveLockPattern (line 144) | public void saveLockPattern(List<LockPatternView.Cell> pattern) {
method patternToHash (line 177) | private static byte[] patternToHash(List<LockPatternView.Cell> pattern) {
method checkPattern (line 205) | public boolean checkPattern(List<LockPatternView.Cell> pattern) {
FILE: MoneyCharge/app/src/main/java/com/cwp/pattern/LockPatternView.java
class LockPatternView (line 39) | public class LockPatternView extends View {
class Cell (line 114) | public static class Cell {
method Cell (line 134) | private Cell(int row, int column) {
method getRow (line 140) | public int getRow() {
method getColumn (line 144) | public int getColumn() {
method of (line 154) | public static synchronized Cell of(int row, int column) {
method checkRange (line 159) | private static void checkRange(int row, int column) {
method toString (line 169) | public String toString() {
type DisplayMode (line 177) | public enum DisplayMode {
type OnPatternListener (line 198) | public static interface OnPatternListener {
method onPatternStart (line 203) | void onPatternStart();
method onPatternCleared (line 208) | void onPatternCleared();
method onPatternCellAdded (line 216) | void onPatternCellAdded(List<Cell> pattern);
method onPatternDetected (line 224) | void onPatternDetected(List<Cell> pattern);
method LockPatternView (line 227) | public LockPatternView(Context context) {
method LockPatternView (line 231) | public LockPatternView(Context context, AttributeSet attrs) {
method getBitmapFor (line 273) | private Bitmap getBitmapFor(int resId) {
method isInStealthMode (line 280) | public boolean isInStealthMode() {
method isTactileFeedbackEnabled (line 287) | public boolean isTactileFeedbackEnabled() {
method setInStealthMode (line 298) | public void setInStealthMode(boolean inStealthMode) {
method setTactileFeedbackEnabled (line 309) | public void setTactileFeedbackEnabled(boolean tactileFeedbackEnabled) {
method setOnPatternListener (line 319) | public void setOnPatternListener(OnPatternListener onPatternListener) {
method setPattern (line 332) | public void setPattern(DisplayMode displayMode, List<Cell> pattern) {
method setDisplayMode (line 351) | public void setDisplayMode(DisplayMode displayMode) {
method notifyCellAdded (line 368) | private void notifyCellAdded() {
method notifyPatternStarted (line 375) | private void notifyPatternStarted() {
method notifyPatternDetected (line 382) | private void notifyPatternDetected() {
method notifyPatternCleared (line 389) | private void notifyPatternCleared() {
method clearPattern (line 399) | public void clearPattern() {
method resetPattern (line 406) | private void resetPattern() {
method clearPatternDrawLookup (line 416) | private void clearPatternDrawLookup() {
method disableInput (line 428) | public void disableInput() {
method enableInput (line 435) | public void enableInput() {
method onSizeChanged (line 439) | @Override
method resolveMeasured (line 448) | private int resolveMeasured(int measureSpec, int desired) {
method getSuggestedMinimumWidth (line 465) | @Override
method getSuggestedMinimumHeight (line 471) | @Override
method onMeasure (line 477) | @Override
method detectAndAddHit (line 510) | private Cell detectAndAddHit(float x, float y) {
method addCellToPattern (line 552) | private void addCellToPattern(Cell newCell) {
method checkForNewHit (line 559) | private Cell checkForNewHit(float x, float y) {
method getRowHit (line 583) | private int getRowHit(float y) {
method getColumnHit (line 606) | private int getColumnHit(float x) {
method onTouchEvent (line 621) | @Override
method handleActionMove (line 652) | private void handleActionMove(MotionEvent event) {
method sendAccessEvent (line 789) | private void sendAccessEvent(int resId) {
method handleActionUp (line 795) | private void handleActionUp(MotionEvent event) {
method handleActionDown (line 810) | private void handleActionDown(MotionEvent event) {
method getCenterXForColumn (line 844) | private float getCenterXForColumn(int column) {
method getCenterYForRow (line 848) | private float getCenterYForRow(int row) {
method onDraw (line 852) | @Override
method drawCircle (line 981) | private void drawCircle(Canvas canvas, int leftX, int topY,
method onSaveInstanceState (line 1032) | @Override
method onRestoreInstanceState (line 1041) | @Override
class SavedState (line 1056) | private static class SavedState extends BaseSavedState {
method SavedState (line 1067) | private SavedState(Parcelable superState, String serializedPattern,
method SavedState (line 1081) | private SavedState(Parcel in) {
method getSerializedPattern (line 1090) | public String getSerializedPattern() {
method getDisplayMode (line 1094) | public int getDisplayMode() {
method isInputEnabled (line 1098) | public boolean isInputEnabled() {
method isInStealthMode (line 1102) | public boolean isInStealthMode() {
method isTactileFeedbackEnabled (line 1106) | public boolean isTactileFeedbackEnabled() {
method writeToParcel (line 1110) | @Override
method createFromParcel (line 1121) | public SavedState createFromParcel(Parcel in) {
method newArray (line 1125) | public SavedState[] newArray(int size) {
FILE: MoneyCharge/app/src/main/java/com/cwp/pattern/ParseXmlService.java
class ParseXmlService (line 19) | public class ParseXmlService {
method parseXml (line 20) | public HashMap<String, String> parseXml(InputStream inStream)
FILE: MoneyCharge/app/src/main/java/com/cwp/pattern/UnlockGesturePasswordActivity.java
class UnlockGesturePasswordActivity (line 35) | public class UnlockGesturePasswordActivity extends Activity {
method showToast (line 46) | private void showToast(CharSequence message) {
method onCreate (line 57) | @Override
method onResume (line 101) | @Override
method onActivityResult (line 112) | @Override
method onDestroy (line 125) | @Override
method run (line 133) | public void run() {
method onPatternStart (line 140) | public void onPatternStart() {
method onPatternCleared (line 145) | public void onPatternCleared() {
method onPatternDetected (line 149) | public void onPatternDetected(List<LockPatternView.Cell> pattern) {
method patternInProgress (line 202) | private void patternInProgress() {
method onPatternCellAdded (line 205) | @Override
method run (line 213) | @Override
method setTranslucentStatus (line 241) | @TargetApi(19)
method onKeyDown (line 257) | public boolean onKeyDown(int keyCode, KeyEvent event) {
FILE: MoneyCharge/app/src/main/java/com/cwp/pattern/UpdateManager.java
class UpdateManager (line 47) | public class UpdateManager extends Service {
method handleMessage (line 82) | public void handleMessage(Message msg) {
method handleMessage (line 106) | @Override
method UpdateManager (line 130) | public UpdateManager(Context context) {
method checkUpdate (line 137) | public void checkUpdate(String show) {
method isUpdate (line 152) | public void isUpdate() {
method getVersionCode (line 203) | public double getVersionCode(Context context) {
method showNoticeDialog (line 220) | private void showNoticeDialog() {
method showDownloadDialog (line 249) | private void showDownloadDialog() {
method downloadApk (line 286) | private void downloadApk() {
class downloadApkThread (line 298) | private class downloadApkThread extends Thread {
method run (line 299) | @Override
method isWifi (line 368) | private static boolean isWifi(Context mContext) {
method installApk (line 382) | @SuppressWarnings("deprecation")
method createNotification (line 410) | @SuppressWarnings("deprecation")
method onBind (line 441) | @Override
FILE: MoneyCharge/app/src/main/java/com/example/testpic/AlbumHelper.java
class AlbumHelper (line 24) | public class AlbumHelper {
method AlbumHelper (line 37) | private AlbumHelper() {
method getHelper (line 40) | public static AlbumHelper getHelper() {
method init (line 52) | public void init(Context context) {
method getThumbnail (line 62) | private void getThumbnail() {
method getThumbnailColumnData (line 75) | private void getThumbnailColumnData(Cursor cur) {
method getAlbum (line 105) | void getAlbum() {
method getAlbumColumnData (line 119) | private void getAlbumColumnData(Cursor cur) {
method buildImagesBucketList (line 170) | void buildImagesBucketList() {
method getImagesBucketList (line 254) | public List<ImageBucket> getImagesBucketList(boolean refresh) {
method getOriginalImagePath (line 275) | String getOriginalImagePath(String image_id) {
FILE: MoneyCharge/app/src/main/java/com/example/testpic/Bimp.java
class Bimp (line 17) | public class Bimp {
method getbitmap (line 28) | public static Bitmap getbitmap(String path) throws IOException {
method revitionImageSize (line 37) | public static Bitmap revitionImageSize(String path) throws IOException {
FILE: MoneyCharge/app/src/main/java/com/example/testpic/BitmapCache.java
class BitmapCache (line 18) | public class BitmapCache extends Activity {
method put (line 24) | public void put(String path, Bitmap bmp) {
method displayBmp (line 30) | public void displayBmp(final ImageView iv, final String thumbPath,
method revitionImageSize (line 100) | public Bitmap revitionImageSize(String path) throws IOException {
type ImageCallback (line 124) | public interface ImageCallback {
method imageLoad (line 125) | public void imageLoad(ImageView imageView, Bitmap bitmap,
FILE: MoneyCharge/app/src/main/java/com/example/testpic/FileUtils.java
class FileUtils (line 12) | public class FileUtils {
method saveBitmap (line 17) | public static void saveBitmap(Bitmap bm, String picName) {
method createSDDir (line 39) | public static File createSDDir(String dirName) throws IOException {
method isFileExist (line 51) | public static boolean isFileExist(String fileName) {
method delFile (line 57) | public static void delFile(String fileName) {
method deleteDir (line 65) | public static void deleteDir() {
method fileIsExists (line 79) | public static boolean fileIsExists(String path) {
FILE: MoneyCharge/app/src/main/java/com/example/testpic/ImageBucket.java
class ImageBucket (line 11) | public class ImageBucket {
FILE: MoneyCharge/app/src/main/java/com/example/testpic/ImageBucketAdapter.java
class ImageBucketAdapter (line 17) | public class ImageBucketAdapter extends BaseAdapter {
method imageLoad (line 27) | @Override
method ImageBucketAdapter (line 43) | public ImageBucketAdapter(Activity act, List<ImageBucket> list) {
method getCount (line 49) | @Override
method getItem (line 59) | @Override
method getItemId (line 65) | @Override
class Holder (line 71) | class Holder {
method getView (line 78) | @Override
FILE: MoneyCharge/app/src/main/java/com/example/testpic/ImageGridActivity.java
class ImageGridActivity (line 31) | public class ImageGridActivity extends Activity {
method handleMessage (line 42) | @Override
method onCreate (line 61) | @SuppressWarnings("unchecked")
method initView (line 139) | private void initView() {
method onKeyDown (line 174) | public boolean onKeyDown(int keyCode, KeyEvent event) {
FILE: MoneyCharge/app/src/main/java/com/example/testpic/ImageGridAdapter.java
class ImageGridAdapter (line 22) | public class ImageGridAdapter extends BaseAdapter {
method imageLoad (line 33) | @Override
type TextCallback (line 49) | public static interface TextCallback {
method onListen (line 50) | public void onListen(int count);
method setTextCallback (line 53) | public void setTextCallback(TextCallback listener) {
method ImageGridAdapter (line 57) | public ImageGridAdapter(Activity act, List<ImageItem> list, Handler mH...
method getCount (line 64) | @Override
method getItem (line 73) | @Override
method getItemId (line 79) | @Override
class Holder (line 85) | class Holder {
method getView (line 91) | @Override
FILE: MoneyCharge/app/src/main/java/com/example/testpic/ImageItem.java
class ImageItem (line 11) | public class ImageItem implements Serializable {
FILE: MoneyCharge/app/src/main/java/com/example/testpic/NoScrollGridView.java
class NoScrollGridView (line 7) | public class NoScrollGridView extends GridView {
method NoScrollGridView (line 8) | public NoScrollGridView(Context context) {
method NoScrollGridView (line 12) | public NoScrollGridView(Context context, AttributeSet attrs) {
method onMeasure (line 16) | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
FILE: MoneyCharge/app/src/main/java/com/example/testpic/PhotoActivity.java
class PhotoActivity (line 21) | public class PhotoActivity extends Activity {
method onCreate (line 36) | public void onCreate(Bundle savedInstanceState) {
method initListViews (line 128) | private void initListViews(Bitmap bm) {
method onPageSelected (line 141) | public void onPageSelected(int arg0) {// 页面选择响应函数
method onPageScrolled (line 145) | public void onPageScrolled(int arg0, float arg1, int arg2) {// 滑动中。。。
method onPageScrollStateChanged (line 149) | public void onPageScrollStateChanged(int arg0) {// 滑动状态改变
class MyPageAdapter (line 154) | class MyPageAdapter extends PagerAdapter {
method MyPageAdapter (line 160) | public MyPageAdapter(ArrayList<View> listViews) {// 构造函数
method setListViews (line 166) | public void setListViews(ArrayList<View> listViews) {// 自己写的一个方法用来添加数据
method getCount (line 171) | public int getCount() {// 返回数量
method getItemPosition (line 175) | public int getItemPosition(Object object) {
method destroyItem (line 179) | public void destroyItem(View arg0, int arg1, Object arg2) {// 销毁view对象
method finishUpdate (line 183) | public void finishUpdate(View arg0) {
method instantiateItem (line 186) | public Object instantiateItem(View arg0, int arg1) {// 返回view对象
method isViewFromObject (line 195) | public boolean isViewFromObject(View arg0, Object arg1) {
FILE: MoneyCharge/app/src/main/java/com/example/testpic/PublishedActivity.java
class PublishedActivity (line 53) | public class PublishedActivity extends Activity {
method onCreate (line 64) | protected void onCreate(Bundle savedInstanceState) {
method setTranslucentStatus (line 84) | @TargetApi(19)
method Init (line 97) | public void Init() {
class GridAdapter (line 143) | @SuppressLint("HandlerLeak")
method isShape (line 149) | public boolean isShape() {
method setShape (line 153) | public void setShape(boolean shape) {
method GridAdapter (line 157) | public GridAdapter(Context context) {
method update (line 161) | public void update() {
method getCount (line 168) | public int getCount() {
method getItem (line 172) | public Object getItem(int arg0) {
method getItemId (line 177) | public long getItemId(int arg0) {
method setSelectedPosition (line 182) | public void setSelectedPosition(int position) {
method getSelectedPosition (line 186) | public int getSelectedPosition() {
method getView (line 193) | public View getView(int position, View convertView, ViewGroup parent) {
class ViewHolder (line 220) | public class ViewHolder {
method handleMessage (line 225) | public void handleMessage(Message msg) {
method loading (line 235) | public void loading() {
method getString (line 273) | public String getString(String s) {
class PopupWindows (line 283) | public class PopupWindows extends PopupWindow { // 弹出菜单
method PopupWindows (line 285) | public PopupWindows(Context mContext, View parent) {
method photo (line 339) | public void photo() {
method onActivityResult (line 357) | protected void onActivityResult(int requestCode, int resultCode, Inten...
method onDestroy (line 368) | @Override
method onKeyDown (line 373) | public boolean onKeyDown(int keyCode, KeyEvent event) {
FILE: MoneyCharge/app/src/main/java/com/example/testpic/TestPicActivity.java
class TestPicActivity (line 21) | public class TestPicActivity extends Activity {
method onCreate (line 31) | @Override
method initData (line 47) | private void initData() {
method initView (line 64) | private void initView() {
method onKeyDown (line 108) | public boolean onKeyDown(int keyCode, KeyEvent event) {
FILE: MoneyCharge/app/src/main/java/com/slidingmenu/lib/CanvasTransformerBuilder.java
class CanvasTransformerBuilder (line 8) | public class CanvasTransformerBuilder {
method getInterpolation (line 13) | public float getInterpolation(float t) {
method initTransformer (line 18) | private void initTransformer() {
method zoom (line 25) | public CanvasTransformer zoom(final int openedX, final int closedX,
method zoom (line 31) | public CanvasTransformer zoom(final int openedX, final int closedX,
method rotate (line 46) | public CanvasTransformer rotate(final int openedDeg, final int closedDeg,
method rotate (line 51) | public CanvasTransformer rotate(final int openedDeg, final int closedDeg,
method translate (line 65) | public CanvasTransformer translate(final int openedX, final int closedX,
method translate (line 70) | public CanvasTransformer translate(final int openedX, final int closedX,
method concatTransformer (line 84) | public CanvasTransformer concatTransformer(final CanvasTransformer t) {
FILE: MoneyCharge/app/src/main/java/com/slidingmenu/lib/CustomViewAbove.java
class CustomViewAbove (line 34) | public class CustomViewAbove extends ViewGroup {
method getInterpolation (line 45) | public float getInterpolation(float t) {
type OnPageChangeListener (line 107) | public interface OnPageChangeListener {
method onPageScrolled (line 118) | public void onPageScrolled(int position, float positionOffset, int p...
method onPageSelected (line 126) | public void onPageSelected(int position);
class SimpleOnPageChangeListener (line 135) | public static class SimpleOnPageChangeListener implements OnPageChange...
method onPageScrolled (line 137) | public void onPageScrolled(int position, float positionOffset, int p...
method onPageSelected (line 141) | public void onPageSelected(int position) {
method onPageScrollStateChanged (line 145) | public void onPageScrollStateChanged(int state) {
method CustomViewAbove (line 151) | public CustomViewAbove(Context context) {
method CustomViewAbove (line 155) | public CustomViewAbove(Context context, AttributeSet attrs) {
method initCustomViewAbove (line 160) | void initCustomViewAbove() {
method setCurrentItem (line 197) | public void setCurrentItem(int item) {
method setCurrentItem (line 207) | public void setCurrentItem(int item, boolean smoothScroll) {
method getCurrentItem (line 211) | public int getCurrentItem() {
method setCurrentItemInternal (line 215) | void setCurrentItemInternal(int item, boolean smoothScroll, boolean al...
method setCurrentItemInternal (line 219) | void setCurrentItemInternal(int item, boolean smoothScroll, boolean al...
method setOnPageChangeListener (line 250) | public void setOnPageChangeListener(OnPageChangeListener listener) {
method setOnOpenedListener (line 262) | public void setOnOpenedListener(OnOpenedListener l) {
method setOnClosedListener (line 266) | public void setOnClosedListener(OnClosedListener l) {
method setInternalPageChangeListener (line 276) | OnPageChangeListener setInternalPageChangeListener(OnPageChangeListene...
method addIgnoredView (line 282) | public void addIgnoredView(View v) {
method removeIgnoredView (line 288) | public void removeIgnoredView(View v) {
method clearIgnoredViews (line 292) | public void clearIgnoredViews() {
method distanceInfluenceForSnapDuration (line 300) | float distanceInfluenceForSnapDuration(float f) {
method getDestScrollX (line 306) | public int getDestScrollX(int page) {
method getLeftBound (line 317) | private int getLeftBound() {
method getRightBound (line 321) | private int getRightBound() {
method getContentLeft (line 325) | public int getContentLeft() {
method isMenuOpen (line 329) | public boolean isMenuOpen() {
method isInIgnoredView (line 333) | private boolean isInIgnoredView(MotionEvent ev) {
method getBehindWidth (line 342) | public int getBehindWidth() {
method getChildWidth (line 350) | public int getChildWidth(int i) {
method isSlidingEnabled (line 361) | public boolean isSlidingEnabled() {
method setSlidingEnabled (line 365) | public void setSlidingEnabled(boolean b) {
method smoothScrollTo (line 375) | void smoothScrollTo(int x, int y) {
method smoothScrollTo (line 386) | void smoothScrollTo(int x, int y, int velocity) {
method setContent (line 432) | public void setContent(View v) {
method getContent (line 439) | public View getContent() {
method setCustomViewBehind (line 443) | public void setCustomViewBehind(CustomViewBehind cvb) {
method onMeasure (line 447) | @Override
method onSizeChanged (line 459) | @Override
method onLayout (line 472) | @Override
method setAboveOffset (line 479) | public void setAboveOffset(int i) {
method computeScroll (line 487) | @Override
method pageScrolled (line 511) | private void pageScrolled(int xpos) {
method onPageScrolled (line 532) | protected void onPageScrolled(int position, float offset, int offsetPi...
method completeScroll (line 541) | private void completeScroll() {
method setTouchMode (line 567) | public void setTouchMode(int i) {
method getTouchMode (line 571) | public int getTouchMode() {
method thisTouchAllowed (line 575) | private boolean thisTouchAllowed(MotionEvent ev) {
method thisSlideAllowed (line 592) | private boolean thisSlideAllowed(float dx) {
method getPointerIndex (line 604) | private int getPointerIndex(MotionEvent ev, int id) {
method onInterceptTouchEvent (line 613) | @Override
method onTouchEvent (line 667) | @Override
method determineDrag (line 780) | private void determineDrag(MotionEvent ev) {
method scrollTo (line 802) | @Override
method determineTargetPage (line 811) | private int determineTargetPage(float pageOffset, int velocity, int de...
method getPercentOpen (line 825) | protected float getPercentOpen() {
method dispatchDraw (line 829) | @Override
method onSecondaryPointerUp (line 841) | private void onSecondaryPointerUp(MotionEvent ev) {
method startDrag (line 857) | private void startDrag() {
method endDrag (line 862) | private void endDrag() {
method setScrollingCacheEnabled (line 874) | private void setScrollingCacheEnabled(boolean enabled) {
method canScroll (line 900) | protected boolean canScroll(View v, boolean checkV, int dx, int x, int...
method dispatchKeyEvent (line 922) | @Override
method executeKeyEvent (line 936) | public boolean executeKeyEvent(KeyEvent event) {
method arrowScroll (line 962) | public boolean arrowScroll(int direction) {
method pageLeft (line 995) | boolean pageLeft() {
method pageRight (line 1003) | boolean pageRight() {
FILE: MoneyCharge/app/src/main/java/com/slidingmenu/lib/CustomViewBehind.java
class CustomViewBehind (line 19) | public class CustomViewBehind extends ViewGroup {
method CustomViewBehind (line 35) | public CustomViewBehind(Context context) {
method CustomViewBehind (line 39) | public CustomViewBehind(Context context, AttributeSet attrs) {
method setCustomViewAbove (line 45) | public void setCustomViewAbove(CustomViewAbove customViewAbove) {
method setCanvasTransformer (line 49) | public void setCanvasTransformer(CanvasTransformer t) {
method setWidthOffset (line 53) | public void setWidthOffset(int i) {
method getBehindWidth (line 58) | public int getBehindWidth() {
method setContent (line 62) | public void setContent(View v) {
method getContent (line 69) | public View getContent() {
method setSecondaryContent (line 77) | public void setSecondaryContent(View v) {
method getSecondaryContent (line 84) | public View getSecondaryContent() {
method setChildrenEnabled (line 88) | public void setChildrenEnabled(boolean enabled) {
method scrollTo (line 92) | @Override
method onInterceptTouchEvent (line 99) | @Override
method onTouchEvent (line 104) | @Override
method dispatchDraw (line 109) | @Override
method onLayout (line 120) | @Override
method onMeasure (line 129) | @Override
method setMode (line 150) | public void setMode(int mode) {
method getMode (line 160) | public int getMode() {
method setScrollScale (line 164) | public void setScrollScale(float scrollScale) {
method getScrollScale (line 168) | public float getScrollScale() {
method setShadowDrawable (line 172) | public void setShadowDrawable(Drawable shadow) {
method setSecondaryShadowDrawable (line 177) | public void setSecondaryShadowDrawable(Drawable shadow) {
method setShadowWidth (line 182) | public void setShadowWidth(int width) {
method setFadeEnabled (line 187) | public void setFadeEnabled(boolean b) {
method setFadeDegree (line 191) | public void setFadeDegree(float degree) {
method getMenuPage (line 197) | public int getMenuPage(int page) {
method scrollBehindTo (line 208) | public void scrollBehindTo(View content, int x, int y) {
method getMenuLeft (line 233) | public int getMenuLeft(View content, int page) {
method getAbsLeftBound (line 259) | public int getAbsLeftBound(View content) {
method getAbsRightBound (line 268) | public int getAbsRightBound(View content) {
method marginTouchAllowed (line 277) | public boolean marginTouchAllowed(View content, int x) {
method setTouchMode (line 291) | public void setTouchMode(int i) {
method menuOpenTouchAllowed (line 295) | public boolean menuOpenTouchAllowed(View content, int currPage, float ...
method menuTouchInQuickReturn (line 305) | public boolean menuTouchInQuickReturn(View content, int currPage, floa...
method menuClosedSlideAllowed (line 314) | public boolean menuClosedSlideAllowed(float dx) {
method menuOpenSlideAllowed (line 325) | public boolean menuOpenSlideAllowed(float dx) {
method drawShadow (line 336) | public void drawShadow(View content, Canvas canvas) {
method drawFade (line 355) | public void drawFade(View content, Canvas canvas, float openPercent) {
method drawSelector (line 381) | public void drawSelector(View content, Canvas canvas, float openPercen...
method setSelectorEnabled (line 405) | public void setSelectorEnabled(boolean b) {
method setSelectedView (line 409) | public void setSelectedView(View v) {
method getSelectorTop (line 421) | private int getSelectorTop() {
method setSelectorBitmap (line 427) | public void setSelectorBitmap(Bitmap b) {
FILE: MoneyCharge/app/src/main/java/com/slidingmenu/lib/MenuInterface.java
type MenuInterface (line 7) | public interface MenuInterface {
method scrollBehindTo (line 9) | public abstract void scrollBehindTo(int x, int y,
method getMenuLeft (line 12) | public abstract int getMenuLeft(CustomViewBehind cvb, View content);
method getAbsLeftBound (line 14) | public abstract int getAbsLeftBound(CustomViewBehind cvb, View content);
method getAbsRightBound (line 16) | public abstract int getAbsRightBound(CustomViewBehind cvb, View content);
method marginTouchAllowed (line 18) | public abstract boolean marginTouchAllowed(View content, int x, int th...
method menuOpenTouchAllowed (line 20) | public abstract boolean menuOpenTouchAllowed(View content, int currPag...
method menuTouchInQuickReturn (line 22) | public abstract boolean menuTouchInQuickReturn(View content, int currP...
method menuClosedSlideAllowed (line 24) | public abstract boolean menuClosedSlideAllowed(int x);
method menuOpenSlideAllowed (line 26) | public abstract boolean menuOpenSlideAllowed(int x);
method drawShadow (line 28) | public abstract void drawShadow(Canvas canvas, Drawable shadow, int wi...
method drawFade (line 30) | public abstract void drawFade(Canvas canvas, int alpha,
method drawSelector (line 33) | public abstract void drawSelector(View content, Canvas canvas, float p...
FILE: MoneyCharge/app/src/main/java/com/slidingmenu/lib/SlidingMenu.java
class SlidingMenu (line 33) | public class SlidingMenu extends RelativeLayout {
type OnOpenListener (line 85) | public interface OnOpenListener {
method onOpen (line 90) | public void onOpen();
type OnOpenedListener (line 104) | public interface OnOpenedListener {
method onOpened (line 109) | public void onOpened();
type OnCloseListener (line 123) | public interface OnCloseListener {
method onClose (line 128) | public void onClose();
type OnClosedListener (line 142) | public interface OnClosedListener {
method onClosed (line 147) | public void onClosed();
type CanvasTransformer (line 153) | public interface CanvasTransformer {
method transformCanvas (line 161) | public void transformCanvas(Canvas canvas, float percentOpen);
method SlidingMenu (line 169) | public SlidingMenu(Context context) {
method SlidingMenu (line 179) | public SlidingMenu(Activity activity, int slideStyle) {
method SlidingMenu (line 190) | public SlidingMenu(Context context, AttributeSet attrs) {
method SlidingMenu (line 201) | public SlidingMenu(Context context, AttributeSet attrs, int defStyle) {
method attachToActivity (line 287) | public void attachToActivity(Activity activity, int slideStyle) {
method attachToActivity (line 298) | public void attachToActivity(Activity activity, int slideStyle, boolea...
method setContent (line 342) | public void setContent(int res) {
method setContent (line 351) | public void setContent(View view) {
method getContent (line 360) | public View getContent() {
method setMenu (line 370) | public void setMenu(int res) {
method setMenu (line 379) | public void setMenu(View v) {
method getMenu (line 387) | public View getMenu() {
method setSecondaryMenu (line 397) | public void setSecondaryMenu(int res) {
method setSecondaryMenu (line 406) | public void setSecondaryMenu(View v) {
method getSecondaryMenu (line 415) | public View getSecondaryMenu() {
method setSlidingEnabled (line 425) | public void setSlidingEnabled(boolean b) {
method isSlidingEnabled (line 434) | public boolean isSlidingEnabled() {
method setMode (line 442) | public void setMode(int mode) {
method getMode (line 453) | public int getMode() {
method setStatic (line 462) | public void setStatic(boolean b) {
method showMenu (line 479) | public void showMenu() {
method showMenu (line 488) | public void showMenu(boolean animate) {
method showSecondaryMenu (line 496) | public void showSecondaryMenu() {
method showSecondaryMenu (line 506) | public void showSecondaryMenu(boolean animate) {
method showContent (line 513) | public void showContent() {
method showContent (line 522) | public void showContent(boolean animate) {
method toggle (line 529) | public void toggle() {
method toggle (line 538) | public void toggle(boolean animate) {
method isMenuShowing (line 551) | public boolean isMenuShowing() {
method isSecondaryMenuShowing (line 560) | public boolean isSecondaryMenuShowing() {
method getBehindOffset (line 569) | public int getBehindOffset() {
method setBehindOffset (line 578) | public void setBehindOffset(int i) {
method setBehindOffsetRes (line 593) | public void setBehindOffsetRes(int resID) {
method setAboveOffset (line 603) | public void setAboveOffset(int i) {
method setAboveOffsetRes (line 612) | public void setAboveOffsetRes(int resID) {
method setBehindWidth (line 622) | @SuppressWarnings("deprecation")
method setBehindWidthRes (line 646) | public void setBehindWidthRes(int res) {
method getBehindScrollScale (line 656) | public float getBehindScrollScale() {
method setBehindScrollScale (line 666) | public void setBehindScrollScale(float f) {
method setBehindCanvasTransformer (line 677) | public void setBehindCanvasTransformer(CanvasTransformer t) {
method getTouchModeAbove (line 686) | public int getTouchModeAbove() {
method setTouchModeAbove (line 697) | public void setTouchModeAbove(int i) {
method setTouchModeBehind (line 713) | public void setTouchModeBehind(int i) {
method setShadowDrawable (line 727) | public void setShadowDrawable(int resId) {
method setShadowDrawable (line 736) | public void setShadowDrawable(Drawable d) {
method setSecondaryShadowDrawable (line 745) | public void setSecondaryShadowDrawable(int resId) {
method setSecondaryShadowDrawable (line 754) | public void setSecondaryShadowDrawable(Drawable d) {
method setShadowWidthRes (line 763) | public void setShadowWidthRes(int resId) {
method setShadowWidth (line 772) | public void setShadowWidth(int pixels) {
method setFadeEnabled (line 781) | public void setFadeEnabled(boolean b) {
method setFadeDegree (line 791) | public void setFadeDegree(float f) {
method setSelectorEnabled (line 800) | public void setSelectorEnabled(boolean b) {
method setSelectedView (line 809) | public void setSelectedView(View v) {
method setSelectorDrawable (line 818) | public void setSelectorDrawable(int res) {
method setSelectorBitmap (line 827) | public void setSelectorBitmap(Bitmap b) {
method addIgnoredView (line 836) | public void addIgnoredView(View v) {
method removeIgnoredView (line 845) | public void removeIgnoredView(View v) {
method clearIgnoredViews (line 852) | public void clearIgnoredViews() {
method setOnOpenListener (line 861) | public void setOnOpenListener(OnOpenListener listener) {
method setOnCloseListener (line 871) | public void setOnCloseListener(OnCloseListener listener) {
method setOnOpenedListener (line 881) | public void setOnOpenedListener(OnOpenedListener listener) {
method setOnClosedListener (line 890) | public void setOnClosedListener(OnClosedListener listener) {
class SavedState (line 894) | public static class SavedState extends BaseSavedState {
method SavedState (line 898) | public SavedState(Parcelable superState, int item) {
method SavedState (line 903) | private SavedState(Parcel in) {
method getItem (line 908) | public int getItem() {
method writeToParcel (line 915) | public void writeToParcel(Parcel out, int flags) {
method createFromParcel (line 922) | public SavedState createFromParcel(Parcel in) {
method newArray (line 926) | public SavedState[] newArray(int size) {
method onSaveInstanceState (line 936) | @Override
method onRestoreInstanceState (line 946) | @Override
method fitSystemWindows (line 956) | @SuppressLint("NewApi")
method manageLayers (line 972) | @TargetApi(Build.VERSION_CODES.HONEYCOMB)
FILE: MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SlidingActivity.java
class SlidingActivity (line 15) | public class SlidingActivity extends Activity implements SlidingActivity...
method onCreate (line 24) | @Override
method onPostCreate (line 38) | @Override
method findViewById (line 49) | @Override
method onSaveInstanceState (line 62) | @Override
method setContentView (line 73) | @Override
method setContentView (line 83) | @Override
method setContentView (line 95) | @Override
method setBehindContentView (line 107) | public void setBehindContentView(int id) {
method setBehindContentView (line 118) | public void setBehindContentView(View v) {
method setBehindContentView (line 130) | public void setBehindContentView(View v, LayoutParams params) {
method getSlidingMenu (line 139) | public SlidingMenu getSlidingMenu() {
method toggle (line 148) | public void toggle() {
method showContent (line 157) | public void showContent() {
method showMenu (line 166) | public void showMenu() {
method showSecondaryMenu (line 175) | public void showSecondaryMenu() {
method setSlidingActionBarEnabled (line 186) | public void setSlidingActionBarEnabled(boolean b) {
method onKeyUp (line 195) | @Override
FILE: MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SlidingActivityBase.java
type SlidingActivityBase (line 8) | public interface SlidingActivityBase {
method setBehindContentView (line 17) | public void setBehindContentView(View view, LayoutParams layoutParams);
method setBehindContentView (line 27) | public void setBehindContentView(View view);
method setBehindContentView (line 35) | public void setBehindContentView(int layoutResID);
method getSlidingMenu (line 42) | public SlidingMenu getSlidingMenu();
method toggle (line 47) | public void toggle();
method showContent (line 52) | public void showContent();
method showMenu (line 57) | public void showMenu();
method showSecondaryMenu (line 63) | public void showSecondaryMenu();
method setSlidingActionBarEnabled (line 72) | public void setSlidingActionBarEnabled(boolean slidingActionBarEnabled);
FILE: MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SlidingActivityHelper.java
class SlidingActivityHelper (line 14) | public class SlidingActivityHelper {
method SlidingActivityHelper (line 35) | public SlidingActivityHelper(Activity activity) {
method onCreate (line 44) | public void onCreate(Bundle savedInstanceState) {
method onPostCreate (line 53) | public void onPostCreate(Bundle savedInstanceState) {
method setSlidingActionBarEnabled (line 95) | public void setSlidingActionBarEnabled(boolean slidingActionBarEnabled) {
method findViewById (line 107) | public View findViewById(int id) {
method onSaveInstanceState (line 124) | public void onSaveInstanceState(Bundle outState) {
method registerAboveContentView (line 135) | public void registerAboveContentView(View v, LayoutParams params) {
method setContentView (line 149) | public void setContentView(View v) {
method setBehindContentView (line 161) | public void setBehindContentView(View view, LayoutParams layoutParams) {
method getSlidingMenu (line 171) | public SlidingMenu getSlidingMenu() {
method toggle (line 178) | public void toggle() {
method showContent (line 185) | public void showContent() {
method showMenu (line 192) | public void showMenu() {
method showSecondaryMenu (line 200) | public void showSecondaryMenu() {
method onKeyUp (line 211) | public boolean onKeyUp(int keyCode, KeyEvent event) {
FILE: MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SlidingFragmentActivity.java
class SlidingFragmentActivity (line 11) | public class SlidingFragmentActivity extends FragmentActivity implements...
method onCreate (line 18) | @Override
method onPostCreate (line 28) | @Override
method findViewById (line 37) | @Override
method onSaveInstanceState (line 48) | @Override
method setContentView (line 57) | @Override
method setContentView (line 65) | @Override
method setContentView (line 73) | @Override
method setBehindContentView (line 82) | public void setBehindContentView(int id) {
method setBehindContentView (line 89) | public void setBehindContentView(View v) {
method setBehindContentView (line 96) | public void setBehindContentView(View v, LayoutParams params) {
method getSlidingMenu (line 103) | public SlidingMenu getSlidingMenu() {
method toggle (line 110) | public void toggle() {
method showContent (line 117) | public void showContent() {
method showMenu (line 124) | public void showMenu() {
method showSecondaryMenu (line 131) | public void showSecondaryMenu() {
method setSlidingActionBarEnabled (line 138) | public void setSlidingActionBarEnabled(boolean b) {
method onKeyUp (line 145) | @Override
FILE: MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SlidingListActivity.java
class SlidingListActivity (line 12) | public class SlidingListActivity extends ListActivity implements Sliding...
method onCreate (line 19) | @Override
method onPostCreate (line 32) | @Override
method findViewById (line 41) | @Override
method onSaveInstanceState (line 52) | @Override
method setContentView (line 61) | @Override
method setContentView (line 69) | @Override
method setContentView (line 77) | @Override
method setBehindContentView (line 86) | public void setBehindContentView(int id) {
method setBehindContentView (line 93) | public void setBehindContentView(View v) {
method setBehindContentView (line 100) | public void setBehindContentView(View v, LayoutParams params) {
method getSlidingMenu (line 107) | public SlidingMenu getSlidingMenu() {
method toggle (line 114) | public void toggle() {
method showContent (line 121) | public void showContent() {
method showMenu (line 128) | public void showMenu() {
method showSecondaryMenu (line 136) | public void showSecondaryMenu() {
method setSlidingActionBarEnabled (line 143) | public void setSlidingActionBarEnabled(boolean b) {
method onKeyUp (line 150) | @Override
FILE: MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SlidingPreferenceActivity.java
class SlidingPreferenceActivity (line 11) | public class SlidingPreferenceActivity extends PreferenceActivity implem...
method onCreate (line 18) | @Override
method onPostCreate (line 28) | @Override
method findViewById (line 37) | @Override
method onSaveInstanceState (line 48) | @Override
method setContentView (line 57) | @Override
method setContentView (line 65) | @Override
method setContentView (line 73) | @Override
method setBehindContentView (line 82) | public void setBehindContentView(int id) {
method setBehindContentView (line 89) | public void setBehindContentView(View v) {
method setBehindContentView (line 96) | public void setBehindContentView(View v, LayoutParams params) {
method getSlidingMenu (line 103) | public SlidingMenu getSlidingMenu() {
method toggle (line 110) | public void toggle() {
method showContent (line 117) | public void showContent() {
method showMenu (line 124) | public void showMenu() {
method showSecondaryMenu (line 131) | public void showSecondaryMenu() {
method setSlidingActionBarEnabled (line 138) | public void setSlidingActionBarEnabled(boolean b) {
method onKeyUp (line 145) | @Override
FILE: MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SystemBarTintManager.java
class SystemBarTintManager (line 46) | public class SystemBarTintManager {
method SystemBarTintManager (line 79) | @TargetApi(19)
method setStatusBarTintEnabled (line 133) | public void setStatusBarTintEnabled(boolean enabled) {
method setStatusBarDarkMode (line 145) | public void setStatusBarDarkMode(boolean darkmode, Activity activity) {
method setNavigationBarTintEnabled (line 170) | public void setNavigationBarTintEnabled(boolean enabled) {
method setTintColor (line 182) | public void setTintColor(int color) {
method setTintResource (line 192) | public void setTintResource(int res) {
method setTintDrawable (line 202) | public void setTintDrawable(Drawable drawable) {
method setTintAlpha (line 212) | public void setTintAlpha(float alpha) {
method setStatusBarTintColor (line 222) | public void setStatusBarTintColor(int color) {
method setStatusBarTintResource (line 233) | public void setStatusBarTintResource(int res) {
method setStatusBarTintDrawable (line 244) | @SuppressWarnings("deprecation")
method setStatusBarAlpha (line 256) | @TargetApi(11)
method setNavigationBarTintColor (line 268) | public void setNavigationBarTintColor(int color) {
method setNavigationBarTintResource (line 279) | public void setNavigationBarTintResource(int res) {
method setNavigationBarTintDrawable (line 290) | @SuppressWarnings("deprecation")
method setNavigationBarAlpha (line 302) | @TargetApi(11)
method getConfig (line 314) | public SystemBarConfig getConfig() {
method isStatusBarTintEnabled (line 323) | public boolean isStatusBarTintEnabled() {
method isNavBarTintEnabled (line 332) | public boolean isNavBarTintEnabled() {
method setupStatusBarView (line 336) | private void setupStatusBarView(Context context, ViewGroup decorViewGr...
method setupNavBarView (line 349) | private void setupNavBarView(Context context, ViewGroup decorViewGroup) {
class SystemBarConfig (line 370) | public static class SystemBarConfig {
method SystemBarConfig (line 387) | private SystemBarConfig(Activity activity, boolean translucentStatus...
method getActionBarHeight (line 400) | @TargetApi(14)
method getNavigationBarHeight (line 411) | @TargetApi(14)
method getNavigationBarWidth (line 429) | @TargetApi(14)
method getInternalDimensionSize (line 441) | private int getInternalDimensionSize(Resources res, String key) {
method getSmallestWidthDp (line 450) | @SuppressLint("NewApi")
method isNavigationAtBottom (line 471) | public boolean isNavigationAtBottom() {
method getStatusBarHeight (line 480) | public int getStatusBarHeight() {
method getActionBarHeight (line 489) | public int getActionBarHeight() {
method hasNavigtionBar (line 498) | public boolean hasNavigtionBar() {
method getNavigationBarHeight (line 508) | public int getNavigationBarHeight() {
method getNavigationBarWidth (line 518) | public int getNavigationBarWidth() {
method getPixelInsetTop (line 528) | public int getPixelInsetTop(boolean withActionBar) {
method getPixelInsetBottom (line 537) | public int getPixelInsetBottom() {
method getPixelInsetRight (line 550) | public int getPixelInsetRight() {
FILE: MoneyCharge/app/src/main/java/com/umeng/fb/example/AppApplication.java
class AppApplication (line 9) | public class AppApplication extends Application {
method onCreate (line 10) | @Override
FILE: MoneyCharge/app/src/main/java/com/umeng/fb/example/AppPush.java
class AppPush (line 12) | public class AppPush {
method getInstance (line 18) | public static AppPush getInstance(Context context) {
method AppPush (line 24) | public AppPush(Context context) {
method init (line 28) | public void init() {
FILE: MoneyCharge/app/src/main/java/com/umeng/fb/example/CustomActivity.java
class CustomActivity (line 43) | public class CustomActivity extends Activity {
method handleMessage (line 60) | @Override
method onCreate (line 67) | @Override
method setTranslucentStatus (line 112) | @TargetApi(19)
method initView (line 125) | private void initView() {
method sync (line 167) | private void sync() {
class ReplyAdapter (line 192) | class ReplyAdapter extends BaseAdapter {
method getCount (line 194) | @Override
method getItem (line 199) | @Override
method getItemId (line 204) | @Override
method getViewTypeCount (line 209) | @Override
method getItemViewType (line 215) | @Override
method getView (line 228) | @Override
class ViewHolder (line 301) | class ViewHolder {
FILE: MoneyCharge/app/src/main/java/com/umeng/fb/example/MyPushIntentService.java
class MyPushIntentService (line 19) | public class MyPushIntentService extends UmengBaseIntentService{
method onMessage (line 22) | @Override
FILE: MoneyCharge/app/src/main/java/com/zhy/view/HorizontalProgressBarWithNumber.java
class HorizontalProgressBarWithNumber (line 13) | public class HorizontalProgressBarWithNumber extends ProgressBar
method HorizontalProgressBarWithNumber (line 67) | public HorizontalProgressBarWithNumber(Context context, AttributeSet a...
method HorizontalProgressBarWithNumber (line 72) | public HorizontalProgressBarWithNumber(Context context, AttributeSet a...
method onMeasure (line 81) | @Override
method measureHeight (line 93) | private int measureHeight(int measureSpec)
method obtainStyledAttributes (line 120) | private void obtainStyledAttributes(AttributeSet attrs)
method onDraw (line 165) | @Override
method dp2px (line 221) | protected int dp2px(int dpVal)
method sp2px (line 233) | protected int sp2px(int spVal)
FILE: MoneyCharge/app/src/main/java/com/zhy/view/RoundProgressBarWidthNumber.java
class RoundProgressBarWidthNumber (line 13) | public class RoundProgressBarWidthNumber extends
method RoundProgressBarWidthNumber (line 22) | public RoundProgressBarWidthNumber(Context context)
method RoundProgressBarWidthNumber (line 27) | public RoundProgressBarWidthNumber(Context context, AttributeSet attrs)
method onMeasure (line 48) | @Override
method onDraw (line 67) | @Override
FILE: MoneyCharge/app/src/main/java/cwp/moneycharge/dao/AccountDAO.java
class AccountDAO (line 9) | public class AccountDAO {
method AccountDAO (line 14) | public AccountDAO(Context context)// 定义构造函数
method add (line 25) | public int add(Tb_account tb_account) {
method update (line 54) | public void update(int id, String username, String pwd) {
method deleteById (line 61) | public void deleteById(int id) {
method find (line 72) | public Tb_account find(String username, String pwd) {
method find (line 89) | public String find(int id) {
method getCount (line 104) | public long getCount() {
FILE: MoneyCharge/app/src/main/java/cwp/moneycharge/dao/DBOpenHelper.java
class DBOpenHelper (line 7) | public class DBOpenHelper extends SQLiteOpenHelper {
method DBOpenHelper (line 11) | public DBOpenHelper(Context context){
method onCreate (line 15) | @Override
method onUpgrade (line 72) | @Override
method droptable (line 80) | public void droptable(SQLiteDatabase db){
FILE: MoneyCharge/app/src/main/java/cwp/moneycharge/dao/IncomeDAO.java
class IncomeDAO (line 25) | public class IncomeDAO {
method IncomeDAO (line 32) | public IncomeDAO(Context context) {
method add (line 42) | public void add(Tb_income tb_income) {
method update (line 58) | public void update(Tb_income tb_income) {
method find (line 76) | public Tb_income find(int id, int no) {
method detele (line 102) | public void detele(Integer... ids) {
method getScrollData (line 127) | public List<Tb_income> getScrollData(int id, int start, int count) {
method getScrollData (line 151) | public List<Tb_income> getScrollData(int id, int start, int count,
method getScrollDataTotal (line 176) | public List<Tb_income> getScrollDataTotal(int id, int start, int count,
method search (line 203) | public List<Tb_income> search(int id, String string) {
method searchALL (line 255) | public List<Tb_income> searchALL(int id, String date1, String date2,
method getCount (line 339) | public long getCount() {
method getCount (line 349) | public long getCount(int id) {
method getMaxNo (line 366) | public int getMaxNo(int id) {
method addDays (line 377) | @SuppressLint("SimpleDateFormat")
method getamountData (line 395) | public Double getamountData(int userid2) {
method getDataOnDay (line 411) | public Datapicker getDataOnDay(String date1, String date2) {
method getDataMonth (line 433) | public List<Datapicker> getDataMonth(int id, int year, int month) {
method getDataAnytime (line 511) | public List<Datapicker> getDataAnytime(int id, String date1, String da...
method deleteUserData (line 528) | public void deleteUserData(int id) {// 清空用户数据
method getKDataOnDay (line 533) | public List<KindData> getKDataOnDay(int id, String date1, String date2) {
method getKDataOnMonth (line 555) | public List<KindData> getKDataOnMonth(int id, int year, int month) {
method gettime (line 618) | public String gettime(int mYear, int defaultMonth, int defaultDay,
FILE: MoneyCharge/app/src/main/java/cwp/moneycharge/dao/ItypeDAO.java
class ItypeDAO (line 20) | public class ItypeDAO {
method ItypeDAO (line 34) | public ItypeDAO(Context context) {
method add (line 43) | public void add(Tb_itype tb_itype){
method modify (line 53) | public void modify(Tb_itype tb_itype){
method delete (line 62) | public void delete(Integer... ids){
method deleteByName (line 78) | public void deleteByName(int id,String typename){
method deleteById (line 84) | public void deleteById(int id){
method getScrollData (line 98) | public List<Tb_itype> getScrollData(int id,int start, int count) {
method getCount (line 120) | public long getCount() {
method getCount (line 129) | public long getCount(int id) {
method getMaxId (line 144) | public int getMaxId() {
method getItypeName (line 157) | public List<String> getItypeName(int id){
method getOneName (line 168) | public String getOneName(int id,int no){
method getOneImg (line 178) | public int getOneImg(int id, int no) {
method getDataOnDay (line 187) | public List<Datapicker> getDataOnDay(int id,String date1,String date2){
method modifyByName (line 206) | public void modifyByName(int id,String old,String now){
method initData (line 212) | public void initData(int id) {
FILE: MoneyCharge/app/src/main/java/cwp/moneycharge/dao/NoteDAO.java
class NoteDAO (line 19) | public class NoteDAO {
method NoteDAO (line 28) | public NoteDAO(Context context) {
method add (line 37) | public void add(Tb_note tb_note) {
method update (line 48) | public void update(Tb_note tb_note) {
method find (line 60) | public Tb_note find(int id,int no) {
method detele (line 80) | public void detele(Integer... ids) {
method getScrollData (line 105) | public List<Tb_note> getScrollData(int id,int start, int count) {
method getCount (line 127) | public long getCount(int id) {
method getMaxNo (line 142) | public int getMaxNo(int id) {
method deleteUserData (line 150) | public void deleteUserData(int id){//清空用户数据
FILE: MoneyCharge/app/src/main/java/cwp/moneycharge/dao/PayDAO.java
class PayDAO (line 25) | public class PayDAO {
method PayDAO (line 32) | public PayDAO(Context context) {
method add (line 42) | public void add(Tb_pay tb_pay) {
method update (line 58) | public void update(Tb_pay tb_pay) {
method find (line 76) | public Tb_pay find(int id, int no) {
method detele (line 102) | public void detele(Integer... ids) {
method getScrollData (line 127) | public List<Tb_pay> getScrollData(int id, int start, int count) {
method getCount (line 156) | public long getCount() {
method getCount (line 166) | public long getCount(int id) {
method getMaxNo (line 182) | public int getMaxNo(int id) {
method addDays (line 192) | @SuppressLint("SimpleDateFormat")
method getamountData (line 210) | public Double getamountData(int userid) {
method getDataOnDay (line 226) | public Datapicker getDataOnDay(String date1, String date2) {
method getDataMonth (line 248) | public List<Datapicker> getDataMonth(int id, int year, int month) {
method getDataAnytime (line 322) | public List<Datapicker> getDataAnytime(int id, String date1, String da...
method deleteUserData (line 339) | public void deleteUserData(int id) {// 清空用户数据
method getScrollData (line 344) | public List<Tb_pay> getScrollData(int id, int start, int count,
method getKDataOnDay (line 368) | public List<KindData> getKDataOnDay(int id, String date1, String date2) {
method getKDataOnMonth (line 390) | public List<KindData> getKDataOnMonth(int id, int year, int month) {
FILE: MoneyCharge/app/src/main/java/cwp/moneycharge/dao/PtypeDAO.java
class PtypeDAO (line 14) | public class PtypeDAO {
method PtypeDAO (line 29) | public PtypeDAO(Context context) {
method add (line 39) | public void add(Tb_ptype tb_ptype) {
method modify (line 53) | public void modify(Tb_ptype tb_ptype) {
method modifyByName (line 61) | public void modifyByName(int id, String old, String now) {
method delete (line 73) | public void delete(Integer... ids) {
method deleteByName (line 89) | public void deleteByName(int id, String typename) {
method deleteById (line 96) | public void deleteById(int id) {
method getScrollData (line 111) | public List<Tb_ptype> getScrollData(int id, int start, int count) {
method getCount (line 135) | public long getCount() {
method getCount (line 145) | public long getCount(int id) {
method getMaxId (line 162) | public int getMaxId() {
method getPtypeName (line 176) | public List<String> getPtypeName(int id) {
method getOneName (line 191) | public String getOneName(int id, int no) {
method getOneImg (line 202) | public int getOneImg(int id, int no) {
method initData (line 209) | public void initData(int id) {
FILE: MoneyCharge/app/src/main/java/cwp/moneycharge/model/ActivityManager.java
class ActivityManager (line 11) | public class ActivityManager {
method ActivityManager (line 15) | public ActivityManager() {
method getInstance (line 20) | public synchronized static ActivityManager getInstance() {
method addActivity (line 27) | public void addActivity(Activity activity) {
method exit (line 31) | public void exit() {
FILE: MoneyCharge/app/src/main/java/cwp/moneycharge/model/CustomDialog.java
class CustomDialog (line 30) | public class CustomDialog extends Dialog {
method CustomDialog (line 32) | public CustomDialog(Context context, int theme) {
method CustomDialog (line 36) | public CustomDialog(Context context) {
class Builder (line 43) | public static class Builder {
method Builder (line 56) | public Builder(Context context) {
method setMessage (line 65) | public Builder setMessage(String message) {
method setMessage (line 75) | public Builder setMessage(int message) {
method setTitle (line 85) | public Builder setTitle(int title) {
method setTitle (line 95) | public Builder setTitle(String title) {
method setContentView (line 107) | public Builder setContentView(View v) {
method setPositiveButton (line 118) | public Builder setPositiveButton(int positiveButtonText,
method setPositiveButton (line 132) | public Builder setPositiveButton(String positiveButtonText,
method setNegativeButton (line 145) | public Builder setNegativeButton(int negativeButtonText,
method setNegativeButton (line 159) | public Builder setNegativeButton(String negativeButtonText,
method create (line 169) | public CustomDialog create() {
FILE: MoneyCharge/app/src/main/java/cwp/moneycharge/model/Datapicker.java
class Datapicker (line 3) | public class Datapicker {
method Datapicker (line 7) | public Datapicker(int no,Double money,String time) {
method getNo (line 13) | public int getNo() {
method setNo (line 16) | public void setNo(int no) {
method getTime (line 19) | public String getTime() {
method setTime (line 22) | public void setTime(String time) {
method getMoney (line 25) | public Double getMoney() {
method setMoney (line 28) | public void setMoney(Double money) {
FILE: MoneyCharge/app/src/main/java/cwp/moneycharge/model/KindData.java
class KindData (line 3) | public class KindData {
method KindData (line 6) | public KindData(int kindname,double amount) {
method getKindname (line 11) | public int getKindname() {
method setKindname (line 14) | public void setKindname(int kindname) {
method getAmount (line 17) | public double getAmount() {
method setAmount (line 20) | public void setAmount(double amount) {
FILE: MoneyCharge/app/src/main/java/cwp/moneycharge/model/Tb_account.java
class Tb_account (line 3) | public class Tb_account {
method Tb_account (line 8) | public Tb_account( int id ,String username, String pwd ) {
method Tb_account (line 15) | public Tb_account(){
method get_id (line 18) | public int get_id() {
method getUsername (line 21) | public String getUsername() {
method setUsername (line 24) | public void setUsername(String username) {
method getPwd (line 27) | public String getPwd() {
method setPwd (line 30) | public void setPwd(String pwd) {
FILE: MoneyCharge/app/src/main/java/cwp/moneycharge/model/Tb_income.java
class Tb_income (line 13) | public class Tb_income {
method Tb_income (line 27) | public Tb_income(int id, int no, double d, String time, int type,
method getPhoto (line 42) | public String getPhoto() {
method setPhoto (line 46) | public void setPhoto(String photo) {
method Tb_income (line 50) | public Tb_income() {
method get_id (line 54) | public int get_id() {
method set_id (line 58) | public void set_id(int _id) {
method getNo (line 62) | public int getNo() {
method setNo (line 66) | public void setNo(int no) {
method getMoney (line 70) | public double getMoney() {
method getMoney2 (line 74) | public String getMoney2() {
method setMoney (line 80) | public void setMoney(double money) {
method getTime (line 84) | public String getTime() {
method setTime (line 88) | public void setTime(String time) {
method getType (line 92) | public int getType() {
method setType (line 96) | public void setType(int type) {
method getHandler (line 100) | public String getHandler() {
method setHandler (line 104) | public void setHandler(String handler) {
method getMark (line 108) | public String getMark() {
method setMark (line 112) | public void setMark(String mark) {
method getKind (line 116) | public String getKind() {
method setKind (line 120) | public void setKind(String kind) {
FILE: MoneyCharge/app/src/main/java/cwp/moneycharge/model/Tb_itype.java
class Tb_itype (line 3) | public class Tb_itype {
method Tb_itype (line 9) | public Tb_itype() {
method Tb_itype (line 13) | public Tb_itype(int id,int no,String typename) {
method get_id (line 20) | public int get_id() {
method set_id (line 23) | public void set_id(int _id) {
method getNo (line 27) | public int getNo() {
method set_No (line 30) | public void set_No(int no) {
method getTypename (line 33) | public String getTypename() {
method setTypename (line 36) | public void setTypename(String typename) {
FILE: MoneyCharge/app/src/main/java/cwp/moneycharge/model/Tb_note.java
class Tb_note (line 3) | public class Tb_note {
method Tb_note (line 9) | public Tb_note() {
method Tb_note (line 13) | public Tb_note(int id,int no,String note) {
method get_id (line 20) | public int get_id() {
method set_id (line 23) | public void set_id(int _id) {
method getNo (line 27) | public int getNo() {
method setNo (line 31) | public void setNo(int no) {
method getNote (line 34) | public String getNote() {
method setNote (line 37) | public void setNote(String note) {
FILE: MoneyCharge/app/src/main/java/cwp/moneycharge/model/Tb_pay.java
class Tb_pay (line 6) | public class Tb_pay {
method Tb_pay (line 20) | public Tb_pay() {
method Tb_pay (line 25) | public Tb_pay(int id, int no, double d, String time, int type,
method get_id (line 39) | public int get_id() {
method set_id (line 43) | public void set_id(int _id) {
method setNo (line 47) | public void setNo(int no) {
method getNo (line 51) | public int getNo() {
method getMoney (line 55) | public double getMoney() {
method setMoney (line 59) | public void setMoney(double money) {
method getMoney2 (line 63) | public String getMoney2() {
method getTime (line 69) | public String getTime() {
method setTime (line 73) | public void setTime(String time) {
method getType (line 77) | public int getType() {
method setType (line 81) | public void setType(int type) {
method getAddress (line 85) | public String getAddress() {
method setAddress (line 89) | public void setAddress(String address) {
method getMark (line 93) | public String getMark() {
method setMark (line 97) | public void setMark(String mark) {
method getPhoto (line 101) | public String getPhoto() {
method setPhoto (line 105) | public void setPhoto(String photo) {
FILE: MoneyCharge/app/src/main/java/cwp/moneycharge/model/Tb_ptype.java
class Tb_ptype (line 3) | public class Tb_ptype {
method Tb_ptype (line 9) | public Tb_ptype() {
method Tb_ptype (line 13) | public Tb_ptype(int id,int no,String typename) {
method get_id (line 20) | public int get_id() {
method set_id (line 23) | public void set_id(int _id) {
method set_No (line 26) | public void set_No(int no) {
method getNo (line 29) | public int getNo() {
method getTypename (line 32) | public String getTypename() {
method setTypename (line 35) | public void setTypename(String typename) {
Condensed preview — 278 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,233K chars).
[
{
"path": "LICENSE",
"chars": 1074,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2015 linmp4\n\nPermission is hereby granted, free of charge, to any person obtaining "
},
{
"path": "MoneyCharge/.gitignore",
"chars": 497,
"preview": "### Android ###\n.gradle\n/local.properties\n.DS_Store\n/captures\n.externalNativeBuild\n\nHELP.md\ntarget/\n!.mvn/wrapper/maven-"
},
{
"path": "MoneyCharge/app/build.gradle",
"chars": 1102,
"preview": "apply plugin: 'com.android.application'\n\nandroid {\n compileSdkVersion 22\n buildToolsVersion \"22.0.1\"\n\n defaultC"
},
{
"path": "MoneyCharge/app/lint.xml",
"chars": 53,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<lint>\n</lint>"
},
{
"path": "MoneyCharge/app/src/main/AndroidManifest.xml",
"chars": 6665,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package="
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/chart/BaseFoldingLayout.java",
"chars": 19639,
"preview": "/*\n * Copyright (C) 2013 Priboi Tiberiu\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the A"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/chart/ChartProp.java",
"chars": 1664,
"preview": "package com.cwp.chart;\n\nimport android.graphics.Color;\nimport android.util.Log;\nimport android.view.View;\n\npublic class "
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/chart/ChartPropChangeListener.java",
"chars": 117,
"preview": "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",
"chars": 2165,
"preview": "package com.cwp.chart;\n\nimport com.cwp.cmoneycharge.R;\n\nimport android.content.Context;\nimport android.util.SparseArray;"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/chart/CustomMultiChoiceDialog.java",
"chars": 10450,
"preview": "package com.cwp.chart;\n\nimport com.cwp.cmoneycharge.R;\n\nimport android.app.Dialog;\nimport android.content.Context;\nimpor"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/chart/FoldingLayout.java",
"chars": 6539,
"preview": "/*\n * Copyright (C) 2013 Priboi Tiberiu\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the A"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/chart/MenuFragment.java",
"chars": 3441,
"preview": "package com.cwp.chart;\n\nimport com.cwp.cmoneycharge.PayChart;\nimport com.cwp.cmoneycharge.PayData;\nimport com.cwp.cmoney"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/chart/MyAdspter.java",
"chars": 3987,
"preview": "package com.cwp.chart;\n\nimport java.util.List;\nimport java.util.Map;\n\nimport com.cwp.cmoneycharge.R;\n\nimport android.R.b"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/chart/MyButton.java",
"chars": 3555,
"preview": "package com.cwp.chart;\n\nimport com.cwp.cmoneycharge.R;\n\nimport android.content.Context;\n\nimport android.graphics.Bitmap;"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/chart/MyButtonClickListener.java",
"chars": 92,
"preview": "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",
"chars": 1060,
"preview": "/*\n * Copyright (C) 2013 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/chart/PieChart.java",
"chars": 2783,
"preview": "package com.cwp.chart;\n\nimport android.content.Context;\nimport android.util.AttributeSet;\nimport android.util.Log;\nimpor"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/chart/PieView.java",
"chars": 13995,
"preview": "package com.cwp.chart;\n\nimport java.util.ArrayList;\n\nimport com.cwp.cmoneycharge.PayChart;\nimport com.cwp.cmoneycharge.R"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/chart/PiewController.java",
"chars": 3472,
"preview": "package com.cwp.chart;\n\nimport android.view.View;\nimport android.view.View.MeasureSpec;\nimport android.view.ViewGroup.Ma"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/chart/PullToRefreshView.java",
"chars": 17560,
"preview": "package com.cwp.chart;\n\nimport java.util.Date;\n\nimport com.cwp.cmoneycharge.FragmentPage3;\nimport com.cwp.cmoneycharge.R"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/chart/RiseNumberBase.java",
"chars": 320,
"preview": "package com.cwp.chart;\n\npublic interface RiseNumberBase {\n public void start();\n public RiseNumberTextView withNum"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/chart/RiseNumberTextView.java",
"chars": 3525,
"preview": "package com.cwp.chart;\n\nimport android.content.Context;\nimport android.util.AttributeSet;\nimport android.widget.TextView"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/chart/SystemBarTintManager.java",
"chars": 19713,
"preview": "/*\n * Copyright (C) 2013 readyState Software Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n "
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/chart/Util.java",
"chars": 377,
"preview": "package com.cwp.chart;\n\nimport android.os.Build;\n\npublic class Util {\n\n static final boolean IS_JBMR2 = Build.VERSION"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/About.java",
"chars": 9441,
"preview": "package com.cwp.cmoneycharge;\n\nimport com.cwp.chart.SystemBarTintManager;\nimport com.cwp.pattern.GuideGesturePasswordAct"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/AddPay.java",
"chars": 33798,
"preview": "package com.cwp.cmoneycharge;\n\nimport java.io.IOException;\nimport java.text.DecimalFormat;\nimport java.text.SimpleDateFo"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Author.java",
"chars": 1111,
"preview": "package com.cwp.cmoneycharge;\n\nimport cwp.moneycharge.model.ActivityManager;\nimport android.app.Activity;\nimport android"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/BaseEffects.java",
"chars": 2149,
"preview": "package com.cwp.cmoneycharge;\n\nimport android.view.View;\n\nimport com.nineoldandroids.animation.AnimatorSet;\nimport com.n"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/BaseFrament.java",
"chars": 205,
"preview": "package com.cwp.cmoneycharge;\n\nimport android.support.v4.app.Fragment;\n\nabstract public class BaseFrament extends Fragme"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Config.java",
"chars": 2557,
"preview": "package com.cwp.cmoneycharge;\n\nimport com.baidu.voicerecognition.android.VoiceRecognitionConfig;\nimport com.baidu.voicer"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Constants.java",
"chars": 304,
"preview": "package com.cwp.cmoneycharge;\n\npublic class Constants {\n /*\n * 请登录http://developer.baidu.com,注册成为百度开发\n * 将对应的"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/CrashApplication.java",
"chars": 1270,
"preview": "package com.cwp.cmoneycharge;\n\nimport com.cwp.pattern.LockPatternUtils;\n\nimport android.app.Application;\nimport android."
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/CrashHandler.java",
"chars": 6750,
"preview": "package com.cwp.cmoneycharge;\n\nimport java.io.File;\nimport java.io.FileNotFoundException;\nimport java.io.FileOutputStrea"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Description.java",
"chars": 1062,
"preview": "package com.cwp.cmoneycharge;\n\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.os.Bundle;\nimp"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/DialogShowUtil.java",
"chars": 7188,
"preview": "package com.cwp.cmoneycharge;\n\nimport android.app.Activity;\nimport android.content.Context;\nimport android.view.View;\nim"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/DigitUtil.java",
"chars": 3798,
"preview": "package com.cwp.cmoneycharge;\n\n/**\n * @author loiy\n * www.agrilink.cn\n * 2012.11.30 \n */\nimport java.util.Hashtable"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Effectstype.java",
"chars": 615,
"preview": "package com.cwp.cmoneycharge;\n\nimport com.cwp.cmoneycharge.RotateBottom;\nimport com.cwp.cmoneycharge.Shake;\n\n\n/**\n * Cre"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/FragmentPage1.java",
"chars": 7438,
"preview": "package com.cwp.cmoneycharge;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Calendar;\nimport ja"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/FragmentPage2.java",
"chars": 9686,
"preview": "package com.cwp.cmoneycharge;\n\nimport com.cwp.cmoneycharge.R;\n\nimport android.content.Context;\nimport android.content.In"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/FragmentPage3.java",
"chars": 18616,
"preview": "package com.cwp.cmoneycharge;\n\nimport java.text.SimpleDateFormat;\nimport java.util.ArrayList;\nimport java.util.Arrays;\ni"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/FragmentPage4.java",
"chars": 5516,
"preview": "package com.cwp.cmoneycharge;\n\nimport com.cwp.cmoneycharge.R;\n\nimport cwp.moneycharge.dao.IncomeDAO;\nimport cwp.moneycha"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/InPtypeManager.java",
"chars": 6388,
"preview": "package com.cwp.cmoneycharge;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\n\nimport com."
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/IncomeData.java",
"chars": 11407,
"preview": "package com.cwp.cmoneycharge;\n\nimport java.text.NumberFormat;\nimport java.util.ArrayList;\nimport java.util.List;\nimport "
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/KeyboardUtil.java",
"chars": 4028,
"preview": "package com.cwp.cmoneycharge;\n\nimport com.cwp.cmoneycharge.R;\n\nimport android.app.Activity;\nimport android.content.Conte"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/MainActivity.java",
"chars": 4802,
"preview": "package com.cwp.cmoneycharge;\n\nimport java.util.Calendar;\n\nimport com.cwp.chart.SystemBarTintManager;\nimport com.cwp.cmo"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/ModifyInP.java",
"chars": 8668,
"preview": "package com.cwp.cmoneycharge;\n\nimport java.util.Calendar;\nimport java.util.List;\n \nimport com.cwp.cmoneycharge.R; \n\nimp"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/NiftyDialogBuilder.java",
"chars": 8628,
"preview": "package com.cwp.cmoneycharge;\n\nimport com.cwp.cmoneycharge.R;\n\nimport android.app.Dialog;\nimport android.content.Context"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/PayChart.java",
"chars": 20439,
"preview": "package com.cwp.cmoneycharge;\n\nimport java.text.DecimalFormat;\nimport java.text.NumberFormat;\nimport java.util.ArrayList"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/PayData.java",
"chars": 9245,
"preview": "package com.cwp.cmoneycharge;\n\nimport java.text.NumberFormat;\nimport java.util.ArrayList;\nimport java.util.Calendar;\nimp"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/RotateBottom.java",
"chars": 670,
"preview": "package com.cwp.cmoneycharge;\n\nimport android.view.View;\nimport android.widget.RelativeLayout;\n\nimport com.nineoldandroi"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/SearchActivity.java",
"chars": 25265,
"preview": "package com.cwp.cmoneycharge;\n\nimport java.text.SimpleDateFormat;\nimport java.util.ArrayList;\nimport java.util.Calendar;"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/SettingActivity.java",
"chars": 5774,
"preview": "package com.cwp.cmoneycharge;\n\nimport com.baidu.voicerecognition.android.ui.BaiduASRDigitalDialog;\n\nimport android.app.A"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/Shake.java",
"chars": 460,
"preview": "package com.cwp.cmoneycharge;\n\nimport android.view.View;\n\nimport com.nineoldandroids.animation.ObjectAnimator;\n\n/**\n * C"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/SlideTop.java",
"chars": 497,
"preview": "package com.cwp.cmoneycharge;\n\nimport android.view.View;\n\nimport com.nineoldandroids.animation.ObjectAnimator;\n\n/**\n * C"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/cmoneycharge/SysApplication.java",
"chars": 1099,
"preview": "package com.cwp.cmoneycharge;\nimport java.util.LinkedList;\nimport java.util.List;\nimport android.app.Activity;\nimport an"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/pattern/CreateGesturePasswordActivity.java",
"chars": 14229,
"preview": "package com.cwp.pattern;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport com.cwp.chart.SystemBarTintManager;"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/pattern/GuideGesturePasswordActivity.java",
"chars": 2303,
"preview": "package com.cwp.pattern;\n\nimport com.cwp.chart.SystemBarTintManager;\nimport com.cwp.cmoneycharge.About;\nimport com.cwp.c"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/pattern/LockPatternUtils.java",
"chars": 6568,
"preview": "package com.cwp.pattern;\n\nimport java.io.File;\nimport java.io.FileNotFoundException;\nimport java.io.IOException;\nimport "
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/pattern/LockPatternView.java",
"chars": 31076,
"preview": "package com.cwp.pattern;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport com.cwp.cmoneycharge.R;\n\nimport and"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/pattern/ParseXmlService.java",
"chars": 1788,
"preview": "package com.cwp.pattern;\n\nimport java.io.InputStream;\nimport java.util.HashMap;\n\nimport javax.xml.parsers.DocumentBuilde"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/pattern/UnlockGesturePasswordActivity.java",
"chars": 7827,
"preview": "package com.cwp.pattern;\n\nimport java.util.List;\n\nimport com.cwp.chart.SystemBarTintManager;\nimport com.cwp.cmoneycharge"
},
{
"path": "MoneyCharge/app/src/main/java/com/cwp/pattern/UpdateManager.java",
"chars": 11697,
"preview": "package com.cwp.pattern;\n\nimport java.io.File;\nimport java.io.FileOutputStream;\nimport java.io.IOException;\nimport java."
},
{
"path": "MoneyCharge/app/src/main/java/com/example/testpic/AlbumHelper.java",
"chars": 8115,
"preview": "package com.example.testpic;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.Iterator;\nimport ja"
},
{
"path": "MoneyCharge/app/src/main/java/com/example/testpic/Bimp.java",
"chars": 1744,
"preview": "package com.example.testpic;\n\nimport java.io.BufferedInputStream;\nimport java.io.File;\nimport java.io.FileInputStream;\ni"
},
{
"path": "MoneyCharge/app/src/main/java/com/example/testpic/BitmapCache.java",
"chars": 3247,
"preview": "package com.example.testpic;\n\nimport java.io.BufferedInputStream;\nimport java.io.File;\nimport java.io.FileInputStream;\ni"
},
{
"path": "MoneyCharge/app/src/main/java/com/example/testpic/FileUtils.java",
"chars": 2092,
"preview": "package com.example.testpic;\n\nimport java.io.File;\nimport java.io.FileNotFoundException;\nimport java.io.FileOutputStream"
},
{
"path": "MoneyCharge/app/src/main/java/com/example/testpic/ImageBucket.java",
"chars": 223,
"preview": "package com.example.testpic;\n\nimport java.util.List;\n\n/**\n * 一个目录的相册对象\n * \n * @author Administrator\n * \n */\npublic class"
},
{
"path": "MoneyCharge/app/src/main/java/com/example/testpic/ImageBucketAdapter.java",
"chars": 2802,
"preview": "package com.example.testpic;\n\nimport java.util.List;\n\nimport android.app.Activity;\nimport android.graphics.Bitmap;\nimpor"
},
{
"path": "MoneyCharge/app/src/main/java/com/example/testpic/ImageGridActivity.java",
"chars": 4619,
"preview": "package com.example.testpic;\n\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.Iterator;\nimport"
},
{
"path": "MoneyCharge/app/src/main/java/com/example/testpic/ImageGridAdapter.java",
"chars": 4274,
"preview": "package com.example.testpic;\n\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\nimport android.app"
},
{
"path": "MoneyCharge/app/src/main/java/com/example/testpic/ImageItem.java",
"chars": 278,
"preview": "package com.example.testpic;\n\nimport java.io.Serializable;\n\n/**\n * 一个图片对象\n * \n * @author Administrator\n * \n */\npublic cl"
},
{
"path": "MoneyCharge/app/src/main/java/com/example/testpic/NoScrollGridView.java",
"chars": 561,
"preview": "package com.example.testpic;\n\nimport android.content.Context;\nimport android.util.AttributeSet;\nimport android.widget.Gr"
},
{
"path": "MoneyCharge/app/src/main/java/com/example/testpic/PhotoActivity.java",
"chars": 5385,
"preview": "package com.example.testpic;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport com.cwp.cmoneycharge.R;\n\nimport"
},
{
"path": "MoneyCharge/app/src/main/java/com/example/testpic/PublishedActivity.java",
"chars": 10158,
"preview": "package com.example.testpic;\n\nimport java.io.File;\nimport java.io.FileNotFoundException;\nimport java.io.FileOutputStream"
},
{
"path": "MoneyCharge/app/src/main/java/com/example/testpic/TestPicActivity.java",
"chars": 3189,
"preview": "package com.example.testpic;\n\nimport java.io.Serializable;\nimport java.util.List;\n\nimport com.cwp.cmoneycharge.R;\n\nimpor"
},
{
"path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/CanvasTransformerBuilder.java",
"chars": 2931,
"preview": "package com.slidingmenu.lib;\n\nimport android.graphics.Canvas;\nimport android.view.animation.Interpolator;\n\nimport com.sl"
},
{
"path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/CustomViewAbove.java",
"chars": 29861,
"preview": "package com.slidingmenu.lib;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport android.content.Context;\nimport"
},
{
"path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/CustomViewBehind.java",
"chars": 12166,
"preview": "package com.slidingmenu.lib;\n\nimport android.content.Context;\nimport android.graphics.Bitmap;\nimport android.graphics.Ca"
},
{
"path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/MenuInterface.java",
"chars": 1122,
"preview": "package com.slidingmenu.lib;\n\nimport android.graphics.Canvas;\nimport android.graphics.drawable.Drawable;\nimport android."
},
{
"path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/SlidingMenu.java",
"chars": 27687,
"preview": "package com.slidingmenu.lib;\n\nimport java.lang.reflect.Method;\n\nimport android.annotation.SuppressLint;\nimport android.a"
},
{
"path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SlidingActivity.java",
"chars": 4324,
"preview": "package com.slidingmenu.lib.app;\n\nimport android.annotation.TargetApi;\nimport android.app.Activity;\nimport android.os.Bu"
},
{
"path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SlidingActivityBase.java",
"chars": 2376,
"preview": "package com.slidingmenu.lib.app;\n\nimport android.view.View;\nimport android.view.ViewGroup.LayoutParams;\n\nimport com.slid"
},
{
"path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SlidingActivityHelper.java",
"chars": 6155,
"preview": "package com.slidingmenu.lib.app;\n\nimport android.app.Activity;\nimport android.os.Bundle;\nimport android.os.Handler;\nimpo"
},
{
"path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SlidingFragmentActivity.java",
"chars": 4071,
"preview": "package com.slidingmenu.lib.app;\n\nimport android.os.Bundle;\nimport android.support.v4.app.FragmentActivity;\nimport andro"
},
{
"path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SlidingListActivity.java",
"chars": 4154,
"preview": "package com.slidingmenu.lib.app;\n\nimport android.app.ListActivity;\nimport android.os.Bundle;\nimport android.view.KeyEven"
},
{
"path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SlidingMapActivity.java",
"chars": 4347,
"preview": "//package com.slidingmenu.lib.app;\n//\n//import android.os.Bundle;\n//import android.view.KeyEvent;\n//import android.view."
},
{
"path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SlidingPreferenceActivity.java",
"chars": 4035,
"preview": "package com.slidingmenu.lib.app;\n\nimport com.slidingmenu.lib.SlidingMenu;\n\nimport android.os.Bundle;\nimport android.pref"
},
{
"path": "MoneyCharge/app/src/main/java/com/slidingmenu/lib/app/SystemBarTintManager.java",
"chars": 19723,
"preview": "/*\n * Copyright (C) 2013 readyState Software Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n "
},
{
"path": "MoneyCharge/app/src/main/java/com/umeng/fb/example/AppApplication.java",
"chars": 342,
"preview": "package com.umeng.fb.example;\n\nimport android.app.Application;\nimport com.umeng.fb.push.FeedbackPush;\n\n/**\n * Created by"
},
{
"path": "MoneyCharge/app/src/main/java/com/umeng/fb/example/AppPush.java",
"chars": 1267,
"preview": "package com.umeng.fb.example;\n\n\nimport android.content.Context;\n\nimport com.umeng.fb.push.FBMessage;\nimport com.umeng.fb"
},
{
"path": "MoneyCharge/app/src/main/java/com/umeng/fb/example/CustomActivity.java",
"chars": 8517,
"preview": "package com.umeng.fb.example;\n\nimport java.text.SimpleDateFormat;\nimport java.util.Date;\nimport java.util.List;\n\nimport "
},
{
"path": "MoneyCharge/app/src/main/java/com/umeng/fb/example/MyPushIntentService.java",
"chars": 967,
"preview": "package com.umeng.fb.example;\n\nimport org.android.agoo.client.BaseConstants;\nimport org.json.JSONObject;\n\nimport android"
},
{
"path": "MoneyCharge/app/src/main/java/com/zhy/view/HorizontalProgressBarWithNumber.java",
"chars": 6238,
"preview": "package com.zhy.view;\n\nimport android.content.Context;\nimport android.content.res.TypedArray;\nimport android.graphics.Ca"
},
{
"path": "MoneyCharge/app/src/main/java/com/zhy/view/RoundProgressBarWidthNumber.java",
"chars": 2648,
"preview": "package com.zhy.view;\n\nimport android.content.Context;\nimport android.content.res.TypedArray;\nimport android.graphics.Ca"
},
{
"path": "MoneyCharge/app/src/main/java/cwp/moneycharge/dao/AccountDAO.java",
"chars": 3086,
"preview": "package cwp.moneycharge.dao;\n\nimport android.content.Context;\nimport android.database.Cursor;\nimport android.database.sq"
},
{
"path": "MoneyCharge/app/src/main/java/cwp/moneycharge/dao/DBOpenHelper.java",
"chars": 5923,
"preview": "package cwp.moneycharge.dao;\n\nimport android.content.Context;\nimport android.database.sqlite.SQLiteDatabase;\nimport andr"
},
{
"path": "MoneyCharge/app/src/main/java/cwp/moneycharge/dao/IncomeDAO.java",
"chars": 21564,
"preview": "/**\n * \n */\npackage cwp.moneycharge.dao;\n\nimport java.text.ParseException;\nimport java.text.SimpleDateFormat;\nimport jav"
},
{
"path": "MoneyCharge/app/src/main/java/cwp/moneycharge/dao/ItypeDAO.java",
"chars": 8678,
"preview": "package cwp.moneycharge.dao;\n\nimport cwp.moneycharge.model.Datapicker;\nimport cwp.moneycharge.model.Tb_itype; \nimport cw"
},
{
"path": "MoneyCharge/app/src/main/java/cwp/moneycharge/dao/NoteDAO.java",
"chars": 4137,
"preview": "/**\n * \n */\npackage cwp.moneycharge.dao;\n\n/**\n * @author cwpcc\n *\n */\nimport java.util.ArrayList;\nimport java.util.List;"
},
{
"path": "MoneyCharge/app/src/main/java/cwp/moneycharge/dao/PayDAO.java",
"chars": 12990,
"preview": "/**\n * \n */\npackage cwp.moneycharge.dao;\n\n/**\n * @author cwpcc\n *\n */\nimport java.text.ParseException;\nimport java.text."
},
{
"path": "MoneyCharge/app/src/main/java/cwp/moneycharge/dao/PtypeDAO.java",
"chars": 7958,
"preview": "package cwp.moneycharge.dao;\n\nimport cwp.moneycharge.model.Tb_ptype;\nimport cwp.moneycharge.dao.DBOpenHelper;\nimport jav"
},
{
"path": "MoneyCharge/app/src/main/java/cwp/moneycharge/model/ActivityManager.java",
"chars": 1091,
"preview": "package cwp.moneycharge.model;\n\nimport java.util.LinkedList; \nimport java.util.List; \nimport android.app.Activity; \nimpo"
},
{
"path": "MoneyCharge/app/src/main/java/cwp/moneycharge/model/CustomDialog.java",
"chars": 8256,
"preview": "package cwp.moneycharge.model;\n \n\nimport com.cwp.cmoneycharge.R;\nimport com.cwp.cmoneycharge.R.id;\nimport com.cwp.cmoney"
},
{
"path": "MoneyCharge/app/src/main/java/cwp/moneycharge/model/Datapicker.java",
"chars": 575,
"preview": "package cwp.moneycharge.model;\n\npublic class Datapicker {\n\tprivate int no;\n\tprivate String time;\n\tprivate Double money;\n"
},
{
"path": "MoneyCharge/app/src/main/java/cwp/moneycharge/model/KindData.java",
"chars": 485,
"preview": "package cwp.moneycharge.model;\n\npublic class KindData {\n\tprivate int kindname;\n\tprivate double amount;\n\tpublic KindData("
},
{
"path": "MoneyCharge/app/src/main/java/cwp/moneycharge/model/Tb_account.java",
"chars": 695,
"preview": "package cwp.moneycharge.model;\n\npublic class Tb_account {\n//_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT ,username va"
},
{
"path": "MoneyCharge/app/src/main/java/cwp/moneycharge/model/Tb_income.java",
"chars": 2112,
"preview": "/**\n * \n */\npackage cwp.moneycharge.model;\n\nimport java.math.BigDecimal;\nimport java.text.DecimalFormat;\n\n/**\n * @author"
},
{
"path": "MoneyCharge/app/src/main/java/cwp/moneycharge/model/Tb_itype.java",
"chars": 791,
"preview": "package cwp.moneycharge.model;\n\npublic class Tb_itype { \n\t//_id INTEGER NOT NULL PRIMARY KEY,no not null integer AUTOIN"
},
{
"path": "MoneyCharge/app/src/main/java/cwp/moneycharge/model/Tb_note.java",
"chars": 666,
"preview": "package cwp.moneycharge.model;\n\npublic class Tb_note {\n//_id integer primary key,no integer autoincrement,flag varchar(2"
},
{
"path": "MoneyCharge/app/src/main/java/cwp/moneycharge/model/Tb_pay.java",
"chars": 1921,
"preview": "package cwp.moneycharge.model;\n\nimport java.math.BigDecimal;\nimport java.text.DecimalFormat;\n\npublic class Tb_pay {\n\t// "
},
{
"path": "MoneyCharge/app/src/main/java/cwp/moneycharge/model/Tb_ptype.java",
"chars": 788,
"preview": "package cwp.moneycharge.model;\n\npublic class Tb_ptype {\n\t//_id INTEGER NOT NULL PRIMARY KEY,no not null integer AUTOINC"
},
{
"path": "MoneyCharge/app/src/main/res/anim/animation_1.xml",
"chars": 289,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<translate xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android"
},
{
"path": "MoneyCharge/app/src/main/res/anim/animation_2.xml",
"chars": 193,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<alpha xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:dur"
},
{
"path": "MoneyCharge/app/src/main/res/anim/fade_ins.xml",
"chars": 188,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<alpha xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:dur"
},
{
"path": "MoneyCharge/app/src/main/res/anim/hold.xml",
"chars": 524,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n <translate xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "MoneyCharge/app/src/main/res/anim/in_from_right.xml",
"chars": 307,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- 上滑切入 -->\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "MoneyCharge/app/src/main/res/anim/interpolator_cycle.xml",
"chars": 127,
"preview": "<cycleInterpolator xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:cycles=\"5\" />\n<!-- 动画连续多次运行,这里"
},
{
"path": "MoneyCharge/app/src/main/res/anim/out_to_left.xml",
"chars": 308,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- 上滑切入 -->\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "MoneyCharge/app/src/main/res/anim/push_bottom_in.xml",
"chars": 229,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n <translate"
},
{
"path": "MoneyCharge/app/src/main/res/anim/push_bottom_in_2.xml",
"chars": 258,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<translate xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android"
},
{
"path": "MoneyCharge/app/src/main/res/anim/push_up_in.xml",
"chars": 371,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- 上滑切入 -->\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "MoneyCharge/app/src/main/res/anim/push_up_out.xml",
"chars": 372,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- 上滑切出 -->\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "MoneyCharge/app/src/main/res/anim/shake.xml",
"chars": 272,
"preview": "<translate xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:duration=\"1000\"\n android:fromXDelta"
},
{
"path": "MoneyCharge/app/src/main/res/anim/shake_x.xml",
"chars": 217,
"preview": "<translate xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:duration=\"500\"\n android:fromXDelta="
},
{
"path": "MoneyCharge/app/src/main/res/anim/shake_y.xml",
"chars": 217,
"preview": "<translate xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:duration=\"500\"\n android:fromYDelta="
},
{
"path": "MoneyCharge/app/src/main/res/color/cost_text.xml",
"chars": 333,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n <item "
},
{
"path": "MoneyCharge/app/src/main/res/color/tab_friendfeed_text.xml",
"chars": 353,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item a"
},
{
"path": "MoneyCharge/app/src/main/res/color/tab_home_text.xml",
"chars": 357,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item a"
},
{
"path": "MoneyCharge/app/src/main/res/color/tab_more_text.xml",
"chars": 357,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item a"
},
{
"path": "MoneyCharge/app/src/main/res/color/tab_myfeed_text.xml",
"chars": 357,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item a"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/addphoto_btn.xml",
"chars": 286,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n <item "
},
{
"path": "MoneyCharge/app/src/main/res/drawable/bg_border.xml",
"chars": 396,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n <solid a"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/bgd_relatly_line.xml",
"chars": 432,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape\n\t\txmlns:android=\"http://schemas.android.com/apk/res/android\">\n\t\t<!-- 内部颜色 "
},
{
"path": "MoneyCharge/app/src/main/res/drawable/bt_add_pic.xml",
"chars": 291,
"preview": "<?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<"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/bt_nobgd.xml",
"chars": 1336,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n <!-- p"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/bt_queding.xml",
"chars": 293,
"preview": "<?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<"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/bt_quxiao.xml",
"chars": 291,
"preview": "<?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<"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/bt_shanchu.xml",
"chars": 293,
"preview": "<?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<"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/btn_cancel_selector.xml",
"chars": 318,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\t<item an"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/btn_login_selector.xml",
"chars": 265,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\t<item an"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/btn_press.xml",
"chars": 207,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n <corner"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/btn_selector.xml",
"chars": 338,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item "
},
{
"path": "MoneyCharge/app/src/main/res/drawable/btn_unpress.xml",
"chars": 209,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n <corner"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/chart_left_btn.xml",
"chars": 265,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n <item "
},
{
"path": "MoneyCharge/app/src/main/res/drawable/chart_right_btn.xml",
"chars": 266,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n <item "
},
{
"path": "MoneyCharge/app/src/main/res/drawable/chart_silding_btn.xml",
"chars": 259,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n <item "
},
{
"path": "MoneyCharge/app/src/main/res/drawable/checkbox.xml",
"chars": 365,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n <!-- c"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/common_btn_green.xml",
"chars": 397,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/common_btn_red.xml",
"chars": 453,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/corner_bdbdbd.xml",
"chars": 702,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" >\r\n\r\n <soli"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/corner_e0e0e0.xml",
"chars": 702,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" >\r\n\r\n <soli"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/corner_f2f2f2.xml",
"chars": 702,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" >\r\n\r\n <soli"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/dialog_bg.xml",
"chars": 198,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n \n\t<corner"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/dialog_bottom_bg.xml",
"chars": 468,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list\n xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\t<item>"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/fb_send_btn_bg.xml",
"chars": 303,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item a"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/keyboard_key.xml",
"chars": 349,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/locate_btn.xml",
"chars": 255,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n <item "
},
{
"path": "MoneyCharge/app/src/main/res/drawable/search_button_type.xml",
"chars": 333,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n <corners"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/selector.xml",
"chars": 314,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?> \n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\" > \n "
},
{
"path": "MoneyCharge/app/src/main/res/drawable/shadow.xml",
"chars": 250,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n <gradien"
},
{
"path": "MoneyCharge/app/src/main/res/drawable/skin_color_button.xml",
"chars": 228,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n <item "
},
{
"path": "MoneyCharge/app/src/main/res/drawable/tab_friendfeed_btn.xml",
"chars": 291,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?> \n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\"> \n \n "
},
{
"path": "MoneyCharge/app/src/main/res/drawable/tab_home_btn.xml",
"chars": 287,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?> \n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\"> \n \n "
},
{
"path": "MoneyCharge/app/src/main/res/drawable/tab_more_btn.xml",
"chars": 287,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?> \n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\"> \n \n "
},
{
"path": "MoneyCharge/app/src/main/res/drawable/tab_myfeed_btn.xml",
"chars": 300,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?> \n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\"> \n \n "
},
{
"path": "MoneyCharge/app/src/main/res/drawable/text_while.xml",
"chars": 289,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n <item "
},
{
"path": "MoneyCharge/app/src/main/res/drawable/welcome_bg.xml",
"chars": 184,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<bitmap android:src=\"@drawable/application_bg_welcome\" android:tileMode=\"repeat\"\n"
},
{
"path": "MoneyCharge/app/src/main/res/drawable-hdpi/common_lv_item_for_metadata_bg.xml",
"chars": 584,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item"
},
{
"path": "MoneyCharge/app/src/main/res/drawable-hdpi/common_lv_item_higher_bg.xml",
"chars": 606,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item"
},
{
"path": "MoneyCharge/app/src/main/res/drawable-hdpi/common_toolbar_btn.xml",
"chars": 553,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item"
},
{
"path": "MoneyCharge/app/src/main/res/drawable-hdpi/common_toolbar_btn_small.xml",
"chars": 500,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item"
},
{
"path": "MoneyCharge/app/src/main/res/drawable-hdpi/form_row_input_middle.xml",
"chars": 316,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item"
},
{
"path": "MoneyCharge/app/src/main/res/drawable-hdpi/form_row_input_middle_short_left.xml",
"chars": 515,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item"
},
{
"path": "MoneyCharge/app/src/main/res/drawable-hdpi/form_row_input_middle_short_right.xml",
"chars": 517,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item"
},
{
"path": "MoneyCharge/app/src/main/res/drawable-hdpi/form_row_input_top.xml",
"chars": 316,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item"
},
{
"path": "MoneyCharge/app/src/main/res/drawable-hdpi/income_tab_btn_radio.xml",
"chars": 349,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item"
},
{
"path": "MoneyCharge/app/src/main/res/drawable-hdpi/main_add_expense_quickly.xml",
"chars": 563,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item"
},
{
"path": "MoneyCharge/app/src/main/res/drawable-hdpi/main_row_stat.xml",
"chars": 501,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item"
},
{
"path": "MoneyCharge/app/src/main/res/drawable-hdpi/payout_tab_btn_radio.xml",
"chars": 349,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector\n xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item"
},
{
"path": "MoneyCharge/app/src/main/res/layout/about.xml",
"chars": 12924,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<TableLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n andro"
},
{
"path": "MoneyCharge/app/src/main/res/layout/account.xml",
"chars": 2786,
"preview": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:tools=\"http://schemas.android.com/to"
},
{
"path": "MoneyCharge/app/src/main/res/layout/activity_custom.xml",
"chars": 4703,
"preview": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:tools=\"http://schemas.android.com/t"
},
{
"path": "MoneyCharge/app/src/main/res/layout/activity_image_bucket.xml",
"chars": 1550,
"preview": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:tools=\"http://schemas.android.com/too"
},
{
"path": "MoneyCharge/app/src/main/res/layout/activity_image_grid.xml",
"chars": 2767,
"preview": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:tools=\"http://schemas.android.com/too"
},
{
"path": "MoneyCharge/app/src/main/res/layout/activity_index.xml",
"chars": 503,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<GridView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid:id="
},
{
"path": "MoneyCharge/app/src/main/res/layout/activity_main.xml",
"chars": 885,
"preview": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:tools=\"http://schemas.android.com/t"
},
{
"path": "MoneyCharge/app/src/main/res/layout/activity_photo.xml",
"chars": 1537,
"preview": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:tools=\"http://schemas.android.com/t"
},
{
"path": "MoneyCharge/app/src/main/res/layout/activity_selectimg.xml",
"chars": 1942,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n an"
},
{
"path": "MoneyCharge/app/src/main/res/layout/add.xml",
"chars": 16353,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n style"
},
{
"path": "MoneyCharge/app/src/main/res/layout/addincome.xml",
"chars": 5124,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid"
},
{
"path": "MoneyCharge/app/src/main/res/layout/addnote.xml",
"chars": 2544,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\tandroid"
},
{
"path": "MoneyCharge/app/src/main/res/layout/addpay.xml",
"chars": 6186,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n andr"
},
{
"path": "MoneyCharge/app/src/main/res/layout/author.xml",
"chars": 7324,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<TableLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\t android"
},
{
"path": "MoneyCharge/app/src/main/res/layout/changepwd.xml",
"chars": 5449,
"preview": "<TableLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:tools=\"http://schemas.android.com/tool"
},
{
"path": "MoneyCharge/app/src/main/res/layout/child.xml",
"chars": 1151,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n andr"
},
{
"path": "MoneyCharge/app/src/main/res/layout/custom_fb_dev_reply.xml",
"chars": 2696,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n an"
},
{
"path": "MoneyCharge/app/src/main/res/layout/custom_fb_user_reply.xml",
"chars": 2870,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n an"
},
{
"path": "MoneyCharge/app/src/main/res/layout/custom_view.xml",
"chars": 461,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n and"
},
{
"path": "MoneyCharge/app/src/main/res/layout/data.xml",
"chars": 1487,
"preview": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:tools=\"http://schemas.android.com/too"
},
{
"path": "MoneyCharge/app/src/main/res/layout/description.xml",
"chars": 4416,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<TableLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\t android"
}
]
// ... and 78 more files (download for full content)
About this extraction
This page contains the full source code of the linmp4/quickmark GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 278 files (1.0 MB), approximately 283.2k tokens, and a symbol index with 1408 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.