Commit 12f0fb8e authored by maxiaoliang's avatar maxiaoliang

1.6最终上线代码

parent 54780c49
...@@ -1016,6 +1016,7 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback { ...@@ -1016,6 +1016,7 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
Log.d("wxw", "云朵加速" + Utils.obj2Str(result)) Log.d("wxw", "云朵加速" + Utils.obj2Str(result))
// callback?.onCloudSpeedSuccess(true, Utils.obj2Str(result)) // callback?.onCloudSpeedSuccess(true, Utils.obj2Str(result))
callUnity("Form_land", "showCloudSpeedAnim", "") callUnity("Form_land", "showCloudSpeedAnim", "")
getListLandNew(2)
} }
override fun onFailure( override fun onFailure(
......
...@@ -51,7 +51,7 @@ class SpeedWaterTaskAdapter : ...@@ -51,7 +51,7 @@ class SpeedWaterTaskAdapter :
if (data?.awardRangeStart != null && data?.awardRangeEnd != null) { if (data?.awardRangeStart != null && data?.awardRangeEnd != null) {
holder.tvCount.text = "+${data?.awardRangeStart}~${data?.awardRangeEnd}" holder.tvCount.text = "+${data?.awardRangeStart}~${data?.awardRangeEnd}"
} else { } else {
holder.tvCount.text = "+${data.coins}" holder.tvCount.text = "+${data.coins} "
} }
if (!TextUtils.isEmpty(data.description)) { if (!TextUtils.isEmpty(data.description)) {
// holder.btnProgess.visibility = View.GONE // holder.btnProgess.visibility = View.GONE
...@@ -65,8 +65,10 @@ class SpeedWaterTaskAdapter : ...@@ -65,8 +65,10 @@ class SpeedWaterTaskAdapter :
} }
if (data?.adRenderStyle != null && data?.adRenderStyle == 1) { if (data?.adRenderStyle != null && data?.adRenderStyle == 1) {
holder?.rlbg.setBackgroundResource(R.drawable.withdraw_bg) holder?.rlbg.setBackgroundResource(R.drawable.withdraw_bg)
holder?.imglucky.visibility=View.GONE
} else if (data?.adRenderStyle != null && data?.adRenderStyle == 3) { } else if (data?.adRenderStyle != null && data?.adRenderStyle == 3) {
holder?.rlbg.setBackgroundResource(R.drawable.icon_luck_task) holder?.rlbg.setBackgroundResource(R.drawable.icon_luck_task)
holder?.imglucky.visibility=View.VISIBLE
} }
if (data?.buttonSway != null && data?.buttonSway == 1) { if (data?.buttonSway != null && data?.buttonSway == 1) {
...@@ -144,6 +146,7 @@ class SpeedWaterTaskAdapter : ...@@ -144,6 +146,7 @@ class SpeedWaterTaskAdapter :
val imgspeed: ImageView = itemView.findViewById(R.id.img_icon_item) val imgspeed: ImageView = itemView.findViewById(R.id.img_icon_item)
val layoutRoot: LinearLayout = itemView.findViewById(R.id.layout_watering_root) val layoutRoot: LinearLayout = itemView.findViewById(R.id.layout_watering_root)
val rlbg: RelativeLayout = itemView.findViewById(R.id.ll_one) val rlbg: RelativeLayout = itemView.findViewById(R.id.ll_one)
val imglucky: ImageView = itemView.findViewById(R.id.id_img_lucy)
} }
// 领取水滴 type:1每日领水 2高额领水 // 领取水滴 type:1每日领水 2高额领水
......
...@@ -4,6 +4,7 @@ import android.animation.ObjectAnimator ...@@ -4,6 +4,7 @@ import android.animation.ObjectAnimator
import android.animation.ValueAnimator import android.animation.ValueAnimator
import android.app.Activity import android.app.Activity
import android.text.TextUtils import android.text.TextUtils
import android.util.Log
import android.view.* import android.view.*
import android.widget.* import android.widget.*
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
...@@ -54,21 +55,24 @@ class WateringTaskAdpater : ...@@ -54,21 +55,24 @@ class WateringTaskAdpater :
holder.tvTitle.text = data.title holder.tvTitle.text = data.title
if (data?.awardRangeStart != null && data?.awardRangeEnd != null) { if (data?.awardRangeStart != null && data?.awardRangeEnd != null) {
holder.tvCount.text = "+${data?.awardRangeStart}~${data?.awardRangeEnd}" holder.tvCount.text = "+${data?.awardRangeStart}~${data?.awardRangeEnd}"
holder.llnum.gravity=Gravity.RIGHT
} else { } else {
holder.tvCount.text = "+${data.coins}" holder.tvCount.text = "+${data.coins} "
holder.llnum.gravity=Gravity.CENTER
} }
if (data?.adRenderStyle != null && data?.adRenderStyle == 1) { if (data?.adRenderStyle != null && data?.adRenderStyle == 1) {
holder?.rlbg.setBackgroundResource(R.drawable.withdraw_bg) holder?.rlbg.setBackgroundResource(R.drawable.withdraw_bg)
holder?.imglucky.visibility=View.GONE
} else if (data?.adRenderStyle != null && data?.adRenderStyle == 3) { } else if (data?.adRenderStyle != null && data?.adRenderStyle == 3) {
holder?.rlbg.setBackgroundResource(R.drawable.icon_luck_task) holder?.rlbg.setBackgroundResource(R.drawable.icon_luck_task)
holder?.imglucky.visibility=View.VISIBLE
} }
if (data?.buttonSway != null && data?.buttonSway == 1) { if (data?.buttonSway != null && data?.buttonSway == 1) {
startAnimator(holder?.ivStatus) startAnimator(holder?.ivStatus)
} else { } else {
holder?.ivStatus.clearAnimation() startAnimator2(holder?.ivStatus)
// holder?.ivStatus.clearAnimation()
} }
// if(data.opentype==1){ // if(data.opentype==1){
// holder.tvCount.text = "+${data.awardCoins}" // holder.tvCount.text = "+${data.awardCoins}"
...@@ -162,6 +166,7 @@ class WateringTaskAdpater : ...@@ -162,6 +166,7 @@ class WateringTaskAdpater :
val layoutRoot: LinearLayout = itemView.findViewById(R.id.layout_watering_root) val layoutRoot: LinearLayout = itemView.findViewById(R.id.layout_watering_root)
val rlbg: RelativeLayout = itemView.findViewById(R.id.ll_one) val rlbg: RelativeLayout = itemView.findViewById(R.id.ll_one)
val imglucky: ImageView = itemView.findViewById(R.id.id_img_lucy)
} }
...@@ -200,7 +205,17 @@ class WateringTaskAdpater : ...@@ -200,7 +205,17 @@ class WateringTaskAdpater :
animatorList.add(oa) animatorList.add(oa)
viewList.add(view) viewList.add(view)
} }
private fun startAnimator2(view: View) {
val oa: ObjectAnimator = ObjectAnimator.ofFloat(
view,
View.ROTATION,
0F, 0F
)
oa.repeatCount = ValueAnimator.INFINITE
oa.setDuration(1000).start()
animatorList.add(oa)
viewList.add(view)
}
fun clearAnimation() { fun clearAnimation() {
if (animatorList.size > 0) { if (animatorList.size > 0) {
for (animator in animatorList) { for (animator in animatorList) {
......
...@@ -53,15 +53,15 @@ class BaseApplication : BaseApplication() { ...@@ -53,15 +53,15 @@ class BaseApplication : BaseApplication() {
private var backToFrontTime: Long = 0 private var backToFrontTime: Long = 0
override fun onCreate() { override fun onCreate() {
super.onCreate() super.onCreate()
NetConfig.setBase_Url(NetConfig.Environment.DEV)// TODO 上线之后提成成 NetConfig.Environment.PRODUCT NetConfig.setBase_Url(NetConfig.Environment.PRODUCT)// TODO 上线之后提成成 NetConfig.Environment.PRODUCT
// NetConfig.BASE_FEED_URL="https://fsapi.ihuomao.com/" NetConfig.BASE_FEED_URL="https://fsapi.ihuomao.com/"
// NetConfig.BASE_AD_URL="https://bs.ihuomao.com/" NetConfig.BASE_AD_URL="https://bs.ihuomao.com/"
// NetConfig.URL_REPORT_BASE="http://report.ihuomao.com/" NetConfig.URL_REPORT_BASE="http://report.ihuomao.com/"
//TODO 上线去掉测试地址 //TODO 上线去掉测试地址
NetConfig.BASE_FEED_URL = "http://feedapitest2.zhangxinhulian.com/" // NetConfig.BASE_FEED_URL = "http://feedapitest2.zhangxinhulian.com/"
// Constant.appLs = "afcbef40e31631d3"//appls // Constant.appLs = "afcbef40e31631d3"//appls
AdManager.init(this,"afcbef40e31631d3") AdManager.init(this,"afcbef40e31631d3")
LogUtils.getConfig().logSwitch = true LogUtils.getConfig().logSwitch = true
......
...@@ -210,6 +210,7 @@ fun showAd(sId: Int) { ...@@ -210,6 +210,7 @@ fun showAd(sId: Int) {
} }
override fun taskListResult(result: TaskListEntity?) { override fun taskListResult(result: TaskListEntity?) {
//wateringTaskAdpater?.clearAnimation()
wateringTaskAdpater?.clear() wateringTaskAdpater?.clear()
wateringTaskAdpater?.appendToList(result?.userTask) wateringTaskAdpater?.appendToList(result?.userTask)
wateringTaskAdpater?.notifyDataSetChanged() wateringTaskAdpater?.notifyDataSetChanged()
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/icon_speed_all" android:state_pressed="false"/>
<item android:drawable="@drawable/icon_speed_all_press" android:state_pressed="true"/>
</selector>
\ No newline at end of file
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/dp_36" android:layout_marginBottom="@dimen/dp_36"
android:src="@drawable/icon_speed_all" /> android:src="@drawable/select_all_speed" />
<TextView <TextView
android:id="@+id/id_cloud_speed_num" android:id="@+id/id_cloud_speed_num"
......
...@@ -15,7 +15,13 @@ ...@@ -15,7 +15,13 @@
android:layout_marginLeft="@dimen/dp_12" android:layout_marginLeft="@dimen/dp_12"
android:layout_marginRight="@dimen/dp_12" android:layout_marginRight="@dimen/dp_12"
android:background="@drawable/withdraw_bg"> android:background="@drawable/withdraw_bg">
<ImageView
android:id="@+id/id_img_lucy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_lucky"
android:layout_marginTop="@dimen/dp_3"
android:layout_marginLeft="@dimen/dp_2"/>
<TextView <TextView
android:id="@+id/tv_watering_item_title" android:id="@+id/tv_watering_item_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -44,7 +50,7 @@ ...@@ -44,7 +50,7 @@
<LinearLayout <LinearLayout
android:id="@+id/id_ll_right" android:id="@+id/id_ll_right"
android:layout_width="@dimen/dp_100" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/dp_8" android:layout_marginTop="@dimen/dp_8"
...@@ -53,8 +59,8 @@ ...@@ -53,8 +59,8 @@
<ImageView <ImageView
android:id="@+id/img_icon_item" android:id="@+id/img_icon_item"
android:layout_width="@dimen/dp_18" android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_21" android:layout_height="@dimen/dp_24"
android:layout_marginRight="@dimen/dp_3" android:layout_marginRight="@dimen/dp_3"
android:src="@mipmap/icon_speed_get" /> android:src="@mipmap/icon_speed_get" />
......
...@@ -13,13 +13,19 @@ ...@@ -13,13 +13,19 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/icon_luck_task" android:background="@drawable/icon_luck_task"
android:orientation="vertical"> android:orientation="vertical">
<ImageView
android:id="@+id/id_img_lucy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_lucky"
android:layout_marginTop="@dimen/dp_3"
android:layout_marginLeft="@dimen/dp_2"/>
<TextView <TextView
android:id="@+id/tv_watering_item_title" android:id="@+id/tv_watering_item_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_13" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_24" android:layout_marginTop="@dimen/dp_22"
android:includeFontPadding="false" android:includeFontPadding="false"
android:text="浇水10次" android:text="浇水10次"
android:textColor="#642D2D" android:textColor="#642D2D"
...@@ -64,7 +70,7 @@ ...@@ -64,7 +70,7 @@
<LinearLayout <LinearLayout
android:id="@+id/id_ll_right" android:id="@+id/id_ll_right"
android:layout_width="@dimen/dp_100" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/dp_8" android:layout_marginTop="@dimen/dp_8"
...@@ -83,7 +89,7 @@ ...@@ -83,7 +89,7 @@
android:id="@+id/tv_watering_item_count" android:id="@+id/tv_watering_item_count"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="+40~100" android:text="+40"
android:textColor="#ED5430" android:textColor="#ED5430"
android:textSize="@dimen/sp_18" android:textSize="@dimen/sp_18"
android:textStyle="bold" /> android:textStyle="bold" />
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<dimen name="dp_2">2dp</dimen> <dimen name="dp_2">2dp</dimen>
<dimen name="dp_3">3dp</dimen> <dimen name="dp_3">3dp</dimen>
<dimen name="dp_4">4dp</dimen> <dimen name="dp_4">4dp</dimen>
<dimen name="dp_4.5">4.5dp</dimen>
<dimen name="dp_5">5dp</dimen> <dimen name="dp_5">5dp</dimen>
<dimen name="dp_6">6dp</dimen> <dimen name="dp_6">6dp</dimen>
<dimen name="dp_8">8dp</dimen> <dimen name="dp_8">8dp</dimen>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment