├── settings.gradle
├── app
├── .gitignore
├── libs
│ ├── commons-codec-1.10-1.jar
│ └── tbs_sdk_thirdapp_v3.5.0.1004_43500_sharewithdownload_withoutGame_obfs_20170801_113025.jar
└── src
│ └── main
│ ├── res
│ ├── raw
│ │ ├── shake_sound.mp3
│ │ ├── jstest.html
│ │ └── jsbridge_init.js
│ ├── mipmap-xxxhdpi
│ │ ├── city1.png
│ │ ├── city2.png
│ │ ├── city3.png
│ │ ├── city4.png
│ │ ├── desert.jpg
│ │ ├── icon1.png
│ │ ├── koala.jpg
│ │ ├── splash.jpg
│ │ ├── arrow_up.png
│ │ ├── big_img.jpg
│ │ ├── big_img1.jpg
│ │ ├── arrow_down.png
│ │ ├── data_empty.png
│ │ ├── hydrangeas.jpg
│ │ ├── ic_launcher.png
│ │ ├── jellyfish.jpg
│ │ ├── net_failure.png
│ │ ├── switch_off.png
│ │ ├── switch_on.png
│ │ ├── chrysanthemum.jpg
│ │ └── ic_launcher_round.png
│ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_round.png
│ │ └── iconfont_downgrey.png
│ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ ├── mipmap-xxhdpi
│ │ ├── img_close.png
│ │ ├── arrow_right.png
│ │ ├── ic_launcher.png
│ │ ├── icon_black_eye.png
│ │ ├── icon_gray_eye.png
│ │ ├── keyboard_back.png
│ │ ├── ic_launcher_round.png
│ │ ├── icon_clear_normal.png
│ │ ├── keyboard_delete.png
│ │ └── icon_clear_pressed.png
│ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ ├── merry_chrismas.png
│ │ └── ic_launcher_round.png
│ ├── values
│ │ ├── integers.xml
│ │ ├── arrays.xml
│ │ ├── dimens.xml
│ │ ├── colors.xml
│ │ └── strings.xml
│ ├── layout
│ │ ├── divider.xml
│ │ ├── textview.xml
│ │ ├── recyclerview_header.xml
│ │ ├── recyclerview_header1.xml
│ │ ├── activity_sticky_list.xml
│ │ ├── gridpasswordview.xml
│ │ ├── view_shake_by_shake.xml
│ │ ├── activity_webview.xml
│ │ ├── activity_lists.xml
│ │ ├── activity_splash.xml
│ │ ├── activity_comolex_list.xml
│ │ ├── activity_shake_by_shake.xml
│ │ ├── fragment_blank.xml
│ │ ├── fragment_cache.xml
│ │ ├── fragment_layout.xml
│ │ ├── fragment_token.xml
│ │ ├── layout_basepickerview.xml
│ │ ├── activity_faq.xml
│ │ ├── item_recycler_view.xml
│ │ ├── fragment_product_sort.xml
│ │ ├── fragment_my_asset.xml
│ │ ├── tab_item.xml
│ │ ├── fragment_discover.xml
│ │ ├── include_title_bar.xml
│ │ ├── item.xml
│ │ ├── header_layout.xml
│ │ ├── fragment_zip.xml
│ │ ├── expendlist_group.xml
│ │ ├── item_demo.xml
│ │ ├── activity_demo.xml
│ │ ├── fragment_other.xml
│ │ ├── deal_pass_dialog.xml
│ │ ├── item_key_board.xml
│ │ ├── activity_net.xml
│ │ ├── activity_permission.xml
│ │ ├── item_group.xml
│ │ ├── fragment_home_page.xml
│ │ ├── expendlist_item.xml
│ │ ├── grid_item.xml
│ │ ├── layout_pwd.xml
│ │ ├── activity_async_test.xml
│ │ ├── fragment_token_advanced.xml
│ │ ├── activity_rxjava.xml
│ │ ├── state_layout.xml
│ │ ├── layout_pwd_visible.xml
│ │ ├── fragment_map.xml
│ │ ├── include_pickerview_topbar.xml
│ │ ├── activity_push.xml
│ │ ├── activity_lock.xml
│ │ ├── activity_deal_code.xml
│ │ ├── activity_guesture_code.xml
│ │ ├── fragment_elementary.xml
│ │ ├── item_personal_center.xml
│ │ ├── pickerview_time.xml
│ │ └── activity_collapse_list.xml
│ ├── drawable
│ │ ├── blue_round_ract.xml
│ │ ├── shape_pwd_bg.xml
│ │ ├── shape_black_rect_border.xml
│ │ ├── red_oval.xml
│ │ ├── selector_rl_back.xml
│ │ ├── selector_item_del.xml
│ │ ├── selector_item_key.xml
│ │ ├── switch_button.xml
│ │ ├── selector_edit_clear.xml
│ │ ├── selector_pickerview_btn.xml
│ │ ├── tab_selecter.xml
│ │ ├── tab_text_selector.xml
│ │ ├── shape_pwd_point.xml
│ │ ├── check_pwd_visible_selector.xml
│ │ ├── banner_indicator_selected.xml
│ │ ├── selector_pwd_visible.xml
│ │ ├── banner_indicator_unselected.xml
│ │ ├── ic_visibility_24dp.xml
│ │ ├── ic_visibility_off_24dp.xml
│ │ └── my_progress_horizontal.xml
│ ├── anim
│ │ ├── keyboard_in.xml
│ │ ├── keyboard_out.xml
│ │ ├── pickerview_slide_in_bottom.xml
│ │ ├── pickerview_slide_out_bottom.xml
│ │ ├── pickerview_dialog_scale_out.xml
│ │ └── pickerview_dialog_scale_in.xml
│ └── menu
│ │ └── main.xml
│ ├── jniLibs
│ └── armeabi
│ │ └── liblbs.so
│ └── java
│ └── com
│ └── goldencarp
│ └── lingqianbao
│ ├── model
│ ├── dao
│ │ ├── FileUtil.java
│ │ ├── gen
│ │ │ └── DaoSession.java
│ │ ├── Meizi.java
│ │ └── SpUtil.java
│ ├── net
│ │ ├── FakeThing.java
│ │ ├── GankBeauty.java
│ │ ├── HttpResult.java
│ │ ├── FakeToken.java
│ │ ├── ZhuangBiApi.java
│ │ ├── BeautyApi.java
│ │ ├── Item.java
│ │ ├── ZhuangbiImage.java
│ │ ├── Apis.java
│ │ └── WebViewJavascriptBridge.java
│ ├── Constants.java
│ └── bean
│ │ ├── City.java
│ │ ├── ProductBean.java
│ │ ├── Student.java
│ │ └── FAQBean.java
│ ├── view
│ ├── custom
│ │ ├── jswebview
│ │ │ ├── CallBackFunction.java
│ │ │ ├── BridgeHandler.java
│ │ │ ├── WebViewJavascriptBridge.java
│ │ │ └── DefaultHandler.java
│ │ ├── wheelpicker
│ │ │ ├── OnItemSelectedListener.java
│ │ │ ├── IPickerViewData.java
│ │ │ ├── OnDismissListener.java
│ │ │ ├── CustomListener.java
│ │ │ ├── OnItemSelectedRunnable.java
│ │ │ ├── LoopViewGestureListener.java
│ │ │ ├── WheelAdapter.java
│ │ │ ├── PickerViewAnimateUtil.java
│ │ │ ├── MessageHandler.java
│ │ │ ├── ArrayWheelAdapter.java
│ │ │ ├── NumericWheelAdapter.java
│ │ │ ├── SmoothScrollTimerTask.java
│ │ │ └── InertiaTimerTask.java
│ │ ├── dealpassword
│ │ │ ├── OnPasswordFinishedListener.java
│ │ │ ├── PasswordType.java
│ │ │ ├── PasswordView.java
│ │ │ └── CustomPasswordTransformationMethod.java
│ │ ├── visualkeyboard
│ │ │ └── OnPasswordFinishedListener.java
│ │ ├── stickydecoration
│ │ │ ├── listener
│ │ │ │ ├── GroupListener.java
│ │ │ │ ├── OnGroupClickListener.java
│ │ │ │ └── PowerGroupListener.java
│ │ │ └── cache
│ │ │ │ ├── CacheInterface.java
│ │ │ │ └── CacheUtil.java
│ │ ├── guesturepwdview
│ │ │ ├── ConvertUtils.java
│ │ │ ├── ILockView.java
│ │ │ └── Dot.java
│ │ ├── MultiProgressnbar.java
│ │ └── customseekbar
│ │ │ └── BubbleUtils.java
│ ├── adapter
│ │ ├── PersonalCenterFragmentPresenter.java
│ │ ├── ItemListAdapter.java
│ │ └── ZhuangBiListAdapter.java
│ ├── util
│ │ ├── ToastUtil.java
│ │ ├── GlideImageLoader.java
│ │ ├── GankBeautyResultToItemsMapper.java
│ │ ├── DensityUtil.java
│ │ └── StringUtil.java
│ ├── fragment
│ │ ├── RxBaseFragment.java
│ │ ├── TokenFragment.java
│ │ ├── CacheFragment.java
│ │ ├── DiscoverFragment.java
│ │ └── BaseFragment.java
│ ├── activity
│ │ ├── ActivityCollector.java
│ │ ├── FAQActivity.java
│ │ ├── DemoActivity.java
│ │ ├── PushActivity.java
│ │ └── LoginActivity.java
│ └── service
│ │ └── FloatWindowService.java
│ └── presenter
│ ├── PersonalCenterFragmentPresenter.java
│ ├── DiscoverFragmentPresenter.java
│ ├── IMyAssetFragmentPresenter.java
│ ├── IDailyResommendFragmentPresenter.java
│ ├── IFAQActivityPresenter.java
│ ├── IMainActivityPresenter.java
│ ├── MainActivityPresenter.java
│ ├── DailyResommendFragmentPresenter.java
│ ├── MyAssetFragmentPresenter.java
│ ├── FAQActivityPresenter.java
│ └── CollapseListActivityPresenter.java
├── hydriddemo
├── .gitignore
├── libs
│ ├── cglib-2.2.jar
│ ├── asm-all-5.0.3.jar
│ └── tbs_sdk_thirdapp_v3.5.0.1004_43500_sharewithdownload_withoutGame_obfs_20170801_113025.jar
├── src
│ └── main
│ │ ├── res
│ │ ├── raw
│ │ │ ├── shake_sound.mp3
│ │ │ ├── jstest.html
│ │ │ └── jsbridge_init.js
│ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── values
│ │ │ ├── strings.xml
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ └── styles.xml
│ │ ├── values-v21
│ │ │ └── styles.xml
│ │ ├── values-w820dp
│ │ │ └── dimens.xml
│ │ └── layout
│ │ │ ├── content_main.xml
│ │ │ ├── activity_js_bridge.xml
│ │ │ ├── activity_my_test.xml
│ │ │ ├── main_detail.xml
│ │ │ └── activity_main.xml
│ │ ├── java
│ │ └── com
│ │ │ └── lyk
│ │ │ └── jsbridge
│ │ │ ├── widget
│ │ │ ├── CallBackFunction.java
│ │ │ ├── BridgeHandler.java
│ │ │ ├── WebViewJavascriptBridge.java
│ │ │ └── DefaultHandler.java
│ │ │ ├── JsBean.java
│ │ │ ├── modle
│ │ │ ├── User.java
│ │ │ └── Student.java
│ │ │ ├── MyApp.java
│ │ │ ├── CglibDynamicProxy.java
│ │ │ └── Util.java
│ │ ├── assets
│ │ └── jstest.html
│ │ └── AndroidManifest.xml
├── proguard-rules.pro
└── build.gradle
├── .gitignore
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── README.md
└── gradle.properties
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | /src/test
3 | /src/androidTest
4 |
--------------------------------------------------------------------------------
/hydriddemo/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | /src/test
3 | /src/androidTest
4 |
--------------------------------------------------------------------------------
/hydriddemo/libs/cglib-2.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/hydriddemo/libs/cglib-2.2.jar
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea
5 | .DS_Store
6 | /build
7 | /captures
8 | .externalNativeBuild
9 |
--------------------------------------------------------------------------------
/app/libs/commons-codec-1.10-1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/libs/commons-codec-1.10-1.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/hydriddemo/libs/asm-all-5.0.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/hydriddemo/libs/asm-all-5.0.3.jar
--------------------------------------------------------------------------------
/app/src/main/res/raw/shake_sound.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/raw/shake_sound.mp3
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi/liblbs.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/jniLibs/armeabi/liblbs.so
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/city1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/city1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/city2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/city2.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/city3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/city3.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/city4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/city4.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/desert.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/desert.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/icon1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/icon1.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/koala.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/koala.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/splash.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/splash.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/img_close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxhdpi/img_close.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/arrow_up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/arrow_up.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/big_img.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/big_img.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/big_img1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/big_img1.jpg
--------------------------------------------------------------------------------
/hydriddemo/src/main/res/raw/shake_sound.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/hydriddemo/src/main/res/raw/shake_sound.mp3
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/arrow_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxhdpi/arrow_right.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/arrow_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/arrow_down.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/data_empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/data_empty.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/hydrangeas.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/hydrangeas.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/jellyfish.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/jellyfish.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/net_failure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/net_failure.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/switch_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/switch_off.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/switch_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/switch_on.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/merry_chrismas.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xhdpi/merry_chrismas.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/icon_black_eye.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxhdpi/icon_black_eye.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/icon_gray_eye.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxhdpi/icon_gray_eye.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/keyboard_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxhdpi/keyboard_back.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/chrysanthemum.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/chrysanthemum.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/iconfont_downgrey.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-hdpi/iconfont_downgrey.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/icon_clear_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxhdpi/icon_clear_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/keyboard_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxhdpi/keyboard_delete.png
--------------------------------------------------------------------------------
/hydriddemo/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/hydriddemo/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/hydriddemo/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/hydriddemo/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/hydriddemo/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/hydriddemo/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/icon_clear_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxhdpi/icon_clear_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/hydriddemo/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/hydriddemo/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/hydriddemo/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/hydriddemo/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values/integers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 300
5 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/divider.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/textview.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/java/com/lyk/jsbridge/widget/CallBackFunction.java:
--------------------------------------------------------------------------------
1 | package com.lyk.jsbridge.widget;
2 |
3 | public interface CallBackFunction {
4 |
5 | public void onCallBack(String data);
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/java/com/lyk/jsbridge/widget/BridgeHandler.java:
--------------------------------------------------------------------------------
1 | package com.lyk.jsbridge.widget;
2 |
3 | public interface BridgeHandler {
4 |
5 | void handler(String data, CallBackFunction function);
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/model/dao/FileUtil.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.model.dao;
2 |
3 | /**
4 | * Created by sks on 2018/3/22.
5 | * 操作文件存取的工具类
6 | */
7 |
8 | public class FileUtil {
9 | }
10 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | jsBridge
3 |
4 |
5 |
6 | MainActivity
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/jswebview/CallBackFunction.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.jswebview;
2 |
3 | public interface CallBackFunction {
4 |
5 | public void onCallBack(String data);
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/app/libs/tbs_sdk_thirdapp_v3.5.0.1004_43500_sharewithdownload_withoutGame_obfs_20170801_113025.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/app/libs/tbs_sdk_thirdapp_v3.5.0.1004_43500_sharewithdownload_withoutGame_obfs_20170801_113025.jar
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/presenter/PersonalCenterFragmentPresenter.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.presenter;
2 |
3 | /**
4 | * Created by sks on 2017/12/4.
5 | */
6 |
7 | public class PersonalCenterFragmentPresenter {
8 | }
9 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/wheelpicker/OnItemSelectedListener.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.wheelpicker;
2 |
3 |
4 | public interface OnItemSelectedListener {
5 | void onItemSelected(int index);
6 | }
7 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/model/net/FakeThing.java:
--------------------------------------------------------------------------------
1 | // (c)2016 Flipboard Inc, All Rights Reserved.
2 |
3 | package com.goldencarp.lingqianbao.model.net;
4 |
5 | public class FakeThing {
6 | public int id;
7 | public String name;
8 | }
9 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/presenter/DiscoverFragmentPresenter.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.presenter;
2 |
3 | /**
4 | * Created by sks on 2018/3/10.
5 | *
6 | */
7 |
8 | public class DiscoverFragmentPresenter {
9 | }
10 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/adapter/PersonalCenterFragmentPresenter.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.adapter;
2 |
3 | /**
4 | * Created by sks on 2017/12/4.
5 | */
6 |
7 | public class PersonalCenterFragmentPresenter {
8 | }
9 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/jswebview/BridgeHandler.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.jswebview;
2 |
3 | public interface BridgeHandler {
4 |
5 | void handler(String data, CallBackFunction function);
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/model/net/GankBeauty.java:
--------------------------------------------------------------------------------
1 | // (c)2016 Flipboard Inc, All Rights Reserved.
2 |
3 | package com.goldencarp.lingqianbao.model.net;
4 |
5 | public class GankBeauty {
6 | public String createdAt;
7 | public String url;
8 | }
9 |
--------------------------------------------------------------------------------
/hydriddemo/libs/tbs_sdk_thirdapp_v3.5.0.1004_43500_sharewithdownload_withoutGame_obfs_20170801_113025.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aaron-the-coder/AndroidFrame/HEAD/hydriddemo/libs/tbs_sdk_thirdapp_v3.5.0.1004_43500_sharewithdownload_withoutGame_obfs_20170801_113025.jar
--------------------------------------------------------------------------------
/app/src/main/res/drawable/blue_round_ract.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/wheelpicker/IPickerViewData.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.wheelpicker;
2 |
3 | /**
4 | * Created by Sai on 2016/7/13.
5 | */
6 | public interface IPickerViewData {
7 | String getPickerViewText();
8 | }
9 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/wheelpicker/OnDismissListener.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.wheelpicker;
2 |
3 | /**
4 | * Created by Sai on 15/8/9.
5 | */
6 | public interface OnDismissListener {
7 | public void onDismiss(Object o);
8 | }
9 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue May 08 22:33:42 CST 2018
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_pwd_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_black_rect_border.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/red_oval.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
8 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 16dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/dealpassword/OnPasswordFinishedListener.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.dealpassword;
2 |
3 | /**
4 | * 密码输入完成回调接口
5 | */
6 |
7 | public interface OnPasswordFinishedListener {
8 |
9 | void onFinish(String password);
10 | }
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_rl_back.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/visualkeyboard/OnPasswordFinishedListener.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.visualkeyboard;
2 |
3 | /**
4 | * 密码输入完成回调接口
5 | */
6 |
7 | public interface OnPasswordFinishedListener {
8 |
9 | void onFinish(String password);
10 | }
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_item_del.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - c语言
5 | - java
6 | - php
7 | - xml
8 | - html
9 |
10 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/java/com/lyk/jsbridge/widget/WebViewJavascriptBridge.java:
--------------------------------------------------------------------------------
1 | package com.lyk.jsbridge.widget;
2 |
3 |
4 |
5 | public interface WebViewJavascriptBridge {
6 |
7 | public void send(String data);
8 | public void send(String data, CallBackFunction responseCallback);
9 |
10 |
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/model/net/HttpResult.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.model.net;
2 |
3 | /**
4 | * Created by dale on 2018/2/19.
5 | */
6 |
7 | public class HttpResult {
8 | private int resultCode;
9 | private String resultMessge;
10 |
11 | private T data;
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/presenter/IMyAssetFragmentPresenter.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.presenter;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * Created by dale on 2018/1/23.
7 | */
8 |
9 | public interface IMyAssetFragmentPresenter {
10 | List getDemoData();
11 | }
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_item_key.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/switch_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_edit_clear.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/dealpassword/PasswordType.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.dealpassword;
2 |
3 | /**
4 | * @author Jungly
5 | * jungly.ik@gmail.com
6 | * 5/3/21 16:47
7 | */
8 | public enum PasswordType {
9 |
10 | NUMBER, TEXT, TEXTVISIBLE, TEXTWEB;
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_pickerview_btn.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/tab_selecter.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/tab_text_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/presenter/IDailyResommendFragmentPresenter.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.presenter;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * Created by sks on 2018/1/18.
7 | */
8 |
9 | public interface IDailyResommendFragmentPresenter {
10 |
11 | List getBannerImages();
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/stickydecoration/listener/GroupListener.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.stickydecoration.listener;
2 |
3 | /**
4 | * Created by gavin
5 | * Created date 17/5/25
6 | */
7 |
8 | public interface GroupListener {
9 | String getGroupName(int position);
10 | }
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_pwd_point.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/jswebview/WebViewJavascriptBridge.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.jswebview;
2 |
3 |
4 |
5 | public interface WebViewJavascriptBridge {
6 |
7 | public void send(String data);
8 | public void send(String data, CallBackFunction responseCallback);
9 |
10 |
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/check_pwd_visible_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/stickydecoration/listener/OnGroupClickListener.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.stickydecoration.listener;
2 |
3 | /**
4 | * @author gavin
5 | * date 17/11/18
6 | * description 头部点击事件
7 | */
8 |
9 | public interface OnGroupClickListener {
10 | void onClick(int position);
11 | }
12 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/wheelpicker/CustomListener.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.wheelpicker;
2 |
3 | import android.view.View;
4 |
5 | /**
6 | * Created by KyuYi on 2017/3/2.
7 | * E-Mail:kyu_yi@sina.com
8 | * 功能:
9 | */
10 |
11 | public interface CustomListener {
12 | void customLayout(View v);
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/presenter/IFAQActivityPresenter.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.presenter;
2 |
3 | import com.goldencarp.lingqianbao.model.bean.FAQBean;
4 |
5 | import java.util.List;
6 |
7 | /**
8 | * Created by sks on 2018/1/10.
9 | */
10 |
11 | public interface IFAQActivityPresenter {
12 | List> getFAQList();
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/banner_indicator_selected.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/presenter/IMainActivityPresenter.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.presenter;
2 |
3 | import com.goldencarp.lingqianbao.model.bean.ProductBean;
4 |
5 | import java.util.List;
6 |
7 | /**
8 | * Created by sks on 2018/1/18.
9 | */
10 |
11 | public interface IMainActivityPresenter {
12 | List requestRecommendProducts();
13 | }
14 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 | >
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/model/net/FakeToken.java:
--------------------------------------------------------------------------------
1 | // (c)2016 Flipboard Inc, All Rights Reserved.
2 |
3 | package com.goldencarp.lingqianbao.model.net;
4 |
5 | public class FakeToken {
6 | public String token;
7 | public boolean expired;
8 |
9 | public FakeToken() {
10 | }
11 |
12 | public FakeToken(boolean expired) {
13 | this.expired = expired;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/keyboard_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/keyboard_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/recyclerview_header.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/recyclerview_header1.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_pwd_visible.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/pickerview_slide_in_bottom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/pickerview_slide_out_bottom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/stickydecoration/listener/PowerGroupListener.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.stickydecoration.listener;
2 |
3 | import android.view.View;
4 |
5 | /**
6 | * Created by gavin
7 | * Created date 17/5/25
8 | * 显示自定义View的Group监听
9 | */
10 |
11 | public interface PowerGroupListener extends GroupListener {
12 |
13 | View getGroupView(int position);
14 | }
15 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/util/ToastUtil.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.util;
2 |
3 | import android.widget.Toast;
4 |
5 | import com.goldencarp.lingqianbao.view.LQBApp;
6 |
7 | /**
8 | * Created by sks on 2018/3/5.
9 | */
10 |
11 | public class ToastUtil {
12 | public static void showToast(String msg) {
13 | Toast.makeText(LQBApp.getApp(), msg, Toast.LENGTH_SHORT).show();
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/model/net/ZhuangBiApi.java:
--------------------------------------------------------------------------------
1 | // (c)2016 Flipboard Inc, All Rights Reserved.
2 |
3 | package com.goldencarp.lingqianbao.model.net;
4 |
5 | import java.util.List;
6 |
7 | import io.reactivex.Observable;
8 | import retrofit2.http.GET;
9 | import retrofit2.http.Query;
10 |
11 | public interface ZhuangBiApi {
12 | @GET("search")
13 | Observable> search(@Query("q") String query);
14 | }
15 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/jswebview/DefaultHandler.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.jswebview;
2 |
3 |
4 | public class DefaultHandler implements BridgeHandler {
5 |
6 | String TAG = "DefaultHandler";
7 |
8 | @Override
9 | public void handler(String data, CallBackFunction function) {
10 | if(function != null){
11 | function.onCallBack("DefaultHandler response data");
12 | }
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/banner_indicator_unselected.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/model/net/BeautyApi.java:
--------------------------------------------------------------------------------
1 | // (c)2016 Flipboard Inc, All Rights Reserved.
2 |
3 | package com.goldencarp.lingqianbao.model.net;
4 |
5 |
6 | import io.reactivex.Observable;
7 | import retrofit2.http.GET;
8 | import retrofit2.http.Path;
9 |
10 | public interface BeautyApi {
11 | @GET("data/福利/{number}/{page}")
12 | Observable getBeauties(@Path("number") int number, @Path("page") int page);
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_sticky_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/gridpasswordview.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/wheelpicker/OnItemSelectedRunnable.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.wheelpicker;
2 |
3 | final class OnItemSelectedRunnable implements Runnable {
4 | final WheelView loopView;
5 |
6 | OnItemSelectedRunnable(WheelView loopview) {
7 | loopView = loopview;
8 | }
9 |
10 | @Override
11 | public final void run() {
12 | loopView.onItemSelectedListener.onItemSelected(loopView.getCurrentItem());
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_shake_by_shake.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_webview.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/java/com/lyk/jsbridge/widget/DefaultHandler.java:
--------------------------------------------------------------------------------
1 | package com.lyk.jsbridge.widget;
2 |
3 |
4 | import android.util.Log;
5 |
6 | public class DefaultHandler implements BridgeHandler {
7 |
8 | private static final String LOG_TAG = "DefaultHandler";
9 |
10 | @Override
11 | public void handler(String data, CallBackFunction function) {
12 | Log.e(LOG_TAG, "h5发送的data==" + data);
13 | if (function != null) {
14 | function.onCallBack("DefaultHandler response data");
15 | }
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_lists.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_splash.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_comolex_list.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_shake_by_shake.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_blank.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_cache.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_token.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_visibility_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/pickerview_dialog_scale_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/pickerview_dialog_scale_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_basepickerview.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_faq.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/java/com/lyk/jsbridge/JsBean.java:
--------------------------------------------------------------------------------
1 | package com.lyk.jsbridge;
2 |
3 | /**
4 | * Created by dale on 2018/1/20.
5 | */
6 |
7 | public class JsBean {
8 |
9 | /**
10 | * mobile : 18612709396
11 | */
12 |
13 | private String mobile;
14 |
15 | public String getMobile() {
16 | return mobile;
17 | }
18 |
19 | public void setMobile(String mobile) {
20 | this.mobile = mobile;
21 | }
22 |
23 | @Override
24 | public String toString() {
25 | return "JsBean{" +
26 | "mobile='" + mobile + '\'' +
27 | '}';
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_recycler_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
15 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/presenter/MainActivityPresenter.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.presenter;
2 |
3 | import com.goldencarp.lingqianbao.model.bean.ProductBean;
4 |
5 | import java.util.List;
6 |
7 | /**
8 | * Created by sks on 2017/12/1.
9 | */
10 |
11 | public class MainActivityPresenter implements IMainActivityPresenter {
12 |
13 | private static final java.lang.String LOG_TAG = "MainActivityPresenter";
14 |
15 |
16 | public MainActivityPresenter() {
17 |
18 | }
19 |
20 |
21 | @Override
22 | public List requestRecommendProducts() {
23 | return null;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/wheelpicker/LoopViewGestureListener.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.wheelpicker;
2 |
3 | import android.view.MotionEvent;
4 |
5 | final class LoopViewGestureListener extends android.view.GestureDetector.SimpleOnGestureListener {
6 |
7 | final WheelView loopView;
8 |
9 | LoopViewGestureListener(WheelView loopview) {
10 | loopView = loopview;
11 | }
12 |
13 | @Override
14 | public final boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
15 | loopView.scrollBy(velocityY);
16 | return true;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/java/com/lyk/jsbridge/modle/User.java:
--------------------------------------------------------------------------------
1 | package com.lyk.jsbridge.modle;
2 |
3 | /**
4 | * Created by LIUYONGKUI726 on 2016-06-01.
5 | */
6 | public class User {
7 | private String location ;
8 | private String name = "Bruce";
9 |
10 | public User() {
11 | }
12 |
13 | public String getLocation() {
14 | return location;
15 | }
16 |
17 | public void setLocation(String location) {
18 | this.location = location;
19 | }
20 |
21 | public String getName() {
22 | return name;
23 | }
24 |
25 | public void setName(String name) {
26 | this.name = name;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/model/net/Item.java:
--------------------------------------------------------------------------------
1 | // (c)2016 Flipboard Inc, All Rights Reserved.
2 |
3 | package com.goldencarp.lingqianbao.model.net;
4 |
5 | public class Item {
6 | public String description;
7 | public String imageUrl;
8 |
9 | public String getDescription() {
10 | return description;
11 | }
12 |
13 | public void setDescription(String description) {
14 | this.description = description;
15 | }
16 |
17 | public String getImageUrl() {
18 | return imageUrl;
19 | }
20 |
21 | public void setImageUrl(String imageUrl) {
22 | this.imageUrl = imageUrl;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_product_sort.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_my_asset.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/stickydecoration/cache/CacheInterface.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.stickydecoration.cache;
2 |
3 | /**
4 | * Created by gavin
5 | * date 2018/3/4
6 | * 缓存工具需要暴露的接口
7 | */
8 |
9 | public interface CacheInterface {
10 |
11 | /**
12 | * 加入缓存
13 | * @param position
14 | * @param t
15 | */
16 | void put(int position, T t);
17 |
18 | /**
19 | * 从缓存中获取
20 | * @param position
21 | * @return
22 | */
23 | T get(int position);
24 |
25 | /**
26 | * 移除
27 | * @param position
28 | */
29 | void remove(int position);
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/model/net/ZhuangbiImage.java:
--------------------------------------------------------------------------------
1 | // (c)2016 Flipboard Inc, All Rights Reserved.
2 |
3 | package com.goldencarp.lingqianbao.model.net;
4 |
5 | public class ZhuangbiImage {
6 | public String description;
7 | public String image_url;
8 |
9 | public String getDescription() {
10 | return description;
11 | }
12 |
13 | public void setDescription(String description) {
14 | this.description = description;
15 | }
16 |
17 | public String getImage_url() {
18 | return image_url;
19 | }
20 |
21 | public void setImage_url(String image_url) {
22 | this.image_url = image_url;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/tab_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
11 |
12 |
17 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/dealpassword/PasswordView.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.dealpassword;
2 |
3 | /**
4 | * @author Jungly
5 | * @mail jungly.ik@gmail.com
6 | * @date 15/3/21 16:20
7 | */
8 | interface PasswordView {
9 |
10 | //void setError(String error);
11 |
12 | String getPassWord();
13 |
14 | void clearPassword();
15 |
16 | void setPassword(String password);
17 |
18 | void setPasswordVisibility(boolean visible);
19 |
20 | void togglePasswordVisibility();
21 |
22 | void setOnPasswordChangedListener(GridPasswordView.OnPasswordChangedListener listener);
23 |
24 | void setPasswordType(PasswordType passwordType);
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/wheelpicker/WheelAdapter.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.wheelpicker;
2 |
3 | public interface WheelAdapter {
4 | /**
5 | * Gets items count
6 | * @return the count of wheel items
7 | */
8 | int getItemsCount();
9 |
10 | /**
11 | * Gets a wheel item by index.
12 | * @param index the item index
13 | * @return the wheel item text or null
14 | */
15 | T getItem(int index);
16 |
17 | /**
18 | * Gets maximum item length. It is used to determine the wheel width.
19 | * If -1 is returned there will be used the default wheel width.
20 | * @param o
21 | * @return the maximum item length or -1
22 | */
23 | int indexOf(T o);
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_discover.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/include_title_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
14 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/raw/jstest.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | hello
9 |
10 |
11 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/res/raw/jstest.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | hello
9 |
10 |
11 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # AndroidFrame
2 | An MVP architecture Android project, technical points are as follows:
3 | 1. Immersive status bar
4 | 2. Rotating banner
5 | 3. Floating window and shake function
6 | 4. JSBridge hybrid interaction technique
7 | 5. Aurora push
8 | 6. U-Meng share and third-party login
9 | 7. Common IO operations (sp, file, DB)
10 | 8. Custom gesture password panel
11 | 9. Custom transaction password and virtual security keyboard
12 | 10. Linked layout list
13 | 11. Xrecyclerview pull down to refresh and pull up to load more
14 | 12. Retrofit+rxjava network request and thread switching
15 | 13. Global exception crash log capture and processing
16 | 14. Android6.0 dynamic permission processing
17 | 15. Custom state layout, including request success, failure, and empty layout
18 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/header_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/fragment/RxBaseFragment.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.fragment;
2 |
3 |
4 | import android.support.v4.app.Fragment;
5 |
6 | import io.reactivex.disposables.Disposable;
7 |
8 | /**
9 | * A simple {@link Fragment} subclass.
10 | * hello
11 | */
12 | public class RxBaseFragment extends Fragment {
13 |
14 | protected Disposable disposable;
15 |
16 | public RxBaseFragment() {
17 | // Required empty public constructor
18 | }
19 |
20 | @Override
21 | public void onDestroy() {
22 | super.onDestroy();
23 | unsuscribe();
24 | }
25 |
26 | protected void unsuscribe() {
27 | if (disposable != null && !disposable.isDisposed()){
28 | disposable.dispose();
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/res/layout/content_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_zip.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
11 |
12 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/fragment/TokenFragment.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.fragment;
2 |
3 | import android.os.Bundle;
4 | import android.support.v4.app.Fragment;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 |
9 | import com.goldencarp.lingqianbao.R;
10 |
11 |
12 | public class TokenFragment extends Fragment {
13 |
14 | public TokenFragment() {
15 | // Required empty public constructor
16 | }
17 |
18 | @Override
19 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
20 | Bundle savedInstanceState) {
21 | // Inflate the layout for this fragment
22 | return inflater.inflate(R.layout.fragment_token, container, false);
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/activity/ActivityCollector.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.activity;
2 |
3 |
4 | import android.app.Activity;
5 |
6 | import java.util.ArrayList;
7 | import java.util.List;
8 |
9 | /**
10 | * Created by sks on 2017/11/9.
11 | */
12 |
13 | public class ActivityCollector {
14 | static List list = new ArrayList<>();
15 | public static void addActivity(Activity activity){
16 | list.add(activity);
17 | }
18 | public static void removeActivity(Activity activity){
19 | list.remove(activity);
20 | }
21 |
22 | public static void finishAll(){
23 | for (android.app.Activity Activity : list) {
24 | if (!Activity.isFinishing()){
25 | Activity.finish();
26 | }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/presenter/DailyResommendFragmentPresenter.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.presenter;
2 |
3 |
4 | import com.goldencarp.lingqianbao.R;
5 |
6 | import java.util.ArrayList;
7 | import java.util.List;
8 |
9 | /**
10 | * Created by sks on 2017/12/1.
11 | */
12 |
13 | public class DailyResommendFragmentPresenter implements IDailyResommendFragmentPresenter {
14 |
15 | /**
16 | * 获取首页bannar的图片
17 | */
18 |
19 | @Override
20 | public List getBannerImages() {
21 | List images = new ArrayList<>();
22 | images.add(R.mipmap.chrysanthemum);
23 | images.add(R.mipmap.desert);
24 | images.add(R.mipmap.hydrangeas);
25 | images.add(R.mipmap.jellyfish);
26 | images.add(R.mipmap.koala);
27 | return images;
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/java/com/lyk/jsbridge/modle/Student.java:
--------------------------------------------------------------------------------
1 | package com.lyk.jsbridge.modle;
2 |
3 | /**
4 | * Created by LIUYONGKUI726 on 2016-06-01.
5 | */
6 | public class Student {
7 | private String name = "Bruce";
8 | private String pass = "Bruce";
9 |
10 | public Student() {
11 | }
12 |
13 | public String getName() {
14 | return name;
15 | }
16 |
17 | public void setName(String name) {
18 | this.name = name;
19 | }
20 |
21 | public String getPass() {
22 | return pass;
23 | }
24 |
25 | public void setPass(String pass) {
26 | this.pass = pass;
27 | }
28 |
29 | @Override
30 | public String toString() {
31 | return "Student{" +
32 | "name='" + name + '\'' +
33 | ", pass='" + pass + '\'' +
34 | '}';
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/service/FloatWindowService.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.service;
2 |
3 | import android.app.Service;
4 | import android.content.Intent;
5 | import android.os.IBinder;
6 |
7 | import com.goldencarp.lingqianbao.view.util.MyWindowManager;
8 |
9 | public class FloatWindowService extends Service {
10 |
11 | @Override
12 | public IBinder onBind(Intent intent) {
13 | return null;
14 | }
15 |
16 | @Override
17 | public int onStartCommand(Intent intent, int flags, int startId) {
18 | MyWindowManager.createSmallWindow(getApplicationContext());
19 | return super.onStartCommand(intent, flags, startId);
20 | }
21 |
22 | @Override
23 | public void onDestroy() {
24 | super.onDestroy();
25 | MyWindowManager.removeSmallWindow(getApplicationContext());
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/assets/jstest.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | hello
11 |
12 |
13 |
14 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/fragment/CacheFragment.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.fragment;
2 |
3 |
4 | import android.os.Bundle;
5 | import android.support.v4.app.Fragment;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 |
10 | import com.goldencarp.lingqianbao.R;
11 |
12 |
13 | /**
14 | * A simple {@link Fragment} subclass.
15 | */
16 | public class CacheFragment extends Fragment {
17 |
18 |
19 | public CacheFragment() {
20 | // Required empty public constructor
21 | }
22 |
23 |
24 | @Override
25 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
26 | Bundle savedInstanceState) {
27 | // Inflate the layout for this fragment
28 | return inflater.inflate(R.layout.fragment_cache, container, false);
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_visibility_off_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/guesturepwdview/ConvertUtils.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.guesturepwdview;
2 |
3 | import android.content.Context;
4 |
5 | /**
6 | * Created by zyyoona7 on 2017/7/7.
7 | */
8 |
9 | public class ConvertUtils {
10 |
11 | /**
12 | * dp转px
13 | *
14 | * @param dpValue dp值
15 | * @return px值
16 | */
17 | public static int dp2px(Context context, final float dpValue) {
18 | final float scale = context.getResources().getDisplayMetrics().density;
19 | return (int) (dpValue * scale + 0.5f);
20 | }
21 |
22 | /**
23 | * px转dp
24 | *
25 | * @param pxValue px值
26 | * @return dp值
27 | */
28 | public static int px2dp(Context context, final float pxValue) {
29 | final float scale = context.getResources().getDisplayMetrics().density;
30 | return (int) (pxValue / scale + 0.5f);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/presenter/MyAssetFragmentPresenter.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.presenter;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | /**
7 | * Created by dale on 2018/1/21.
8 | */
9 |
10 | public class MyAssetFragmentPresenter implements IMyAssetFragmentPresenter {
11 | public MyAssetFragmentPresenter() {
12 |
13 | }
14 |
15 | /**
16 | * 获取demo列表数据
17 | */
18 | @Override
19 | public List getDemoData() {
20 | ArrayList list = new ArrayList<>();
21 | list.add("混合交互方案");
22 | list.add("三方分享");
23 | list.add("消息推送");
24 | list.add("缓存清理");
25 | list.add("手势密码");
26 | list.add("交易密码");
27 | list.add("各种复杂列表");
28 | list.add("网络请求框架");
29 | list.add("异步处理");
30 | list.add("崩溃日志");
31 | list.add("android6.0动态权限");
32 | list.add("图片压缩");
33 | return list;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/expendlist_group.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
17 |
25 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/wheelpicker/PickerViewAnimateUtil.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.wheelpicker;
2 |
3 | import android.view.Gravity;
4 |
5 | import com.goldencarp.lingqianbao.R;
6 |
7 |
8 | /**
9 | * Created by Sai on 15/8/9.
10 | */
11 | public class PickerViewAnimateUtil {
12 | private static final int INVALID = -1;
13 | /**
14 | * Get default animation resource when not defined by the user
15 | *
16 | * @param gravity the gravity of the dialog
17 | * @param isInAnimation determine if is in or out animation. true when is is
18 | * @return the id of the animation resource
19 | */
20 | public static int getAnimationResource(int gravity, boolean isInAnimation) {
21 | switch (gravity) {
22 | case Gravity.BOTTOM:
23 | return isInAnimation ? R.anim.pickerview_slide_in_bottom : R.anim.pickerview_slide_out_bottom;
24 | }
25 | return INVALID;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/model/Constants.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.model;
2 |
3 | /**
4 | * Created by sks on 2017/12/1.
5 | *
6 | */
7 |
8 | public class Constants {
9 | public static final int TIME_OUT = 30 * 1000;
10 | public static final String EMPTY_STRING = "";
11 | public static final String SP_FILE_NAME = "lqb_sp_file_name";
12 | public static final String KEY_SP_TOKEN = "key_sp_token";
13 | private static String homeUrl = "http://10.0.2.2:8080/";//测试环境
14 | // private static String homeUrl = "https://app.51lqb.com/";//正式环境
15 |
16 | /**判断环境*/
17 | public static boolean isDebug(){
18 | return !getHomeUrl().equals("");
19 | }
20 |
21 | public static String getHomeUrl() {
22 | return homeUrl;
23 | }
24 |
25 | public static String getZhuangBiUrl() {
26 | return "http://www.zhuangbi.info/";
27 | }
28 |
29 | public static String getGankApi() {
30 | return "http://gank.io/api/";
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 50dp
5 | 300dp
6 | 20sp
7 | 20dp
8 | 17sp
9 | 18sp
10 | 44dp
11 | 45
12 | 25dp
13 | 30dp
14 | 5dp
15 | 10dp
16 | 2dp
17 | 20dp
18 | 15sp
19 | 100dp
20 | 25dp
21 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/res/layout/activity_js_bridge.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
14 |
15 |
21 |
22 |
23 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/model/bean/City.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.model.bean;
2 |
3 | /**
4 | * Created by gavin
5 | * Created date 17/5/24
6 | * Created log 市
7 | */
8 |
9 | public class City {
10 | private String name; //城市名
11 | private String province; //所属省份
12 | private int icon; //所属省份
13 |
14 | public City(String name, String province, int icon) {
15 | this.name = name;
16 | this.province = province;
17 | this.icon = icon;
18 | }
19 |
20 | public String getName() {
21 | return name;
22 | }
23 |
24 | public void setName(String name) {
25 | this.name = name;
26 | }
27 |
28 | public String getProvince() {
29 | return province;
30 | }
31 |
32 | public void setProvince(String province) {
33 | this.province = province;
34 | }
35 |
36 | public int getIcon() {
37 | return icon;
38 | }
39 |
40 | public void setIcon(int icon) {
41 | this.icon = icon;
42 | }
43 | }
--------------------------------------------------------------------------------
/hydriddemo/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\1WxlDir\installFolder\androidStudio\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_demo.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
20 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/res/layout/activity_my_test.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
15 |
16 |
21 |
22 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_demo.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
20 |
21 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/guesturepwdview/ILockView.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.guesturepwdview;
2 |
3 | import android.content.Context;
4 | import android.view.View;
5 |
6 | /**
7 | * Created by zyyoona7 on 2017/7/7.
8 | * 接口,自定义手势解锁样式需实现
9 | */
10 |
11 | public interface ILockView {
12 |
13 | //手势状态
14 | int NO_FINGER = 0;
15 | int FINGER_TOUCH = 1;
16 | int FINGER_UP_MATCHED = 2;
17 | int FINGER_UP_UN_MATCHED = 3;
18 |
19 | /**
20 | * 获取View
21 | *
22 | * @return
23 | */
24 | View getView();
25 |
26 | /**
27 | * 新建view对象
28 | *
29 | * @param context
30 | * @return
31 | */
32 | View newInstance(Context context);
33 |
34 | /**
35 | * 手指没触摸之前,初始状态
36 | */
37 | void onNoFinger();
38 |
39 | /**
40 | * 手指触摸,按下状态
41 | */
42 | void onFingerTouch();
43 |
44 | /**
45 | * 手指抬起,手势密码匹配状态
46 | */
47 | void onFingerUpMatched();
48 |
49 | /**
50 | * 手指抬起,手势密码不匹配状态
51 | */
52 | void onFingerUpUnmatched();
53 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/util/GlideImageLoader.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.util;
2 |
3 | import android.content.Context;
4 | import android.widget.ImageView;
5 |
6 | import com.bumptech.glide.Glide;
7 | import com.youth.banner.loader.ImageLoader;
8 |
9 | /**
10 | * Created by sks on 2017/12/1.
11 | */
12 |
13 | public class GlideImageLoader extends ImageLoader {
14 | @Override
15 | public void displayImage(Context context, Object path, ImageView imageView) {
16 | /**
17 | 注意:
18 | 1.图片加载器由自己选择,这里不限制,只是提供几种使用方法
19 | 2.返回的图片路径为Object类型,由于不能确定你到底使用的那种图片加载器,
20 | 传输的到的是什么格式,那么这种就使用Object接收和返回,你只需要强转成你传输的类型就行,
21 | 切记不要胡乱强转!
22 | */
23 |
24 | //Glide 加载图片简单用法
25 | Glide.with(context).load(path).into(imageView);
26 |
27 | //Picasso 加载图片简单用法
28 | // Picasso.with(context).load(path).into(imageView);
29 |
30 | //用fresco加载图片简单用法,记得要写下面的createImageView方法
31 | // Uri uri = Uri.parse((String) path);
32 | // imageView.setImageURI(uri);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/wheelpicker/MessageHandler.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.wheelpicker;
2 |
3 | import android.os.Handler;
4 | import android.os.Message;
5 |
6 | final class MessageHandler extends Handler {
7 | public static final int WHAT_INVALIDATE_LOOP_VIEW = 1000;
8 | public static final int WHAT_SMOOTH_SCROLL = 2000;
9 | public static final int WHAT_ITEM_SELECTED = 3000;
10 |
11 | final WheelView loopview;
12 |
13 | MessageHandler(WheelView loopview) {
14 | this.loopview = loopview;
15 | }
16 |
17 | @Override
18 | public final void handleMessage(Message msg) {
19 | switch (msg.what) {
20 | case WHAT_INVALIDATE_LOOP_VIEW:
21 | loopview.invalidate();
22 | break;
23 |
24 | case WHAT_SMOOTH_SCROLL:
25 | loopview.smoothScroll(WheelView.ACTION.FLING);
26 | break;
27 |
28 | case WHAT_ITEM_SELECTED:
29 | loopview.onItemSelected();
30 | break;
31 | }
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/fragment/DiscoverFragment.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.fragment;
2 |
3 |
4 | import android.support.v4.app.Fragment;
5 | import android.view.LayoutInflater;
6 |
7 | import com.goldencarp.lingqianbao.R;
8 | import com.goldencarp.lingqianbao.presenter.DiscoverFragmentPresenter;
9 | import com.goldencarp.lingqianbao.view.LQBApp;
10 |
11 | /**
12 | * A simple {@link Fragment} subclass.
13 | */
14 | public class DiscoverFragment extends BaseFragment {
15 |
16 |
17 | private DiscoverFragmentPresenter mPresenter;
18 |
19 | public DiscoverFragment() {
20 | // Required empty public constructor
21 | }
22 |
23 | @Override
24 | protected Object getContentView() {
25 | return LayoutInflater.from(LQBApp.getApp()).inflate(R.layout.fragment_discover, null);
26 | }
27 |
28 | @Override
29 | protected void initData() {
30 | mPresenter = new DiscoverFragmentPresenter();
31 | stateLayout.showContentView();
32 | }
33 |
34 | @Override
35 | protected void initView() {
36 |
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_other.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
13 |
14 |
20 |
21 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/res/layout/main_detail.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
16 |
25 |
26 |
27 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/deal_pass_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
21 |
22 |
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/presenter/FAQActivityPresenter.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.presenter;
2 |
3 | import com.goldencarp.lingqianbao.model.bean.FAQBean;
4 |
5 | import java.util.ArrayList;
6 | import java.util.List;
7 |
8 | /**
9 | * Created by sks on 2017/12/4.
10 | */
11 |
12 | public class FAQActivityPresenter implements IFAQActivityPresenter {
13 |
14 | private List> faqList;
15 |
16 | @Override
17 | public List> getFAQList() {
18 | faqList = new ArrayList<>();
19 | int groupId = 0;
20 | String groupName = "了解零钱包";
21 | ArrayList faqChildList = new ArrayList<>();
22 | for (int i = 0; i < 5; i++) {
23 | faqChildList.add(new FAQBean(groupId, groupName, "question" + i, "answer" + i));
24 | }
25 | faqList.add(faqChildList);
26 |
27 | groupId = 1;
28 | groupName = "银行存管相关";
29 | ArrayList faqChildList1 = new ArrayList<>();
30 | for (int i = 0; i < 5; i++) {
31 | faqChildList1.add(new FAQBean(groupId, groupName, "question" + i, "answer" + i));
32 | }
33 | faqList.add(faqChildList1);
34 |
35 | return this.faqList;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/guesturepwdview/Dot.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.guesturepwdview;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * Created by zyyoona7 on 2017/7/10.
7 | */
8 |
9 | public class Dot implements Serializable {
10 |
11 | //圆心坐标
12 | private float x;
13 | private float y;
14 |
15 | //当前状态,是否选中
16 | private boolean isSelected;
17 |
18 | //下标
19 | private int index;
20 |
21 | public Dot(float x, float y, int index) {
22 | this.x = x;
23 | this.y = y;
24 | this.index = index;
25 | }
26 |
27 | public float getX() {
28 | return x;
29 | }
30 |
31 | public void setX(float x) {
32 | this.x = x;
33 | }
34 |
35 | public float getY() {
36 | return y;
37 | }
38 |
39 | public void setY(float y) {
40 | this.y = y;
41 | }
42 |
43 | public boolean isSelected() {
44 | return isSelected;
45 | }
46 |
47 | public void setSelected(boolean selected) {
48 | isSelected = selected;
49 | }
50 |
51 | public int getIndex() {
52 | return index;
53 | }
54 |
55 | public void setIndex(int index) {
56 | this.index = index;
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/java/com/lyk/jsbridge/MyApp.java:
--------------------------------------------------------------------------------
1 | package com.lyk.jsbridge;
2 |
3 | import android.app.Application;
4 | import android.util.Log;
5 |
6 | import com.tencent.smtt.sdk.QbSdk;
7 |
8 | /**
9 | * Created by sks on 2018/1/19.
10 | */
11 |
12 | public class MyApp extends Application {
13 |
14 | private static MyApp myApp;
15 |
16 | @Override
17 | public void onCreate() {
18 | super.onCreate();
19 | if (myApp == null) {
20 | myApp = this;
21 | }
22 | initX5Webview();
23 | }
24 |
25 | public static MyApp getApp() {
26 | return myApp;
27 | }
28 |
29 | /**初始化x5内核环境*/
30 | private void initX5Webview() {
31 | //搜集本地tbs内核信息并上报服务器,服务器返回结果决定使用哪个内核。
32 |
33 | QbSdk.PreInitCallback cb = new QbSdk.PreInitCallback() {
34 |
35 | @Override
36 | public void onViewInitFinished(boolean arg0) {
37 | //x5內核初始化完成的回调,为true表示x5内核加载成功,否则表示x5内核加载失败,会自动切换到系统内核。
38 | Log.d("app", " onViewInitFinished is " + arg0);
39 | }
40 |
41 | @Override
42 | public void onCoreInitFinished() {
43 | }
44 | };
45 | //x5内核初始化接口
46 | QbSdk.initX5Environment(getApplicationContext(), cb);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_key_board.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
24 |
25 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/wheelpicker/ArrayWheelAdapter.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.wheelpicker;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * The simple Array wheel adapter
7 | * @param the element type
8 | */
9 | public class ArrayWheelAdapter implements WheelAdapter {
10 |
11 | /** The default items length */
12 | public static final int DEFAULT_LENGTH = 4;
13 |
14 | // items
15 | private List items;
16 | // length
17 | private int length;
18 |
19 | /**
20 | * Constructor
21 | * @param items the items
22 | * @param length the max items length
23 | */
24 | public ArrayWheelAdapter(List items, int length) {
25 | this.items = items;
26 | this.length = length;
27 | }
28 |
29 | /**
30 | * Contructor
31 | * @param items the items
32 | */
33 | public ArrayWheelAdapter(List items) {
34 | this(items, DEFAULT_LENGTH);
35 | }
36 |
37 | @Override
38 | public Object getItem(int index) {
39 | if (index >= 0 && index < items.size()) {
40 | return items.get(index);
41 | }
42 | return "";
43 | }
44 |
45 | @Override
46 | public int getItemsCount() {
47 | return items.size();
48 | }
49 |
50 | @Override
51 | public int indexOf(Object o){
52 | return items.indexOf(o);
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_net.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
22 |
23 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/model/bean/ProductBean.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.model.bean;
2 |
3 | /**
4 | * Created by sks on 2017/12/2.
5 | */
6 |
7 | public class ProductBean {
8 | private String name;//产品名称
9 | private String rate;//预期年化收益率
10 | private int time;//投资时间
11 |
12 | public ProductBean() {
13 | super();
14 | }
15 |
16 | public ProductBean(String name, String rate, int time) {
17 | this.name = name;
18 | this.rate = rate;
19 | this.time = time;
20 | }
21 |
22 | public String getName() {
23 | return name;
24 | }
25 |
26 | public void setName(String name) {
27 | this.name = name;
28 | }
29 |
30 | public String getRate() {
31 | return rate;
32 | }
33 |
34 | public void setRate(String rate) {
35 | this.rate = rate;
36 | }
37 |
38 | public int getTime() {
39 | return time;
40 | }
41 |
42 | public void setTime(int time) {
43 | this.time = time;
44 | }
45 |
46 | @Override
47 | public String toString() {
48 | return "ProductBean{" +
49 | "name='" + name + '\'' +
50 | ", rate='" + rate + '\'' +
51 | ", time=" + time +
52 | '}';
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_permission.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
21 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_group.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
16 |
17 |
24 |
25 |
29 |
30 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_home_page.xml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
14 |
15 |
24 |
25 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/java/com/lyk/jsbridge/CglibDynamicProxy.java:
--------------------------------------------------------------------------------
1 | package com.lyk.jsbridge;
2 |
3 | import net.sf.cglib.proxy.Enhancer;
4 | import net.sf.cglib.proxy.MethodInterceptor;
5 | import net.sf.cglib.proxy.MethodProxy;
6 |
7 | import java.lang.reflect.Method;
8 |
9 | /**
10 | * Created by sks on 2018/1/22.
11 | */
12 |
13 | public class CglibDynamicProxy implements MethodInterceptor {
14 |
15 | private Object target;
16 |
17 | /**
18 | * 创建代理对象
19 | * @param target 被代理的对象
20 | * @return
21 | */
22 | public Object getProxyInstance(Object target){
23 | this.target = target;
24 | // 声明增强类实例
25 | Enhancer enhancer = new Enhancer();
26 | // 设置被代理类字节码,CGLIB根据字节码生成被代理类的子类
27 | enhancer.setSuperclass(this.target.getClass());
28 | // 设置要代理的拦截器,回调函数,即一个方法拦截 new MethodInterceptor()
29 | enhancer.setCallback(this);
30 | // 创建代理对象 实例
31 | return enhancer.create();
32 | }
33 |
34 | @Override
35 | public Object intercept(Object o, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
36 | // 在代理真实对象操作前 我们可以添加一些自己的操作
37 | System.out.println("前置代理,增强处理");
38 |
39 | methodProxy.invokeSuper(o, args);
40 |
41 | // 在代理真实对象操作后 我们也可以添加一些自己的操作
42 | System.out.println("后置代理,增强处理");
43 | return null;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/expendlist_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
15 |
16 |
21 |
22 |
29 |
30 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/grid_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
20 |
21 |
26 |
27 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 | #E8E8E8
7 | #00000000
8 |
9 | #BDBDBD
10 | #F5F5F5
11 | #F8F8F8
12 | #33000000
13 | #A7A7A7
14 | #E0E0E0
15 |
16 |
17 | #057dff
18 | #c2daf5
19 | #f5f5f5
20 |
21 | #000000
22 | #a8a8a8
23 | #2a2a2a
24 | #d5d5d5
25 | #60000000
26 | #FFFFFFFF
27 | #4A4A4A
28 | #FD5F80
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_pwd.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
25 |
26 |
34 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/wheelpicker/NumericWheelAdapter.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.wheelpicker;
2 |
3 |
4 | /**
5 | * Numeric Wheel adapter.
6 | */
7 | public class NumericWheelAdapter implements WheelAdapter {
8 |
9 | /** The default min value */
10 | public static final int DEFAULT_MAX_VALUE = 9;
11 |
12 | /** The default max value */
13 | private static final int DEFAULT_MIN_VALUE = 0;
14 |
15 | // Values
16 | private int minValue;
17 | private int maxValue;
18 |
19 | /**
20 | * Default constructor
21 | */
22 | public NumericWheelAdapter() {
23 | this(DEFAULT_MIN_VALUE, DEFAULT_MAX_VALUE);
24 | }
25 |
26 | /**
27 | * Constructor
28 | * @param minValue the wheel min value
29 | * @param maxValue the wheel max value
30 | */
31 | public NumericWheelAdapter(int minValue, int maxValue) {
32 | this.minValue = minValue;
33 | this.maxValue = maxValue;
34 | }
35 |
36 | @Override
37 | public Object getItem(int index) {
38 | if (index >= 0 && index < getItemsCount()) {
39 | int value = minValue + index;
40 | return value;
41 | }
42 | return 0;
43 | }
44 |
45 | @Override
46 | public int getItemsCount() {
47 | return maxValue - minValue + 1;
48 | }
49 |
50 | @Override
51 | public int indexOf(Object o){
52 | try {
53 | return (int)o - minValue;
54 | } catch (Exception e) {
55 | return -1;
56 | }
57 |
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_async_test.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
20 |
21 |
26 |
27 |
28 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/dealpassword/CustomPasswordTransformationMethod.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.dealpassword;
2 |
3 | import android.text.method.PasswordTransformationMethod;
4 | import android.view.View;
5 |
6 | /**
7 | * 默认'●'
8 | *
9 | * @author Jungly
10 | * mail: jungly.ik@gmail.com
11 | */
12 |
13 | public class CustomPasswordTransformationMethod extends PasswordTransformationMethod {
14 | String transformation;
15 |
16 | public CustomPasswordTransformationMethod(String transformation) {
17 | this.transformation = transformation;
18 | }
19 |
20 | @Override
21 | public CharSequence getTransformation(CharSequence source, View view) {
22 | return new PasswordCharSequence(source);
23 | }
24 |
25 | private class PasswordCharSequence implements CharSequence {
26 | private CharSequence mSource;
27 |
28 | public PasswordCharSequence(CharSequence source) {
29 | mSource = source;
30 | }
31 |
32 | @Override
33 | public int length() {
34 | return mSource.length();
35 | }
36 |
37 | @Override
38 | public char charAt(int index) {
39 | return transformation.charAt(0);
40 | }
41 |
42 | @Override
43 | public CharSequence subSequence(int start, int end) {
44 | return mSource.subSequence(start, end);
45 | }
46 | }
47 |
48 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/fragment/BaseFragment.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.fragment;
2 |
3 |
4 | import android.os.Bundle;
5 | import android.support.annotation.Nullable;
6 | import android.support.v4.app.Fragment;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 |
11 | import com.goldencarp.lingqianbao.R;
12 | import com.goldencarp.lingqianbao.view.custom.StateLayout;
13 |
14 | /**
15 | * A simple {@link Fragment} subclass.
16 | */
17 | public abstract class BaseFragment extends Fragment {
18 |
19 |
20 | protected StateLayout stateLayout;
21 |
22 | public BaseFragment() {
23 | // Required empty public constructor
24 | }
25 |
26 | @Nullable
27 | @Override
28 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
29 | stateLayout = (StateLayout) inflater.inflate(R.layout.state_layout, null);
30 | stateLayout.setContentView(getContentView());
31 | initData();
32 | initView();
33 | return stateLayout;
34 | }
35 |
36 | /**
37 | * 设置正常显示的布局
38 | */
39 | protected abstract Object getContentView();
40 |
41 | protected abstract void initData();
42 |
43 | protected abstract void initView();
44 |
45 | @Override
46 | public void onDestroyView() {
47 | super.onDestroyView();
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/activity/FAQActivity.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.activity;
2 |
3 | import android.os.Bundle;
4 | import android.widget.ExpandableListView;
5 |
6 | import com.goldencarp.lingqianbao.R;
7 | import com.goldencarp.lingqianbao.model.bean.FAQBean;
8 | import com.goldencarp.lingqianbao.presenter.FAQActivityPresenter;
9 | import com.goldencarp.lingqianbao.presenter.IFAQActivityPresenter;
10 | import com.goldencarp.lingqianbao.view.adapter.FAQExpandableListViewAdapter;
11 |
12 | import java.util.List;
13 |
14 | import butterknife.BindView;
15 | import butterknife.ButterKnife;
16 |
17 | public class FAQActivity extends BaseActivity {
18 |
19 | @BindView(R.id.faq_list)
20 | ExpandableListView faqExpandList;
21 | private IFAQActivityPresenter mPresenter;
22 | private List> faqList;
23 |
24 | @Override
25 | protected void onCreate(Bundle savedInstanceState) {
26 | super.onCreate(savedInstanceState);
27 | setContentView(R.layout.activity_faq);
28 | ButterKnife.bind(this);
29 | initData();
30 | initView();
31 | }
32 |
33 | protected void initData() {
34 | mPresenter = new FAQActivityPresenter();
35 | faqList = mPresenter.getFAQList();
36 | }
37 |
38 | protected void initView() {
39 | faqExpandList.setGroupIndicator(null);
40 | faqExpandList.setAdapter(new FAQExpandableListViewAdapter(this, faqList));
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/app/src/main/res/raw/jsbridge_init.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | console.log("entered");
3 | if (window.WebViewJavascriptBridge) { return }
4 | console.log("WebViewJavascriptBridge not ready and initalizing");
5 | var messagingIframe;
6 |
7 | function _createQueueReadyIframe(doc) {
8 | messagingIframe = doc.createElement('iframe');
9 | messagingIframe.style.display = 'none';
10 | doc.documentElement.appendChild(messagingIframe);
11 | }
12 | function init() {
13 | }
14 |
15 | function callHandler(name, data, callback){
16 | callbackStr = callback? callback.toString():"default";
17 | AndroidWebViewJavascriptBridge.callJavaHandler(name, JSON.stringify(data), callbackStr);
18 | }
19 | function getBridgeReady(){
20 | console.log("WebViewJavascriptBridge initializing");
21 | window.WebViewJavascriptBridge = {
22 | init: init,
23 | callHandler: callHandler,
24 | };
25 | var doc = document;
26 | _createQueueReadyIframe(doc);
27 | var readyEvent = doc.createEvent('Events');
28 | readyEvent.initEvent('WebViewJavascriptBridgeReady');
29 | readyEvent.bridge = WebViewJavascriptBridge;
30 | doc.dispatchEvent(readyEvent);
31 | }
32 | if (window.AndroidWebViewJavascriptBridge) {
33 | getBridgeReady();
34 | } else {
35 | document.addEventListener('AndroidWebViewJavascriptBridgeReady', function() {
36 | console.log("AndroidWebViewJavascriptBridgeReady notified");
37 | getBridgeReady();
38 | }, false);
39 | }
40 | console.log("jsbridge_init done");
41 |
42 | })();
43 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/res/raw/jsbridge_init.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | console.log("entered");
3 | if (window.WebViewJavascriptBridge) { return }
4 | console.log("WebViewJavascriptBridge not ready and initalizing");
5 | var messagingIframe;
6 |
7 | function _createQueueReadyIframe(doc) {
8 | messagingIframe = doc.createElement('iframe');
9 | messagingIframe.style.display = 'none';
10 | doc.documentElement.appendChild(messagingIframe);
11 | }
12 | function init() {
13 | }
14 |
15 | function callHandler(name, data, callback){
16 | callbackStr = callback? callback.toString():"default";
17 | AndroidWebViewJavascriptBridge.callJavaHandler(name, JSON.stringify(data), callbackStr);
18 | }
19 | function getBridgeReady(){
20 | console.log("WebViewJavascriptBridge initializing");
21 | window.WebViewJavascriptBridge = {
22 | init: init,
23 | callHandler: callHandler,
24 | };
25 | var doc = document;
26 | _createQueueReadyIframe(doc);
27 | var readyEvent = doc.createEvent('Events');
28 | readyEvent.initEvent('WebViewJavascriptBridgeReady');
29 | readyEvent.bridge = WebViewJavascriptBridge;
30 | doc.dispatchEvent(readyEvent);
31 | }
32 | if (window.AndroidWebViewJavascriptBridge) {
33 | getBridgeReady();
34 | } else {
35 | document.addEventListener('AndroidWebViewJavascriptBridgeReady', function() {
36 | console.log("AndroidWebViewJavascriptBridgeReady notified");
37 | getBridgeReady();
38 | }, false);
39 | }
40 | console.log("jsbridge_init done");
41 |
42 | })();
43 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/model/dao/gen/DaoSession.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.model.dao.gen;
2 |
3 | import java.util.Map;
4 |
5 | import org.greenrobot.greendao.AbstractDao;
6 | import org.greenrobot.greendao.AbstractDaoSession;
7 | import org.greenrobot.greendao.database.Database;
8 | import org.greenrobot.greendao.identityscope.IdentityScopeType;
9 | import org.greenrobot.greendao.internal.DaoConfig;
10 |
11 | import com.goldencarp.lingqianbao.model.dao.Meizi;
12 |
13 | import com.goldencarp.lingqianbao.model.dao.gen.MeiziDao;
14 |
15 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
16 |
17 | /**
18 | * {@inheritDoc}
19 | *
20 | * @see org.greenrobot.greendao.AbstractDaoSession
21 | */
22 | public class DaoSession extends AbstractDaoSession {
23 |
24 | private final DaoConfig meiziDaoConfig;
25 |
26 | private final MeiziDao meiziDao;
27 |
28 | public DaoSession(Database db, IdentityScopeType type, Map>, DaoConfig>
29 | daoConfigMap) {
30 | super(db);
31 |
32 | meiziDaoConfig = daoConfigMap.get(MeiziDao.class).clone();
33 | meiziDaoConfig.initIdentityScope(type);
34 |
35 | meiziDao = new MeiziDao(meiziDaoConfig, this);
36 |
37 | registerDao(Meizi.class, meiziDao);
38 | }
39 |
40 | public void clear() {
41 | meiziDaoConfig.clearIdentityScope();
42 | }
43 |
44 | public MeiziDao getMeiziDao() {
45 | return meiziDao;
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/presenter/CollapseListActivityPresenter.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.presenter;
2 |
3 | import android.app.Activity;
4 |
5 | import com.goldencarp.lingqianbao.view.activity.CollapseListActivity;
6 |
7 | import java.lang.ref.WeakReference;
8 | import java.util.ArrayList;
9 |
10 | /**
11 | * Created by sks on 2018/2/9.
12 | */
13 |
14 | public class CollapseListActivityPresenter {
15 |
16 | private final WeakReference activity;
17 | private int refreshTimes;//刷新的次数
18 | private int loadMoreTimes;//加载更多的次数
19 |
20 | public CollapseListActivityPresenter(CollapseListActivity activity) {
21 | this.activity = new WeakReference(activity);
22 | }
23 |
24 | /**
25 | * 列表刷新
26 | */
27 | public ArrayList refreshData() {
28 | final ArrayList data = new ArrayList<>();
29 | for (int i = 0; i < 20; i++) {
30 | data.add("第" + refreshTimes + "次刷新," + "第" + i + "条数据");
31 | }
32 |
33 | refreshTimes++;
34 | return data;
35 | }
36 |
37 | /**
38 | * 加载更多
39 | */
40 | public ArrayList loadMore() {
41 | final ArrayList data = new ArrayList<>();
42 | if (loadMoreTimes < 2) {
43 | for (int i = 0; i < 10; i++) {
44 | data.add("第" + loadMoreTimes + "次加载更多," + "第" + i + "条数据");
45 | }
46 | }
47 | loadMoreTimes++;
48 | return data;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/util/GankBeautyResultToItemsMapper.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.util;
2 |
3 | import com.goldencarp.lingqianbao.model.net.GankBeautyResult;
4 | import com.goldencarp.lingqianbao.model.net.Item;
5 |
6 | import java.text.SimpleDateFormat;
7 | import java.util.ArrayList;
8 | import java.util.Date;
9 | import java.util.List;
10 |
11 | import io.reactivex.annotations.NonNull;
12 | import io.reactivex.functions.Function;
13 |
14 | /**
15 | * Created by dale on 2018/2/19.
16 | */
17 |
18 | public class GankBeautyResultToItemsMapper implements Function> {
19 | @Override
20 | public List- apply(@NonNull GankBeautyResult gankBeautyResult) throws Exception {
21 | List results = gankBeautyResult.getResults();
22 | List
- itemList = new ArrayList<>();
23 | //2018-01-29T07:40:56.269Z
24 | SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SS'Z'");
25 | SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
26 | for (GankBeautyResult.ResultsBean result : results) {
27 | Date inDate = sdf1.parse(result.getCreatedAt());
28 | String outDateStr = sdf2.format(inDate);
29 | Item item = new Item();
30 | item.description = outDateStr;
31 | item.imageUrl = result.getUrl();
32 | itemList.add(item);
33 | }
34 | return itemList;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_token_advanced.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
14 |
18 |
19 |
24 |
25 |
26 |
27 |
32 |
33 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_rxjava.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
22 |
23 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/model/bean/Student.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.model.bean;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * Created by sks on 2018/1/15.
7 | */
8 |
9 | public class Student {
10 |
11 | /**
12 | * id : 123
13 | * name : 张三
14 | * age : 26
15 | * courses:课程
16 | */
17 |
18 | private String id;
19 | private String name;
20 | private int age;
21 | private List courses;
22 |
23 | public Student(String name, List courses) {
24 | this.name = name;
25 | this.courses = courses;
26 | }
27 |
28 | public List getCourses() {
29 | return courses;
30 | }
31 |
32 | public void setCourses(List courses) {
33 | this.courses = courses;
34 | }
35 |
36 | public String getId() {
37 | return id;
38 | }
39 |
40 | public void setId(String id) {
41 | this.id = id;
42 | }
43 |
44 | public String getName() {
45 | return name;
46 | }
47 |
48 | public void setName(String name) {
49 | this.name = name;
50 | }
51 |
52 | public int getAge() {
53 | return age;
54 | }
55 |
56 | public void setAge(int age) {
57 | this.age = age;
58 | }
59 |
60 | @Override
61 | public String toString() {
62 | return "Student{" +
63 | "id='" + id + '\'' +
64 | ", name='" + name + '\'' +
65 | ", age=" + age +
66 | '}';
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/model/dao/Meizi.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.model.dao;
2 |
3 | import org.greenrobot.greendao.annotation.Entity;
4 | import org.greenrobot.greendao.annotation.Id;
5 | import org.greenrobot.greendao.annotation.NotNull;
6 | import org.greenrobot.greendao.annotation.Generated;
7 |
8 | /**
9 | * Created by sks on 2018/1/25.
10 | */
11 | @Entity
12 | public class Meizi {
13 | @Id(autoincrement = true)
14 | private Long _id;
15 | private String source;
16 | @NotNull
17 | private String url;
18 | @Generated(hash = 717937950)
19 | public Meizi(Long _id, String source, @NotNull String url) {
20 | this._id = _id;
21 | this.source = source;
22 | this.url = url;
23 | }
24 | @Generated(hash = 507723578)
25 | public Meizi() {
26 | }
27 | public Long get_id() {
28 | return this._id;
29 | }
30 | public void set_id(Long _id) {
31 | this._id = _id;
32 | }
33 | public String getSource() {
34 | return this.source;
35 | }
36 | public void setSource(String source) {
37 | this.source = source;
38 | }
39 | public String getUrl() {
40 | return this.url;
41 | }
42 | public void setUrl(String url) {
43 | this.url = url;
44 | }
45 |
46 | @Override
47 | public String toString() {
48 | return "Meizi{" +
49 | "_id=" + _id +
50 | ", source='" + source + '\'' +
51 | ", url='" + url + '\'' +
52 | '}';
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | LQBFrame
3 |
4 | 体验金
5 | 券包
6 | 消息管理
7 | 常见问题
8 | 网络连接失败
9 |
10 |
11 | Hello blank fragment
12 | 第%d页
13 |
14 | 取消
15 | 确定
16 | 年
17 | 月
18 | 日
19 | 时
20 | 分
21 | 秒
22 | 请输入密码
23 | 请选择语言
24 | 登录
25 | 请输入手机号
26 | 请输入密码
27 | 零钱包安全键盘
28 | 发现
29 | 输入操作密码
30 | 操作密码输入不正确
31 | 忘记密码?
32 | 我的收藏
33 | 关于我们
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/model/net/Apis.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.model.net;
2 |
3 | import com.goldencarp.lingqianbao.model.bean.Student;
4 |
5 | import okhttp3.MultipartBody;
6 | import okhttp3.ResponseBody;
7 | import retrofit2.Call;
8 | import retrofit2.http.Field;
9 | import retrofit2.http.FormUrlEncoded;
10 | import retrofit2.http.GET;
11 | import retrofit2.http.HTTP;
12 | import retrofit2.http.Header;
13 | import retrofit2.http.Headers;
14 | import retrofit2.http.Multipart;
15 | import retrofit2.http.POST;
16 | import retrofit2.http.Part;
17 | import retrofit2.http.Path;
18 |
19 | /**
20 | * Created by dale on 2017/11/21.
21 | */
22 |
23 | public interface Apis {
24 | // @GET("about/version?currentversion=5.1.1&platform=and")//原始方式
25 | @Headers("Authorization: authorization")
26 | @HTTP(method = "GET", path = "about/version/{currentversion, platform}", hasBody = false)
27 | Call checkUpgrade(@Header("Authorization") String authorization, @Path("currentversion") String currentversion, @Path("platform") String platform);
28 |
29 | // Call checkUpgrade();
30 |
31 | @POST("add/uploadfiles")
32 | @FormUrlEncoded
33 | //表示这个接口提交表单
34 | Call uploadCrashFiles(@Field("file") String fileContent, @Field("from") String platform);
35 |
36 | @POST("add/upload-pictures")
37 | @Multipart
38 | //表示这个接口有文件上传
39 | Call uploadFiles(@Part MultipartBody.Part idcardImg, @Part MultipartBody.Part bankcardImg);
40 |
41 | @GET("test.txt")
42 | Call getInfo();
43 | }
44 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/state_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
12 |
18 |
19 |
26 |
31 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/model/dao/SpUtil.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.model.dao;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 |
6 | import com.goldencarp.lingqianbao.model.Constants;
7 | import com.goldencarp.lingqianbao.view.LQBApp;
8 |
9 | /**
10 | * Created by sks on 2018/3/3.
11 | * 帮助sharedpreferrences快速存取的类
12 | */
13 |
14 | public class SpUtil {
15 |
16 | private static SharedPreferences mSp;
17 |
18 | private SpUtil(){}
19 |
20 | public static void saveString(String key, String content) {
21 | if (mSp == null) {
22 | mSp = LQBApp.getApp().getSharedPreferences(Constants.SP_FILE_NAME, Context.MODE_PRIVATE);
23 | }
24 | mSp.edit().putString(key, content).apply();
25 | }
26 |
27 | public static String getString(String key) {
28 | if (mSp == null) {
29 | mSp = LQBApp.getApp().getSharedPreferences(Constants.SP_FILE_NAME, Context.MODE_PRIVATE);
30 | }
31 | return mSp.getString(key, "");
32 | }
33 |
34 | public static void saveBoolean(String key, boolean content) {
35 | if (mSp == null) {
36 | mSp = LQBApp.getApp().getSharedPreferences(Constants.SP_FILE_NAME, Context.MODE_PRIVATE);
37 | }
38 | mSp.edit().putBoolean(key, content).apply();
39 | }
40 |
41 | public static boolean getBoolean(String key) {
42 | if (mSp == null) {
43 | mSp = LQBApp.getApp().getSharedPreferences(Constants.SP_FILE_NAME, Context.MODE_PRIVATE);
44 | }
45 | return mSp.getBoolean(key, false);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/model/bean/FAQBean.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.model.bean;
2 |
3 | /**
4 | * Created by sks on 2017/12/4.
5 | */
6 |
7 | public class FAQBean {
8 | private int groupId;
9 | private String groupName;
10 | private String question;
11 | private String answer;
12 |
13 | public FAQBean(int groupId, String groupName, String question, String answer) {
14 | this.groupId = groupId;
15 | this.groupName = groupName;
16 | this.question = question;
17 | this.answer = answer;
18 | }
19 |
20 | public String getQuestion() {
21 | return question;
22 | }
23 |
24 | public void setQuestion(String question) {
25 | this.question = question;
26 | }
27 |
28 | public String getAnswer() {
29 | return answer;
30 | }
31 |
32 | public void setAnswer(String answer) {
33 | this.answer = answer;
34 | }
35 |
36 | public int getGroupId() {
37 | return groupId;
38 | }
39 |
40 | public void setGroupId(int groupId) {
41 | this.groupId = groupId;
42 | }
43 |
44 | public String getGroupName() {
45 | return groupName;
46 | }
47 |
48 | public void setGroupName(String groupName) {
49 | this.groupName = groupName;
50 | }
51 |
52 | @Override
53 | public String toString() {
54 | return "FAQBean{" +
55 | "groupId=" + groupId +
56 | ", groupName='" + groupName + '\'' +
57 | ", question='" + question + '\'' +
58 | ", answer='" + answer + '\'' +
59 | '}';
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_pwd_visible.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
24 |
25 |
34 |
35 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/model/net/WebViewJavascriptBridge.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.model.net;
2 |
3 | import android.os.Handler;
4 | import android.os.Message;
5 | import android.webkit.JavascriptInterface;
6 |
7 | import com.goldencarp.lingqianbao.view.activity.WebviewActivity;
8 | import com.tencent.smtt.sdk.WebView;
9 |
10 | import java.lang.reflect.Method;
11 |
12 | public class WebViewJavascriptBridge {
13 |
14 | public final static int MSG_SETGEST = 6;
15 | private static final String TAG = "WebViewJavascriptBridge";
16 |
17 | private WebviewActivity activity = null;
18 | private WebView webView = null;
19 | private Handler handler = null;
20 |
21 | public WebViewJavascriptBridge(WebviewActivity activity, Handler handler, WebView webView) {
22 | this.activity = activity;
23 | this.handler = handler;
24 | this.webView = webView;
25 | }
26 |
27 | @JavascriptInterface
28 | public void callJavaHandler(String methodName, String data, String callback) {
29 | String logTag = "callJavaHandler";
30 | // Logger.i(logTag, methodName + ";" + data + ";" + callback);
31 | try {
32 | Method method = getClass().getMethod(methodName, new Class[]{String.class, String.class});
33 | method.invoke(this, data, callback);
34 | } catch (Exception e) {
35 | // Logger.e(logTag, e.getMessage());
36 | e.printStackTrace();
37 | }
38 | }
39 |
40 | /**
41 | * 设置手势密码
42 | */
43 | public void lqbSetGest(String data, String callback) {
44 | Message msg = Message.obtain();
45 | msg.what = MSG_SETGEST;
46 | handler.sendMessage(msg);
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/activity/DemoActivity.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.activity;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.text.TextUtils;
6 | import android.widget.Button;
7 | import android.widget.EditText;
8 | import android.widget.TextView;
9 |
10 | import com.goldencarp.lingqianbao.R;
11 |
12 | import org.apache.commons.codec1.digest.DigestUtils;
13 |
14 | import butterknife.BindView;
15 | import butterknife.ButterKnife;
16 | import butterknife.OnClick;
17 |
18 | public class DemoActivity extends AppCompatActivity {
19 |
20 | @BindView(R.id.et_raw_str)
21 | EditText etRawStr;
22 | @BindView(R.id.tv_encode_result)
23 | TextView tvEncodeResult;
24 | @BindView(R.id.btn_test_doonnext)
25 | Button btnTestDoonnext;
26 | private boolean isEncrypt;//已经加密
27 |
28 | @Override
29 | protected void onCreate(Bundle savedInstanceState) {
30 | super.onCreate(savedInstanceState);
31 | setContentView(R.layout.activity_demo);
32 | ButterKnife.bind(this);
33 | }
34 |
35 | @OnClick(R.id.btn_test_doonnext)
36 | public void onViewClicked() {
37 | encodeTest();
38 | }
39 |
40 | /**
41 | * 测试sha1加密
42 | */
43 | private void encodeTest() {
44 | if (isEncrypt){
45 | // CharSequence encryptedText = tvEncodeResult.getText();
46 | // DigestUtils.sha1Hex()
47 | }else {
48 | String rawStr = etRawStr.getText().toString().trim();
49 | if (!TextUtils.isEmpty(rawStr)){
50 | tvEncodeResult.setText(DigestUtils.sha1Hex(rawStr));
51 | // tvEncodeResult.setText(StringUtil.encode(rawStr));
52 | }
53 | }
54 |
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/hydriddemo/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 26
5 | buildToolsVersion "27.0.0"
6 |
7 | defaultConfig {
8 | applicationId "com.dale.x5webview.hydriddemo"
9 | minSdkVersion 15
10 | targetSdkVersion 26
11 | versionCode 1
12 | versionName "1.0"
13 |
14 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
15 | ndk { abiFilters "armeabi", "armeabi-v7a", "x86", "mips" }
16 |
17 | }
18 | buildTypes {
19 | release {
20 | minifyEnabled false
21 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
22 | }
23 | }
24 | }
25 |
26 | repositories {
27 | maven { url "https://jitpack.io" }
28 |
29 | }
30 |
31 | dependencies {
32 | implementation fileTree(include: ['*.jar'], dir: 'libs')
33 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
34 | exclude group: 'com.android.support', module: 'support-annotations'
35 | })
36 | implementation files('libs/tbs_sdk_thirdapp_v3.5.0.1004_43500_sharewithdownload_withoutGame_obfs_20170801_113025.jar')
37 | implementation 'com.android.support:appcompat-v7:26.+'
38 | implementation 'com.android.support.constraint:constraint-layout:1.0.2'
39 | implementation 'com.google.code.gson:gson:2.8.2'
40 | implementation 'com.jakewharton:butterknife:8.4.0'
41 | implementation 'com.github.hotchemi:permissionsdispatcher:2.4.0'
42 | testImplementation 'junit:junit:4.12'
43 | annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
44 | annotationProcessor 'com.github.hotchemi:permissionsdispatcher-processor:2.4.0'
45 | implementation 'com.android.support:design:28.0.0-alpha1'
46 | }
47 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
23 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/activity/PushActivity.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.activity;
2 |
3 | import android.os.Bundle;
4 | import android.view.View;
5 | import android.widget.Toast;
6 |
7 | import com.goldencarp.lingqianbao.R;
8 | import com.goldencarp.lingqianbao.view.LQBApp;
9 | import com.goldencarp.lingqianbao.view.util.Logger;
10 |
11 | import cn.jpush.android.api.JPushInterface;
12 |
13 | public class PushActivity extends BaseActivity {
14 |
15 | private static final java.lang.String TAG = "PushActivity";
16 |
17 | @Override
18 | protected void onCreate(Bundle savedInstanceState) {
19 | super.onCreate(savedInstanceState);
20 | setContentView(R.layout.activity_push);
21 | }
22 | public void stopPush(View view) {
23 | JPushInterface.stopPush(LQBApp.getApp());
24 | Toast.makeText(this, "推送已关闭", Toast.LENGTH_SHORT).show();
25 | }
26 | public void resumePush(View view) {
27 | if (JPushInterface.isPushStopped(LQBApp.getApp())){
28 | JPushInterface.resumePush(LQBApp.getApp());
29 | Toast.makeText(this, "推送已恢复", Toast.LENGTH_SHORT).show();
30 | }else {
31 | Logger.d(TAG, "-----推送未关闭,无需恢复------");
32 | }
33 | }
34 | public void setAlias(View view) {
35 | JPushInterface.setAlias(LQBApp.getApp(), 1000, "woshi007");
36 | Toast.makeText(this, "别名已设置", Toast.LENGTH_SHORT).show();
37 | }
38 | public void deleteAlias(View view) {
39 | JPushInterface.deleteAlias(LQBApp.getApp(), 1000);
40 | Toast.makeText(this, "别名已删除", Toast.LENGTH_SHORT).show();
41 | }
42 | public void getAlias(View view) {
43 | JPushInterface.getAlias(LQBApp.getApp(), 1000);
44 | Toast.makeText(this, "别名是:", Toast.LENGTH_SHORT).show();
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_map.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
18 |
19 |
25 |
26 |
33 |
34 |
35 |
36 |
40 |
41 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
21 |
22 |
23 |
24 |
25 |
26 |
33 |
37 |
38 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/include_pickerview_topbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
18 |
19 |
29 |
30 |
41 |
42 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/MultiProgressnbar.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom;
2 |
3 | import android.content.Context;
4 | import android.graphics.Canvas;
5 | import android.graphics.Color;
6 | import android.graphics.Paint;
7 | import android.graphics.RectF;
8 | import android.support.annotation.Nullable;
9 | import android.util.AttributeSet;
10 | import android.view.View;
11 |
12 | import com.goldencarp.lingqianbao.view.LQBApp;
13 | import com.goldencarp.lingqianbao.view.util.DensityUtil;
14 |
15 | /**
16 | * Created by sks on 2018/3/9.
17 | */
18 |
19 | public class MultiProgressnbar extends View {
20 |
21 | final float radius1 = DensityUtil.dip2px(LQBApp.getApp(), 80);//外环半径
22 | final float radius2 = DensityUtil.dip2px(LQBApp.getApp(), 60);//内环半径
23 |
24 | public MultiProgressnbar(Context context) {
25 | this(context, null);
26 | }
27 |
28 | public MultiProgressnbar(Context context, @Nullable AttributeSet attrs) {
29 | super(context, attrs);
30 | }
31 |
32 | private Paint mPaint;
33 |
34 | {
35 | mPaint = new Paint();
36 | mPaint.setAntiAlias(true);
37 | mPaint.setStrokeCap(Paint.Cap.ROUND);
38 | mPaint.setStyle(Paint.Style.STROKE);
39 | mPaint.setStrokeWidth(DensityUtil.dip2px(LQBApp.getApp(), 15));
40 | }
41 |
42 | @Override
43 | protected void onDraw(Canvas canvas) {
44 | super.onDraw(canvas);
45 | float centerX = getWidth() / 2;
46 | float centerY = getHeight() / 2;
47 | mPaint.setColor(Color.parseColor("#E91E63"));
48 | RectF outerRectF = new RectF(centerX - radius1, centerY - radius1, centerX + radius1, centerY + radius1);
49 | RectF innerRectF = new RectF(centerX - radius2, centerY - radius2, centerX + radius2, centerY + radius2);
50 | canvas.drawArc(outerRectF, 0, 120, false, mPaint);
51 | mPaint.setColor(Color.parseColor("#0090ED"));
52 | canvas.drawArc(innerRectF, 60, 270, false, mPaint);
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_push.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
25 |
26 |
32 |
38 |
44 |
50 |
51 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_lock.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
17 |
18 |
23 |
24 |
31 |
32 |
38 |
39 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/activity/LoginActivity.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.activity;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.view.inputmethod.EditorInfo;
6 | import android.widget.CheckBox;
7 |
8 | import com.goldencarp.lingqianbao.R;
9 | import com.goldencarp.lingqianbao.view.custom.ClearableEditText;
10 | import com.goldencarp.lingqianbao.view.util.Logger;
11 |
12 | import butterknife.BindView;
13 | import butterknife.ButterKnife;
14 | import butterknife.OnClick;
15 |
16 | public class LoginActivity extends AppCompatActivity {
17 |
18 | private static final java.lang.String LOG_TAG = "LoginActivity";
19 | @BindView(R.id.et_al_phone)
20 | ClearableEditText etAlPhone;
21 | @BindView(R.id.et_al_pwd)
22 | ClearableEditText etAlPwd;
23 | @BindView(R.id.cb_pwd_visible_toggle)
24 | CheckBox cbPwdVisibleToggle;
25 | private boolean showPwd;//密码可见
26 |
27 | @Override
28 | protected void onCreate(Bundle savedInstanceState) {
29 | super.onCreate(savedInstanceState);
30 | setContentView(R.layout.activity_login);
31 | ButterKnife.bind(this);
32 | changePwdVisibleState(cbPwdVisibleToggle.isChecked());
33 | }
34 |
35 | @OnClick(R.id.cb_pwd_visible_toggle)
36 | public void onViewClicked() {
37 | Logger.e(LOG_TAG, "-------onViewClicked--------");
38 | // boolean checked = cbPwdVisibleToggle.isChecked();
39 | // cbPwdVisibleToggle.setChecked(!checked);
40 | changePwdVisibleState(cbPwdVisibleToggle.isChecked());
41 | }
42 |
43 | /**
44 | * 切换密码可见状态
45 | */
46 | private void changePwdVisibleState(boolean visible) {
47 | if (visible) {
48 | etAlPwd.setInputType(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
49 | } else {
50 | etAlPwd.setInputType(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_PASSWORD);
51 | }
52 | etAlPwd.setSelection(etAlPwd.getText().length());
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/customseekbar/BubbleUtils.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.customseekbar;
2 |
3 | import android.content.res.Resources;
4 | import android.os.Environment;
5 | import android.util.TypedValue;
6 |
7 | import java.io.File;
8 | import java.io.FileInputStream;
9 | import java.io.IOException;
10 | import java.util.Properties;
11 |
12 | class BubbleUtils {
13 |
14 | private static final File BUILD_PROP_FILE = new File(Environment.getRootDirectory(), "build.prop");
15 | private static Properties sBuildProperties;
16 | private static final Object sBuildPropertiesLock = new Object();
17 |
18 | private static Properties getBuildProperties() {
19 | synchronized (sBuildPropertiesLock) {
20 | if (sBuildProperties == null) {
21 | sBuildProperties = new Properties();
22 | FileInputStream fis = null;
23 | try {
24 | fis = new FileInputStream(BUILD_PROP_FILE);
25 | sBuildProperties.load(fis);
26 | } catch (IOException e) {
27 | e.printStackTrace();
28 | } finally {
29 | if (fis != null) {
30 | try {
31 | fis.close();
32 | } catch (IOException e) {
33 | e.printStackTrace();
34 | }
35 | }
36 | }
37 | }
38 | }
39 | return sBuildProperties;
40 | }
41 |
42 | static boolean isMIUI() {
43 | return getBuildProperties().containsKey("ro.miui.ui.version.name");
44 | }
45 |
46 | static int dp2px(int dp) {
47 | return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp,
48 | Resources.getSystem().getDisplayMetrics());
49 | }
50 |
51 | static int sp2px(int sp) {
52 | return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, sp,
53 | Resources.getSystem().getDisplayMetrics());
54 | }
55 | }
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_deal_code.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
32 |
40 |
44 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_guesture_code.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
18 |
19 |
24 |
25 |
31 |
32 |
38 |
39 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/adapter/ItemListAdapter.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.adapter;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.ImageView;
8 | import android.widget.TextView;
9 |
10 | import com.bumptech.glide.Glide;
11 | import com.goldencarp.lingqianbao.R;
12 | import com.goldencarp.lingqianbao.model.net.Item;
13 | import com.goldencarp.lingqianbao.view.LQBApp;
14 |
15 | import java.util.List;
16 |
17 | import butterknife.BindView;
18 | import butterknife.ButterKnife;
19 |
20 | /**
21 | * Created by dale on 2018/2/18.
22 | */
23 |
24 | public class ItemListAdapter extends RecyclerView.Adapter {
25 |
26 | List
- images;
27 |
28 | public ItemListAdapter(List
- images) {
29 | this.images = images;
30 | }
31 |
32 | @Override
33 | public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
34 | View itemView = LayoutInflater.from(LQBApp.getApp()).inflate(R.layout.grid_item, parent, false);
35 | return new MyViewHolder(itemView);
36 | }
37 |
38 | @Override
39 | public void onBindViewHolder(MyViewHolder holder, int position) {
40 | holder.descriptionTv.setText(images.get(position).description);
41 | Glide.with(LQBApp.getApp()).load(images.get(position).imageUrl).into(holder.imageIv);
42 | }
43 |
44 | @Override
45 | public int getItemCount() {
46 | return images == null ? 0 : images.size();
47 | }
48 |
49 | public void setImages(List
- images) {
50 | this.images = images;
51 | notifyDataSetChanged();
52 | }
53 |
54 | static class MyViewHolder extends RecyclerView.ViewHolder{
55 | @BindView(R.id.imageIv)
56 | ImageView imageIv;
57 | @BindView(R.id.descriptionTv)
58 | TextView descriptionTv;
59 |
60 | MyViewHolder(View view) {
61 | super(view);
62 | ButterKnife.bind(this, view);
63 | }
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_elementary.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
13 |
14 |
20 |
21 |
26 |
27 |
32 |
33 |
38 |
39 |
40 |
41 |
45 |
46 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_personal_center.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
24 |
25 |
31 |
32 |
40 |
41 |
48 |
49 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/hydriddemo/src/main/java/com/lyk/jsbridge/Util.java:
--------------------------------------------------------------------------------
1 | package com.lyk.jsbridge;
2 |
3 | import android.util.Log;
4 |
5 | import com.tencent.smtt.sdk.WebView;
6 |
7 | import org.json.JSONObject;
8 |
9 | import java.io.BufferedReader;
10 | import java.io.FileNotFoundException;
11 | import java.io.InputStream;
12 | import java.io.InputStreamReader;
13 |
14 | /**
15 | * Created by dale on 2018/1/20.
16 | */
17 |
18 | public class Util {
19 |
20 | private static final String LOG_TAG = "Util";
21 |
22 | /**
23 | * 将本地文件读出来
24 | */
25 | public static String getLocalText(InputStream is) {
26 | String resultData = "";
27 | try {
28 | InputStreamReader in = new InputStreamReader(is);
29 | BufferedReader buffer = new BufferedReader(in);
30 | String inputLine = null;
31 | while ((inputLine = buffer.readLine()) != null) {
32 | resultData += inputLine;
33 | }
34 | in.close();
35 | is.close();
36 | } catch (FileNotFoundException e) {
37 | Log.e(LOG_TAG, e.getMessage());
38 | } catch (Exception e) {
39 | Log.e(LOG_TAG, e.getMessage());
40 | }
41 | return resultData;
42 | }
43 |
44 | /**
45 | * 处理了前端回调
46 | */
47 | public static void jsCallback(WebView webView, int status, String msg,
48 | String callback) {
49 | if (webView != null && callback != null && callback.length() > 0) {
50 | try {
51 | JSONObject param = new JSONObject();
52 | param.put("status", status);
53 | param.put("msg", msg);
54 | String js = "javascript: ~" + callback + "('"
55 | + param.toString() + "');";
56 | Log.e(LOG_TAG, "Util中与web前端交互的参数param.toString()=="+param.toString());
57 | if (android.os.Build.VERSION.SDK_INT <= 18) {
58 | webView.loadUrl(js);
59 | } else {
60 | webView.evaluateJavascript(js, null);
61 | }
62 | } catch (Exception e) {
63 | e.printStackTrace();
64 | }
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/stickydecoration/cache/CacheUtil.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.stickydecoration.cache;
2 |
3 | import android.util.SparseArray;
4 |
5 | import java.lang.ref.SoftReference;
6 |
7 | /**
8 | * Created by gavin
9 | * date 2018/3/4
10 | * 缓存工具
11 | */
12 |
13 | public class CacheUtil implements CacheInterface {
14 |
15 | /**
16 | * 是否使用强引用(默认软引用)
17 | * 引用类型:强引用、软引用
18 | */
19 | private boolean isStrongReference = false;
20 |
21 | /**
22 | * 使用强引用缓存数据
23 | */
24 | private SparseArray mStrongCache;
25 |
26 | /**
27 | * 使用软引用缓存数据
28 | */
29 | private SparseArray> mSoftCache;
30 |
31 | /**
32 | * 是否使用强引用缓存
33 | *
34 | * @param b
35 | */
36 | public void isStrongReference(boolean b) {
37 | isStrongReference = b;
38 | }
39 |
40 | @Override
41 | public void put(int position, T t) {
42 | if (isStrongReference) {
43 | if (mStrongCache == null) {
44 | mStrongCache = new SparseArray<>();
45 | }
46 | mStrongCache.put(position, t);
47 | } else {
48 | if (mSoftCache == null) {
49 | mSoftCache = new SparseArray<>();
50 | }
51 | mSoftCache.put(position, new SoftReference(t));
52 | }
53 | }
54 |
55 | @Override
56 | public T get(int position) {
57 | if (isStrongReference) {
58 | if (mStrongCache == null) {
59 | mStrongCache = new SparseArray<>();
60 | }
61 | return mStrongCache.get(position);
62 | } else {
63 | if (mSoftCache == null) {
64 | mSoftCache = new SparseArray<>();
65 | }
66 | SoftReference reference = mSoftCache.get(position);
67 | return reference == null ? null : reference.get();
68 | }
69 | }
70 |
71 | @Override
72 | public void remove(int position) {
73 | if (mStrongCache != null){
74 | mStrongCache.remove(position);
75 | }
76 |
77 | if (mSoftCache != null) {
78 | mSoftCache.remove(position);
79 | }
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/util/DensityUtil.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.util;
2 |
3 |
4 | import android.content.Context;
5 | import android.util.DisplayMetrics;
6 | import android.view.WindowManager;
7 |
8 | public class DensityUtil {
9 |
10 | /**
11 | * 获得屏幕宽度
12 | *
13 | * @param context
14 | * @return
15 | */
16 | public static int getScreenWidth(Context context) {
17 | WindowManager wm = (WindowManager) context
18 | .getSystemService(Context.WINDOW_SERVICE);
19 | DisplayMetrics outMetrics = new DisplayMetrics();
20 | wm.getDefaultDisplay().getMetrics(outMetrics);
21 | return outMetrics.widthPixels;
22 | }
23 |
24 | /**
25 | * 获得屏幕宽度
26 | *
27 | * @param context
28 | * @return
29 | */
30 | public static int getScreenHeight(Context context) {
31 | WindowManager wm = (WindowManager) context
32 | .getSystemService(Context.WINDOW_SERVICE);
33 | DisplayMetrics outMetrics = new DisplayMetrics();
34 | wm.getDefaultDisplay().getMetrics(outMetrics);
35 | return outMetrics.heightPixels;
36 | }
37 |
38 | /**
39 | * 根据手机的分辨率从 dp 的单位 转成为 px(像素)
40 | */
41 | public static int dip2px(Context context, float dpValue) {
42 | final float scale = context.getResources().getDisplayMetrics().density;
43 | return (int) (dpValue * scale + 0.5f);
44 | }
45 |
46 | /**
47 | * 根据手机的分辨率从 px(像素) 的单位 转成为 dp
48 | */
49 | public static int px2dip(Context context, float pxValue) {
50 | final float scale = context.getResources().getDisplayMetrics().density;
51 | return (int) (pxValue / scale + 0.5f);
52 | }
53 |
54 | // 将px值转换为sp值,保证文字大小不变
55 | public static int px2sp(Context context, float pxValue) {
56 | final float fontScale = context.getResources().getDisplayMetrics().scaledDensity;
57 | return (int) (pxValue / fontScale + 0.5f);
58 | }
59 |
60 | // 将sp值转换为px值,保证文字大小不变
61 | public static int sp2px(Context context, float spValue) {
62 | final float fontScale = context.getResources().getDisplayMetrics().scaledDensity;
63 | return (int) (spValue * fontScale + 0.5f);
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/adapter/ZhuangBiListAdapter.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.adapter;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.ImageView;
8 | import android.widget.TextView;
9 |
10 | import com.bumptech.glide.Glide;
11 | import com.goldencarp.lingqianbao.R;
12 | import com.goldencarp.lingqianbao.model.net.ZhuangbiImage;
13 | import com.goldencarp.lingqianbao.view.LQBApp;
14 |
15 | import java.util.List;
16 |
17 | import butterknife.BindView;
18 | import butterknife.ButterKnife;
19 |
20 | /**
21 | * Created by dale on 2018/2/17.
22 | */
23 |
24 | public class ZhuangBiListAdapter extends RecyclerView.Adapter {
25 |
26 | private List zhuangbiImages;
27 |
28 | public ZhuangBiListAdapter(List zhuangbiImages) {
29 | this.zhuangbiImages = zhuangbiImages;
30 | }
31 |
32 | @Override
33 | public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
34 | View view = LayoutInflater.from(LQBApp.getApp()).inflate(R.layout.grid_item, parent, false);
35 | return new MyViewHolder(view);
36 | }
37 |
38 | @Override
39 | public void onBindViewHolder(MyViewHolder holder, int position) {
40 | holder.descriptionTv.setText(zhuangbiImages.get(position).getDescription());
41 | Glide.with(LQBApp.getApp()).load(zhuangbiImages.get(position).getImage_url()).into(holder.imageIv);
42 | }
43 |
44 | @Override
45 | public int getItemCount() {
46 | return zhuangbiImages == null ? 0 : zhuangbiImages.size();
47 | }
48 |
49 | static class MyViewHolder extends RecyclerView.ViewHolder {
50 | @BindView(R.id.imageIv)
51 | ImageView imageIv;
52 | @BindView(R.id.descriptionTv)
53 | TextView descriptionTv;
54 |
55 | MyViewHolder(View view) {
56 | super(view);
57 | ButterKnife.bind(this, view);
58 | }
59 | }
60 |
61 | public void setZhuangbiImages(List zhuangbiImages) {
62 | this.zhuangbiImages = zhuangbiImages;
63 | notifyDataSetChanged();
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/wheelpicker/SmoothScrollTimerTask.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.wheelpicker;
2 |
3 | import java.util.TimerTask;
4 |
5 | /**
6 | * @TODO<平滑滚动的实现>
7 | * @author 小嵩
8 | */
9 | final class SmoothScrollTimerTask extends TimerTask {
10 |
11 | int realTotalOffset;
12 | int realOffset;
13 | int offset;
14 | final WheelView loopView;
15 |
16 | SmoothScrollTimerTask(WheelView loopview, int offset) {
17 | this.loopView = loopview;
18 | this.offset = offset;
19 | realTotalOffset = Integer.MAX_VALUE;
20 | realOffset = 0;
21 | }
22 |
23 | @Override
24 | public final void run() {
25 | if (realTotalOffset == Integer.MAX_VALUE) {
26 | realTotalOffset = offset;
27 | }
28 | //把要滚动的范围细分成10小份,按10小份单位来重绘
29 | realOffset = (int) ((float) realTotalOffset * 0.1F);
30 |
31 | if (realOffset == 0) {
32 | if (realTotalOffset < 0) {
33 | realOffset = -1;
34 | } else {
35 | realOffset = 1;
36 | }
37 | }
38 |
39 | if (Math.abs(realTotalOffset) <= 1) {
40 | loopView.cancelFuture();
41 | loopView.handler.sendEmptyMessage(MessageHandler.WHAT_ITEM_SELECTED);
42 | } else {
43 | loopView.totalScrollY = loopView.totalScrollY + realOffset;
44 |
45 | //这里如果不是循环模式,则点击空白位置需要回滚,不然就会出现选到-1 item的 情况
46 | if (!loopView.isLoop) {
47 | float itemHeight = loopView.itemHeight;
48 | float top = (float) (-loopView.initPosition) * itemHeight;
49 | float bottom = (float) (loopView.getItemsCount() - 1 - loopView.initPosition) * itemHeight;
50 | if (loopView.totalScrollY <= top||loopView.totalScrollY >= bottom) {
51 | loopView.totalScrollY = loopView.totalScrollY - realOffset;
52 | loopView.cancelFuture();
53 | loopView.handler.sendEmptyMessage(MessageHandler.WHAT_ITEM_SELECTED);
54 | return;
55 | }
56 | }
57 | loopView.handler.sendEmptyMessage(MessageHandler.WHAT_INVALIDATE_LOOP_VIEW);
58 | realTotalOffset = realTotalOffset - realOffset;
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/pickerview_time.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
18 |
19 |
24 |
25 |
31 |
32 |
37 |
38 |
43 |
44 |
49 |
50 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/my_progress_horizontal.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
-
20 |
21 |
22 |
29 |
30 |
31 |
32 | -
33 |
34 |
35 |
36 |
43 |
44 |
45 |
46 |
47 | -
48 |
49 |
50 |
51 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/custom/wheelpicker/InertiaTimerTask.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.custom.wheelpicker;
2 |
3 | import java.util.TimerTask;
4 |
5 | /**
6 | * @TODO<滚动惯性的实现>
7 | * @author 小嵩
8 | */
9 | final class InertiaTimerTask extends TimerTask {
10 |
11 | float a;
12 | final float velocityY;
13 | final WheelView loopView;
14 |
15 | InertiaTimerTask(WheelView loopview, float velocityY) {
16 | super();
17 | loopView = loopview;
18 | this.velocityY = velocityY;
19 | a = Integer.MAX_VALUE;
20 | }
21 |
22 | @Override
23 | public final void run() {
24 | if (a == Integer.MAX_VALUE) {
25 | if (Math.abs(velocityY) > 2000F) {
26 | if (velocityY > 0.0F) {
27 | a = 2000F;
28 | } else {
29 | a = -2000F;
30 | }
31 | } else {
32 | a = velocityY;
33 | }
34 | }
35 | if (Math.abs(a) >= 0.0F && Math.abs(a) <= 20F) {
36 | loopView.cancelFuture();
37 | loopView.handler.sendEmptyMessage(MessageHandler.WHAT_SMOOTH_SCROLL);
38 | return;
39 | }
40 | int i = (int) ((a * 10F) / 1000F);
41 | loopView.totalScrollY = loopView.totalScrollY - i;
42 | if (!loopView.isLoop) {
43 | float itemHeight = loopView.itemHeight;
44 | float top = (-loopView.initPosition) * itemHeight;
45 | float bottom = (loopView.getItemsCount() - 1 - loopView.initPosition) * itemHeight;
46 | if(loopView.totalScrollY - itemHeight*0.25 < top){
47 | top = loopView.totalScrollY + i;
48 | }
49 | else if(loopView.totalScrollY + itemHeight*0.25 > bottom){
50 | bottom = loopView.totalScrollY + i;
51 | }
52 |
53 | if (loopView.totalScrollY <= top){
54 | a = 40F;
55 | loopView.totalScrollY = (int)top;
56 | } else if (loopView.totalScrollY >= bottom) {
57 | loopView.totalScrollY = (int)bottom;
58 | a = -40F;
59 | }
60 | }
61 | if (a < 0.0F) {
62 | a = a + 20F;
63 | } else {
64 | a = a - 20F;
65 | }
66 | loopView.handler.sendEmptyMessage(MessageHandler.WHAT_INVALIDATE_LOOP_VIEW);
67 | }
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_collapse_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
15 |
16 |
25 |
26 |
34 |
35 |
41 |
42 |
43 |
44 |
45 |
46 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/java/com/goldencarp/lingqianbao/view/util/StringUtil.java:
--------------------------------------------------------------------------------
1 | package com.goldencarp.lingqianbao.view.util;
2 |
3 | import java.security.MessageDigest;
4 | import java.text.SimpleDateFormat;
5 | import java.util.Date;
6 | import java.util.Locale;
7 | import java.util.regex.Pattern;
8 |
9 | /**
10 | * Created by sks on 2017/12/2.
11 | *
12 | */
13 |
14 | public class StringUtil {
15 |
16 | private StringUtil(){}
17 | static String getSimpleFormatDate(long timeMills){
18 | Date date = new Date(timeMills);
19 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.CHINA);
20 | return sdf.format(date);
21 | }
22 |
23 | /**
24 | * 验证密码是否为字母数字或特殊符号
25 | */
26 | public static boolean isValidPassword1(String pwd){
27 | return validation("^[\\x21-\\x7e]*$", pwd);
28 | }
29 |
30 |
31 | /**
32 | * 正则校验
33 | *
34 | * @param pattern 正则表达式
35 | * @param str
36 | * 需要校验的字符串
37 | * @return 验证通过返回true
38 | */
39 | private static boolean validation(String pattern, String str) {
40 | return str != null && Pattern.compile(pattern).matcher(str).matches();
41 | }
42 |
43 | //sha1加密
44 | private static final char[] HEX_DIGITS = {'0', '1', '2', '3', '4', '5',
45 | '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
46 |
47 | /**
48 | * Takes the raw bytes from the digest and formats them correct.
49 | *
50 | * @param bytes the raw bytes from the digest.
51 | * @return the formatted bytes.
52 | */
53 | private static String getFormattedText(byte[] bytes) {
54 | int len = bytes.length;
55 | StringBuilder buf = new StringBuilder(len * 2);
56 | // 把密文转换成十六进制的字符串形式
57 | for (int j = 0; j < len; j++) {
58 | buf.append(HEX_DIGITS[(bytes[j] >> 4) & 0x0f]);
59 | buf.append(HEX_DIGITS[bytes[j] & 0x0f]);
60 | }
61 | return buf.toString();
62 | }
63 |
64 | public static String encode(String str) {
65 | if (str == null) {
66 | return null;
67 | }
68 | try {
69 | MessageDigest messageDigest = MessageDigest.getInstance("SHA1");
70 | messageDigest.update(str.getBytes());
71 | return getFormattedText(messageDigest.digest());
72 | } catch (Exception e) {
73 | throw new RuntimeException(e);
74 | }
75 | }
76 |
77 | }
78 |
--------------------------------------------------------------------------------