allen преди 4 години
родител
ревизия
61f6f6683e
променени са 100 файла, в които са добавени 8 реда и са изтрити 13205 реда
  1. 0 5
      app/build.gradle
  2. 0 27
      app/src/main/AndroidManifest.xml
  3. 0 72
      app/src/main/code/com/enation/app/javashop/application/Application.kt
  4. 0 8
      app/src/main/code/com/enation/app/javashop/apshare/ShareEntryActivity.kt
  5. 0 9
      app/src/main/code/com/enation/app/javashop/wxapi/WXEntryActivity.kt
  6. 0 59
      app/src/main/code/com/enation/app/javashop/wxapi/WXPayEntryActivity.kt
  7. 1 1
      build.gradle
  8. 0 1
      cart/.gitignore
  9. 0 124
      cart/build.gradle
  10. 0 21
      cart/proguard-rules.pro
  11. 0 26
      cart/src/androidTest/java/com/enation/javashop/android/component/cart/ExampleInstrumentedTest.java
  12. 0 13
      cart/src/main/AndroidManifest.xml
  13. 0 15
      cart/src/main/ApkBuildDir/AndroidManifest.xml
  14. 0 81
      cart/src/main/code/apkbuild/CartApplication.kt
  15. 0 31
      cart/src/main/code/com/enation/javashop/android/component/cart/activity/CartActivity.kt
  16. 0 199
      cart/src/main/code/com/enation/javashop/android/component/cart/adapter/CartGoodsItemAdapter.kt
  17. 0 93
      cart/src/main/code/com/enation/javashop/android/component/cart/adapter/CartPromotionItemAdapter.kt
  18. 0 129
      cart/src/main/code/com/enation/javashop/android/component/cart/adapter/CartShopItemAdapter.kt
  19. 0 100
      cart/src/main/code/com/enation/javashop/android/component/cart/adapter/CartSinglePromotionItemAdapter.kt
  20. 0 16
      cart/src/main/code/com/enation/javashop/android/component/cart/di/CartComponent.kt
  21. 0 424
      cart/src/main/code/com/enation/javashop/android/component/cart/fragment/CartFragment.kt
  22. 0 26
      cart/src/main/code/com/enation/javashop/android/component/cart/launch/CartLaunch.kt
  23. 0 26
      cart/src/main/code/com/enation/javashop/android/component/cart/util/BaseCartItemAdapter.kt
  24. 0 91
      cart/src/main/code/com/enation/javashop/android/component/cart/util/CartActionAgreement.kt
  25. 0 11
      cart/src/main/res/layout/cart_act_lay.xml
  26. 0 157
      cart/src/main/res/layout/cart_frag_lay.xml
  27. 0 361
      cart/src/main/res/layout/cart_goods_item.xml
  28. 0 66
      cart/src/main/res/layout/cart_promotion_item.xml
  29. 0 104
      cart/src/main/res/layout/cart_shop_item.xml
  30. 0 41
      cart/src/main/res/layout/cart_single_promotion_lay.xml
  31. 0 3
      cart/src/main/res/values/strings.xml
  32. 0 17
      cart/src/test/java/com/enation/javashop/android/component/cart/ExampleUnitTest.java
  33. 1 14
      common/build.gradle
  34. 6 6
      common/src/main/code/com/enation/javashop/android/lib/bind/BaseBindingHelper.kt
  35. 0 1
      goods/.gitignore
  36. 0 125
      goods/build.gradle
  37. 0 21
      goods/proguard-rules.pro
  38. 0 26
      goods/src/androidTest/java/com/enation/javashop/android/component/goods/ExampleInstrumentedTest.java
  39. 0 20
      goods/src/main/AndroidManifest.xml
  40. 0 15
      goods/src/main/ApkBuildDir/AndroidManifest.xml
  41. 0 81
      goods/src/main/code/apkbuild/GoodsApplication.kt
  42. 0 345
      goods/src/main/code/com/enation/javashop/android/component/goods/activity/GoodsActivity.kt
  43. 0 1013
      goods/src/main/code/com/enation/javashop/android/component/goods/activity/GoodsSearchActivity.kt
  44. 0 212
      goods/src/main/code/com/enation/javashop/android/component/goods/activity/SearchActivity.kt
  45. 0 288
      goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsCommentItemAdapter.kt
  46. 0 87
      goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsInfoAdviceAdapter.kt
  47. 0 148
      goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsInfoCommentAdapter.kt
  48. 0 126
      goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsInfoGalleryAdapter.kt
  49. 0 313
      goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsInfoMessageAdapter.kt
  50. 0 282
      goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsInfoPromotionAdapter.kt
  51. 0 87
      goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsInfoShopAdapter.kt
  52. 0 102
      goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsInfoSpecAdapter.kt
  53. 0 89
      goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsInfoWeigetAdapter.kt
  54. 0 151
      goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsMoreActionAdapter.kt
  55. 0 194
      goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsPromotionDetailAdapter.kt
  56. 0 103
      goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsSearchFilterBrandAdapter.kt
  57. 0 210
      goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsSearchFilterChildAdapter.kt
  58. 0 124
      goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsSearchFilterParentAdapter.kt
  59. 0 144
      goods/src/main/code/com/enation/javashop/android/component/goods/adapter/SearchGoodsAdapter.kt
  60. 0 104
      goods/src/main/code/com/enation/javashop/android/component/goods/adapter/SearchHistoryAdapter.kt
  61. 0 99
      goods/src/main/code/com/enation/javashop/android/component/goods/adapter/SearchHistoryClearAdapter.kt
  62. 0 85
      goods/src/main/code/com/enation/javashop/android/component/goods/adapter/SearchHistoryHeaderAdapter.kt
  63. 0 108
      goods/src/main/code/com/enation/javashop/android/component/goods/adapter/SearchHotKeyAdapter.kt
  64. 0 12
      goods/src/main/code/com/enation/javashop/android/component/goods/agreement/HistoryAgreement.kt
  65. 0 32
      goods/src/main/code/com/enation/javashop/android/component/goods/di/GoodsComponent.kt
  66. 0 230
      goods/src/main/code/com/enation/javashop/android/component/goods/fragment/GoodsCommentFragment.kt
  67. 0 238
      goods/src/main/code/com/enation/javashop/android/component/goods/fragment/GoodsInfoFragment.kt
  68. 0 144
      goods/src/main/code/com/enation/javashop/android/component/goods/fragment/GoodsIntroduceFragment.kt
  69. 0 217
      goods/src/main/code/com/enation/javashop/android/component/goods/fragment/GoodsSearchFilterFragment.kt
  70. 0 233
      goods/src/main/code/com/enation/javashop/android/component/goods/fragment/GoodsSearchFilterValueFragment.kt
  71. 0 29
      goods/src/main/code/com/enation/javashop/android/component/goods/launch/GoodsLaunch.kt
  72. 0 250
      goods/src/main/code/com/enation/javashop/android/component/goods/weiget/GoodsFirstMoreView.kt
  73. 0 283
      goods/src/main/code/com/enation/javashop/android/component/goods/weiget/GoodsSearchMoreView.kt
  74. 0 420
      goods/src/main/code/com/enation/javashop/android/component/goods/weiget/GoodsSpecView.kt
  75. 0 280
      goods/src/main/res/layout/goods_act_lay.xml
  76. 0 150
      goods/src/main/res/layout/goods_comment_item_lay.xml
  77. 0 274
      goods/src/main/res/layout/goods_comment_lay.xml
  78. 0 156
      goods/src/main/res/layout/goods_info_address_item.xml
  79. 0 156
      goods/src/main/res/layout/goods_info_advice_item.xml
  80. 0 279
      goods/src/main/res/layout/goods_info_comment_item.xml
  81. 0 11
      goods/src/main/res/layout/goods_info_frag_lay.xml
  82. 0 57
      goods/src/main/res/layout/goods_info_gallery_item.xml
  83. 0 242
      goods/src/main/res/layout/goods_info_message_item.xml
  84. 0 48
      goods/src/main/res/layout/goods_info_promotion_item.xml
  85. 0 226
      goods/src/main/res/layout/goods_info_shop_item.xml
  86. 0 88
      goods/src/main/res/layout/goods_info_spec_item.xml
  87. 0 135
      goods/src/main/res/layout/goods_info_spec_pop.xml
  88. 0 76
      goods/src/main/res/layout/goods_introduce_lay.xml
  89. 0 217
      goods/src/main/res/layout/goods_promotion_detail_item_lay.xml
  90. 0 125
      goods/src/main/res/layout/goods_searach_filter_value_frag_lay.xml
  91. 0 697
      goods/src/main/res/layout/goods_search_act_lay.xml
  92. 0 85
      goods/src/main/res/layout/goods_search_filter_brand_item.xml
  93. 0 28
      goods/src/main/res/layout/goods_search_filter_first_dialog.xml
  94. 0 52
      goods/src/main/res/layout/goods_search_filter_first_item.xml
  95. 0 57
      goods/src/main/res/layout/goods_search_filter_frag_child_item.xml
  96. 0 148
      goods/src/main/res/layout/goods_search_filter_frag_lay.xml
  97. 0 71
      goods/src/main/res/layout/goods_search_filter_frag_parent_item.xml
  98. 0 177
      goods/src/main/res/layout/goods_search_item_grid_lay.xml
  99. 0 202
      goods/src/main/res/layout/goods_search_item_list_lay.xml
  100. 0 0
      goods/src/main/res/layout/goods_search_more_action_dialog.xml

+ 0 - 5
app/build.gradle

@@ -94,11 +94,6 @@ dependencies {
     if (!componentTag) {
         compile project(':welcome') // ===> 开始模块  建议在模块内添加广告 欢迎页 等页面
         compile project(':home')   // ===> 主页模块  里面一般是App的首页 分类楼层页面
-        compile project(':cart')   // ===> 购物车模块 主要就是购物车的逻辑的Item
-        compile project(':goods')  // ===> 商品模块   主要是商品列表 商品详细 等等页面
-        compile project(':member') // ===> 会员模块  主要是会员信息 会员修改 会员主页 等
-        compile project(':order')  // ===> 订单模块 订单列表 详细 退货等
-        compile project(':promotion') // ===> 促销模块 秒杀 团购 等
         compile project(':shop')      // ===> 店铺模块 店铺列表 详细 等
         compile project(':setting')   // ===> 设置模块 设置 缓存 App分享等
         compile project(':extra')    // ===> 额外的一些页面 比如二维码扫描等一些附加功能

+ 0 - 27
app/src/main/AndroidManifest.xml

@@ -51,28 +51,6 @@
                 <category android:name="android.intent.category.LAUNCHER"/>
             </intent-filter>
         </activity>
-        <activity
-            android:name="com.alipay.sdk.app.H5PayActivity"
-            android:configChanges="keyboardHidden|navigation|orientation"
-            android:exported="false"/>
-        <activity
-            android:name="com.alipay.sdk.auth.AuthActivity"
-            android:configChanges="keyboardHidden|navigation|orientation"
-            android:exported="false"/>
-        <activity
-            android:name="com.alipay.sdk.app.H5AuthActivity"
-            android:configChanges="keyboardHidden|navigation|orientation"
-            android:exported="false"/>
-
-        <activity
-            android:name=".wxapi.WXEntryActivity"
-            android:exported="true"
-            android:label="@string/app_name"/>
-        <activity
-            android:name=".wxapi.WXPayEntryActivity"
-            android:configChanges="keyboardHidden|orientation|screenSize"
-            android:exported="true"
-            android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
 
         <activity
             android:name=".WBShareActivity"
@@ -105,11 +83,6 @@
             android:theme="@style/Theme.UMDefault"
             android:excludeFromRecents="true"
             />
-        <activity
-            android:name=".apshare.ShareEntryActivity"
-            android:configChanges="keyboardHidden|orientation|screenSize"
-            android:exported="true"
-            android:theme="@android:style/Theme.Translucent.NoTitleBar" />
 
         <activity android:name=".activity.SchemeActivity">
 

+ 0 - 72
app/src/main/code/com/enation/app/javashop/application/Application.kt

@@ -23,12 +23,6 @@ import com.enation.javashop.utils.base.config.BaseConfig
 import com.enation.javashop.utils.base.tool.CommonTool
 import com.google.gson.Gson
 import com.squareup.leakcanary.LeakCanary
-import com.umeng.commonsdk.UMConfigure
-import com.umeng.message.IUmengRegisterCallback
-import com.umeng.message.MsgConstant
-import com.umeng.message.PushAgent
-import com.umeng.message.UmengMessageHandler
-import com.umeng.message.entity.UMessage
 import io.reactivex.Observable
 import io.reactivex.android.schedulers.AndroidSchedulers
 import io.reactivex.functions.Function4
@@ -54,7 +48,6 @@ class Application : BaseApplication() {
         initRouter()
         initFrame()
         initLeaks()
-        initPush()
     }
 
     /**
@@ -70,13 +63,8 @@ class Application : BaseApplication() {
         JRouter.openLog()
         JRouter.prepare().create("/welcome/launch").seek()
         JRouter.prepare().create("/home/launch").seek()
-        JRouter.prepare().create("/member/launch").seek()
-        JRouter.prepare().create("/cart/launch").seek()
         JRouter.prepare().create("/setting/launch").seek()
-        JRouter.prepare().create("/goods/launch").seek()
         JRouter.prepare().create("/shop/launch").seek()
-        JRouter.prepare().create("/order/launch").seek()
-        JRouter.prepare().create("/promotion/launch").seek()
         JRouter.prepare().create("/extra/launch").seek()
     }
 
@@ -109,65 +97,5 @@ class Application : BaseApplication() {
         NetEngineConfig.init(baseContext)
                 .openLogger()
                 .addNetInterceptor(RestfulExceptionInterceptor())
-        /**初始化友盟分享*/
-        //Config.DEBUG = true
-        UmengConfig.initWechat(JavaShopConfigCenter.INSTANCE.WECHAT_APP_ID, JavaShopConfigCenter.INSTANCE.WECHAT_SCRECT)
-        UmengConfig.initQQ(JavaShopConfigCenter.INSTANCE.QQ_Key, JavaShopConfigCenter.INSTANCE.QQ_SCRECT)
-        UmengConfig.initWeiBo(JavaShopConfigCenter.INSTANCE.WEIBO_KEY, JavaShopConfigCenter.INSTANCE.WEIBO_SCRECT, JavaShopConfigCenter.INSTANCE.WEIBO_URL)
-        UmengConfig.initAliPay(JavaShopConfigCenter.INSTANCE.ALIPAY_KEY)
     }
-
-    private fun initPush() {
-        UMConfigure.init(this, JavaShopConfigCenter.INSTANCE.UMENG_KEY, "Umeng", UMConfigure.DEVICE_TYPE_PHONE, JavaShopConfigCenter.INSTANCE.UMENG_SCRECT)
-        /**初始化推送对象*/
-        val mPushAgent = PushAgent.getInstance(this)
-        /**开启推送*/
-        mPushAgent.onAppStart()
-        /**设置后台接受通知*/
-        mPushAgent.setNotificaitonOnForeground(true)
-        /**设置响铃*/
-        mPushAgent.notificationPlaySound = MsgConstant.NOTIFICATION_PLAY_SDK_ENABLE
-        /**设置呼吸灯闪烁*/
-        mPushAgent.notificationPlayLights = MsgConstant.NOTIFICATION_PLAY_SDK_ENABLE
-        /**设置是否显示*/
-        mPushAgent.notificationPlayVibrate = MsgConstant.NOTIFICATION_PLAY_SDK_ENABLE
-        /**设置推送信息监听器*/
-        mPushAgent.messageHandler = object : UmengMessageHandler() {
-
-            override fun getNotification(context: Context?, uMessage: UMessage?): Notification {
-                //Log.e("getNotification", Gson().toJson(uMessage))
-                val builder = Notification.Builder(context)
-                /**自定义通知样式*/
-                val myNotificationView = RemoteViews(context!!.getPackageName(), R.layout.notification_lay)
-                myNotificationView.setTextViewText(R.id.notification_time, CommonTool.DataMilltoString(System.currentTimeMillis(), "YYYY-MM-DD"))
-                myNotificationView.setTextViewText(R.id.notification_content, uMessage!!.text)
-                builder.setContent(myNotificationView)
-                        .setSmallIcon(getSmallIconId(context, uMessage))
-                        .setTicker(uMessage!!.ticker)
-                        .setAutoCancel(true)
-                return builder.notification
-                return super.getNotification(context, uMessage)
-            }
-
-            override fun dealWithNotificationMessage(p0: Context?, p1: UMessage?) {
-                super.dealWithNotificationMessage(p0, p1)
-            }
-
-
-        }
-
-        //注册推送服务,每次调用register方法都会回调该接口
-        mPushAgent.register(object : IUmengRegisterCallback {
-
-            override fun onSuccess(deviceToken: String) {
-                //注册成功会返回device token
-                errorLog("PushRegisterSuccess", "$deviceToken")
-            }
-
-            override fun onFailure(s: String, s1: String) {
-                errorLog("PushRegisterError", "$s  $s1")
-            }
-        })
-    }
-
 }

+ 0 - 8
app/src/main/code/com/enation/app/javashop/apshare/ShareEntryActivity.kt

@@ -1,8 +0,0 @@
-package com.enation.app.javashop.apshare
-
-import com.umeng.socialize.media.ShareCallbackActivity
-
-/**
- * 支付宝分享回调
- */
-class ShareEntryActivity : ShareCallbackActivity()

+ 0 - 9
app/src/main/code/com/enation/app/javashop/wxapi/WXEntryActivity.kt

@@ -1,9 +0,0 @@
-package com.enation.app.javashop.wxapi
-
-import com.umeng.weixin.callback.WXCallbackActivity
-
-/**
- * Created by LDD on 2018/10/23.
- */
-class WXEntryActivity : WXCallbackActivity() {
-}

+ 0 - 59
app/src/main/code/com/enation/app/javashop/wxapi/WXPayEntryActivity.kt

@@ -1,59 +0,0 @@
-package com.enation.app.javashop.wxapi
-
-import android.app.Activity
-import android.content.Intent
-import android.os.Bundle
-import android.util.Log
-import com.enation.javashop.android.lib.utils.getEventCenter
-import com.enation.javashop.android.middleware.config.JavaShopConfigCenter
-import com.enation.javashop.android.middleware.event.PayEvent
-import com.enation.javashop.android.middleware.event.PayState
-import com.tencent.mm.sdk.modelbase.BaseReq
-import com.tencent.mm.sdk.modelbase.BaseResp
-import com.tencent.mm.sdk.openapi.IWXAPI
-import com.tencent.mm.sdk.openapi.IWXAPIEventHandler
-import com.tencent.mm.sdk.openapi.WXAPIFactory
-
-/**
- * Created by LDD on 2018/10/23.
- */
-class WXPayEntryActivity :Activity() , IWXAPIEventHandler {
-
-    private val TAG = "WXPayEntryActivity"
-    private val api by lazy { WXAPIFactory.createWXAPI(this, JavaShopConfigCenter.INSTANCE.WECHAT_APP_ID); }
-
-    override fun onCreate(savedInstanceState: Bundle?) {
-        super.onCreate(savedInstanceState)
-        this.api.handleIntent(intent, this)
-    }
-
-    override fun onNewIntent(intent: Intent?) {
-        super.onNewIntent(intent)
-        this.api.handleIntent(intent, this)
-    }
-
-    override fun onResp(paramBaseResp: BaseResp) {
-        Log.d("WXPayEntryActivity", "onPayFinish, errCode = " + paramBaseResp.errCode)
-        if (paramBaseResp.type == 5){
-            when (paramBaseResp.errCode) {
-                -1 -> {
-                    getEventCenter().post(PayEvent(PayState.FAILD))
-                    return
-                }
-                0 -> {
-                    getEventCenter().post(PayEvent(PayState.SUCCESS))
-                    return
-                }
-                else -> {
-                    getEventCenter().post(PayEvent(PayState.FAILD))
-                    return
-                }
-            }
-        }
-        getEventCenter().post(PayEvent(PayState.CANCLE))
-    }
-
-    override fun onReq(p0: BaseReq?) {
-
-    }
-}

+ 1 - 1
build.gradle

@@ -3,7 +3,7 @@ buildscript {
     /**
      * Kotlin统一版本
      */
-    ext.kotlin_version = '1.2.40'
+    ext.kotlin_version = '1.3.21'
 
     /**
      * Aop编制版本

+ 0 - 1
cart/.gitignore

@@ -1 +0,0 @@
-/build

+ 0 - 124
cart/build.gradle

@@ -1,124 +0,0 @@
-
-if (componentTag){
-    apply plugin: 'com.android.application'
-    apply plugin: 'com.enation.javashop.aspectjrt'
-}else{
-    apply plugin: 'com.android.library'
-}
-apply plugin: 'kotlin-android'
-apply plugin: 'kotlin-android-extensions'
-apply plugin: 'kotlin-kapt'
-
-kapt {
-    arguments {
-        arg("moduleName", project.getName())
-    }
-}
-
-android {
-    compileSdkVersion target_sdk_version
-    buildToolsVersion build_tools_version
-
-    defaultConfig {
-        if (componentTag){
-            applicationId "com.enation.javashop.android.component.cart"
-            multiDexEnabled true
-        }
-        minSdkVersion min_sdk_version
-        targetSdkVersion target_sdk_version
-        versionCode app_version_code
-        versionName app_version
-        dataBinding {
-            enabled = true
-        }
-        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
-
-    }
-    lintOptions {
-        abortOnError false
-    }
-
-    buildTypes {
-        release {
-            minifyEnabled false
-            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
-        }
-    }
-    sourceSets {
-        main.java.srcDirs += 'src/main/code'
-        if(componentTag){
-            main.manifest.srcFile 'src/main/ApkBuildDir/AndroidManifest.xml'
-        }else{
-            main.manifest.srcFile 'src/main/AndroidManifest.xml'
-            main.java {
-                exclude 'apkbuild/**'
-            }
-        }
-    }
-}
-
-dependencies {
-    compile fileTree(include: ['*.jar'], dir: 'libs')
-    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
-        exclude group: 'com.android.support', module: 'support-annotations'
-    })
-    /**
-     * 单元测试
-     */
-    testCompile 'junit:junit:4.12'
-
-    /**
-     *  Android基础依赖库
-     */
-    compile "com.android.support:design:$support_library_version"
-    compile "com.android.support:support-v4:$support_library_version"
-    compile "com.android.support:cardview-v7:$support_library_version"
-
-    /**
-     * 公共库依赖
-     */
-    compile project(':middleware')
-
-    /**
-     * 内存泄漏监控
-     */
-    if(componentTag){
-        debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'
-        releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
-        testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
-    }
-
-    /**
-     * Dagger编译依赖
-     */
-    kapt 'com.google.dagger:dagger-compiler:2.7'
-
-    /**
-     * Kotlin依赖
-     */
-    kapt 'com.android.databinding:compiler:2.3.3'
-
-    /**
-     * 路由注解处理器
-     */
-    kapt "com.enation.geamtear:jrouter-compiler:$router_version"
-
-    /**
-     *  constraint-layout布局依赖
-     */
-    compile 'com.android.support.constraint:constraint-layout:1.1.0-beta5'
-
-}
-
-/**
- * kawo组件化框架配置
- */
-if(componentTag){
-    kawo {
-        /**
-         * Aop注解排除Jar
-         */
-        aspectExcludeJarFilter 'com.enation.geamtear.pay','AlipaySdk'
-    }
-}
-

+ 0 - 21
cart/proguard-rules.pro

@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile

+ 0 - 26
cart/src/androidTest/java/com/enation/javashop/android/component/cart/ExampleInstrumentedTest.java

@@ -1,26 +0,0 @@
-package com.enation.javashop.android.component.cart;
-
-import android.content.Context;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import static org.junit.Assert.*;
-
-/**
- * Instrumented test, which will execute on an Android device.
- *
- * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
- */
-@RunWith(AndroidJUnit4.class)
-public class ExampleInstrumentedTest {
-    @Test
-    public void useAppContext() throws Exception {
-        // Context of the app under test.
-        Context appContext = InstrumentationRegistry.getTargetContext();
-
-        assertEquals("com.enation.javashop.android.component.cart.test", appContext.getPackageName());
-    }
-}

+ 0 - 13
cart/src/main/AndroidManifest.xml

@@ -1,13 +0,0 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.enation.javashop.android.component.cart">
-    <application android:allowBackup="true"
-                 android:label="@string/app_name"
-                 android:supportsRtl="true"
-        >
-        <activity android:name=".activity.CartActivity"
-            />
-    </application>
-</manifest>
-
-
-

+ 0 - 15
cart/src/main/ApkBuildDir/AndroidManifest.xml

@@ -1,15 +0,0 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.enation.javashop.android.welcome">
-    <uses-permission android:name="android.permission.INTERNET"/>
-
-    <application
-        android:allowBackup="true"
-        android:label="@string/app_name"
-        android:theme="@style/Theme.AppCompat.Light.NoActionBar"
-        android:name="apkbuild.CartApplication"
-        android:supportsRtl="true">
-    </application>
-</manifest>
-
-    <!--单独Module调试 需要往Application作用域下加入皮肤-->
-    <!--android:theme="@style/Theme.AppCompat.Light.NoActionBar"-->

+ 0 - 81
cart/src/main/code/apkbuild/CartApplication.kt

@@ -1,81 +0,0 @@
-//package apkbuild
-//
-//import com.enation.javashop.android.jrouter.JRouter
-//import com.enation.javashop.android.lib.base.BaseApplication
-//import com.enation.javashop.net.engine.config.NetEngineConfig
-//import com.enation.javashop.net.engine.plugin.exception.RestfulExceptionInterceptor
-//import com.enation.javashop.utils.base.config.BaseConfig
-//import com.squareup.leakcanary.LeakCanary
-//import io.reactivex.Observable
-//import io.reactivex.android.schedulers.AndroidSchedulers
-//import io.reactivex.schedulers.Schedulers
-//import io.reactivex.functions.Function3
-//
-///**
-// * 单Moudle编译 Application
-// */
-//class CartApplication:BaseApplication() {
-//    /**
-//     * @author LDD
-//     * @From   Application
-//     * @Date   2018/1/11 下午12:50
-//     * @Note   应用启动时调用
-//     */
-//    override fun onCreate() {
-//        super.onCreate()
-//        Observable.zip(initRouter().subscribeOn(Schedulers.newThread()),
-//                initLeaks().subscribeOn(Schedulers.newThread()),
-//                initFrame().subscribeOn(Schedulers.newThread()),
-//                Function3<String,String,String,String> { _ , _ , _ -> return@Function3 "" }).
-//                observeOn(AndroidSchedulers.mainThread()).subscribe({})
-//    }
-//
-//    /**
-//     * @author  LDD
-//     * @From    Application
-//     * @Date   2018/1/11 下午12:50
-//     * @Note   初始化路由
-//     * @return rx观察者
-//     */
-//    private fun initRouter(): Observable<String> {
-//        return Observable.create {
-//            JRouter.init(this)
-//            JRouter.openDebug()
-//            JRouter.openLog()
-//            JRouter.prepare().create("/welcome/launch").seek()
-//        }
-//    }
-//
-//    /**
-//     * @author  LDD
-//     * @From    Application
-//     * @Date   2018/1/11 下午12:50
-//     * @Note   初始化内存检测器
-//     * @return rx观察者
-//     */
-//    private fun initLeaks(): Observable<String> {
-//        return Observable.create {
-//            LeakCanary.install(this)
-//        }
-//    }
-//
-//    /**
-//     * @author  LDD
-//     * @From    Application
-//     * @Date   2018/1/11 下午12:50
-//     * @Note   初始化内部框架
-//     * @return rx观察者
-//     */
-//    private fun initFrame(): Observable<String> {
-//        return Observable.create {
-//            if (android.os.Build.VERSION.SDK_INT> android.os.Build.VERSION_CODES.LOLLIPOP){
-//                BaseConfig.getInstance().addActivity("HomeActivity")
-//            }else{
-//                BaseConfig.getInstance().closeScrollBack()
-//            }
-//            NetEngineConfig.init(baseContext)
-//                    .openLogger()
-//                    .addNetInterceptor(RestfulExceptionInterceptor())
-//        }
-//    }
-//}

+ 0 - 31
cart/src/main/code/com/enation/javashop/android/component/cart/activity/CartActivity.kt

@@ -1,31 +0,0 @@
-package com.enation.javashop.android.component.cart.activity
-
-import android.graphics.Color
-import android.os.Bundle
-import android.support.v7.app.AppCompatActivity
-import com.enation.javashop.android.component.cart.R
-import com.enation.javashop.android.component.cart.fragment.CartFragment
-import com.enation.javashop.android.jrouter.external.annotation.Router
-import com.enation.javashop.android.lib.utils.AppTool
-import com.enation.javashop.utils.base.tool.BaseToolActivity
-
-/**
- * @author LDD
- * @Date   2018/2/24 下午4:29
- * @From   com.enation.javashop.android.component.cart.activity
- * @Note   cartFragment的Activity载体
- */
-@Router(path = "/cart/main")
-class CartActivity : BaseToolActivity() {
-
-    private lateinit var fragment:CartFragment
-
-    override fun onCreate(savedInstanceState: Bundle?) {
-        super.onCreate(savedInstanceState)
-        AppTool.SystemUI.ImmersiveWithBottomBarColor(this, Color.BLACK)
-        setContentView(R.layout.cart_act_lay)
-        fragment = CartFragment()
-        supportFragmentManager?.beginTransaction()?.add(R.id.fragment,fragment)?.addToBackStack(null)?.commit()
-    }
-
-}

+ 0 - 199
cart/src/main/code/com/enation/javashop/android/component/cart/adapter/CartGoodsItemAdapter.kt

@@ -1,199 +0,0 @@
-package com.enation.javashop.android.component.cart.adapter
-
-import android.databinding.DataBindingUtil
-import android.graphics.Color
-import android.graphics.Outline
-import android.util.TypedValue
-import android.view.*
-import android.widget.LinearLayout
-import android.widget.TextView
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.cart.R
-import com.enation.javashop.android.component.cart.databinding.CartGoodsItemBinding
-import com.enation.javashop.android.component.cart.util.BaseCartItemAdapter
-import com.enation.javashop.android.component.cart.util.CartActionAgreement
-import com.enation.javashop.android.lib.utils.*
-import com.enation.javashop.android.middleware.model.CartGoodsItemViewModel
-
-import com.enation.javashop.android.middleware.model.SingglePromotionViewModel
-import com.enation.javashop.utils.base.tool.CommonTool
-import com.enation.javashop.utils.base.tool.ScreenTool
-
-/**
- * @author LDD
- * @Date   2018/2/6 下午4:33
- * @From   com.enation.javashop.android.component.cart.adapter
- * @Note   购物车商品Item适配器
- */
-class CartGoodsItemAdapter(agreement: CartActionAgreement, private val datas: List<CartGoodsItemViewModel>) : BaseCartItemAdapter<BaseRecyclerViewHolder<CartGoodsItemBinding>, CartGoodsItemViewModel>(agreement) {
-
-    /**
-     * @author LDD
-     * @From   CartGoodsItemAdapter
-     * @Date   2018/2/9 下午2:42
-     * @Note   数据提供者
-     * @return 数据
-     */
-    override fun dataProvider(): Any {
-        return datas
-    }
-
-    /**
-     * @author LDD
-     * @From   CartGoodsItemAdapter
-     * @Date   2018/2/9 下午2:42
-     * @Note   响应事件过滤
-     * @param  position item坐标
-     * @return 是否过滤
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    override fun getItemViewType(position: Int): Int {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   CartGoodsItemAdapter
-     * @Date   2018/2/9 下午2:43
-     * @Note   创建ViewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<CartGoodsItemBinding> {
-        return BaseRecyclerViewHolder(DataBindingUtil.inflate(LayoutInflater.from(parent?.context), R.layout.cart_goods_item, parent, false))
-    }
-
-    /**
-     * @author LDD
-     * @From   CartGoodsItemAdapter
-     * @Date   2018/2/9 下午2:43
-     * @Note   item总数
-     * @return 数量总数
-     */
-    override fun getItemCount(): Int {
-        return datas.size
-    }
-
-    /**
-     * @author LDD
-     * @From   CartGoodsItemAdapter
-     * @Date   2018/2/9 下午2:44
-     * @Note   ViewHelper提供者
-     * @return ViewHelper
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return LinearLayoutHelper(0, datas.size)
-    }
-
-    /**
-     * @author LDD
-     * @From   CartGoodsItemAdapter
-     * @Date   2018/2/9 下午2:45
-     * @Note   绑定ViewHolder
-     * @param  holder ViewHolder
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<CartGoodsItemBinding>?, position: Int) {
-        holder?.bind { binding ->
-            binding.cartGoodsItemErrorEdit.setOnClickListener {
-                CommonTool.createVerifyDialog(datas[position].errorMessage,"我已知晓","移除商品",binding.root.context,object : CommonTool.DialogInterface{
-                    override fun yes() {
-                        actionProvider().deleteGoods(datas[position].skuId)
-                    }
-
-                    override fun no() {
-
-                    }
-                }).show()
-            }
-            binding.promotionTagParent.removeAllViews()
-            binding.goodsItemData = datas[position]
-            binding.cartGoodsPriceTv.text = String.format("¥%.2f", datas[position].price)
-            binding.cartGoodsItemSingglePromotionLay.visibility = (datas[position].promotionList == null || datas[position].promotionList!!.count() == 0).judge(View.GONE, View.VISIBLE)
-            goodsEdit(binding.cartGoodsAddBtn, position, getItem(position).skuId, getItem(position).currentNum.toInt() + 1, null)
-            goodsEdit(binding.cartGoodsReduceBtn, position, getItem(position).skuId, getItem(position).currentNum.toInt() - 1, null)
-            goodsEdit(binding.cartGoodsItemCheck, position, getItem(position).skuId, null, !getItem(position).isCheck)
-            goodsMoreAction(binding.cartGoodsItemContent, position, getItem(position).skuId, getItem(position).goodsId)
-            toGoods(binding.cartGoodsItemContent, getItem(position).goodsId)
-            selectSingglePromotion(binding.cartGoodsItemSingglePromotionEdit, datas[position].skuId, datas[position].shopId, getItem(position).promotionList
-                    ?: emptyList())
-            datas[position].promotionList?.forEach {
-                when (it.type) {
-                    "MINUS" -> {
-                        buildItem(binding.promotionTagParent, "立减")
-                    }
-                    "GROUPBUY" -> {
-                        buildItem(binding.promotionTagParent, "团购")
-                    }
-                    "EXCHANGE" -> {
-                        buildItem(binding.promotionTagParent, "积分商城")
-                    }
-                    "HALF_PRICE" -> {
-                        buildItem(binding.promotionTagParent, "第二件半价")
-                    }
-                    "SECKILL" -> {
-                        buildItem(binding.promotionTagParent, "秒杀")
-                    }
-                }
-            }
-        }
-    }
-
-    private val goodsEdit = { view: View, position: Int, productId: Int, num: Int?, check: Boolean? ->
-        view.setOnClickListener {
-            actionProvider().goodsEdit(productId, num, check)
-        }
-    }
-
-    /**
-     * @Name  goodsMoreAction
-     * @Type  Block
-     * @Note  商品更多操作
-     */
-    private val goodsMoreAction = { view: View, position: Int, productId: Int, goodsId: Int ->
-        view.setOnLongClickListener {
-            actionProvider().showGoodsMoreMask(productId, goodsId)
-            return@setOnLongClickListener true
-        }
-    }
-
-    /**
-     * @Name  toGoods
-     * @Type  Block
-     * @Note  去商品页面
-     */
-    private val toGoods = { view: View, goodsId: Int ->
-        view.setOnClickListener {
-            actionProvider().toGoods(goodsId)
-        }
-    }
-
-    /**
-     * @Name  selectSingglePromotion
-     * @Type  Block
-     * @Note  选择单品促销
-     */
-    private val selectSingglePromotion = { view: View, skuId: Int, sellerId: Int, singglePromotionList: List<SingglePromotionViewModel> ->
-        view.setOnClickListener {
-            actionProvider().selectSingglePromotion(sellerId, skuId, singglePromotionList)
-        }
-    }
-
-    private fun buildItem(parentView: ViewGroup, single: String) {
-        var tv = TextView(parentView.context)
-        tv.gravity = Gravity.CENTER
-        tv.setPadding(5.dpToPx(), 0, 5.dpToPx(), 0)
-        tv.setTextSize(TypedValue.COMPLEX_UNIT_PX, ScreenTool.getScreenWidth(parentView.context) / 40)
-        tv.setBackgroundResource(R.drawable.javashop_red_radis_bg)
-        tv.setTextColor(Color.WHITE)
-        tv.text = single
-        parentView.addView(tv)
-        tv.reLayout<LinearLayout.LayoutParams> {
-            it.setMargins(0, 2.dpToPx(), 5.dpToPx(), 2.dpToPx())
-            it.width = LinearLayout.LayoutParams.WRAP_CONTENT
-            it.height = LinearLayout.LayoutParams.MATCH_PARENT
-        }
-
-    }
-}

+ 0 - 93
cart/src/main/code/com/enation/javashop/android/component/cart/adapter/CartPromotionItemAdapter.kt

@@ -1,93 +0,0 @@
-package com.enation.javashop.android.component.cart.adapter
-
-import android.databinding.DataBindingUtil
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.cart.R
-import com.enation.javashop.android.component.cart.databinding.CartPromotionItemBinding
-import com.enation.javashop.android.component.cart.util.BaseCartItemAdapter
-import com.enation.javashop.android.component.cart.util.CartActionAgreement
-import com.enation.javashop.android.middleware.model.CartPromotionItemViewModel
-import com.enation.javashop.android.lib.utils.BaseRecyclerViewHolder
-
-/**
- * @author LDD
- * @Date   2018/2/24 下午4:20
- * @From   com.enation.javashop.android.component.cart.adapter
- * @Note   购物车促销Item适配器
- */
-class CartPromotionItemAdapter(agreement :CartActionAgreement,private val promotionItemViewModel: String) : BaseCartItemAdapter<BaseRecyclerViewHolder<CartPromotionItemBinding>, CartPromotionItemViewModel>(agreement) {
-
-    /**
-     * @author LDD
-     * @From   CartPromotionItemAdapter
-     * @Date   2018/2/24 下午4:20
-     * @Note   数据提供者
-     * @return 数据
-     */
-    override fun dataProvider(): Any {
-        return promotionItemViewModel
-    }
-
-    override fun getItemViewType(position: Int): Int {
-        return 2
-    }
-
-    /**
-     * @author LDD
-     * @From   CartPromotionItemAdapter
-     * @Date   2018/2/24 下午4:21
-     * @Note   点击时Item的过滤
-     * @param  position item坐标
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   CartPromotionItemAdapter
-     * @Date   2018/2/24 下午4:21
-     * @Note   创建ViewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<CartPromotionItemBinding> {
-        return BaseRecyclerViewHolder(DataBindingUtil.inflate(LayoutInflater.from(parent?.context), R.layout.cart_promotion_item,parent,false))
-    }
-
-    /**
-     * @author LDD
-     * @From   CartPromotionItemAdapter
-     * @Date   2018/2/24 下午4:22
-     * @Note   获取Item大小
-     */
-    override fun getItemCount(): Int {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   CartPromotionItemAdapter
-     * @Date   2018/2/24 下午4:22
-     * @Note   创布局辅助器
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return LinearLayoutHelper(0,1)
-    }
-
-    /**
-     * @author LDD
-     * @From   CartPromotionItemAdapter
-     * @Date   2018/2/24 下午4:23
-     * @Note   绑定ViewHolder
-     * @param  ...
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<CartPromotionItemBinding>?, position: Int) {
-        holder?.bind {
-            binding ->
-            binding.promotionItemData = promotionItemViewModel
-        }
-    }
-}

+ 0 - 129
cart/src/main/code/com/enation/javashop/android/component/cart/adapter/CartShopItemAdapter.kt

@@ -1,129 +0,0 @@
-package com.enation.javashop.android.component.cart.adapter
-
-import android.databinding.DataBindingUtil
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.CheckBox
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.cart.R
-import com.enation.javashop.android.component.cart.databinding.CartShopItemBinding
-import com.enation.javashop.android.component.cart.util.BaseCartItemAdapter
-import com.enation.javashop.android.component.cart.util.CartActionAgreement
-import com.enation.javashop.android.middleware.model.CartShopItemViewModel
-import com.enation.javashop.android.lib.utils.BaseRecyclerViewHolder
-
-/**
- * @author LDD
- * @Date   2018/2/24 下午4:26
- * @From   com.enation.javashop.android.component.cart.adapter
- * @Note   购物车店铺Item适配器
- */
-class CartShopItemAdapter(agreement: CartActionAgreement,private val shopItemViewModel: CartShopItemViewModel) : BaseCartItemAdapter<BaseRecyclerViewHolder<CartShopItemBinding>, CartShopItemViewModel>(agreement) {
-
-    /**
-     * @author LDD
-     * @From   CartShopItemAdapter
-     * @Date   2018/2/24 下午4:26
-     * @Note   数据提供者
-     * @return 数据
-     */
-    override fun dataProvider(): Any {
-        return shopItemViewModel
-    }
-
-    override fun getItemViewType(position: Int): Int {
-        return 3
-    }
-
-    /**
-     * @author LDD
-     * @From   CartShopItemAdapter
-     * @Date   2018/2/24 下午4:27
-     * @Note   item点击过滤
-     * @param  position item坐标
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   CartShopItemAdapter
-     * @Date   2018/2/24 下午4:27
-     * @Note   常见viewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BaseRecyclerViewHolder<CartShopItemBinding> {
-        return BaseRecyclerViewHolder(DataBindingUtil.inflate(LayoutInflater.from(parent.context), R.layout.cart_shop_item,parent,false))
-    }
-
-    /**
-     * @author LDD
-     * @From   CartShopItemAdapter
-     * @Date   2018/2/24 下午4:27
-     * @Note   获取数据源大小
-     */
-    override fun getItemCount(): Int {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   CartShopItemAdapter
-     * @Date   2018/2/24 下午4:27
-     * @Note   创建布局辅助器
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return LinearLayoutHelper(0,1)
-    }
-
-    /**
-     * @author LDD
-     * @From   CartShopItemAdapter
-     * @Date   2018/2/24 下午4:28
-     * @Note   绑定操作
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<CartShopItemBinding>, position: Int) {
-        holder.bind {
-            binding ->
-            binding.shopItemData = shopItemViewModel
-            shopCheck(binding.cartShopItemCheck , shopItemViewModel.shopId , !shopItemViewModel.isCheck)
-            toShop(binding.root,shopItemViewModel.shopId)
-            showShopBonus(binding.cartShopItemRightTv,shopItemViewModel.shopId)
-        }
-    }
-
-    /**
-     * @Name  shopCheck
-     * @Type  Block
-     * @Note  店铺选中
-     */
-    private val shopCheck = { view : CheckBox, shopId :Int, checked :Boolean ->
-        view.setOnClickListener({
-            actionProvider().shopCheck(shopId,checked)
-        })
-    }
-
-    /**
-     * @Name  toShop
-     * @Type  Block
-     * @Note  去店铺
-     */
-    private val toShop = {view :View ,shopId :Int ->
-        view.setOnClickListener {
-            actionProvider().toShop(shopId)
-        }
-    }
-
-    /**
-     * @Name  showShopBonus
-     * @Type  Block
-     * @Note  显示店铺可领取的优惠券
-     */
-    private val showShopBonus = { view : View , shopId : Int ->
-        view.setOnClickListener {
-            actionProvider().showShopBonus(shopId)
-        }
-    }
-}

+ 0 - 100
cart/src/main/code/com/enation/javashop/android/component/cart/adapter/CartSinglePromotionItemAdapter.kt

@@ -1,100 +0,0 @@
-package com.enation.javashop.android.component.cart.adapter
-
-import android.databinding.DataBindingUtil
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.CheckBox
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.VirtualLayoutManager
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.cart.R
-import com.enation.javashop.android.component.cart.databinding.CartShopItemBinding
-import com.enation.javashop.android.component.cart.databinding.CartSinglePromotionLayBinding
-import com.enation.javashop.android.component.cart.util.BaseCartItemAdapter
-import com.enation.javashop.android.component.cart.util.CartActionAgreement
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.middleware.model.CartShopItemViewModel
-import com.enation.javashop.android.lib.utils.BaseRecyclerViewHolder
-import com.enation.javashop.android.middleware.model.SingglePromotionViewModel
-import com.enation.javashop.utils.base.tool.ScreenTool
-
-/**
- * @author LDD
- * @Date   2018/2/24 下午4:26
- * @From   com.enation.javashop.android.component.cart.adapter
- * @Note   购物车店铺Item适配器
- */
-class CartSinglePromotionItemAdapter(val data :List<SingglePromotionViewModel>) : BaseDelegateAdapter<BaseRecyclerViewHolder<CartSinglePromotionLayBinding>, SingglePromotionViewModel>() {
-
-    /**
-     * @author LDD
-     * @From   CartShopItemAdapter
-     * @Date   2018/2/24 下午4:26
-     * @Note   数据提供者
-     * @return 数据
-     */
-    override fun dataProvider(): Any {
-        return data
-    }
-
-    override fun getItemViewType(position: Int): Int {
-        return 10
-    }
-
-    /**
-     * @author LDD
-     * @From   CartShopItemAdapter
-     * @Date   2018/2/24 下午4:27
-     * @Note   item点击过滤
-     * @param  position item坐标
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   CartShopItemAdapter
-     * @Date   2018/2/24 下午4:27
-     * @Note   常见viewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BaseRecyclerViewHolder<CartSinglePromotionLayBinding> {
-        return BaseRecyclerViewHolder(DataBindingUtil.inflate(LayoutInflater.from(parent.context), R.layout.cart_single_promotion_lay,parent,false))
-    }
-
-    /**
-     * @author LDD
-     * @From   CartShopItemAdapter
-     * @Date   2018/2/24 下午4:27
-     * @Note   获取数据源大小
-     */
-    override fun getItemCount(): Int {
-        return data.count()
-    }
-
-    /**
-     * @author LDD
-     * @From   CartShopItemAdapter
-     * @Date   2018/2/24 下午4:27
-     * @Note   创建布局辅助器
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return LinearLayoutHelper(0,data.count())
-    }
-
-    /**
-     * @author LDD
-     * @From   CartShopItemAdapter
-     * @Date   2018/2/24 下午4:28
-     * @Note   绑定操作
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<CartSinglePromotionLayBinding>, position: Int) {
-        holder.bind {
-            binding ->
-            var item = getItem(position)
-            binding.tag.text = if (item.promotionId == 0){"其他操作"}else{"促销"}
-            binding.content.text = item.title
-        }
-    }
-}

+ 0 - 16
cart/src/main/code/com/enation/javashop/android/component/cart/di/CartComponent.kt

@@ -1,16 +0,0 @@
-package com.enation.javashop.android.component.cart.di
-
-import com.enation.javashop.android.component.cart.fragment.CartFragment
-import com.enation.javashop.android.middleware.di.ApplicationComponent
-import dagger.Component
-
-/**
- * @author LDD
- * @Date   2018/1/30 下午2:35
- * @From   com.enation.javashop.android.component.cart.di
- * @Note   Cart模块依赖注入
- */
-@Component(dependencies = arrayOf(ApplicationComponent::class))
-interface CartComponent {
-    fun inject(fragment : CartFragment)
-}

+ 0 - 424
cart/src/main/code/com/enation/javashop/android/component/cart/fragment/CartFragment.kt

@@ -1,424 +0,0 @@
-package com.enation.javashop.android.component.cart.fragment
-
-import android.graphics.Color
-import android.os.Handler
-import android.support.v7.widget.RecyclerView
-import android.view.View
-import android.view.ViewGroup
-import com.alibaba.android.vlayout.DelegateAdapter
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.VirtualLayoutManager
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.cart.R
-import com.enation.javashop.android.component.cart.activity.CartActivity
-import com.enation.javashop.android.component.cart.adapter.CartGoodsItemAdapter
-import com.enation.javashop.android.component.cart.adapter.CartPromotionItemAdapter
-import com.enation.javashop.android.component.cart.adapter.CartShopItemAdapter
-import com.enation.javashop.android.component.cart.adapter.CartSinglePromotionItemAdapter
-import com.enation.javashop.android.component.cart.databinding.CartFragLayBinding
-import com.enation.javashop.android.component.cart.launch.CartLaunch
-import com.enation.javashop.android.component.cart.util.CartActionAgreement
-import com.enation.javashop.android.jrouter.external.annotation.Router
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.lib.adapter.TextViewDelegateAdapter
-import com.enation.javashop.android.lib.adapter.VlayoutHolderAdapter
-import com.enation.javashop.android.lib.base.BaseFragment
-import com.enation.javashop.android.lib.utils.*
-import com.enation.javashop.android.lib.widget.PopCommonView
-import com.enation.javashop.android.middleware.api.MemberState
-import com.enation.javashop.android.middleware.event.CartDataChange
-import com.enation.javashop.android.middleware.event.LoginEvent
-import com.enation.javashop.android.middleware.event.LogoutEvent
-import com.enation.javashop.android.middleware.logic.contract.cart.CartFragmentContract
-import com.enation.javashop.android.middleware.logic.presenter.cart.CartFragmentPresenter
-import com.enation.javashop.android.middleware.model.*
-import com.enation.javashop.net.engine.model.NetState
-import com.enation.javashop.utils.base.tool.CommonTool
-import com.enation.javashop.utils.base.tool.ScreenTool
-import com.scwang.smartrefresh.layout.header.ClassicsHeader
-import kotlinx.android.synthetic.main.cart_frag_lay.*
-import java.util.*
-
-/**
- * @author LDD
- * @From   com.enation.javashop.android.component.cart.fragment
- * @Date   2018/2/24 下午4:31
- * @Note   购物车Fragment
- */
-@Router(path = "/cart/fragment")
-class CartFragment :BaseFragment<CartFragmentPresenter,CartFragLayBinding>(),CartFragmentContract.View ,CartActionAgreement {
-
-    private var hasSelectGoods = false
-
-    /**
-     * @Name  adapterList
-     * @Type  ArrayList<DelegateAdapter.Adapter<*>>
-     * @Note  适配器列表
-     */
-    private var adapterList = ArrayList<DelegateAdapter.Adapter<*>>()
-
-    /**
-     * @Name  virtualLayoutManager
-     * @Type  VirtualLayoutManager
-     * @Note  七巧板LayoutManager
-     */
-    private lateinit var virtualLayoutManager : VirtualLayoutManager
-
-    /**
-     * @Name  delegateAdapter
-     * @Type  DelegateAdapter
-     * @Note  七巧板适配器
-     */
-    private lateinit var delegateAdapter : DelegateAdapter
-
-    /**
-     * @author LDD
-     * @From   CartFragment
-     * @Date   2018/2/24 下午4:35
-     * @Note   获取LayoutId
-     */
-    override fun getLayId(): Int {
-        return R.layout.cart_frag_lay
-    }
-
-    /**
-     * @author LDD
-     * @From   CartFragment
-     * @Date   2018/2/24 下午4:35
-     * @Note   依赖注入
-     */
-    override fun bindDagger() {
-        CartLaunch.component.inject(this)
-    }
-
-    /**
-     * @author LDD
-     * @From   CartFragment
-     * @Date   2018/2/24 下午4:35
-     * @Note   初始化
-     */
-    override fun init() {
-        virtualLayoutManager =  VirtualLayoutManager(this.activity)
-        delegateAdapter = DelegateAdapter(virtualLayoutManager)
-        mViewDataBinding.cartFragRcList.layoutManager = virtualLayoutManager
-        mViewDataBinding.cartFragRcList.adapter = delegateAdapter
-        mViewDataBinding.cartFragRcList.setBackgroundColor(Color.WHITE)
-        presenter.loadCartData()
-        mViewDataBinding.cartFragHeader.setLineBgColor(Color.TRANSPARENT)
-    }
-
-    /**
-     * @author LDD
-     * @From   CartFragment
-     * @Date   2018/2/24 下午4:35
-     * @Note   绑定事件及数据
-     */
-    override fun bindEvent() {
-        if (getActivity() is CartActivity){
-            cart_frag_header.setLeftImage(R.drawable.javashop_back_black).setLeftClickListener {
-                getActivity().to<CartActivity>().pop()
-            }
-        }
-        cart_frag_create_order_tv.setOnClickListener {
-            if (!MemberState.manager.getLoginState()){
-                showMessage("未登录")
-                return@setOnClickListener
-            }
-            if (!hasSelectGoods){
-                showMessage("请选择结算商品")
-                return@setOnClickListener
-            }
-            push("/order/create")
-        }
-        cart_frag_all_ck.setOnClickListener {
-            presenter.allCheck(cart_frag_all_ck.isChecked)
-        }
-        cart_refresh_layout.setHeaderHeight((ScreenTool.getScreenWidth(activity) * 0.25).pxToDp().toFloat())
-        cart_refresh_layout.setEnableRefresh(true)
-        cart_refresh_layout.setRefreshHeader(ClassicsHeader(activity))
-        cart_refresh_layout.setOnRefreshListener {
-            Handler().postDelayed({
-                presenter.loadCartData()
-                it.finishRefresh()
-            },1000)
-        }
-        getEventCenter().register(LoginEvent::class.java) {
-            presenter.loadCartData()
-        }.joinManager(disposableManager)
-        getEventCenter().register(LogoutEvent::class.java) {
-            showCartView(listOf(),0.0,0.0,0.0)
-        }.joinManager(disposableManager)
-        getEventCenter().register(CartDataChange::class.java) {
-            presenter.loadCartData()
-        }.joinManager(disposableManager)
-    }
-
-    /**
-     * @author LDD
-     * @From   CartFragment
-     * @Date   2018/2/24 下午4:37
-     * @Note   显示购物车数据
-     * @param  cart 购物车数据
-     */
-    override fun showCartView(cart: List<Any>,price :Double,cashPrice :Double ,orgPrice :Double) {
-        var allCheck = true
-        adapterList.clear()
-        adapterList = ArrayList<DelegateAdapter.Adapter<*>>().then {
-            self ->
-            cart.forEach { item ->
-                when(item){
-                    is CartShopItemViewModel ->{
-                        if (allCheck){
-                            allCheck = item.isCheck
-                        }
-                        if (!hasSelectGoods){
-                            hasSelectGoods = item.isCheck
-                        }
-                        self.add(CartShopItemAdapter(this,item))
-                    }
-                    is String ->{
-                        if (item == "Holder"){
-                            /**
-                             * 占位视图
-                             */
-                            val holderView = VlayoutHolderAdapter(object : VlayoutHolderAdapter.HolderCallBack{
-                                override fun bindView(holder: RecyclerView.ViewHolder) {
-                                    holder.itemView.setBackgroundColor(Color.WHITE)
-                                    holder.itemView.layoutParams = VirtualLayoutManager.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, (ScreenTool.dip2px(holder.itemView.context,15f)))
-                                }
-
-                                override fun layoutHelperProvider(): LayoutHelper {
-                                    return LinearLayoutHelper(0,1)
-                                }
-
-                                override fun viewHolderProvider(parent : ViewGroup): RecyclerView.ViewHolder {
-                                    return VlayoutHolderAdapter.PlaceHolder(View(parent.context))
-                                }
-
-                            })
-                            self.add(holderView)
-                        }else{
-                            self.add(CartPromotionItemAdapter(this,item))
-                        }
-                    }
-                    is CartGoodsItemViewModel ->{
-                        if (allCheck){
-                            allCheck = item.isCheck
-                        }
-                        if (!hasSelectGoods){
-                            hasSelectGoods = item.isCheck
-                        }
-                        self.add(CartGoodsItemAdapter(this, arrayListOf(item)))
-                    }
-                }
-            }
-        }
-        if (adapterList.count() == 0){
-            allCheck = false
-            hasSelectGoods = false
-        }
-        delegateAdapter.clear()
-        delegateAdapter.notifyDataSetChanged()
-        delegateAdapter.addAdapters(adapterList)
-        delegateAdapter.notifyDataSetChanged()
-        cart_frag_all_ck.isChecked = allCheck
-        cart_frag_price_tv.text = String.format("合计:¥%.2f",price)
-        cart_frag_promotion_price_tv.text = String.format("总额:¥%.2f 立减:¥%.2f",orgPrice,cashPrice)
-    }
-
-    /**
-     * @author LDD
-     * @From   CartFragment
-     * @Date   2018/2/24 下午4:36
-     * @Note   列表店铺Item选中回调
-     * @param  shopId 店铺ID
-     * @param  checked 是否选中
-     */
-    override fun shopCheck(shopId: Int, checked: Boolean) {
-        presenter.shopCheck(shopId,checked)
-    }
-
-    /**
-     * @author LDD
-     * @From   CartFragment
-     * @Date   2018/2/24 下午4:38
-     * @Note   商品选中回调
-     * @param  productId 商品ProductId
-     * @param  checked 是否选中
-     */
-    override fun goodsEdit(productId: Int, num: Int?, checked: Boolean?) {
-        presenter.editItem(productId,checked,num)
-    }
-
-    /**
-     * @author LDD
-     * @From   CartFragment
-     * @Date   2018/2/24 下午4:39
-     * @Note   组合促销详细回调
-     * @param  cartPromotionItemViewModel 组合促销详细数据
-     */
-    override fun groupPromotionDetail(cartPromotionItemViewModel: CartPromotionItemViewModel) {
-
-    }
-
-    override fun showCoupon(coupons: ArrayList<CouponViewModel>) {
-        showPopView("优惠券", TextViewDelegateAdapter("可领取优惠券",23, Color.BLACK,10.dpToPx(),10.dpToPx(),10.dpToPx(),10.dpToPx(), Color.TRANSPARENT),
-                ReflexHelper.build("com.enation.javashop.android.component.member.adapter.CouponAdapter")
-                        .newInstance(coupons).getInstance<BaseDelegateAdapter<*, CouponViewModel>>().then {
-                            it.setOnItemClickListener { data, position ->
-                                presenter.getCoupon(data.id)
-                            }
-                        })
-    }
-
-    /**
-     * @author LDD
-     * @From   CartFragment
-     * @Date   2018/2/24 下午4:41
-     * @Note   单品促销选择回调
-     * @param  singglepromotionList 单品促销列表
-     */
-    override fun selectSingglePromotion(sellerId: Int, skuId: Int, singglepromotionList: List<SingglePromotionViewModel>?) {
-        var data : List<SingglePromotionViewModel> = ArrayList()
-        data += singglepromotionList!!
-        data += SingglePromotionViewModel(0,false,"取消促销","NONE")
-        val dialog = PopCommonView.build(activity)
-        dialog.setAdapters(CartSinglePromotionItemAdapter(data).then {
-                    it.setOnItemClickListener { data, position ->
-                        presenter.editPromotion(sellerId,skuId,data.promotionId,data.type)
-                        dialog.dismiss()
-                    }
-                })
-                .setTitle("促销")
-                .setConfirmVisable(false)
-                .show(cart_frag_header.holderViewProvider())
-    }
-
-    private fun showPopView(title: String ,vararg adapters : DelegateAdapter.Adapter<*>){
-        PopCommonView.build(activity)
-                .setAdapters(adapters.asList())
-                .setTitle(title)
-                .setConfirmVisable(false)
-                .show(cart_frag_header.holderViewProvider())
-    }
-
-    /**
-     * @author LDD
-     * @From   CartFragment
-     * @Date   2018/2/24 下午4:42
-     * @Note   显示商品Item更多操作Mask层
-     * @param  productId 商品productId
-     * @param  goodsId 商品Id
-     */
-    override fun showGoodsMoreMask(productId: Int, goodsId: Int) {
-       CommonTool.createVerifyDialog("请选择您要进行的操作","删除","收藏",activity,object :CommonTool.DialogInterface{
-           override fun yes() {
-               presenter.collectionGoods(goodsId)
-           }
-
-           override fun no() {
-               presenter.deleteGoods(productId)
-           }
-       }).then {
-           it.setCanceledOnTouchOutside(true)
-       }.show()
-    }
-
-    override fun deleteGoods(productId: Int) {
-        presenter.deleteGoods(productId)
-    }
-
-    /**
-     * @author LDD
-     * @From   CartFragment
-     * @Date   2018/2/24 下午4:43
-     * @Note   显示店铺可领取优惠券
-     * @param  shopId 店铺Id
-     */
-    override fun showShopBonus(shopId: Int) {
-       presenter.loadCoupon(shopId)
-    }
-
-    /**
-     * @author LDD
-     * @From   CartFragment
-     * @Date   2018/2/24 下午4:43
-     * @Note   去店铺页面
-     * @param  shopId 店铺Id
-     */
-    override fun toShop(shopId: Int) {
-        push("/shop/detail",{
-            it.withInt("shopId",shopId)
-        })
-    }
-
-    /**
-     * @author LDD
-     * @From   CartFragment
-     * @Date   2018/2/24 下午4:43
-     * @Note   去商品页面
-     * @param  goodsId 商品ID
-     */
-    override fun toGoods(goodsId: Int) {
-        push("/goods/detail",{
-            it.withInt("goodsId",goodsId)
-        })
-    }
-
-    /**
-     * @author LDD
-     * @From   CartFragment
-     * @Date   2018/2/24 下午4:44
-     * @Note   逻辑操作失败回调
-     * @param  message 失败原因
-     */
-    override fun onError(message: String, type: Int) {
-        if (message != "未登录"){
-            showMessage(message)
-        }
-        getUtils().dismissDialog()
-    }
-
-    /**
-     * @author LDD
-     * @From   CartFragment
-     * @Date   2018/2/24 下午4:44
-     * @Note   逻辑操作完成回调
-     * @param  message 完成信息
-     */
-    override fun complete(message: String, type: Int) {
-        showMessage(message)
-        getUtils().dismissDialog()
-    }
-
-    /**
-     * @author LDD
-     * @From   CartFragment
-     * @Date   2018/2/24 下午4:44
-     * @Note   逻辑操作开始回调
-     */
-    override fun start() {
-        getUtils().showDialog()
-    }
-
-    /**
-     * @author LDD
-     * @From   CartFragment
-     * @Date   2018/2/24 下午4:45
-     * @Note   网络状态实时监听回调
-     * @param  state 网络状态
-     */
-    override fun networkMonitor(state: NetState) {
-
-    }
-
-    /**
-     * @author LDD
-     * @From   CartFragment
-     * @Date   2018/2/24 下午4:36
-     * @Note   页面销毁时调用
-     */
-    override fun destory() {
-
-    }
-}

+ 0 - 26
cart/src/main/code/com/enation/javashop/android/component/cart/launch/CartLaunch.kt

@@ -1,26 +0,0 @@
-package com.enation.javashop.android.component.cart.launch
-
-import com.enation.javashop.android.component.cart.di.CartComponent
-import com.enation.javashop.android.component.cart.di.DaggerCartComponent
-import com.enation.javashop.android.jrouter.external.annotation.Router
-import com.enation.javashop.android.lib.base.BaseLaunch
-import com.enation.javashop.android.middleware.di.DaggerManager
-
-/**
- * @author LDD
- * @Date   2018/1/22 下午2:44
- * @From   com.enation.javashop.android.component.cart.launch
- * @Note   Cart模块启动类 代替Application 在壳工程Application中反射调用
- */
-@Router(path = "/cart/launch")
-class CartLaunch :BaseLaunch(){
-    companion object {
-        lateinit var component: CartComponent
-    }
-
-    override fun moduleInit() {
-        component = DaggerCartComponent.builder()
-                .applicationComponent(DaggerManager.APPLICATION_COMPONENT)
-                .build()
-    }
-}

+ 0 - 26
cart/src/main/code/com/enation/javashop/android/component/cart/util/BaseCartItemAdapter.kt

@@ -1,26 +0,0 @@
-package com.enation.javashop.android.component.cart.util
-
-import android.support.v7.widget.RecyclerView
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-
-
-/**
- * @author LDD
- * @Date   2018/2/6 下午5:06
- * @From   com.enation.javashop.android.component.cart.util
- * @Note   购物车Item基础适配器
- */
- abstract class BaseCartItemAdapter<VH : RecyclerView.ViewHolder,DataType>(private val cartAction : CartActionAgreement): BaseDelegateAdapter<VH, DataType>() {
-
-    /**
-     * @author LDD
-     * @From   BaseCartItemAdapter
-     * @Date   2018/2/9 下午2:02
-     * @Note   购物车操作协议提供者
-     * @return 购物车操作协议
-     */
-    fun actionProvider():CartActionAgreement{
-        return cartAction
-    }
-
-}

+ 0 - 91
cart/src/main/code/com/enation/javashop/android/component/cart/util/CartActionAgreement.kt

@@ -1,91 +0,0 @@
-package com.enation.javashop.android.component.cart.util
-
-import com.enation.javashop.android.middleware.model.CartPromotionItemViewModel
-import com.enation.javashop.android.middleware.model.SingglePromotionViewModel
-
-/**
- * @author LDD
- * @Date   2018/2/6 下午4:19
- * @From   com.enation.javashop.android.component.cart.util
- * @Note   购物车列表操作协议
- */
-interface CartActionAgreement {
-
-    /**
-     * @author LDD
-     * @From   CartActionAgreement
-     * @Date   2018/2/6 下午4:25
-     * @Note   店铺选择
-     * @param  shopId 店铺Id
-     * @param  checked 是否选中
-     */
-    fun shopCheck(shopId :Int , checked : Boolean)
-
-    /**
-     * @author LDD
-     * @From   CartActionAgreement
-     * @Date   2018/2/6 下午4:26
-     * @Note   商品数量修改
-     * @param  productId 商品ID
-     * @param  num 修改后的数量
-     */
-    fun goodsEdit(productId: Int,num :Int?,checked: Boolean?)
-
-    /**
-     * @author LDD
-     * @From   CartActionAgreement
-     * @Date   2018/2/6 下午4:28
-     * @Note   组合促销详细
-     * @param  cartPromotionItemViewModel 组合促销详情
-     */
-    fun groupPromotionDetail(cartPromotionItemViewModel: CartPromotionItemViewModel)
-
-    /**
-     * @author LDD
-     * @From   CartActionAgreement
-     * @Date   2018/2/6 下午4:29
-     * @Note   单品促销选择
-     * @param  singglepromotionList 单品促销列表
-     */
-    fun selectSingglePromotion(sellerId :Int , skuId :Int,singglepromotionList : List<SingglePromotionViewModel>?)
-
-    /**
-     * @author LDD
-     * @From   CartActionAgreement
-     * @Date   2018/2/6 下午4:30
-     * @Note   显示商品操作遮罩
-     * @param  productId  商品skuId
-     * @param  goodsId    商品ID
-     */
-    fun showGoodsMoreMask(productId : Int , goodsId :Int)
-
-    /**
-     * @author LDD
-     * @From   CartActionAgreement
-     * @Date   2018/2/6 下午4:31
-     * @Note   显示店铺优惠券列表
-     * @param  shopId 店铺Id
-     */
-    fun showShopBonus(shopId: Int)
-
-    /**
-     * @author LDD
-     * @From   CartActionAgreement
-     * @Date   2018/2/24 下午1:43
-     * @Note   去店铺
-     * @param  shopId 店铺Id
-     */
-    fun toShop(shopId : Int)
-
-    /**
-     * @author LDD
-     * @From   CartActionAgreement
-     * @Date   2018/2/24 下午1:44
-     * @Note   去商品页
-     * @param  goodsId 商品ID
-     */
-    fun toGoods(goodsId :Int)
-
-    fun deleteGoods(productId: Int)
-
-}

+ 0 - 11
cart/src/main/res/layout/cart_act_lay.xml

@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<android.support.constraint.ConstraintLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-<FrameLayout
-    android:id="@+id/fragment"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-</FrameLayout>
-</android.support.constraint.ConstraintLayout>

+ 0 - 157
cart/src/main/res/layout/cart_frag_lay.xml

@@ -1,157 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout>
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:app="http://schemas.android.com/apk/res-auto"
-        xmlns:bind="http://schemas.android.com/apk/res-auto"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        xmlns:tools="http://schemas.android.com/tools">
-        <com.enation.javashop.android.lib.widget.CommonActionBar
-            android:id="@+id/cart_frag_header"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            bind:auto_topbar_height="@{true}"
-            app:title_text="购物车"
-            app:title_text_color="@color/javashop_color_black"
-            app:holder_visibility="false"
-            />
-        <android.support.constraint.ConstraintLayout
-            android:id="@+id/cart_frag_bottom_bar"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintDimensionRatio="h,7:1"
-            bind:backgroundColor="@{@color/javashop_color_white}"
-            android:background="@color/javashop_color_white"
-            >
-            <CheckBox
-                android:id="@+id/cart_frag_all_ck"
-                style="@style/constraintLayout_config"
-                android:layout_gravity="center_vertical"
-                android:background="@drawable/javashop_check_box_selector"
-                android:button="@null"
-                android:checked="true"
-                android:visibility="visible"
-                android:layout_marginLeft="10dp"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintDimensionRatio="w,1:1"
-                app:layout_constraintHeight_default="percent"
-                app:layout_constraintHeight_percent="0.4"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                />
-            <TextView
-                android:id="@+id/cart_frag_all_tv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintLeft_toRightOf="@id/cart_frag_all_ck"
-                app:layout_constraintWidth_percent="0.08"
-                android:text="全选"
-                android:lines="1"
-                style="@style/auto_text_size"
-                android:layout_marginLeft="5dp"
-                android:gravity="center"
-                android:textColor="@color/javashop_color_navy"
-                app:autoSizeMaxTextSize="100sp"
-                app:autoSizeMinTextSize="10sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                />
-            <TextView
-                android:id="@+id/cart_frag_create_order_tv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintWidth_percent="0.3"
-                android:gravity="center"
-                android:lines="1"
-                android:text="去结算"
-                android:textSize="18sp"
-                android:textColor="@color/javashop_color_white"
-                android:background="@drawable/javashop_bg_red_shadow"
-                />
-            <TextView
-                android:id="@+id/cart_frag_price_tv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:gravity="center_vertical"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toTopOf="@+id/cart_frag_promotion_price_tv"
-                app:layout_constraintLeft_toRightOf="@id/cart_frag_all_tv"
-                app:layout_constraintRight_toLeftOf="@id/cart_frag_create_order_tv"
-                android:text="合计:¥0.00"
-                app:layout_constraintHeight_percent="0.45"
-                android:lines="1"
-                style="@style/auto_text_size"
-                android:textStyle="bold"
-                android:layout_marginLeft="5dp"
-                android:layout_marginRight="5dp"
-                android:textColor="@color/javashop_color_navy"
-                app:autoSizeMaxTextSize="100sp"
-                app:autoSizeMinTextSize="10sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                />
-            <TextView
-                android:textStyle="bold"
-                android:id="@+id/cart_frag_promotion_price_tv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:gravity="center_vertical"
-                app:layout_constraintTop_toBottomOf="@id/cart_frag_price_tv"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintLeft_toRightOf="@id/cart_frag_all_tv"
-                app:layout_constraintRight_toLeftOf="@id/cart_frag_create_order_tv"
-                android:text="总额:¥0.00 立减¥0.00"
-                app:layout_constraintHeight_percent="0.3"
-                android:lines="1"
-                style="@style/auto_text_size"
-                android:layout_marginLeft="5dp"
-                android:layout_marginRight="5dp"
-                android:textColor="@color/javashop_color_navy"
-                app:autoSizeMaxTextSize="100sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                />
-            <View
-                android:layout_width="0dp"
-                android:layout_height="0.5dp"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toLeftOf="@id/cart_frag_create_order_tv"
-                android:background="@color/color_gray"
-                />
-        </android.support.constraint.ConstraintLayout>
-        <com.scwang.smartrefresh.layout.SmartRefreshLayout
-            android:id="@+id/cart_refresh_layout"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:srlEnableLoadMore="false"
-            app:srlEnableRefresh="true"
-            app:srlHeaderHeight="100dp"
-            app:layout_constraintBottom_toTopOf="@id/cart_frag_bottom_bar"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintTop_toBottomOf="@id/cart_frag_header">
-            <android.support.v7.widget.RecyclerView
-                android:id="@+id/cart_frag_rc_list"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:background="@color/color_white"
-                />
-        </com.scwang.smartrefresh.layout.SmartRefreshLayout>
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 361
cart/src/main/res/layout/cart_goods_item.xml

@@ -1,361 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:app="http://schemas.android.com/apk/res-auto">
-    <data>
-        <variable
-            name="goodsItemData"
-            type="com.enation.javashop.android.middleware.model.CartGoodsItemViewModel"/>
-        <import type="android.view.View"/>
-    </data>
-
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:bind="http://schemas.android.com/apk/res-auto"
-        xmlns:tools="http://schemas.android.com/tools"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:background="@color/javashop_color_white"
-        bind:backgroundColor="@{@color/javashop_color_white}"
-        >
-        <CheckBox
-            android:id="@+id/cart_goods_item_check"
-            android:layout_width="25dp"
-            android:layout_height="25dp"
-            android:layout_marginLeft="10dp"
-            android:layout_gravity="center_vertical"
-            android:background="@drawable/javashop_check_box_selector"
-            android:button="@null"
-            android:checked="@{goodsItemData.checkedObservable.get()}"
-            android:visibility="visible"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toTopOf="parent"
-            />
-        <android.support.constraint.ConstraintLayout
-            android:id="@+id/cart_goods_item_content"
-            android:layout_marginLeft="10dp"
-            android:layout_width="0dp"
-            android:paddingBottom="10dp"
-            android:paddingLeft="10dp"
-            android:paddingTop="10dp"
-            android:layout_marginRight="10dp"
-            android:layout_height="wrap_content"
-            android:background="@drawable/javashop_shadow_white_bg"
-            bind:layout_constraintLeft_toRightOf="@id/cart_goods_item_check"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintTop_toTopOf="parent"
-            >
-            <android.support.constraint.ConstraintLayout
-                android:id="@+id/goods_content"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                bind:layout_constraintDimensionRatio="h,10:3"
-                bind:layout_constraintLeft_toLeftOf="parent"
-                bind:layout_constraintRight_toRightOf="parent"
-                bind:layout_constraintTop_toTopOf="parent"
-                >
-                <ImageView
-                    android:id="@+id/cart_goods_item_iv"
-                    style="@style/constraintLayout_config"
-                    android:scaleType="centerCrop"
-                    bind:layout_constraintVertical_bias="0"
-                    app:layout_constraintDimensionRatio="h,1:1"
-                    bind:layout_constraintWidth_percent="0.3"
-                    bind:layout_constraintWidth_default="percent"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    bind:layout_constraintLeft_toLeftOf="parent"
-                    bind:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintTop_toTopOf="parent"
-                    bind:layout_constraintHorizontal_bias="0"
-                    bind:url="@{goodsItemData.imageUrl}"
-                    />
-                <ImageView
-                    android:id="@+id/cart_goods_item_nostack"
-                    style="@style/constraintLayout_config"
-                    android:scaleType="centerCrop"
-                    app:layout_constraintDimensionRatio="h,1:1"
-                    bind:layout_constraintWidth_percent="0.21"
-                    bind:layout_constraintLeft_toLeftOf="@id/cart_goods_item_iv"
-                    bind:layout_constraintRight_toRightOf="@id/cart_goods_item_iv"
-                    bind:layout_constraintTop_toTopOf="@id/cart_goods_item_iv"
-                    bind:layout_constraintBottom_toBottomOf="@id/cart_goods_item_iv"
-                    android:background="@drawable/javashop_icon_no_stock"
-                    android:visibility="@{goodsItemData.errorMessage.empty ? View.GONE : View.VISIBLE}"
-                    />
-                <TextView
-                    android:id="@+id/cart_goods_item_name_tv"
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    bind:layout_constraintDimensionRatio="h,4:1"
-                    android:layout_marginLeft="10dp"
-                    android:layout_marginRight="10dp"
-                    android:ellipsize="end"
-                    android:lines="2"
-                    android:text="@{goodsItemData.name}"
-                    android:textColor="@color/javashop_color_cart_goods_item_name_tc"
-                    android:textSize="17sp"
-                    app:layout_constraintHeight_default="percent"
-                    app:layout_constraintLeft_toRightOf="@id/cart_goods_item_iv"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintTop_toTopOf="@id/cart_goods_item_iv"
-                    tools:ignore="MissingPrefix"
-                    />
-
-                <TextView
-                    android:id="@+id/cart_goods_item_spec_tv"
-                    style="@style/constraintLayout_config"
-                    android:layout_marginLeft="10dp"
-                    android:layout_marginRight="10dp"
-                    android:ellipsize="end"
-                    android:layout_marginTop="5dp"
-                    android:lines="1"
-                    android:text="@{goodsItemData.spec}"
-                    android:textColor="@color/javashop_color_cart_goods_item_spec_tc"
-                    app:autoSizeMaxTextSize="100sp"
-                    app:autoSizeMinTextSize="10sp"
-                    app:autoSizeStepGranularity="1sp"
-                    app:autoSizeTextType="uniform"
-                    app:layout_constraintHeight_default="percent"
-                    app:layout_constraintHeight_percent="0.15"
-                    app:layout_constraintLeft_toRightOf="@id/cart_goods_item_iv"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintTop_toBottomOf="@id/cart_goods_item_name_tv"
-                    tools:ignore="MissingPrefix"
-                    />
-
-                <ImageView
-                    android:id="@+id/cart_goods_add_btn"
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    android:layout_marginBottom="5dp"
-                    android:layout_marginRight="5dp"
-                    android:padding="5dp"
-                    android:src="@drawable/javashop_cart_add_btn_bg"
-                    app:layout_constraintBottom_toBottomOf="@id/cart_goods_item_iv"
-                    app:layout_constraintDimensionRatio="w,1:1"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintWidth_default="percent"
-                    app:layout_constraintWidth_percent="0.07"
-                    />
-
-                <TextView
-                    android:id="@+id/cart_goods_num_tv"
-                    style="@style/constraintLayout_config"
-                    android:layout_marginLeft="10dp"
-                    android:gravity="center"
-                    android:lines="1"
-                    android:background="#f6f6f6"
-                    android:paddingBottom="3dp"
-                    android:paddingTop="3dp"
-                    android:paddingLeft="10dp"
-                    android:paddingRight="10dp"
-                    android:text="@{goodsItemData.currentNum}"
-                    android:textSize="12sp"
-                    app:layout_constraintRight_toLeftOf="@id/cart_goods_add_btn"
-                    app:layout_constraintTop_toTopOf="@id/cart_goods_add_btn"
-                    bind:layout_constraintBottom_toBottomOf="@id/cart_goods_add_btn"
-                    app:layout_constraintWidth_default="wrap"
-                    />
-
-                <ImageView
-                    android:id="@+id/cart_goods_reduce_btn"
-                    style="@style/constraintLayout_config"
-                    android:padding="5dp"
-                    android:src="@drawable/javashop_cart_add_reduce_bg"
-                    app:layout_constraintBottom_toBottomOf="@id/cart_goods_add_btn"
-                    app:layout_constraintDimensionRatio="h,1:1"
-                    app:layout_constraintRight_toLeftOf="@id/cart_goods_num_tv"
-                    app:layout_constraintTop_toTopOf="@id/cart_goods_add_btn"
-                    app:layout_constraintWidth_default="percent"
-                    app:layout_constraintWidth_percent="0.07"
-                    />
-
-                <TextView
-                    android:id="@+id/cart_goods_price_tv"
-                    style="@style/constraintLayout_config"
-                    android:gravity="center_vertical"
-                    android:paddingRight="10dp"
-                    android:textColor="@color/javashop_color_cart_goods_price"
-                    app:autoSizeMaxTextSize="100sp"
-                    app:autoSizeMinTextSize="10sp"
-                    app:autoSizeStepGranularity="2sp"
-                    app:autoSizeTextType="uniform"
-                    app:layout_constraintBottom_toBottomOf="@id/cart_goods_item_iv"
-                    app:layout_constraintHeight_default="percent"
-                    bind:layout_constraintTop_toBottomOf="@id/cart_goods_item_spec_tv"
-                    app:layout_constraintLeft_toRightOf="@id/cart_goods_item_iv"
-                    app:layout_constraintRight_toLeftOf="@id/cart_goods_reduce_btn"
-                    bind:layout_constraintWidth_percent="0.4"
-                    bind:layout_constraintDimensionRatio="h,6:1"
-                    tools:ignore="MissingPrefix"/>
-            </android.support.constraint.ConstraintLayout>
-
-            <LinearLayout
-                android:id="@+id/promotion_tag_parent"
-                android:orientation="horizontal"
-                android:visibility="@{goodsItemData.promotionList == null || goodsItemData.promotionList.size() == 0 ? View.GONE : View.VISIBLE}"
-                style="@style/constraintLayout_config"
-                android:layout_marginTop="5dp"
-                app:layout_constraintDimensionRatio="h,16.5:1"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toBottomOf="@id/goods_content">
-            </LinearLayout>
-
-            <android.support.constraint.ConstraintLayout
-                android:id="@+id/cart_goods_item_error_lay"
-                style="@style/constraintLayout_config"
-                android:layout_marginTop="5dp"
-                android:visibility="@{goodsItemData.errorMessage.empty ? View.GONE : View.VISIBLE}"
-                app:layout_constraintDimensionRatio="h,16.5:1"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toBottomOf="@id/promotion_tag_parent">
-
-                <TextView
-                    android:id="@+id/cart_goods_item_error_header"
-                    style="@style/constraintLayout_config"
-                    android:gravity="center"
-                    android:background="@drawable/javashop_fillet_red_circle_bg"
-                    android:text="无货原因"
-                    android:textColor="#f52523"
-                    app:autoSizeMaxTextSize="100sp"
-                    android:paddingLeft="2.5dp"
-                    android:paddingRight="2.5dp"
-                    app:autoSizeMinTextSize="10sp"
-                    app:autoSizeStepGranularity="2sp"
-                    app:autoSizeTextType="uniform"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintHeight_default="percent"
-                    app:layout_constraintHeight_percent="0.8"
-                    bind:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintWidth_default="percent"
-                    bind:layout_constraintWidth_percent="0.2"
-                    tools:ignore="MissingPrefix"
-                    />
-
-                <TextView
-                    android:id="@+id/cart_goods_item_error_edit"
-                    style="@style/constraintLayout_config"
-                    android:layout_marginRight="10dp"
-                    android:gravity="end"
-                    android:text="查看详情"
-                    android:textColor="@color/black"
-                    app:autoSizeMaxTextSize="100sp"
-                    app:autoSizeMinTextSize="7sp"
-                    app:autoSizeStepGranularity="2sp"
-                    app:autoSizeTextType="uniform"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintHeight_default="percent"
-                    app:layout_constraintHeight_percent="1"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintWidth_default="percent"
-                    bind:layout_constraintWidth_percent="0.18"
-                    tools:ignore="MissingPrefix"
-                    />
-
-                <TextView
-                    android:id="@+id/cart_goods_item_error_content"
-                    style="@style/constraintLayout_config"
-                    android:gravity="center_vertical"
-                    android:paddingLeft="10dp"
-                    android:text="@{goodsItemData.errorMessage}"
-                    android:textColor="#474747"
-                    android:ellipsize="end"
-                    app:autoSizeMaxTextSize="100sp"
-                    app:autoSizeMinTextSize="12sp"
-                    android:singleLine="true"
-                    app:autoSizeStepGranularity="2sp"
-                    app:autoSizeTextType="uniform"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintHeight_percent="1"
-                    app:layout_constraintLeft_toRightOf="@id/cart_goods_item_error_header"
-                    app:layout_constraintRight_toLeftOf="@id/cart_goods_item_error_edit"
-                    app:layout_constraintTop_toTopOf="parent"
-                    tools:ignore="MissingPrefix"
-                    />
-            </android.support.constraint.ConstraintLayout>
-
-
-            <android.support.constraint.ConstraintLayout
-                android:id="@+id/cart_goods_item_singgle_promotion_lay"
-                style="@style/constraintLayout_config"
-                android:layout_marginTop="5dp"
-                android:visibility="@{goodsItemData.promotionList == null || goodsItemData.promotionList.size() == 0 ? View.GONE : View.VISIBLE}"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintDimensionRatio="h,16.5:1"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toBottomOf="@id/cart_goods_item_error_lay">
-
-                <TextView
-                    android:id="@+id/cart_goods_item_singgle_promotion_header"
-                    style="@style/constraintLayout_config"
-                    android:gravity="center"
-                    android:background="@drawable/javashop_fillet_red_circle_bg"
-                    android:text="@string/javashop_promotion_string"
-                    android:textColor="#f52523"
-                    app:autoSizeMaxTextSize="100sp"
-                    android:paddingLeft="2.5dp"
-                    android:paddingRight="2.5dp"
-                    app:autoSizeMinTextSize="10sp"
-                    app:autoSizeStepGranularity="2sp"
-                    app:autoSizeTextType="uniform"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintHeight_default="percent"
-                    app:layout_constraintHeight_percent="0.8"
-                    bind:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintWidth_default="percent"
-                    bind:layout_constraintWidth_percent="0.125"
-                    tools:ignore="MissingPrefix"
-                    />
-
-                <TextView
-                    android:id="@+id/cart_goods_item_singgle_promotion_edit"
-                    style="@style/constraintLayout_config"
-                    android:layout_marginRight="10dp"
-                    android:gravity="end"
-                    android:text="@string/javashop_singgle_promotion_edit_string"
-                    android:textColor="@color/black"
-                    app:autoSizeMaxTextSize="100sp"
-                    app:autoSizeMinTextSize="7sp"
-                    app:autoSizeStepGranularity="2sp"
-                    app:autoSizeTextType="uniform"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintHeight_default="percent"
-                    app:layout_constraintHeight_percent="1"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintWidth_default="percent"
-                    bind:layout_constraintWidth_percent="0.15"
-                    tools:ignore="MissingPrefix"
-                    />
-
-                <TextView
-                    android:id="@+id/cart_goods_item_singgle_promotion_content"
-                    style="@style/constraintLayout_config"
-                    android:gravity="center_vertical"
-                    android:paddingLeft="10dp"
-                    android:text="@{goodsItemData.title()}"
-                    android:textColor="#474747"
-                    app:autoSizeMaxTextSize="100sp"
-                    app:autoSizeMinTextSize="7sp"
-                    app:autoSizeStepGranularity="2sp"
-                    app:autoSizeTextType="uniform"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintHeight_percent="1"
-                    app:layout_constraintLeft_toRightOf="@id/cart_goods_item_singgle_promotion_header"
-                    app:layout_constraintRight_toLeftOf="@id/cart_goods_item_singgle_promotion_edit"
-                    app:layout_constraintTop_toTopOf="parent"
-                    tools:ignore="MissingPrefix"
-                    />
-            </android.support.constraint.ConstraintLayout>
-
-        </android.support.constraint.ConstraintLayout>
-
-
-
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 66
cart/src/main/res/layout/cart_promotion_item.xml

@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout>
-    <data>
-        <import type="android.view.View"/>
-        <variable
-            name="promotionItemData"
-            type="String"/>
-    </data>
-<android.support.constraint.ConstraintLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="40dp"
-    android:background="@color/javashop_color_cart_promotion_item_bg"
-    >
-    <TextView
-        android:layout_marginLeft="45dp"
-        android:id="@+id/cart_promotion_tag"
-        style="@style/auto_text_size"
-        app:autoSizeMaxTextSize="100sp"
-        app:autoSizeMinTextSize="1sp"
-        app:autoSizeStepGranularity="2sp"
-        android:paddingLeft="5dp"
-        android:paddingRight="5dp"
-        android:layout_width="0dp"
-        android:layout_height="0dp"
-        app:autoSizeTextType="uniform"
-        android:background="@drawable/javashop_red_radis_bg"
-        android:gravity="center"
-        android:text="满优惠"
-        android:textColor="@color/color_white"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintHeight_default="percent"
-        app:layout_constraintHeight_percent="0.5"
-        app:layout_constraintWidth_percent="0.13"
-        app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        tools:ignore="MissingPrefix"
-        />
-    <TextView
-        android:id="@+id/cart_promotion_content_tv"
-        style="@style/auto_text_size"
-        app:autoSizeMaxTextSize="100sp"
-        app:autoSizeMinTextSize="1sp"
-        app:autoSizeStepGranularity="2sp"
-        android:paddingLeft="5dp"
-        android:paddingRight="5dp"
-        android:layout_width="0dp"
-        android:layout_height="0dp"
-        app:autoSizeTextType="uniform"
-        android:gravity="center_vertical"
-        android:layout_marginLeft="10dp"
-        android:layout_marginRight="10dp"
-        android:textColor="@color/javashop_color_navy"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintHeight_default="percent"
-        app:layout_constraintHeight_percent="0.55"
-        app:layout_constraintLeft_toRightOf="@id/cart_promotion_tag"
-        app:layout_constraintTop_toTopOf="parent"
-        app:layout_constraintRight_toRightOf="parent"
-        tools:ignore="MissingPrefix"
-        android:text="@{promotionItemData}"
-        />
-</android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 104
cart/src/main/res/layout/cart_shop_item.xml

@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout>
-    <data>
-        <variable
-            name="shopItemData"
-            type="com.enation.javashop.android.middleware.model.CartShopItemViewModel"/>
-        <import type="android.view.View"/>
-    </data>
-<android.support.constraint.ConstraintLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="40dp"
-    android:background="@color/javashop_color_transparent">
-
-   <android.support.constraint.ConstraintLayout
-       style="@style/constraintLayout_config"
-       app:layout_constraintLeft_toLeftOf="parent"
-       app:layout_constraintRight_toRightOf="parent"
-       app:layout_constraintTop_toTopOf="parent"
-       app:layout_constraintHeight_default="percent"
-       app:layout_constraintHeight_percent="1"
-       >
-       <android.support.constraint.Guideline
-           android:id="@+id/ver_line"
-           android:layout_width="wrap_content"
-           android:layout_height="wrap_content"
-           android:orientation="vertical"
-           app:layout_constraintGuide_percent="0.7"/>
-
-       <CheckBox
-           android:id="@+id/cart_shop_item_check"
-           android:layout_width="25dp"
-           android:layout_height="25dp"
-           android:layout_gravity="center_vertical"
-           android:layout_marginLeft="10dp"
-           android:background="@drawable/javashop_check_box_selector"
-           android:button="@null"
-           android:checked="@{shopItemData.isCheck}"
-           android:visibility="visible"
-           app:layout_constraintBottom_toBottomOf="parent"
-           app:layout_constraintLeft_toLeftOf="parent"
-           app:layout_constraintTop_toTopOf="parent"
-           />
-
-       <ImageView
-           android:id="@+id/cart_shop_item_icon_iv"
-           style="@style/constraintLayout_config"
-           android:layout_height="20dp"
-           android:layout_marginLeft="5dp"
-           android:src="@{shopItemData.self ? @drawable/javashop_cart_self_shop_icon : @drawable/javashop_cart_shop_icon}"
-           app:layout_constraintBottom_toBottomOf="parent"
-           app:layout_constraintDimensionRatio="w,1:1"
-           app:layout_constraintHeight_default="percent"
-           app:layout_constraintHeight_percent="0.5"
-           app:layout_constraintLeft_toRightOf="@id/cart_shop_item_check"
-           app:layout_constraintTop_toTopOf="parent"/>
-
-       <TextView
-           android:id="@+id/cart_shop_item_name_tv"
-           style="@style/constraintLayout_config"
-           android:layout_marginLeft="5dp"
-           android:textColor="@color/javashop_color_cart_shop_item_name_tc"
-           android:gravity="center_vertical"
-           android:text="@{shopItemData.name}"
-           app:layout_constraintBottom_toBottomOf="parent"
-           app:layout_constraintLeft_toRightOf="@id/cart_shop_item_icon_iv"
-           app:layout_constraintTop_toTopOf="parent"
-           app:layout_constraintRight_toLeftOf="@id/ver_line"
-           app:autoSizeMaxTextSize="100sp"
-           app:autoSizeMinTextSize="10sp"
-           app:autoSizeStepGranularity="2sp"
-           app:autoSizeTextType="uniform"
-           tools:ignore="MissingPrefix"
-           app:layout_constraintHeight_default="percent"
-           app:layout_constraintHeight_percent="0.65"
-           />
-
-       <TextView
-           android:id="@+id/cart_shop_item_right_tv"
-           style="@style/constraintLayout_config"
-           app:autoSizeMaxTextSize="100sp"
-           app:autoSizeMinTextSize="10sp"
-           app:autoSizeStepGranularity="2sp"
-           app:autoSizeTextType="uniform"
-           tools:ignore="MissingPrefix"
-           android:gravity="right"
-           android:text="@string/javashop_cart_shop_item_title"
-           android:textColor="@color/javashop_color_navy"
-           app:layout_constraintBottom_toBottomOf="parent"
-           app:layout_constraintHeight_default="percent"
-           app:layout_constraintHeight_percent="0.6"
-           app:layout_constraintLeft_toRightOf="@id/ver_line"
-           app:layout_constraintRight_toRightOf="parent"
-           app:layout_constraintTop_toTopOf="parent"
-           android:visibility="@{shopItemData.hasBouns ?  View.VISIBLE : View.GONE}"
-           android:layout_marginRight="10dp"
-           />
-
-
-   </android.support.constraint.ConstraintLayout>
-</android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 41
cart/src/main/res/layout/cart_single_promotion_lay.xml

@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:app="http://schemas.android.com/apk/res-auto">
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content">
-        <TextView
-            android:gravity="center"
-            android:id="@+id/tag"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            app:layout_constraintHeight_percent="0.7"
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintLeft_toLeftOf="parent"
-            android:textSize="15sp"
-            android:layout_marginTop="5dp"
-            android:layout_marginBottom="5dp"
-            android:layout_marginLeft="10dp"
-            android:padding="2dp"
-            android:textColor="@color/javashop_color_price_red"
-            android:background="@drawable/javashop_fillet_red_bg"
-            />
-        <TextView
-            android:id="@+id/content"
-            android:layout_width="0dp"
-            android:gravity="center_vertical"
-            android:layout_height="0dp"
-            android:textSize="15sp"
-            app:layout_constraintLeft_toRightOf="@id/tag"
-            android:layout_marginLeft="10dp"
-            android:layout_marginTop="5dp"
-            android:layout_marginBottom="5dp"
-            android:textColor="@color/javashop_color_navy"
-            android:layout_marginRight="10dp"
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            />
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 3
cart/src/main/res/values/strings.xml

@@ -1,3 +0,0 @@
-<resources>
-    <string name="app_name">cart</string>
-</resources>

+ 0 - 17
cart/src/test/java/com/enation/javashop/android/component/cart/ExampleUnitTest.java

@@ -1,17 +0,0 @@
-package com.enation.javashop.android.component.cart;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
- */
-public class ExampleUnitTest {
-    @Test
-    public void addition_isCorrect() throws Exception {
-        assertEquals(4, 2 + 2);
-    }
-}

+ 1 - 14
common/build.gradle

@@ -77,11 +77,6 @@ dependencies {
     compile 'com.enation.geamtear.widget:ConnectView:1.1.1'
 
     /**
-     *  JavaShop_Android 支付工具库
-     */
-    compile 'com.enation.geamtear.pay:payutils:1.0.2'
-
-    /**
      *  JavaShop_Android 地区选择工具库
      */
     compile 'com.enation.geamtear.widget:districtselectorview:1.0.6'
@@ -139,7 +134,7 @@ dependencies {
      *  Kotlin依赖
      */
     compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
-    compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.19.3'
+    compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.27.0'
 
     /**
      *  Databinding
@@ -228,14 +223,6 @@ dependencies {
 
 
     compile 'com.github.pinguo-zhouwei:MZBannerView:v2.0.2'
-
-
-    /**
-     * 推送
-     */
-    compile 'com.umeng.sdk:common:1.5.3'
-    compile 'com.umeng.sdk:utdid:1.1.5.3'
-    compile 'com.umeng.sdk:push:4.2.0'
 }
 
 //tasks.withType(JavaCompile) {

+ 6 - 6
common/src/main/code/com/enation/javashop/android/lib/bind/BaseBindingHelper.kt

@@ -34,7 +34,7 @@ object BaseBindingHelper {
      * @param  imageView 需要加载图片的ImageView
      * @param  url       图片Url
      */
-    @BindingAdapter(value = "bind:url",requireAll = false)
+    @BindingAdapter(value = ["bind:url"],requireAll = false)
     @JvmStatic fun loadImage(imageView: ImageView?, url: String?) {
         if(imageView == null || url == null ||url == ""){
             return
@@ -42,7 +42,7 @@ object BaseBindingHelper {
         Glide.with(imageView.context).load(url).thumbnail(0.1f).diskCacheStrategy(DiskCacheStrategy.ALL).placeholder(R.drawable.image_loading).error(R.drawable.image_error).into(imageView)
     }
 
-    @BindingAdapter(value = "bind:url_without_holder",requireAll = false)
+    @BindingAdapter(value = ["bind:url_without_holder"],requireAll = false)
     @JvmStatic fun loadImageWithoutHoldlder(imageView: ImageView?, url: String?) {
         if(imageView == null || url == null ||url == ""){
             return
@@ -56,7 +56,7 @@ object BaseBindingHelper {
      * @Note   显示价格大小
      * @param  value 价格
      */
-    @BindingAdapter(value = "bind:price_text", requireAll = false)
+    @BindingAdapter(value = ["bind:price_text"], requireAll = false)
     @JvmStatic
     fun setPriceText(view: TextView, value: Double) {
         view.text = SpannableStringBuilder("¥$value").then { self ->
@@ -71,7 +71,7 @@ object BaseBindingHelper {
      * @Date   2018/1/30 下午3:05
      * @Note   透明渐变
      */
-    @BindingAdapter(value = "bind:alpha",requireAll = false)
+    @BindingAdapter(value = ["bind:alpha"],requireAll = false)
     @JvmStatic fun backgroundGradient(view: ConstraintLayout, value:Int){
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
             var alpha = value
@@ -91,12 +91,12 @@ object BaseBindingHelper {
      * @Date   2018/2/28 上午9:34
      * @Note   解决ConstraintLayout 无法上色
      */
-    @BindingAdapter(value = "bind:backgroundColor",requireAll = false)
+    @BindingAdapter(value = ["bind:backgroundColor"],requireAll = false)
     @JvmStatic fun setBackgroundColor(view : View, value: Int){
         view.setBackgroundColor(value)
     }
 
-    @BindingAdapter(value = "bind:text_count_for_line",requireAll = true)
+    @BindingAdapter(value = ["bind:text_count_for_line"],requireAll = true)
     @JvmStatic fun setTextSize(tv :TextView , textCount :Int){
         tv.setTextSize(TypedValue.COMPLEX_UNIT_PX,ScreenTool.getScreenWidth(BaseApplication.appContext)/textCount)
     }

+ 0 - 1
goods/.gitignore

@@ -1 +0,0 @@
-/build

+ 0 - 125
goods/build.gradle

@@ -1,125 +0,0 @@
-
-if (componentTag){
-    apply plugin: 'com.android.application'
-    apply plugin: 'com.enation.javashop.aspectjrt'
-}else{
-    apply plugin: 'com.android.library'
-}
-apply plugin: 'kotlin-android'
-apply plugin: 'kotlin-android-extensions'
-apply plugin: 'kotlin-kapt'
-
-kapt {
-    arguments {
-        arg("moduleName", project.getName())
-    }
-}
-
-android {
-    compileSdkVersion target_sdk_version
-    buildToolsVersion build_tools_version
-
-    defaultConfig {
-        if (componentTag){
-            applicationId "com.enation.javashop.android.component.goods"
-            multiDexEnabled true
-        }
-        minSdkVersion min_sdk_version
-        targetSdkVersion target_sdk_version
-        versionCode app_version_code
-        versionName app_version
-        dataBinding {
-            enabled = true
-        }
-        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
-
-    }
-    lintOptions {
-        abortOnError false
-    }
-
-
-
-    buildTypes {
-        release {
-            minifyEnabled false
-            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
-        }
-    }
-    sourceSets {
-        main.java.srcDirs += 'src/main/code'
-        if(componentTag){
-            main.manifest.srcFile 'src/main/ApkBuildDir/AndroidManifest.xml'
-        }else{
-            main.manifest.srcFile 'src/main/AndroidManifest.xml'
-            main.java {
-                exclude 'apkbuild/**'
-            }
-        }
-    }
-}
-
-dependencies {
-    compile fileTree(include: ['*.jar'], dir: 'libs')
-    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
-        exclude group: 'com.android.support', module: 'support-annotations'
-    })
-    /**
-     * 单元测试
-     */
-    testCompile 'junit:junit:4.12'
-
-    /**
-     *  Android基础依赖库
-     */
-    compile "com.android.support:design:$support_library_version"
-    compile "com.android.support:support-v4:$support_library_version"
-    compile "com.android.support:cardview-v7:$support_library_version"
-
-    /**
-     * 公共库依赖
-     */
-    compile project(':middleware')
-
-    /**
-     * 内存泄漏监控
-     */
-    if(componentTag){
-        debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'
-        releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
-        testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
-    }
-
-    /**
-     * Dagger编译依赖
-     */
-    kapt 'com.google.dagger:dagger-compiler:2.7'
-
-    /**
-     * Kotlin依赖
-     */
-    kapt 'com.android.databinding:compiler:2.3.3'
-
-    /**
-     * 路由注解处理器
-     */
-    kapt "com.enation.geamtear:jrouter-compiler:$router_version"
-
-    /**
-     *  constraint-layout布局依赖
-     */
-    compile 'com.android.support.constraint:constraint-layout:1.1.0-beta5'
-}
-
-/**
- * kawo组件化框架配置
- */
-if(componentTag){
-    kawo {
-        /**
-         * Aop注解排除Jar
-         */
-        aspectExcludeJarFilter 'com.enation.geamtear.pay','AlipaySdk'
-    }
-}
-

+ 0 - 21
goods/proguard-rules.pro

@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile

+ 0 - 26
goods/src/androidTest/java/com/enation/javashop/android/component/goods/ExampleInstrumentedTest.java

@@ -1,26 +0,0 @@
-package com.enation.javashop.android.component.goods;
-
-import android.content.Context;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import static org.junit.Assert.*;
-
-/**
- * Instrumented test, which will execute on an Android device.
- *
- * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
- */
-@RunWith(AndroidJUnit4.class)
-public class ExampleInstrumentedTest {
-    @Test
-    public void useAppContext() throws Exception {
-        // Context of the app under test.
-        Context appContext = InstrumentationRegistry.getTargetContext();
-
-        assertEquals("com.enation.javashop.android.component.goods.test", appContext.getPackageName());
-    }
-}

+ 0 - 20
goods/src/main/AndroidManifest.xml

@@ -1,20 +0,0 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-
-          package="com.enation.javashop.android.component.goods"
-    >
-
-    <application android:allowBackup="true"
-                 android:label="@string/app_name"
-                 android:supportsRtl="true"
-        >
-
-        <activity android:name=".activity.GoodsSearchActivity"
-            />
-        <activity android:name=".activity.GoodsActivity"
-            />
-        <activity android:name=".activity.SearchActivity"
-            />
-
-    </application>
-
-</manifest>

+ 0 - 15
goods/src/main/ApkBuildDir/AndroidManifest.xml

@@ -1,15 +0,0 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.enation.javashop.android.welcome">
-    <uses-permission android:name="android.permission.INTERNET"/>
-
-    <application
-        android:allowBackup="true"
-        android:label="@string/app_name"
-        android:theme="@style/Theme.AppCompat.Light.NoActionBar"
-        android:name="apkbuild.CartApplication"
-        android:supportsRtl="true">
-    </application>
-</manifest>
-
-    <!--单独Module调试 需要往Application作用域下加入皮肤-->
-    <!--android:theme="@style/Theme.AppCompat.Light.NoActionBar"-->

+ 0 - 81
goods/src/main/code/apkbuild/GoodsApplication.kt

@@ -1,81 +0,0 @@
-//package apkbuild
-//
-//import com.enation.javashop.android.jrouter.JRouter
-//import com.enation.javashop.android.lib.base.BaseApplication
-//import com.enation.javashop.net.engine.config.NetEngineConfig
-//import com.enation.javashop.net.engine.plugin.exception.RestfulExceptionInterceptor
-//import com.enation.javashop.utils.base.config.BaseConfig
-//import com.squareup.leakcanary.LeakCanary
-//import io.reactivex.Observable
-//import io.reactivex.android.schedulers.AndroidSchedulers
-//import io.reactivex.schedulers.Schedulers
-//import io.reactivex.functions.Function3
-//
-///**
-// * 单Moudle编译 Application
-// */
-//class GoodsApplication:BaseApplication() {
-//    /**
-//     * @author LDD
-//     * @From   Application
-//     * @Date   2018/1/11 下午12:50
-//     * @Note   应用启动时调用
-//     */
-//    override fun onCreate() {
-//        super.onCreate()
-//        Observable.zip(initRouter().subscribeOn(Schedulers.newThread()),
-//                initLeaks().subscribeOn(Schedulers.newThread()),
-//                initFrame().subscribeOn(Schedulers.newThread()),
-//                Function3<String,String,String,String> { _ , _ , _ -> return@Function3 "" }).
-//                observeOn(AndroidSchedulers.mainThread()).subscribe({})
-//    }
-//
-//    /**
-//     * @author  LDD
-//     * @From    Application
-//     * @Date   2018/1/11 下午12:50
-//     * @Note   初始化路由
-//     * @return rx观察者
-//     */
-//    private fun initRouter(): Observable<String> {
-//        return Observable.create {
-//            JRouter.init(this)
-//            JRouter.openDebug()
-//            JRouter.openLog()
-//            JRouter.prepare().create("/welcome/launch").seek()
-//        }
-//    }
-//
-//    /**
-//     * @author  LDD
-//     * @From    Application
-//     * @Date   2018/1/11 下午12:50
-//     * @Note   初始化内存检测器
-//     * @return rx观察者
-//     */
-//    private fun initLeaks(): Observable<String> {
-//        return Observable.create {
-//            LeakCanary.install(this)
-//        }
-//    }
-//
-//    /**
-//     * @author  LDD
-//     * @From    Application
-//     * @Date   2018/1/11 下午12:50
-//     * @Note   初始化内部框架
-//     * @return rx观察者
-//     */
-//    private fun initFrame(): Observable<String> {
-//        return Observable.create {
-//            if (android.os.Build.VERSION.SDK_INT> android.os.Build.VERSION_CODES.LOLLIPOP){
-//                BaseConfig.getInstance().addActivity("HomeActivity")
-//            }else{
-//                BaseConfig.getInstance().closeScrollBack()
-//            }
-//            NetEngineConfig.init(baseContext)
-//                    .openLogger()
-//                    .addNetInterceptor(RestfulExceptionInterceptor())
-//        }
-//    }
-//}

+ 0 - 345
goods/src/main/code/com/enation/javashop/android/component/goods/activity/GoodsActivity.kt

@@ -1,345 +0,0 @@
-package com.enation.javashop.android.component.goods.activity
-
-import android.content.Context
-import android.graphics.Color
-import android.graphics.drawable.Drawable
-import android.net.Uri
-import android.os.Bundle
-import android.os.Debug
-import android.support.v4.app.Fragment
-import android.util.SparseArray
-import android.util.TypedValue
-import android.view.View
-import android.widget.ImageView
-import com.bumptech.glide.Glide
-import com.bumptech.glide.load.resource.drawable.GlideDrawable
-import com.bumptech.glide.request.RequestListener
-import com.bumptech.glide.request.animation.GlideAnimation
-import com.bumptech.glide.request.target.SimpleTarget
-import com.bumptech.glide.request.target.Target
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.databinding.GoodsActLayBinding
-import com.enation.javashop.android.component.goods.fragment.GoodsCommentFragment
-import com.enation.javashop.android.component.goods.fragment.GoodsInfoFragment
-import com.enation.javashop.android.component.goods.fragment.GoodsIntroduceFragment
-import com.enation.javashop.android.component.goods.launch.GoodsLaunch
-import com.enation.javashop.android.jrouter.JRouter
-import com.enation.javashop.android.jrouter.external.annotation.Autowired
-import com.enation.javashop.android.jrouter.external.annotation.Router
-import com.enation.javashop.android.lib.base.BaseActivity
-import com.enation.javashop.android.lib.utils.*
-import com.enation.javashop.android.lib.vo.MenuVo
-import com.enation.javashop.android.lib.widget.MenuPopWindow
-import com.enation.javashop.android.middleware.config.JavaShopConfigCenter
-import com.enation.javashop.android.middleware.logic.contract.goods.GoodsActivityContract
-import com.enation.javashop.android.middleware.logic.presenter.goods.GoodsActivityPresenter
-import com.enation.javashop.android.middleware.model.GoodsViewModel
-import com.enation.javashop.imagepluin.utils.GlideUtils
-import com.enation.javashop.net.engine.model.NetState
-import com.enation.javashop.utils.base.tool.ScreenTool
-import com.github.ielse.imagewatcher.ImageWatcher
-import com.github.ielse.imagewatcher.ImageWatcherHelper
-import kotlinx.android.synthetic.main.goods_act_lay.*
-import net.lucode.hackware.magicindicator.ViewPagerHelper
-import net.lucode.hackware.magicindicator.buildins.commonnavigator.CommonNavigator
-import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.CommonNavigatorAdapter
-import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerIndicator
-import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTitleView
-import net.lucode.hackware.magicindicator.buildins.commonnavigator.indicators.LinePagerIndicator
-import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.ColorTransitionPagerTitleView
-import java.lang.Exception
-import java.util.*
-import kotlin.collections.ArrayList
-
-
-/**
- * @author LDD
- * @Date   2018/3/27 上午9:31
- * @From   com.enation.javashop.android.component.goods.activity
- * @Note   商品详细页面
- */
-@Router(path = "/goods/detail")
-class GoodsActivity :BaseActivity<GoodsActivityPresenter,GoodsActLayBinding>(),GoodsActivityContract.View{
-
-    val iwHelper : ImageWatcherHelper by lazy { ImageWatcherHelper.with(this,ImageWatchLoader()) }
-
-    private lateinit var goods :GoodsViewModel
-
-    /**
-     * @Name  titles
-     * @Type  ArrayList<String>
-     * @Note  标题集合
-     */
-    private val titles = arrayListOf("商品","详情","评价")
-
-    @Autowired(name= "goodsId",required = false)
-    @JvmField var goodsId : Int = 0
-
-    /**
-     * @Name  fragments
-     * @Type  ArrayList<Fragment>
-     * @Note  页面集合
-     */
-    private lateinit var fragments :ArrayList<Fragment>
-
-    /**
-     * @Name  menuView
-     * @Type  MenuPopWindow
-     * @Note  菜单PopWindow
-     */
-    private val menuView by lazy {
-        MenuPopWindow.build(this, ArrayList<MenuVo>().then {
-            self ->
-            self.add(MenuVo("首页",R.drawable.javashop_icon_home_white,1))
-//            if (JavaShopConfigCenter.INSTANCE.DISTRIBUTION_MODE){
-//                self.add(MenuVo("分销",R.drawable.javashop_icon_share_white,2))
-//            }
-            self.add(MenuVo("店铺",R.drawable.javashop_icon_shop_white,3))
-        }).setItemCallBack { menuVo ->
-            when (menuVo.menuId){
-                1 ->{
-                    push("/home/main")
-                }
-                2 ->{
-
-                }
-                3 ->{
-                    push("/shop/detail",{
-                        it.withInt("shopId",goods.shopId)
-                    })
-                }
-            }
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsActivity
-     * @Date   2018/3/27 上午9:32
-     * @Note   获取布局ID
-     */
-    override fun getLayId(): Int {
-        return R.layout.goods_act_lay
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsActivity
-     * @Date   2018/3/27 上午9:32
-     * @Note   注入依赖
-     */
-    override fun bindDagger() {
-        GoodsLaunch.component.inject(this)
-    }
-
-    fun collect(goodsId :Int,collect: Boolean){
-        presenter.collectGoods(goodsId,collect)
-    }
-
-    fun collectState(state :Boolean){
-            goods.collect = state
-            goods_act_collect_goods_iv.setImageResource(state.judge(R.drawable.javashop_icon_heart_selected,R.drawable.javashop_icon_heart_nomal))
-            goods_act_collect_goods_tv.text = state.judge("已关注","关注")
-    }
-
-    override fun collect(collect: Boolean) {
-        collectState(collect)
-        fragments[0].to<GoodsInfoFragment>().goodsInfoAdapter.goods.collect = collect
-        fragments[0].to<GoodsInfoFragment>().goodsInfoAdapter.notifyDataSetChanged()
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsActivity
-     * @Date   2018/3/27 上午9:33
-     * @Note   初始化
-     */
-    override fun init() {
-        AppTool.SystemUI.ImmersiveWithBottomBarColor(this, Color.BLACK)
-        presenter.loadGoods(goodsId)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsActivity
-     * @Date   2018/3/27 上午10:55
-     * @Note   绑定事件
-     */
-    override fun bindEvent() {
-        goods_act_collect_goods.setOnClickListener {
-            presenter.collectGoods(goodsId,!goods.collect)
-        }
-        goods_act_to_cart.setOnClickListener {
-            push("/cart/main")
-        }
-        goods_act_to_shop.setOnClickListener {
-            push("/shop/detail",{
-                it.withInt("shopId",goods.shopId)
-            })
-        }
-        goods_act_add_cart.setOnClickListener {
-            (fragments[0] as GoodsInfoFragment).specShow()
-        }
-        goods_act_share.setOnClickListener {
-            presenter.shareGoods(this,JavaShopConfigCenter.INSTANCE.WAP_GOODS_URL+"${goodsId}",goods.goodsImage,goods.name,"JavaShop网上商城,选你所选爱你所爱!")
-        }
-        goods_act_more.setOnClickListener {
-            menuView.show(it)
-        }
-        goods_act_buy_now.setOnClickListener {
-            (fragments[0] as GoodsInfoFragment).buyNow()
-        }
-    }
-
-    fun toComment(){
-        goods_act_fragment_pager.setCurrentItem(2,false)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsActivity
-     * @Date   2018/3/27 上午10:56
-     * @Note   初始化指示器
-     */
-    private fun initIndicator(){
-        fragments =  java.util.ArrayList<Fragment>().then {
-            self ->
-            self.add(GoodsInfoFragment().then {
-                it.shopId = goods.shopId
-                it.goodsId = goods.goodsId
-            })
-            self.add(GoodsIntroduceFragment().then {
-                it.intro = goods.intro
-                it.params = goods.params
-            })
-            self.add(GoodsCommentFragment().then {
-                it.goodsId = goods.goodsId
-            })
-        }
-        goods_act_fragment_pager.setFragments(fragments,supportFragmentManager)
-        goods_act_fragment_pager.offscreenPageLimit = 2
-        /**初始化适配器*/
-        val commonNavigator = CommonNavigator(this)
-        /**设置自动填充*/
-        commonNavigator.isAdjustMode = true
-        /**初始化*/
-        commonNavigator.adapter = object : CommonNavigatorAdapter() {
-
-            override fun getCount(): Int {
-                return titles.size
-            }
-
-            override fun getTitleView(context: Context, index: Int): IPagerTitleView {
-                /**构建指示器 并重写部分方法 实现过渡动画*/
-                val simplePagerTitleView = object : ColorTransitionPagerTitleView(context){
-                    override fun onLeave(index: Int, totalCount: Int, leavePercent: Float, leftToRight: Boolean) {
-                        scaleX = 1f + (0.8f - 1f) * leavePercent
-                        scaleY = 1f + (0.8f - 1f) * leavePercent
-                        super.onLeave(index, totalCount, leavePercent, leftToRight)
-                    }
-
-                    override fun onEnter(index: Int, totalCount: Int, enterPercent: Float, leftToRight: Boolean) {
-                        scaleX = 0.8f + (1f - 0.8f) * enterPercent
-                        scaleY = 0.8f + (1f - 0.8f) * enterPercent
-                        super.onEnter(index, totalCount, enterPercent, leftToRight)
-                    }
-                }
-                /**设置未选中颜色*/
-                simplePagerTitleView.normalColor = getColorCompatible(R.color.javashop_color_navy)
-                /**设置选中颜色*/
-                simplePagerTitleView.selectedColor = getColorCompatible(R.color.javashop_color_select_color_red)
-                /**设置标题*/
-                simplePagerTitleView.text = titles[index]
-                /**设置文字大小*/
-                simplePagerTitleView.setTextSize(TypedValue.COMPLEX_UNIT_PX, (ScreenTool.getScreenWidth(context)*0.05).toFloat())
-                /**设置点击事件*/
-                simplePagerTitleView.setOnClickListener { goods_act_fragment_pager.currentItem = index }
-                return simplePagerTitleView
-            }
-
-            override fun getIndicator(context: Context): IPagerIndicator {
-                /** 构建标识视图 */
-                val linePagerIndicator = LinePagerIndicator(context)
-                linePagerIndicator.mode = LinePagerIndicator.MODE_WRAP_CONTENT
-                linePagerIndicator.setColors(getColorCompatible(R.color.javashop_color_select_color_red))
-                linePagerIndicator.lineHeight = ScreenTool.dip2px(context,4f).toFloat()
-                return linePagerIndicator
-            }
-        }
-        /**设置适配器*/
-        goods_act_indicator.navigator = commonNavigator
-        /**事件互相绑定*/
-        ViewPagerHelper.bind(goods_act_indicator, goods_act_fragment_pager)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsActivity
-     * @Date   2018/3/27 上午10:56
-     * @Note   加载Fragment
-     * @param  goods 商品数据
-     */
-    override fun initFragment(goods: GoodsViewModel) {
-        this.goods = goods
-        initIndicator()
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsActivity
-     * @Date   2018/3/27 上午10:56
-     * @Note   加载错误
-     */
-    override fun onError(message: String, type: Int) {
-        showMessage(message)
-    }
-
-    fun showGallay(images :List<Uri>,position:Int){
-        iwHelper.show(images,position)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsActivity
-     * @Date   2018/3/27 上午10:57
-     * @Note   加载成功
-     */
-    override fun complete(message: String, type: Int) {
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsActivity
-     * @Date   2018/3/27 上午10:57
-     * @Note   家在开始
-     */
-    override fun start() {
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsActivity
-     * @Date   2018/3/27 上午10:57
-     * @Note   网络实时监听
-     */
-    override fun networkMonitor(state: NetState) {
-
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsActivity
-     * @Date   2018/3/27 上午10:58
-     * @Note   销毁
-     */
-    override fun destory() {
-    }
-
-
-    override fun onBackPressed() {
-        if (!iwHelper.handleBackPressed()) {
-            super.onBackPressed()
-        }
-    }
-
-}

Файловите разлики са ограничени, защото са твърде много
+ 0 - 1013
goods/src/main/code/com/enation/javashop/android/component/goods/activity/GoodsSearchActivity.kt


+ 0 - 212
goods/src/main/code/com/enation/javashop/android/component/goods/activity/SearchActivity.kt

@@ -1,212 +0,0 @@
-package com.enation.javashop.android.component.goods.activity
-
-import android.graphics.Color
-import android.text.Editable
-import android.text.TextWatcher
-import android.view.View
-import android.view.inputmethod.EditorInfo
-import com.alibaba.android.vlayout.DelegateAdapter
-import com.alibaba.android.vlayout.VirtualLayoutManager
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.adapter.*
-import com.enation.javashop.android.component.goods.agreement.HistoryAgreement
-import com.enation.javashop.android.component.goods.databinding.SearchAcyLayBinding
-import com.enation.javashop.android.component.goods.launch.GoodsLaunch
-import com.enation.javashop.android.jrouter.external.annotation.Router
-import com.enation.javashop.android.lib.base.BaseActivity
-import com.enation.javashop.android.lib.utils.AppTool
-import com.enation.javashop.android.lib.utils.pop
-import com.enation.javashop.android.lib.utils.push
-import com.enation.javashop.android.lib.utils.showMessage
-import com.enation.javashop.android.lib.vo.filter
-import com.enation.javashop.android.middleware.logic.contract.goods.SearchContract
-import com.enation.javashop.android.middleware.logic.presenter.goods.SearchPresenter
-import com.enation.javashop.android.middleware.model.HistoryModel
-import com.enation.javashop.net.engine.model.NetState
-import kotlinx.android.synthetic.main.search_acy_lay.*
-
-@Router(path = "/search/main")
-class SearchActivity : BaseActivity<SearchPresenter, SearchAcyLayBinding>(), SearchContract.View,TextWatcher,HistoryAgreement,HotKeyAgreement {
-
-    /**
-     * @Name  virtualLayoutManager
-     * @Type  VirtualLayoutManager
-     * @Note  VLayoutManager
-     */
-    private lateinit var virtualLayoutManager: VirtualLayoutManager
-
-    /**
-     * @Name  delegateAdapter
-     * @Type  DelegateAdapter
-     * @Note  七巧板适配器
-     */
-    private lateinit var delegateAdapter: DelegateAdapter
-
-    /**
-     * @Name  adapters
-     * @Type  ArrayList<DelegateAdapter.Adapter<*>>
-     * @Note  适配器列表
-     */
-    private var adapters = ArrayList<DelegateAdapter.Adapter<*>>()
-
-
-
-    override fun getLayId(): Int {
-        return R.layout.search_acy_lay
-    }
-
-    override fun bindDagger() {
-        GoodsLaunch.component.inject(this)
-    }
-
-    override fun init() {
-        AppTool.SystemUI.ImmersiveWithBottomBarColor(this, Color.BLACK)
-        /**初始化LayoutMannager*/
-        virtualLayoutManager = VirtualLayoutManager(this.activity)
-
-        /**初始化适配器*/
-        delegateAdapter = DelegateAdapter(virtualLayoutManager)
-        /**配置到RecycleView*/
-        search_list.layoutManager = virtualLayoutManager
-        search_list.adapter = delegateAdapter
-        presenter.loadData()
-    }
-
-    override fun bindEvent() {
-
-        search_back_tv.setOnClickListener {
-            pop()
-        }
-
-        search_input_tv.addTextChangedListener(this)
-
-        search_input_tv.setOnEditorActionListener { v, actionId, event ->
-            if (actionId == EditorInfo.IME_ACTION_SEARCH){
-                if(search_input_tv.text.isNotEmpty()){
-                    push("/goods/list",{
-                        it.withString("keyword",search_input_tv.text.toString())
-                        it.withString("hint",search_input_tv.text.toString())
-                    })
-                    search_shop_tv.text = ""
-                    search_shop_lay.visibility = View.GONE
-                    presenter.addHistory(HistoryModel(true,search_input_tv.text.toString()))
-                    return@setOnEditorActionListener true
-                }
-                return@setOnEditorActionListener true
-            }
-           return@setOnEditorActionListener false
-        }
-
-        search_shop_tv.setOnClickListener {
-            if(search_input_tv.text.isNotEmpty()){
-                push("/shop/list",{
-                    it.withString("keyword",search_input_tv.text.toString())
-                })
-                search_shop_tv.text = ""
-                search_shop_lay.visibility = View.GONE
-                presenter.addHistory(HistoryModel(false,search_input_tv.text.toString()))
-            }
-        }
-    }
-
-    override fun destory() {
-
-    }
-
-    override fun render(data: ArrayList<Any>) {
-        adapters.clear()
-        data.forEachIndexed { index, item ->
-            if (index == 0){
-                adapters.add(SearchHotKeyAdapter(item as ArrayList<String>,this))
-            }else{
-                when(item){
-                    is ArrayList<*> ->{
-                        adapters.add(SearchHistoryAdapter(item as ArrayList<HistoryModel>,this))
-                    }
-                    is Int ->{
-                        if (item == 0){
-                            adapters.add(SearchHistoryHeaderAdapter())
-                        }else{
-                            adapters.add(SearchHistoryClearAdapter(this))
-                        }
-                    }
-                }
-            }
-        }
-        delegateAdapter.clear()
-        delegateAdapter.addAdapters(adapters)
-        delegateAdapter.notifyDataSetChanged()
-    }
-
-    override fun delete(item: HistoryModel) {
-        presenter.deleteHistory(item)
-    }
-
-    override fun add(item: HistoryModel) {
-        if (item.searchMode){
-            push("/goods/list",{
-                it.withString("keyword",item.text)
-                it.withString("hint",item.text)
-            })
-        }else{
-            push("/shop/list",{
-                it.withString("keyword",item.text)
-            })
-        }
-        presenter.addHistory(item)
-    }
-
-    override fun clear() {
-        presenter.clearHistory()
-    }
-
-    override fun hotkeySelect(key: String) {
-        push("/goods/list",{
-            it.withString("keyword",key)
-            it.withString("hint",key)
-        })
-        presenter.addHistory(HistoryModel(true,key))
-    }
-
-    override fun afterTextChanged(s: Editable?) {
-
-    }
-
-    override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
-
-    }
-
-    override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
-        if (search_input_tv.text.count()>0){
-            search_shop_lay.visibility = View.VISIBLE
-            search_shop_tv.text = "搜索\"${search_input_tv.text}\"店铺"
-        }else{
-            search_shop_tv.text = ""
-            search_shop_lay.visibility = View.GONE
-        }
-    }
-
-    override fun onError(message: String, type: Int) {
-        dismissDialog()
-        showMessage(message)
-    }
-
-    override fun complete(message: String, type: Int) {
-        dismissDialog()
-        showMessage(message)
-    }
-
-    override fun start() {
-        showDialog()
-    }
-
-    override fun networkMonitor(state: NetState) {
-        state.filter(onWifi = {
-
-        },onMobile = {
-
-        },offline ={
-
-        })
-    }
-}

+ 0 - 288
goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsCommentItemAdapter.kt

@@ -1,288 +0,0 @@
-package com.enation.javashop.android.component.goods.adapter
-
-import android.annotation.SuppressLint
-import android.content.Context
-import android.databinding.DataBindingUtil
-import android.graphics.Bitmap
-import android.graphics.Color
-import android.net.Uri
-import android.util.TypedValue
-import android.view.Gravity
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import android.widget.ImageView
-import android.widget.LinearLayout
-import android.widget.RelativeLayout
-import android.widget.TextView
-import com.alibaba.android.vlayout.DelegateAdapter
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.VirtualLayoutManager
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.bumptech.glide.Glide
-import com.bumptech.glide.load.model.GlideUrl
-import com.bumptech.glide.request.RequestListener
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.activity.GoodsActivity
-import com.enation.javashop.android.component.goods.databinding.GoodsCommentItemLayBinding
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.lib.base.BaseApplication
-import com.enation.javashop.android.lib.base.BaseContract
-import com.enation.javashop.android.lib.base.BaseControl
-import com.enation.javashop.android.lib.base.LIFE_CYCLE_DESTORY
-import com.enation.javashop.android.lib.utils.*
-import com.enation.javashop.android.lib.widget.AutoSizeTextView
-import com.enation.javashop.android.middleware.model.GoodsCommentViewModel
-import com.enation.javashop.imagepluin.utils.GlideUtils
-import com.enation.javashop.utils.base.tool.ScreenTool
-import com.umeng.socialize.media.Base
-import io.reactivex.disposables.CompositeDisposable
-import java.lang.ref.WeakReference
-
-/**
- * @author LDD
- * @Date   2018/4/2 下午2:37
- * @From   com.enation.javashop.android.component.goods.adapter
- * @Note   商品评论页面适配器
- */
-class GoodsCommentItemAdapter(control: WeakReference<BaseControl>, val data :ArrayList<GoodsCommentViewModel>) : BaseDelegateAdapter<BaseRecyclerViewHolder<GoodsCommentItemLayBinding>,GoodsCommentViewModel>() {
-
-    /**
-     * @Name  imageLayWidth
-     * @Type  float
-     * @Note  图片父容器宽度
-     */
-    private val imageLayWidth by lazy { ScreenTool.getScreenWidth(BaseApplication.appContext)*0.9-ScreenTool.dip2px(BaseApplication.appContext,30f) }
-
-    /**
-     * @Name  TenDp
-     * @Type  Float
-     * @Note  10Dp 对应的px
-     */
-    private val FiveDp by lazy { ScreenTool.dip2px(BaseApplication.appContext,5f) }
-    /**
-     * @author LDD
-     * @From   GoodsCommentItemAdapter
-     * @Date   2018/4/2 下午2:38
-     * @Note   数据提供者
-     */
-    override fun dataProvider(): Any {
-        return data
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsCommentItemAdapter
-     * @Date   2018/4/2 下午2:39
-     * @Note   点击事件过滤器
-     * @param  position 坐标
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsCommentItemAdapter
-     * @Date   2018/4/2 下午2:39
-     * @Note   创建ViewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<GoodsCommentItemLayBinding> {
-        return BaseRecyclerViewHolder(DataBindingUtil.bind(LayoutInflater.from(parent?.context).inflate(R.layout.goods_comment_item_lay,parent,false)))
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsCommentItemAdapter
-     * @Date   2018/4/2 下午2:40
-     * @Note   获取Item总数
-     */
-    override fun getItemCount(): Int {
-        return data.size
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsCommentItemAdapter
-     * @Date   2018/4/2 下午2:40
-     * @Note   创建LayoutHelper
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return LinearLayoutHelper(0,data.size)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsCommentItemAdapter
-     * @Date   2018/4/8 下午1:05
-     * @Note   绑定参数
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<GoodsCommentItemLayBinding>?, position: Int) {
-        holder?.bind {
-            binding ->
-            binding.goodsCommentItemImageLay.removeAllViews()
-            binding.data = getItem(position)
-            if (getItem(position).grade == 3){
-                binding.goodsCommentItemGrade.text = "好评"
-            }else if (getItem(position).grade == 2){
-                binding.goodsCommentItemGrade.text = "中评"
-            }else if (getItem(position).grade == 1){
-                binding.goodsCommentItemGrade.text = "差评"
-            }
-            if (getItem(position).images.size >0){
-                imageSet(binding.goodsCommentItemImageLay,getItem(position).images)
-                binding.goodsCommentItemImageLay.setOnClickListener {
-                    binding.root.context.to<GoodsActivity>().showGallay(getItem(position).images.map { return@map Uri.parse(it) },0)
-                }
-            }
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsCommentItemAdapter
-     * @Date   2018/4/8 下午1:06
-     * @Note   设置图片布局
-     * @param  lay 图片父布局
-     * @param  images 图片URL
-     */
-    private fun imageSet(lay :LinearLayout,images:ArrayList<String>){
-        if (images.size>1){
-            if (images.size == 4){
-                val linearA = LinearLayout(lay.context).then {
-                    self ->
-                    self.orientation = LinearLayout.HORIZONTAL
-                }
-                val linearB = LinearLayout(lay.context).then {
-                    self ->
-                    self.orientation = LinearLayout.HORIZONTAL
-                }
-                lay.addView(linearA)
-                lay.addView(linearB)
-                linearA.reLayout<LinearLayout.LayoutParams> {
-                    params ->
-                    params.setMargins(0,0,0,FiveDp*2)
-                    params.width = imageLayWidth.toInt()
-                    params.height = ((imageLayWidth-FiveDp*4)/3).toInt()
-                }
-                linearB.reLayout<LinearLayout.LayoutParams> {
-                    params ->
-                    params.setMargins(0,0,0,FiveDp*2)
-                    params.width = imageLayWidth.toInt()
-                    params.height = ((imageLayWidth-FiveDp*4)/3).toInt()
-                }
-                createImageView(linearA,images[0],false,0)
-                createImageView(linearA,images[1],true,1)
-                createImageView(linearB,images[2],false,2)
-                createImageView(linearB,images[3],true,3)
-            }else{
-                val count = (images.size>9).judge(9,images.size)
-                val lastNum = count%3
-                var hNum = (count - lastNum)/3
-                if (lastNum > 0){
-                    hNum +=1
-                }
-                var index = -1
-                for (i in 0..(hNum-1)){
-                    val linear = LinearLayout(lay.context).then {
-                        self ->
-                        self.orientation = LinearLayout.HORIZONTAL
-                    }
-                    lay.addView(linear)
-                    linear.reLayout<LinearLayout.LayoutParams> {
-                        params ->
-                        params.setMargins(0,0,0,FiveDp*2)
-                        params.width = imageLayWidth.toInt()
-                        params.height = ((imageLayWidth-FiveDp*4)/3).toInt()
-                    }
-                    index+=1
-                    images.getOrNull(index)?.more {
-                        url ->
-                        createImageView(linear,url,false,index,images.size)
-                    }
-                    index+=1
-                    images.getOrNull(index)?.more {
-                        url ->
-                        createImageView(linear,url,true,index,images.size)
-                    }
-                    index+=1
-                    images.getOrNull(index)?.more {
-                        url ->
-                        createImageView(linear,url,true,index,images.size)
-                    }
-                }
-            }
-        }else{
-            var iv = ImageView(lay.context)
-            iv.scaleType = ImageView.ScaleType.CENTER_CROP
-            lay.addView(iv)
-            iv.reLayout<LinearLayout.LayoutParams> {
-                params ->
-                params.width = imageLayWidth.toInt()
-                params.height = imageLayWidth.toInt()
-            }
-            GlideUtils.setImage(lay.context,images[0],iv)
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsCommentItemAdapter
-     * @Date   2018/4/8 下午1:06
-     * @Note   添加ImageView
-     * @param  lay 父布局
-     * @param  url 图片url
-     * @param  haveMargin 是否设置外间距
-     * @param  index 当前index
-     * @param  count 图片总数
-     */
-    @SuppressLint("SetTextI18n")
-    private fun createImageView(lay:LinearLayout, url :String, haveMargin : Boolean, index : Int, count :Int = 0){
-        if (index == 8 && count > 9){
-            val parent = RelativeLayout(lay.context)
-            lay.addView(parent)
-            parent.reLayout<LinearLayout.LayoutParams> {
-                params ->
-                params.width = ((imageLayWidth - FiveDp*4)/3).toInt()
-                params.height = ((imageLayWidth - FiveDp*4)/3).toInt()
-                params.setMargins(FiveDp*2,0,0,0)
-            }
-            val iv = ImageView(parent.context)
-            parent.addView(iv)
-            iv.reLayout<RelativeLayout.LayoutParams> {
-                params ->
-                params.width = ((imageLayWidth - FiveDp*4)/3).toInt()
-                params.height = ((imageLayWidth - FiveDp*4)/3).toInt()
-            }
-            GlideUtils.setImage(lay.context,url,iv)
-            val textView = AutoSizeTextView(parent.context)
-            textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, (iv.layoutParams.width/6).toFloat())
-            textView.setBackgroundResource(R.drawable.javashop_rounder_corner_gray)
-            textView.setTextColor(Color.WHITE)
-            textView.setLines(1)
-            textView.gravity = Gravity.CENTER
-            parent.addView(textView)
-            textView.reLayout<RelativeLayout.LayoutParams> {
-                params ->
-                params.width =  RelativeLayout.LayoutParams.WRAP_CONTENT
-                params.height = iv.layoutParams.width/5
-                params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM)
-                params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT)
-                params.setMargins(0,0,params.height/3,params.height/3)
-            }
-            textView.text = " 共 $count 张 "
-        }else{
-            val iv = ImageView(lay.context)
-            iv.scaleType = ImageView.ScaleType.CENTER_CROP
-            lay.addView(iv)
-            iv.reLayout<LinearLayout.LayoutParams> {
-                params ->
-                params.width = ((imageLayWidth - FiveDp*4)/3).toInt()
-                params.height = ((imageLayWidth - FiveDp*4)/3).toInt()
-                if (haveMargin){
-                    params.setMargins(FiveDp*2,0,0,0)
-                }
-            }
-            GlideUtils.setImage(lay.context,url,iv)
-        }
-    }
-}

+ 0 - 87
goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsInfoAdviceAdapter.kt

@@ -1,87 +0,0 @@
-package com.enation.javashop.android.component.goods.adapter
-
-import android.databinding.DataBindingUtil
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.databinding.GoodsInfoAdviceItemBinding
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.lib.base.BaseApplication
-import com.enation.javashop.android.lib.utils.BaseRecyclerViewHolder
-import com.enation.javashop.android.lib.utils.then
-import com.enation.javashop.utils.base.tool.ScreenTool
-
-/**
- * @author LDD
- * @Date   2018/4/8 下午1:31
- * @From   com.enation.javashop.android.component.goods.adapter
- * @Note   商品咨询
- */
-class GoodsInfoAdviceAdapter :BaseDelegateAdapter<BaseRecyclerViewHolder<GoodsInfoAdviceItemBinding>,Int>() {
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:32
-     * @Note   数据提供者
-     */
-    override fun dataProvider(): Any {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:33
-     * @Note   点击过滤
-     * @param  position 坐标
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:33
-     * @Note   创建ViewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<GoodsInfoAdviceItemBinding> {
-        return BaseRecyclerViewHolder(DataBindingUtil.bind(LayoutInflater.from(parent?.context).inflate(R.layout.goods_info_advice_item,parent,false)))
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:33
-     * @Note   item总数
-     */
-    override fun getItemCount(): Int {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:34
-     * @Note   创建LayoutHelper
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return LinearLayoutHelper(0,1).then {
-            self ->
-            self.setMargin(0,0,0, ScreenTool.dip2px(BaseApplication.appContext,10f))
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:35
-     * @Note   绑定数据
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<GoodsInfoAdviceItemBinding>?, position: Int) {
-
-    }
-}

+ 0 - 148
goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsInfoCommentAdapter.kt

@@ -1,148 +0,0 @@
-package com.enation.javashop.android.component.goods.adapter
-
-import android.annotation.SuppressLint
-import android.databinding.DataBindingUtil
-import android.net.Uri
-import android.opengl.Visibility
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.activity.GoodsActivity
-import com.enation.javashop.android.component.goods.databinding.GoodsInfoCommentItemBinding
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.lib.utils.BaseRecyclerViewHolder
-import com.enation.javashop.android.lib.utils.to
-import com.enation.javashop.android.middleware.model.CommentNumViewModel
-import com.enation.javashop.android.middleware.model.GoodsCommentViewModel
-import com.enation.javashop.imagepluin.utils.GlideUtils
-import com.enation.javashop.imagepluin.utils.ImageUtils
-import com.enation.javashop.net.engine.core.BaseDownLoadManager
-import com.enation.javashop.utils.base.tool.CommonTool
-import java.lang.ref.WeakReference
-
-/**
- * @author LDD
- * @Date   2018/4/8 下午1:35
- * @From   com.enation.javashop.android.component.goods.adapter
- * @Note   商品详情推荐评论
- */
-class GoodsInfoCommentAdapter(var activity :WeakReference<GoodsActivity>,var data :HashMap<String,Any>) :BaseDelegateAdapter<BaseRecyclerViewHolder<GoodsInfoCommentItemBinding>,Int>() {
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoCommentAdapter
-     * @Date   2018/4/8 下午1:36
-     * @Note   数据提供者
-     */
-    override fun dataProvider(): Any {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoCommentAdapter
-     * @Date   2018/4/8 下午1:37
-     * @Note   item点击过滤
-     * @param  position 坐标
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoCommentAdapter
-     * @Date   2018/4/8 下午1:37
-     * @Note   创建ViewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<GoodsInfoCommentItemBinding> {
-        return BaseRecyclerViewHolder(DataBindingUtil.bind(LayoutInflater.from(parent?.context).inflate(R.layout.goods_info_comment_item,parent,false)))
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoCommentAdapter
-     * @Date   2018/4/8 下午1:37
-     * @Note   获取Item总数
-     */
-    override fun getItemCount(): Int {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoCommentAdapter
-     * @Date   2018/4/8 下午1:37
-     * @Note   创建LayoutHelper
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return LinearLayoutHelper(0,1)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoCommentAdapter
-     * @Date   2018/4/8 下午1:38
-     * @Note   绑定ViewHolder
-     */
-    @SuppressLint("SetTextI18n")
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<GoodsInfoCommentItemBinding>?, position: Int) {
-
-        holder?.bind { binding ->
-
-            binding.goodsInfoCommentMoreBtn.setOnClickListener {
-                activity.get()?.toComment()
-            }
-            val comment = data["data"]!!.to<ArrayList<GoodsCommentViewModel>>()[0]
-            binding.goodsInfoHotCommentTitle.text = "评论(${(data["num"]!! as String)})"
-            binding.goodsInfoCommentPercentTv.text = data["rate"]!!.to<String>()
-            GlideUtils.setImage(binding.root.context,comment.userFace,binding.goodsInfoCommentItemFaceA)
-            binding.goodsInfoCommentItemNameA.text = comment.userName
-            binding.goodsInfoCommentItemStarA.setStar(comment.getStarViewNum())
-            if (comment.grade == 3){
-                binding.goodsInfoCommentItemGrade.text = "好评"
-            }else if (comment.grade == 2){
-                binding.goodsInfoCommentItemGrade.text = "中评"
-            }else if (comment.grade == 1){
-                binding.goodsInfoCommentItemGrade.text = "差评"
-            }
-            binding.goodsInfoHotCommentAContentTv.text = comment.content
-            if (comment.images.count() > 0){
-                binding.goodsInfoHotCommentAImageLay.visibility = View.VISIBLE
-                binding.goodsInfoHotCommentAImageLay.setOnClickListener {
-                    binding.root.context.to<GoodsActivity>().showGallay(comment.images.map { return@map Uri.parse(it) },0)
-                }
-                if (comment.images.getOrNull(0) != null){
-                    binding.goodsInfoHotCommentAImageA.visibility = View.VISIBLE
-                    GlideUtils.setImage(binding.root.context,comment.images[0],binding.goodsInfoHotCommentAImageA)
-                }else{
-                    binding.goodsInfoHotCommentAImageA.visibility = View.GONE
-                }
-                if (comment.images.getOrNull(1) != null){
-                    binding.goodsInfoHotCommentAImageB.visibility = View.VISIBLE
-                    GlideUtils.setImage(binding.root.context,comment.images[1],binding.goodsInfoHotCommentAImageB)
-                }else{
-                    binding.goodsInfoHotCommentAImageB.visibility = View.GONE
-                }
-                if (comment.images.getOrNull(2) != null){
-                    binding.goodsInfoHotCommentAImageC.visibility = View.VISIBLE
-                    GlideUtils.setImage(binding.root.context,comment.images[2],binding.goodsInfoHotCommentAImageC)
-                }else{
-                    binding.goodsInfoHotCommentAImageC.visibility = View.GONE
-                }
-                if (comment.images.getOrNull(3) != null){
-                    binding.goodsInfoHotCommentAImageD.visibility = View.VISIBLE
-                    GlideUtils.setImage(binding.root.context,comment.images[3],binding.goodsInfoHotCommentAImageD)
-                }else{
-                    binding.goodsInfoHotCommentAImageD.visibility = View.GONE
-                }
-            }else{
-                binding.goodsInfoHotCommentAImageLay.visibility = View.GONE
-            }
-        }
-
-    }
-}

+ 0 - 126
goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsInfoGalleryAdapter.kt

@@ -1,126 +0,0 @@
-package com.enation.javashop.android.component.goods.adapter
-
-import android.databinding.DataBindingUtil
-import android.net.Uri
-import android.support.v4.app.Fragment
-import android.util.SparseArray
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import android.widget.ImageView
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.databinding.GoodsInfoGalleryItemBinding
-import com.enation.javashop.android.component.goods.fragment.GoodsInfoFragment
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.lib.base.LIFE_CYCLE_DESTORY
-import com.enation.javashop.android.lib.utils.*
-import com.enation.javashop.android.middleware.model.GoodsGallery
-import com.github.ielse.imagewatcher.ImageWatcher
-import com.github.ielse.imagewatcher.ImageWatcherHelper
-import java.lang.ref.WeakReference
-import java.net.URI
-import com.alipay.android.phone.mrpc.core.v
-import com.enation.javashop.android.component.goods.activity.GoodsActivity
-
-
-/**
- * @author LDD
- * @Date   2018/3/30 下午4:22
- * @From   com.enation.javashop.android.component.goods.adapter
- * @Note   商品相册适配器
- */
-class GoodsInfoGalleryAdapter(val fragment:WeakReference<GoodsInfoFragment>,var data:ArrayList<GoodsGallery>) :BaseDelegateAdapter<BaseRecyclerViewHolder<GoodsInfoGalleryItemBinding>,ArrayList<GoodsGallery>>() {
-
-    /**
-     * @Name  initFlag
-     * @Type  Boolean
-     * @Note  是否已经初始化
-     */
-    private var initFlag = false
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoGalleryAdapter
-     * @Date   2018/4/8 下午1:38
-     * @Note   数据提供者
-     */
-    override fun dataProvider(): Any {
-        return data
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoGalleryAdapter
-     * @Date   2018/4/8 下午1:39
-     * @Note   item点击过滤
-     * @param  position 坐标
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoGalleryAdapter
-     * @Date   2018/4/8 下午1:39
-     * @Note   创建Viewholder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<GoodsInfoGalleryItemBinding> {
-        return BaseRecyclerViewHolder(DataBindingUtil.bind(LayoutInflater.from(parent?.context).inflate(R.layout.goods_info_gallery_item,parent,false)))
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoGalleryAdapter
-     * @Date   2018/4/8 下午1:39
-     * @Note   获取item总数
-     */
-    override fun getItemCount(): Int {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoGalleryAdapter
-     * @Date   2018/4/8 下午1:41
-     * @Note   创建LayoutHelper
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return LinearLayoutHelper(0,1)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoGalleryAdapter
-     * @Date   2018/4/8 下午1:41
-     * @Note   绑定ViewHolder
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<GoodsInfoGalleryItemBinding>?, position: Int) {
-        holder?.bind {
-            binding ->
-            if (data.size == 0 || initFlag){
-                return@bind
-            }
-            GalleryHelper.build<GoodsGallery>(binding.goodsInfoGallery.weak())
-                    .setGallery(data)
-                    .setDataTransform { orgData ->
-                        orgData.big
-                    }.setItemCallBack {
-                        position , imageView ->
-                        binding.root.context.to<GoodsActivity>().showGallay(data.map { Uri.parse(it.big) },position)
-                    }.setScrollCallBack {
-                        position ->
-                        binding.goodsInfoGalleryIndexTv.text = "${position+1}/${data.size}"
-                    }.autoScroll().then {
-                        fragment.get()?.addLifeCycleListener {
-                            state ->
-                            if (state == LIFE_CYCLE_DESTORY){
-                                it.offAutoScroll()
-                            }
-                        }
-                    }.execute()
-            initFlag = true
-        }
-    }
-}

+ 0 - 313
goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsInfoMessageAdapter.kt

@@ -1,313 +0,0 @@
-package com.enation.javashop.android.component.goods.adapter
-
-import android.content.Context
-import android.databinding.DataBindingUtil
-import android.graphics.Color
-import android.text.TextUtils
-import android.util.TypedValue
-import android.view.Gravity
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.LinearLayout
-import android.widget.TextView
-import com.alibaba.android.vlayout.DelegateAdapter
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.activity.GoodsActivity
-import com.enation.javashop.android.component.goods.databinding.GoodsInfoMessageItemBinding
-import com.enation.javashop.android.component.goods.fragment.GoodsInfoFragment
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.lib.adapter.TextViewDelegateAdapter
-import com.enation.javashop.android.lib.base.BaseApplication
-import com.enation.javashop.android.lib.utils.*
-import com.enation.javashop.android.lib.widget.PopCommonView
-import com.enation.javashop.android.lib.widget.PopWindowCompatible
-import com.enation.javashop.android.middleware.model.CouponViewModel
-import com.enation.javashop.android.middleware.model.GoodsViewModel
-import com.enation.javashop.android.middleware.model.PromotionDetailViewModel
-import com.enation.javashop.utils.base.tool.CommonTool
-import com.enation.javashop.utils.base.tool.ScreenTool
-import kotlinx.android.synthetic.main.goods_act_lay.*
-import kotlinx.android.synthetic.main.goods_search_act_lay.*
-import java.util.*
-
-/**
- * @author LDD
- * @Date   2018/4/8 下午1:49
- * @From   com.enation.javashop.android.component.goods.adapter
- * @Note   商品数据信息适配器
- */
-class GoodsInfoMessageAdapter(val fragment: GoodsInfoFragment,var goods :GoodsViewModel,var coupons :ArrayList<CouponViewModel>,var promotions :PromotionDetailViewModel?) :BaseDelegateAdapter<BaseRecyclerViewHolder<GoodsInfoMessageItemBinding>,Int>() {
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoMessageAdapter
-     * @Date   2018/4/8 下午1:50
-     * @Note   数据提供者
-     */
-    override fun dataProvider(): Any {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoMessageAdapter
-     * @Date   2018/4/8 下午1:50
-     * @Note   item点击过滤
-     * @param  position 下标
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoMessageAdapter
-     * @Date   2018/4/8 下午1:50
-     * @Note   创建ViewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<GoodsInfoMessageItemBinding> {
-        return BaseRecyclerViewHolder(DataBindingUtil.bind(LayoutInflater.from(parent?.context).inflate(R.layout.goods_info_message_item,parent,false)))
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoMessageAdapter
-     * @Date   2018/4/8 下午1:50
-     * @Note   获取item总数
-     */
-    override fun getItemCount(): Int {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoMessageAdapter
-     * @Date   2018/4/8 下午1:51
-     * @Note   创建LayoutHelper
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return LinearLayoutHelper(0,1).then {
-            self ->
-            self.setMargin(0,0,0,ScreenTool.dip2px(BaseApplication.appContext,10f))
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoMessageAdapter
-     * @Date   2018/5/31 上午11:21
-     * @Note   构建促销视图
-     * @param  binding DataBinding
-     * @param  title   标题
-     * @param  content 内容
-     */
-    private fun createPromotionView(binding : GoodsInfoMessageItemBinding,title :String,content :String){
-        var height =  (ScreenTool.getScreenWidth(binding.root.context)-10.dpToPx())*0.15/2
-        var promotionLay = LinearLayout(binding.root.context)
-        promotionLay.orientation = LinearLayout.HORIZONTAL
-        promotionLay.gravity = Gravity.CENTER_VERTICAL
-        binding.goodsInfoPromotionContent.addView(promotionLay)
-        promotionLay.reLayout<LinearLayout.LayoutParams> {
-            params ->
-            params.height = height.toInt()
-            params.width = LinearLayout.LayoutParams.MATCH_PARENT
-            if (binding.goodsInfoPromotionContent.childCount > 1){
-                params.setMargins(0,5.dpToPx(),0,0)
-            }
-        }
-        var titleView = TextView(binding.root.context).then {
-            self ->
-            self.setTextColor(binding.root.context.getColorCompatible(R.color.javashop_color_select_color_red))
-            self.setBackgroundResource(R.drawable.javashop_fillet_red_bg)
-            self.setTextSize(TypedValue.COMPLEX_UNIT_PX, (height*0.5).toFloat())
-            self.gravity = Gravity.CENTER
-            self.setPadding(3.dpToPx(),1.dpToPx(),3.dpToPx(),1.dpToPx())
-            self.text = title
-        }
-        promotionLay.addView(titleView)
-        titleView.reLayout<LinearLayout.LayoutParams> {
-            params ->
-            params.width = LinearLayout.LayoutParams.WRAP_CONTENT
-            params.height = LinearLayout.LayoutParams.WRAP_CONTENT
-            params.setMargins(0,0,10.dpToPx(),0)
-        }
-
-        var contentView = TextView(binding.root.context).then {
-            self ->
-            self.setTextColor(Color.BLACK)
-            self.setTextSize(TypedValue.COMPLEX_UNIT_PX, (height*0.5).toFloat())
-            self.gravity = Gravity.LEFT
-            self.setLines(1)
-            self.ellipsize = TextUtils.TruncateAt.END
-            self.setPadding(0,2.dpToPx(),0,2.dpToPx())
-            self.text = content
-        }
-        promotionLay.addView(contentView)
-        contentView.reLayout<LinearLayout.LayoutParams> {
-            params ->
-            params.width = LinearLayout.LayoutParams.WRAP_CONTENT
-            params.height = LinearLayout.LayoutParams.WRAP_CONTENT
-            params.weight = 1F
-        }
-
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoMessageAdapter
-     * @Date   2018/5/31 下午3:21
-     * @Note   创建优惠券视图
-     * @param  binding DataBinding
-     * @param  couponViewModel 优惠券数据
-     */
-    private fun createCouponView (binding: GoodsInfoMessageItemBinding,couponViewModel: CouponViewModel){
-        var height =  (ScreenTool.getScreenWidth(binding.root.context)-10.dpToPx())*0.15/2
-        val tv = TextView(binding.root.context).then {
-            self ->
-            self.setTextColor(Color.WHITE)
-            self.setBackgroundResource(R.drawable.javashop_corners_red)
-            self.setTextSize(TypedValue.COMPLEX_UNIT_PX, (height*0.5).toFloat())
-            self.gravity = Gravity.CENTER
-            self.setPadding(5.dpToPx(),2.dpToPx(),5.dpToPx(),2.dpToPx())
-            self.text = "满${couponViewModel.basePrice}减${couponViewModel.price}"
-        }
-        binding.goodsInfoCouponContent.addView(tv)
-        tv.reLayout<LinearLayout.LayoutParams> {
-            params ->
-            params.width = LinearLayout.LayoutParams.WRAP_CONTENT
-            params.height = LinearLayout.LayoutParams.WRAP_CONTENT
-            params.setMargins(0,0,10.dpToPx(),0)
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoMessageAdapter
-     * @Date   2018/5/31 下午3:33
-     * @Note   显示popView
-     * @param  activity 页面
-     * @param  title    标题
-     * @param  adapters 适配器
-     */
-    private fun showPopView(activity : GoodsActivity,title: String ,vararg adapters : DelegateAdapter.Adapter<*>){
-        PopCommonView.build(activity)
-                .setAdapters(adapters.asList())
-                .setTitle(title)
-                .setConfirmVisable(false)
-                .show(activity.goods_act_topbar_holder)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoMessageAdapter
-     * @Date   2018/4/8 下午1:51
-     * @Note   绑定数据
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<GoodsInfoMessageItemBinding>?, position: Int) {
-        holder?.bind {
-            binding ->
-
-            val activity = (binding.root.context as GoodsActivity)
-
-            binding.goodsInfoCollectGoods.setOnClickListener {
-                activity.collect(goods.goodsId,!goods.collect)
-            }
-
-            if (coupons.count() > 0){
-                binding.goodsInfoCouponContent.removeAllViews()
-                coupons.forEach {
-                    createCouponView(binding,it)
-                }
-            }else{
-                binding.goodsInfoCouponLay.visibility = View.GONE
-            }
-
-            binding.goodsInfoPromotionContent.removeAllViews()
-
-            if((promotions!!.secKill != null && promotions!!.secKill!!.disEndTime > 0) || promotions!!.groupBuy != null || promotions!!.exchange != null){
-                binding.goodsInfoPriceTv.gone()
-            }else{
-                binding.goodsInfoPriceTv.visable()
-            }
-            binding.goodsInfoPriceTv.setTextSize(TypedValue.COMPLEX_UNIT_PX, (ScreenTool.getScreenWidth(binding.root.context)*0.08).toFloat())
-            if ((promotions!!.secKill != null && (promotions!!.secKill!!.disStartTime > 0)) || promotions!!.FullDiscountGroup != null || promotions!!.minusPromotion != null || promotions!!.halfPrice != null){
-                if (promotions?.halfPrice != null){
-                    createPromotionView(binding,"第二件半价","该商品第二件半价")
-                }
-                if (promotions?.minusPromotion != null){
-                    createPromotionView(binding,"单品立减",String.format("立减$%.2f元",promotions!!.minusPromotion!!.minusPrice))
-                }
-                if (promotions?.secKill != null){
-                    if ((promotions!!.secKill!!.disStartTime > 0)){
-                        createPromotionView(binding,"限时抢购",String.format("%d天%d小时%d分钟后开始",TimeHandle.getDay(promotions!!.secKill!!.disStartTime.toInt()),
-                                TimeHandle.getHour(promotions!!.secKill!!.disStartTime.toInt()),
-                                TimeHandle.getSecond(promotions!!.secKill!!.disStartTime.toInt())))
-                    }
-                }
-                if (promotions?.FullDiscountGroup != null){
-                    if (promotions?.FullDiscountGroup?.isPonit!!){
-                        createPromotionView(binding,"积分",String.format("赠送%d积分",promotions!!.FullDiscountGroup!!.pointValue))
-                    }
-                    if (promotions?.FullDiscountGroup?.isBonus!! && promotions!!.FullDiscountGroup!!.bonusValue!!.price > 0){
-                        createPromotionView(binding,"赠券",String.format("赠送优惠券【满%.2f减%.2f】",
-                                promotions!!.FullDiscountGroup!!.bonusValue!!.basePrice,
-                                promotions!!.FullDiscountGroup!!.bonusValue!!.price))
-                    }
-                    if (promotions?.FullDiscountGroup?.isDiscount!!){
-                        createPromotionView(binding,"满折",String.format("满%.2f元打%.2f折",
-                                promotions!!.FullDiscountGroup!!.basePrice,
-                                promotions!!.FullDiscountGroup!!.discount))
-                    }
-                    if (promotions?.FullDiscountGroup?.isFreeShip!!){
-                        createPromotionView(binding,"免邮","免快递费")
-                    }
-                    if (promotions?.FullDiscountGroup?.isGift!!){
-                        createPromotionView(binding,"赠品",String.format("赠送【%s ¥%.2f】",
-                                promotions!!.FullDiscountGroup!!.giftValue!!.name,
-                                promotions!!.FullDiscountGroup!!.giftValue!!.price))
-                    }
-                    if (promotions?.FullDiscountGroup?.isMinus!!){
-                        createPromotionView(binding,"满减",String.format("满%.2f元减%.2f元",
-                                promotions!!.FullDiscountGroup!!.basePrice,
-                                promotions!!.FullDiscountGroup!!.minusPrice))
-                    }
-                }
-                binding.goodsInfoPromotionIv.setOnClickListener {
-                    if (promotions!=null){
-                        showPopView(activity,"促销",GoodsInfoPromotionAdapter(promotions!!))
-                    }
-                }
-            }else{
-                binding.goodsInfoPromotionContent.visibility = View.GONE
-                binding.goodsInfoPromotionIv.visibility = View.GONE
-                binding.goodsInfoPromotionTitle.visibility = View.GONE
-                binding.goodsInfoPromotionLay.visibility = View.GONE
-            }
-
-            if (coupons.count() > 0){
-                binding.goodsInfoCouponIv.setOnClickListener {
-                    showPopView(activity,"优惠券",TextViewDelegateAdapter("可领取优惠券",23,Color.BLACK,10.dpToPx(),10.dpToPx(),10.dpToPx(),10.dpToPx(),Color.TRANSPARENT),
-                            ReflexHelper.build("com.enation.javashop.android.component.member.adapter.CouponAdapter")
-                                    .newInstance(coupons).getInstance<BaseDelegateAdapter<*,CouponViewModel>>().then {
-                                        it.setOnItemClickListener { data, position ->
-                                            fragment.getCoupon(data.id)
-                                        }
-                                    })
-                }
-            }
-
-            binding.goodsInfoNameTv.text = goods.name
-            binding.goodsInfoPriceTv.text = String.format("¥%.2f",goods.price)
-            if (goods.collect) {
-                binding.goodsInfoCollectGoodsIv.setImageResource(R.drawable.javashop_icon_heart_selected)
-                binding.goodsInfoCollectGoodsTv.text = "已关注"
-            }else{
-                binding.goodsInfoCollectGoodsIv.setImageResource(R.drawable.javashop_icon_heart_nomal)
-                binding.goodsInfoCollectGoodsTv.text = "关注"
-            }
-        }
-    }
-}

+ 0 - 282
goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsInfoPromotionAdapter.kt

@@ -1,282 +0,0 @@
-package com.enation.javashop.android.component.goods.adapter
-
-import android.view.View
-import android.view.ViewGroup
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.databinding.GoodsInfoPromotionItemBinding
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.lib.utils.BaseRecyclerViewHolder
-import com.enation.javashop.android.lib.utils.TimeHandle
-import com.enation.javashop.android.lib.utils.bindingParams
-import com.enation.javashop.android.middleware.model.PromotionDetailViewModel
-
-/**
- * @author LDD
- * @Date   2018/5/31 下午2:26
- * @From   com.enation.javashop.android.component.goods.adapter
- * @Note   商品详情页面适配器
- */
-class GoodsInfoPromotionAdapter (val data :PromotionDetailViewModel) : BaseDelegateAdapter<BaseRecyclerViewHolder<GoodsInfoPromotionItemBinding>,PromotionDetailViewModel>() {
-
-    /**
-     * @Name  count
-     * @Type  Int
-     * @Note  item总数
-     */
-    val count by lazy {
-        var count = 0
-        if (data.halfPrice != null){
-            count += 1
-            halfPrice = true
-        }
-        if (data.minusPromotion != null){
-            count += 1
-            minusPromotion = true
-        }
-        if (data.secKill != null){
-            if (data.secKill!!.disStartTime > 0){
-                count += 1
-                secKill = true
-            }
-        }
-        if (data.FullDiscountGroup != null){
-            if (data.FullDiscountGroup?.isPonit!!){
-                count += 1
-                isPonit = true
-            }
-            if (data.FullDiscountGroup?.isBonus!! && data.FullDiscountGroup?.bonusValue!!.price > 0){
-                count += 1
-                isBonus = true
-            }
-            if (data.FullDiscountGroup?.isDiscount!!){
-                count += 1
-                isDiscount = true
-            }
-            if (data.FullDiscountGroup?.isFreeShip!!){
-                count += 1
-                isFreeShip = true
-            }
-            if (data.FullDiscountGroup?.isGift!!){
-                count += 1
-                isGift = true
-            }
-            if (data.FullDiscountGroup?.isMinus!!){
-                count += 1
-                isMinus = true
-            }
-        }
-        return@lazy count
-    }
-
-    /**
-     * @Name  exchange
-     * @Type  Boolean
-     * @Note  积分商城标记
-     */
-    private var exchange : Boolean = false
-
-    /**
-     * @Name  groupBuy
-     * @Type  Boolean
-     * @Note  团购标记
-     */
-    private var groupBuy : Boolean = false
-
-    /**
-     * @Name  halfPrice
-     * @Type  Boolean
-     * @Note  第二件半价标记
-     */
-    private var halfPrice : Boolean = false
-
-    /**
-     * @Name  minusPromotion
-     * @Type  Boolean
-     * @Note  单品立减标记
-     */
-    private var minusPromotion : Boolean = false
-
-    /**
-     * @Name  secKill
-     * @Type  Boolean
-     * @Note  秒杀标记
-     */
-    private var secKill : Boolean = false
-
-    /**
-     * @Name  isPonit
-     * @Type  Boolean
-     * @Note  积分标记
-     */
-    private var isPonit : Boolean = false
-
-    /**
-     * @Name  isBonus
-     * @Type  Boolean
-     * @Note  优惠券标记
-     */
-    private var isBonus : Boolean = false
-
-    /**
-     * @Name  isDiscount
-     * @Type  Boolean
-     * @Note  满折标记
-     */
-    private var isDiscount : Boolean = false
-
-    /**
-     * @Name  isFreeShip
-     * @Type  Boolean
-     * @Note  免邮标记
-     */
-    private var isFreeShip : Boolean = false
-
-    /**
-     * @Name  isGift
-     * @Type  Boolean
-     * @Note  赠品标记
-     */
-    private var isGift : Boolean = false
-
-    /**
-     * @Name  isMinus
-     * @Type  Boolean
-     * @Note  满减标记
-     */
-    private var isMinus : Boolean = false
-
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoPromotionAdapter
-     * @Date   2018/5/31 下午2:27
-     * @Note   数据提供者
-     */
-    override fun dataProvider(): Any {
-        return data
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoPromotionAdapter
-     * @Date   2018/5/31 下午2:28
-     * @Note   点击过滤
-     * @param  position 坐标
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoPromotionAdapter
-     * @Date   2018/5/31 下午2:29
-     * @Note   创建ViewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<GoodsInfoPromotionItemBinding> {
-        return BaseRecyclerViewHolder.build(parent, R.layout.goods_info_promotion_item)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoPromotionAdapter
-     * @Date   2018/5/31 下午2:31
-     * @Note   获取itemCount
-     */
-    override fun getItemCount(): Int {
-        return count
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoPromotionAdapter
-     * @Date   2018/5/31 下午2:31
-     * @Note   创建LayoutHelper
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return LinearLayoutHelper(0,count)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoPromotionAdapter
-     * @Date   2018/5/31 下午2:33
-     * @Note   绑定数据
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<GoodsInfoPromotionItemBinding>?, position: Int) {
-        holder?.bind {
-            binding ->
-            if (data.halfPrice != null && halfPrice){
-                binding.goodsinfoPromotionItemContent.text = "该商品第二件半价"
-                binding.goodsinfoPromotionItemTitle.text = "第二件半价"
-                halfPrice = false
-                return@bind
-            }
-            if (data.minusPromotion != null && minusPromotion){
-                binding.goodsinfoPromotionItemContent.text = String.format("立减%.2f元",data.minusPromotion!!.minusPrice)
-                binding.goodsinfoPromotionItemTitle.text = "单品立减"
-                minusPromotion = false
-                return@bind
-            }
-            if (data.secKill != null && secKill){
-                if ((data.secKill!!.disStartTime > 0)){
-                    binding.goodsinfoPromotionItemContent.text = String.format("%d天%d小时%d分钟后开始", TimeHandle.getDay(data.secKill!!.disStartTime.toInt()),
-                            TimeHandle.getHour(data.secKill!!.disStartTime.toInt()),
-                            TimeHandle.getSecond(data.secKill!!.disStartTime.toInt()))
-                    binding.goodsinfoPromotionItemTitle.text = "限时抢购"
-                    secKill = false
-                    return@bind
-                }
-            }
-            if (data.FullDiscountGroup != null){
-                if (data.FullDiscountGroup?.isPonit!! && isPonit){
-                    binding.goodsinfoPromotionItemContent.text = String.format("赠送%d积分",data.FullDiscountGroup!!.pointValue)
-                    binding.goodsinfoPromotionItemTitle.text = "积分"
-                    isPonit = false
-                    return@bind
-                }
-                if (isBonus && data.FullDiscountGroup?.isBonus!! && data.FullDiscountGroup!!.bonusValue!!.price > 0){
-                    binding.goodsinfoPromotionItemContent.text = String.format("赠送优惠券【满%.2f减%.2f】",
-                            data.FullDiscountGroup!!.bonusValue!!.basePrice,
-                            data.FullDiscountGroup!!.bonusValue!!.price)
-                    binding.goodsinfoPromotionItemTitle.text = "赠券"
-                    isBonus = false
-                    return@bind
-                }
-                if (data.FullDiscountGroup?.isDiscount!! && isDiscount){
-                    binding.goodsinfoPromotionItemContent.text = String.format("满%.2f元打%.2f折",
-                            data.FullDiscountGroup!!.basePrice,
-                            data.FullDiscountGroup!!.discount)
-                    binding.goodsinfoPromotionItemTitle.text = "满折"
-                    isDiscount = false
-                    return@bind
-                }
-                if (data.FullDiscountGroup?.isFreeShip!! && isFreeShip){
-                    binding.goodsinfoPromotionItemContent.text = "免快递费"
-                    binding.goodsinfoPromotionItemTitle.text = "免邮"
-                    isFreeShip = false
-                    return@bind
-                }
-                if (data.FullDiscountGroup?.isGift!! && isGift){
-                    binding.goodsinfoPromotionItemContent.text = String.format("赠送【%s ¥%.2f】",
-                            data.FullDiscountGroup!!.giftValue!!.name,
-                            data.FullDiscountGroup!!.giftValue!!.price)
-                    binding.goodsinfoPromotionItemTitle.text = "赠品"
-                    isGift = false
-                    return@bind
-                }
-                if (data.FullDiscountGroup?.isMinus!! && isMinus){
-                    binding.goodsinfoPromotionItemContent.text = String.format("满%.2f元减%.2f元",
-                            data.FullDiscountGroup!!.basePrice,
-                            data.FullDiscountGroup!!.minusPrice)
-                    binding.goodsinfoPromotionItemTitle.text = "满减"
-                    isMinus = false
-                    return@bind
-                }
-            }
-        }
-    }
-
-}

+ 0 - 87
goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsInfoShopAdapter.kt

@@ -1,87 +0,0 @@
-package com.enation.javashop.android.component.goods.adapter
-
-import android.databinding.DataBindingUtil
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.databinding.GoodsInfoShopItemBinding
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.lib.utils.BaseRecyclerViewHolder
-import com.enation.javashop.android.middleware.model.ShopViewModel
-
-/**
- * @author LDD
- * @Date   2018/4/8 下午1:44
- * @From   com.enation.javashop.android.component.goods.adapter
- * @Note   商品所属店铺信息
- */
-class GoodsInfoShopAdapter(var shop :ShopViewModel) :BaseDelegateAdapter<BaseRecyclerViewHolder<GoodsInfoShopItemBinding>,Int>() {
-    
-    /**
-     * @author LDD
-     * @From   GoodsInfoShopAdapter
-     * @Date   2018/4/8 下午1:45
-     * @Note   数据提供者
-     */
-    override fun dataProvider(): Any {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoShopAdapter
-     * @Date   2018/4/8 下午1:45
-     * @Note   Item过滤
-     * @param  position 坐标
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoShopAdapter
-     * @Date   2018/4/8 下午1:45
-     * @Note   创建ViewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<GoodsInfoShopItemBinding> {
-
-        return BaseRecyclerViewHolder(DataBindingUtil.bind(LayoutInflater.from(parent?.context).inflate(R.layout.goods_info_shop_item,parent,false)))
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoShopAdapter
-     * @Date   2018/4/8 下午1:46
-     * @Note   获取Item总数
-     */
-    override fun getItemCount(): Int {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoShopAdapter
-     * @Date   2018/4/8 下午1:46
-     * @Note   创建LayoutHelper
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return LinearLayoutHelper(0,1)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoShopAdapter
-     * @Date   2018/4/8 下午1:46
-     * @Note   绑定ViewHolder
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<GoodsInfoShopItemBinding>?, position: Int) {
-        holder?.bind {
-            binding ->
-            binding.shop = shop
-        }
-    }
-
-}

+ 0 - 102
goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsInfoSpecAdapter.kt

@@ -1,102 +0,0 @@
-package com.enation.javashop.android.component.goods.adapter
-
-import android.databinding.DataBindingUtil
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.activity.GoodsActivity
-import com.enation.javashop.android.component.goods.databinding.GoodsInfoSpecItemBinding
-import com.enation.javashop.android.component.goods.weiget.GoodsSpecView
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.lib.base.BaseApplication
-import com.enation.javashop.android.lib.utils.BaseRecyclerViewHolder
-import com.enation.javashop.android.lib.utils.then
-import com.enation.javashop.utils.base.tool.ScreenTool
-import kotlinx.android.synthetic.main.goods_act_lay.*
-
-/**
- * @author LDD
- * @Date   2018/4/8 下午1:47
- * @From   com.enation.javashop.android.component.goods.adapter
- * @Note   商品信息规格适配器
- */
-class GoodsInfoSpecAdapter(val agreement: SpecAgreement,var text :String) :BaseDelegateAdapter<BaseRecyclerViewHolder<GoodsInfoSpecItemBinding>,Int>() {
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoSpecAdapter
-     * @Date   2018/4/8 下午1:48
-     * @Note   数据提供者
-     */
-    override fun dataProvider(): Any {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoSpecAdapter
-     * @Date   2018/4/8 下午1:48
-     * @Note   Itme过滤
-     * @param  position 坐标
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoSpecAdapter
-     * @Date   2018/4/8 下午1:48
-     * @Note   创建ViewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<GoodsInfoSpecItemBinding> {
-        return BaseRecyclerViewHolder(DataBindingUtil.bind(LayoutInflater.from(parent?.context).inflate(R.layout.goods_info_spec_item,parent,false)))
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoSpecAdapter
-     * @Date   2018/4/8 下午1:48
-     * @Note   获取Item总数
-     */
-    override fun getItemCount(): Int {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoSpecAdapter
-     * @Date   2018/4/8 下午1:49
-     * @Note   创建LayoutHelper
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return LinearLayoutHelper(0,1).then {
-            self ->
-            self.setMargin(0,0,0, ScreenTool.dip2px(BaseApplication.appContext,10f))
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoSpecAdapter
-     * @Date   2018/4/8 下午1:49
-     * @Note   绑定viewholder数据
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<GoodsInfoSpecItemBinding>?, position: Int) {
-            holder?.bind {
-                binding ->
-                binding.goodsInfoSpecIv.setOnClickListener {
-                    agreement.specShow()
-                }
-                binding.goodsInfoSpecContentTv.text = text
-            }
-    }
-}
-
-interface SpecAgreement{
-
-    fun specShow()
-
-}

+ 0 - 89
goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsInfoWeigetAdapter.kt

@@ -1,89 +0,0 @@
-package com.enation.javashop.android.component.goods.adapter
-
-import android.databinding.DataBindingUtil
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.databinding.GoodsInfoAddressItemBinding
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.lib.base.BaseApplication
-import com.enation.javashop.android.lib.utils.BaseRecyclerViewHolder
-import com.enation.javashop.android.lib.utils.then
-import com.enation.javashop.utils.base.tool.ScreenTool
-
-/**
- * @author LDD
- * @Date   2018/4/8 下午1:08
- * @From   com.enation.javashop.android.component.goods.adapter
- * @Note   商品详情地址适配器
- */
-class GoodsInfoWeigetAdapter(var weight :Double) :BaseDelegateAdapter<BaseRecyclerViewHolder<GoodsInfoAddressItemBinding>,Int>() {
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAddressAdapter
-     * @Date   2018/4/8 下午1:18
-     * @Note   数据提供者
-     */
-    override fun dataProvider(): Any {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAddressAdapter
-     * @Date   2018/4/8 下午1:19
-     * @Note   item点击过滤
-     * @param  position 坐标
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAddressAdapter
-     * @Date   2018/4/8 下午1:24
-     * @Note   创建ViewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<GoodsInfoAddressItemBinding> {
-        return BaseRecyclerViewHolder(DataBindingUtil.bind(LayoutInflater.from(parent?.context).inflate(R.layout.goods_info_address_item,parent,false)))
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAddressAdapter
-     * @Date   2018/4/8 下午1:25
-     * @Note   获取Item总数
-     */
-    override fun getItemCount(): Int {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAddressAdapter
-     * @Date   2018/4/8 下午1:28
-     * @Note   创建LayoutHelper
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return LinearLayoutHelper(0,1).then {
-            self ->
-            self.setMargin(0,0,0, ScreenTool.dip2px(BaseApplication.appContext,10f))
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAddressAdapter
-     * @Date   2018/4/8 下午1:29
-     * @Note   绑定数据
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<GoodsInfoAddressItemBinding>?, position: Int) {
-        holder?.bind { binding ->
-            binding.goodsInfoWeightContentTv.text = String.format("%.2fg",weight)
-        }
-    }
-}

+ 0 - 151
goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsMoreActionAdapter.kt

@@ -1,151 +0,0 @@
-package com.enation.javashop.android.component.goods.adapter
-
-import android.databinding.DataBindingUtil
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.GridLayoutHelper
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.databinding.GoodsSearchMoreActionItemBinding
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.lib.utils.BaseRecyclerViewHolder
-import com.enation.javashop.android.lib.utils.errorLog
-import com.enation.javashop.android.lib.utils.then
-import com.enation.javashop.android.middleware.model.GoodsFilterValue
-import com.enation.javashop.android.middleware.model.GoodsFilterViewModel
-import com.enation.javashop.utils.base.tool.ScreenTool
-
-/**
- * @author LDD
- * @Date   2018/3/15 下午4:03
- * @From   com.enation.javashop.android.component.goods.adapter
- * @Note   商品筛选View 列表适配器
- */
-class GoodsMoreActionAdapter(var data:GoodsFilterViewModel) : BaseDelegateAdapter<BaseRecyclerViewHolder<GoodsSearchMoreActionItemBinding>, GoodsFilterValue>() {
-
-    /**
-     * @author LDD
-     * @From   GoodsMoreActionAdapter
-     * @Date   2018/3/15 下午4:03
-     * @Note   数据提供者
-     */
-    override fun dataProvider(): Any {
-        return data.valueList
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsMoreActionAdapter
-     * @Date   2018/3/15 下午4:03
-     * @Note   item点击过滤
-     * @param  position item坐标
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsMoreActionAdapter
-     * @Date   2018/3/15 下午4:04
-     * @Note   构建ViewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<GoodsSearchMoreActionItemBinding> {
-        return BaseRecyclerViewHolder<GoodsSearchMoreActionItemBinding>(DataBindingUtil.inflate<GoodsSearchMoreActionItemBinding>(LayoutInflater.from(parent?.context), R.layout.goods_search_more_action_item,parent,false).then {
-            bind ->
-            var layoutParams = bind.root.layoutParams
-            layoutParams.width = (ScreenTool.getScreenWidth(bind.root.context)/2).toInt()
-            layoutParams.height = (ScreenTool.getScreenWidth(bind.root.context)/8).toInt()
-        })
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsMoreActionAdapter
-     * @Date   2018/3/15 下午4:04
-     * @Note   获取Item总数
-     */
-    override fun getItemCount(): Int {
-        return data.valueList.size
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsMoreActionAdapter
-     * @Date   2018/3/15 下午4:04
-     * @Note   构建LayoutHelper
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return GridLayoutHelper(2).then {
-            self ->
-            /**取消自动填充*/
-            self.setAutoExpand(false)
-
-            /**设置上下间距*/
-            self.hGap = 20
-
-            /**设置Margin*/
-            self.setMargin(20,0,20,0)
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsMoreActionAdapter
-     * @Date   2018/3/15 下午4:06
-     * @Note   绑定ViewHolder
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<GoodsSearchMoreActionItemBinding>?, position: Int) {
-
-        holder?.bind {
-            binding ->
-            binding.data = getItem(position)
-            binding.root.setOnClickListener {
-                data.valueList.forEach {
-                    item ->
-                    if (data.valueList.indexOf(item) != position){
-                        item.selectedObservable.set(false)
-                    }else{
-                        getItem(position).selectedObservable.set(true)
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsMoreActionAdapter
-     * @Date   2018/3/21 下午2:36
-     * @Note   回归初始值
-     */
-    fun resetData(){
-        data.valueList.forEach {
-            item ->
-            item.selectedObservable.set(item.selected.then {
-                if (it){
-                    data.selectedFilterValue = item
-                    data.selectedValueObser.set(item)
-                }
-            })
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsMoreActionAdapter
-     * @Date   2018/3/21 下午2:36
-     * @Note   注入选中数据
-     */
-    fun injectData(){
-        data.valueList.forEach {
-            item ->
-            item.selected = item.selectedObservable.get().then {
-                if (it){
-                    data.selectedFilterValue = item
-                    data.selectedValueObser.set(item)
-                }
-            }
-        }
-    }
-}

+ 0 - 194
goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsPromotionDetailAdapter.kt

@@ -1,194 +0,0 @@
-package com.enation.javashop.android.component.goods.adapter
-
-import android.databinding.DataBindingUtil
-import android.text.SpannableStringBuilder
-import android.text.Spanned
-import android.text.style.AbsoluteSizeSpan
-import android.text.style.StrikethroughSpan
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.databinding.GoodsPromotionDetailItemLayBinding
-import com.enation.javashop.android.component.goods.fragment.GoodsInfoFragment
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.lib.base.LIFE_CYCLE_DESTORY
-import com.enation.javashop.android.lib.utils.*
-import com.enation.javashop.android.middleware.model.GoodsViewModel
-import com.enation.javashop.android.middleware.model.PromotionDetailViewModel
-import com.enation.javashop.net.engine.utils.ThreadUtils
-import com.enation.javashop.utils.base.tool.BaseToolActivity
-import com.enation.javashop.utils.base.tool.ScreenTool
-import java.lang.ref.WeakReference
-
-/**
- * @author LDD
- * @Date   2018/4/8 下午1:44
- * @From   com.enation.javashop.android.component.goods.adapter
- * @Note   商品所属店铺信息
- */
-class GoodsPromotionDetailAdapter(val weakControl : WeakReference<GoodsInfoFragment>, var promotion : PromotionDetailViewModel, goods :GoodsViewModel, complete :()->Unit) : BaseDelegateAdapter<BaseRecyclerViewHolder<GoodsPromotionDetailItemLayBinding>, Int>() {
-
-
-    /**
-     * @Name  timer
-     * @Type  TimeEngine
-     * @Note  倒计时引擎
-     */
-    private val timer by lazy {
-        if (promotion.secKill != null){
-          return@lazy TimeEngine.build(promotion.secKill!!.disEndTime)
-        }else if (promotion.groupBuy != null){
-            return@lazy TimeEngine.build(promotion.groupBuy!!.endTime,current = true)
-        }else {
-            return@lazy TimeEngine.build(100000)
-        }
-    }
-
-    init {
-            if(promotion.secKill !=null || promotion.groupBuy != null) {
-                timer.setComplete(complete)
-            }
-            weakControl.get()?.addLifeCycleListener { state ->
-            if (state == LIFE_CYCLE_DESTORY){
-                if(promotion.secKill !=null || promotion.groupBuy != null){
-                    timer.destory()
-                }
-            }
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoShopAdapter
-     * @Date   2018/4/8 下午1:45
-     * @Note   数据提供者
-     */
-    override fun dataProvider(): Any {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoShopAdapter
-     * @Date   2018/4/8 下午1:45
-     * @Note   Item过滤
-     * @param  position 坐标
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoShopAdapter
-     * @Date   2018/4/8 下午1:45
-     * @Note   创建ViewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<GoodsPromotionDetailItemLayBinding> {
-
-        return BaseRecyclerViewHolder(DataBindingUtil.bind(LayoutInflater.from(parent?.context).inflate(R.layout.goods_promotion_detail_item_lay,parent,false)))
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoShopAdapter
-     * @Date   2018/4/8 下午1:46
-     * @Note   获取Item总数
-     */
-    override fun getItemCount(): Int {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoShopAdapter
-     * @Date   2018/4/8 下午1:46
-     * @Note   创建LayoutHelper
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return LinearLayoutHelper(0,1).then {
-            it.setMargin(0,0,0,10.dpToPx())
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoShopAdapter
-     * @Date   2018/4/8 下午1:46
-     * @Note   绑定ViewHolder
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<GoodsPromotionDetailItemLayBinding>?, position: Int) {
-        holder?.bind {
-            binding ->
-            if (promotion.exchange != null){
-                binding.timeLay.gone()
-                binding.buyNumTv.visable()
-                binding.logoIv.setImageResource(R.drawable.javashop_icon_point)
-                binding.logoTv.text = "积分商城"
-                val priceStr = String.format("¥%.2f",promotion.exchange!!.exchangeMoney)
-                val pointStr = String.format("+%.0f积分",promotion.exchange!!.exchangePoint)
-                var contentText = priceStr
-                if (promotion.exchange!!.exchangePoint > 0){
-                    contentText += pointStr
-                }
-                val spanStr = SpannableStringBuilder(contentText)
-                val bigTextSize = AbsoluteSizeSpan((ScreenTool.getScreenWidth(binding.root.context) * 0.8 / 5 - 25.dpToPx()).toInt())
-                spanStr.setSpan(bigTextSize,1,priceStr.length-3, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
-                binding.priceTv.text = spanStr
-
-                val orgPriceStar = SpannableStringBuilder(String.format("¥%.2f",promotion.exchange!!.orgPrice))
-                orgPriceStar.setSpan(StrikethroughSpan(),0,orgPriceStar.length,Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
-                binding.orgPriceTv.text = orgPriceStar
-                binding.promotionTitle.text = "商品疯狂售卖中"
-                binding.buyNumTv.text = "已售出${promotion.exchange!!.buyNum}件"
-            }else if(promotion.secKill != null){
-                binding.timeLay.visable()
-                binding.buyNumTv.gone()
-                binding.logoIv.setImageResource(R.drawable.javashop_icon_seckill)
-                binding.logoTv.text = "限时抢购"
-                var priceStr = String.format("¥%.2f",promotion.secKill!!.seckillPrice)
-                val spanStr = SpannableStringBuilder(priceStr)
-                val bigTextSize = AbsoluteSizeSpan((ScreenTool.getScreenWidth(binding.root.context) * 0.8 / 5 - 25.dpToPx()).toInt())
-                spanStr.setSpan(bigTextSize,1,priceStr.length-3, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
-                binding.priceTv.text = spanStr
-                val orgPriceStar = SpannableStringBuilder(String.format("¥%.2f",promotion.secKill!!.orgPrice))
-                orgPriceStar.setSpan(StrikethroughSpan(),0,orgPriceStar.length,Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
-                binding.orgPriceTv.text = orgPriceStar
-                binding.promotionTitle.text = "距离活动结束还有"
-                timer.execute({day, hour, min, sec ->
-                    binding.root.context.to<BaseToolActivity>().runOnUiThread {
-                        binding.dayTv.text = "${day}天"
-                        binding.hourTv.text = if (hour < 10){ "0$hour"  } else { "$hour" }
-                        binding.minTv.text = if (min < 10){ "0$min"  } else { "$min" }
-                        binding.secTv.text = if (sec < 10){ "0$sec"  } else { "$sec" }
-                    }
-                })
-            }else if(promotion.groupBuy != null){
-                binding.timeLay.visable()
-                binding.buyNumTv.gone()
-                binding.logoIv.setImageResource(R.drawable.javashop_icon_groupbuy)
-                binding.logoTv.text = "团购"
-                var priceStr = String.format("¥%.2f",promotion.groupBuy!!.price)
-                val spanStr = SpannableStringBuilder(priceStr)
-                val bigTextSize = AbsoluteSizeSpan((ScreenTool.getScreenWidth(binding.root.context) * 0.8 / 5 - 25.dpToPx()).toInt())
-                spanStr.setSpan(bigTextSize,1,priceStr.length-3, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
-                binding.priceTv.text = spanStr
-                val orgPriceStar = SpannableStringBuilder(String.format("¥%.2f",promotion.groupBuy!!.orgPrice))
-                orgPriceStar.setSpan(StrikethroughSpan(),0,orgPriceStar.length,Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
-                binding.orgPriceTv.text = orgPriceStar
-                binding.promotionTitle.text = "距离活动结束还有"
-                timer.execute({day, hour, min, sec ->
-                    weakControl.get()?.activity?.runOnUiThread {
-                        binding.dayTv.text = "${day}天"
-                        binding.hourTv.text = if (hour < 10){ "0$hour"  } else { "$hour" }
-                        binding.minTv.text = if (min < 10){ "0$min"  } else { "$min" }
-                        binding.secTv.text = if (sec < 10){ "0$sec"  } else { "$sec" }
-                    }
-                })
-            }
-        }
-    }
-
-}

+ 0 - 103
goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsSearchFilterBrandAdapter.kt

@@ -1,103 +0,0 @@
-package com.enation.javashop.android.component.goods.adapter
-
-import android.databinding.DataBindingUtil
-import android.support.v4.app.FragmentActivity
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.databinding.GoodsSearchFilterBrandItemBinding
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.lib.utils.BaseRecyclerViewHolder
-import com.enation.javashop.android.middleware.model.GoodsFilterValue
-
-/**
- * @author LDD
- * @Date   2018/3/23 上午10:42
- * @From   com.enation.javashop.android.component.goods.adapter
- * @Note   品牌Item适配器
- */
-class GoodsSearchFilterBrandAdapter(val activity: FragmentActivity ,var data :ArrayList<GoodsFilterValue>) :BaseDelegateAdapter<BaseRecyclerViewHolder<GoodsSearchFilterBrandItemBinding>,GoodsFilterValue>() {
-
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterBrandAdapter
-     * @Date   2018/3/23 上午10:42
-     * @Note   数据提供
-     */
-    override fun dataProvider(): Any {
-        return data
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterBrandAdapter
-     * @Date   2018/3/23 上午10:42
-     * @Note   item点击过滤
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterBrandAdapter
-     * @Date   2018/3/23 上午10:42
-     * @Note   创建ViewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<GoodsSearchFilterBrandItemBinding> {
-        return BaseRecyclerViewHolder(DataBindingUtil.bind(LayoutInflater.from(parent?.context).inflate(R.layout.goods_search_filter_brand_item,parent,false)))
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterBrandAdapter
-     * @Date   2018/3/23 上午10:43
-     * @Note   获取Item总数
-     */
-    override fun getItemCount(): Int {
-        return data.size
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterBrandAdapter
-     * @Date   2018/3/23 上午10:43
-     * @Note   创建LayoutHelper
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return LinearLayoutHelper(0,data.size)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterBrandAdapter
-     * @Date   2018/3/23 上午10:43
-     * @Note   绑定数据
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<GoodsSearchFilterBrandItemBinding>?, position: Int) {
-        holder?.bind {
-            binding ->
-            var item = getItem(position)
-            if (position == 0 || (item.letter != null && item.letter != getItem(position-1).letter)){
-                binding.goodsSearchFilterBrandWorldLay.visibility = View.VISIBLE
-                binding.goodsSearchFilterBrandWorldTv.text = item.letter
-            }else{
-                binding.goodsSearchFilterBrandWorldLay.visibility = View.GONE
-            }
-            binding.data = getItem(position)
-            binding.root.setOnClickListener {
-                data.forEach {
-                    if (it == item){
-                        it.selectedObservable.set(true)
-                    }else{
-                        it.selectedObservable.set(false)
-                    }
-                }
-            }
-        }
-    }
-}

+ 0 - 210
goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsSearchFilterChildAdapter.kt

@@ -1,210 +0,0 @@
-package com.enation.javashop.android.component.goods.adapter
-
-import android.databinding.DataBindingUtil
-import android.support.v4.app.FragmentActivity
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.GridLayoutHelper
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.databinding.GoodsSearchFilterFragChildItemBinding
-import com.enation.javashop.android.component.goods.fragment.GoodsSearchFilterValueFragment
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.lib.utils.BaseRecyclerViewHolder
-import com.enation.javashop.android.lib.utils.judge
-import com.enation.javashop.android.lib.utils.then
-import com.enation.javashop.android.middleware.model.GoodsFilterValue
-import com.enation.javashop.android.middleware.model.GoodsFilterViewModel
-import com.enation.javashop.utils.base.tool.ScreenTool
-
-/**
- * @author LDD
- * @Date   2018/3/21 下午2:37
- * @From   com.enation.javashop.android.component.goods.adapter
- * @Note   商品列表筛选列表子视图
- */
-class GoodsSearchFilterChildAdapter(val activity: FragmentActivity , var datas :GoodsFilterViewModel) : BaseDelegateAdapter<BaseRecyclerViewHolder<GoodsSearchFilterFragChildItemBinding>, GoodsFilterValue>() {
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterChildAdapter
-     * @Date   2018/3/21 下午2:40
-     * @Note   数据提供者
-     */
-    override fun dataProvider(): Any {
-        return datas.valueList
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterChildAdapter
-     * @Date   2018/3/21 下午2:40
-     * @Note   点击事件过滤
-     * @param  position item坐标
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterChildAdapter
-     * @Date   2018/3/21 下午2:41
-     * @Note   创建ViewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<GoodsSearchFilterFragChildItemBinding> {
-        return BaseRecyclerViewHolder(DataBindingUtil.bind(LayoutInflater.from(parent?.context).inflate(R.layout.goods_search_filter_frag_child_item,parent,false)))
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterChildAdapter
-     * @Date   2018/3/21 下午2:41
-     * @Note   提供Item总数
-     */
-    override fun getItemCount(): Int {
-        return if (datas.valueList.size <= 3){
-            datas.valueList.size
-        }else if(datas.openFlag.get()){
-            if(datas.valueList.size > 9 && datas.filterName.contains("品牌")){
-                9
-            }else{
-                datas.valueList.size
-            }
-        }else{
-            3
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterChildAdapter
-     * @Date   2018/3/21 下午2:41
-     * @Note   创建LayoutHelper
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return GridLayoutHelper(3).then {
-            self ->
-
-            /**获取间隔  应为 屏幕总宽度的85%的20分之一*/
-            val interval = ScreenTool.getScreenWidth(activity) * 0.85 /20
-
-            /**取消自动填充*/
-            self.setAutoExpand(false)
-
-            /**设置左右间距*/
-            self.hGap = interval.toInt()
-
-            /**设置上下间距*/
-            self.vGap = interval.toInt()
-
-            /**设置Margin 当tag==-1时 代表该adapter为最后一个 当adapter为最后一个时 设置底部间距*/
-            self.setMargin(interval.toInt(),0, interval.toInt(),(tag == -1).judge(interval.toInt(),0))
-        }
-    }
-
-    fun notifyChild(){
-        if (itemCount > 3){
-            notifyItemRangeRemoved(3,itemCount-3)
-        }else{
-            notifyItemRangeInserted(3,itemCount-3)
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterChildAdapter
-     * @Date   2018/3/21 下午2:48
-     * @Note   绑定ViewHolder
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<GoodsSearchFilterFragChildItemBinding>?, position: Int) {
-        holder?.bind {
-            binding ->
-
-            if (datas.valueList.size > 9 && position == 8 && datas.filterName.contains("品牌")){
-                binding.data = null
-                binding.root.setOnClickListener {
-                    val fragment = GoodsSearchFilterValueFragment()
-                    fragment.setData(datas)
-                    activity.supportFragmentManager
-                            .beginTransaction()
-                            .setCustomAnimations(R.anim.push_left_in, R.anim.push_left_out, R.anim.push_right_in, R.anim.push_right_out)
-                            .add(R.id.right_layout, fragment,"value")
-                            .addToBackStack(null).commit()
-                }
-            }else{
-                binding.data = datas.valueList[position]
-                binding.root.setOnClickListener {
-                    datas.valueList.forEach {
-                        item ->
-                        if (datas.valueList.indexOf(item) != position){
-                            item.selectedObservable.set(false)
-                        }else{
-                            getItem(position).selectedObservable.set(true)
-                            datas.selectedValueObser.set(getItem(position))
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterChildAdapter
-     * @Date   2018/3/21 下午2:48
-     * @Note   设置ViewType
-     */
-    override fun getItemViewType(position: Int): Int {
-        return 2
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterChildAdapter
-     * @Date   2018/3/21 下午2:49
-     * @Note   回归原始数据
-     */
-    fun resetData(){
-        var selectFlag = false
-        datas.valueList.forEach {
-            item ->
-            item.selectedObservable.set(item.selected.then {
-                if (it){
-                    selectFlag = true
-                    datas.selectedFilterValue = item
-                    datas.selectedValueObser.set(item)
-                }
-            })
-        }
-        if (!selectFlag && datas.selectedValueObser.get()!=null){
-            datas.selectedFilterValue = null
-            datas.selectedValueObser.set(null)
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterChildAdapter
-     * @Date   2018/3/21 下午2:49
-     * @Note   注入操作后的数据
-     */
-    fun injectData(){
-        var selectFlag = false
-        datas.valueList.forEach {
-            item ->
-            item.selected = item.selectedObservable.get().then {
-                if (it){
-                    selectFlag = true
-                    datas.selectedFilterValue = item
-                    datas.selectedValueObser.set(item)
-                }
-            }
-        }
-        if (!selectFlag && datas.selectedValueObser.get()!=null){
-            datas.selectedFilterValue = null
-            datas.selectedValueObser.set(null)
-        }
-    }
-
-}

+ 0 - 124
goods/src/main/code/com/enation/javashop/android/component/goods/adapter/GoodsSearchFilterParentAdapter.kt

@@ -1,124 +0,0 @@
-package com.enation.javashop.android.component.goods.adapter
-
-import android.app.Activity
-import android.databinding.DataBindingUtil
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.databinding.GoodsSearchFilterFragParentItemBinding
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.lib.utils.BaseRecyclerViewHolder
-import com.enation.javashop.android.lib.utils.OnClickListenerAntiViolence
-import com.enation.javashop.android.lib.utils.then
-import com.enation.javashop.android.middleware.model.GoodsFilterViewModel
-import com.enation.javashop.utils.base.tool.ScreenTool
-
-/**
- * @author LDD
- * @Date   2018/3/21 下午2:50
- * @From   com.enation.javashop.android.component.goods.adapter
- * @Note   商品筛选父视图适配器
- */
-class GoodsSearchFilterParentAdapter(val activity: Activity, val data :GoodsFilterViewModel) : BaseDelegateAdapter<BaseRecyclerViewHolder<GoodsSearchFilterFragParentItemBinding>, GoodsFilterViewModel>() {
-
-    /**
-     * @Name  openCallback
-     * @Type  block
-     * @Note  打开子视图回调
-     */
-    private var openCallback :(()->Unit)? = null
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterParentAdapter
-     * @Date   2018/3/21 下午2:50
-     * @Note   设置回到
-     * @param  call 回调代码块
-     */
-    fun setCallBack( call :()->Unit){
-        openCallback = call
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterParentAdapter
-     * @Date   2018/3/21 下午2:51
-     * @Note   提供ViewType
-     */
-    override fun getItemViewType(position: Int): Int {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterParentAdapter
-     * @Date   2018/3/21 下午2:51
-     * @Note   提供数据
-     */
-    override fun dataProvider(): Any {
-        return data
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterParentAdapter
-     * @Date   2018/3/21 下午2:51
-     * @Note   item点击过滤
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterParentAdapter
-     * @Date   2018/3/21 下午2:51
-     * @Note   创建ViewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<GoodsSearchFilterFragParentItemBinding> {
-        return BaseRecyclerViewHolder(DataBindingUtil.bind(LayoutInflater.from(parent?.context).inflate(R.layout.goods_search_filter_frag_parent_item,parent,false)))
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterParentAdapter
-     * @Date   2018/3/21 下午2:52
-     * @Note   提供Item数量
-     */
-    override fun getItemCount(): Int {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterParentAdapter
-     * @Date   2018/3/21 下午2:52
-     * @Note   提供LayoutHelper
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return LinearLayoutHelper(0,1).then {
-            self ->
-            val interval = ScreenTool.getScreenWidth(activity) * 0.85 /20
-            self.setMargin(interval.toInt(),interval.toInt(), interval.toInt(),interval.toInt())
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterParentAdapter
-     * @Date   2018/3/21 下午2:52
-     * @Note   绑定ViewHolder
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<GoodsSearchFilterFragParentItemBinding>?, position: Int) {
-        holder?.bind {
-            binding ->
-            binding.data = this.data
-            binding.root.setOnClickListener(OnClickListenerAntiViolence({
-                data.openFlag.set(!data.openFlag.get())
-                openCallback?.invoke()
-            }))
-        }
-    }
-}

+ 0 - 144
goods/src/main/code/com/enation/javashop/android/component/goods/adapter/SearchGoodsAdapter.kt

@@ -1,144 +0,0 @@
-package com.enation.javashop.android.component.goods.adapter
-
-import android.databinding.DataBindingUtil
-import android.databinding.ViewDataBinding
-import android.support.v7.app.AppCompatActivity
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.GridLayoutHelper
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.databinding.GoodsSearchItemGridLayBinding
-import com.enation.javashop.android.component.goods.databinding.GoodsSearchItemListLayBinding
-import com.enation.javashop.android.jrouter.JRouter
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.lib.utils.BaseRecyclerViewHolder
-import com.enation.javashop.android.lib.utils.errorLog
-import com.enation.javashop.android.lib.utils.push
-import com.enation.javashop.android.lib.utils.then
-import com.enation.javashop.android.middleware.model.GoodsItemViewModel
-
-/**
- * @author LDD
- * @Date   2018/3/21 下午2:53
- * @From   com.enation.javashop.android.component.goods.adapter
- * @Note   商品列表适配器
- */
-class SearchGoodsAdapter(var dataList:ArrayList<GoodsItemViewModel>) : BaseDelegateAdapter<BaseRecyclerViewHolder<ViewDataBinding>, GoodsItemViewModel>() {
-
-    /**
-     * @Name  isList
-     * @Type  Boolean
-     * @Note  标识列表状态是list还是grid
-     */
-    private var isList  = true
-
-    /**
-     * @author LDD
-     * @From   SearchGoodsAdapter
-     * @Date   2018/3/21 下午2:53
-     * @Note   数据提供者
-     */
-    override fun dataProvider(): Any {
-        return dataList
-    }
-
-    /**
-     * @author LDD
-     * @From   SearchGoodsAdapter
-     * @Date   2018/3/21 下午2:54
-     * @Note   item点击过滤
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   SearchGoodsAdapter
-     * @Date   2018/3/21 下午2:54
-     * @Note   设置ViewType
-     */
-    override fun getItemViewType(position: Int): Int {
-        return if (isList) 0 else 1
-    }
-
-    /**
-     * @author LDD
-     * @From   SearchGoodsAdapter
-     * @Date   2018/3/21 下午2:54
-     * @Note   创建ViewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<ViewDataBinding> {
-        return if (isList){
-            BaseRecyclerViewHolder<GoodsSearchItemGridLayBinding>(DataBindingUtil.bind(LayoutInflater.from(parent?.context).inflate(R.layout.goods_search_item_list_lay,parent,false)))
-        }else{
-            BaseRecyclerViewHolder<GoodsSearchItemGridLayBinding>(DataBindingUtil.bind(LayoutInflater.from(parent?.context).inflate(R.layout.goods_search_item_grid_lay,parent,false)))
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   SearchGoodsAdapter
-     * @Date   2018/3/21 下午2:54
-     * @Note   设置Item数量
-     */
-    override fun getItemCount(): Int {
-        return dataList.size
-    }
-
-    /**
-     * @author LDD
-     * @From   SearchGoodsAdapter
-     * @Date   2018/3/21 下午2:55
-     * @Note   设置LayoutHelper
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return if (isList){
-            LinearLayoutHelper(0,1)
-        }else{
-            GridLayoutHelper(2).then {
-                self ->
-                /**取消自动填充*/
-                self.setAutoExpand(false)
-
-                /**设置左右间距*/
-                self.hGap = 10
-
-                /**设置上下间距*/
-                self.vGap = 10
-
-                /**设置Margin*/
-                self.setMargin(0,10,0,0)
-            }
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   SearchGoodsAdapter
-     * @Date   2018/3/21 下午2:55
-     * @Note   绑定ViewHolder
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<ViewDataBinding>?, position: Int) {
-        holder?.bind {
-            binding ->
-            if (binding is GoodsSearchItemGridLayBinding){
-                binding.data = getItem(position)
-            }else if(binding is GoodsSearchItemListLayBinding){
-                binding.data = getItem(position)
-            }
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   SearchGoodsAdapter
-     * @Date   2018/3/21 下午2:55
-     * @Note   item样式转换
-     */
-    fun itemTransform(){
-        isList = !isList
-    }
-}

+ 0 - 104
goods/src/main/code/com/enation/javashop/android/component/goods/adapter/SearchHistoryAdapter.kt

@@ -1,104 +0,0 @@
-package com.enation.javashop.android.component.goods.adapter
-
-import android.databinding.DataBindingUtil
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.agreement.HistoryAgreement
-import com.enation.javashop.android.component.goods.databinding.GoodsInfoAdviceItemBinding
-import com.enation.javashop.android.component.goods.databinding.SearchHistoryItemLayBinding
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.lib.base.BaseApplication
-import com.enation.javashop.android.lib.utils.BaseRecyclerViewHolder
-import com.enation.javashop.android.lib.utils.then
-import com.enation.javashop.android.middleware.model.HistoryModel
-import com.enation.javashop.utils.base.tool.CommonTool
-import com.enation.javashop.utils.base.tool.ScreenTool
-
-/**
- * @author LDD
- * @Date   2018/4/8 下午1:31
- * @From   com.enation.javashop.android.component.goods.adapter
- * @Note   商品咨询
- */
-class SearchHistoryAdapter(val data :ArrayList<HistoryModel>,val agreement: HistoryAgreement) :BaseDelegateAdapter<BaseRecyclerViewHolder<SearchHistoryItemLayBinding>,HistoryModel>() {
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:32
-     * @Note   数据提供者
-     */
-    override fun dataProvider(): Any {
-        return data
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:33
-     * @Note   点击过滤
-     * @param  position 坐标
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:33
-     * @Note   创建ViewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<SearchHistoryItemLayBinding> {
-        return BaseRecyclerViewHolder(DataBindingUtil.bind(LayoutInflater.from(parent?.context).inflate(R.layout.search_history_item_lay,parent,false)))
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:33
-     * @Note   item总数
-     */
-    override fun getItemCount(): Int {
-        return data.count()
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:34
-     * @Note   创建LayoutHelper
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return LinearLayoutHelper(0,data.count())
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:35
-     * @Note   绑定数据
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<SearchHistoryItemLayBinding>?, position: Int) {
-        holder?.bind { binding ->
-            binding.text.text = getItem(position).getViewText()
-            binding.text.setOnClickListener {
-                agreement.add(getItem(position))
-            }
-            binding.delete.setOnClickListener {
-                CommonTool.createVerifyDialog("是否删除该条记录","我再想想","确定删除",binding.root.context,object :CommonTool.DialogInterface{
-                    override fun yes() {
-                        agreement.delete(getItem(position))
-                    }
-
-                    override fun no() {
-
-                    }
-                }).show()
-            }
-        }
-    }
-}

+ 0 - 99
goods/src/main/code/com/enation/javashop/android/component/goods/adapter/SearchHistoryClearAdapter.kt

@@ -1,99 +0,0 @@
-package com.enation.javashop.android.component.goods.adapter
-
-import android.databinding.DataBindingUtil
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.agreement.HistoryAgreement
-import com.enation.javashop.android.component.goods.databinding.GoodsInfoAdviceItemBinding
-import com.enation.javashop.android.component.goods.databinding.SearchClearLayBinding
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.lib.base.BaseApplication
-import com.enation.javashop.android.lib.utils.BaseRecyclerViewHolder
-import com.enation.javashop.android.lib.utils.then
-import com.enation.javashop.utils.base.tool.CommonTool
-import com.enation.javashop.utils.base.tool.ScreenTool
-
-/**
- * @author LDD
- * @Date   2018/4/8 下午1:31
- * @From   com.enation.javashop.android.component.goods.adapter
- * @Note   商品咨询
- */
-class SearchHistoryClearAdapter(val agreement: HistoryAgreement) :BaseDelegateAdapter<BaseRecyclerViewHolder<SearchClearLayBinding>,Int>() {
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:32
-     * @Note   数据提供者
-     */
-    override fun dataProvider(): Any {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:33
-     * @Note   点击过滤
-     * @param  position 坐标
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:33
-     * @Note   创建ViewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<SearchClearLayBinding> {
-        return BaseRecyclerViewHolder(DataBindingUtil.bind(LayoutInflater.from(parent?.context).inflate(R.layout.search_clear_lay,parent,false)))
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:33
-     * @Note   item总数
-     */
-    override fun getItemCount(): Int {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:34
-     * @Note   创建LayoutHelper
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return LinearLayoutHelper(0,1)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:35
-     * @Note   绑定数据
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<SearchClearLayBinding>?, position: Int) {
-        holder?.bind {binding ->
-            binding.clearLay.setOnClickListener {
-                CommonTool.createVerifyDialog("确认清空历史搜索么?","取消","确认",binding.root.context,object : CommonTool.DialogInterface{
-                    override fun yes() {
-                        agreement.clear()
-                    }
-
-                    override fun no() {
-
-                    }
-                }).show()
-            }
-        }
-    }
-}

+ 0 - 85
goods/src/main/code/com/enation/javashop/android/component/goods/adapter/SearchHistoryHeaderAdapter.kt

@@ -1,85 +0,0 @@
-package com.enation.javashop.android.component.goods.adapter
-
-import android.databinding.DataBindingUtil
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.databinding.GoodsInfoAdviceItemBinding
-import com.enation.javashop.android.component.goods.databinding.SearchHistoryHeaderLayBinding
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.lib.base.BaseApplication
-import com.enation.javashop.android.lib.utils.BaseRecyclerViewHolder
-import com.enation.javashop.android.lib.utils.then
-import com.enation.javashop.utils.base.tool.ScreenTool
-
-/**
- * @author LDD
- * @Date   2018/4/8 下午1:31
- * @From   com.enation.javashop.android.component.goods.adapter
- * @Note   商品咨询
- */
-class SearchHistoryHeaderAdapter :BaseDelegateAdapter<BaseRecyclerViewHolder<SearchHistoryHeaderLayBinding>,Int>() {
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:32
-     * @Note   数据提供者
-     */
-    override fun dataProvider(): Any {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:33
-     * @Note   点击过滤
-     * @param  position 坐标
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:33
-     * @Note   创建ViewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<SearchHistoryHeaderLayBinding> {
-        return BaseRecyclerViewHolder(DataBindingUtil.bind(LayoutInflater.from(parent?.context).inflate(R.layout.search_history_header_lay,parent,false)))
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:33
-     * @Note   item总数
-     */
-    override fun getItemCount(): Int {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:34
-     * @Note   创建LayoutHelper
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return LinearLayoutHelper(0,1)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:35
-     * @Note   绑定数据
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<SearchHistoryHeaderLayBinding>?, position: Int) {
-
-    }
-}

+ 0 - 108
goods/src/main/code/com/enation/javashop/android/component/goods/adapter/SearchHotKeyAdapter.kt

@@ -1,108 +0,0 @@
-package com.enation.javashop.android.component.goods.adapter
-
-import android.databinding.DataBindingUtil
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import android.widget.LinearLayout
-import com.alibaba.android.vlayout.LayoutHelper
-import com.alibaba.android.vlayout.layout.LinearLayoutHelper
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.databinding.GoodsInfoAdviceItemBinding
-import com.enation.javashop.android.component.goods.databinding.HotkeyItemLayBinding
-import com.enation.javashop.android.component.goods.databinding.SearchHotkeyLayBinding
-import com.enation.javashop.android.lib.adapter.BaseDelegateAdapter
-import com.enation.javashop.android.lib.base.BaseApplication
-import com.enation.javashop.android.lib.utils.BaseRecyclerViewHolder
-import com.enation.javashop.android.lib.utils.dpToPx
-import com.enation.javashop.android.lib.utils.then
-import com.enation.javashop.utils.base.tool.ScreenTool
-
-/**
- * @author LDD
- * @Date   2018/4/8 下午1:31
- * @From   com.enation.javashop.android.component.goods.adapter
- * @Note   商品咨询
- */
-class SearchHotKeyAdapter(val hotKeys :ArrayList<String>,val agreement: HotKeyAgreement) :BaseDelegateAdapter<BaseRecyclerViewHolder<SearchHotkeyLayBinding>,Int>() {
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:32
-     * @Note   数据提供者
-     */
-    override fun dataProvider(): Any {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:33
-     * @Note   点击过滤
-     * @param  position 坐标
-     */
-    override fun itemFilter(position: Int): Boolean {
-        return true
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:33
-     * @Note   创建ViewHolder
-     */
-    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BaseRecyclerViewHolder<SearchHotkeyLayBinding> {
-        return BaseRecyclerViewHolder(DataBindingUtil.bind(LayoutInflater.from(parent?.context).inflate(R.layout.search_hotkey_lay,parent,false)))
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:33
-     * @Note   item总数
-     */
-    override fun getItemCount(): Int {
-        return 1
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:34
-     * @Note   创建LayoutHelper
-     */
-    override fun onCreateLayoutHelper(): LayoutHelper {
-        return LinearLayoutHelper(0,1)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoAdviceAdapter
-     * @Date   2018/4/8 下午1:35
-     * @Note   绑定数据
-     */
-    override fun onBindViewHolder(holder: BaseRecyclerViewHolder<SearchHotkeyLayBinding>?, position: Int) {
-        holder?.bind { binding ->
-            binding.hotList.removeAllViews()
-            for (hotKey in hotKeys) {
-               val childBinding :HotkeyItemLayBinding = DataBindingUtil.inflate(LayoutInflater.from(binding.root.context), R.layout.hotkey_item_lay, binding.hotList, false)
-               childBinding.root.setOnClickListener {
-                agreement.hotkeySelect(hotKey)
-               }
-                val layoutParams = LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,LinearLayout.LayoutParams.MATCH_PARENT)
-                layoutParams.setMargins(10.dpToPx(),0,0,0)
-                childBinding.root.layoutParams = layoutParams
-                childBinding.data = hotKey
-                binding.hotList.addView(childBinding.root)
-            }
-        }
-    }
-}
-
-
-interface HotKeyAgreement{
-
-    fun hotkeySelect(key :String)
-
-}

+ 0 - 12
goods/src/main/code/com/enation/javashop/android/component/goods/agreement/HistoryAgreement.kt

@@ -1,12 +0,0 @@
-package com.enation.javashop.android.component.goods.agreement;
-
-import com.enation.javashop.android.middleware.model.HistoryModel;
-
-interface HistoryAgreement {
-
-    fun delete(item :HistoryModel)
-
-    fun add(item:HistoryModel)
-
-    fun clear()
-}

+ 0 - 32
goods/src/main/code/com/enation/javashop/android/component/goods/di/GoodsComponent.kt

@@ -1,32 +0,0 @@
-package com.enation.javashop.android.component.goods.di
-
-import com.enation.javashop.android.component.goods.activity.GoodsActivity
-import com.enation.javashop.android.component.goods.activity.GoodsSearchActivity
-import com.enation.javashop.android.component.goods.activity.SearchActivity
-import com.enation.javashop.android.component.goods.fragment.GoodsCommentFragment
-import com.enation.javashop.android.component.goods.fragment.GoodsInfoFragment
-import com.enation.javashop.android.component.goods.fragment.GoodsIntroduceFragment
-import com.enation.javashop.android.middleware.di.ApplicationComponent
-import dagger.Component
-
-/**
- * @author LDD
- * @Date   2018/3/9 上午9:05
- * @From   com.enation.javashop.android.component.goods.di
- * @Note   商品模块依赖注入
- */
-@Component(dependencies = arrayOf(ApplicationComponent::class))
-interface GoodsComponent {
-    fun inject(activity:GoodsSearchActivity)
-
-    fun inject(activity:GoodsActivity)
-
-    fun inject(fragment: GoodsInfoFragment)
-
-    fun inject(fragment: GoodsIntroduceFragment)
-
-    fun inject(fragment: GoodsCommentFragment)
-
-    fun inject(fragment: SearchActivity)
-
-}

+ 0 - 230
goods/src/main/code/com/enation/javashop/android/component/goods/fragment/GoodsCommentFragment.kt

@@ -1,230 +0,0 @@
-package com.enation.javashop.android.component.goods.fragment
-
-import android.graphics.Color
-import android.os.Handler
-import com.alibaba.android.vlayout.DelegateAdapter
-import com.alibaba.android.vlayout.VirtualLayoutManager
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.adapter.GoodsCommentItemAdapter
-import com.enation.javashop.android.component.goods.databinding.GoodsCommentLayBinding
-import com.enation.javashop.android.component.goods.launch.GoodsLaunch
-import com.enation.javashop.android.jrouter.external.annotation.Router
-import com.enation.javashop.android.lib.base.BaseFragment
-import com.enation.javashop.android.lib.utils.showMessage
-import com.enation.javashop.android.lib.utils.to
-import com.enation.javashop.android.lib.utils.weak
-import com.enation.javashop.android.middleware.logic.contract.goods.GoodsCommentContract
-import com.enation.javashop.android.middleware.logic.presenter.goods.GoodsCommentPresenter
-import com.enation.javashop.android.middleware.model.CommentNumViewModel
-import com.enation.javashop.android.middleware.model.GoodsCommentViewModel
-import com.enation.javashop.net.engine.model.NetState
-import kotlinx.android.synthetic.main.goods_comment_lay.*
-
-/**
- * @author LDD
- * @Date   2018/3/30 下午2:56
- * @From   com.enation.javashop.android.component.goods.fragment
- * @Note   商品评论页面
- */
-@Router(path = "/goods/comment")
-class GoodsCommentFragment :BaseFragment<GoodsCommentPresenter,GoodsCommentLayBinding>(),GoodsCommentContract.View {
-
-    var goodsId = 0
-
-    var page = 1
-
-    var state = ""
-
-    /**
-     * @Name  virtualLayoutManager
-     * @Type  VirtualLayoutManager
-     * @Note  VLayoutManager
-     */
-    private lateinit var virtualLayoutManager: VirtualLayoutManager
-
-    /**
-     * @Name  delegateAdapter
-     * @Type  DelegateAdapter
-     * @Note  七巧板适配器
-     */
-    private lateinit var delegateAdapter: DelegateAdapter
-
-    /**
-     * @Name  adapter
-     * @Type  GoodsCommentItemAdapter
-     * @Note  商品评论item适配器
-     */
-    private lateinit var adapter :GoodsCommentItemAdapter
-    /**
-     * @author LDD
-     * @From   GoodsCommentFragment
-     * @Date   2018/3/30 下午2:59
-     * @Note   提供布局ID
-     */
-    override fun getLayId(): Int {
-        return R.layout.goods_comment_lay
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsCommentFragment
-     * @Date   2018/3/30 下午3:00
-     * @Note   依赖注入初始化
-     */
-    override fun bindDagger() {
-        GoodsLaunch.component.inject(this)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsCommentFragment
-     * @Date   2018/3/30 下午3:01
-     * @Note   初始化操作
-     */
-    override fun init() {
-        /**初始化LayoutMannager*/
-        virtualLayoutManager = VirtualLayoutManager(this.activity)
-
-        /**初始化适配器*/
-        delegateAdapter = DelegateAdapter(virtualLayoutManager)
-
-        /**初始化列表视图*/
-        goods_comment_rv.layoutManager = virtualLayoutManager
-        goods_comment_rv.adapter = delegateAdapter
-        adapter = GoodsCommentItemAdapter(this.weak(), ArrayList())
-        delegateAdapter.addAdapter(adapter)
-
-        /**加载评论日期*/
-        presenter.loadComment(goodsId,state,page)
-
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsCommentFragment
-     * @Date   2018/3/30 下午3:02
-     * @Note   绑定事件
-     */
-    override fun bindEvent() {
-        goods_comment_refresh.setOnLoadMoreListener {
-            Handler().postDelayed({
-                page += 1
-                presenter.loadComment(goodsId,state,page)
-                it.finishLoadMore()
-            },1500)
-        }
-        arrayListOf(goods_comment_all_btn,goods_comment_good_btn,goods_comment_difference_btn,goods_comment_image_btn,goods_comment_secondary_btn).forEach {
-            it.setOnClickListener {
-                goods_comment_all_tv.setTextColor(Color.parseColor("#636363"))
-                goods_comment_good_tv.setTextColor(Color.parseColor("#636363"))
-                goods_comment_secondary_tv.setTextColor(Color.parseColor("#636363"))
-                goods_comment_difference_tv.setTextColor(Color.parseColor("#636363"))
-                goods_comment_image_tv.setTextColor(Color.parseColor("#636363"))
-                when(it.tag.to<String>().toInt()){
-                    1 ->{
-                        state = ""
-                        goods_comment_all_tv.setTextColor(Color.parseColor("#fa5055"))
-                    }
-                    2 ->{
-                        state = "good"
-                        goods_comment_good_tv.setTextColor(Color.parseColor("#fa5055"))
-                    }
-                    3 ->{
-                        state = "neutral"
-                        goods_comment_secondary_tv.setTextColor(Color.parseColor("#fa5055"))
-                    }
-                    4 ->{
-                        state = "bad"
-                        goods_comment_difference_tv.setTextColor(Color.parseColor("#fa5055"))
-                    }
-                    5 ->{
-                        state = "image"
-                        goods_comment_image_tv.setTextColor(Color.parseColor("#fa5055"))
-                    }
-                }
-                page = 1
-                presenter.loadComment(goodsId,state,page)
-            }
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsCommentFragment
-     * @Date   2018/3/30 下午3:02
-     * @Note   显示评论
-     * @param  comments 评论数据
-     */
-    override fun showComment(comments: ArrayList<GoodsCommentViewModel>) {
-        if (page == 1){
-            adapter.data.clear()
-        }
-        adapter.data.addAll(comments)
-        adapter.notifyDataSetChanged()
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsCommentFragment
-     * @Date   2018/3/30 下午3:03
-     * @Note   显示评论数量
-     * @param  commentNum 评论数
-     */
-    override fun showCommentNum(commentNum: CommentNumViewModel) {
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsCommentFragment
-     * @Date   2018/3/30 下午3:03
-     * @Note   加载错误
-     * @param  message 信息
-     */
-    override fun onError(message: String, type: Int) {
-        getUtils().dismissDialog()
-        showMessage(message)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsCommentFragment
-     * @Date   2018/3/30 下午3:03
-     * @Note   加载成功
-     * @param  message 信息
-     */
-    override fun complete(message: String, type: Int) {
-        getUtils().dismissDialog()
-        showMessage(message)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsCommentFragment
-     * @Date   2018/3/30 下午3:04
-     * @Note   开始加载
-     */
-    override fun start() {
-        getUtils().showDialog()
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsCommentFragment
-     * @Date   2018/3/30 下午3:04
-     * @Note   网络实施监听
-     * @param  state 网络状态
-     */
-    override fun networkMonitor(state: NetState) {
-
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsCommentFragment
-     * @Date   2018/3/30 下午3:05
-     * @Note   销毁回调
-     */
-    override fun destory() {
-
-    }
-}

+ 0 - 238
goods/src/main/code/com/enation/javashop/android/component/goods/fragment/GoodsInfoFragment.kt

@@ -1,238 +0,0 @@
-package com.enation.javashop.android.component.goods.fragment
-
-import com.alibaba.android.vlayout.DelegateAdapter
-import com.alibaba.android.vlayout.VirtualLayoutManager
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.activity.GoodsActivity
-import com.enation.javashop.android.component.goods.adapter.*
-import com.enation.javashop.android.component.goods.databinding.GoodsInfoFragLayBinding
-import com.enation.javashop.android.component.goods.launch.GoodsLaunch
-import com.enation.javashop.android.component.goods.weiget.GoodsSpecView
-import com.enation.javashop.android.lib.base.BaseFragment
-import com.enation.javashop.android.lib.base.LIFE_CYCLE_RESUME
-import com.enation.javashop.android.lib.utils.*
-import com.enation.javashop.android.middleware.event.CartDataChange
-import com.enation.javashop.android.middleware.logic.contract.goods.GoodsInfoContract
-import com.enation.javashop.android.middleware.logic.presenter.goods.GoodsInfoPresenter
-import com.enation.javashop.android.middleware.model.*
-import com.enation.javashop.net.engine.model.NetState
-import com.enation.javashop.utils.base.tool.ScreenTool
-import kotlinx.android.synthetic.main.goods_act_lay.*
-import kotlinx.android.synthetic.main.goods_info_frag_lay.*
-import kotlinx.android.synthetic.main.goods_introduce_lay.*
-
-/**
- * @author LDD
- * @Date   2018/3/27 下午3:58
- * @From   com.enation.javashop.android.component.goods.fragment
- * @Note   商品详情
- */
-class GoodsInfoFragment :BaseFragment<GoodsInfoPresenter,GoodsInfoFragLayBinding>(),GoodsInfoContract.View,SpecAgreement{
-
-    var shopId = 0
-
-    var goodsId = 0
-
-    var promotionId : Int? = null
-
-    var skuList = ArrayList<SkuGoods>()
-
-    var specList = ArrayList<Any>()
-
-    var currentNum : Int = 1
-
-    private val specDialog by lazy {  GoodsSpecView.build(activity,skuList,specList).setSkuSelectObserver { sku , num ->
-        currentNum = num
-        specAdapter.text = sku!!.getSpecString() + "(${num}件)"
-        specAdapter.notifyDataSetChanged()
-    }.setAddCart { skuGoods, i ->
-        presenter.addCart(skuGoods.skuId,i,promotionId)
-    }}
-
-    lateinit var goodsInfoAdapter :GoodsInfoMessageAdapter
-
-    /**
-     * @Name  virtualLayoutManager
-     * @Type  VirtualLayoutManager
-     * @Note  VLayoutManager
-     */
-    private lateinit var virtualLayoutManager: VirtualLayoutManager
-
-    /**
-     * @Name  delegateAdapter
-     * @Type  DelegateAdapter
-     * @Note  七巧板适配器
-     */
-    private lateinit var delegateAdapter: DelegateAdapter
-
-    private val specAdapter = GoodsInfoSpecAdapter(this,"默认(1件)")
-
-    /**
-     * @Name  adapters
-     * @Type  ArrayList<DelegateAdapter.Adapter<*>>
-     * @Note  适配器列表
-     */
-    private var adapters = ArrayList<DelegateAdapter.Adapter<*>>()
-    /**
-     * @author LDD
-     * @From   GoodsInfoFragment
-     * @Date   2018/3/27 下午4:00
-     * @Note   获取LayoutId
-     */
-    override fun getLayId(): Int {
-        return R.layout.goods_info_frag_lay
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoFragment
-     * @Date   2018/3/27 下午4:01
-     * @Note   依赖注入
-     */
-    override fun bindDagger() {
-        GoodsLaunch.component.inject(this)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoFragment
-     * @Date   2018/3/27 下午4:01
-     * @Note   初始化
-     */
-    override fun init() {
-        /**初始化LayoutMannager*/
-        virtualLayoutManager = VirtualLayoutManager(this.activity)
-        /**初始化适配器*/
-        delegateAdapter = DelegateAdapter(virtualLayoutManager)
-        delegateAdapter.addAdapters(adapters)
-        /**配置到RecycleView*/
-        goods_info_rv.layoutManager = virtualLayoutManager
-        goods_info_rv.adapter = delegateAdapter
-        presenter.loadData(goodsId,shopId)
-    }
-    /**
-     * @author LDD
-     * @From   GoodsInfoFragment
-     * @Date   2018/3/27 下午4:01
-     * @Note   绑定事件
-     */
-    override fun bindEvent() {
-
-    }
-
-    override fun initList(goodsDetail: GoodsViewModel, gallery: ArrayList<GoodsGallery>, promotion: PromotionDetailViewModel, skuGoodsList: ArrayList<SkuGoods>, couponList: ArrayList<CouponViewModel>, commentList: HashMap<String,Any>, seller: ShopViewModel) {
-        if (promotion.groupBuy != null && promotion.groupBuy!!.id > 0){
-            promotionId = promotion.groupBuy!!.id
-        }else if ((promotion.secKill != null && promotion.secKill!!.id > 0)){
-            promotionId = promotion.secKill!!.id
-        }else if ((promotion.exchange != null && promotion.exchange!!.id > 0)){
-            promotionId = promotion.exchange!!.id
-        }
-        adapters.clear()
-        activity.to<GoodsActivity>().collectState(goodsDetail.collect)
-        skuList = skuGoodsList
-        specList = SkuGoods.mapSpec(skuList)
-        specList.add(1)
-        goodsInfoAdapter = GoodsInfoMessageAdapter(this,goodsDetail,couponList,promotion)
-        adapters.add(GoodsInfoGalleryAdapter(this.weak(),gallery))
-        if(promotion.groupBuy!= null || (promotion.secKill != null && promotion.secKill!!.disEndTime > 0) || promotion.exchange != null){
-            adapters.add(GoodsPromotionDetailAdapter(this.weak(),promotion,goodsDetail) {
-                presenter.loadData(goodsId,shopId)
-            })
-        }
-        adapters.add(goodsInfoAdapter)
-        adapters.add(specAdapter)
-        adapters.add(GoodsInfoWeigetAdapter(goodsDetail.weight))
-        if (commentList.count() > 0){
-            adapters.add(GoodsInfoCommentAdapter(activity.to<GoodsActivity>().weak(),commentList))
-        }
-        adapters.add(GoodsInfoShopAdapter(seller))
-        delegateAdapter.clear()
-        delegateAdapter.addAdapters(adapters)
-        delegateAdapter.notifyDataSetChanged()
-    }
-
-    override fun specShow() {
-       if (skuList.count() > 0){
-           specDialog.show(activity.goods_act_topbar_holder)
-       }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoFragment
-     * @Date   2018/3/27 下午4:08
-     * @Note   请求完成
-     * @param  message 信息
-     */
-    override fun complete(message: String, type: Int) {
-        getUtils().dismissDialog()
-        if (message == "加入购物车成功"){
-            showMessage(message)
-            getEventCenter().post(CartDataChange())
-        }else if (message == "立即购买"){
-            getEventCenter().post(CartDataChange())
-            push("/order/create")
-        }else{
-            showMessage(message)
-        }
-    }
-
-    /**
-     * 立即购买
-     */
-    fun buyNow(){
-        presenter.buyNum(specDialog.getSelectSku().skuId,currentNum,promotionId)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoFragment
-     * @Date   2018/3/27 下午4:08
-     * @Note   请求错误
-     * @param  错误信息
-     */
-    override fun onError(message: String, type: Int) {
-        showMessage(message)
-        getUtils().dismissDialog()
-        if (message.contains("登录")){
-            push("/member/login/main")
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoFragment
-     * @Date   2018/3/27 下午4:09
-     * @Note   请求开始
-     */
-    override fun start() {
-        getUtils().showDialog()
-    }
-
-    fun getCoupon(id :Int){
-        presenter.getCoupon(id)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoFragment
-     * @Date   2018/3/27 下午4:09
-     * @Note   网络实时监听
-     * @param  state 网络状态
-     */
-    override fun networkMonitor(state: NetState) {
-
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsInfoFragment
-     * @Date   2018/3/27 下午4:10
-     * @Note   销毁
-     */
-    override fun destory() {
-
-    }
-
-}

+ 0 - 144
goods/src/main/code/com/enation/javashop/android/component/goods/fragment/GoodsIntroduceFragment.kt

@@ -1,144 +0,0 @@
-package com.enation.javashop.android.component.goods.fragment
-
-import android.annotation.SuppressLint
-import android.webkit.WebSettings
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.databinding.GoodsIntroduceLayBinding
-import com.enation.javashop.android.component.goods.launch.GoodsLaunch
-import com.enation.javashop.android.lib.base.BaseFragment
-import com.enation.javashop.android.lib.utils.errorLog
-import com.enation.javashop.android.lib.utils.getColorCompatible
-import com.enation.javashop.android.middleware.logic.contract.goods.GoodsIntroduceContract
-import com.enation.javashop.android.middleware.logic.presenter.goods.GoodsIntroducePresenter
-import com.enation.javashop.android.middleware.model.GoodsParamParent
-import com.enation.javashop.android.middleware.utils.HtmlUtils
-import com.enation.javashop.net.engine.model.NetState
-import kotlinx.android.synthetic.main.goods_introduce_lay.*
-
-
-/**
- * @author LDD
- * @Date   2018/3/30 上午10:17
- * @From   com.enation.javashop.android.component.goods.fragment
- * @Note   商品介绍Fragment
- */
-class GoodsIntroduceFragment :BaseFragment<GoodsIntroducePresenter,GoodsIntroduceLayBinding>(),GoodsIntroduceContract.View {
-
-    var intro :String = ""
-
-    var params :ArrayList<GoodsParamParent> = ArrayList()
-
-    /**
-     * @author LDD
-     * @From   GoodsIntroduceFragment
-     * @Date   2018/3/30 上午10:22
-     * @Note   提供LayoutId
-     */
-    override fun getLayId(): Int {
-        return R.layout.goods_introduce_lay
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsIntroduceFragment
-     * @Date   2018/3/30 上午10:22
-     * @Note   依赖注入初始化
-     */
-    override fun bindDagger() {
-        GoodsLaunch.component.inject(this)
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsIntroduceFragment
-     * @Date   2018/3/30 上午10:23
-     * @Note   初始化操作
-     */
-    @SuppressLint("SetJavaScriptEnabled")
-    override fun init() {
-        val localWebSettings = goods_introduce_web.getSettings()
-        localWebSettings.useWideViewPort = true
-        localWebSettings.loadWithOverviewMode = true
-        localWebSettings.layoutAlgorithm = WebSettings.LayoutAlgorithm.NARROW_COLUMNS
-        localWebSettings.javaScriptEnabled = true
-        localWebSettings.setSupportZoom(true)
-        localWebSettings.builtInZoomControls = true
-        goods_introduce_web.isVerticalScrollBarEnabled = false
-        goods_introduce_web.isHorizontalScrollBarEnabled = false
-        errorLog("IMAGE",HtmlUtils.get.fitImageSize(intro))
-        goods_introduce_web.loadData(HtmlUtils.get.fitImageSize(intro), "text/html; charset=UTF-8", null);
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsIntroduceFragment
-     * @Date   2018/3/30 上午10:23
-     * @Note   绑定事件
-     */
-    override fun bindEvent() {
-        goods_introduce_intro.setOnClickListener {
-            goods_introduce_intro.setTextColor(context.getColorCompatible(R.color.javashop_color_select_color_red))
-            goods_introduce_spec.setTextColor(context.getColorCompatible(R.color.javashop_color_nomal_color_gray))
-            goods_introduce_web.loadData(HtmlUtils.get.fitImageSize(intro), "text/html; charset=UTF-8", null);
-        }
-        goods_introduce_spec.setOnClickListener {
-            goods_introduce_spec.setTextColor(context.getColorCompatible(R.color.javashop_color_select_color_red))
-            goods_introduce_intro.setTextColor(context.getColorCompatible(R.color.javashop_color_nomal_color_gray))
-            goods_introduce_web.loadData(HtmlUtils.get.buildParamsTable(params), "text/html; charset=UTF-8", null);
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsIntroduceFragment
-     * @Date   2018/3/30 上午10:24
-     * @Note   错误回调
-     * @param  message 错误信息
-     */
-    override fun onError(message: String, type: Int) {
-
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsIntroduceFragment
-     * @Date   2018/3/30 上午10:24
-     * @Note   完成回调
-     * @param  完成信息
-     */
-    override fun complete(message: String, type: Int) {
-
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsIntroduceFragment
-     * @Date   2018/3/30 上午10:25
-     * @Note   开始回调
-     */
-    override fun start() {
-
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsIntroduceFragment
-     * @Date   2018/3/30 上午10:25
-     * @Note   网络实时监控
-     * @param  state 网络状态
-     */
-    override fun networkMonitor(state: NetState) {
-
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsIntroduceFragment
-     * @Date   2018/3/30 上午10:25
-     * @Note   销毁回调
-     */
-    override fun destory() {
-
-    }
-
-}

+ 0 - 217
goods/src/main/code/com/enation/javashop/android/component/goods/fragment/GoodsSearchFilterFragment.kt

@@ -1,217 +0,0 @@
-package com.enation.javashop.android.component.goods.fragment
-
-import android.databinding.DataBindingUtil
-import android.os.Bundle
-import android.support.constraint.ConstraintLayout
-import android.support.v4.app.Fragment
-import android.support.v4.app.FragmentActivity
-import android.support.v4.widget.DrawerLayout
-import android.support.v7.widget.RecyclerView
-import android.view.Gravity
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import com.alibaba.android.vlayout.DelegateAdapter
-import com.alibaba.android.vlayout.VirtualLayoutManager
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.adapter.GoodsSearchFilterChildAdapter
-import com.enation.javashop.android.component.goods.adapter.GoodsSearchFilterParentAdapter
-import com.enation.javashop.android.component.goods.databinding.GoodsSearchFilterFragLayBinding
-import com.enation.javashop.android.lib.utils.NoAlphaItemAnimator
-import com.enation.javashop.android.lib.utils.reLayout
-import com.enation.javashop.android.lib.utils.then
-import com.enation.javashop.android.lib.utils.weak
-import com.enation.javashop.android.middleware.model.GoodsFilterViewModel
-import com.enation.javashop.utils.base.tool.ScreenTool
-import java.lang.ref.WeakReference
-
-
-/**
- * @author LDD
- * @Date   2018/3/20 下午2:27
- * @From   com.enation.javashop.android.component.goods.fragment
- * @Note   商品列表筛选Fragment
- */
-class GoodsSearchFilterFragment : Fragment() {
-
-    /**
-     * @Name  datas
-     * @Type  ArrayList<GoodsFilterViewModel>
-     * @Note  筛选数据源
-     */
-    private lateinit var datas: ArrayList<GoodsFilterViewModel>
-
-    /**
-     * @Name  dataBinding
-     * @Type  GoodsSearchFilterFragLayBinding
-     * @Note  databinding对象
-     */
-    private val dataBinding by lazy {
-        DataBindingUtil.bind<GoodsSearchFilterFragLayBinding>(LayoutInflater.from(context).inflate(R.layout.goods_search_filter_frag_lay, null))
-    }
-
-    /**
-     * @Name  virtualLayoutManager
-     * @Type  VirtualLayoutManager
-     * @Note  VLayoutManager
-     */
-    private lateinit var virtualLayoutManager: VirtualLayoutManager
-
-    /**
-     * @Name  delegateAdapter
-     * @Type  DelegateAdapter
-     * @Note  七巧板适配器
-     */
-    private lateinit var delegateAdapter: DelegateAdapter
-
-    /**
-     * @Name  confirmFlag
-     * @Type  Boolean
-     * @Note  标识是否点击了确认按钮
-     */
-    private var confirmFlag = false
-
-    /**
-     * @Name  adapterList
-     * @Type  ArrayList<DelegateAdapter.Adapter<*>>
-     * @Note  适配器列表
-     */
-    private var adapterList: ArrayList<DelegateAdapter.Adapter<*>> = ArrayList()
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterFragment
-     * @Date   2018/3/21 下午2:58
-     * @Note   初始化操作
-     */
-    fun init() {
-
-        /**初始化列表视图*/
-        virtualLayoutManager = VirtualLayoutManager(this.activity)
-        delegateAdapter = DelegateAdapter(virtualLayoutManager)
-        dataBinding.goodsSearchFilterFragRv.layoutManager = virtualLayoutManager
-        dataBinding.goodsSearchFilterFragRv.adapter = delegateAdapter
-        dataBinding.goodsSearchFilterFragRv.itemAnimator = NoAlphaItemAnimator().closeDefaultAnimator()
-        val weakActivity = WeakReference<FragmentActivity>(activity)
-        val viewPool = RecyclerView.RecycledViewPool()
-        dataBinding.goodsSearchFilterFragRv.recycledViewPool = viewPool
-        viewPool.setMaxRecycledViews(1, 10)
-        viewPool.setMaxRecycledViews(2, 10)
-        /**初始化适配器 当item为最后一个时 设置tag为-1*/
-        datas.forEach { item ->
-            var parent = GoodsSearchFilterParentAdapter(weakActivity.get()!!, item)
-            var child = GoodsSearchFilterChildAdapter(weakActivity.get()!!, item).then { self ->
-                if (datas.indexOf(item) == datas.size - 1) {
-                    self.tag = -1
-                }
-            }
-            /**设置弱引用*/
-            var weakChild = child.weak()
-
-            /**设置打开子视图回调*/
-            parent.setCallBack {
-                weakChild.get()?.notifyChild()
-            }
-            adapterList.add(parent)
-            adapterList.add(child)
-        }
-
-        /**设置adapter*/
-        delegateAdapter.addAdapters(adapterList)
-
-        /**设置回归事件*/
-        dataBinding.goodsSearchFilterFragReset.setOnClickListener {
-            datas.forEach { item ->
-                item.selectedFilterValue = null
-                item.selectedValueObser.set(null)
-                item.valueList.forEach { itemValue ->
-                    itemValue.selectedObservable.set(false)
-                }
-            }
-        }
-
-        /**设置确认事件*/
-        dataBinding.goodsSearchFilterFragConfirm.setOnClickListener {
-            confirmFlag = true
-            (dataBinding.root.parent.parent as DrawerLayout).closeDrawer(Gravity.RIGHT)
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterFragment
-     * @Date   2018/3/21 下午3:00
-     * @Note   drawlayout闭合事件回到 有GoodsSearchActivity调用
-     */
-    fun colseCallBack(){
-
-        /**如果点击过了确认按钮 循环执行注入数据方法并初始化flag  如果没有 循环执行回归数据方法*/
-        if (confirmFlag){
-            adapterList.forEach { item ->
-                if (item is GoodsSearchFilterChildAdapter) {
-                    item.injectData()
-                }
-            }
-            confirmFlag = false
-        }else{
-            adapterList.forEach { item ->
-                if (item is GoodsSearchFilterChildAdapter) {
-                    item.resetData()
-                }
-            }
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterFragment
-     * @Date   2018/3/21 下午3:02
-     * @Note   销毁调用
-     */
-    fun destory() {
-
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterFragment
-     * @Date   2018/3/21 下午3:02
-     * @Note   设置筛选数据
-     */
-    fun setFilterData(datas: ArrayList<GoodsFilterViewModel>) {
-        this.datas = datas
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterFragment
-     * @Date   2018/3/21 下午3:02
-     * @Note   创建View
-     */
-    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
-        return dataBinding.root
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterFragment
-     * @Date   2018/3/21 下午3:03
-     * @Note   View创建完成后回调
-     */
-    override fun onViewCreated(view: View?, savedInstanceState: Bundle?) {
-        super.onViewCreated(view, savedInstanceState)
-        init()
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterFragment
-     * @Date   2018/3/21 下午3:03
-     * @Note   View销毁时的回调
-     */
-    override fun onDestroyView() {
-        super.onDestroyView()
-        destory()
-    }
-
-}

+ 0 - 233
goods/src/main/code/com/enation/javashop/android/component/goods/fragment/GoodsSearchFilterValueFragment.kt

@@ -1,233 +0,0 @@
-package com.enation.javashop.android.component.goods.fragment
-
-import android.databinding.DataBindingUtil
-import android.os.Bundle
-import android.support.constraint.ConstraintLayout
-import android.support.v4.app.Fragment
-import android.support.v7.widget.RecyclerView
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import com.alibaba.android.vlayout.DelegateAdapter
-import com.alibaba.android.vlayout.VirtualLayoutManager
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.adapter.GoodsSearchFilterBrandAdapter
-import com.enation.javashop.android.component.goods.databinding.GoodsSearachFilterValueFragLayBinding
-import com.enation.javashop.android.lib.utils.ChinaeseSortHelper
-import com.enation.javashop.android.lib.utils.NoAlphaItemAnimator
-import com.enation.javashop.android.lib.utils.reLayout
-import com.enation.javashop.android.middleware.model.GoodsFilterValue
-import com.enation.javashop.android.middleware.model.GoodsFilterViewModel
-import com.enation.javashop.utils.base.tool.ScreenTool
-import java.text.Collator
-import java.util.*
-import kotlin.collections.ArrayList
-
-/**
- * @author LDD
- * @Date   2018/3/23 上午10:44
- * @From   com.enation.javashop.android.component.goods.fragment
- * @Note   品牌筛选Fragment
- */
-class GoodsSearchFilterValueFragment :Fragment() {
-
-    /**
-     * @Name  datas
-     * @Type  ArrayList<GoodsFilterValue>
-     * @Note  排序后的数据列表
-     */
-    private lateinit var datas :ArrayList<GoodsFilterValue>
-
-   /**
-    * @Name  strList
-    * @Type  ArrayList<String>
-    * @Note  排序后的首字母集合
-    */
-    private lateinit var strList:ArrayList<String>
-
-    /**
-     * @Name  orgData
-     * @Type  GoodsFilterViewModel
-     * @Note  原始数据
-     */
-    private lateinit var orgData :GoodsFilterViewModel
-
-    /**
-     * @Name  dataBinding
-     * @Type  GoodsSearachFilterValueFragLayBinding
-     * @Note  databinding对象
-     */
-    private val dataBinding by lazy {
-        DataBindingUtil.bind<GoodsSearachFilterValueFragLayBinding>(layoutInflater?.inflate(R.layout.goods_searach_filter_value_frag_lay,null))
-    }
-
-    /**
-     * @Name  virtualLayoutManager
-     * @Type  VirtualLayoutManager
-     * @Note  VLayoutManager
-     */
-    private lateinit var virtualLayoutManager: VirtualLayoutManager
-
-    /**
-     * @Name  delegateAdapter
-     * @Type  DelegateAdapter
-     * @Note  七巧板适配器
-     */
-    private lateinit var delegateAdapter: DelegateAdapter
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterValueFragment
-     * @Date   2018/3/22 下午1:51
-     * @Note   初始化
-     */
-    fun init(){
-        /**初始化列表视图*/
-        virtualLayoutManager = VirtualLayoutManager(this.activity)
-        delegateAdapter = DelegateAdapter(virtualLayoutManager)
-        dataBinding.goodsSearchFilterValueRv.layoutManager = virtualLayoutManager
-        dataBinding.goodsSearchFilterValueRv.adapter = delegateAdapter
-        dataBinding.goodsSearchFilterValueRv.itemAnimator = NoAlphaItemAnimator().closeDefaultAnimator()
-        val viewPool = RecyclerView.RecycledViewPool()
-        dataBinding.goodsSearchFilterValueRv.recycledViewPool = viewPool
-        viewPool.setMaxRecycledViews(1, 10)
-        viewPool.setMaxRecycledViews(2, 10)
-        delegateAdapter.addAdapter(GoodsSearchFilterBrandAdapter(activity,datas))
-
-        /**设置返回事件*/
-        dataBinding.goodsSearchFilterValueFragBack.setOnClickListener {
-            activity.supportFragmentManager.popBackStack()
-        }
-
-        /**初始化首字母查询View*/
-        dataBinding.goodsSearchFilterValueFastFindLay.setLetter(strList)
-        dataBinding.goodsSearchFilterValueFastFindLay.setOnTouchingLetterChangedListener {
-            letter ->
-            for (data in datas) {
-                if (data.letter == letter){
-                    dataBinding.goodsSearchFilterValueRv.scrollToPosition(datas.indexOf(data))
-                    return@setOnTouchingLetterChangedListener
-                }
-            }
-        }
-
-        /**设置确认事件*/
-        dataBinding.goodsSearchFilterValueFragConfrim.setOnClickListener {
-            confirm()
-            activity.supportFragmentManager.popBackStack()
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterValueFragment
-     * @Date   2018/3/22 下午1:51
-     * @Note   销毁回调
-     */
-    fun destory(){
-
-    }
-
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterValueFragment
-     * @Date   2018/3/21 下午3:02
-     * @Note   创建View
-     */
-    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
-        return dataBinding.root
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterValueFragment
-     * @Date   2018/3/21 下午3:03
-     * @Note   View创建完成后回调
-     */
-    override fun onViewCreated(view: View?, savedInstanceState: Bundle?) {
-        super.onViewCreated(view, savedInstanceState)
-        init()
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterValueFragment
-     * @Date   2018/3/21 下午3:03
-     * @Note   View销毁时的回调
-     */
-    override fun onDestroyView() {
-        super.onDestroyView()
-        destory()
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterValueFragment
-     * @Date   2018/3/23 上午10:47
-     * @Note   注入列表数据 并初始化排序
-     * @param  filter 筛选数据
-     */
-    fun setData(filter : GoodsFilterViewModel){
-        orgData = filter
-        initSoreBrandData()
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterValueFragment
-     * @Date   2018/3/23 上午10:47
-     * @Note   确认操作
-     */
-    fun confirm(){
-        datas.forEach {
-            item ->
-                if (item.selectedObservable.get()){
-                    orgData.selectedValueObser.set(item)
-                    orgData.valueList.forEach {
-                        if (item == it){
-                            it.selectedObservable.set(true)
-                        }else{
-                            it.selectedObservable.set(false)
-                        }
-                    }
-                }
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchFilterValueFragment
-     * @Date   2018/3/23 上午10:48
-     * @Note   初始化按字母排序
-     */
-    private fun initSoreBrandData(){
-        strList = ArrayList()
-
-        /**循环筛选首字母*/
-        orgData.valueList.forEach {
-            item ->
-            val str = ChinaeseSortHelper.getFirstSpell(item.name)
-            item.letter = str
-            if (!strList.contains(str)){
-                strList.add(str)
-            }
-        }
-
-        /**首字母排序*/
-        val cmp = Collator.getInstance(Locale.ENGLISH)
-        Collections.sort(strList, cmp)
-        datas = ArrayList()
-        strList.forEach {
-            s->
-            orgData.valueList.forEach {
-                item ->
-                if (item.letter == s && !datas.contains(item)){
-                    datas.add(item.copy())
-                }
-            }
-        }
-    }
-
-
-}

+ 0 - 29
goods/src/main/code/com/enation/javashop/android/component/goods/launch/GoodsLaunch.kt

@@ -1,29 +0,0 @@
-package com.enation.javashop.android.component.goods.launch
-
-import com.enation.javashop.android.component.goods.di.GoodsComponent
-import com.enation.javashop.android.component.goods.di.DaggerGoodsComponent
-import com.enation.javashop.android.jrouter.external.annotation.Router
-import com.enation.javashop.android.lib.base.BaseLaunch
-import com.enation.javashop.android.lib.utils.ChinaeseSortHelper
-import com.enation.javashop.android.lib.utils.errorLog
-import com.enation.javashop.android.middleware.di.DaggerManager
-
-/**
- * @author LDD
- * @Date   2018/3/9 上午9:06
- * @From   com.enation.javashop.android.component.goods.launch
- * @Note   商品模块启动入口
- */
-@Router(path = "/goods/launch")
-class GoodsLaunch : BaseLaunch() {
-
-    companion object {
-        lateinit var component :GoodsComponent
-    }
-
-    override fun moduleInit() {
-        component = DaggerGoodsComponent.builder()
-                .applicationComponent(DaggerManager.APPLICATION_COMPONENT)
-                .build()
-    }
-}

+ 0 - 250
goods/src/main/code/com/enation/javashop/android/component/goods/weiget/GoodsFirstMoreView.kt

@@ -1,250 +0,0 @@
-package com.enation.javashop.android.component.goods.weiget
-
-import android.app.Activity
-import android.databinding.DataBindingUtil
-import android.databinding.ObservableField
-import android.graphics.drawable.BitmapDrawable
-import android.support.constraint.ConstraintLayout
-import android.view.MotionEvent
-import android.view.View
-import android.widget.PopupWindow
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.databinding.GoodsSearchFilterFirstDialogBinding
-import com.enation.javashop.android.component.goods.databinding.GoodsSearchFilterFirstItemBinding
-import com.enation.javashop.android.lib.adapter.ListViewBaseAdapter
-import com.enation.javashop.android.lib.utils.AppTool
-import com.enation.javashop.android.lib.utils.animSequentialStart
-import com.enation.javashop.android.lib.utils.judge
-import com.enation.javashop.android.lib.utils.reLayout
-import com.enation.javashop.android.lib.widget.PopWindowCompatible
-import com.enation.javashop.utils.base.tool.ScreenTool
-
-/**
- * @author LDD
- * @Date   2018/3/15 下午5:26
- * @From   com.enation.javashop.android.component.goods.weiget
- * @Note   综合按钮 更多操作
- */
-class GoodsFirstMoreView :PopWindowCompatible{
-
-    /**
-     * @Name  activity
-     * @Type  Activity
-     * @Note  页面
-     */
-    private var activity :Activity
-
-    /**
-     * @Name  data
-     * @Type  ArrayList<GoodsFirstMoreData>
-     * @Note  数据
-     */
-    private var data :ArrayList<GoodsFirstMoreData>  = ArrayList()
-
-    /**
-     * @author LDD
-     * @From   GoodsFirstMoreView
-     * @Date   2018/4/4 上午10:45
-     * @Note   数据绑定
-     */
-    private lateinit var binding :GoodsSearchFilterFirstDialogBinding
-
-    /**
-     * @Name  adapter
-     * @Type  ListViewBaseAdapter<GoodsFirstMoreData,GoodsSearchFilterFirstItemBinding>
-     * @Note  列表视图适配器
-     */
-    private lateinit var adapter :ListViewBaseAdapter<GoodsFirstMoreData,GoodsSearchFilterFirstItemBinding>
-
-    /**
-     * @Name  confirmObserver
-     * @Type  ((GoodsFilterValue?)->Unit)?
-     * @Note  确定监听
-     */
-    private var confirmObserver :((GoodsFirstMoreData)->Unit)? = null
-
-    /**
-     * @Name  dismissObserver
-     * @Type  (()->(Unit))?
-     * @Note  取消监听
-     */
-    private var dismissObserver : (()->(Unit))? = null
-
-    /**
-     * @Name  animIsEnd
-     * @Type  Boolean
-     * @Note  动画是否结束
-     */
-    private var animIsEnd = true
-
-    /**构造方法*/
-    constructor(activity: Activity,height : Int): super(ScreenTool.getScreenWidth(activity).toInt(), height){
-        this.activity = activity
-        isFocusable = true
-        isOutsideTouchable = true
-        setBackgroundDrawable(BitmapDrawable())
-        createUI()
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsFirstMoreView
-     * @Date   2018/4/4 上午10:46
-     * @Note   创建UI
-     */
-    private fun createUI(){
-        contentView = activity.layoutInflater.inflate(R.layout.goods_search_filter_first_dialog,null)
-        binding = DataBindingUtil.bind(contentView)
-        binding.goodsSearchFilterFirstMask.setOnTouchListener { v, event ->
-            if (event.action == MotionEvent.ACTION_DOWN ){
-                dismiss()
-            }
-            return@setOnTouchListener true
-        }
-        adapter = object : ListViewBaseAdapter<GoodsFirstMoreData, GoodsSearchFilterFirstItemBinding>(activity,R.layout.goods_search_filter_first_item,data) {
-            override fun fillItem(binding: GoodsSearchFilterFirstItemBinding, data: GoodsFirstMoreData, position: Int) {
-                binding.data = data
-            }
-
-            override fun itemClick(data: GoodsFirstMoreData, position: Int) {
-                this@GoodsFirstMoreView.data.forEach {
-                    item ->
-                    (item == data).judge(trueDo = {
-                        item.selected = true
-                        item.selectedObservable.set(true)
-                        confirmObserver?.invoke(item)
-                    },falseDo = {
-                        item.selected = false
-                        item.selectedObservable.set(false)
-                    })
-                    dismiss()
-                }
-            }
-        }
-        binding.goodsSearchFilterFirstLv.adapter = adapter
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsFirstMoreView
-     * @Date   2018/4/4 上午10:47
-     * @Note   设置数据
-     */
-    fun setData(data :ArrayList<GoodsFirstMoreData>):GoodsFirstMoreView{
-        this.data = data
-        adapter.datas = data
-        adapter.notifyDataSetChanged()
-        binding.goodsSearchFilterFirstLv.reLayout<ConstraintLayout.LayoutParams> {
-            params ->
-            params.height = (data.size >= 5).judge((ScreenTool.getScreenWidth(activity)/2).toInt(),((ScreenTool.getScreenWidth(activity)/10)*data.size).toInt())
-        }
-        return this
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsFirstMoreView
-     * @Date   2018/3/15 下午3:28
-     * @Note   设置取消事件
-     * @param  obserable 取消响应事件
-     */
-    fun setOnDismissObserable(obserable:(()->(Unit))) :GoodsFirstMoreView{
-        dismissObserver = obserable
-        return this
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsFirstMoreView
-     * @Date   2018/3/15 下午3:29
-     * @Note   设置确定监听
-     * @param  obserable 监听事件
-     */
-    fun setConfirmObserable(obserable: (GoodsFirstMoreData?) -> Unit) :GoodsFirstMoreView{
-        this.confirmObserver = obserable
-        return this
-    }
-
-    fun show(atView :View){
-        /**当动画未执行完毕 又或者筛选条件数量为0时 不显示*/
-        if (data.size == 0 || !animIsEnd){
-            return
-        }
-
-        /**mask先隐藏掉*/
-        binding.goodsSearchFilterFirstMask.visibility = View.GONE
-
-        /**将该View加载到页面之上*/
-        showAsDropDown(atView)
-
-        /**执行动画 起始y点为 -View.height 减去 Recly.height -button.height  */
-        contentView.animSequentialStart(arrayListOf(AppTool.Anim.createPopInAnimation(activity, -binding.goodsSearchFilterFirstLv.layoutParams.height.toFloat(),300)),interceptor = {
-            index: Int, state: Int ->
-
-            /**动画结束 设置动画标记结束 显示Mask*/
-            if (state == 2){
-                animIsEnd = true
-                binding.goodsSearchFilterFirstMask.visibility = View.VISIBLE
-            }
-
-            /**动画开始 重置动画标记*/
-            if (state == 3){
-                animIsEnd = false
-            }
-
-            /**当返回true时 代表拦截当前动画 不再往下执行*/
-            return@animSequentialStart false
-        })
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsFirstMoreView
-     * @Date   2018/3/15 下午3:36
-     * @Note   重写dismiss事件
-     */
-    override fun dismiss() {
-
-        /**动画未执行完毕 不执行下方代码*/
-        if (!animIsEnd){
-            return
-        }
-
-        /**延迟执行 优化操作体验*/
-        AppTool.Time.delay(250,{
-            dismissObserver?.invoke()
-        })
-
-        /**隐藏Mask*/
-        binding.goodsSearchFilterFirstMask.visibility = View.GONE
-
-        /**执行动画 终点y轴为 -View.height*/
-        contentView.animSequentialStart(arrayListOf(AppTool.Anim.createPopOutAnimation(activity,-binding.goodsSearchFilterFirstLv.layoutParams.height.toFloat(),300)),interceptor = {
-            index: Int, state: Int ->
-
-            /**动画执行完毕 设置标记 隐藏View*/
-            if (state == 2){
-                animIsEnd = true
-                super.dismiss()
-            }
-
-            /**动画开始执行 还原标记*/
-            if (state == 3){
-                animIsEnd = false
-            }
-
-            /**当返回true时 代表拦截当前动画 不再往下执行*/
-            return@animSequentialStart false
-        })
-    }
-
-    /**
-     * @author LDD
-     * @Date   2018/4/4 上午10:37
-     * @From   GoodsFirstMoreData
-     * @Note   商品数据监听
-     */
-    data class  GoodsFirstMoreData(val name:String,val value:Int ,var selected :Boolean){
-        var selectedObservable = ObservableField(selected)
-    }
-}

+ 0 - 283
goods/src/main/code/com/enation/javashop/android/component/goods/weiget/GoodsSearchMoreView.kt

@@ -1,283 +0,0 @@
-package com.enation.javashop.android.component.goods.weiget
-
-import android.app.Activity
-import android.databinding.DataBindingUtil
-import android.graphics.drawable.BitmapDrawable
-import android.support.constraint.ConstraintLayout
-import android.view.MotionEvent
-import android.view.View
-import android.widget.PopupWindow
-import com.alibaba.android.vlayout.DelegateAdapter
-import com.alibaba.android.vlayout.VirtualLayoutManager
-import com.enation.javashop.android.component.goods.adapter.GoodsMoreActionAdapter
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.databinding.GoodsSearchMoreActionDialogBinding
-import com.enation.javashop.android.lib.utils.*
-import com.enation.javashop.android.lib.widget.PopWindowCompatible
-import com.enation.javashop.android.middleware.model.GoodsFilterValue
-import com.enation.javashop.android.middleware.model.GoodsFilterViewModel
-import com.enation.javashop.utils.base.tool.ScreenTool
-
-/**
- * @author LDD
- * @Date   2018/3/15 下午3:15
- * @From   com.enation.javashop.android.component.goods.weiget
- * @Note   更多筛选弹出框
- */
-class GoodsSearchMoreView : PopWindowCompatible {
-
-    /**
-     * @Name  activity
-     * @Type  Activity
-     * @Note  调用页面上下文
-     */
-    private var activity: Activity
-
-    /**
-     * @Name  virtualLayoutManager
-     * @Type  VirtualLayoutManager
-     * @Note  VLayoutManager
-     */
-    private var virtualLayoutManager: VirtualLayoutManager
-
-    /**
-     * @Name  delegateAdapter
-     * @Type  DelegateAdapter
-     * @Note  七巧板适配器
-     */
-    private var delegateAdapter: DelegateAdapter
-
-    /**
-     * @Name  adapter
-     * @Type  GoodsMoreActionAdapter
-     * @Note  筛选列表适配器
-     */
-    private var adapter = GoodsMoreActionAdapter(GoodsFilterViewModel("",null,"", arrayListOf()))
-
-    /**
-     * @Name  binding
-     * @Type  GoodsSearchMoreActionDialogBinding
-     * @Note  视图对应Databinding
-     */
-    private var binding : GoodsSearchMoreActionDialogBinding
-
-    /**
-     * @Name  data
-     * @Type  GoodsFilterViewModel
-     * @Note  数据
-     */
-    private lateinit var data :GoodsFilterViewModel
-
-    /**
-     * @Name  confirmObserver
-     * @Type  ((GoodsFilterValue?)->Unit)?
-     * @Note  确定监听
-     */
-    private var confirmObserver :((GoodsFilterValue?)->Unit)? = null
-
-    /**
-     * @Name  dismissObserver
-     * @Type  (()->(Unit))?
-     * @Note  取消监听
-     */
-    private var dismissObserver : (()->(Unit))? = null
-
-    /**
-     * @Name  animIsEnd
-     * @Type  Boolean
-     * @Note  动画是否结束
-     */
-    private var animIsEnd = true
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchMoreView
-     * @Date   2018/3/15 下午3:18
-     * @Note   构造方法
-     * @param  activity 调用页面
-     * @param  height view高度
-     */
-    constructor(activity: Activity, height: Int): super(ScreenTool.getScreenWidth(activity).toInt(), height) {
-
-        /**Pop初始化*/
-        this.activity = activity
-        isFocusable = true
-        isOutsideTouchable = true
-        setBackgroundDrawable(BitmapDrawable())
-
-        /**初始化适配器以及View*/
-        virtualLayoutManager = VirtualLayoutManager(this.activity)
-        delegateAdapter = DelegateAdapter(virtualLayoutManager)
-        contentView = activity.layoutInflater.inflate(R.layout.goods_search_more_action_dialog,null)
-        binding = DataBindingUtil.bind(contentView)
-        binding.goodsSearchMoreActionDialogRv.adapter = delegateAdapter
-        binding.goodsSearchMoreActionDialogRv.layoutManager = virtualLayoutManager
-        delegateAdapter.addAdapter(adapter)
-        /**绑定事件*/
-        bindEvnet()
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchMoreView
-     * @Date   2018/3/15 下午3:27
-     * @Note   绑定事件
-     */
-    fun bindEvnet(){
-
-        /**设置点击Mask退出*/
-        binding.root.setOnTouchListener { v, event ->
-            if (event.action == MotionEvent.ACTION_DOWN){
-                adapter.resetData()
-                confirmObserver?.invoke(data.selectedFilterValue)
-                dismiss()
-            }
-            return@setOnTouchListener true
-        }
-
-        /**绑定重置事件*/
-        binding.goodsSearchMoreActionDialogReset.setOnClickListener {
-            data.selectedFilterValue = null
-            data.selectedValueObser.set(null)
-            data.valueList.forEach {
-                item ->
-                item.selectedObservable.set(false)
-            }
-        }
-
-        /**绑定确定事件*/
-        binding.goodsSearchMoreActionDialogConfirm.setOnClickListener {
-            adapter.injectData()
-            confirmObserver?.invoke(data.selectedFilterValue)
-            dismiss()
-        }
-
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchMoreView
-     * @Date   2018/3/15 下午3:28
-     * @Note   设置取消事件
-     * @param  obserable 取消响应事件
-     */
-    fun setOnDismissObserable(obserable:(()->(Unit))) :GoodsSearchMoreView{
-        dismissObserver = obserable
-        return this
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchMoreView
-     * @Date   2018/3/15 下午3:29
-     * @Note   设置数据源
-     * @param  data 数据源
-     */
-    fun setData(data :GoodsFilterViewModel):GoodsSearchMoreView{
-        this.data = data
-
-        /**重新设置列表视图高度*/
-        binding.goodsSearchMoreActionDialogRv.reLayout<ConstraintLayout.LayoutParams> {
-            params ->
-            params.height = (ScreenTool.getScreenWidth(activity)/8*((data.valueList.size >10).judge(5,(data.valueList.size+1)/2))).toInt()
-        }
-        adapter.data = data
-
-        /**刷新列表视图*/
-        adapter.notifyDataSetChanged()
-        return this
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchMoreView
-     * @Date   2018/3/15 下午3:29
-     * @Note   设置确定监听
-     * @param  obserable 监听事件
-     */
-    fun setConfirmObserable(obserable: (GoodsFilterValue?) -> Unit) :GoodsSearchMoreView{
-        this.confirmObserver = obserable
-        return this
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchMoreView
-     * @Date   2018/3/15 下午3:29
-     * @Note   显示
-     * @param  atView 显示在那个view下方
-     */
-    fun show(atView:View){
-
-        /**当动画未执行完毕 又或者筛选条件数量为0时 不显示*/
-        if (data.valueList.size == 0 || !animIsEnd){
-           return
-        }
-
-        /**mask先隐藏掉*/
-        binding.goodsSearchMoreActionDialogMask.visibility = View.GONE
-
-        /**将该View加载到页面之上*/
-        showAsDropDown(atView)
-
-        /**执行动画 起始y点为 -View.height 减去 Recly.height -button.height  */
-        contentView.animSequentialStart(arrayListOf(AppTool.Anim.createPopInAnimation(activity,-(height - binding.goodsSearchMoreActionDialogRv.height - ScreenTool.getScreenWidth(activity)/7),350)),interceptor = {
-            index: Int, state: Int ->
-
-            /**动画结束 设置动画标记结束 显示Mask*/
-            if (state == 2){
-                animIsEnd = true
-                binding.goodsSearchMoreActionDialogMask.visibility = View.VISIBLE
-            }
-
-            /**动画开始 重置动画标记*/
-            if (state == 3){
-                animIsEnd = false
-            }
-
-            /**当返回true时 代表拦截当前动画 不再往下执行*/
-            return@animSequentialStart false
-        })
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSearchMoreView
-     * @Date   2018/3/15 下午3:36
-     * @Note   重写dismiss事件
-     */
-    override fun dismiss() {
-
-        /**动画未执行完毕 不执行下方代码*/
-        if (!animIsEnd){
-            return
-        }
-
-        /**延迟执行 优化操作体验*/
-        AppTool.Time.delay(250,{
-            dismissObserver?.invoke()
-        })
-
-        /**隐藏Mask*/
-        binding.goodsSearchMoreActionDialogMask.visibility = View.GONE
-
-        /**执行动画 终点y轴为 -View.height*/
-        contentView.animSequentialStart(arrayListOf(AppTool.Anim.createPopOutAnimation(activity,-height.toFloat(),500)),interceptor = {
-            index: Int, state: Int ->
-
-            /**动画执行完毕 设置标记 隐藏View*/
-            if (state == 2){
-                animIsEnd = true
-                super.dismiss()
-            }
-
-            /**动画开始执行 还原标记*/
-            if (state == 3){
-                animIsEnd = false
-            }
-
-            /**当返回true时 代表拦截当前动画 不再往下执行*/
-            return@animSequentialStart false
-        })
-    }
-}

+ 0 - 420
goods/src/main/code/com/enation/javashop/android/component/goods/weiget/GoodsSpecView.kt

@@ -1,420 +0,0 @@
-package com.enation.javashop.android.component.goods.weiget
-
-import android.app.Activity
-import android.content.Context
-import android.databinding.DataBindingUtil
-import android.graphics.Color
-import android.graphics.drawable.BitmapDrawable
-import android.graphics.drawable.GradientDrawable
-import android.support.v7.app.AppCompatActivity
-import android.support.v7.widget.RecyclerView
-import android.util.DisplayMetrics
-import android.view.MotionEvent
-import android.view.View
-import android.view.ViewGroup
-import android.widget.TextView
-import com.bumptech.glide.Glide
-import com.enation.javashop.android.component.goods.R
-import com.enation.javashop.android.component.goods.databinding.GoodsInfoSpecPopBinding
-import com.enation.javashop.android.lib.core.runtime.JavaShopActivityTask
-import com.enation.javashop.android.lib.utils.*
-import com.enation.javashop.android.lib.widget.PopWindowCompatible
-import com.enation.javashop.android.middleware.model.SkuGoods
-import com.enation.javashop.android.middleware.model.Spec
-import com.enation.javashop.utils.base.tool.ScreenTool
-import com.library.flowlayout.FlowLayoutManager
-import com.library.flowlayout.SpaceItemDecoration
-import jp.wasabeef.glide.transformations.CropSquareTransformation
-import jp.wasabeef.glide.transformations.RoundedCornersTransformation
-
-
-/**
- * @author LDD
- * @Date   2018/5/31 下午6:48
- * @From   com.enation.javashop.android.component.goods.weiget
- * @Note   规格视图
- */
-class GoodsSpecView : PopWindowCompatible {
-
-    /**
-     * @Name  activity
-     * @Type  Activity
-     * @Note  页面
-     */
-    private var activity : Activity
-
-    /**
-     * @author LDD
-     * @From   GoodsFirstMoreView
-     * @Date   2018/4/4 上午10:45
-     * @Note   数据绑定
-     */
-    lateinit var binding : GoodsInfoSpecPopBinding
-
-
-    var skuList = ArrayList<SkuGoods>()
-
-    var num = 1
-
-    var specList = ArrayList<Any>()
-
-    lateinit var adapter : FlowAdapter
-
-    /**
-     * @Name  confirmObserver
-     * @Type  ((GoodsFilterValue?)->Unit)?
-     * @Note  确定监听
-     */
-    var skuSelectObserver :((SkuGoods?,Int)->Unit)? = null
-
-    /**
-     * @Name  confirmObserver
-     * @Type  ((GoodsFilterValue?)->Unit)?
-     * @Note  确定监听
-     */
-    var addCartObserver :((SkuGoods,Int)->Unit)? = null
-
-
-
-    /**
-     * @Name  animIsEnd
-     * @Type  Boolean
-     * @Note  动画是否结束
-     */
-    private var animIsEnd = true
-
-    /**
-     * @author LDD
-     * @Date   2018/4/19 下午3:20
-     * @From   GoodsSpecView
-     * @Note   伴生对象
-     */
-    companion object {
-
-        fun getHeight() :Int{
-            var dis  = DisplayMetrics()
-            JavaShopActivityTask.instance.peekTopActivity()!!.windowManager.defaultDisplay.getRealMetrics(dis)
-            return dis.heightPixels - ScreenTool.getVirtualBarHeigh(JavaShopActivityTask.instance.peekTopActivity() as AppCompatActivity?)
-        }
-        /**
-         * @author LDD
-         * @From   GoodsSpecView
-         * @Date   2018/4/19 下午3:21
-         * @Note   静态构建
-         * @param  activity 页面
-         */
-        fun build(activity: Activity,skus :ArrayList<SkuGoods>,specs :ArrayList<Any>) : GoodsSpecView {
-            return GoodsSpecView(activity,skus,specs)
-        }
-    }
-
-    /**构造方法*/
-    private constructor(activity: Activity,skus :ArrayList<SkuGoods>,specs :ArrayList<Any>): super(ScreenTool.getScreenWidth(activity).toInt(), (GoodsSpecView.getHeight() - AppTool.SystemUI.getStatusBarHeight())){
-        this.activity = activity
-        this.skuList = skus
-        this.specList = specs
-        isFocusable = true
-        isOutsideTouchable = true
-        setBackgroundDrawable(BitmapDrawable())
-        createUI()
-
-
-    }
-
-    private fun getSelectedSpecs() : String{
-        var spec = ArrayList<Spec>()
-        specList.forEach { item ->
-                if (item is Spec){
-                    if ((item as Spec).select){
-                        spec.add(item as Spec)
-                    }
-                }
-        }
-        return SkuGoods.identifier(spec)
-    }
-
-    fun getSelectSku() : SkuGoods{
-        if (skuList.count() == 1){
-            return skuList[0]
-        }else{
-            for (i in 0..(skuList.count() - 1)){
-                if (skuList[i].identifier == getSelectedSpecs()) {
-                    return skuList[i]
-                }
-            }
-        }
-        return skuList[0]
-    }
-
-    fun initInfo(){
-        skuList.forEach { item ->
-                if (item.identifier == getSelectedSpecs()) {
-                    binding.goodsInfoSpecPopPriceTv.text = String.format("¥%.2f", item.price)
-                    binding.goodsInfoSpecPopNumTv.text = "商品编号:${item.sn}"
-                    var imageUrl = item.image
-                    for (spec in item.specList) {
-                        if (spec.specImage.isNotEmpty()){
-                            imageUrl = spec.specImage
-                        }
-                    }
-                    Glide.with(activity).load(imageUrl).centerCrop().bitmapTransform(RoundedCornersTransformation(activity,5.dpToPx(),2.dpToPx())).into(binding.goodsInfoSpecPopIv)
-                    skuSelectObserver?.invoke(item, num)
-                }
-        }
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSpecView
-     * @Date   2018/4/19 下午3:21
-     * @Note   构建UI
-     */
-    private fun createUI(){
-        contentView = activity.layoutInflater.inflate(R.layout.goods_info_spec_pop,null)
-        binding = DataBindingUtil.bind(contentView)
-        val bg = GradientDrawable().then {
-            self ->
-            self.cornerRadius = 5.dpToPx().toFloat()
-            self.setColor(Color.WHITE)
-            self.setStroke(1, Color.parseColor("#d8d7dc"))
-        }
-        binding.goodsInfoSpecPopIv.background = bg
-        binding.goodsInfoSpecPopBg.setOnTouchListener{ _ , _ -> true }
-        Glide.with(activity).load(skuList[0].image).bitmapTransform(CropSquareTransformation(activity), RoundedCornersTransformation(activity,5.dpToPx(),1.dpToPx())).into(binding.goodsInfoSpecPopIv)
-        binding.goodsInfoSpecPopPriceTv.text = String.format("¥%.2f",skuList[0].price)
-        binding.goodsInfoSpecPopNumTv.text = "商品编号:${skuList[0].sn}"
-        binding.goodsInfoSpecPopMask.setOnTouchListener { v, event ->
-            if (event.action == MotionEvent.ACTION_DOWN ){
-                dismiss()
-            }
-            return@setOnTouchListener true
-        }
-
-        binding.goodsInfoSpecPopClose.setOnClickListener(OnClickListenerAntiViolence({
-            dismiss()
-        }))
-        binding.goodsInfoSpecPopAddCart.setOnClickListener {
-            addCartObserver?.invoke(getSelectSku(),num)
-        }
-        val flowLayoutManager = FlowLayoutManager()
-        adapter = FlowAdapter(this,activity,specList)
-        binding.goodsInfoSpecPopRv.addItemDecoration(SpaceItemDecoration(5.dpToPx()))
-        binding.goodsInfoSpecPopRv.layoutManager = flowLayoutManager
-        binding.goodsInfoSpecPopRv.adapter = adapter
-    }
-
-   fun setSkuSelectObserver(obser :(SkuGoods?,Int) ->(Unit)) :GoodsSpecView{
-       skuSelectObserver = obser
-       return this
-   }
-
-    fun setAddCart(obser :(SkuGoods,Int) ->(Unit)) :GoodsSpecView{
-        addCartObserver = obser
-        return this
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSpecView
-     * @Date   2018/4/19 下午3:25
-     * @Note   显示与该View之下
-     * @param  atView view
-     */
-    fun show(atView : View){
-        /**当动画未执行完毕 又或者筛选条件数量为0时 不显示*/
-        if (!animIsEnd){
-            return
-        }
-
-        /**mask先隐藏掉*/
-        binding.goodsInfoSpecPopMask.visibility = View.GONE
-
-        /**将该View加载到页面之上*/
-        showAsDropDown(atView)
-
-        /**执行动画 起始y点为 -View.height 减去 Recly.height -button.height  */
-        contentView.animSequentialStart(arrayListOf(AppTool.Anim.createPopInAnimation(activity, height.toFloat(),300)),interceptor = {
-            index: Int, state: Int ->
-
-            /**动画结束 设置动画标记结束 显示Mask*/
-            if (state == 2){
-                animIsEnd = true
-                binding.goodsInfoSpecPopMask.visibility = View.VISIBLE
-            }
-
-            /**动画开始 重置动画标记*/
-            if (state == 3){
-                animIsEnd = false
-            }
-
-            /**当返回true时 代表拦截当前动画 不再往下执行*/
-            return@animSequentialStart false
-        })
-    }
-
-    /**
-     * @author LDD
-     * @From   GoodsSpecView
-     * @Date   2018/4/19 下午3:26
-     * @Note   销毁退出
-     */
-    override fun dismiss() {
-
-        /**动画未执行完毕 不执行下方代码*/
-        if (!animIsEnd){
-            return
-        }
-
-        /**隐藏Mask*/
-        binding.goodsInfoSpecPopMask.visibility = View.GONE
-
-        /**执行动画 终点y轴为 -View.height*/
-        contentView.animSequentialStart(arrayListOf(AppTool.Anim.createPopOutAnimation(activity, height.toFloat(),300)),interceptor = {
-            index: Int, state: Int ->
-
-            /**动画执行完毕 设置标记 隐藏View*/
-            if (state == 2){
-                animIsEnd = true
-                super.dismiss()
-            }
-
-            /**动画开始执行 还原标记*/
-            if (state == 3){
-                animIsEnd = false
-            }
-
-            /**当返回true时 代表拦截当前动画 不再往下执行*/
-            return@animSequentialStart false
-        })
-    }
-
-}
-
-
-class FlowAdapter(val view :GoodsSpecView,val context :Context,private val list: ArrayList<Any>) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
-
-    private val SPEC = 1
-
-    private val TITLE = 2
-
-    private val NUM = 3
-
-    override fun getItemViewType(position: Int): Int {
-
-        val item = list[position]
-
-        if (item is Spec){
-            return SPEC
-        }else if (item is String) {
-            return TITLE
-        }else {
-            return NUM
-        }
-
-    }
-
-    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
-        return if (viewType == SPEC){
-            SpecHolder(View.inflate(context, R.layout.goods_spec_item_lay, null))
-        }else if (viewType == TITLE){
-            TitleHolder(View.inflate(context, R.layout.goods_spec_item_title_lay, null))
-        }else{
-            NumHolder(View.inflate(context, R.layout.goods_spec_num_item_lay, null))
-        }
-    }
-
-    override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
-        if (holder is SpecHolder){
-            if ((list[position] as Spec).select){
-                holder.text.setTextColor(Color.parseColor("#ED2219"))
-                holder.text.setBackgroundResource(R.drawable.javashop_goods_spec_select)
-            }else{
-                holder.text.setTextColor(Color.parseColor("#2b2b2b"))
-                holder.text.setBackgroundResource(R.drawable.javashop_goods_spec_nomal)
-            }
-            holder.text.text = (list[position] as Spec).specValue
-            holder.text.setOnClickListener {
-                if (list[position] is Spec && !(list[position] as Spec).select) {
-                    val selectSpec = list[position] as Spec
-                            val selectParentId = selectSpec.specId
-                            val selectValueId = selectSpec.specValueId
-                            for (index in 0..(list.count() - 1)){
-                    if (list[index] is Spec){
-                        var item = list[index] as Spec
-                                if (item.specId == selectParentId){
-                                    item.select = (item.specValueId == selectValueId)
-                                    list[index] = item
-                                }
-                    }
-                }
-                    view.initInfo()
-                    view.adapter.notifyDataSetChanged()
-                }
-            }
-        }else if(holder is NumHolder){
-            holder.num.text = "${list[position] as Int}"
-            holder.add.setOnClickListener {
-                list[position] = list[position] as Int + 1
-                holder.num.text = "${list[position] as Int}"
-                view.num = list[position] as Int
-                view.initInfo()
-            }
-            holder.reduce.setOnClickListener {
-                if((list[position] as Int - 1) >= 1){
-                    list[position] = list[position] as Int - 1
-                }else{
-                    return@setOnClickListener
-                }
-                holder.num.text = "${list[position] as Int}"
-                view.num = list[position] as Int
-                view.initInfo()
-            }
-
-        }else if(holder is TitleHolder) {
-            holder.text.text = list[position] as String
-        }
-    }
-
-    override fun getItemCount(): Int {
-        return list.size
-    }
-
-    internal inner class SpecHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
-
-        val text: TextView
-
-        init {
-            text = itemView.findViewById(R.id.text) as TextView
-        }
-    }
-
-    internal inner class TitleHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
-
-        val text: TextView
-
-        init {
-            text = itemView.findViewById(R.id.text) as TextView
-            val layoutParams = RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT,30.dpToPx())
-            itemView.layoutParams = layoutParams
-        }
-    }
-
-    internal inner class NumHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
-
-        val reduce: TextView
-
-        val add: TextView
-
-        val num: TextView
-
-
-        init {
-            reduce = itemView.findViewById(R.id.reduce) as TextView
-            add = itemView.findViewById(R.id.add) as TextView
-            num = itemView.findViewById(R.id.num) as TextView
-            val layoutParams = RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT,30.dpToPx())
-            itemView.layoutParams = layoutParams
-        }
-    }
-
-}

+ 0 - 280
goods/src/main/res/layout/goods_act_lay.xml

@@ -1,280 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:tools="http://schemas.android.com/tools">
-    <data>
-        <import type="com.enation.javashop.android.middleware.bind.DataBindingAction"/>
-    </data>
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        xmlns:app="http://schemas.android.com/apk/res-auto"
-        xmlns:bind="http://schemas.android.com/apk/res-auto">
-        <android.support.constraint.ConstraintLayout
-            android:id="@+id/goods_act_topbar"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            bind:auto_topbar_height="@{true}"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintDimensionRatio="h,5:1"
-            app:layout_constraintTop_toTopOf="parent"
-            >
-            <View
-                android:id="@+id/goods_act_topbar_holder"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                bind:status_bar="@{1}"
-                app:layout_constraintTop_toTopOf="parent"
-                android:background="@color/javashop_color_holder_color"
-                />
-            <android.support.constraint.ConstraintLayout
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                app:layout_constraintTop_toBottomOf="@id/goods_act_topbar_holder"
-                app:layout_constraintBottom_toBottomOf="parent"
-                bind:backgroundColor="@{ @color/javashop_color_white }"
-                >
-                <net.lucode.hackware.magicindicator.MagicIndicator
-                    android:id="@+id/goods_act_indicator"
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintWidth_percent="0.5"
-                    />
-                <ImageView
-                    android:id="@+id/goods_act_back"
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    app:layout_constraintHeight_percent="0.5"
-                    app:layout_constraintDimensionRatio="w,1:1"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintHorizontal_bias="0.03"
-                    android:background="@drawable/javashop_back_black"
-                    bind:action="@{DataBindingAction.BACK}"
-                    />
-                <ImageView
-                    android:id="@+id/goods_act_more"
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    app:layout_constraintHeight_percent="0.45"
-                    app:layout_constraintDimensionRatio="w,1:1"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintHorizontal_bias="0.97"
-                    android:background="@drawable/javashop_icon_more_black"
-                    />
-                <ImageView
-                    android:id="@+id/goods_act_share"
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    app:layout_constraintHeight_percent="0.45"
-                    app:layout_constraintDimensionRatio="w,1:1"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintRight_toLeftOf="@id/goods_act_more"
-                    android:background="@drawable/javashop_icon_share_black"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintHorizontal_bias="0.95"
-                    />
-                <View
-                    android:layout_width="match_parent"
-                    android:layout_height="0.5dp"
-                    android:background="@color/javashop_color_line_gray"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    />
-            </android.support.constraint.ConstraintLayout>
-        </android.support.constraint.ConstraintLayout>
-        
-        <android.support.constraint.ConstraintLayout
-            android:id="@+id/goods_act_bottombar"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintDimensionRatio="h,7:1"
-            android:background="@color/javashop_color_white"
-            bind:backgroundColor="@{@color/javashop_color_white}"
-            >
-            <android.support.constraint.ConstraintLayout
-                android:id="@+id/act_parent"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintWidth_percent="0.4"
-                >
-                <android.support.constraint.ConstraintLayout
-                    android:id="@+id/goods_act_to_shop"
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintRight_toLeftOf="@+id/goods_act_collect_goods"
-                    >
-                    <ImageView
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        app:layout_constraintHeight_percent="0.4"
-                        app:layout_constraintDimensionRatio="w,1:1"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintLeft_toLeftOf="parent"
-                        app:layout_constraintRight_toRightOf="parent"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintVertical_bias="0.25"
-                        android:src="@drawable/javashop_cart_shop_icon"
-                        />
-                    <TextView
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        app:layout_constraintHeight_percent="0.25"
-                        app:layout_constraintDimensionRatio="w,2:1"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintLeft_toLeftOf="parent"
-                        app:layout_constraintRight_toRightOf="parent"
-                        app:layout_constraintVertical_bias="0.8"
-                        style="@style/auto_text_size"
-                        android:gravity="center"
-                        android:text="@string/javashop_shop"
-                        app:autoSizeMaxTextSize="30sp"
-                        app:autoSizeMinTextSize="1sp"
-                        app:autoSizeStepGranularity="2sp"
-                        app:autoSizeTextType="uniform"
-                        tools:ignore="MissingPrefix"
-                        />
-                </android.support.constraint.ConstraintLayout>
-                <android.support.constraint.ConstraintLayout
-                    android:id="@+id/goods_act_collect_goods"
-                    android:layout_width="0dp"
-                    app:layout_constraintLeft_toRightOf="@id/goods_act_to_shop"
-                    app:layout_constraintRight_toLeftOf="@+id/goods_act_to_cart"
-                    android:layout_height="match_parent">
-                    <ImageView
-                        android:id="@+id/goods_act_collect_goods_iv"
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        app:layout_constraintHeight_percent="0.4"
-                        app:layout_constraintDimensionRatio="w,1:1"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintLeft_toLeftOf="parent"
-                        app:layout_constraintRight_toRightOf="parent"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintVertical_bias="0.25"
-                        android:src="@drawable/javashop_icon_heart_nomal"
-                        />
-                    <TextView
-                        android:id="@+id/goods_act_collect_goods_tv"
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        app:layout_constraintHeight_percent="0.25"
-                        app:layout_constraintDimensionRatio="w,2:1"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintLeft_toLeftOf="parent"
-                        app:layout_constraintRight_toRightOf="parent"
-                        app:layout_constraintVertical_bias="0.8"
-                        style="@style/auto_text_size"
-                        android:gravity="center"
-                        android:text="@string/javashop_collect"
-                        app:autoSizeMaxTextSize="30sp"
-                        app:autoSizeMinTextSize="1sp"
-                        app:autoSizeStepGranularity="2sp"
-                        app:autoSizeTextType="uniform"
-                        tools:ignore="MissingPrefix"
-                        />
-                </android.support.constraint.ConstraintLayout>
-                <android.support.constraint.ConstraintLayout
-                    android:id="@+id/goods_act_to_cart"
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    app:layout_constraintLeft_toRightOf="@id/goods_act_collect_goods"
-                    app:layout_constraintRight_toRightOf="parent"
-                    >
-                    <ImageView
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        app:layout_constraintHeight_percent="0.4"
-                        app:layout_constraintDimensionRatio="w,1:1"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintLeft_toLeftOf="parent"
-                        app:layout_constraintRight_toRightOf="parent"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintVertical_bias="0.25"
-                        android:src="@drawable/javashop_navigation_cart_nomal"
-                        />
-                    <TextView
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        app:layout_constraintHeight_percent="0.25"
-                        app:layout_constraintDimensionRatio="w,3:1"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintLeft_toLeftOf="parent"
-                        app:layout_constraintRight_toRightOf="parent"
-                        app:layout_constraintVertical_bias="0.8"
-                        style="@style/auto_text_size"
-                        android:gravity="center"
-                        android:lines="1"
-                        android:text="@string/javashop_cart"
-                        app:autoSizeMaxTextSize="30sp"
-                        app:autoSizeMinTextSize="1sp"
-                        app:autoSizeStepGranularity="2sp"
-                        app:autoSizeTextType="uniform"
-                        tools:ignore="MissingPrefix"
-                        />
-                </android.support.constraint.ConstraintLayout>
-            </android.support.constraint.ConstraintLayout>
-            <TextView
-                android:id="@+id/goods_act_add_cart"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                app:layout_constraintLeft_toRightOf="@id/act_parent"
-                app:layout_constraintWidth_percent="0.3"
-                android:background="@drawable/javashop_bg_red_shadow"
-                android:textColor="@color/javashop_color_white"
-                android:lines="1"
-                android:gravity="center"
-                android:text="@string/javashop_add_cart"
-                android:textSize="15sp"
-                />
-            <TextView
-                android:id="@+id/goods_act_buy_now"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                app:layout_constraintLeft_toRightOf="@id/goods_act_add_cart"
-                app:layout_constraintWidth_percent="0.3"
-                android:textColor="@color/javashop_color_white"
-                android:lines="1"
-                android:background="#ffb134"
-                android:gravity="center"
-                android:text="立即购买"
-                android:textSize="15sp"
-                />
-            <View
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toLeftOf="@id/goods_act_add_cart"
-                android:layout_width="0dp"
-                android:layout_height="0.5dp"
-                bind:backgroundColor="@{@color/javashop_color_line_gray}"
-                />
-        </android.support.constraint.ConstraintLayout>
-        <com.enation.javashop.android.widget.navigationview.FragmentPagerView
-            android:id="@+id/goods_act_fragment_pager"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintTop_toBottomOf="@id/goods_act_topbar"
-            app:layout_constraintBottom_toTopOf="@id/goods_act_bottombar"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            >
-        </com.enation.javashop.android.widget.navigationview.FragmentPagerView>
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 150
goods/src/main/res/layout/goods_comment_item_lay.xml

@@ -1,150 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout>
-    <data>
-        <variable
-            name="data"
-            type="com.enation.javashop.android.middleware.model.GoodsCommentViewModel"/>
-        <import type="android.view.View"/>
-    </data>
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:paddingLeft="10dp"
-        android:paddingBottom="5dp"
-        xmlns:bind="http://schemas.android.com/apk/res-auto"
-        xmlns:app="http://schemas.android.com/apk/res-auto">
-        <de.hdodenhof.circleimageview.CircleImageView
-            android:id="@+id/goods_comment_item_face"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            android:layout_marginTop="10dp"
-            app:layout_constraintWidth_percent="0.1"
-            app:layout_constraintDimensionRatio="h,1:1"
-            android:src="@mipmap/member_nologin_userface"
-            bind:url="@{data.userFace}"
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintHorizontal_bias="0"
-            app:civ_border_color="@color/javashop_color_black"
-            app:civ_border_width="1px"
-            />
-        <com.enation.javashop.android.lib.widget.AutoSizeTextView
-            android:id="@+id/goods_comment_item_username"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintWidth_percent="0.5"
-            app:layout_constraintLeft_toRightOf="@id/goods_comment_item_face"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintTop_toTopOf="@id/goods_comment_item_face"
-            android:text="@{data.userName}"
-            app:layout_constraintDimensionRatio="h,10:1"
-            app:layout_constraintHorizontal_bias="0"
-            android:lines="1"
-            android:layout_marginLeft="10dp"
-            />
-        <com.enation.javashop.android.lib.widget.StarView
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintLeft_toLeftOf="@id/goods_comment_item_username"
-            app:layout_constraintBottom_toBottomOf="@id/goods_comment_item_face"
-            app:layout_constraintDimensionRatio="w,6:1"
-            app:layout_constraintTop_toBottomOf="@id/goods_comment_item_username"
-            android:visibility="invisible"
-            app:star="@{data.grade}"
-            android:id="@+id/goods_comment_item_star"
-            />
-        <TextView
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            android:textSize="13sp"
-            android:gravity="center_vertical"
-            android:textColor="@color/javashop_color_navy"
-            app:layout_constraintLeft_toLeftOf="@id/goods_comment_item_username"
-            app:layout_constraintBottom_toBottomOf="@id/goods_comment_item_face"
-            app:layout_constraintDimensionRatio="w,6:1"
-            app:layout_constraintTop_toBottomOf="@id/goods_comment_item_username"
-            android:id="@+id/goods_comment_item_grade"
-            />
-        <com.enation.javashop.android.lib.widget.AutoSizeTextView
-            android:id="@+id/goods_comment_item_date"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintWidth_percent="0.3"
-            app:layout_constraintDimensionRatio="h,6:1"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintLeft_toRightOf="@id/goods_comment_item_username"
-            app:layout_constraintBottom_toBottomOf="@id/goods_comment_item_face"
-            app:layout_constraintHorizontal_bias="1"
-            android:text="@{data.commentTime}"
-            android:lines="1"
-            android:paddingRight="10dp"
-            android:gravity="right"
-            />
-        <TextView
-            android:id="@+id/goods_comment_item_content"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            app:layout_constraintLeft_toLeftOf="@id/goods_comment_item_username"
-            app:layout_constraintTop_toBottomOf="@id/goods_comment_item_star"
-            app:layout_constraintRight_toRightOf="@id/goods_comment_item_date"
-            android:textSize="14sp"
-            android:text="@{data.content}"
-            android:layout_marginTop="10dp"
-            android:layout_marginRight="10dp"
-            android:textColor="@color/javashop_color_black"
-            />
-        <LinearLayout
-            android:layout_marginTop="5dp"
-            android:id="@+id/goods_comment_item_image_lay"
-            android:layout_width="0dp"
-            android:orientation="vertical"
-            android:layout_height="wrap_content"
-            android:layout_marginRight="10dp"
-            app:layout_constraintLeft_toLeftOf="@id/goods_comment_item_username"
-            app:layout_constraintTop_toBottomOf="@id/goods_comment_item_content"
-            app:layout_constraintRight_toRightOf="@id/goods_comment_item_date"
-            android:visibility="@{ data.images.size() == 0 ? View.GONE : View.VISIBLE }"
-            >
-        </LinearLayout>
-        <TextView
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:id="@+id/goods_comment_item_reply"
-            android:textSize="14sp"
-            android:layout_marginTop="10dp"
-            android:layout_marginRight="10dp"
-            bind:comment_reply="@{data.reply}"
-            android:visibility="@{ data.reply == null ? View.GONE :View.VISIBLE}"
-            android:textColor="@color/javashop_color_black"
-            app:layout_constraintLeft_toLeftOf="@id/goods_comment_item_username"
-            app:layout_constraintTop_toBottomOf="@id/goods_comment_item_image_lay"
-            app:layout_constraintRight_toRightOf="@id/goods_comment_item_date"
-            />
-        <com.enation.javashop.android.lib.widget.AutoSizeTextView
-            android:id="@+id/goods_comment_item_buy_date"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintWidth_percent="0.5"
-            app:layout_constraintDimensionRatio="h,10:1"
-            app:layout_constraintHorizontal_bias="0"
-            app:layout_constraintRight_toRightOf="@id/goods_comment_item_content"
-            app:layout_constraintLeft_toLeftOf="@id/goods_comment_item_content"
-            app:layout_constraintTop_toBottomOf="@id/goods_comment_item_reply"
-            android:layout_marginTop="5dp"
-            android:textColor="#ccc"
-            android:lines="1"
-            android:text="@{data.buyTime}"
-            />
-        <View
-            android:layout_width="0dp"
-            android:layout_height="1dp"
-            android:background="@color/javashop_color_line_gray"
-            app:layout_constraintTop_toBottomOf="@id/goods_comment_item_buy_date"
-            android:layout_marginTop="10dp"
-            app:layout_constraintLeft_toLeftOf="@id/goods_comment_item_face"
-            />
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 274
goods/src/main/res/layout/goods_comment_lay.xml

@@ -1,274 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:tools="http://schemas.android.com/tools">
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        xmlns:bind="http://schemas.android.com/apk/res-auto"
-        xmlns:app="http://schemas.android.com/apk/res-auto"
-        android:background="@color/javashop_color_white"
-        bind:backgroundColor="@{@color/javashop_color_white}"
-        >
-        <android.support.constraint.ConstraintLayout
-            android:id="@+id/goods_comment_all_btn"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            android:tag="1"
-            bind:layout_constraintDimensionRatio="h,2:1"
-            app:layout_constraintWidth_percent="0.2"
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintLeft_toLeftOf="parent"
-            bind:layout_constraintRight_toLeftOf="@id/goods_comment_all_btn"
-            android:background="@color/javashop_color_pink"
-            >
-            <TextView
-                android:id="@+id/goods_comment_all_tv"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintVertical_bias="0.5"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                style="@style/auto_text_size"
-                android:text="全部"
-                android:gravity="center"
-                app:layout_constraintHeight_percent="0.5"
-                android:textColor="@color/javashop_color_select_color_red"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                />
-            <TextView
-                android:visibility="gone"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                style="@style/auto_text_size"
-                android:gravity="center"
-                android:text="111条"
-                bind:layout_constraintTop_toTopOf="parent"
-                bind:layout_constraintVertical_bias="0.9"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintHeight_percent="0.35"
-                android:textColor="@color/javashop_color_select_color_red"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                />
-        </android.support.constraint.ConstraintLayout>
-        <android.support.constraint.ConstraintLayout
-            bind:layout_constraintRight_toLeftOf="@id/goods_comment_secondary_btn"
-            app:layout_constraintLeft_toRightOf="@id/goods_comment_all_btn"
-            android:id="@+id/goods_comment_good_btn"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            android:tag="2"
-            bind:layout_constraintDimensionRatio="h,2:1"
-            app:layout_constraintWidth_percent="0.2"
-            app:layout_constraintTop_toTopOf="parent"
-            android:background="@color/javashop_color_pink"
-            >
-            <TextView
-                android:id="@+id/goods_comment_good_tv"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintVertical_bias="0.5"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                style="@style/auto_text_size"
-                android:text="好评"
-                android:gravity="center"
-                app:layout_constraintHeight_percent="0.5"
-                android:textColor="@color/javashop_color_nomal_color_gray"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                />
-            <TextView
-                android:visibility="gone"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                style="@style/auto_text_size"
-                android:gravity="center"
-                android:text="111条"
-                bind:layout_constraintTop_toTopOf="parent"
-                bind:layout_constraintVertical_bias="0.9"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintHeight_percent="0.35"
-                android:textColor="@color/javashop_color_nomal_color_gray"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                />
-        </android.support.constraint.ConstraintLayout>
-        <android.support.constraint.ConstraintLayout
-            android:id="@+id/goods_comment_secondary_btn"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            android:tag="3"
-            bind:layout_constraintDimensionRatio="h,2:1"
-            app:layout_constraintWidth_percent="0.2"
-            app:layout_constraintTop_toTopOf="parent"
-            bind:layout_constraintRight_toLeftOf="@id/goods_comment_difference_btn"
-            app:layout_constraintLeft_toRightOf="@id/goods_comment_good_btn"
-            android:background="@color/javashop_color_pink"
-            >
-            <TextView
-                android:id="@+id/goods_comment_secondary_tv"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintVertical_bias="0.5"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                style="@style/auto_text_size"
-                android:text="中评"
-                android:gravity="center"
-                app:layout_constraintHeight_percent="0.5"
-                android:textColor="@color/javashop_color_nomal_color_gray"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                />
-            <TextView
-                android:visibility="gone"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                style="@style/auto_text_size"
-                android:gravity="center"
-                android:text="111条"
-                bind:layout_constraintTop_toTopOf="parent"
-                bind:layout_constraintVertical_bias="0.9"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintHeight_percent="0.35"
-                android:textColor="@color/javashop_color_nomal_color_gray"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                />
-        </android.support.constraint.ConstraintLayout>
-        <android.support.constraint.ConstraintLayout
-            android:id="@+id/goods_comment_difference_btn"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            android:tag="4"
-            bind:layout_constraintRight_toLeftOf="@id/goods_comment_image_btn"
-            bind:layout_constraintDimensionRatio="h,2:1"
-            app:layout_constraintWidth_percent="0.2"
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintLeft_toRightOf="@id/goods_comment_secondary_btn"
-            android:background="@color/javashop_color_pink"
-            >
-            <TextView
-                android:id="@+id/goods_comment_difference_tv"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintVertical_bias="0.5"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                style="@style/auto_text_size"
-                android:text="差评"
-                android:gravity="center"
-                app:layout_constraintHeight_percent="0.5"
-                android:textColor="@color/javashop_color_nomal_color_gray"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                />
-            <TextView
-                android:visibility="gone"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                style="@style/auto_text_size"
-                android:gravity="center"
-                android:text="111条"
-                bind:layout_constraintTop_toTopOf="parent"
-                bind:layout_constraintVertical_bias="0.9"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintHeight_percent="0.35"
-                android:textColor="@color/javashop_color_nomal_color_gray"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                />
-        </android.support.constraint.ConstraintLayout>
-        <android.support.constraint.ConstraintLayout
-            android:id="@+id/goods_comment_image_btn"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            android:tag="5"
-            bind:layout_constraintRight_toRightOf="parent"
-            bind:layout_constraintDimensionRatio="h,2:1"
-            app:layout_constraintWidth_percent="0.2"
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintLeft_toRightOf="@id/goods_comment_difference_btn"
-            android:background="@color/javashop_color_pink"
-            >
-            <TextView
-                android:id="@+id/goods_comment_image_tv"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintVertical_bias="0.5"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                style="@style/auto_text_size"
-                android:text="有图"
-                android:gravity="center"
-                app:layout_constraintHeight_percent="0.5"
-                android:textColor="@color/javashop_color_nomal_color_gray"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                />
-            <TextView
-                android:visibility="gone"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                style="@style/auto_text_size"
-                android:gravity="center"
-                bind:layout_constraintTop_toTopOf="parent"
-                bind:layout_constraintVertical_bias="0.9"
-                android:text="111条"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintHeight_percent="0.35"
-                android:textColor="@color/javashop_color_nomal_color_gray"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                />
-        </android.support.constraint.ConstraintLayout>
-        <com.scwang.smartrefresh.layout.SmartRefreshLayout
-            android:id="@+id/goods_comment_refresh"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            bind:layout_constraintTop_toBottomOf="@id/goods_comment_all_btn"
-            bind:layout_constraintBottom_toBottomOf="parent"
-            bind:layout_constraintLeft_toLeftOf="parent"
-            bind:layout_constraintRight_toRightOf="parent"
-            >
-            <android.support.v7.widget.RecyclerView
-                android:id="@+id/goods_comment_rv"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                >
-            </android.support.v7.widget.RecyclerView>
-        </com.scwang.smartrefresh.layout.SmartRefreshLayout>
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 156
goods/src/main/res/layout/goods_info_address_item.xml

@@ -1,156 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:tools="http://schemas.android.com/tools">
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        xmlns:bind="http://schemas.android.com/apk/res-auto"
-        xmlns:app="http://schemas.android.com/apk/res-auto">
-        <android.support.constraint.ConstraintLayout
-            android:layout_marginTop="10dp"
-            android:id="@+id/goods_info_address_lay"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:background="@color/javashop_color_white"
-            bind:backgroundColor="@{@color/javashop_color_white}"
-            >
-            <android.support.constraint.ConstraintLayout
-                android:id="@+id/goods_info_address_content"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:paddingLeft="10dp"
-                android:visibility="gone"
-                android:paddingBottom="10dp"
-                >
-                <TextView
-                    android:layout_marginTop="10dp"
-                    android:id="@+id/goods_info_address_title"
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    app:layout_constraintWidth_percent="0.15"
-                    app:layout_constraintDimensionRatio="h,2:1"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintHorizontal_bias="0"
-                    android:text="送至"
-                    app:autoSizeMaxTextSize="15sp"
-                    app:autoSizeMinTextSize="1sp"
-                    app:autoSizeStepGranularity="2sp"
-                    app:autoSizeTextType="uniform"
-                    tools:ignore="MissingPrefix"
-                    android:gravity="center_vertical"
-                    style="@style/auto_text_size"
-                    />
-                <ImageView
-                    android:id="@+id/goods_info_address_iv"
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    app:layout_constraintWidth_percent="0.07"
-                    app:layout_constraintDimensionRatio="h,1:1"
-                    app:layout_constraintTop_toTopOf="@id/goods_info_address_title"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintHorizontal_bias="1"
-                    android:layout_marginRight="10dp"
-                    android:src="@drawable/javashop_icon_more_gradient"
-                    />
-                <ImageView
-                    android:id="@+id/goods_info_address_iv_b"
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    app:layout_constraintWidth_percent="0.04"
-                    app:layout_constraintDimensionRatio="h,1:1"
-                    app:layout_constraintTop_toTopOf="@id/goods_info_address_title"
-                    app:layout_constraintLeft_toRightOf="@id/goods_info_address_title"
-                    app:layout_constraintRight_toLeftOf="@id/goods_info_address_iv"
-                    app:layout_constraintBottom_toBottomOf="@id/goods_info_address_title"
-                    app:layout_constraintHorizontal_bias="0"
-                    android:src="@drawable/javashop_icon_address_red_small"
-                    />
-                <com.enation.javashop.android.lib.widget.AutoSizeTextView
-                    android:id="@+id/goods_info_address_content_tv"
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    android:layout_marginRight="10dp"
-                    app:layout_constraintTop_toTopOf="@id/goods_info_address_title"
-                    app:layout_constraintBottom_toBottomOf="@id/goods_info_address_title"
-                    app:layout_constraintLeft_toRightOf="@id/goods_info_address_iv_b"
-                    app:layout_constraintRight_toLeftOf="@id/goods_info_address_iv"
-                    app:layout_constraintHorizontal_bias="0"
-                    android:text="河北廊坊市三河市燕郊镇黄金花园A1222室"
-                    android:lines="1"
-                    android:textColor="@color/javashop_color_black"
-                    android:gravity="center_vertical"
-                    android:ellipsize="end"
-                    />
-            </android.support.constraint.ConstraintLayout>
-
-            <android.support.constraint.ConstraintLayout
-                android:id="@+id/goods_info_weight_lay"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                bind:layout_goneMarginTop="10dp"
-                android:paddingBottom="10dp"
-                app:layout_constraintTop_toBottomOf="@id/goods_info_address_content"
-                >
-                <TextView
-                    android:layout_marginLeft="10dp"
-                    android:id="@+id/goods_info_weight_title"
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    app:layout_constraintWidth_percent="0.15"
-                    app:layout_constraintDimensionRatio="h,2:1"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintHorizontal_bias="0"
-                    android:text="重量"
-                    app:autoSizeMaxTextSize="20sp"
-                    app:autoSizeMinTextSize="1sp"
-                    app:autoSizeStepGranularity="2sp"
-                    app:autoSizeTextType="uniform"
-                    tools:ignore="MissingPrefix"
-                    android:gravity="center_vertical"
-                    style="@style/auto_text_size"
-                    />
-                <com.enation.javashop.android.lib.widget.AutoSizeTextView
-                    android:id="@+id/goods_info_weight_content_tv"
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    android:layout_marginRight="10dp"
-                    app:layout_constraintLeft_toRightOf="@id/goods_info_weight_title"
-                    app:layout_constraintTop_toTopOf="@id/goods_info_weight_title"
-                    app:layout_constraintBottom_toBottomOf="@id/goods_info_weight_title"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintHorizontal_bias="0"
-                    android:text="111g"
-                    android:lines="1"
-                    android:ellipsize="end"
-                    android:textColor="@color/javashop_color_black"
-                    app:autoSizeMaxTextSize="20sp"
-                    app:autoSizeMinTextSize="1sp"
-                    app:autoSizeStepGranularity="2sp"
-                    app:autoSizeTextType="uniform"
-                    tools:ignore="MissingPrefix"
-                    android:gravity="center_vertical"
-                    style="@style/auto_text_size"
-                    />
-            </android.support.constraint.ConstraintLayout>
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/javashop_color_line_gray"
-                app:layout_constraintBottom_toBottomOf="parent"
-                />
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/javashop_color_line_gray"
-                app:layout_constraintTop_toTopOf="parent"
-                />
-        </android.support.constraint.ConstraintLayout>
-
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 156
goods/src/main/res/layout/goods_info_advice_item.xml

@@ -1,156 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:bind="http://schemas.android.com/apk/res-auto"
-        xmlns:app="http://schemas.android.com/apk/res-auto"
-        xmlns:android="http://schemas.android.com/apk/res/android"
-    >
-        <android.support.constraint.ConstraintLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:id="@+id/goods_info_advice_lay"
-            android:background="@color/javashop_color_white"
-            bind:backgroundColor="@{@color/javashop_color_white}"
-            >
-            <android.support.constraint.ConstraintLayout
-                android:id="@+id/goods_info_advice_header"
-                android:paddingLeft="10dp"
-                android:paddingRight="10dp"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                app:layout_constraintDimensionRatio="h,10:1"
-                >
-                <com.enation.javashop.android.lib.widget.AutoSizeTextView
-                    android:id="@+id/goods_info_advice_title"
-                    android:layout_width="wrap_content"
-                    android:layout_height="0dp"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintHeight_percent="0.5"
-                    android:lines="1"
-                    android:ellipsize="end"
-                    android:text="咨询"
-                    android:gravity="center_vertical"
-                    />
-                <ImageView
-                    android:id="@+id/goods_info_advice_iv"
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    app:layout_constraintHeight_percent="0.3"
-                    app:layout_constraintDimensionRatio="w,1:1"
-                    android:src="@drawable/javashop_into_gray"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    />
-                <com.enation.javashop.android.lib.widget.AutoSizeTextView
-                    android:id="@+id/goods_info_advice_tv"
-                    android:layout_width="wrap_content"
-                    android:layout_height="0dp"
-                    app:layout_constraintHeight_percent="0.5"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintRight_toLeftOf="@id/goods_info_advice_iv"
-                    android:layout_marginRight="5dp"
-                    android:text="共192个咨询"
-                    android:gravity="center"
-                    android:lines="1"
-                    />
-            </android.support.constraint.ConstraintLayout>
-            <android.support.constraint.ConstraintLayout
-                android:id="@+id/goods_info_advice_list"
-                android:paddingLeft="10dp"
-                android:paddingBottom="10dp"
-                android:paddingRight="10dp"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                app:layout_constraintTop_toBottomOf="@id/goods_info_advice_header"
-                >
-                <android.support.constraint.ConstraintLayout
-                    android:id="@+id/goods_info_advice_a"
-                    android:layout_width="match_parent"
-                    android:layout_height="0dp"
-                    app:layout_constraintDimensionRatio="h,15:1"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintRight_toRightOf="parent"
-                    >
-                    <ImageView
-                        android:id="@+id/goods_info_advice_a_iv"
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        app:layout_constraintHeight_percent="0.8"
-                        app:layout_constraintDimensionRatio="w,1:1"
-                        app:layout_constraintLeft_toLeftOf="parent"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        android:src="@drawable/javashop_icon_ask"
-                        />
-                    <com.enation.javashop.android.lib.widget.AutoSizeTextView
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        android:layout_marginRight="10dp"
-                        android:lines="1"
-                        android:gravity="center_vertical"
-                        android:ellipsize="end"
-                        android:id="@+id/goods_info_advice_a_tv"
-                        app:layout_constraintTop_toTopOf="@id/goods_info_advice_a_iv"
-                        app:layout_constraintBottom_toBottomOf="@id/goods_info_advice_a_iv"
-                        app:layout_constraintLeft_toRightOf="@id/goods_info_advice_a_iv"
-                        app:layout_constraintRight_toRightOf="parent"
-                        android:layout_marginLeft="10dp"
-                        android:textColor="@color/javashop_color_black"
-                        android:text="为什么买的U4000UQ,在电脑用某软件测试时发现电脑型号是UX410UQK,请问这不是另一款电脑??"
-                        />
-                </android.support.constraint.ConstraintLayout>
-                <android.support.constraint.ConstraintLayout
-                    android:id="@+id/goods_info_advice_b"
-                    android:layout_width="match_parent"
-                    android:layout_height="0dp"
-                    app:layout_constraintDimensionRatio="h,15:1"
-                    app:layout_constraintTop_toBottomOf="@id/goods_info_advice_a"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintRight_toRightOf="parent"
-                    >
-                    <ImageView
-                        android:id="@+id/goods_info_advice_b_iv"
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        app:layout_constraintHeight_percent="0.8"
-                        app:layout_constraintDimensionRatio="w,1:1"
-                        app:layout_constraintLeft_toLeftOf="parent"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        android:src="@drawable/javashop_icon_ask"
-                        />
-                    <com.enation.javashop.android.lib.widget.AutoSizeTextView
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        android:layout_marginRight="10dp"
-                        android:lines="1"
-                        android:gravity="center_vertical"
-                        android:ellipsize="end"
-                        android:id="@+id/goods_info_advice_b_tv"
-                        app:layout_constraintTop_toTopOf="@id/goods_info_advice_b_iv"
-                        app:layout_constraintBottom_toBottomOf="@id/goods_info_advice_b_iv"
-                        app:layout_constraintLeft_toRightOf="@id/goods_info_advice_b_iv"
-                        app:layout_constraintRight_toRightOf="parent"
-                        android:layout_marginLeft="10dp"
-                        android:textColor="@color/javashop_color_black"
-                        android:text="有字体模糊的现象吗大家?怎么解决呢?"
-                        />
-                </android.support.constraint.ConstraintLayout>
-            </android.support.constraint.ConstraintLayout>
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/javashop_color_line_gray"
-                app:layout_constraintTop_toTopOf="parent"
-                />
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/javashop_color_line_gray"
-                app:layout_constraintBottom_toBottomOf="parent"
-                />
-        </android.support.constraint.ConstraintLayout>
-</layout>

Файловите разлики са ограничени, защото са твърде много
+ 0 - 279
goods/src/main/res/layout/goods_info_comment_item.xml


+ 0 - 11
goods/src/main/res/layout/goods_info_frag_lay.xml

@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:app="http://schemas.android.com/apk/res-auto"
-        xmlns:bind="http://schemas.android.com/apk/res-auto"
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:tools="http://schemas.android.com/tools">
-        <android.support.v7.widget.RecyclerView
-        android:id="@+id/goods_info_rv"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-        </android.support.v7.widget.RecyclerView>
-</layout>

+ 0 - 57
goods/src/main/res/layout/goods_info_gallery_item.xml

@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout>
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        xmlns:app="http://schemas.android.com/apk/res-auto"
-        xmlns:tools="http://schemas.android.com/tools">
-        <android.support.constraint.ConstraintLayout
-            android:id="@+id/goods_info_header"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintWidth_percent="1"
-            app:layout_constraintDimensionRatio="h,1:1"
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            android:background="#fff">
-            <android.support.v4.view.ViewPager
-                android:id="@+id/goods_info_gallery"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                >
-            </android.support.v4.view.ViewPager>
-            <TextView
-                android:id="@+id/goods_info_gallery_index_tv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                app:layout_constraintWidth_percent="0.15"
-                app:layout_constraintDimensionRatio="h,2.5:1"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintHorizontal_bias="0.95"
-                app:layout_constraintVertical_bias="0.95"
-                app:layout_constraintBottom_toBottomOf="@id/goods_info_gallery"
-                android:text=""
-                android:gravity="center"
-                android:textColor="@color/javashop_color_white"
-                style="@style/auto_text_size"
-                android:background="@drawable/javashop_rounder_corner_gray"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                />
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                app:layout_constraintHeight_percent="0.01"
-                app:layout_constraintBottom_toBottomOf="parent"
-                android:background="#44f8f0f8"
-                />
-        </android.support.constraint.ConstraintLayout>
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 242
goods/src/main/res/layout/goods_info_message_item.xml

@@ -1,242 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout>
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        xmlns:app="http://schemas.android.com/apk/res-auto"
-        xmlns:bind="http://schemas.android.com/apk/res-auto"
-        xmlns:tools="http://schemas.android.com/tools">
-        <android.support.constraint.ConstraintLayout
-            android:id="@+id/goods_info_message"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:paddingLeft="10dp"
-            android:background="@color/javashop_color_white"
-            bind:backgroundColor="@{@color/javashop_color_white}"
-            >
-            <android.support.constraint.ConstraintLayout
-                android:id="@+id/goods_info_name_lay"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintDimensionRatio="h,5:1"
-                >
-                <android.support.constraint.ConstraintLayout
-                    android:id="@+id/goods_info_collect_goods"
-                    android:layout_width="0dp"
-                    app:layout_constraintRight_toRightOf="parent"
-                    android:layout_height="0dp"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintDimensionRatio="w,1:1"
-                    >
-                    <ImageView
-                        android:id="@+id/goods_info_collect_goods_iv"
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        app:layout_constraintHeight_percent="0.4"
-                        app:layout_constraintDimensionRatio="w,1:1"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintLeft_toLeftOf="parent"
-                        app:layout_constraintRight_toRightOf="parent"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintVertical_bias="0.25"
-                        android:src="@drawable/javashop_icon_heart_nomal"
-                        />
-                    <TextView
-                        android:id="@+id/goods_info_collect_goods_tv"
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        app:layout_constraintHeight_percent="0.25"
-                        app:layout_constraintDimensionRatio="w,2:1"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintLeft_toLeftOf="parent"
-                        app:layout_constraintRight_toRightOf="parent"
-                        app:layout_constraintVertical_bias="0.8"
-                        style="@style/auto_text_size"
-                        android:gravity="center"
-                        android:text="@string/javashop_collect"
-                        app:autoSizeMaxTextSize="30sp"
-                        app:autoSizeMinTextSize="1sp"
-                        app:autoSizeStepGranularity="2sp"
-                        app:autoSizeTextType="uniform"
-                        tools:ignore="MissingPrefix"
-                        />
-                </android.support.constraint.ConstraintLayout>
-                <TextView
-                    android:gravity="center_vertical"
-                    android:lines="3"
-                    android:id="@+id/goods_info_name_tv"
-                    android:textColor="@color/javashop_color_black"
-                    android:ellipsize="end"
-                    bind:text_count_for_line="@{20}"
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintRight_toLeftOf="@id/goods_info_collect_goods"
-                    />
-            </android.support.constraint.ConstraintLayout>
-            <TextView
-                android:id="@+id/goods_info_describe_tv"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                app:layout_constraintTop_toBottomOf="@id/goods_info_name_lay"
-                android:textSize="13sp"
-                android:visibility="gone"
-                android:paddingRight="10dp"
-                android:textColor="#e3414c"
-                android:text="【3.28号再续秒杀!尊享金属品质!】合金轻薄!大容量固态!3.28号华硕再续秒杀!全场笔记本享白条三期免息》》"
-                />
-            <TextView
-                android:id="@+id/goods_info_price_tv"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                app:layout_constraintDimensionRatio="h,9:1"
-                app:layout_constraintTop_toBottomOf="@id/goods_info_describe_tv"
-                android:lines="1"
-                android:textSize="20sp"
-                android:gravity="center_vertical"
-                android:textStyle="bold"
-                android:textColor="@color/javashop_color_price_red"
-                />
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/javashop_color_line_gray"
-                app:layout_constraintBottom_toBottomOf="@id/goods_info_price_tv"
-                />
-            <android.support.constraint.ConstraintLayout
-                android:id="@+id/goods_info_coupon_lay"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                app:layout_constraintDimensionRatio="h,8:1"
-                app:layout_constraintTop_toBottomOf="@id/goods_info_price_tv"
-                >
-                <TextView
-                    android:id="@+id/goods_info_coupon_title"
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    app:layout_constraintWidth_percent="0.15"
-                    app:layout_constraintDimensionRatio="h,2:1"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintHorizontal_bias="0"
-                    android:text="领券"
-                    android:gravity="center_vertical"
-                    app:autoSizeMaxTextSize="20sp"
-                    app:autoSizeMinTextSize="1sp"
-                    app:autoSizeStepGranularity="2sp"
-                    app:autoSizeTextType="uniform"
-                    tools:ignore="MissingPrefix"
-                    style="@style/auto_text_size"
-                    />
-                <ImageView
-                    android:id="@+id/goods_info_coupon_iv"
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    app:layout_constraintWidth_percent="0.07"
-                    app:layout_constraintDimensionRatio="h,1:1"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintRight_toRightOf="parent"
-                    android:layout_marginRight="10dp"
-                    app:layout_constraintHorizontal_bias="1"
-                    android:src="@drawable/javashop_icon_more_gradient"
-                    />
-                <HorizontalScrollView
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    android:scrollbars="none"
-                    android:layout_marginRight="5dp"
-                    app:layout_constraintTop_toTopOf="@id/goods_info_coupon_title"
-                    app:layout_constraintBottom_toBottomOf="@id/goods_info_coupon_title"
-                    app:layout_constraintRight_toLeftOf="@id/goods_info_coupon_iv"
-                    app:layout_constraintLeft_toRightOf="@id/goods_info_coupon_title"
-                    >
-                    <LinearLayout
-                        android:id="@+id/goods_info_coupon_content"
-                        android:layout_width="wrap_content"
-                        android:layout_height="match_parent"
-                        android:gravity="center_vertical"
-                        android:orientation="horizontal"
-                        >
-                    </LinearLayout>
-                </HorizontalScrollView>
-                <View
-                    android:layout_width="match_parent"
-                    android:layout_height="1px"
-                    android:background="@color/javashop_color_line_gray"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    />
-            </android.support.constraint.ConstraintLayout>
-            <android.support.constraint.ConstraintLayout
-                android:layout_width="match_parent"
-                android:id="@+id/goods_info_promotion_lay"
-                android:layout_height="wrap_content"
-                app:layout_constraintTop_toBottomOf="@id/goods_info_coupon_lay"
-                >
-                <TextView
-                    android:layout_marginTop="10dp"
-                    android:layout_marginBottom="10dp"
-                    android:id="@+id/goods_info_promotion_title"
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    app:layout_constraintWidth_percent="0.15"
-                    app:layout_constraintDimensionRatio="h,2:1"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintHorizontal_bias="0"
-                    android:text="促销"
-                    app:autoSizeMaxTextSize="20sp"
-                    app:autoSizeMinTextSize="1sp"
-                    app:autoSizeStepGranularity="2sp"
-                    app:autoSizeTextType="uniform"
-                    tools:ignore="MissingPrefix"
-                    android:gravity="center_vertical"
-                    style="@style/auto_text_size"
-                    />
-                <ImageView
-                    android:id="@+id/goods_info_promotion_iv"
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    app:layout_constraintWidth_percent="0.07"
-                    app:layout_constraintDimensionRatio="h,1:1"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintHorizontal_bias="1"
-                    android:layout_marginRight="10dp"
-                    android:src="@drawable/javashop_icon_more_gradient"
-                    />
-                <LinearLayout
-                    android:id="@+id/goods_info_promotion_content"
-                    android:layout_width="0dp"
-                    android:layout_height="wrap_content"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintLeft_toRightOf="@id/goods_info_promotion_title"
-                    app:layout_constraintRight_toLeftOf="@id/goods_info_promotion_iv"
-                    android:layout_marginRight="5dp"
-                    android:orientation="vertical"
-                    >
-                </LinearLayout>
-            </android.support.constraint.ConstraintLayout>
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/javashop_color_line_gray"
-                app:layout_constraintBottom_toBottomOf="parent"
-                />
-        </android.support.constraint.ConstraintLayout>
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 48
goods/src/main/res/layout/goods_info_promotion_item.xml

@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout>
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:paddingLeft="10dp"
-        android:paddingTop="15dp"
-        xmlns:app="http://schemas.android.com/apk/res-auto">
-        <TextView
-            android:id="@+id/goodsinfo_promotion_item_title"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:paddingLeft="3dp"
-            android:paddingRight="3dp"
-            android:paddingTop="1dp"
-            android:paddingBottom="1dp"
-            android:textSize="12sp"
-            android:textColor="@color/javashop_color_select_color_red"
-            android:text=""
-            android:background="@drawable/javashop_fillet_red_bg"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toTopOf="parent"
-            />
-        <TextView
-            android:id="@+id/goodsinfo_promotion_item_content"
-            android:layout_width="0dp"
-            android:layout_marginRight="10dp"
-            android:layout_height="wrap_content"
-            app:layout_constraintLeft_toRightOf="@id/goodsinfo_promotion_item_title"
-            app:layout_constraintRight_toRightOf="parent"
-            android:textSize="15sp"
-            android:layout_marginLeft="10dp"
-            android:textColor="@color/javashop_color_navy"
-            android:text=""
-            />
-        <View
-            android:id="@+id/goodsinfo_promotion_item_line"
-            android:layout_width="0dp"
-            android:layout_height="1px"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            android:background="@color/javashop_color_line_gray"
-            android:layout_marginTop="10dp"
-            app:layout_constraintTop_toBottomOf="@id/goodsinfo_promotion_item_content"
-            />
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 226
goods/src/main/res/layout/goods_info_shop_item.xml

@@ -1,226 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:app="http://schemas.android.com/apk/res-auto"
-        xmlns:bind="http://schemas.android.com/apk/res-auto"
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:tools="http://schemas.android.com/tools"
-    >
-    <data>
-        <variable
-            name="shop"
-            type="com.enation.javashop.android.middleware.model.ShopViewModel"/>
-    </data>
-        <android.support.constraint.ConstraintLayout
-            android:id="@+id/goods_info_shop_lay"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:background="@color/javashop_color_white"
-            bind:backgroundColor="@{@color/javashop_color_white}"
-            >
-
-            <android.support.constraint.ConstraintLayout
-                android:id="@+id/goods_info_shop_header"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                app:layout_constraintDimensionRatio="h,7:1"
-                app:layout_constraintTop_toTopOf="parent"
-                android:paddingLeft="10dp"
-                android:paddingRight="10dp"
-                android:layout_marginTop="5dp"
-                >
-                <ImageView
-                    android:id="@+id/goods_info_shop_iv"
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintHeight_percent="0.8"
-                    app:layout_constraintDimensionRatio="w,3:1"
-                    android:background="@drawable/javashop_btn_balck_line_bg"
-                    android:scaleType="centerCrop"
-                    bind:url="@{shop.logo}"
-                    android:padding="1dp"
-                    />
-                <com.enation.javashop.android.lib.widget.AutoSizeTextView
-                    android:id="@+id/goods_info_shop_name_tv"
-                    android:layout_width="wrap_content"
-                    android:layout_height="0dp"
-                    android:gravity="center_vertical"
-                    app:layout_constraintHeight_percent="0.4"
-                    android:lines="1"
-                    app:layout_constraintTop_toTopOf="@id/goods_info_shop_iv"
-                    app:layout_constraintLeft_toRightOf="@id/goods_info_shop_iv"
-                    android:layout_marginLeft="5dp"
-                    android:text="@{shop.name}"
-                    android:textColor="@color/javashop_color_black"
-                    />
-                <com.enation.javashop.android.lib.widget.AutoSizeTextView
-                    android:id="@+id/goods_info_shop_des_tv"
-                    android:layout_width="wrap_content"
-                    android:layout_height="0dp"
-                    app:layout_constraintHeight_percent="0.35"
-                    android:lines="1"
-                    android:textSize="11sp"
-                    android:gravity="center_vertical"
-                    app:layout_constraintTop_toBottomOf="@id/goods_info_shop_name_tv"
-                    app:layout_constraintLeft_toRightOf="@id/goods_info_shop_iv"
-                    android:layout_marginLeft="5dp"
-                    android:text="@{shop.description}"
-                    />
-            </android.support.constraint.ConstraintLayout>
-            <android.support.constraint.ConstraintLayout
-                android:id="@+id/goods_info_shop_info"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                app:layout_constraintDimensionRatio="h,8:1"
-                app:layout_constraintTop_toBottomOf="@id/goods_info_shop_header"
-                >
-                <android.support.constraint.ConstraintLayout
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    app:layout_constraintWidth_percent="0.5"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    >
-                    <com.enation.javashop.android.lib.widget.AutoSizeTextView
-                        android:id="@+id/goods_info_shop_collect_tv"
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        android:gravity="center"
-                        app:layout_constraintHeight_percent="0.4"
-                        android:lines="1"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintLeft_toLeftOf="parent"
-                        app:layout_constraintRight_toRightOf="parent"
-                        android:layout_marginLeft="5dp"
-                        android:text="@{String.valueOf(shop.collectNum)}"
-                        android:textColor="@color/javashop_color_black"
-                        app:layout_constraintVertical_bias="0.125"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:autoSizeMaxTextSize="20sp"
-                        app:autoSizeMinTextSize="1sp"
-                        app:autoSizeStepGranularity="2sp"
-                        app:autoSizeTextType="uniform"
-                        tools:ignore="MissingPrefix"
-                        style="@style/auto_text_size"
-                        />
-                    <com.enation.javashop.android.lib.widget.AutoSizeTextView
-                        android:id="@+id/goods_info_shop_collect_des"
-                        android:layout_width="wrap_content"
-                        android:layout_height="0dp"
-                        app:layout_constraintHeight_percent="0.35"
-                        android:lines="1"
-                        android:textSize="11sp"
-                        android:gravity="center_vertical"
-                        app:layout_constraintTop_toBottomOf="@id/goods_info_shop_collect_tv"
-                        app:layout_constraintLeft_toLeftOf="parent"
-                        app:layout_constraintRight_toRightOf="parent"
-                        android:layout_marginLeft="5dp"
-                        android:text="关注人数"
-                        app:autoSizeMaxTextSize="20sp"
-                        app:autoSizeMinTextSize="1sp"
-                        app:autoSizeStepGranularity="2sp"
-                        app:autoSizeTextType="uniform"
-                        tools:ignore="MissingPrefix"
-                        style="@style/auto_text_size"
-                        />
-                </android.support.constraint.ConstraintLayout>
-                <android.support.constraint.ConstraintLayout
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    app:layout_constraintWidth_percent="0.5"
-                    app:layout_constraintRight_toRightOf="parent"
-                    >
-                    <com.enation.javashop.android.lib.widget.AutoSizeTextView
-                        android:id="@+id/goods_info_shop_goods_num_tv"
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        android:gravity="center"
-                        app:layout_constraintHeight_percent="0.4"
-                        android:lines="1"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintLeft_toLeftOf="parent"
-                        app:layout_constraintRight_toRightOf="parent"
-                        android:layout_marginLeft="5dp"
-                        android:text="@{String.valueOf(shop.goodsNum)}"
-                        android:textColor="@color/javashop_color_black"
-                        app:layout_constraintVertical_bias="0.125"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:autoSizeMaxTextSize="20sp"
-                        app:autoSizeMinTextSize="1sp"
-                        app:autoSizeStepGranularity="2sp"
-                        app:autoSizeTextType="uniform"
-                        tools:ignore="MissingPrefix"
-                        style="@style/auto_text_size"
-                        />
-                    <com.enation.javashop.android.lib.widget.AutoSizeTextView
-                        android:id="@+id/goods_info_shop_goods_num_des"
-                        android:layout_width="wrap_content"
-                        android:layout_height="0dp"
-                        app:layout_constraintHeight_percent="0.35"
-                        android:lines="1"
-                        android:textSize="11sp"
-                        android:gravity="center_vertical"
-                        app:layout_constraintTop_toBottomOf="@id/goods_info_shop_goods_num_tv"
-                        app:layout_constraintLeft_toLeftOf="parent"
-                        app:layout_constraintRight_toRightOf="parent"
-                        android:layout_marginLeft="5dp"
-                        android:text="全部商品"
-                        app:autoSizeMaxTextSize="20sp"
-                        app:autoSizeMinTextSize="1sp"
-                        app:autoSizeStepGranularity="2sp"
-                        app:autoSizeTextType="uniform"
-                        tools:ignore="MissingPrefix"
-                        style="@style/auto_text_size"
-                        />
-                </android.support.constraint.ConstraintLayout>
-                <View
-                    android:layout_width="1dp"
-                    android:layout_height="0dp"
-                    app:layout_constraintHeight_percent="0.8"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintRight_toRightOf="parent"
-                    android:background="@color/javashop_color_line_gray"
-                    />
-            </android.support.constraint.ConstraintLayout>
-            <com.enation.javashop.android.lib.widget.AutoSizeTextView
-                android:id="@+id/goods_info_shop_into"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                bind:to_shop="@{shop.id}"
-                app:layout_constraintWidth_percent="1"
-                app:layout_constraintDimensionRatio="h,10:1"
-                android:background="@drawable/javashop_btn_balck_line_bg"
-                app:layout_constraintTop_toBottomOf="@id/goods_info_shop_info"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                android:layout_marginBottom="5dp"
-                android:layout_marginLeft="10dp"
-                android:layout_marginRight="10dp"
-                android:lines="1"
-                android:padding="7dp"
-                android:gravity="center"
-                app:autoSizeMaxTextSize="20sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                style="@style/auto_text_size"
-                android:text="进店逛逛"
-                />
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/javashop_color_line_gray"
-                app:layout_constraintTop_toTopOf="parent"
-                />
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/javashop_color_line_gray"
-                app:layout_constraintBottom_toBottomOf="parent"
-                />
-        </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 88
goods/src/main/res/layout/goods_info_spec_item.xml

@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:tools="http://schemas.android.com/tools">
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        xmlns:bind="http://schemas.android.com/apk/res-auto"
-        xmlns:app="http://schemas.android.com/apk/res-auto">
-        <android.support.constraint.ConstraintLayout
-            android:layout_marginTop="10dp"
-            android:id="@+id/goods_info_spec_lay"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            app:layout_constraintDimensionRatio="h,7:1"
-            android:background="@color/javashop_color_white"
-            bind:backgroundColor="@{@color/javashop_color_white}"
-            >
-            <TextView
-                android:layout_marginLeft="10dp"
-                android:id="@+id/goods_info_spec_title"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                app:layout_constraintWidth_percent="0.15"
-                app:layout_constraintDimensionRatio="h,2:1"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintHorizontal_bias="0"
-                android:text="已选"
-                android:gravity="center_vertical"
-                app:autoSizeMaxTextSize="20sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                style="@style/auto_text_size"
-                />
-            <ImageView
-                android:id="@+id/goods_info_spec_iv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                app:layout_constraintWidth_percent="0.07"
-                app:layout_constraintDimensionRatio="h,1:1"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                android:layout_marginRight="10dp"
-                app:layout_constraintHorizontal_bias="1"
-                android:src="@drawable/javashop_icon_more_gradient"
-                />
-            <TextView
-                android:id="@+id/goods_info_spec_content_tv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:layout_marginRight="10dp"
-                app:layout_constraintTop_toTopOf="@id/goods_info_spec_title"
-                app:layout_constraintBottom_toBottomOf="@id/goods_info_spec_title"
-                app:layout_constraintLeft_toRightOf="@id/goods_info_spec_title"
-                app:layout_constraintRight_toLeftOf="@id/goods_info_spec_iv"
-                app:autoSizeMaxTextSize="20sp"
-                app:autoSizeMinTextSize="1sp"
-                android:gravity="center_vertical"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                style="@style/auto_text_size"
-                android:text="默认"
-                android:textColor="@color/javashop_color_black"
-                android:lines="1"
-                android:ellipsize="end"
-                />
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/javashop_color_line_gray"
-                app:layout_constraintBottom_toBottomOf="parent"
-                />
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/javashop_color_line_gray"
-                app:layout_constraintTop_toTopOf="parent"
-                />
-        </android.support.constraint.ConstraintLayout>
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 135
goods/src/main/res/layout/goods_info_spec_pop.xml

@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout>
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        xmlns:tools="http://schemas.android.com/tools"
-        android:background="@color/javashop_color_transparent"
-        xmlns:bind="http://schemas.android.com/apk/res-auto"
-        xmlns:app="http://schemas.android.com/apk/res-auto">
-        <View
-            android:id="@+id/goods_info_spec_pop_mask"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            android:background="@color/javashop_color_mask"
-            />
-        <View
-            android:id="@+id/goods_info_spec_pop_bg"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintHeight_percent="0.64"
-            app:layout_constraintVertical_bias="1"
-            bind:backgroundColor="@{@color/javashop_color_white}"
-            android:background="@color/javashop_color_white"
-            />
-        <ImageView
-            android:id="@+id/goods_info_spec_pop_close"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintTop_toTopOf="@id/goods_info_spec_pop_bg"
-            app:layout_constraintRight_toRightOf="@id/goods_info_spec_pop_bg"
-            app:layout_constraintLeft_toLeftOf="@id/goods_info_spec_pop_bg"
-            app:layout_constraintWidth_percent="0.07"
-            app:layout_constraintDimensionRatio="h,1:1"
-            app:layout_constraintHorizontal_bias="1"
-            android:layout_marginTop="3dp"
-            android:layout_marginRight="3dp"
-            android:src="@drawable/icon_cancle_gray"
-            />
-        <ImageView
-            android:id="@+id/goods_info_spec_pop_iv"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintHeight_percent="0.15"
-            app:layout_constraintDimensionRatio="w,1:1"
-            app:layout_constraintVertical_bias="0.4"
-            app:layout_constraintHorizontal_bias="0"
-            android:src="@mipmap/welcome"
-            android:layout_marginLeft="10dp"
-            />
-        <TextView
-            android:id="@+id/goods_info_spec_pop_num_tv"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintLeft_toRightOf="@id/goods_info_spec_pop_iv"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintBottom_toBottomOf="@id/goods_info_spec_pop_iv"
-            app:layout_constraintHeight_percent="0.03"
-            style="@style/auto_text_size"
-            android:lines="1"
-            android:gravity="center_vertical"
-            android:textColor="@color/javashop_color_nomal_color_gray"
-            android:text="商品编号:887231213"
-            android:layout_marginLeft="10dp"
-            app:autoSizeMaxTextSize="100sp"
-            app:autoSizeMinTextSize="1sp"
-            app:autoSizeStepGranularity="2sp"
-            app:autoSizeTextType="uniform"
-            tools:ignore="MissingPrefix"
-            />
-        <TextView
-            android:id="@+id/goods_info_spec_pop_price_tv"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            android:lines="1"
-            android:textColor="@color/javashop_color_price_red"
-            app:layout_constraintLeft_toRightOf="@id/goods_info_spec_pop_iv"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintBottom_toTopOf="@id/goods_info_spec_pop_num_tv"
-            app:layout_constraintHeight_percent="0.05"
-            android:layout_marginLeft="10dp"
-            style="@style/auto_text_size"
-            android:text="¥59.00"
-            app:autoSizeMaxTextSize="100sp"
-            app:autoSizeMinTextSize="1sp"
-            app:autoSizeStepGranularity="2sp"
-            app:autoSizeTextType="uniform"
-            tools:ignore="MissingPrefix"
-            />
-        <View
-            android:id="@+id/goods_info_spec_pop_line"
-            android:layout_width="match_parent"
-            android:layout_height="1px"
-            app:layout_constraintTop_toBottomOf="@id/goods_info_spec_pop_iv"
-            android:layout_marginTop="5dp"
-            android:background="@color/javashop_color_line_gray"
-            />
-        <TextView
-            android:id="@+id/goods_info_spec_pop_add_cart"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintHeight_percent="0.08"
-            android:gravity="center"
-            android:textSize="15sp"
-            android:text="加入购物车"
-            android:textColor="@color/javashop_color_white"
-            android:background="@drawable/javashop_bg_red_shadow"
-            />
-
-        <android.support.v7.widget.RecyclerView
-            android:id="@+id/goods_info_spec_pop_rv"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintBottom_toTopOf="@id/goods_info_spec_pop_add_cart"
-            app:layout_constraintTop_toBottomOf="@id/goods_info_spec_pop_line"
-            />
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 76
goods/src/main/res/layout/goods_introduce_lay.xml

@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:tools="http://schemas.android.com/tools">
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        xmlns:bind="http://schemas.android.com/apk/res-auto"
-        android:background="@color/javashop_color_white"
-        bind:backgroundColor="@{@color/javashop_color_white}"
-        xmlns:app="http://schemas.android.com/apk/res-auto">
-
-        <TextView
-            android:layout_marginTop="10dp"
-            android:id="@+id/goods_introduce_intro"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintTop_toTopOf="parent"
-            android:text="商品介绍"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintHeight_percent="0.04"
-            app:layout_constraintWidth_percent="0.5"
-            bind:layout_constraintRight_toRightOf="parent"
-            bind:layout_constraintDimensionRatio="h,10:1"
-            bind:layout_constraintHorizontal_bias="0"
-            android:gravity="center"
-            app:autoSizeMaxTextSize="20sp"
-            app:autoSizeMinTextSize="1sp"
-            app:autoSizeStepGranularity="2sp"
-            app:autoSizeTextType="uniform"
-            tools:ignore="MissingPrefix"
-            android:textColor="@color/javashop_color_select_color_red"
-            style="@style/auto_text_size"
-            />
-        <TextView
-            android:layout_marginTop="10dp"
-            android:id="@+id/goods_introduce_spec"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintTop_toTopOf="parent"
-            android:text="规格参数"
-            bind:layout_constraintLeft_toLeftOf="parent"
-            bind:layout_constraintHorizontal_bias="1"
-            app:autoSizeMaxTextSize="20sp"
-            app:autoSizeMinTextSize="1sp"
-            app:autoSizeStepGranularity="2sp"
-            app:autoSizeTextType="uniform"
-            tools:ignore="MissingPrefix"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintWidth_percent="0.5"
-            bind:layout_constraintDimensionRatio="h,10:1"
-            android:gravity="center"
-            android:textColor="@color/javashop_color_nomal_color_gray"
-            style="@style/auto_text_size"
-            />
-        <View
-            android:layout_width="1dp"
-            android:layout_height="0dp"
-            app:layout_constraintTop_toTopOf="@id/goods_introduce_intro"
-            app:layout_constraintBottom_toBottomOf="@id/goods_introduce_intro"
-            app:layout_constraintLeft_toRightOf="@id/goods_introduce_intro"
-            app:layout_constraintRight_toLeftOf="@id/goods_introduce_spec"
-            android:background="@color/javashop_color_line_gray"
-            />
-        <WebView
-            android:id="@+id/goods_introduce_web"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            android:layout_marginTop="10dp"
-            app:layout_constraintTop_toBottomOf="@id/goods_introduce_intro"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            >
-        </WebView>
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 217
goods/src/main/res/layout/goods_promotion_detail_item_lay.xml

@@ -1,217 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout>
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        xmlns:app="http://schemas.android.com/apk/res-auto"
-        >
-        <View
-            android:id="@+id/promotion_bg"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintHorizontal_bias="0"
-            app:layout_constraintWidth_default="percent"
-            app:layout_constraintWidth_percent="0.8"
-            app:layout_constraintDimensionRatio="h,4.5:1"
-            android:background="@drawable/javashop_promotion_bg"
-            />
-        <View
-            android:id="@+id/promotion_fg"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintHorizontal_bias="1"
-            app:layout_constraintWidth_default="percent"
-            app:layout_constraintWidth_percent="0.45"
-            android:background="@drawable/javashop_promotion_fg"
-            />
-
-        <android.support.constraint.ConstraintLayout
-            android:id="@+id/logo"
-            android:layout_width="wrap_content"
-            android:layout_height="20dp"
-            android:layout_marginBottom="5dp"
-            android:layout_marginLeft="10dp"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintBottom_toBottomOf="parent"
-            android:background="@drawable/javashop_promotion_logo_bg"
-            >
-            <ImageView
-                android:id="@+id/logo_iv"
-                android:layout_width="20dp"
-                android:layout_height="20dp"
-                app:layout_constraintDimensionRatio="h,1:1"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                android:padding="2.5dp"
-                android:background="@drawable/javashop_promotion_logo_iv_bg"
-                />
-            <TextView
-                android:id="@+id/logo_tv"
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                app:layout_constraintLeft_toRightOf="@id/logo_iv"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                android:paddingLeft="10dp"
-                android:gravity="center"
-                android:paddingRight="10dp"
-                android:textColor="@color/javashop_color_white"
-                android:textSize="11sp"
-                android:text=""
-                />
-        </android.support.constraint.ConstraintLayout>
-        <TextView
-            android:id="@+id/org_price_tv"
-            android:layout_width="wrap_content"
-            android:layout_height="0dp"
-            app:layout_constraintLeft_toRightOf="@id/logo"
-            app:layout_constraintTop_toTopOf="@id/logo"
-            app:layout_constraintBottom_toBottomOf="@id/logo"
-            android:layout_marginLeft="5dp"
-            android:textColor="@color/javashop_color_white"
-            android:textStyle="bold"
-            android:gravity="center_vertical"
-            android:textSize="15sp"
-            />
-        <TextView
-            android:id="@+id/price_tv"
-            android:layout_width="wrap_content"
-            android:layout_height="0dp"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintBottom_toTopOf="@id/logo"
-            app:layout_constraintTop_toTopOf="parent"
-            android:layout_marginLeft="10dp"
-            android:textColor="@color/javashop_color_white"
-            android:textStyle="bold"
-            android:gravity="center_vertical"
-            android:textSize="15sp"
-            />
-        <TextView
-            android:id="@+id/promotion_title"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            android:gravity="center"
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintLeft_toLeftOf="@id/promotion_fg"
-            app:layout_constraintHeight_percent="0.3"
-            android:layout_marginTop="5dp"
-            android:textSize="15sp"
-            android:textColor="#c10fa3"
-            />
-        <TextView
-            android:id="@+id/buy_num_tv"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintTop_toBottomOf="@id/promotion_title"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintLeft_toLeftOf="@id/promotion_fg"
-            app:layout_constraintRight_toRightOf="@id/promotion_fg"
-            android:gravity="center"
-            android:textSize="17sp"
-            android:textColor="#c10fa3"
-            android:text="已售出0件"
-            android:visibility="gone"
-            />
-        <android.support.constraint.ConstraintLayout
-            android:id="@+id/time_lay"
-            android:visibility="visible"
-            android:layout_width="wrap_content"
-            android:layout_height="0dp"
-            app:layout_constraintTop_toBottomOf="@id/promotion_title"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintLeft_toLeftOf="@id/promotion_fg"
-            app:layout_constraintRight_toRightOf="@id/promotion_fg"
-            >
-            <TextView
-                android:id="@+id/sec_tv"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:background="@drawable/javashop_fillet_violet_bg"
-                android:text="00"
-                android:padding="2dp"
-                android:textSize="15sp"
-                android:textColor="@color/javashop_color_white"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                />
-            <TextView
-                android:id="@+id/colon_a"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text=":"
-                android:textStyle="bold"
-                android:padding="2dp"
-                android:textSize="15sp"
-                android:textColor="#c10fa3"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintRight_toLeftOf="@id/sec_tv"
-                />
-            <TextView
-                android:id="@+id/min_tv"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:background="@drawable/javashop_fillet_violet_bg"
-                android:text="00"
-                android:padding="2dp"
-                android:textSize="15sp"
-                android:textColor="@color/javashop_color_white"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintRight_toLeftOf="@id/colon_a"
-                />
-            <TextView
-                android:id="@+id/colon_b"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text=":"
-                android:textStyle="bold"
-                android:padding="2dp"
-                android:textSize="15sp"
-                android:textColor="#c10fa3"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintRight_toLeftOf="@id/min_tv"
-                />
-            <TextView
-                android:id="@+id/hour_tv"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:background="@drawable/javashop_fillet_violet_bg"
-                android:text="00"
-                android:padding="2dp"
-                android:textSize="15sp"
-                android:textColor="@color/javashop_color_white"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintRight_toLeftOf="@id/colon_b"
-                />
-            <TextView
-                android:id="@+id/day_tv"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="0天"
-                android:layout_marginRight="2dp"
-                android:textSize="15sp"
-                android:textColor="#c10fa3"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintRight_toLeftOf="@id/hour_tv"
-                />
-        </android.support.constraint.ConstraintLayout>
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 125
goods/src/main/res/layout/goods_searach_filter_value_frag_lay.xml

@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout>
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        xmlns:app="http://schemas.android.com/apk/res-auto"
-        xmlns:bind="http://schemas.android.com/apk/res-auto"
-        xmlns:tools="http://schemas.android.com/tools"
-        bind:backgroundColor="@{@color/javashop_color_white}"
-        >
-        <android.support.constraint.ConstraintLayout
-            android:id="@+id/goods_search_filter_value_frag_topbar"
-            android:layout_width="match_parent"
-            android:layout_height="50dp"
-            bind:auto_topbar_height="@{true}"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent">
-            <View
-                android:id="@+id/goods_search_filter_value_holder"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                bind:status_bar="@{1}"
-                android:background="@color/javashop_color_holder_color"
-                />
-            <android.support.constraint.ConstraintLayout
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toBottomOf="@id/goods_search_filter_value_holder"
-                app:layout_constraintBottom_toBottomOf="parent"
-                android:background="@color/javashop_color_white"
-                >
-                <TextView
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    bind:layout_constraintTop_toTopOf="parent"
-                    bind:layout_constraintBottom_toBottomOf="parent"
-                    bind:layout_constraintLeft_toLeftOf="parent"
-                    bind:layout_constraintRight_toRightOf="parent"
-                    bind:layout_constraintHeight_percent="0.5"
-                    android:gravity="center"
-                    style="@style/auto_text_size"
-                    app:autoSizeMaxTextSize="30sp"
-                    app:autoSizeMinTextSize="1sp"
-                    app:autoSizeStepGranularity="2sp"
-                    app:autoSizeTextType="uniform"
-                    tools:ignore="MissingPrefix"
-                    android:text="@string/javashop_all_brand"
-                    android:textColor="@color/javashop_color_black"
-                    />
-                <ImageView
-                    android:id="@+id/goods_search_filter_value_frag_back"
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    app:layout_constraintHeight_percent="0.45"
-                    app:layout_constraintDimensionRatio="w,1:1"
-                    android:src="@drawable/javashop_back_black"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintHorizontal_bias="0.03"
-                    />
-                <TextView
-                    android:id="@+id/goods_search_filter_value_frag_confrim"
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    android:text="@string/javashop_confrim"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintHeight_percent="0.4"
-                    app:layout_constraintDimensionRatio="w,2:1"
-                    android:lines="1"
-                    style="@style/auto_text_size"
-                    android:textSize="15sp"
-                    android:gravity="center"
-                    android:textColor="@color/javashop_color_goods_filter_brand_confrim_tc"
-                    app:autoSizeMaxTextSize="30sp"
-                    app:autoSizeMinTextSize="1sp"
-                    app:autoSizeStepGranularity="2sp"
-                    app:autoSizeTextType="uniform"
-                    tools:ignore="MissingPrefix"
-                    />
-            </android.support.constraint.ConstraintLayout>
-            <View
-                style="@style/gray_line"
-                bind:layout_constraintBottom_toBottomOf="parent"
-                />
-        </android.support.constraint.ConstraintLayout>
-        <android.support.v7.widget.RecyclerView
-            android:id="@+id/goods_search_filter_value_rv"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintTop_toBottomOf="@id/goods_search_filter_value_frag_topbar"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            >
-        </android.support.v7.widget.RecyclerView>
-        <com.enation.javashop.android.lib.widget.LetterView
-            android:id="@+id/goods_search_filter_value_fast_find_lay"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintTop_toBottomOf="@id/goods_search_filter_value_frag_topbar"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintWidth_percent="0.07"
-            bind:backgroundColor="@{@color/javashop_color_white}"
-            >
-        </com.enation.javashop.android.lib.widget.LetterView>
-        <View
-            android:layout_width="1px"
-            android:layout_height="0dp"
-            app:layout_constraintTop_toBottomOf="@id/goods_search_filter_value_frag_topbar"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintRight_toLeftOf="@id/goods_search_filter_value_fast_find_lay"
-            android:background="@color/javashop_color_line_gray"
-            />
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 697
goods/src/main/res/layout/goods_search_act_lay.xml

@@ -1,697 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:app="http://schemas.android.com/apk/res-auto"
-        xmlns:bind="http://schemas.android.com/apk/res-auto"
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:tools="http://schemas.android.com/tools">
-  <android.support.v4.widget.DrawerLayout
-      android:layout_width="match_parent"
-      android:layout_height="match_parent">
-    <android.support.constraint.ConstraintLayout
-        android:layout_width="match_parent"
-        bind:backgroundColor="@{@color/javashop_color_white}"
-        android:layout_height="match_parent">
-      <com.scwang.smartrefresh.layout.SmartRefreshLayout
-          android:id="@+id/goods_search_refresh"
-          android:layout_width="0dp"
-          android:layout_height="0dp"
-          app:layout_constraintTop_toTopOf="parent"
-          app:layout_constraintBottom_toBottomOf="parent"
-          app:layout_constraintLeft_toLeftOf="parent"
-          app:layout_constraintRight_toRightOf="parent"
-          android:background="#eff1f3">
-        <android.support.v7.widget.RecyclerView
-            android:id="@+id/goods_search_rv"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="#eff1f3"
-            />
-      </com.scwang.smartrefresh.layout.SmartRefreshLayout>
-      <android.support.constraint.ConstraintLayout
-          android:layout_height="wrap_content"
-          app:layout_constraintLeft_toLeftOf="parent"
-          app:layout_constraintRight_toRightOf="parent"
-          app:layout_constraintTop_toTopOf="parent"
-          android:layout_width="match_parent"
-          android:id="@+id/goods_search_top_lay"
-          android:visibility="visible"
-          >
-        <android.support.constraint.ConstraintLayout
-            android:id="@+id/goods_search_topbar"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            bind:auto_topbar_height="@{true}"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintWidth_default="percent"
-            app:layout_constraintWidth_percent="1"
-            bind:backgroundColor="@{@color/javashop_color_common_topbar_bg}"
-            >
-
-          <View
-              android:id="@+id/goods_search_toolbar_holder"
-              android:layout_width="0dp"
-              android:layout_height="0dp"
-              bind:status_bar="@{1}"
-              app:layout_constraintTop_toTopOf="parent"
-              android:background="@color/javashop_color_holder_color"
-              app:layout_constraintLeft_toLeftOf="parent"
-              app:layout_constraintRight_toRightOf="parent"
-              />
-
-          <ImageView
-              android:id="@+id/goods_search_back_iv"
-              android:layout_width="0dp"
-              android:layout_height="0dp"
-              android:layout_marginLeft="10dp"
-              android:src="@drawable/javashop_back_black"
-              app:layout_constraintBottom_toBottomOf="parent"
-              app:layout_constraintDimensionRatio="w,1:1"
-              app:layout_constraintHeight_default="percent"
-              app:layout_constraintHeight_percent="0.33"
-              app:layout_constraintLeft_toLeftOf="parent"
-              app:layout_constraintTop_toBottomOf="@id/goods_search_toolbar_holder"
-              />
-
-          <View
-              android:id="@+id/goods_search_back_touch"
-              android:layout_width="0dp"
-              android:layout_height="0dp"
-              android:src="@drawable/javashop_back_black"
-              app:layout_constraintBottom_toBottomOf="parent"
-              app:layout_constraintRight_toLeftOf="@+id/goods_search_touch_view"
-              app:layout_constraintLeft_toLeftOf="parent"
-              app:layout_constraintTop_toBottomOf="@id/goods_search_toolbar_holder"
-              />
-
-          <ImageView
-              android:id="@+id/goods_search_recly_type_iv"
-              android:layout_width="0dp"
-              android:layout_height="0dp"
-              android:layout_marginRight="10dp"
-              android:src="@drawable/javashop_icon_list"
-              app:layout_constraintBottom_toBottomOf="parent"
-              app:layout_constraintDimensionRatio="w,1:1"
-              app:layout_constraintHeight_default="percent"
-              app:layout_constraintHeight_percent="0.25"
-              app:layout_constraintRight_toRightOf="parent"
-              app:layout_constraintTop_toBottomOf="@id/goods_search_toolbar_holder"
-              />
-          <View
-              android:id="@+id/goods_search_recly_type_touch"
-              android:layout_width="0dp"
-              android:layout_height="0dp"
-              app:layout_constraintBottom_toBottomOf="parent"
-              app:layout_constraintLeft_toRightOf="@+id/goods_search_touch_view"
-              app:layout_constraintRight_toRightOf="parent"
-              app:layout_constraintTop_toBottomOf="@id/goods_search_toolbar_holder"
-              />
-
-          <android.support.constraint.ConstraintLayout
-              android:id="@+id/goods_search_touch_view"
-              android:layout_width="0dp"
-              android:layout_height="0dp"
-              android:layout_marginLeft="10dp"
-              android:layout_marginRight="10dp"
-              android:background="@drawable/javashop_search_bg"
-              app:layout_constraintBottom_toBottomOf="parent"
-              app:layout_constraintHeight_default="percent"
-              app:layout_constraintHeight_percent="0.4"
-              app:layout_constraintLeft_toRightOf="@+id/goods_search_back_iv"
-              app:layout_constraintRight_toLeftOf="@+id/goods_search_recly_type_iv"
-              app:layout_constraintTop_toBottomOf="@id/goods_search_toolbar_holder"
-              >
-
-            <ImageView
-                android:visibility="invisible"
-                android:id="@+id/goods_search_touch_view_iv"
-                android:layout_width="14dp"
-                android:layout_height="0dp"
-                android:layout_marginLeft="10dp"
-                android:src="@drawable/javashop_category_search_find"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintDimensionRatio="w,1:1"
-                app:layout_constraintHeight_default="percent"
-                app:layout_constraintHeight_percent="0.5"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                />
-
-            <TextView
-                android:visibility="gone"
-                android:id="@+id/goods_search_touch_view_tv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:ellipsize="end"
-                android:gravity="center_vertical"
-                android:lines="1"
-                android:paddingBottom="5dp"
-                android:paddingTop="5dp"
-                android:text="请输入你想搜索的关键词"
-                android:textColor="@color/javashop_color_search_tc"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintWidth_default="percent"
-                app:layout_constraintWidth_percent="0.75"
-                app:layout_constraintHeight_percent="0.85"
-                app:autoSizeMaxTextSize="20sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                />
-            <android.support.constraint.ConstraintLayout
-                android:id="@+id/javashop_goods_search_text_lay"
-                android:layout_width="wrap_content"
-                android:layout_height="0dp"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintHeight_percent="0.8"
-                app:layout_constraintHorizontal_bias="0.05"
-                android:background="@drawable/javashop_goods_search_text_bg"
-                >
-              <TextView
-                  android:id="@+id/javashop_goods_search_text_tv"
-                  android:layout_width="wrap_content"
-                  android:layout_height="match_parent"
-                  android:text=""
-                  android:gravity="center"
-                  android:paddingLeft="10dp"
-                  android:textColor="@color/javashop_color_white"
-                  style="@style/auto_text_size"
-                  app:autoSizeMaxTextSize="30sp"
-                  app:autoSizeMinTextSize="1sp"
-                  app:autoSizeStepGranularity="2sp"
-                  app:autoSizeTextType="uniform"
-                  tools:ignore="MissingPrefix"
-                  />
-              <ImageView
-                  android:layout_width="0dp"
-                  android:layout_height="0dp"
-                  app:layout_constraintLeft_toRightOf="@id/javashop_goods_search_text_tv"
-                  app:layout_constraintTop_toTopOf="parent"
-                  app:layout_constraintBottom_toBottomOf="parent"
-                  app:layout_constraintRight_toRightOf="parent"
-                  app:layout_constraintHeight_percent="0.4"
-                  app:layout_constraintDimensionRatio="w,2:1"
-                  android:src="@drawable/javashop_cancel_white"
-                  />
-            </android.support.constraint.ConstraintLayout>
-          </android.support.constraint.ConstraintLayout>
-
-          <View
-              android:id="@+id/goods_serach_line_a"
-              style="@style/gray_line"
-              app:layout_constraintBottom_toBottomOf="parent"/>
-        </android.support.constraint.ConstraintLayout>
-
-        <LinearLayout
-            android:id="@+id/goods_search_action_bar"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:orientation="horizontal"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintDimensionRatio="h,9:1"
-            app:layout_constraintTop_toBottomOf="@id/goods_search_topbar"
-            bind:backgroundColor="@{@color/javashop_color_common_topbar_bg}"
-            >
-
-          <android.support.constraint.ConstraintLayout
-              android:id="@+id/goods_search_colligate_lay"
-              android:layout_width="match_parent"
-              android:layout_height="match_parent"
-              android:layout_weight="1"
-              android:tag="1"
-              >
-
-            <TextView
-                android:id="@+id/goods_search_colligate_tv"
-                style="@style/auto_text_size"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:gravity="center"
-                android:text="综合"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintDimensionRatio="w,2:1"
-                app:layout_constraintHeight_default="percent"
-                app:layout_constraintHeight_percent="0.6"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                android:textColor="@color/javashop_color_black"
-                android:tag="text"
-                />
-
-            <ImageView
-                android:id="@+id/goods_search_colligate_iv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:src="@drawable/javashop_icon_desc_gray"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintDimensionRatio="w,1:1"
-                app:layout_constraintHeight_default="percent"
-                app:layout_constraintHeight_percent="0.15"
-                app:layout_constraintLeft_toRightOf="@id/goods_search_colligate_tv"
-                app:layout_constraintTop_toTopOf="parent"
-                android:tag="image"
-                />
-          </android.support.constraint.ConstraintLayout>
-
-          <android.support.constraint.ConstraintLayout
-              android:id="@+id/goods_search_sales_volume_lay"
-              android:layout_width="match_parent"
-              android:layout_height="match_parent"
-              android:layout_weight="1"
-              android:tag="2"
-              >
-
-            <TextView
-                android:id="@+id/goods_search_sales_volume_tv"
-                style="@style/auto_text_size"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:gravity="center"
-                android:text="销量"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintDimensionRatio="w,2:1"
-                app:layout_constraintHeight_default="percent"
-                app:layout_constraintHeight_percent="0.6"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                android:textColor="@color/javashop_color_black"
-                android:tag="text"
-                />
-          </android.support.constraint.ConstraintLayout>
-
-          <android.support.constraint.ConstraintLayout
-              android:id="@+id/goods_search_price_lay"
-              android:layout_width="match_parent"
-              android:layout_height="match_parent"
-              android:layout_weight="1"
-              android:tag="3"
-              >
-
-            <TextView
-                android:id="@+id/goods_search_price_lay_tv"
-                style="@style/auto_text_size"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:gravity="center"
-                android:text="价格"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintDimensionRatio="w,2:1"
-                app:layout_constraintHeight_default="percent"
-                app:layout_constraintHeight_percent="0.6"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                android:textColor="@color/javashop_color_black"
-                android:tag="text"
-                />
-
-            <ImageView
-                android:id="@+id/goods_search_price_iv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:src="@drawable/javashop_icon_double_nomal"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintDimensionRatio="w,1:1"
-                app:layout_constraintHeight_default="percent"
-                app:layout_constraintHeight_percent="0.2"
-                app:layout_constraintLeft_toRightOf="@id/goods_search_price_lay_tv"
-                app:layout_constraintTop_toTopOf="parent"
-                android:tag="image"
-                />
-          </android.support.constraint.ConstraintLayout>
-
-          <android.support.constraint.ConstraintLayout
-              android:id="@+id/goods_search_filter_lay"
-              android:layout_width="match_parent"
-              android:layout_height="match_parent"
-              android:layout_weight="1"
-              android:tag="4"
-              >
-
-            <TextView
-                android:id="@+id/goods_search_filter_tv"
-                style="@style/auto_text_size"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:gravity="center"
-                android:text="筛选"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintDimensionRatio="w,2:1"
-                app:layout_constraintHeight_default="percent"
-                app:layout_constraintHeight_percent="0.6"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                android:textColor="@color/javashop_color_black"
-                android:tag="text"
-                />
-
-            <ImageView
-                android:id="@+id/goods_search_filter_iv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:src="@drawable/javashop_icon_filter_nomal"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintDimensionRatio="w,1:1.5"
-                app:layout_constraintHeight_default="percent"
-                app:layout_constraintHeight_percent="0.4"
-                app:layout_constraintLeft_toRightOf="@id/goods_search_filter_tv"
-                app:layout_constraintTop_toTopOf="parent"
-                android:tag="image"
-                />
-          </android.support.constraint.ConstraintLayout>
-        </LinearLayout>
-
-        <View
-            android:id="@+id/goods_serach_line_b"
-            style="@style/gray_line"
-            app:layout_constraintBottom_toBottomOf="@id/goods_search_action_bar"/>
-
-        <android.support.constraint.ConstraintLayout
-            android:id="@+id/goods_search_filter_more_action_lay"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintDimensionRatio="h,9:1"
-            app:layout_constraintTop_toBottomOf="@id/goods_serach_line_b"
-            bind:backgroundColor="@{@color/javashop_color_common_topbar_bg}"
-            >
-          <View
-              android:id="@+id/goods_serach_line_c"
-              style="@style/gray_line"
-              app:layout_constraintBottom_toBottomOf="parent"/>
-          <android.support.constraint.Guideline
-              android:id="@+id/goods_search_filter_more_line_a"
-              android:layout_width="match_parent"
-              android:layout_height="wrap_content"
-              android:orientation="horizontal"
-              app:layout_constraintGuide_percent="0.2"/>
-
-          <android.support.constraint.Guideline
-              android:id="@+id/goods_search_filter_more_line_b"
-              android:layout_width="match_parent"
-              android:layout_height="wrap_content"
-              android:orientation="horizontal"
-              app:layout_constraintGuide_percent="0.8"/>
-          <View
-              android:layout_width="0dp"
-              android:layout_height="0dp"
-              android:id="@+id/goods_search_more_filter_a_bg"
-              app:layout_constraintTop_toTopOf="@+id/goods_search_more_filter_a_lay"
-              app:layout_constraintBottom_toBottomOf="@+id/goods_search_more_filter_a_lay"
-              app:layout_constraintLeft_toLeftOf="@+id/goods_search_more_filter_a_lay"
-              app:layout_constraintRight_toRightOf="@+id/goods_search_more_filter_a_lay"
-              android:background="@drawable/javashop_goods_search_filter_btn_bg"
-              android:visibility="invisible"
-              />
-          <android.support.constraint.ConstraintLayout
-              android:id="@+id/goods_search_more_filter_a_lay"
-              android:layout_width="0dp"
-              android:layout_height="0dp"
-              app:layout_constraintLeft_toLeftOf="parent"
-              app:layout_constraintRight_toLeftOf="@+id/goods_search_more_filter_b_lay"
-              app:layout_constraintBottom_toBottomOf="@id/goods_search_filter_more_line_b"
-              app:layout_constraintTop_toTopOf="@id/goods_search_filter_more_line_a"
-              app:layout_constraintWidth_percent="0.2"
-              android:visibility="invisible"
-              >
-            <TextView
-                android:id="@+id/goods_search_more_filter_a_tv"
-                style="@style/auto_text_size"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:ellipsize="end"
-                android:gravity="center"
-                android:lines="1"
-                android:tag="text"
-                android:text="品牌"
-                android:textColor="@color/javashop_color_black"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintHeight_percent="0.75"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="@+id/goods_search_more_filter_a_iv"
-                app:layout_constraintTop_toTopOf="parent"
-                tools:ignore="MissingPrefix"
-                app:layout_constraintWidth_percent="0.7"
-                />
-
-            <ImageView
-                android:tag="image"
-                android:id="@+id/goods_search_more_filter_a_iv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:src="@drawable/javashop_icon_desc_gray"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintDimensionRatio="h,1:1"
-                app:layout_constraintWidth_percent="0.1"
-                app:layout_constraintLeft_toRightOf="@+id/goods_search_more_filter_a_tv"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintHorizontal_bias="0.25"
-                />
-          </android.support.constraint.ConstraintLayout>
-
-          <View
-              android:layout_width="0dp"
-              android:layout_height="0dp"
-              android:id="@+id/goods_search_more_filter_b_bg"
-              app:layout_constraintTop_toTopOf="@+id/goods_search_more_filter_b_lay"
-              app:layout_constraintBottom_toBottomOf="@+id/goods_search_more_filter_b_lay"
-              app:layout_constraintLeft_toLeftOf="@+id/goods_search_more_filter_b_lay"
-              app:layout_constraintRight_toRightOf="@+id/goods_search_more_filter_b_lay"
-              android:background="@drawable/javashop_goods_search_filter_btn_bg"
-              android:visibility="invisible"
-              />
-          <android.support.constraint.ConstraintLayout
-              android:id="@+id/goods_search_more_filter_b_lay"
-              android:layout_width="0dp"
-              android:layout_height="0dp"
-              app:layout_constraintLeft_toRightOf="@+id/goods_search_more_filter_a_lay"
-              app:layout_constraintRight_toLeftOf="@+id/goods_search_more_filter_c_lay"
-              app:layout_constraintWidth_percent="0.2"
-              app:layout_constraintBottom_toBottomOf="@id/goods_search_filter_more_line_b"
-              app:layout_constraintTop_toTopOf="@id/goods_search_filter_more_line_a"
-              android:visibility="invisible"
-              >
-
-            <TextView
-                android:tag="text"
-                android:id="@+id/goods_search_more_filter_b_tv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:ellipsize="end"
-                android:gravity="center"
-                android:lines="1"
-                android:text="分类"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintHeight_percent="0.75"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="@+id/goods_search_more_filter_b_iv"
-                app:layout_constraintTop_toTopOf="parent"
-                style="@style/auto_text_size"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                android:textColor="@color/javashop_color_black"
-                app:layout_constraintWidth_percent="0.7"
-                />
-
-            <ImageView
-                android:tag="image"
-                android:id="@+id/goods_search_more_filter_b_iv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:src="@drawable/javashop_icon_desc_gray"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintDimensionRatio="h,1:1"
-                app:layout_constraintWidth_percent="0.1"
-                app:layout_constraintLeft_toRightOf="@+id/goods_search_more_filter_b_tv"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintHorizontal_bias="0.25"
-                />
-          </android.support.constraint.ConstraintLayout>
-          <View
-              android:layout_width="0dp"
-              android:layout_height="0dp"
-              android:id="@+id/goods_search_more_filter_c_bg"
-              app:layout_constraintTop_toTopOf="@+id/goods_search_more_filter_c_lay"
-              app:layout_constraintBottom_toBottomOf="@+id/goods_search_more_filter_c_lay"
-              app:layout_constraintLeft_toLeftOf="@+id/goods_search_more_filter_c_lay"
-              app:layout_constraintRight_toRightOf="@+id/goods_search_more_filter_c_lay"
-              android:background="@drawable/javashop_goods_search_filter_btn_bg"
-              android:visibility="invisible"
-              />
-          <android.support.constraint.ConstraintLayout
-              android:id="@+id/goods_search_more_filter_c_lay"
-              android:layout_width="0dp"
-              android:layout_height="0dp"
-              app:layout_constraintLeft_toRightOf="@+id/goods_search_more_filter_b_lay"
-              app:layout_constraintRight_toLeftOf="@+id/goods_search_more_filter_d_lay"
-              app:layout_constraintBottom_toBottomOf="@id/goods_search_filter_more_line_b"
-              app:layout_constraintTop_toTopOf="@id/goods_search_filter_more_line_a"
-              app:layout_constraintWidth_percent="0.2"
-              android:visibility="invisible"
-              >
-
-            <TextView
-                android:tag="text"
-                android:id="@+id/goods_search_more_filter_c_tv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:ellipsize="end"
-                android:gravity="center"
-                android:lines="1"
-                android:text="容量"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintHeight_percent="0.75"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="@+id/goods_search_more_filter_c_iv"
-                app:layout_constraintTop_toTopOf="parent"
-                style="@style/auto_text_size"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                android:textColor="@color/javashop_color_black"
-                app:layout_constraintWidth_percent="0.7"
-                />
-
-            <ImageView
-                android:tag="image"
-                android:id="@+id/goods_search_more_filter_c_iv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:src="@drawable/javashop_icon_desc_gray"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintDimensionRatio="h,1:1"
-                app:layout_constraintWidth_percent="0.1"
-                app:layout_constraintLeft_toRightOf="@+id/goods_search_more_filter_c_tv"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintHorizontal_bias="0.25"
-                />
-          </android.support.constraint.ConstraintLayout>
-
-          <View
-              android:layout_width="0dp"
-              android:layout_height="0dp"
-              android:id="@+id/goods_search_more_filter_d_bg"
-              app:layout_constraintTop_toTopOf="@+id/goods_search_more_filter_d_lay"
-              app:layout_constraintBottom_toBottomOf="@+id/goods_search_more_filter_d_lay"
-              app:layout_constraintLeft_toLeftOf="@+id/goods_search_more_filter_d_lay"
-              app:layout_constraintRight_toRightOf="@+id/goods_search_more_filter_d_lay"
-              android:background="@drawable/javashop_goods_search_filter_btn_bg"
-              android:visibility="invisible"
-              />
-          <android.support.constraint.ConstraintLayout
-              android:id="@+id/goods_search_more_filter_d_lay"
-              android:layout_width="0dp"
-              android:layout_height="0dp"
-              app:layout_constraintLeft_toRightOf="@+id/goods_search_more_filter_c_lay"
-              app:layout_constraintRight_toRightOf="parent"
-              app:layout_constraintBottom_toBottomOf="@id/goods_search_filter_more_line_b"
-              app:layout_constraintTop_toTopOf="@id/goods_search_filter_more_line_a"
-              app:layout_constraintWidth_percent="0.2"
-              android:visibility="invisible"
-              >
-
-            <TextView
-                android:tag="text"
-                android:id="@+id/goods_search_more_filter_d_tv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:ellipsize="end"
-                android:gravity="center"
-                android:lines="1"
-                android:text="物流"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintHeight_percent="0.75"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="@+id/goods_search_more_filter_d_iv"
-                app:layout_constraintTop_toTopOf="parent"
-                style="@style/auto_text_size"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                android:textColor="@color/javashop_color_black"
-                app:layout_constraintWidth_percent="0.7"
-                />
-
-            <ImageView
-                android:tag="image"
-                android:id="@+id/goods_search_more_filter_d_iv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:src="@drawable/javashop_icon_desc_gray"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintDimensionRatio="h,1:1"
-                app:layout_constraintWidth_percent="0.1"
-                app:layout_constraintLeft_toRightOf="@+id/goods_search_more_filter_d_tv"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintHorizontal_bias="0.25"
-                />
-          </android.support.constraint.ConstraintLayout>
-        </android.support.constraint.ConstraintLayout>
-      </android.support.constraint.ConstraintLayout>
-      <View
-          android:id="@+id/holder_mask"
-          android:layout_width="0dp"
-          android:layout_height="10dp"
-          android:background="@color/javashop_color_holder_color"
-          app:layout_constraintTop_toTopOf="parent"
-          bind:status_bar="@{1}"
-          app:layout_constraintLeft_toLeftOf="parent"
-          app:layout_constraintRight_toRightOf="parent"
-          />
-    </android.support.constraint.ConstraintLayout>
-    <FrameLayout
-        android:id="@+id/right_layout"
-        android:layout_width="280.0dip"
-        android:layout_height="fill_parent"
-        android:layout_gravity="end"
-        android:choiceMode="singleChoice"
-        android:divider="@android:color/transparent"
-        android:dividerHeight="0.0dip" />
-  </android.support.v4.widget.DrawerLayout>
-</layout>

+ 0 - 85
goods/src/main/res/layout/goods_search_filter_brand_item.xml

@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout>
-    <data>
-        <variable
-            name="data"
-            type="com.enation.javashop.android.middleware.model.GoodsFilterValue"/>
-        <import type="android.view.View"/>
-    </data>
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        xmlns:app="http://schemas.android.com/apk/res-auto"
-        xmlns:bind="http://schemas.android.com/apk/res-auto"
-        bind:backgroundColor="@{@color/javashop_color_white}"
-        >
-        <android.support.constraint.ConstraintLayout
-            android:id="@+id/goods_search_filter_brand_world_lay"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            app:layout_constraintDimensionRatio="h,13:1"
-            android:visibility="gone"
-            >
-            <com.enation.javashop.android.lib.widget.AutoSizeTextView
-                android:id="@+id/goods_search_filter_brand_world_tv"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:lines="1"
-                android:gravity="center_vertical"
-                android:textColor="@color/javashop_color_black"
-                android:text=""
-                android:paddingLeft="10dp"
-                android:background="@color/javashop_color_goods_search_filter_brand_world_bg"
-                />
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="0.5dp"
-                android:background="@color/javashop_color_line_gray"
-                app:layout_constraintBottom_toBottomOf="parent"
-                />
-        </android.support.constraint.ConstraintLayout>
-        <android.support.constraint.ConstraintLayout
-            app:layout_constraintTop_toBottomOf="@id/goods_search_filter_brand_world_lay"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            app:layout_constraintDimensionRatio="h,7:1"
-            >
-
-            <com.enation.javashop.android.lib.widget.AutoSizeTextView
-                android:id="@+id/goods_search_filter_brand_name_tv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintWidth_percent="0.7"
-                app:layout_constraintHeight_percent="0.5"
-                android:paddingLeft="20dp"
-                android:lines="1"
-                android:textSize="15sp"
-                android:text="@{data.name}"
-                android:textColor="@{data.selectedObservable.get() ? @color/javashop_color_goods_search_filter_brand_name_selected_bg : @color/javashop_color_black}"
-                style="@style/auto_text_size"
-                />
-            <ImageView
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:visibility="@{data.selectedObservable.get() ? View.VISIBLE : View.GONE}"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintHeight_percent="0.45"
-                app:layout_constraintDimensionRatio="w,1:1"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintLeft_toRightOf="@id/goods_search_filter_brand_name_tv"
-                android:src="@drawable/goods_search_more_action_item_selected_icon"
-                />
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="0.5dp"
-                android:background="@color/javashop_color_line_gray"
-                app:layout_constraintBottom_toBottomOf="parent"
-                />
-        </android.support.constraint.ConstraintLayout>
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 28
goods/src/main/res/layout/goods_search_filter_first_dialog.xml

@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout>
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="@color/javashop_color_transparent"
-        xmlns:app="http://schemas.android.com/apk/res-auto">
-        <ListView
-            android:id="@+id/goods_search_filter_first_lv"
-            android:layout_width="match_parent"
-            android:divider="@null"
-            android:layout_height="100dp"
-            android:background="@color/javashop_color_goods_search_more_bg"
-            />
-        <View
-            android:background="@color/color_mask"
-            android:id="@+id/goods_search_filter_first_mask"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintTop_toBottomOf="@id/goods_search_filter_first_lv"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            />
-        <View style="@style/gray_line"/>
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 52
goods/src/main/res/layout/goods_search_filter_first_item.xml

@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout>
-    <data>
-        <variable
-            name="data"
-            type="com.enation.javashop.android.component.goods.weiget.GoodsFirstMoreView.GoodsFirstMoreData"/>
-        <import type="android.view.View"/>
-    </data>
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:app="http://schemas.android.com/apk/res-auto"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:background="@color/javashop_color_transparent"
-        >
-        <android.support.constraint.ConstraintLayout
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:background="@color/javashop_color_transparent"
-            app:layout_constraintDimensionRatio="h,10:1"
-            >
-            <ImageView
-                android:visibility="@{ data.selectedObservable.get() ? View.VISIBLE :View.INVISIBLE }"
-                android:id="@+id/goods_search_filter_first_item_iv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintHorizontal_bias="0.95"
-                app:layout_constraintHeight_percent="0.6"
-                app:layout_constraintDimensionRatio="w,1:1"
-                android:src="@drawable/goods_search_more_action_item_selected_icon"
-                />
-            <TextView
-                android:id="@+id/goods_search_filter_first_item_tv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toLeftOf="@id/goods_search_filter_first_item_iv"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintHeight_percent="0.6"
-                app:layout_constraintWidth_percent="0.8"
-                android:textColor="@{ data.selectedObservable.get() ? @color/javashop_color_goods_search_action_item_selected : @color/javashop_color_goods_search_first_more_nomal }"
-                android:text="@{ data.name }"
-                style="@style/auto_text_size"
-                />
-        </android.support.constraint.ConstraintLayout>
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 57
goods/src/main/res/layout/goods_search_filter_frag_child_item.xml

@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout>
-    <data>
-        <variable
-            name="data"
-            type="com.enation.javashop.android.middleware.model.GoodsFilterValue"/>
-        <import type="android.view.View"/>
-    </data>
-
-
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        xmlns:app="http://schemas.android.com/apk/res-auto"
-        xmlns:tools="http://schemas.android.com/tools"
-        android:background="@{data ==null ? null:  data.selectedObservable.get() ? @drawable/javashop_goods_search_filter_btn_selected_bg : @drawable/javashop_goods_search_filter_btn_bg }"
-        >
-        <android.support.constraint.ConstraintLayout
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            app:layout_constraintDimensionRatio="h,3:1"
-            >
-            <TextView
-                android:id="@+id/goods_search_filter_frag_child_name_tv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintHeight_percent="0.7"
-                app:layout_constraintWidth_percent="0.9"
-                style="@style/auto_text_size"
-                android:gravity="center"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                android:text="@{data == null ? @string/javashop_all_brand : data.name}"
-                android:textColor="@{ data.selectedObservable.get() ? @color/javashop_color_goods_search_action_item_selected : @color/javashop_color_black }"
-                />
-            <ImageView
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                app:layout_constraintHeight_percent="0.4"
-                app:layout_constraintDimensionRatio="w,1:1"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                android:src="@drawable/javashop_into_gray"
-                android:visibility="@{data == null ? View.VISIBLE : View.GONE}"
-                />
-        </android.support.constraint.ConstraintLayout>
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 148
goods/src/main/res/layout/goods_search_filter_frag_lay.xml

@@ -1,148 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout>
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:bind="http://schemas.android.com/apk/res-auto"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        xmlns:tools="http://schemas.android.com/tools"
-        bind:backgroundColor="@{@color/javashop_color_white}"
-        xmlns:app="http://schemas.android.com/apk/res-auto">
-        <android.support.constraint.ConstraintLayout
-            android:id="@+id/goods_search_filter_frag_topbar"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            bind:auto_topbar_height="@{true}"
-            bind:layout_constraintLeft_toLeftOf="parent"
-            bind:layout_constraintRight_toRightOf="parent"
-            >
-            <View
-                android:id="@+id/goods_search_filter_holder"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                bind:layout_constraintLeft_toLeftOf="parent"
-                bind:layout_constraintRight_toRightOf="parent"
-                bind:status_bar="@{1}"
-                android:background="@color/javashop_color_holder_color"
-                />
-            <android.support.constraint.ConstraintLayout
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toBottomOf="@id/goods_search_filter_holder"
-                app:layout_constraintBottom_toBottomOf="parent"
-                android:background="@color/javashop_color_white"
-                >
-                <TextView
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    bind:layout_constraintTop_toTopOf="parent"
-                    bind:layout_constraintBottom_toBottomOf="parent"
-                    bind:layout_constraintLeft_toLeftOf="parent"
-                    bind:layout_constraintRight_toRightOf="parent"
-                    bind:layout_constraintHeight_percent="0.5"
-                    android:gravity="center"
-                    style="@style/auto_text_size"
-                    app:autoSizeMaxTextSize="30sp"
-                    app:autoSizeMinTextSize="1sp"
-                    app:autoSizeStepGranularity="2sp"
-                    app:autoSizeTextType="uniform"
-                    tools:ignore="MissingPrefix"
-                    android:text="全部筛选"
-                    android:textColor="@color/javashop_color_black"
-                    />
-            </android.support.constraint.ConstraintLayout>
-            <View
-                style="@style/gray_line"
-                bind:layout_constraintBottom_toBottomOf="parent"
-                />
-        </android.support.constraint.ConstraintLayout>
-        <android.support.v7.widget.RecyclerView
-            android:id="@+id/goods_search_filter_frag_rv"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintHeight_percent="0.80"
-            app:layout_constraintTop_toBottomOf="@id/goods_search_filter_frag_topbar"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            >
-        </android.support.v7.widget.RecyclerView>
-        <android.support.constraint.ConstraintLayout
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            app:layout_constraintBottom_toBottomOf="parent"
-            bind:layout_constraintDimensionRatio="h,7:1"
-            android:background="@color/javashop_color_white"
-            >
-            <android.support.constraint.ConstraintLayout
-                android:id="@+id/goods_search_filter_frag_reset"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:gravity="center"
-                app:layout_constraintWidth_percent="0.5"
-                app:layout_constraintHeight_percent="1"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                android:background="@color/javashop_color_white"
-                >
-                <TextView
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintHeight_percent="0.55"
-                    android:gravity="center"
-                    android:text="重置"
-                    android:lines="1"
-                    android:textColor="@color/javashop_color_black"
-                    style="@style/auto_text_size"
-                    app:autoSizeMaxTextSize="30sp"
-                    app:autoSizeMinTextSize="1sp"
-                    app:autoSizeStepGranularity="2sp"
-                    app:autoSizeTextType="uniform"
-                    tools:ignore="MissingPrefix"
-                    />
-            </android.support.constraint.ConstraintLayout>
-            <android.support.constraint.ConstraintLayout
-                android:id="@+id/goods_search_filter_frag_confirm"
-                android:background="#f83039"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:gravity="center"
-                app:layout_constraintWidth_percent="0.5"
-                app:layout_constraintHeight_percent="1"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                >
-                <TextView
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintBottom_toBottomOf="parent"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintHeight_percent="0.55"
-                    android:lines="1"
-                    android:gravity="center"
-                    android:textColor="@color/javashop_color_white"
-                    android:text="确定"
-                    app:layout_constraintWidth_percent="0.75"
-                    style="@style/auto_text_size"
-                    app:autoSizeMaxTextSize="30sp"
-                    app:autoSizeMinTextSize="1sp"
-                    app:autoSizeStepGranularity="2sp"
-                    app:autoSizeTextType="uniform"
-                    tools:ignore="MissingPrefix"
-                    />
-            </android.support.constraint.ConstraintLayout>
-            <View
-                style="@style/gray_line"
-                />
-        </android.support.constraint.ConstraintLayout>
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 71
goods/src/main/res/layout/goods_search_filter_frag_parent_item.xml

@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout>
-    <data>
-        <variable
-            name="data"
-            type="com.enation.javashop.android.middleware.model.GoodsFilterViewModel"/>
-    </data>
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        xmlns:app="http://schemas.android.com/apk/res-auto"
-        xmlns:tools="http://schemas.android.com/tools"
-        >
-        <android.support.constraint.ConstraintLayout
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            app:layout_constraintDimensionRatio="h,14:1"
-            android:background="#ffffff"
-            >
-            <TextView
-                android:id="@+id/goods_search_filter_frag_parent_name_tv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintWidth_percent="0.5"
-                app:layout_constraintHeight_percent="1"
-                style="@style/auto_text_size"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                android:text="@{data.filterName}"
-                android:textColor="@color/javashop_color_goods_search_filter_frag_parent_item_tc"
-                />
-            <ImageView
-                android:id="@+id/goods_search_filter_frag_parent_iv"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                app:layout_constraintHeight_percent="1"
-                app:layout_constraintDimensionRatio="w,1:1"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                android:src="@{data.openFlag.get() ? @drawable/javashop_icon_up :@drawable/javashop_icon_down}"
-                />
-            <TextView
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:id="@+id/goods_search_filter_frag_parent_select_value_tv"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintRight_toLeftOf="@id/goods_search_filter_frag_parent_iv"
-                app:layout_constraintHeight_percent="1"
-                android:text="@{data.selectedValueObser.get() != null ? data.selectedValueObser.get().name : @string/javashop_goods_filter_all}"
-                app:layout_constraintWidth_percent="0.35"
-                style="@style/auto_text_size"
-                app:autoSizeMaxTextSize="30sp"
-                app:autoSizeMinTextSize="1sp"
-                app:autoSizeStepGranularity="2sp"
-                app:autoSizeTextType="uniform"
-                tools:ignore="MissingPrefix"
-                android:gravity="right"
-                android:paddingRight="5dp"
-                android:textColor="@color/javashop_color_goods_search_filter_frag_parent_item_value_tc"
-                />
-        </android.support.constraint.ConstraintLayout>
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 177
goods/src/main/res/layout/goods_search_item_grid_lay.xml

@@ -1,177 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:tools="http://schemas.android.com/tools">
-    <data>
-        <import type="android.view.View"/>
-        <variable
-            name="data"
-            type="com.enation.javashop.android.middleware.model.GoodsItemViewModel"/>
-    </data>
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:app="http://schemas.android.com/apk/res-auto"
-        xmlns:bind="http://schemas.android.com/apk/res-auto"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        bind:backgroundColor="@{@color/javashop_color_white}"
-        bind:to_goods="@{data.goodsId}"
-        >
-        <android.support.constraint.ConstraintLayout
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            app:layout_constraintDimensionRatio="h,1:1.5"
-            android:padding="5dp"
-            >
-            <ImageView
-                android:id="@+id/goods_search_grid_item_iv"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintDimensionRatio="h,1:1"
-                android:background="#fff"
-                bind:url="@{data.goodsImage}"
-                android:scaleType="centerCrop"
-                />
-            <android.support.constraint.ConstraintLayout
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintRight_toRightOf="parent"
-                app:layout_constraintTop_toBottomOf="@id/goods_search_grid_item_iv"
-                app:layout_constraintBottom_toBottomOf="parent"
-                >
-                <com.enation.javashop.android.lib.widget.AutoSizeTextView
-                    android:id="@+id/goods_search_grid_item_name_tv"
-                    android:layout_width="match_parent"
-                    android:layout_height="0dp"
-                    android:lines="1"
-                    app:layout_constraintTop_toTopOf="parent"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintHeight_percent="0.2"
-                    android:text="@{data.goodsName}"
-                    android:ellipsize="end"
-                    android:textSize="28sp"
-                    android:textColor="@color/javashop_color_black"
-                    />
-                <android.support.constraint.ConstraintLayout
-                    app:layout_constraintTop_toBottomOf="@id/goods_search_grid_item_name_tv"
-                    android:id="@+id/goods_search_grid_item_tag_lay"
-                    android:layout_width="match_parent"
-                    android:layout_height="0dp"
-                    app:layout_constraintHeight_percent="0.25"
-                    >
-                    <LinearLayout
-                        android:layout_width="match_parent"
-                        android:layout_height="0dp"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintHeight_percent="0.9"
-                        android:orientation="horizontal"
-                        android:gravity="center_vertical"
-                        android:id="@+id/goods_search_grid_item_tag_content_lay"
-                        ></LinearLayout>
-                </android.support.constraint.ConstraintLayout>
-                <android.support.constraint.ConstraintLayout
-                    android:id="@+id/goods_search_grid_item_price_lay"
-                    android:layout_width="match_parent"
-                    android:layout_height="0dp"
-                    app:layout_constraintTop_toBottomOf="@id/goods_search_grid_item_tag_lay"
-                    app:layout_constraintHeight_percent="0.25"
-                    >
-                    <com.enation.javashop.android.lib.widget.AutoSizeTextView
-                        android:id="@+id/goods_search_grid_item_price_tv"
-                        android:layout_width="wrap_content"
-                        android:layout_height="match_parent"
-                        android:text="@{String.valueOf(data.goodsPrice)}"
-                        android:gravity="bottom"
-                        android:lines="1"
-                        app:price_type="true"
-                        android:textSize="20sp"
-                        android:textColor="@color/javashop_color_price_red"
-                        />
-                    <LinearLayout
-                        android:id="@+id/goods_search_grid_item_promotion_lay"
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintLeft_toRightOf="@id/goods_search_grid_item_price_tv"
-                        app:layout_constraintRight_toRightOf="parent"
-                        android:orientation="horizontal"
-                        android:gravity="center_vertical"
-                        >
-                    </LinearLayout>
-                </android.support.constraint.ConstraintLayout>
-                <android.support.constraint.ConstraintLayout
-                    android:layout_width="0dp"
-                    android:layout_height="0dp"
-                    app:layout_constraintTop_toBottomOf="@id/goods_search_grid_item_price_lay"
-                    app:layout_constraintLeft_toLeftOf="parent"
-                    app:layout_constraintRight_toRightOf="parent"
-                    app:layout_constraintHeight_percent="0.25"
-                    >
-                    <TextView
-                        android:id="@+id/goods_search_grid_item_self_tv"
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        app:layout_constraintHeight_percent="0.7"
-                        app:layout_constraintDimensionRatio="w,1.5:1"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        android:background="@drawable/javashop_goods_search_item_self_bg"
-                        android:text="自营"
-                        android:gravity="center"
-                        android:textColor="@color/javashop_color_goods_search_action_item_selected"
-                        style="@style/auto_text_size"
-                        app:autoSizeMaxTextSize="30sp"
-                        app:autoSizeMinTextSize="1sp"
-                        app:autoSizeStepGranularity="2sp"
-                        app:autoSizeTextType="uniform"
-                        tools:ignore="MissingPrefix"
-                        />
-                    <TextView
-                        android:id="@+id/goods_search_grid_item_comment_num_tv"
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        app:layout_constraintHeight_percent="0.8"
-                        app:layout_constraintWidth_percent="0.4"
-                        android:gravity="center_vertical"
-                        android:text="@{data.commentNum}"
-                        android:layout_marginLeft="5dp"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintLeft_toRightOf="@id/goods_search_grid_item_self_tv"
-                        style="@style/auto_text_size"
-                        app:autoSizeMaxTextSize="30sp"
-                        app:autoSizeMinTextSize="1sp"
-                        app:autoSizeStepGranularity="2sp"
-                        app:autoSizeTextType="uniform"
-                        tools:ignore="MissingPrefix"
-                        android:textColor="@color/javashop_color_goods_search_item_tc"
-                        />
-                    <TextView
-                        android:textColor="@color/javashop_color_goods_search_item_tc"
-                        android:id="@+id/goods_search_grid_item_comment_percent_tv"
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        app:layout_constraintWidth_percent="0.4"
-                        app:layout_constraintHeight_percent="0.8"
-                        android:gravity="right"
-                        android:text="@{data.feedbackRate}"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintRight_toRightOf="parent"
-                        style="@style/auto_text_size"
-                        app:autoSizeMaxTextSize="30sp"
-                        app:autoSizeMinTextSize="1sp"
-                        app:autoSizeStepGranularity="2sp"
-                        app:autoSizeTextType="uniform"
-                        tools:ignore="MissingPrefix"
-                        />
-                </android.support.constraint.ConstraintLayout>
-            </android.support.constraint.ConstraintLayout>
-        </android.support.constraint.ConstraintLayout>
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 202
goods/src/main/res/layout/goods_search_item_list_lay.xml

@@ -1,202 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:bind="http://schemas.android.com/tools">
-    <data>
-        <variable
-            name="data"
-            type="com.enation.javashop.android.middleware.model.GoodsItemViewModel"/>
-    </data>
-    <android.support.constraint.ConstraintLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        xmlns:tools="http://schemas.android.com/tools"
-        xmlns:app="http://schemas.android.com/apk/res-auto">
-        <android.support.constraint.ConstraintLayout
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintRight_toRightOf="parent"
-            app:layout_constraintWidth_default="percent"
-            android:layout_width="0dp"
-            android:layout_height="0dp"
-            app:layout_constraintWidth_percent="1"
-            app:layout_constraintDimensionRatio="h,2.8:1"
-            bind:backgroundColor="@{@color/javashop_color_white}"
-            bind:to_goods="@{data.goodsId}"
-            >
-            <ImageView
-                android:id="@+id/goods_search_item_list_iv"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintLeft_toLeftOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintVertical_bias="0"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                app:layout_constraintHeight_percent="0.95"
-                app:layout_constraintDimensionRatio="w,1:1"
-                android:scaleType="centerCrop"
-                bind:url="@{data.goodsImage}"
-                />
-            <android.support.constraint.ConstraintLayout
-                android:id="@+id/goods_search_item_list_right"
-                android:layout_width="0dp"
-                android:layout_height="0dp"
-                android:layout_marginLeft="10dp"
-                android:layout_marginRight="10dp"
-                app:layout_constraintHeight_percent="0.9"
-                app:layout_constraintTop_toTopOf="parent"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintLeft_toRightOf="@id/goods_search_item_list_iv"
-                app:layout_constraintRight_toRightOf="parent"
-                >
-                <com.enation.javashop.android.lib.widget.AutoSizeTextView
-                    android:id="@+id/goods_search_item_list_name_tv"
-                    android:layout_width="match_parent"
-                    android:layout_height="0dp"
-                    app:layout_constraintHeight_percent="0.40"
-                    android:lines="2"
-                    android:textColor="@color/javashop_color_black"
-                    android:ellipsize="end"
-                    android:textSize="20sp"
-                    android:text="@{data.goodsName}"
-                    />
-                <android.support.constraint.ConstraintLayout
-                    android:id="@+id/goods_search_item_list_tag_lay"
-                    android:layout_width="match_parent"
-                    android:layout_height="0dp"
-                    app:layout_constraintTop_toBottomOf="@id/goods_search_item_list_name_tv"
-                    app:layout_constraintHeight_percent="0.15"
-                    >
-                    <LinearLayout
-                        android:id="@+id/goods_search_item_list_tag_content_lay"
-                        android:layout_width="match_parent"
-                        android:layout_height="0dp"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintHeight_percent="0.9"
-                        android:gravity="center_vertical"
-                        android:orientation="horizontal"
-                        >
-                    </LinearLayout>
-                </android.support.constraint.ConstraintLayout>
-                <android.support.constraint.ConstraintLayout
-                    android:id="@+id/goods_search_list_item_price_lay"
-                    android:layout_width="match_parent"
-                    android:layout_height="0dp"
-                    app:layout_constraintTop_toBottomOf="@id/goods_search_item_list_tag_lay"
-                    app:layout_constraintHeight_percent="0.25"
-                    >
-                    <com.enation.javashop.android.lib.widget.AutoSizeTextView
-                        android:id="@+id/goods_search_list_item_price_tv"
-                        android:layout_width="wrap_content"
-                        android:layout_height="match_parent"
-                        android:text="@{String.valueOf(data.goodsPrice)}"
-                        android:gravity="bottom"
-                        android:lines="1"
-                        app:price_type="true"
-                        android:textSize="20sp"
-                        android:textColor="@color/javashop_color_price_red"
-                        />
-                    <LinearLayout
-                        android:id="@+id/goods_search_list_item_promotion_lay"
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintLeft_toRightOf="@id/goods_search_list_item_price_tv"
-                        app:layout_constraintRight_toRightOf="parent"
-                        android:orientation="horizontal"
-                        android:gravity="center_vertical"
-                        >
-                    </LinearLayout>
-                </android.support.constraint.ConstraintLayout>
-                <android.support.constraint.ConstraintLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="0dp"
-                    app:layout_constraintTop_toBottomOf="@id/goods_search_list_item_price_lay"
-                    app:layout_constraintHeight_percent="0.2"
-                    >
-                    <TextView
-                        android:id="@+id/goods_search_item_list_self_tv"
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        app:layout_constraintHeight_percent="0.75"
-                        app:layout_constraintDimensionRatio="w,1.5:1"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        android:background="@drawable/javashop_goods_search_item_self_bg"
-                        android:text="自营"
-                        android:gravity="center"
-                        android:textColor="@color/javashop_color_goods_search_action_item_selected"
-                        style="@style/auto_text_size"
-                        app:autoSizeMaxTextSize="30sp"
-                        app:autoSizeMinTextSize="1sp"
-                        app:autoSizeStepGranularity="2sp"
-                        app:autoSizeTextType="uniform"
-                        tools:ignore="MissingPrefix"
-                        />
-                    <TextView
-                        android:id="@+id/goods_search_item_list_comment_num_tv"
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        app:layout_constraintHeight_percent="0.75"
-                        app:layout_constraintWidth_percent="0.4"
-                        android:gravity="center_vertical"
-                        android:text="@{data.commentNum}"
-                        android:layout_marginLeft="5dp"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintLeft_toRightOf="@id/goods_search_item_list_self_tv"
-                        style="@style/auto_text_size"
-                        app:autoSizeMaxTextSize="30sp"
-                        app:autoSizeMinTextSize="1sp"
-                        app:autoSizeStepGranularity="2sp"
-                        app:autoSizeTextType="uniform"
-                        tools:ignore="MissingPrefix"
-                        android:textColor="@color/javashop_color_goods_search_item_tc"
-                        />
-                    <ImageView
-                        android:id="@+id/goods_search_item_list_add_cart_btn"
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        android:padding="5dp"
-                        app:layout_constraintHeight_percent="1"
-                        app:layout_constraintDimensionRatio="w,1:1"
-                        app:layout_constraintRight_toRightOf="parent"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        android:src="@drawable/javashop_icon_cart_small"
-                        android:background="@drawable/javashop_goods_search_item_add_cart_bg"
-                        />
-                    <TextView
-                        android:id="@+id/goods_search_item_list_comment_percent_tv"
-                        android:layout_width="0dp"
-                        android:layout_height="0dp"
-                        app:layout_constraintHeight_percent="0.75"
-                        android:gravity="right"
-                        android:text="@{data.feedbackRate}"
-                        app:layout_constraintTop_toTopOf="parent"
-                        app:layout_constraintBottom_toBottomOf="parent"
-                        app:layout_constraintRight_toLeftOf="@id/goods_search_item_list_add_cart_btn"
-                        app:layout_constraintLeft_toRightOf="@id/goods_search_item_list_comment_num_tv"
-                        style="@style/auto_text_size"
-                        app:autoSizeMaxTextSize="30sp"
-                        app:autoSizeMinTextSize="1sp"
-                        app:autoSizeStepGranularity="2sp"
-                        app:autoSizeTextType="uniform"
-                        tools:ignore="MissingPrefix"
-                        android:textColor="@color/javashop_color_goods_search_item_tc"
-                        android:paddingRight="5dp"
-                        />
-                </android.support.constraint.ConstraintLayout>
-            </android.support.constraint.ConstraintLayout>
-            <View
-                android:layout_width="0dp"
-                android:layout_height="1px"
-                app:layout_constraintBottom_toBottomOf="parent"
-                app:layout_constraintRight_toRightOf="@+id/goods_search_item_list_right"
-                app:layout_constraintLeft_toLeftOf="@+id/goods_search_item_list_right"
-                android:background="@color/javashop_color_line_gray"
-                />
-        </android.support.constraint.ConstraintLayout>
-    </android.support.constraint.ConstraintLayout>
-</layout>

+ 0 - 0
goods/src/main/res/layout/goods_search_more_action_dialog.xml


Някои файлове не бяха показани, защото твърде много файлове са промени