├── example
├── .gitignore
├── src
│ └── main
│ │ ├── res
│ │ ├── raw
│ │ │ └── test
│ │ ├── values
│ │ │ ├── strings.xml
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── xdy_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ └── layout
│ │ │ ├── activity_main.xml
│ │ │ └── delegate_example.xml
│ │ ├── assets
│ │ ├── second.html
│ │ ├── js
│ │ │ └── index.js
│ │ └── index2.html
│ │ └── java
│ │ └── com
│ │ └── wuchao
│ │ └── fastec
│ │ └── example
│ │ ├── generators
│ │ ├── WeChatEntry.java
│ │ ├── AppRegister.java
│ │ └── WeChatPayEntry.java
│ │ ├── event
│ │ ├── shareEvent.java
│ │ └── TestEvent.java
│ │ └── ExampleDelegate.java
├── proguard-rules.pro
└── build.gradle
├── latte-core
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── dimen.xml
│ │ │ │ ├── ids.xml
│ │ │ │ ├── attrs.xml
│ │ │ │ └── style.xml
│ │ │ ├── drawable
│ │ │ │ ├── btn_border.xml
│ │ │ │ ├── border_text.xml
│ │ │ │ ├── dot_focus.xml
│ │ │ │ ├── dot_normal.xml
│ │ │ │ ├── btn_border_nativephoto.xml
│ │ │ │ └── btn_border_takephoto.xml
│ │ │ ├── layout
│ │ │ │ ├── item_multiple_banner.xml
│ │ │ │ ├── item_multiple_image.xml
│ │ │ │ ├── item_multiple_text.xml
│ │ │ │ ├── delegate_bottom.xml
│ │ │ │ ├── bottom_item_icon_text_layout.xml
│ │ │ │ ├── item_multiple_image_text.xml
│ │ │ │ └── dialog_image_click_panel.xml
│ │ │ └── anim
│ │ │ │ ├── push_bottom_in.xml
│ │ │ │ └── push_bottom_out.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── wuchao
│ │ │ │ └── latte
│ │ │ │ ├── net
│ │ │ │ ├── rx
│ │ │ │ │ ├── ApiException.java
│ │ │ │ │ ├── Transformer.java
│ │ │ │ │ └── RxRestService.java
│ │ │ │ ├── callback
│ │ │ │ │ ├── IFailure.java
│ │ │ │ │ ├── IError.java
│ │ │ │ │ ├── ISuccess.java
│ │ │ │ │ ├── IRequest.java
│ │ │ │ │ └── RequestCallbacks.java
│ │ │ │ ├── HttpMethod.java
│ │ │ │ ├── interfaces
│ │ │ │ │ └── ISubscriber.java
│ │ │ │ ├── base
│ │ │ │ │ └── BaseObserver.java
│ │ │ │ ├── interceptors
│ │ │ │ │ ├── InterceptorUtil.java
│ │ │ │ │ ├── AddCookieInterceptor.java
│ │ │ │ │ ├── DebugInterceptor.java
│ │ │ │ │ └── BaseInterceptor.java
│ │ │ │ └── bean
│ │ │ │ │ └── BaseData.java
│ │ │ │ ├── util
│ │ │ │ ├── timer
│ │ │ │ │ ├── ITimerListener.java
│ │ │ │ │ └── BaseTimerTask.java
│ │ │ │ ├── callback
│ │ │ │ │ ├── CallbackType.java
│ │ │ │ │ ├── IGlobalCallback.java
│ │ │ │ │ └── CallbackManager.java
│ │ │ │ ├── dimen
│ │ │ │ │ └── DimenUtil.java
│ │ │ │ └── log
│ │ │ │ │ └── LatteLogger.java
│ │ │ │ ├── ui
│ │ │ │ ├── launcher
│ │ │ │ │ ├── ScrollLauncherTag.java
│ │ │ │ │ ├── LauncherHolderCreator.java
│ │ │ │ │ └── LauncherHolder.java
│ │ │ │ ├── recycler
│ │ │ │ │ ├── MultipleFields.java
│ │ │ │ │ ├── ItemType.java
│ │ │ │ │ ├── RgbValue.java
│ │ │ │ │ ├── MultipleViewHolder.java
│ │ │ │ │ ├── BaseDecoration.java
│ │ │ │ │ ├── DataConverter.java
│ │ │ │ │ ├── DividerLookupImpl.java
│ │ │ │ │ ├── MultipleItemEntityBuilder.java
│ │ │ │ │ └── MultipleItemEntity.java
│ │ │ │ ├── banner
│ │ │ │ │ ├── HolderCreator.java
│ │ │ │ │ ├── BannerCreator.java
│ │ │ │ │ └── ImageHolder.java
│ │ │ │ ├── camera
│ │ │ │ │ ├── RequestCodes.java
│ │ │ │ │ ├── CameraImageBean.java
│ │ │ │ │ └── LatteCamera.java
│ │ │ │ ├── scanner
│ │ │ │ │ ├── LatteViewFinderView.java
│ │ │ │ │ ├── ScanView.java
│ │ │ │ │ └── ScannerDelegate.java
│ │ │ │ ├── loader
│ │ │ │ │ ├── LoaderStyle.java
│ │ │ │ │ └── LoaderCreator.java
│ │ │ │ ├── refresh
│ │ │ │ │ └── PagingBean.java
│ │ │ │ ├── animation
│ │ │ │ │ └── BezierAnimation.java
│ │ │ │ └── widget
│ │ │ │ │ └── CircleTextView.java
│ │ │ │ ├── delegates
│ │ │ │ ├── web
│ │ │ │ │ ├── event
│ │ │ │ │ │ ├── IEvent.java
│ │ │ │ │ │ ├── UndefineEvent.java
│ │ │ │ │ │ ├── EventManager.java
│ │ │ │ │ │ └── Event.java
│ │ │ │ │ ├── route
│ │ │ │ │ │ └── RouteKeys.java
│ │ │ │ │ ├── IWebViewInitializer.java
│ │ │ │ │ ├── chromeclient
│ │ │ │ │ │ └── WebChromeClientImpl.java
│ │ │ │ │ └── LatteWebInterface.java
│ │ │ │ ├── IPageLoadListener.java
│ │ │ │ ├── LatteDelegate.java
│ │ │ │ └── bottom
│ │ │ │ │ ├── BottomTabBean.java
│ │ │ │ │ ├── ItemBuilder.java
│ │ │ │ │ └── BottomItemDelegate.java
│ │ │ │ ├── app
│ │ │ │ ├── IUserChecker.java
│ │ │ │ ├── ConfigKeys.java
│ │ │ │ ├── AccountManager.java
│ │ │ │ └── Latte.java
│ │ │ │ └── wechat
│ │ │ │ ├── callbacks
│ │ │ │ └── IWeChatSignInCallback.java
│ │ │ │ ├── templates
│ │ │ │ ├── AppRegisterTemplate.java
│ │ │ │ ├── WXEntryTemplate.java
│ │ │ │ └── WXPayEntryTemplate.java
│ │ │ │ ├── BaseWXActivity.java
│ │ │ │ ├── BaseWXPayEntryActivity.java
│ │ │ │ └── LatteWeChat.java
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── wuchao
│ │ │ └── latte
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── wuchao
│ │ └── latte
│ │ └── ExampleInstrumentedTest.java
└── proguard-rules.pro
├── latte-ec
├── .gitignore
├── src
│ └── main
│ │ ├── res
│ │ ├── values
│ │ │ ├── strings.xml
│ │ │ ├── style.xml
│ │ │ └── colors.xml
│ │ ├── mipmap-xhdpi
│ │ │ ├── avatar.jpg
│ │ │ ├── ic_launcher.png
│ │ │ ├── launcher_00.jpeg
│ │ │ ├── launcher_01.jpeg
│ │ │ ├── launcher_02.jpeg
│ │ │ ├── launcher_03.jpeg
│ │ │ ├── launcher_04.jpeg
│ │ │ ├── launcher_05.jpeg
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── drawable
│ │ │ ├── border_circle_timer.xml
│ │ │ ├── dot_focus.xml
│ │ │ └── dot_normal.xml
│ │ ├── layout
│ │ │ ├── delegate_image.xml
│ │ │ ├── delegate_list_content.xml
│ │ │ ├── delegate_vertical_list.xml
│ │ │ ├── item_image.xml
│ │ │ ├── stub_shop_cart_no_item.xml
│ │ │ ├── delegate_user_profile.xml
│ │ │ ├── delegate_launcher.xml
│ │ │ ├── arrow_switch_layout.xml
│ │ │ ├── item_search.xml
│ │ │ ├── item_section_content.xml
│ │ │ ├── arrow_item_avatar.xml
│ │ │ ├── delegate_settings.xml
│ │ │ ├── item_vertical_menu_list.xml
│ │ │ ├── delegate_about.xml
│ │ │ ├── delegate_discover.xml
│ │ │ ├── item_section_header.xml
│ │ │ ├── arrow_item_layout.xml
│ │ │ ├── delegate_order_list.xml
│ │ │ ├── delegate_address.xml
│ │ │ ├── delegate_sort.xml
│ │ │ ├── dialog_pay_panel.xml
│ │ │ ├── delegate_name.xml
│ │ │ └── delegate_goods_info.xml
│ │ └── anim
│ │ │ ├── push_bottom_in.xml
│ │ │ └── push_bottom_out.xml
│ │ ├── assets
│ │ └── iconfont.ttf
│ │ ├── java
│ │ └── com
│ │ │ └── wuchao
│ │ │ └── latte
│ │ │ └── ec
│ │ │ ├── launcher
│ │ │ ├── OnLauncherFinishTag.java
│ │ │ └── ILauncherListener.java
│ │ │ ├── main
│ │ │ ├── cart
│ │ │ │ ├── ShopCartItemType.java
│ │ │ │ ├── ICartItemListener.java
│ │ │ │ ├── ShopCartItemFields.java
│ │ │ │ └── shopCartDataConvert.java
│ │ │ ├── personal
│ │ │ │ ├── order
│ │ │ │ │ ├── OrderItemFields.java
│ │ │ │ │ ├── OrderListItemType.java
│ │ │ │ │ ├── OrderListClickListener.java
│ │ │ │ │ ├── OrderListDataConverter.java
│ │ │ │ │ └── OrderCommentDelegate.java
│ │ │ │ ├── address
│ │ │ │ │ ├── AddressItemFields.java
│ │ │ │ │ ├── AddressItemType.java
│ │ │ │ │ └── AddressDataConverter.java
│ │ │ │ ├── profile
│ │ │ │ │ └── UploadConfig.java
│ │ │ │ ├── list
│ │ │ │ │ └── ListItemType.java
│ │ │ │ ├── settings
│ │ │ │ │ ├── NameDelegate.java
│ │ │ │ │ ├── SettingsClickListener.java
│ │ │ │ │ └── AboutDelegate.java
│ │ │ │ └── PersonalClickListener.java
│ │ │ ├── index
│ │ │ │ ├── search
│ │ │ │ │ ├── SearchItemType.java
│ │ │ │ │ ├── SearchAdapter.java
│ │ │ │ │ └── SearchDataConverter.java
│ │ │ │ └── IndexItemClickListener.java
│ │ │ ├── sort
│ │ │ │ ├── content
│ │ │ │ │ ├── SectionContentItemEntity.java
│ │ │ │ │ ├── SectionBean.java
│ │ │ │ │ ├── SectionAdapter.java
│ │ │ │ │ └── SectionDataConvert.java
│ │ │ │ ├── SortDelegate.java
│ │ │ │ └── list
│ │ │ │ │ └── VerticalListDataConvert.java
│ │ │ ├── discover
│ │ │ │ └── DiscoverDelegate.java
│ │ │ └── EcBottomDelegate.java
│ │ │ ├── sign
│ │ │ ├── ISignListener.java
│ │ │ └── SignHandler.java
│ │ │ ├── pay
│ │ │ ├── IAlPayResultListener.java
│ │ │ └── PayResult.java
│ │ │ ├── icon
│ │ │ ├── FontEcModule.java
│ │ │ └── EcIcons.java
│ │ │ ├── detail
│ │ │ ├── ScaleUpAnimator.java
│ │ │ ├── RecyclerImageAdapter.java
│ │ │ ├── TabPagerAdapter.java
│ │ │ └── GoodsInfoDelegate.java
│ │ │ └── database
│ │ │ ├── ReleaseOpenHelper.java
│ │ │ ├── DatabaseManager.java
│ │ │ └── UserProfile.java
│ │ └── AndroidManifest.xml
├── libs
│ └── alipaySdk-20170922.jar
├── build.gradle
└── proguard-rules.pro
├── .gitignore
├── images
└── preview.gif
├── settings.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── latte-annotations
├── build.gradle
└── src
│ └── main
│ └── java
│ └── com
│ └── wuchao
│ └── latte
│ └── annotations
│ ├── PayEntryGenerator.java
│ ├── AppRegisterGenerator.java
│ └── EntryGenerator.java
├── latte-compiler
├── build.gradle
└── src
│ └── main
│ └── java
│ └── com
│ └── wuchao
│ └── latte
│ └── compiler
│ ├── EntryVisitor.java
│ ├── PayEntryVisitor.java
│ └── AppRegisterVisitor.java
├── gradle.properties
└── README.md
/example/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/latte-core/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/latte-ec/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/example/src/main/res/raw/test:
--------------------------------------------------------------------------------
1 | {
2 | "key":"value"
3 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | .idea
4 | .DS_Store
5 | build
6 | local.properties
7 |
--------------------------------------------------------------------------------
/images/preview.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/images/preview.gif
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':example', ':latte-annotations', ':latte-compiler', ':latte-core', ':latte-ec'
2 |
--------------------------------------------------------------------------------
/example/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 电商
3 |
4 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/latte-core/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Latte
3 |
4 |
--------------------------------------------------------------------------------
/latte-ec/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | LatteEc
3 |
4 |
--------------------------------------------------------------------------------
/latte-ec/libs/alipaySdk-20170922.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/latte-ec/libs/alipaySdk-20170922.jar
--------------------------------------------------------------------------------
/latte-ec/src/main/assets/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/latte-ec/src/main/assets/iconfont.ttf
--------------------------------------------------------------------------------
/latte-ec/src/main/res/mipmap-xhdpi/avatar.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/latte-ec/src/main/res/mipmap-xhdpi/avatar.jpg
--------------------------------------------------------------------------------
/example/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/example/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/example/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/example/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/example/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/latte-ec/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/latte-ec/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/latte-ec/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/latte-ec/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/latte-ec/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/latte-ec/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/src/main/res/mipmap-xxhdpi/xdy_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/example/src/main/res/mipmap-xxhdpi/xdy_launcher.png
--------------------------------------------------------------------------------
/example/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/example/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/latte-core/src/main/res/values/dimen.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 12dp
4 |
--------------------------------------------------------------------------------
/latte-ec/src/main/res/mipmap-xhdpi/launcher_00.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/latte-ec/src/main/res/mipmap-xhdpi/launcher_00.jpeg
--------------------------------------------------------------------------------
/latte-ec/src/main/res/mipmap-xhdpi/launcher_01.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/latte-ec/src/main/res/mipmap-xhdpi/launcher_01.jpeg
--------------------------------------------------------------------------------
/latte-ec/src/main/res/mipmap-xhdpi/launcher_02.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/latte-ec/src/main/res/mipmap-xhdpi/launcher_02.jpeg
--------------------------------------------------------------------------------
/latte-ec/src/main/res/mipmap-xhdpi/launcher_03.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/latte-ec/src/main/res/mipmap-xhdpi/launcher_03.jpeg
--------------------------------------------------------------------------------
/latte-ec/src/main/res/mipmap-xhdpi/launcher_04.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/latte-ec/src/main/res/mipmap-xhdpi/launcher_04.jpeg
--------------------------------------------------------------------------------
/latte-ec/src/main/res/mipmap-xhdpi/launcher_05.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/latte-ec/src/main/res/mipmap-xhdpi/launcher_05.jpeg
--------------------------------------------------------------------------------
/latte-ec/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/latte-ec/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/latte-ec/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/latte-ec/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/example/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/example/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/example/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/latte-ec/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/latte-ec/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/latte-ec/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/latte-ec/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/example/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/example/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/latte-ec/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/latte-ec/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/latte-ec/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/latte-ec/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/latte-ec/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuchao226/FastEC/HEAD/latte-ec/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/latte-annotations/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'java'
2 |
3 | dependencies {
4 | compile fileTree(dir: 'libs', include: ['*.jar'])
5 | }
6 |
7 | sourceCompatibility = "1.7"
8 | targetCompatibility = "1.7"
9 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/net/rx/ApiException.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.net.rx;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2018/1/22 16:58
6 | * @desciption:
7 | */
8 |
9 | public class ApiException {
10 | }
11 |
--------------------------------------------------------------------------------
/latte-core/src/main/res/drawable/btn_border.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/example/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/latte-ec/src/main/res/drawable/border_circle_timer.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/net/callback/IFailure.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.net.callback;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/10/23 23:09
6 | * @desciption:
7 | */
8 |
9 | public interface IFailure {
10 |
11 | void onFailure();
12 | }
13 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/util/timer/ITimerListener.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.util.timer;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/11/15 21:32
6 | * @desciption:
7 | */
8 |
9 | public interface ITimerListener {
10 | void onTimer();
11 | }
12 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu May 31 11:40:30 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 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/ui/launcher/ScrollLauncherTag.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ui.launcher;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/11/16 22:15
6 | * @desciption:
7 | */
8 |
9 | public enum ScrollLauncherTag {
10 | HAS_FIRST_LAUNCHER_APP
11 | }
12 |
--------------------------------------------------------------------------------
/latte-core/src/main/res/values/ids.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/net/callback/IError.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.net.callback;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/10/23 23:08
6 | * @desciption:
7 | */
8 |
9 | public interface IError {
10 |
11 | void onError(int code, String msg);
12 | }
13 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/net/callback/ISuccess.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.net.callback;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/10/23 23:08
6 | * @desciption:
7 | */
8 |
9 | public interface ISuccess {
10 |
11 | void onSuccess(String response);
12 | }
13 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/delegates/web/event/IEvent.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.delegates.web.event;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/11/29 22:22
6 | * @desciption:
7 | */
8 |
9 | public interface IEvent {
10 | String execute(String params);
11 | }
12 |
--------------------------------------------------------------------------------
/latte-ec/src/main/java/com/wuchao/latte/ec/launcher/OnLauncherFinishTag.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ec.launcher;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/11/28 11:03
6 | * @desciption:
7 | */
8 |
9 | public enum OnLauncherFinishTag {
10 | SIGNED,
11 | NOT_SIGNED
12 | }
13 |
--------------------------------------------------------------------------------
/latte-ec/src/main/java/com/wuchao/latte/ec/main/cart/ShopCartItemType.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ec.main.cart;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/12/24 00:10
6 | * @desciption:
7 | */
8 |
9 | class ShopCartItemType {
10 | static final int SHOP_CART_ITEM = 6;
11 | }
12 |
--------------------------------------------------------------------------------
/latte-ec/src/main/java/com/wuchao/latte/ec/main/personal/order/OrderItemFields.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ec.main.personal.order;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2018/1/2 22:47
6 | * @desciption:
7 | */
8 |
9 | public enum OrderItemFields {
10 | PRICE,
11 | TIME
12 | }
13 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/app/IUserChecker.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.app;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/11/27 18:58
6 | * @desciption: 用户信息
7 | */
8 |
9 | public interface IUserChecker {
10 |
11 | void onSignIn();
12 |
13 | void onNotSignIn();
14 | }
15 |
--------------------------------------------------------------------------------
/latte-ec/src/main/java/com/wuchao/latte/ec/main/index/search/SearchItemType.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ec.main.index.search;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2018/1/16 22:24
6 | * @desciption:
7 | */
8 |
9 | public class SearchItemType {
10 | static final int ITEM_SEARCH = 50;
11 | }
12 |
--------------------------------------------------------------------------------
/latte-ec/src/main/java/com/wuchao/latte/ec/main/personal/address/AddressItemFields.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ec.main.personal.address;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2018/1/7 19:20
6 | * @desciption:
7 | */
8 |
9 | public enum AddressItemFields {
10 | PHONE,
11 | ADDRESS
12 | }
13 |
--------------------------------------------------------------------------------
/latte-ec/src/main/java/com/wuchao/latte/ec/main/cart/ICartItemListener.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ec.main.cart;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/12/24 21:56
6 | * @desciption:
7 | */
8 |
9 | public interface ICartItemListener {
10 |
11 | void onItemClick(double itemTotalPrice);
12 | }
13 |
--------------------------------------------------------------------------------
/latte-ec/src/main/res/layout/delegate_image.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/delegates/web/route/RouteKeys.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.delegates.web.route;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/11/28 22:56
6 | * @desciption:
7 | */
8 |
9 | public enum RouteKeys {
10 | /**
11 | * web页面跳转必须传递的参数
12 | */
13 | URL
14 | }
15 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/net/callback/IRequest.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.net.callback;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/10/23 23:09
6 | * @desciption:
7 | */
8 |
9 | public interface IRequest {
10 |
11 | void onRequestStart();
12 |
13 | void onRequestEnd();
14 | }
15 |
--------------------------------------------------------------------------------
/latte-core/src/main/res/drawable/border_text.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
--------------------------------------------------------------------------------
/latte-ec/src/main/java/com/wuchao/latte/ec/launcher/ILauncherListener.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ec.launcher;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/11/28 11:04
6 | * @desciption:
7 | */
8 |
9 | public interface ILauncherListener {
10 |
11 | void onLauncherFinish(OnLauncherFinishTag tag);
12 | }
13 |
--------------------------------------------------------------------------------
/latte-ec/src/main/java/com/wuchao/latte/ec/main/personal/address/AddressItemType.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ec.main.personal.address;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2018/1/7 19:21
6 | * @desciption:
7 | */
8 |
9 | public class AddressItemType {
10 | static final int ITEM_ADDRESS = 40;
11 | }
12 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/delegates/IPageLoadListener.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.delegates;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/12/23 17:59
6 | * @desciption:
7 | */
8 |
9 | public interface IPageLoadListener {
10 |
11 | void onLoadStart();
12 |
13 | void onLoadEnd();
14 | }
15 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/wechat/callbacks/IWeChatSignInCallback.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.wechat.callbacks;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/12/29 21:15
6 | * @desciption:
7 | */
8 |
9 | public interface IWeChatSignInCallback {
10 | void onSignInSuccess(String userInfo);
11 | }
12 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/util/callback/CallbackType.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.util.callback;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2018/1/7 17:02
6 | * @desciption:
7 | */
8 |
9 | public enum CallbackType {
10 | ON_CROP,
11 | TAG_OPEN_PUSH,
12 | TAG_STOP_PUSH,
13 | ON_SCAN
14 | }
15 |
--------------------------------------------------------------------------------
/latte-core/src/main/res/layout/item_multiple_banner.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/latte-ec/src/main/java/com/wuchao/latte/ec/main/personal/order/OrderListItemType.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ec.main.personal.order;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2018/1/2 22:46
6 | * @desciption:
7 | */
8 |
9 | public class OrderListItemType {
10 | public static final int ITEM_ORDER_LIST = 30;
11 | }
12 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/net/HttpMethod.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.net;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/10/23 22:51
6 | * @desciption:
7 | */
8 |
9 | public enum HttpMethod {
10 | GET,
11 | POST,
12 | POST_RAW,
13 | PUT,
14 | PUT_RAW,
15 | DELETE,
16 | UPLOAD
17 | }
18 |
--------------------------------------------------------------------------------
/latte-ec/src/main/java/com/wuchao/latte/ec/sign/ISignListener.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ec.sign;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/11/27 19:04
6 | * @desciption:
7 | */
8 |
9 | public interface ISignListener {
10 | //登录成功
11 | void onSignInSuccess();
12 |
13 | //注册成功
14 | void onSignUpSuccess();
15 | }
16 |
--------------------------------------------------------------------------------
/latte-ec/src/main/java/com/wuchao/latte/ec/main/cart/ShopCartItemFields.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ec.main.cart;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/12/24 00:10
6 | * @desciption:
7 | */
8 |
9 | public enum ShopCartItemFields {
10 | TITLE,
11 | DESC,
12 | COUNT,
13 | PRICE,
14 | IS_SELECTED,
15 | POSITION
16 | }
17 |
--------------------------------------------------------------------------------
/latte-ec/src/main/res/drawable/dot_focus.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
10 |
--------------------------------------------------------------------------------
/latte-ec/src/main/res/drawable/dot_normal.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
10 |
--------------------------------------------------------------------------------
/latte-ec/src/main/res/values/style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
--------------------------------------------------------------------------------
/latte-core/src/main/res/drawable/dot_focus.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
10 |
--------------------------------------------------------------------------------
/latte-core/src/main/res/drawable/dot_normal.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
10 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/util/callback/IGlobalCallback.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.util.callback;
2 |
3 | import android.support.annotation.NonNull;
4 |
5 | /**
6 | * @author: wuchao
7 | * @date: 2018/1/7 16:57
8 | * @desciption:
9 | */
10 |
11 | public interface IGlobalCallback {
12 |
13 | void executeCallback(@NonNull T args);
14 | }
15 |
--------------------------------------------------------------------------------
/latte-ec/src/main/res/layout/delegate_list_content.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/latte-ec/src/main/res/layout/delegate_vertical_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/latte-ec/src/main/res/layout/item_image.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/latte-ec/src/main/java/com/wuchao/latte/ec/main/personal/profile/UploadConfig.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ec.main.personal.profile;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2018/1/7 17:06
6 | * @desciption:
7 | */
8 |
9 | public class UploadConfig {
10 | public static final String API_HOST = "你的服务器域名";
11 | public static final String UPLOAD_IMG = API_HOST + "你的上传地址";
12 | }
13 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/ui/recycler/MultipleFields.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ui.recycler;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/12/6 21:59
6 | * @desciption:
7 | */
8 |
9 | public enum MultipleFields {
10 | ITEM_TYPE,
11 | TITLE,
12 | TEXT,
13 | IMAGE_URL,
14 | BANNERS,
15 | SPAN_SIZE,
16 | ID,
17 | NAME,
18 | TAG
19 | }
20 |
--------------------------------------------------------------------------------
/latte-core/src/main/res/drawable/btn_border_nativephoto.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
--------------------------------------------------------------------------------
/latte-core/src/main/res/drawable/btn_border_takephoto.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
--------------------------------------------------------------------------------
/latte-core/src/main/res/layout/item_multiple_image.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/latte-core/src/main/res/anim/push_bottom_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
12 |
--------------------------------------------------------------------------------
/latte-core/src/main/res/anim/push_bottom_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
12 |
--------------------------------------------------------------------------------
/latte-ec/src/main/res/anim/push_bottom_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
12 |
--------------------------------------------------------------------------------
/latte-ec/src/main/res/anim/push_bottom_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
12 |
--------------------------------------------------------------------------------
/example/src/main/assets/second.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 |
8 | 本地测试2
9 |
10 |
11 |
12 | 这是本地页面2
13 |
14 |
15 |
--------------------------------------------------------------------------------
/latte-compiler/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'java'
2 |
3 | dependencies {
4 | compile fileTree(include: ['*.jar'], dir: 'libs')
5 | implementation project(':latte-annotations')
6 | compile 'com.squareup:javapoet:1.9.0'
7 | compile 'com.google.auto.service:auto-service:1.0-rc4'
8 | compile 'com.google.auto:auto-common:0.9'
9 | }
10 |
11 | sourceCompatibility = "1.7"
12 | targetCompatibility = "1.7"
13 |
--------------------------------------------------------------------------------
/latte-ec/src/main/java/com/wuchao/latte/ec/main/personal/list/ListItemType.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ec.main.personal.list;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2018/1/2 22:40
6 | * @desciption:
7 | */
8 |
9 | public class ListItemType {
10 |
11 | public static final int ITEM_NORMAL = 20;
12 | public static final int ITEM_AVATAR = 21;
13 | public static final int ITEM_SWITCH = 22;
14 | }
15 |
--------------------------------------------------------------------------------
/latte-core/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/latte-ec/src/main/java/com/wuchao/latte/ec/pay/IAlPayResultListener.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ec.pay;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/12/25 22:29
6 | * @desciption:
7 | */
8 |
9 | public interface IAlPayResultListener {
10 |
11 | void onPaySuccess();
12 |
13 | void onPaying();
14 |
15 | void onPayingFail();
16 |
17 | void onPayingCancel();
18 |
19 | void onPayingConnectError();
20 | }
21 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/net/interfaces/ISubscriber.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.net.interfaces;
2 |
3 | import io.reactivex.disposables.Disposable;
4 |
5 | /**
6 | * @author: wuchao
7 | * @date: 2018/2/1 18:50
8 | * @desciption: 定义请求结果处理接口
9 | */
10 |
11 | public interface ISubscriber {
12 | /**
13 | * doOnSubscribe 回调
14 | *
15 | * @param d
16 | */
17 | void doOnSubscribe(Disposable d);
18 | }
19 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/delegates/LatteDelegate.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.delegates;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/10/22 23:01
6 | * @desciption: 正式使用的
7 | */
8 |
9 | public abstract class LatteDelegate extends PermissionCheckerDelegate {
10 |
11 | @SuppressWarnings("unchecked")
12 | public T getParentDelegate() {
13 | return (T) getParentFragment();
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/ui/banner/HolderCreator.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ui.banner;
2 |
3 | import com.bigkoo.convenientbanner.holder.CBViewHolderCreator;
4 |
5 | /**
6 | * @author: wuchao
7 | * @date: 2017/12/10 20:25
8 | * @desciption:
9 | */
10 |
11 | public class HolderCreator implements CBViewHolderCreator{
12 | @Override
13 | public ImageHolder createHolder() {
14 | return new ImageHolder();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/example/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/delegates/web/event/UndefineEvent.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.delegates.web.event;
2 |
3 | import com.wuchao.latte.util.log.LatteLogger;
4 |
5 | /**
6 | * @author: wuchao
7 | * @date: 2017/11/29 22:44
8 | * @desciption:
9 | */
10 |
11 | public class UndefineEvent extends Event {
12 | @Override
13 | public String execute(String params) {
14 | LatteLogger.e("UndefineEvent", params);
15 | return null;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/example/src/main/java/com/wuchao/fastec/example/generators/WeChatEntry.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.fastec.example.generators;
2 |
3 | import com.wuchao.latte.annotations.EntryGenerator;
4 | import com.wuchao.latte.wechat.templates.WXEntryTemplate;
5 |
6 | /**
7 | * @author: wuchao
8 | * @date: 2017/12/27 23:05
9 | * @desciption:
10 | */
11 | @EntryGenerator(packageName = "com.wuchao.fastec.example",
12 | entryTemplate = WXEntryTemplate.class)
13 | public interface WeChatEntry {
14 | }
15 |
--------------------------------------------------------------------------------
/example/src/main/res/layout/delegate_example.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
--------------------------------------------------------------------------------
/latte-ec/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 | #323232
7 | #F1F1F1
8 | @android:color/holo_orange_dark
9 | #1111
10 |
11 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/ui/launcher/LauncherHolderCreator.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ui.launcher;
2 |
3 | import com.bigkoo.convenientbanner.holder.CBViewHolderCreator;
4 |
5 | /**
6 | * @author: wuchao
7 | * @date: 2017/11/15 23:31
8 | * @desciption:
9 | */
10 |
11 | public class LauncherHolderCreator implements CBViewHolderCreator {
12 |
13 | @Override
14 | public LauncherHolder createHolder() {
15 | return new LauncherHolder();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/wechat/templates/AppRegisterTemplate.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.wechat.templates;
2 |
3 | import com.wuchao.latte.activitys.ProxyActivity;
4 | import com.wuchao.latte.delegates.LatteDelegate;
5 |
6 | /**
7 | * @author: wuchao
8 | * @date: 2017/12/27 23:04
9 | * @desciption:
10 | */
11 |
12 | public class AppRegisterTemplate extends ProxyActivity{
13 | @Override
14 | public LatteDelegate setRootDelegate() {
15 | return null;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/example/src/main/java/com/wuchao/fastec/example/event/shareEvent.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.fastec.example.event;
2 |
3 | import com.blankj.utilcode.util.ToastUtils;
4 | import com.wuchao.latte.delegates.web.event.Event;
5 |
6 | /**
7 | * @author: wuchao
8 | * @date: 2018/1/18 16:48
9 | * @desciption:
10 | */
11 |
12 | public class shareEvent extends Event {
13 | @Override
14 | public String execute(String params) {
15 | ToastUtils.showLong("分享");
16 | return null;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/example/src/main/java/com/wuchao/fastec/example/generators/AppRegister.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.fastec.example.generators;
2 |
3 | import com.wuchao.latte.annotations.AppRegisterGenerator;
4 | import com.wuchao.latte.wechat.templates.AppRegisterTemplate;
5 |
6 | /**
7 | * @author: wuchao
8 | * @date: 2017/12/27 23:05
9 | * @desciption:
10 | */
11 | @AppRegisterGenerator(packageName = "com.wuchao.fastec.example",
12 | registerTemplate = AppRegisterTemplate.class)
13 | public interface AppRegister {
14 | }
15 |
--------------------------------------------------------------------------------
/example/src/main/java/com/wuchao/fastec/example/generators/WeChatPayEntry.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.fastec.example.generators;
2 |
3 | import com.wuchao.latte.annotations.PayEntryGenerator;
4 | import com.wuchao.latte.wechat.templates.WXPayEntryTemplate;
5 |
6 | /**
7 | * @author: wuchao
8 | * @date: 2017/12/27 23:05
9 | * @desciption:
10 | */
11 | @PayEntryGenerator(packageName = "com.wuchao.fastec.example",
12 | payEntryTemplate = WXPayEntryTemplate.class)
13 | public interface WeChatPayEntry {
14 | }
15 |
--------------------------------------------------------------------------------
/latte-core/src/main/res/layout/item_multiple_text.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/latte-core/src/test/java/com/wuchao/latte/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/ui/recycler/ItemType.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ui.recycler;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/12/6 23:16
6 | * @desciption:
7 | */
8 |
9 | public class ItemType {
10 |
11 | public static final int TEXT = 1;
12 | public static final int IMAGE = 2;
13 | public static final int TEXT_IMAGE = 3;
14 | public static final int BANNER = 4;
15 | public static final int VERTICAL_MENU_LIST = 5;
16 | public static final int SINGLE_BIG_IMAGE = 6;
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/delegates/web/IWebViewInitializer.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.delegates.web;
2 |
3 | import android.webkit.WebChromeClient;
4 | import android.webkit.WebView;
5 | import android.webkit.WebViewClient;
6 |
7 | /**
8 | * @author: wuchao
9 | * @date: 2017/11/28 22:49
10 | * @desciption:
11 | */
12 |
13 | public interface IWebViewInitializer {
14 |
15 | WebView initWebView(WebView webView);
16 |
17 | WebViewClient initWebViewClient();
18 |
19 | WebChromeClient initWebChromeClient();
20 | }
21 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/ui/camera/RequestCodes.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ui.camera;
2 |
3 | import com.yalantis.ucrop.UCrop;
4 |
5 | /**
6 | * @author: wuchao
7 | * @date: 2018/1/4 23:18
8 | * @desciption: 请求码存储
9 | */
10 |
11 | public class RequestCodes {
12 |
13 | public static final int TAKE_PHOTO = 4;
14 | public static final int PICK_PHOTO = 5;
15 | public static final int CROP_PHOTO = UCrop.REQUEST_CROP;
16 | public static final int CROP_ERROR = UCrop.RESULT_ERROR;
17 | public static final int SCAN = 7;
18 | }
19 |
--------------------------------------------------------------------------------
/example/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/ui/recycler/RgbValue.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ui.recycler;
2 |
3 | import com.google.auto.value.AutoValue;
4 |
5 | /**
6 | * @author: wuchao
7 | * @date: 2017/12/17 15:16
8 | * @desciption:
9 | */
10 | @AutoValue
11 | public abstract class RgbValue {
12 |
13 | public abstract int red();
14 |
15 | public abstract int green();
16 |
17 | public abstract int blue();
18 |
19 | public static RgbValue create(int red, int green, int blue) {
20 | return new AutoValue_RgbValue(red, green, blue);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/latte-ec/src/main/java/com/wuchao/latte/ec/icon/FontEcModule.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ec.icon;
2 |
3 | import com.joanzapata.iconify.Icon;
4 | import com.joanzapata.iconify.IconFontDescriptor;
5 |
6 | /**
7 | * @author: wuchao
8 | * @date: 2017/10/18 22:44
9 | * @desciption:
10 | */
11 |
12 | public class FontEcModule implements IconFontDescriptor{
13 | @Override
14 | public String ttfFileName() {
15 | return "iconfont.ttf";
16 | }
17 |
18 | @Override
19 | public Icon[] characters() {
20 | return EcIcons.values();
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/ui/recycler/MultipleViewHolder.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ui.recycler;
2 |
3 | import android.view.View;
4 |
5 | import com.chad.library.adapter.base.BaseViewHolder;
6 |
7 | /**
8 | * @author: wuchao
9 | * @date: 2017/12/7 22:58
10 | * @desciption:
11 | */
12 |
13 | public class MultipleViewHolder extends BaseViewHolder {
14 |
15 | public MultipleViewHolder(View view) {
16 | super(view);
17 | }
18 |
19 | public static MultipleViewHolder create(View view) {
20 | return new MultipleViewHolder(view);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/delegates/web/chromeclient/WebChromeClientImpl.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.delegates.web.chromeclient;
2 |
3 | import android.webkit.JsResult;
4 | import android.webkit.WebChromeClient;
5 | import android.webkit.WebView;
6 |
7 | /**
8 | * @author: wuchao
9 | * @date: 2017/11/29 21:58
10 | * @desciption:
11 | */
12 |
13 | public class WebChromeClientImpl extends WebChromeClient {
14 |
15 | @Override
16 | public boolean onJsAlert(WebView view, String url, String message, JsResult result) {
17 | return super.onJsAlert(view, url, message, result);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/app/ConfigKeys.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.app;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/10/16 22:40
6 | * @desciption: 唯一的单例,只初始化一次,进行多线程操作时,通过枚举安全的惰性单例初始化,即线程安全的懒汉模式
7 | */
8 |
9 | public enum ConfigKeys {
10 | API_HOST, //配置网络请求域名
11 | APPLICATION_CONTEXT, //全局上下文
12 | APPLICATION, //全局上下文
13 | CONFIG_READY, //控制我的初始化或配置是否完成
14 | ICON, //存储自己初始化的项目
15 | INTERCEPTOR,
16 | WE_CHAT_APP_ID,
17 | WE_CHAT_APP_SECRET,
18 | JAVASCRIPT_INTERFACE,
19 | ACTIVITY,
20 | HANDLER,
21 | WEB_HOST,
22 | }
23 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/util/timer/BaseTimerTask.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.util.timer;
2 |
3 | import java.util.TimerTask;
4 |
5 | /**
6 | * @author: wuchao
7 | * @date: 2017/11/14 22:29
8 | * @desciption:
9 | */
10 |
11 | public class BaseTimerTask extends TimerTask {
12 |
13 | private ITimerListener mITimerListener;
14 |
15 | public BaseTimerTask(ITimerListener timerListener) {
16 | mITimerListener = timerListener;
17 | }
18 |
19 | @Override
20 | public void run() {
21 | if (mITimerListener != null) {
22 | mITimerListener.onTimer();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/delegates/bottom/BottomTabBean.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.delegates.bottom;
2 |
3 | /**
4 | * @author: wuchao
5 | * @date: 2017/12/2 18:15
6 | * @desciption:
7 | */
8 |
9 | public class BottomTabBean {
10 |
11 | private final CharSequence ICON;
12 | private final CharSequence TITLE;
13 |
14 | public BottomTabBean(CharSequence icon, CharSequence title) {
15 | this.ICON = icon;
16 | this.TITLE = title;
17 | }
18 |
19 | public CharSequence getIcon() {
20 | return ICON;
21 | }
22 |
23 | public CharSequence getTitle() {
24 | return TITLE;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/latte-annotations/src/main/java/com/wuchao/latte/annotations/PayEntryGenerator.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.annotations;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | /**
9 | * @author: wuchao
10 | * @date: 2017/12/26 22:56
11 | * @desciption:
12 | */
13 |
14 | @Target(ElementType.TYPE)//告诉编译器注解是用在类上面的,不是方法和属性
15 | @Retention(RetentionPolicy.SOURCE)//编译器处理注解时是在源码阶段处理的,
16 | // 即打包成apk或者运行时不再使用了,对性能没有影响
17 | public @interface PayEntryGenerator {
18 |
19 | String packageName();
20 |
21 | Class> payEntryTemplate();
22 | }
23 |
--------------------------------------------------------------------------------
/latte-annotations/src/main/java/com/wuchao/latte/annotations/AppRegisterGenerator.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.annotations;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | /**
9 | * @author: wuchao
10 | * @date: 2017/12/26 22:58
11 | * @desciption:
12 | */
13 |
14 | @Target(ElementType.TYPE)//告诉编译器注解是用在类上面的,不是方法和属性
15 | @Retention(RetentionPolicy.SOURCE)//编译器处理注解时是在源码阶段处理的,
16 | // 即打包成apk或者运行时不再使用了,对性能没有影响
17 | public @interface AppRegisterGenerator {
18 |
19 | String packageName();
20 |
21 | Class> registerTemplate();
22 | }
23 |
--------------------------------------------------------------------------------
/example/src/main/assets/js/index.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 | $('.share').click(function () {
3 | var json = {
4 | action: "share",
5 | params: {
6 | imageUrl:"http://i9.qhimg.com/t017d891ca365ef60b5.jpg",
7 | url:"https://www.baidu.com",
8 | title:"标题",
9 | text:"描述"
10 | }
11 | };
12 |
13 | latte.event(JSON.stringify(json));
14 |
15 | });
16 |
17 | $('.comment').click(function () {
18 |
19 | var json = {
20 | action: "comment"
21 | };
22 |
23 | latte.event(JSON.stringify(json));
24 |
25 | });
26 | });
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/ui/recycler/BaseDecoration.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ui.recycler;
2 |
3 | import android.support.annotation.ColorInt;
4 |
5 | import com.choices.divider.DividerItemDecoration;
6 |
7 | /**
8 | * @author: wuchao
9 | * @date: 2017/12/10 22:33
10 | * @desciption:
11 | */
12 |
13 | public class BaseDecoration extends DividerItemDecoration {
14 |
15 | private BaseDecoration(@ColorInt int color, int size) {
16 | setDividerLookup(new DividerLookupImpl(color, size));
17 | }
18 |
19 | public static BaseDecoration create(@ColorInt int color, int size) {
20 | return new BaseDecoration(color, size);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/latte-ec/src/main/java/com/wuchao/latte/ec/icon/EcIcons.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ec.icon;
2 |
3 | import com.joanzapata.iconify.Icon;
4 |
5 | /**
6 | * @author: wuchao
7 | * @date: 2017/10/18 22:53
8 | * @desciption:
9 | */
10 |
11 | public enum EcIcons implements Icon {
12 | icon_scan('\ue602'),
13 | icon_ali_pay('\ue606');
14 |
15 | private char character;
16 |
17 | EcIcons(char character) {
18 | this.character = character;
19 | }
20 |
21 | @Override
22 | public String key() {
23 | return name().replace('_', '-');
24 | }
25 |
26 | @Override
27 | public char character() {
28 | return character;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/net/base/BaseObserver.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.net.base;
2 |
3 | import io.reactivex.Observer;
4 | import io.reactivex.disposables.Disposable;
5 |
6 | /**
7 | * @author: wuchao
8 | * @date: 2018/2/1 18:47
9 | * @desciption: 基类BaseObserver
10 | */
11 |
12 | public abstract class BaseObserver implements Observer {
13 |
14 | @Override
15 | public void onSubscribe(Disposable d) {
16 |
17 | }
18 |
19 | @Override
20 | public void onNext(T t) {
21 |
22 | }
23 |
24 | @Override
25 | public void onError(Throwable e) {
26 |
27 | }
28 |
29 | @Override
30 | public void onComplete() {
31 |
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/latte-annotations/src/main/java/com/wuchao/latte/annotations/EntryGenerator.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.annotations;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | /**
9 | * @author: wuchao
10 | * @date: 2017/12/26 22:51
11 | * @desciption: 用来传入包名,微信需要的模板代码也就是绕过微信的限制,不需要在主程序里写
12 | */
13 |
14 | @Target(ElementType.TYPE)//告诉编译器注解是用在类上面的,不是方法和属性
15 | @Retention(RetentionPolicy.SOURCE)//编译器处理注解时是在源码阶段处理的,
16 | // 即打包成apk或者运行时不再使用了,对性能没有影响
17 | public @interface EntryGenerator {
18 |
19 | String packageName();
20 |
21 | Class> entryTemplate();
22 | }
23 |
--------------------------------------------------------------------------------
/latte-ec/src/main/java/com/wuchao/latte/ec/detail/ScaleUpAnimator.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ec.detail;
2 |
3 | import android.animation.ObjectAnimator;
4 | import android.view.View;
5 |
6 | import com.daimajia.androidanimations.library.BaseViewAnimator;
7 |
8 | /**
9 | * @author: wuchao
10 | * @date: 2018/1/20 22:07
11 | * @desciption:
12 | */
13 |
14 | public class ScaleUpAnimator extends BaseViewAnimator {
15 |
16 | @Override
17 | protected void prepare(View target) {
18 | getAnimatorAgent().playTogether(
19 | ObjectAnimator.ofFloat(target, "scaleX", 0.8f, 1f, 1.4f, 1.2f, 1),
20 | ObjectAnimator.ofFloat(target, "scaleY", 0.8f, 1f, 1.4f, 1.2f, 1));
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/ui/camera/CameraImageBean.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ui.camera;
2 |
3 | import android.net.Uri;
4 |
5 | /**
6 | * @author: wuchao
7 | * @date: 2018/1/4 23:18
8 | * @desciption: 存储一些中间值
9 | */
10 |
11 | public class CameraImageBean {
12 |
13 | private Uri mPath = null;
14 |
15 | private static final class Holder {
16 | private static final CameraImageBean INSTANCE = new CameraImageBean();
17 | }
18 |
19 | public static CameraImageBean getInstance() {
20 | return Holder.INSTANCE;
21 | }
22 |
23 | public Uri getPath() {
24 | return mPath;
25 | }
26 |
27 | public void setPath(Uri path) {
28 | mPath = path;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/latte-ec/src/main/java/com/wuchao/latte/ec/main/personal/settings/NameDelegate.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ec.main.personal.settings;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.Nullable;
5 | import android.view.View;
6 |
7 | import com.wuchao.ec.R;
8 | import com.wuchao.latte.delegates.LatteDelegate;
9 |
10 | /**
11 | * @author: wuchao
12 | * @date: 2018/1/4 22:34
13 | * @desciption:
14 | */
15 |
16 | public class NameDelegate extends LatteDelegate {
17 |
18 | @Override
19 | public Object setLayout() {
20 | return R.layout.delegate_name;
21 | }
22 |
23 | @Override
24 | public void onBindView(@Nullable Bundle savedInstanceState, View rootView) {
25 |
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/ui/camera/LatteCamera.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ui.camera;
2 |
3 | import android.net.Uri;
4 |
5 | import com.wuchao.latte.delegates.PermissionCheckerDelegate;
6 | import com.wuchao.latte.util.file.FileUtil;
7 |
8 | /**
9 | * @author: wuchao
10 | * @date: 2018/1/4 23:17
11 | * @desciption: 照相机调用类
12 | */
13 |
14 | public class LatteCamera {
15 |
16 | public static Uri createCropFile() {
17 | return Uri.parse(FileUtil.createFile("crop_image",
18 | FileUtil.getFileNameByTime("IMG", "jpg")).getPath());
19 | }
20 |
21 | public static void start(PermissionCheckerDelegate delegate) {
22 | new CameraHandler(delegate).beginCameraDialog();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/wechat/templates/WXEntryTemplate.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.wechat.templates;
2 |
3 | import com.wuchao.latte.wechat.BaseWXEntryActivity;
4 | import com.wuchao.latte.wechat.LatteWeChat;
5 |
6 | /**
7 | * @author: wuchao
8 | * @date: 2017/12/27 23:03
9 | * @desciption:
10 | */
11 |
12 | public class WXEntryTemplate extends BaseWXEntryActivity {
13 |
14 | @Override
15 | protected void onResume() {
16 | super.onResume();
17 | finish();
18 | overridePendingTransition(0, 0);
19 | }
20 |
21 | @Override
22 | protected void onSignInSuccess(String userInfo) {
23 | LatteWeChat.getInstance().getSignInCallback().onSignInSuccess(userInfo);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/example/src/main/assets/index2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 |
8 | 本地测试
9 |
10 |
11 | 这是本地页面1
12 |
13 |
24 |
25 |
--------------------------------------------------------------------------------
/latte-ec/src/main/res/layout/stub_shop_cart_no_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
18 |
19 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/ui/scanner/LatteViewFinderView.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ui.scanner;
2 |
3 | import android.content.Context;
4 | import android.graphics.Color;
5 | import android.util.AttributeSet;
6 |
7 | import me.dm7.barcodescanner.core.ViewFinderView;
8 |
9 | /**
10 | * @author: wuchao
11 | * @date: 2018/1/11 22:43
12 | * @desciption:
13 | */
14 |
15 | public class LatteViewFinderView extends ViewFinderView {
16 |
17 | public LatteViewFinderView(Context context) {
18 | this(context, null);
19 | }
20 |
21 | public LatteViewFinderView(Context context, AttributeSet attributeSet) {
22 | super(context, attributeSet);
23 | mSquareViewFinder = true;
24 | mBorderPaint.setColor(Color.YELLOW);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/net/interceptors/InterceptorUtil.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.net.interceptors;
2 |
3 | import com.wuchao.latte.util.log.LatteLogger;
4 |
5 | import okhttp3.logging.HttpLoggingInterceptor;
6 |
7 | /**
8 | * @author: wuchao
9 | * @date: 2018/1/31 18:22
10 | * @desciption: 拦截器工具类!
11 | */
12 |
13 | public class InterceptorUtil {
14 | private static String TAG = "RetrofitLog";
15 |
16 | //日志拦截器
17 | public static HttpLoggingInterceptor LoggingInterceptor() {
18 | return new HttpLoggingInterceptor(new HttpLoggingInterceptor.Logger() {
19 | @Override
20 | public void log(String message) {
21 | LatteLogger.i(TAG, message);
22 | }
23 | }).setLevel(HttpLoggingInterceptor.Level.BODY);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/latte-ec/src/main/java/com/wuchao/latte/ec/database/ReleaseOpenHelper.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ec.database;
2 |
3 | import android.content.Context;
4 | import android.database.sqlite.SQLiteDatabase;
5 |
6 | import org.greenrobot.greendao.database.Database;
7 |
8 | /**
9 | * @author: wuchao
10 | * @date: 2017/11/26 22:22
11 | * @desciption:
12 | */
13 |
14 | public class ReleaseOpenHelper extends DaoMaster.OpenHelper {
15 |
16 | public ReleaseOpenHelper(Context context, String name) {
17 | super(context, name);
18 | }
19 |
20 | public ReleaseOpenHelper(Context context, String name, SQLiteDatabase.CursorFactory factory) {
21 | super(context, name, factory);
22 | }
23 |
24 | @Override
25 | public void onCreate(Database db) {
26 | super.onCreate(db);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/ui/scanner/ScanView.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ui.scanner;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 |
6 | import me.dm7.barcodescanner.core.IViewFinder;
7 | import me.dm7.barcodescanner.zbar.ZBarScannerView;
8 |
9 | /**
10 | * @author: wuchao
11 | * @date: 2018/1/11 21:54
12 | * @desciption:
13 | */
14 |
15 | public class ScanView extends ZBarScannerView {
16 |
17 | public ScanView(Context context) {
18 | this(context, null);
19 | }
20 |
21 | public ScanView(Context context, AttributeSet attributeSet) {
22 | super(context, attributeSet);
23 | }
24 |
25 | @Override
26 | protected IViewFinder createViewFinderView(Context context) {
27 | return new LatteViewFinderView(context);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/latte-ec/src/main/res/layout/delegate_user_profile.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
18 |
19 |
--------------------------------------------------------------------------------
/latte-core/src/main/res/layout/delegate_bottom.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
19 |
20 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/util/dimen/DimenUtil.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.util.dimen;
2 |
3 | import android.content.res.Resources;
4 | import android.util.DisplayMetrics;
5 |
6 | import com.wuchao.latte.app.Latte;
7 |
8 | /**
9 | * @author: wuchao
10 | * @date: 2017/10/26 23:26
11 | * @desciption:
12 | */
13 |
14 | public class DimenUtil {
15 |
16 | public static int getScreenWidth() {
17 | final Resources resources = Latte.getApplicationContext().getResources();
18 | final DisplayMetrics dm = resources.getDisplayMetrics();
19 | return dm.widthPixels;
20 | }
21 |
22 | public static int getScreenHeight() {
23 | final Resources resources = Latte.getApplicationContext().getResources();
24 | final DisplayMetrics dm = resources.getDisplayMetrics();
25 | return dm.heightPixels;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/latte-ec/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
14 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/ui/launcher/LauncherHolder.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.ui.launcher;
2 |
3 | import android.content.Context;
4 | import android.view.View;
5 | import android.widget.ImageView;
6 |
7 | import com.bigkoo.convenientbanner.holder.Holder;
8 |
9 | /**
10 | * @author: wuchao
11 | * @date: 2017/11/15 23:27
12 | * @desciption:
13 | */
14 |
15 | public class LauncherHolder implements Holder {
16 |
17 | private ImageView mImageView;
18 |
19 | @Override
20 | public View createView(Context context) {
21 | mImageView = new ImageView(context);
22 | mImageView.setScaleType(ImageView.ScaleType.FIT_XY);
23 | return mImageView;
24 | }
25 |
26 | @Override
27 | public void UpdateUI(Context context, int position, Integer data) {
28 | mImageView.setBackgroundResource(data);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/latte-ec/src/main/res/layout/delegate_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
20 |
21 |
--------------------------------------------------------------------------------
/latte-core/src/androidTest/java/com/wuchao/latte/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.wuchao.latte.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/latte-core/src/main/java/com/wuchao/latte/util/callback/CallbackManager.java:
--------------------------------------------------------------------------------
1 | package com.wuchao.latte.util.callback;
2 |
3 | import java.util.WeakHashMap;
4 |
5 | /**
6 | * @author: wuchao
7 | * @date: 2018/1/7 16:56
8 | * @desciption:
9 | */
10 |
11 | public class CallbackManager {
12 |
13 | private static final WeakHashMap