Bläddra i källkod

1.适配android12。

shihuiyun 2 år sedan
förälder
incheckning
51e4cbb05d

+ 13 - 0
app/src/main/java/com/hdl/xl/activity/LotsDetailsActivity.kt

@@ -71,9 +71,22 @@ class LotsDetailsActivity : MBActivity<LotsDetailsVModel, ActivityLotsDetailsBin
 
         vm.ll = binding.ll
          vm.id = intent?.extras?.getString("id")
+        vm.getCirculation()
         vm.getInfoTo()
         vm.getCertificate()
 
+        vm.turnoverSwitch.observe(this){
+            if(null!=it){
+                if(it.equals("1")){//开启
+                    binding.llCirculation.visibility=View.VISIBLE
+                }
+                if(it.equals("0")){//关闭
+                    binding.llCirculation.visibility=View.GONE
+
+                }
+            }
+        }
+
         vm.data.observe(this) {
 
             //设置详情图片

+ 15 - 0
app/src/main/java/com/hdl/xl/activity/TibetanDetailsActivity.kt

@@ -84,11 +84,26 @@ class TibetanDetailsActivity : MBActivity<TibetanDetailsVModel, ActivityTibetanD
 //
 //        }else {
         vm.id = intent?.extras?.getString("id")
+        //获取系统配置
+        vm.getCirculation()
         vm.getInfoTo()
 
+
 //        }
         vm.getCertificate()
 
+        vm.turnoverSwitch.observe(this){
+            if(null!=it){
+                if(it.equals("1")){//开启
+                    binding.llCirculation.visibility=View.VISIBLE
+                }
+                if(it.equals("0")){//关闭
+                    binding.llCirculation.visibility=View.GONE
+
+                }
+            }
+        }
+
         vm.data.observe(this) {
 
             //设置详情图片

+ 2 - 1
app/src/main/java/com/hdl/xl/model/ArticleInfo.kt

@@ -7,6 +7,7 @@ import com.ysnows.base.inter.IModel
  *on 2020/9/28
  * secondary_sell_switch: 1开启 0关闭
  * withdraw_switch:提现开关:1开启 0关闭
+ * turnover_switch:流通量开关: 1开始 0关闭
  */
 class ArticleInfo(
                  var about_us:String, var agreement:String, var android_package:String,
@@ -14,7 +15,7 @@ class ArticleInfo(
                  var free_lucky_number:String, var invited_switch:String, var ios_package:String,
                  var poster:String, var privacy:String, var registration_agreement:String,
                  var secondary_sell_switch:String,
-                 var withdraw_switch:String,
+                 var withdraw_switch:String,var turnover_switch:String,
 
                  var service:String,var platform_agreement:String,
                  var content:String,

+ 1 - 4
app/src/main/java/com/hdl/xl/vmodel/LoginVModel.kt

@@ -76,10 +76,7 @@ open class LoginVModel(application: Application) : BViewModel<BRepository>(appli
             val it = repository().lreq { NetEngine.service.getLogin(phone, passWord) }
             if (it.ok(true)) {
 
-                if(TextUtils.isEmpty(it.toString())){
-                    toast(it.msg)
-                    return@launch
-                }
+
                 Log.d("shy", it.data.toString())
                 MMKV.defaultMMKV().putString("token", it.data.toString())//保存
                // MMKV.defaultMMKV().putString("token", "test")//保存

+ 15 - 0
app/src/main/java/com/hdl/xl/vmodel/LotsDetailsVModel.kt

@@ -51,6 +51,9 @@ class LotsDetailsVModel(application: Application) : BViewModel<BRepository>(appl
     var  is_remind=MutableLiveData<Boolean>()
     //支付成功后是否显示弹框
     var myBean=MutableLiveData<MyOrderListDetail>()
+    //系统配置
+    var turnoverSwitch: MutableLiveData<String> = MutableLiveData()
+
 
 
 
@@ -215,6 +218,18 @@ class LotsDetailsVModel(application: Application) : BViewModel<BRepository>(appl
 
     }
 
+    fun getCirculation(){
+
+        viewModelScope.launch {
+
+            var it= repository().lreq {NetEngine.service.articleInfo()   }
+            if (it.ok()) {
+                turnoverSwitch.value=it.data()?.turnover_switch
+            }
+
+        }
+    }
+
 
     //设置购买提醒
     fun toBuyTime(){

+ 17 - 0
app/src/main/java/com/hdl/xl/vmodel/TibetanDetailsVModel.kt

@@ -11,6 +11,7 @@ import android.view.View
 import android.widget.LinearLayout
 import androidx.lifecycle.MutableLiveData
 import androidx.lifecycle.viewModelScope
+import com.hdl.xl.model.ArticleInfo
 import com.hdl.xl.model.MyOrderListDetail
 import com.hdl.xl.model.PayOrder
 import com.ysnows.base.base.BRepository
@@ -46,6 +47,10 @@ class TibetanDetailsVModel(application: Application) : BViewModel<BRepository>(a
     //支付成功后是否显示弹框
     var myBean=MutableLiveData<MyOrderListDetail>()
 
+    //系统配置
+    var turnoverSwitch: MutableLiveData<String> = MutableLiveData()
+
+
 
     fun toCopy(){
         if(TextUtils.isEmpty(link.value)){
@@ -64,6 +69,18 @@ class TibetanDetailsVModel(application: Application) : BViewModel<BRepository>(a
         (repository().context as Activity).finish()
     }
 
+    fun getCirculation(){
+
+        viewModelScope.launch {
+
+            var it= repository().lreq {NetEngine.service.articleInfo()   }
+            if (it.ok()) {
+                turnoverSwitch.value=it.data()?.turnover_switch
+            }
+
+        }
+    }
+
     fun getInfoTo(){
         viewModelScope.launch {
             var it=repository().preq { NetEngine.service.CollectionDetail(id) }

+ 198 - 189
app/src/main/res/layout/activity_lots_details.xml

@@ -67,17 +67,17 @@
                                 android:layout_width="match_parent"
                                 android:layout_height="305dp"
                                 android:scaleType="centerCrop"
+                                android:src="@drawable/bg_need_error"
                                 app:qmui_border_color="@color/translucent"
-                                app:qmui_corner_radius="20dp"
-                                android:src="@drawable/bg_need_error" />
+                                app:qmui_corner_radius="20dp" />
 
                             <!--视频-->
                             <FrameLayout
                                 android:id="@+id/fl_video"
                                 android:layout_width="match_parent"
                                 android:layout_height="305dp"
-                                android:visibility="gone"
                                 android:layout_gravity="center"
+                                android:visibility="gone"
                                 tools:visibility="visible">
 
                                 <com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
@@ -89,35 +89,34 @@
                             </FrameLayout>
 
 
-
                             <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
                                 android:layout_width="100dp"
-                                app:qmui_radius="17dp"
+                                android:layout_height="34dp"
+                                android:layout_gravity="bottom|right"
+                                android:layout_marginEnd="10dp"
+                                android:layout_marginBottom="10dp"
                                 android:onClick="@{v->vm.toLookRoster()}"
-                                app:qmui_borderColor="@color/translucent"
-                                app:qmui_backgroundColor="#66000000"
-                                android:textColor="@color/white"
-                                android:visibility="@{vm.toShowMing(vm.data.sell_time)}"
                                 android:text="查看中签名单"
+                                android:textColor="@color/white"
                                 android:textSize="13sp"
-                                android:layout_gravity="bottom|right"
-                                android:layout_marginBottom="10dp"
-                                android:layout_marginEnd="10dp"
-                                android:layout_height="34dp"/>
+                                android:visibility="@{vm.toShowMing(vm.data.sell_time)}"
+                                app:qmui_backgroundColor="#66000000"
+                                app:qmui_borderColor="@color/translucent"
+                                app:qmui_radius="17dp" />
 
 
                         </FrameLayout>
 
                         <LinearLayout
                             android:layout_width="match_parent"
-                            android:orientation="horizontal"
+                            android:layout_height="wrap_content"
                             android:layout_marginTop="16dp"
-                            android:layout_height="wrap_content">
+                            android:orientation="horizontal">
 
                             <TextView
                                 android:layout_width="0dp"
-                                android:layout_weight="1"
                                 android:layout_height="wrap_content"
+                                android:layout_weight="1"
                                 android:text="@{vm.data.name}"
                                 android:textColor="@color/white"
                                 android:textSize="22sp"
@@ -125,21 +124,22 @@
 
                             <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
                                 android:layout_width="wrap_content"
-                                app:qmui_borderWidth="@dimen/dp_1"
-                                app:qmui_radius="2dp"
-                                app:qmui_borderColor="#999999"
+                                android:layout_height="wrap_content"
                                 android:onClick="@{v->vm.toLookPeople()}"
                                 android:paddingStart="7dp"
-                                android:paddingEnd="7dp"
                                 android:paddingTop="2dp"
+                                android:paddingEnd="7dp"
                                 android:paddingBottom="@dimen/dp_2"
-                                android:layout_height="wrap_content">
+                                app:qmui_borderColor="#999999"
+                                app:qmui_borderWidth="@dimen/dp_1"
+                                app:qmui_radius="2dp">
+
                                 <TextView
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
                                     android:text="@{vm.data.all_apply+`人参与`}"
-                                    android:textSize="12sp"
                                     android:textColor="@color/white"
-                                    android:layout_width="wrap_content"
-                                    android:layout_height="wrap_content"/>
+                                    android:textSize="12sp" />
 
                             </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
 
@@ -150,8 +150,7 @@
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
                             android:layout_gravity="center_horizontal"
-                            android:layout_marginTop="10dp"
-                           >
+                            android:layout_marginTop="10dp">
 
 
                             <TextView
@@ -171,8 +170,8 @@
                                 android:layout_height="wrap_content"
                                 android:layout_marginEnd="12dp"
                                 android:background="@drawable/bg_kuang_blue"
-                                android:hint="100份"
                                 android:gravity="center"
+                                android:hint="100份"
                                 android:paddingStart="2dp"
                                 android:paddingTop="2dp"
                                 android:paddingEnd="2dp"
@@ -182,34 +181,44 @@
                                 android:textColorHint="#54D7E9"
                                 android:textSize="@dimen/dp_10" />
 
-                            <TextView
-                                android:layout_width="wrap_content"
-                                android:layout_height="wrap_content"
-                                android:background="@drawable/bg_three_but"
-                                android:paddingStart="2dp"
-                                android:paddingTop="2dp"
-                                android:paddingEnd="2dp"
-                                android:paddingBottom="2dp"
-                                android:text="流通量"
-                                android:textColor="#333333"
-                                android:textSize="10sp" />
 
-                            <TextView
+                            <LinearLayout
+                                android:id="@+id/ll_circulation"
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
-                                android:layout_marginEnd="12dp"
-                                android:background="@drawable/bg_kuang_blue"
-                                android:hint="100份"
-                                android:gravity="center"
+                                android:orientation="horizontal">
+
+
+                                <TextView
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:background="@drawable/bg_three_but"
+                                    android:paddingStart="2dp"
+                                    android:paddingTop="2dp"
+                                    android:paddingEnd="2dp"
+                                    android:paddingBottom="2dp"
+                                    android:text="流通量"
+                                    android:textColor="#333333"
+                                    android:textSize="10sp" />
+
+                                <TextView
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:layout_marginEnd="12dp"
+                                    android:background="@drawable/bg_kuang_blue"
+                                    android:gravity="center"
+                                    android:hint="100份"
+                                    android:paddingStart="2dp"
+                                    android:paddingTop="2dp"
+                                    android:paddingEnd="2dp"
+                                    android:paddingBottom="2dp"
+                                    android:text="@{vm.data.circulate_num+`份`}"
+                                    android:textColor="#54D7E9"
+                                    android:textColorHint="#54D7E9"
+                                    android:textSize="@dimen/dp_10" />
+
+                            </LinearLayout>
 
-                                android:paddingStart="2dp"
-                                android:paddingTop="2dp"
-                                android:paddingEnd="2dp"
-                                android:paddingBottom="2dp"
-                                android:text="@{vm.data.circulate_num+`份`}"
-                                android:textColor="#54D7E9"
-                                android:textColorHint="#54D7E9"
-                                android:textSize="@dimen/dp_10" />
 
                             <TextView
                                 android:layout_width="wrap_content"
@@ -227,8 +236,8 @@
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
                                 android:background="@drawable/bg_kuang_blue"
-                                android:hint="100份"
                                 android:gravity="center"
+                                android:hint="100份"
                                 android:paddingStart="2dp"
                                 android:paddingTop="2dp"
                                 android:paddingEnd="2dp"
@@ -242,58 +251,59 @@
 
                         <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
                             android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
                             android:layout_marginTop="20dp"
-                            app:qmui_borderColor="@color/white"
-                            app:qmui_backgroundColor="#B3444444"
-                            app:qmui_radius="3dp"
                             android:paddingStart="10dp"
                             android:paddingEnd="10dp"
-                            android:layout_height="wrap_content">
-                            
+                            app:qmui_backgroundColor="#B3444444"
+                            app:qmui_borderColor="@color/white"
+                            app:qmui_radius="3dp">
+
                             <ImageView
-                                android:src="@drawable/ct_jilu"
                                 android:layout_width="14dp"
-                                android:layout_height="14dp"/>
+                                android:layout_height="14dp"
+                                android:src="@drawable/ct_jilu" />
+
                             <TextView
-                                android:text="@{`报名:`+vm.data.apply_st+`至`+vm.data.apply_end}"
-                                android:textSize="10sp"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
                                 android:layout_marginStart="5dp"
+                                android:text="@{`报名:`+vm.data.apply_st+`至`+vm.data.apply_end}"
                                 android:textColor="@color/white"
-                                android:layout_width="wrap_content"
-                                android:layout_height="wrap_content"/>
+                                android:textSize="10sp" />
 
 
                         </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
 
                         <LinearLayout
                             android:layout_width="match_parent"
-                            android:orientation="horizontal"
+                            android:layout_height="wrap_content"
                             android:layout_marginTop="23dp"
-                            android:visibility="@{vm.toShowCode(vm.data.has_apply)}"
                             android:gravity="center_vertical"
-                            android:layout_height="wrap_content">
+                            android:orientation="horizontal"
+                            android:visibility="@{vm.toShowCode(vm.data.has_apply)}">
 
                             <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
                                 android:text="我的序列"
-                                android:textSize="14sp"
                                 android:textColor="#FFFFFF"
-                                android:layout_width="wrap_content"
-                                android:layout_height="wrap_content"/>
+                                android:textSize="14sp" />
 
                             <LinearLayout
                                 android:layout_width="150dp"
-                                android:orientation="horizontal"
-                                android:background="@drawable/ct_xu"
+                                android:layout_height="38dp"
                                 android:layout_marginStart="15dp"
+                                android:background="@drawable/ct_xu"
                                 android:gravity="center"
-                                android:layout_height="38dp">
+                                android:orientation="horizontal">
 
                                 <TextView
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
                                     android:text="@{vm.data.apply_code}"
                                     android:textColor="#141414"
-                                    android:textSize="20sp"
-                                    android:layout_width="wrap_content"
-                                    android:layout_height="wrap_content"/>
+                                    android:textSize="20sp" />
 
                             </LinearLayout>
 
@@ -301,7 +311,6 @@
                         </LinearLayout>
 
 
-
                     </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
 
 
@@ -378,8 +387,7 @@
                             android:layout_height="wrap_content"
                             android:layout_marginTop="14dp"
                             android:gravity="center_vertical"
-                            android:orientation="horizontal"
-                           >
+                            android:orientation="horizontal">
 
                             <TextView
                                 android:layout_width="wrap_content"
@@ -394,10 +402,10 @@
                                 android:layout_marginStart="12dp"
                                 android:layout_marginEnd="6dp"
                                 android:layout_weight="1"
+                                android:ellipsize="end"
                                 android:gravity="right"
-                                android:text="@{vm.link}"
                                 android:singleLine="true"
-                                android:ellipsize="end"
+                                android:text="@{vm.link}"
                                 android:textColor="@color/white"
                                 android:textSize="13sp" />
 
@@ -458,17 +466,17 @@
 
                         <LinearLayout
                             android:layout_width="match_parent"
-                            android:orientation="vertical"
+                            android:layout_height="wrap_content"
                             android:layout_marginTop="14dp"
-                            android:layout_height="wrap_content">
+                            android:orientation="vertical">
 
 
-                           <androidx.recyclerview.widget.RecyclerView
-                            android:id="@+id/recycler_view"
-                            android:layout_width="match_parent"
-                            android:layout_height="wrap_content"
-                            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
-                            tools:listitem="@layout/item_images" />
+                            <androidx.recyclerview.widget.RecyclerView
+                                android:id="@+id/recycler_view"
+                                android:layout_width="match_parent"
+                                android:layout_height="wrap_content"
+                                app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
+                                tools:listitem="@layout/item_images" />
 
                         </LinearLayout>
 
@@ -740,7 +748,7 @@
 
                     <View
                         android:layout_width="match_parent"
-                        android:layout_height="30dp"/>
+                        android:layout_height="30dp" />
 
                 </LinearLayout>
 
@@ -750,6 +758,7 @@
             <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
                 android:id="@+id/qmll_one"
                 android:layout_width="match_parent"
+                android:layout_height="44dp"
                 android:layout_marginStart="15dp"
                 android:layout_marginEnd="15dp"
                 android:gravity="center"
@@ -757,26 +766,28 @@
                 app:qmui_backgroundColor="#4D000000"
                 app:qmui_borderColor="#979797"
                 app:qmui_borderWidth="@dimen/dp_1"
-                app:qmui_radius="22dp"
-                android:layout_height="44dp">
+                app:qmui_radius="22dp">
+
                 <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
                     android:text="中签公布时间:"
                     android:textColor="@color/white"
-                    android:textSize="16sp"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"/>
+                    android:textSize="16sp" />
+
                 <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
                     android:text="@{vm.data.sell_time}"
                     android:textColor="#39C0FB"
-                    android:textSize="16sp"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"/>
+                    android:textSize="16sp" />
 
             </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
 
 
             <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
                 android:layout_width="match_parent"
+                android:layout_height="44dp"
                 android:layout_marginStart="15dp"
                 android:layout_marginEnd="15dp"
                 android:gravity="center"
@@ -784,41 +795,43 @@
                 app:qmui_backgroundColor="#4D000000"
                 app:qmui_borderColor="#979797"
                 app:qmui_borderWidth="@dimen/dp_1"
-                app:qmui_radius="22dp"
-                android:layout_height="44dp">
+                app:qmui_radius="22dp">
+
                 <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
                     android:text="中签公布时间:"
                     android:textColor="@color/white"
-                    android:textSize="16sp"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"/>
+                    android:textSize="16sp" />
+
                 <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
                     android:text="@{vm.data.sell_time}"
                     android:textColor="#39C0FB"
-                    android:textSize="16sp"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"/>
+                    android:textSize="16sp" />
 
             </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
 
             <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
                 android:id="@+id/qmll_two"
                 android:layout_width="match_parent"
+                android:layout_height="44dp"
                 android:layout_marginStart="15dp"
                 android:layout_marginEnd="15dp"
-                android:visibility="@{vm.isShowTopThree(vm.data.sell_time,vm.data.ballot_status)}"
                 android:gravity="center"
+                android:visibility="@{vm.isShowTopThree(vm.data.sell_time,vm.data.ballot_status)}"
                 app:qmui_backgroundColor="#4D000000"
                 app:qmui_borderColor="#979797"
                 app:qmui_borderWidth="@dimen/dp_1"
-                app:qmui_radius="22dp"
-                android:layout_height="44dp">
+                app:qmui_radius="22dp">
+
                 <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
                     android:text="未中签"
                     android:textColor="#999999"
-                    android:textSize="16sp"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"/>
+                    android:textSize="16sp" />
 
 
             </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
@@ -826,28 +839,30 @@
             <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
                 android:id="@+id/qmll_three"
                 android:layout_width="match_parent"
+                android:layout_height="44dp"
                 android:layout_marginStart="15dp"
                 android:layout_marginEnd="15dp"
-                android:visibility="@{vm.isShowTopFour(vm.data.sell_time,vm.data.ballot_status)}"
                 android:gravity="center"
+                android:visibility="@{vm.isShowTopFour(vm.data.sell_time,vm.data.ballot_status)}"
                 app:qmui_backgroundColor="#4D000000"
                 app:qmui_borderColor="#979797"
                 app:qmui_borderWidth="@dimen/dp_1"
-                app:qmui_radius="22dp"
-                android:layout_height="44dp">
+                app:qmui_radius="22dp">
+
                 <TextView
                     android:id="@+id/tv_get_gift"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
                     android:text="恭喜!您已中签"
                     android:textColor="#999999"
-                    android:textSize="16sp"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"/>
+                    android:textSize="16sp" />
 
 
             </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
 
             <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
                 android:layout_width="match_parent"
+                android:layout_height="44dp"
                 android:layout_marginStart="15dp"
                 android:layout_marginEnd="15dp"
                 android:gravity="center"
@@ -855,14 +870,14 @@
                 app:qmui_backgroundColor="#4D000000"
                 app:qmui_borderColor="#979797"
                 app:qmui_borderWidth="@dimen/dp_1"
-                app:qmui_radius="22dp"
-                android:layout_height="44dp">
+                app:qmui_radius="22dp">
+
                 <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
                     android:text="未参与抽签"
                     android:textColor="#999999"
-                    android:textSize="16sp"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"/>
+                    android:textSize="16sp" />
 
 
             </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
@@ -882,8 +897,8 @@
             <TextView
                 android:layout_width="0dp"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="14dp"
                 android:layout_marginStart="16dp"
+                android:layout_marginTop="14dp"
                 android:layout_weight="1"
                 android:text="@{`¥`+vm.data.price}"
                 android:textColor="@color/white"
@@ -908,15 +923,14 @@
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="81dp"
-            android:visibility="@{vm.isHasApply(vm.data.has_apply,vm.data.sell_time,vm.data.apply_st)}"
             android:orientation="horizontal"
-            >
+            android:visibility="@{vm.isHasApply(vm.data.has_apply,vm.data.sell_time,vm.data.apply_st)}">
 
             <TextView
                 android:layout_width="0dp"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="14dp"
                 android:layout_marginStart="16dp"
+                android:layout_marginTop="14dp"
                 android:layout_weight="1"
                 android:text="@{`¥`+vm.data.price}"
                 android:textColor="@color/white"
@@ -927,8 +941,8 @@
                 android:layout_width="180dp"
                 android:layout_height="40dp"
                 android:layout_marginStart="25dp"
-                android:layout_marginEnd="25dp"
                 android:layout_marginTop="6dp"
+                android:layout_marginEnd="25dp"
                 android:text="参与成功"
                 android:textColor="@color/white"
                 android:textSize="16sp"
@@ -942,15 +956,14 @@
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="81dp"
-            android:visibility="@{vm.isShowEnd(vm.data.sell_time,vm.data.has_apply,vm.data.ballot_status)}"
             android:orientation="horizontal"
-            >
+            android:visibility="@{vm.isShowEnd(vm.data.sell_time,vm.data.has_apply,vm.data.ballot_status)}">
 
             <TextView
                 android:layout_width="0dp"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="14dp"
                 android:layout_marginStart="16dp"
+                android:layout_marginTop="14dp"
                 android:layout_weight="1"
                 android:text="@{`¥`+vm.data.price}"
                 android:textColor="@color/white"
@@ -961,8 +974,8 @@
                 android:layout_width="180dp"
                 android:layout_height="40dp"
                 android:layout_marginStart="25dp"
-                android:layout_marginEnd="25dp"
                 android:layout_marginTop="6dp"
+                android:layout_marginEnd="25dp"
                 android:text="已结束"
                 android:textColor="@color/white"
                 android:textSize="16sp"
@@ -977,25 +990,25 @@
 
         <LinearLayout
             android:layout_width="match_parent"
+            android:layout_height="wrap_content"
             android:orientation="vertical"
-            android:visibility="@{vm.isShowStart(vm.data.apply_st,vm.data.sell_time)}"
-            android:layout_height="wrap_content">
+            android:visibility="@{vm.isShowStart(vm.data.apply_st,vm.data.sell_time)}">
 
 
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="91dp"
                 android:layout_marginBottom="10dp"
-                android:visibility="@{vm.is_remind?View.GONE:View.VISIBLE}"
                 android:orientation="horizontal"
+                android:visibility="@{vm.is_remind?View.GONE:View.VISIBLE}"
                 tools:visibility="visible">
 
                 <TextView
                     android:layout_width="0dp"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="14dp"
-
                     android:layout_marginStart="16dp"
+
+                    android:layout_marginTop="14dp"
                     android:layout_weight="1"
                     android:text="@{`¥`+vm.data.price}"
                     android:textColor="@color/white"
@@ -1007,9 +1020,9 @@
                     android:layout_height="40dp"
                     android:layout_marginTop="8dp"
                     android:layout_marginEnd="25dp"
-                    android:onClick="@{v->vm.toBuyTime()}"
                     android:background="@drawable/bg_logo_but"
                     android:gravity="center"
+                    android:onClick="@{v->vm.toBuyTime()}"
                     android:orientation="vertical">
 
                     <TextView
@@ -1037,13 +1050,13 @@
                 android:layout_height="91dp"
                 android:layout_marginBottom="10dp"
                 android:orientation="horizontal"
-                android:visibility="@{vm.is_remind?View.VISIBLE:View.GONE}"
-                >
+                android:visibility="@{vm.is_remind?View.VISIBLE:View.GONE}">
+
                 <TextView
                     android:layout_width="0dp"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="14dp"
                     android:layout_marginStart="16dp"
+                    android:layout_marginTop="14dp"
                     android:layout_weight="1"
                     android:text="@{`¥`+vm.data.price}"
                     android:textColor="@color/white"
@@ -1078,38 +1091,38 @@
 
             </LinearLayout>
 
-<!--            <LinearLayout-->
-<!--                android:layout_width="match_parent"-->
-<!--                android:layout_height="81dp"-->
-<!--                android:visibility="@{vm.isShowStart(vm.data.apply_st,vm.data.sell_time)}"-->
-<!--                android:orientation="horizontal"-->
-<!--                >-->
-
-<!--                <TextView-->
-<!--                    android:layout_width="0dp"-->
-<!--                    android:layout_height="wrap_content"-->
-<!--                    android:layout_marginTop="14dp"-->
-<!--                    android:layout_marginStart="16dp"-->
-<!--                    android:layout_weight="1"-->
-<!--                    android:text="@{`¥`+vm.data.price}"-->
-<!--                    android:textColor="@color/white"-->
-<!--                    android:textSize="30sp" />-->
-
-
-<!--                <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton-->
-<!--                    android:layout_width="180dp"-->
-<!--                    android:layout_height="40dp"-->
-<!--                    android:layout_marginStart="25dp"-->
-<!--                    android:layout_marginEnd="25dp"-->
-<!--                    android:layout_marginTop="6dp"-->
-<!--                    android:text="未开始"-->
-<!--                    android:textColor="@color/white"-->
-<!--                    android:textSize="16sp"-->
-<!--                    app:qmui_backgroundColor="#666666"-->
-<!--                    app:qmui_borderColor="@color/translucent"-->
-<!--                    app:qmui_radius="14dp" />-->
-
-<!--            </LinearLayout>-->
+            <!--            <LinearLayout-->
+            <!--                android:layout_width="match_parent"-->
+            <!--                android:layout_height="81dp"-->
+            <!--                android:visibility="@{vm.isShowStart(vm.data.apply_st,vm.data.sell_time)}"-->
+            <!--                android:orientation="horizontal"-->
+            <!--                >-->
+
+            <!--                <TextView-->
+            <!--                    android:layout_width="0dp"-->
+            <!--                    android:layout_height="wrap_content"-->
+            <!--                    android:layout_marginTop="14dp"-->
+            <!--                    android:layout_marginStart="16dp"-->
+            <!--                    android:layout_weight="1"-->
+            <!--                    android:text="@{`¥`+vm.data.price}"-->
+            <!--                    android:textColor="@color/white"-->
+            <!--                    android:textSize="30sp" />-->
+
+
+            <!--                <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton-->
+            <!--                    android:layout_width="180dp"-->
+            <!--                    android:layout_height="40dp"-->
+            <!--                    android:layout_marginStart="25dp"-->
+            <!--                    android:layout_marginEnd="25dp"-->
+            <!--                    android:layout_marginTop="6dp"-->
+            <!--                    android:text="未开始"-->
+            <!--                    android:textColor="@color/white"-->
+            <!--                    android:textSize="16sp"-->
+            <!--                    app:qmui_backgroundColor="#666666"-->
+            <!--                    app:qmui_borderColor="@color/translucent"-->
+            <!--                    app:qmui_radius="14dp" />-->
+
+            <!--            </LinearLayout>-->
 
         </LinearLayout>
 
@@ -1125,8 +1138,8 @@
             <TextView
                 android:layout_width="0dp"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="14dp"
                 android:layout_marginStart="16dp"
+                android:layout_marginTop="14dp"
                 android:layout_weight="1"
                 android:text="@{`¥`+vm.data.price}"
                 android:textColor="@color/white"
@@ -1151,15 +1164,14 @@
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="81dp"
-            android:visibility="@{vm.isShowStop(vm.data.sell_time,vm.data.ballot_status,vm.data.now_inventory,vm.data.state)}"
             android:orientation="horizontal"
-            >
+            android:visibility="@{vm.isShowStop(vm.data.sell_time,vm.data.ballot_status,vm.data.now_inventory,vm.data.state)}">
 
             <TextView
                 android:layout_width="0dp"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="14dp"
                 android:layout_marginStart="16dp"
+                android:layout_marginTop="14dp"
                 android:layout_weight="1"
                 android:text="@{`¥`+vm.data.price}"
                 android:textColor="@color/white"
@@ -1170,8 +1182,8 @@
                 android:layout_width="180dp"
                 android:layout_height="40dp"
                 android:layout_marginStart="25dp"
-                android:layout_marginEnd="25dp"
                 android:layout_marginTop="6dp"
+                android:layout_marginEnd="25dp"
                 android:text="已售罄"
                 android:textColor="@color/white"
                 android:textSize="16sp"
@@ -1186,26 +1198,26 @@
 
         <LinearLayout
             android:layout_width="match_parent"
+            android:layout_height="wrap_content"
             android:orientation="vertical"
-            android:visibility="@{vm.isShowBuy(vm.data.sell_time,vm.data.ballot_status,vm.data.state)}"
-            android:layout_height="wrap_content">
+            android:visibility="@{vm.isShowBuy(vm.data.sell_time,vm.data.ballot_status,vm.data.state)}">
 
 
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="91dp"
                 android:layout_marginBottom="10dp"
-                android:visibility="@{vm.is_remind?View.GONE:View.VISIBLE}"
-
                 android:orientation="horizontal"
+
+                android:visibility="@{vm.is_remind?View.GONE:View.VISIBLE}"
                 tools:visibility="visible">
 
                 <TextView
                     android:layout_width="0dp"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="14dp"
-
                     android:layout_marginStart="16dp"
+
+                    android:layout_marginTop="14dp"
                     android:layout_weight="1"
                     android:text="@{`¥`+vm.data.price}"
                     android:textColor="@color/white"
@@ -1246,13 +1258,13 @@
                 android:layout_height="91dp"
                 android:layout_marginBottom="10dp"
                 android:orientation="horizontal"
-                android:visibility="@{vm.is_remind?View.VISIBLE:View.GONE}"
-                >
+                android:visibility="@{vm.is_remind?View.VISIBLE:View.GONE}">
+
                 <TextView
                     android:layout_width="0dp"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="14dp"
                     android:layout_marginStart="16dp"
+                    android:layout_marginTop="14dp"
                     android:layout_weight="1"
                     android:text="@{`¥`+vm.data.price}"
                     android:textColor="@color/white"
@@ -1290,8 +1302,5 @@
         </LinearLayout>
 
 
-
-
-
     </LinearLayout>
 </layout>

+ 34 - 27
app/src/main/res/layout/activity_tibetan_details.xml

@@ -71,8 +71,8 @@
                             android:id="@+id/fl_video"
                             android:layout_width="match_parent"
                             android:layout_height="305dp"
-                            android:visibility="gone"
                             android:layout_gravity="center"
+                            android:visibility="gone"
                             tools:visibility="visible">
 
                             <com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
@@ -81,7 +81,6 @@
                                 android:layout_height="match_parent" />
 
 
-
                         </FrameLayout>
 
 
@@ -133,33 +132,41 @@
                             android:textColorHint="#54D7E9"
                             android:textSize="@dimen/dp_10" />
 
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:background="@drawable/bg_three_but"
-                            android:paddingStart="2dp"
-                            android:paddingTop="2dp"
-                            android:paddingEnd="2dp"
-                            android:paddingBottom="2dp"
-                            android:text="流通量"
-                            android:textColor="#333333"
-                            android:textSize="10sp" />
-
-                        <TextView
+                        <LinearLayout
+                            android:id="@+id/ll_circulation"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:layout_marginEnd="12dp"
-                            android:background="@drawable/bg_kuang_blue"
-                            android:gravity="center"
-                            android:hint="100份"
-                            android:paddingStart="2dp"
-                            android:paddingTop="2dp"
-                            android:paddingEnd="2dp"
-                            android:paddingBottom="2dp"
-                            android:text="@{vm.data.circulate_num+`份`}"
-                            android:textColor="#54D7E9"
-                            android:textColorHint="#54D7E9"
-                            android:textSize="@dimen/dp_10" />
+                            android:orientation="horizontal">
+
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:background="@drawable/bg_three_but"
+                                android:paddingStart="2dp"
+                                android:paddingTop="2dp"
+                                android:paddingEnd="2dp"
+                                android:paddingBottom="2dp"
+                                android:text="流通量"
+                                android:textColor="#333333"
+                                android:textSize="10sp" />
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_marginEnd="12dp"
+                                android:background="@drawable/bg_kuang_blue"
+                                android:gravity="center"
+                                android:hint="100份"
+                                android:paddingStart="2dp"
+                                android:paddingTop="2dp"
+                                android:paddingEnd="2dp"
+                                android:paddingBottom="2dp"
+                                android:text="@{vm.data.circulate_num+`份`}"
+                                android:textColor="#54D7E9"
+                                android:textColorHint="#54D7E9"
+                                android:textSize="@dimen/dp_10" />
+                        </LinearLayout>
 
                         <TextView
                             android:layout_width="wrap_content"

+ 3 - 3
app/xiaomi/release/output-metadata.json

@@ -11,9 +11,9 @@
       "type": "SINGLE",
       "filters": [],
       "attributes": [],
-      "versionCode": 8,
-      "versionName": "1.0.7",
-      "outputFile": "xiaomi_1.0.7.apk"
+      "versionCode": 9,
+      "versionName": "1.0.8",
+      "outputFile": "xiaomi_1.0.8.apk"
     }
   ],
   "elementType": "File"

+ 22 - 0
update/src/main/java/com/ysnows/update/StormUpgradeActivity.java

@@ -1,5 +1,7 @@
 package com.ysnows.update;
 
+import android.view.KeyEvent;
+import android.view.View;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
@@ -26,10 +28,14 @@ public class StormUpgradeActivity extends UpgradeActivity {
     private TextView tvLeft;
     private LinearLayout buttonRight;
     private TextView tvRight;
+    private int updateType = 0;//升级策略 1建议 2强制 3手工
+
 
 
     @Override
     protected void initData() {
+        setFinishOnTouchOutside(false);
+
         /*获取下载任务,初始化界面信息*/
         updateBtn(Beta.getStrategyTask());
         tvVersion.setText(Beta.getUpgradeInfo().title + getString(R.string.version_online));
@@ -45,6 +51,10 @@ public class StormUpgradeActivity extends UpgradeActivity {
        // String time = times(String.valueOf(Beta.getUpgradeInfo().publishTime));
         tvUpdatetime.setText(getString(R.string.update_time) + time);
         tvUpdatecontent.setText(Beta.getUpgradeInfo().newFeature);
+        if (Beta.getUpgradeInfo().upgradeType == 2) {//强制
+            updateType = 2;
+            buttonLeft.setVisibility(View.GONE);
+        }
 
 
     }
@@ -140,4 +150,16 @@ public class StormUpgradeActivity extends UpgradeActivity {
         });
 
     }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        if (keyCode == KeyEvent.KEYCODE_BACK) {
+            if (updateType == 2) {//强制升级
+                return false;
+            }
+
+        }
+        return super.onKeyDown(keyCode, event);
+    }
+
 }