Commit 31277fae authored by mengcuiguang's avatar mengcuiguang

代码优化

parent b07b98a2
...@@ -10,7 +10,7 @@ object Constant { ...@@ -10,7 +10,7 @@ object Constant {
const val TAG_NAME = "SUN" const val TAG_NAME = "SUN"
const val MINTS_PKG_NAME = "com.mints.enjoyboxjia" const val MINTS_PKG_NAME = "com.mints.enjoyboxjia"
const val ACTION_EXIT_APP = "package.exit" const val ACTION_EXIT_APP = "package.exit"
const val MINTS_APP_NAME = "乐享宝盒" const val MINTS_APP_NAME = "趣无限"
const val FRAGMENT_CLICK_ONE = 0 const val FRAGMENT_CLICK_ONE = 0
const val FRAGMENT_CLICK_TWO = 1 const val FRAGMENT_CLICK_TWO = 1
const val FRAGMENT_CLICK_THREE = 2 const val FRAGMENT_CLICK_THREE = 2
......
...@@ -21,7 +21,7 @@ import org.json.JSONObject ...@@ -21,7 +21,7 @@ import org.json.JSONObject
object CsjAppLogManager { object CsjAppLogManager {
// 获取方式,穿山甲平台-Adspark-免费广告监测-应用管理创建 // 获取方式,穿山甲平台-Adspark-免费广告监测-应用管理创建
const val APP_LOG_ID = "622129" const val APP_LOG_ID = "644145"
fun init(application: Application) { fun init(application: Application) {
// 第一个参数APPID: 参考2.1节获取 // 第一个参数APPID: 参考2.1节获取
......
...@@ -18,7 +18,7 @@ public class BookBean implements Serializable { ...@@ -18,7 +18,7 @@ public class BookBean implements Serializable {
private int commentCount; private int commentCount;
private int likeCount; private int likeCount;
private int collectCount; private int collectCount;
private Boolean isCollect; private boolean isCollect;
private String commentContent; private String commentContent;
private String categoryName; private String categoryName;
private String categoryId; private String categoryId;
...@@ -157,6 +157,10 @@ public class BookBean implements Serializable { ...@@ -157,6 +157,10 @@ public class BookBean implements Serializable {
return isCollect; return isCollect;
} }
public void setIsCollect(boolean isCollect) {
this.isCollect = isCollect;
}
public Object getCommentContent() { public Object getCommentContent() {
return commentContent; return commentContent;
} }
......
...@@ -109,7 +109,7 @@ class SettingsActivity : BaseActivity(), View.OnClickListener { ...@@ -109,7 +109,7 @@ class SettingsActivity : BaseActivity(), View.OnClickListener {
item_wechat.findViewById<TextView>(R.id.tv_right).text = "未授权" item_wechat.findViewById<TextView>(R.id.tv_right).text = "未授权"
} }
item_invitedCode.findViewById<TextView>(R.id.tv_title).text = "乐享宝盒ID" item_invitedCode.findViewById<TextView>(R.id.tv_title).text = "趣无限ID"
val invitedCode = ContextCompat.getDrawable(this, R.mipmap.icon_settings_invite) val invitedCode = ContextCompat.getDrawable(this, R.mipmap.icon_settings_invite)
invitedCode?.setBounds(0, 0, 56, 56) invitedCode?.setBounds(0, 0, 56, 56)
item_invitedCode.findViewById<TextView>(R.id.tv_title) item_invitedCode.findViewById<TextView>(R.id.tv_title)
......
...@@ -45,8 +45,10 @@ class WatchRecordActivity : BaseActivity(), WatchRecordView { ...@@ -45,8 +45,10 @@ class WatchRecordActivity : BaseActivity(), WatchRecordView {
WatchRecordAdapter.OnItemCollectClickListener { WatchRecordAdapter.OnItemCollectClickListener {
override fun onItemCollectClick(bean: BookBean) { override fun onItemCollectClick(bean: BookBean) {
if (!bean.isCollect) { if (!bean.isCollect) {
bean.isCollect = true
watchRecordPresenter.collect(bean.id) watchRecordPresenter.collect(bean.id)
} else { } else {
bean.isCollect = false
watchRecordPresenter.cancelCollect(bean.id) watchRecordPresenter.cancelCollect(bean.id)
} }
mWatchRecordAdapter?.notifyDataSetChanged() mWatchRecordAdapter?.notifyDataSetChanged()
......
package com.mints.enjoyboxjia.ui.adapter package com.mints.enjoyboxjia.ui.adapter
import android.view.View import android.view.View
import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import com.airbnb.lottie.LottieAnimationView import com.airbnb.lottie.LottieAnimationView
import com.airbnb.lottie.LottieComposition import com.airbnb.lottie.LottieComposition
...@@ -18,15 +19,20 @@ class WatchRecordAdapter : ...@@ -18,15 +19,20 @@ class WatchRecordAdapter :
holder.getView<TextView>(R.id.tv_watch_title).text = item.title holder.getView<TextView>(R.id.tv_watch_title).text = item.title
holder.getView<TextView>(R.id.tv_watch_text).text = item.summary holder.getView<TextView>(R.id.tv_watch_text).text = item.summary
holder.getView<TextView>(R.id.tv_watch_user).text = item.author holder.getView<TextView>(R.id.tv_watch_user).text = "作者:" + item.author
if (item.isCollect) {
holder.getView<ImageView>(R.id.iv_collect).setImageResource(R.mipmap.home_collect_img_1)
} else {
holder.getView<ImageView>(R.id.iv_collect).setImageResource(R.mipmap.home_collect_img_0)
}
holder.getView<View>(R.id.ll_collect).setOnClickListener { holder.getView<View>(R.id.ll_collect).setOnClickListener {
if (!item.isCollect) { if (!item.isCollect) {
mOnItemCollectClickListener?.onItemCollectClick(item)
playCollectAnim(holder.getView(R.id.iv_collect)) playCollectAnim(holder.getView(R.id.iv_collect))
} else {
mOnItemCollectClickListener?.onItemCollectClick(item) mOnItemCollectClickListener?.onItemCollectClick(item)
} else {
playCancelCollectAnim(holder.getView(R.id.iv_collect)) playCancelCollectAnim(holder.getView(R.id.iv_collect))
mOnItemCollectClickListener?.onItemCollectClick(item)
} }
} }
} }
...@@ -63,7 +69,7 @@ class WatchRecordAdapter : ...@@ -63,7 +69,7 @@ class WatchRecordAdapter :
} }
interface OnItemCollectClickListener { interface OnItemCollectClickListener {
fun onItemCollectClick(bean:BookBean) fun onItemCollectClick(bean: BookBean)
} }
} }
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/white" android:background="#F9FAFB"
android:orientation="vertical"> android:orientation="vertical">
<include layout="@layout/header_layout" /> <include layout="@layout/header_layout" />
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:text="乐享宝盒自动续费协议" android:text="趣无限自动续费协议"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold"></TextView> android:textStyle="bold"></TextView>
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:layout_marginRight="26dp" android:layout_marginRight="26dp"
android:layout_marginBottom="30dp" android:layout_marginBottom="30dp"
android:text="乐享宝盒用于提供实时精准的定位服务" android:text="趣无限用于提供实时精准的定位服务"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:text="欢迎使用乐享宝盒" android:text="欢迎使用趣无限"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="18sp" android:textSize="18sp"
android:textStyle="bold" /> android:textStyle="bold" />
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
android:layout_marginLeft="16dp" android:layout_marginLeft="16dp"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginRight="16dp" android:layout_marginRight="16dp"
android:text="我们依据最新的法律,向您说明乐享宝盒软件的隐私政策,特向您推送本提示。请您阅读并充分理解相关条款。" android:text="我们依据最新的法律,向您说明趣无限软件的隐私政策,特向您推送本提示。请您阅读并充分理解相关条款。"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="14sp" /> android:textSize="14sp" />
......
...@@ -6,10 +6,11 @@ ...@@ -6,10 +6,11 @@
android:layout_margin="10dp" android:layout_margin="10dp"
android:background="@drawable/shape_bg_write" android:background="@drawable/shape_bg_write"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="8dp"> android:padding="10dp">
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:orientation="vertical"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"> android:layout_weight="1">
...@@ -30,6 +31,8 @@ ...@@ -30,6 +31,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:textColor="@color/gray" android:textColor="@color/gray"
android:maxLines="5"
android:ellipsize="end"
android:textSize="16sp" android:textSize="16sp"
tools:text="123123123" /> tools:text="123123123" />
......
This diff is collapsed.
...@@ -25,10 +25,10 @@ android.nonTransitiveRClass=true ...@@ -25,10 +25,10 @@ android.nonTransitiveRClass=true
DEBUG_URL="https://api.mints-id.com/camera-api/" DEBUG_URL="https://api.mints-id.com/camera-api/"
RELEASE_URL="https://api.mints-id.com/camera-api/" RELEASE_URL="https://api.mints-id.com/camera-api/"
RELEASE_KEY_PASSWORD=mintsenjoyboxjia RELEASE_KEY_PASSWORD=mintsinfinitefunjia
RELEASE_KEY_ALIAS=mints_enjoyboxjia RELEASE_KEY_ALIAS=mints_infinitefunjia
RELEASE_STORE_PASSWORD=mintsenjoyboxjia RELEASE_STORE_PASSWORD=mintsinfinitefunjia
RELEASE_STORE_FILE=mints_enjoyboxjia.jks RELEASE_STORE_FILE=mints_infinitefunjia.jks
#ShareSDK #ShareSDK
RELEASE_SHARESDK_KEY=396ef0a56a387 RELEASE_SHARESDK_KEY=396ef0a56a387
...@@ -49,8 +49,8 @@ RELEASE_UMENG_KEY=65fbd75dcac2a664de0a755b ...@@ -49,8 +49,8 @@ RELEASE_UMENG_KEY=65fbd75dcac2a664de0a755b
RELEASE_TALKING_DATA_KEY="5D38F8DE90314DDC8D4375E0D1CCEF15" RELEASE_TALKING_DATA_KEY="5D38F8DE90314DDC8D4375E0D1CCEF15"
#Gromore #Gromore
GROMORE_APP_ID="54712345" GROMORE_APP_ID="5599044"
GROMORE_SPLASH_CODE="102721234" GROMORE_SPLASH_CODE="103104878"
GROMORE_VIDEO_CODE="102721234" GROMORE_VIDEO_CODE="102721234"
GROMORE_EXPRESS_CODE="102721234" GROMORE_EXPRESS_CODE="102721234"
GROMORE_MY_EXPRESS_CODE="102721234" GROMORE_MY_EXPRESS_CODE="102721234"
......
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