Commit e956d24f authored by mengcuiguang's avatar mengcuiguang

代码优化

parent a82ebcb6
......@@ -15,7 +15,7 @@ object Constant {
const val FIRST_SPLASH = "first_splash"
const val IS_FIRST_AGREE_BTN = "is_first_agree_btn"
const val TAG_NAME = "SUN"
const val MINTS_APP_NAME = "迷你短剧"
const val MINTS_APP_NAME = "超好看剧场"
const val MINTS_PKG_NAME = "com.duben.miniplaylet"
const val ACTION_EXIT_APP = "package.exit"
......@@ -58,8 +58,8 @@ object Constant {
const val GRO_MORE_ADTYPE6 = "6"
// 协议地址
var DRAWRULE_URL = "http://mints-web.mints-id.com/agreements/miniplaylet/txgz.html"//提现规则
var INCOME_URL = "http://mints-web.mints-id.com/agreements/miniplaylet/sysm.html"//收益说明
var REGISTER_URL = "http://mints-web.mints-id.com/agreements/miniplaylet/yhxy.html"//注册协议
var PRIVACY_URL = "http://mints-web.mints-id.com/agreements/miniplaylet/syzc.html"//隐私协议
var DRAWRULE_URL = "http://mints-web.mints-id.com/agreements/supertheater/txgz.html"//提现规则
var INCOME_URL = "http://mints-web.mints-id.com/agreements/supertheater/sysm.html"//收益说明
var REGISTER_URL = "http://mints-web.mints-id.com/agreements/supertheater/yhxy.html"//注册协议
var PRIVACY_URL = "http://mints-web.mints-id.com/agreements/supertheater/syzc.html"//隐私协议
}
\ No newline at end of file
......@@ -50,6 +50,7 @@ public class UserManager {
private static final String YUANBAO = "yuanbao";
private static final String REDPKG = "redPkg";
private static final String ALIPAYSET = "alipaySet";
private static final String NEW_FLAG = "new_flag";
public static UserManager getInstance() {
if (_inst != null) {
......@@ -97,6 +98,7 @@ public class UserManager {
ps.put(YUANBAO, user.getDiamonds());
ps.put(ALIPAYSET, user.isAlipaySet());
ps.put(CODE_ID, user.getIdcode());
ps.put(NEW_FLAG, user.getActiviteFlag()==1);
}
}
......@@ -240,6 +242,6 @@ public class UserManager {
if (ps == null) {
return false;
}
return ps.getBoolean("", false);
return ps.getBoolean(NEW_FLAG, false);
}
}
......@@ -40,6 +40,7 @@ public class UserBean implements Serializable {
private int diamonds;
private int coin;
private int activiteFlag=0;
private int rewardFirst;//是否弹出过领取奖励的框,0 没有, 1弹过了
private int rewardCoin;//领取奖励的金币
private boolean alipaySet;//支付宝授权状态
......@@ -58,6 +59,14 @@ public class UserBean implements Serializable {
return token;
}
public int getActiviteFlag() {
return activiteFlag;
}
public void setActiviteFlag(int activiteFlag) {
this.activiteFlag = activiteFlag;
}
public String getNickName() {
return nickName;
}
......
......@@ -54,7 +54,7 @@ class SettingsActivity : BaseActivity(), View.OnClickListener {
item_back.setOnClickListener(this)
item_phone.setOnClickListener(this)
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)
invitedCode?.setBounds(0, 0, 56, 56)
item_invitedCode.findViewById<TextView>(R.id.tv_title)
......
......@@ -225,9 +225,9 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
tv_cash.text = "18.88元"
// if (!isShowSignFlag) {
if (!isShowSignFlag) {
showSignDialog()
// }
}
}, 2000)
}, 300)
}
......@@ -348,19 +348,19 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
isShowNewuserFlag = true
showNewcomerDialog(user.userMsg.rewardCoin)
} else {
// iv_main_newcomer.visibility = View.VISIBLE
//
// Handler(Looper.getMainLooper()).postDelayed({
// if (!isAdded) return@postDelayed
//
// rope?.stop()
// rope = null
// rope = YoYo.with(Techniques.Pulse).duration(500).repeat(-1)
// .playOn(iv_main_newcomer)
// }, 300)
iv_main_newcomer.visibility = View.VISIBLE
Handler(Looper.getMainLooper()).postDelayed({
if (!isAdded) return@postDelayed
rope?.stop()
rope = null
rope = YoYo.with(Techniques.Pulse).duration(500).repeat(-1)
.playOn(iv_main_newcomer)
}, 300)
}
} else {
// iv_main_newcomer.visibility = View.GONE
iv_main_newcomer.visibility = View.GONE
}
......@@ -453,17 +453,17 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
when (v.id) {
R.id.tv_newcomer_time -> {
// newcomerDialog?.dismiss()
// iv_main_newcomer.visibility = View.VISIBLE
//
// Handler(Looper.getMainLooper()).postDelayed({
// if (!isAdded) return@postDelayed
//
// rope?.stop()
// rope = null
// rope = YoYo.with(Techniques.Pulse).duration(500).repeat(-1)
// .playOn(iv_main_newcomer)
// }, 300)
newcomerDialog?.dismiss()
iv_main_newcomer.visibility = View.VISIBLE
Handler(Looper.getMainLooper()).postDelayed({
if (!isAdded) return@postDelayed
rope?.stop()
rope = null
rope = YoYo.with(Techniques.Pulse).duration(500).repeat(-1)
.playOn(iv_main_newcomer)
}, 300)
}
}
}
......
......@@ -9,7 +9,6 @@ import androidx.recyclerview.widget.LinearLayoutManager
import com.duben.miniplaylet.R
import com.duben.miniplaylet.ad.express.ExpressAdCallback
import com.duben.miniplaylet.ad.express.MainExpressManager
import com.duben.miniplaylet.ad.ks.KsExpressManager
import com.duben.miniplaylet.common.Constant
import com.duben.miniplaylet.manager.LocalVedioManager
import com.duben.miniplaylet.mvp.model.*
......@@ -151,22 +150,7 @@ class MovieFragment : LazyLoadBaseFragment(), PicContentView, OnLoadMoreListener
}
private fun loadAd() {
KsExpressManager.instance.load(object : ExpressAdCallback {
override fun loadSuccess(adView: FrameLayout?) {
}
override fun renderSuccess(adView: FrameLayout?): Boolean {
adView?.let { addAdView(it) }
return false
}
override fun loadFail() {
}
})
// MainExpressManager.instance.loadAd(object : ExpressAdCallback {
// KsExpressManager.instance.load(object : ExpressAdCallback {
// override fun loadSuccess(adView: FrameLayout?) {
//
// }
......@@ -178,7 +162,22 @@ class MovieFragment : LazyLoadBaseFragment(), PicContentView, OnLoadMoreListener
//
// override fun loadFail() {
// }
//
// })
MainExpressManager.instance.loadAd(object : ExpressAdCallback {
override fun loadSuccess(adView: FrameLayout?) {
}
override fun renderSuccess(adView: FrameLayout?): Boolean {
adView?.let { addAdView(it) }
return false
}
override fun loadFail() {
}
})
}
private fun addAdView(adView: FrameLayout) {
......
......@@ -59,7 +59,7 @@ class NewcomerDialog(private val context: Context, private val rewardCoin: Int,
isClickBtn = true
adListener?.showAd()
}
// tv_newcomer_time.setOnClickListener(listener)
tv_newcomer_time.setOnClickListener(listener)
val sumCoin = rewardCoin.toString()
val allcoinBig = BigDecimal(sumCoin)
......@@ -72,18 +72,18 @@ class NewcomerDialog(private val context: Context, private val rewardCoin: Int,
.append("元")
.create()
Handler().postDelayed({
startTimer()
}, 900)
// Handler().postDelayed({
// startTimer()
// }, 900)
}
override fun dismiss() {
super.dismiss()
if (timer != null) { //防止计时器重复
timer!!.stop()
timer = null
}
// if (timer != null) { //防止计时器重复
// timer!!.stop()
// timer = null
// }
}
fun startTimer() {
......
......@@ -38,6 +38,7 @@
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:gravity="center"
android:background="@mipmap/ic_draw_quit"
android:textColor="@color/white"
android:textSize="14sp"></TextView>
</LinearLayout>
......
......@@ -37,7 +37,7 @@
android:layout_marginTop="20dp"
android:layout_marginRight="26dp"
android:layout_marginBottom="30dp"
android:text="迷你短剧将读取、写入(包括保存、下载、备份、上传、清理/删除、修改、扫描、检测)照片、媒体内容和文件,用于垃圾清理及加速、安全检测、文件风险扫描、本地照片、媒体内容和文件上传和备份,软件管理、下载安装、视频压缩。(使用场景以您实际触发为准)"
android:text="超好看剧场将读取、写入(包括保存、下载、备份、上传、清理/删除、修改、扫描、检测)照片、媒体内容和文件,用于垃圾清理及加速、安全检测、文件风险扫描、本地照片、媒体内容和文件上传和备份,软件管理、下载安装、视频压缩。(使用场景以您实际触发为准)"
android:textSize="14sp" />
<TextView
......
......@@ -17,7 +17,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:text="欢迎使用迷你短剧"
android:text="欢迎使用超好看剧场"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold" />
......@@ -38,7 +38,7 @@
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:layout_marginRight="16dp"
android:text="欢迎使用迷你短剧,我们非常重视对您的个人信息保护,在您使用迷你短剧服务之前,请您认真阅读《用户注册协议》及《隐私政策》"
android:text="欢迎使用超好看剧场,我们非常重视对您的个人信息保护,在您使用超好看剧场服务之前,请您认真阅读《用户注册协议》及《隐私政策》"
android:textColor="@color/black"
android:textSize="14sp" />
......
......@@ -38,7 +38,7 @@
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:layout_marginRight="16dp"
android:text="我们依据最新的法律,向您说明迷你短剧软件的隐私政策,特向您推送本提示。请您阅读并充分理解相关条款。"
android:text="我们依据最新的法律,向您说明超好看剧场软件的隐私政策,特向您推送本提示。请您阅读并充分理解相关条款。"
android:textColor="@color/black"
android:textSize="14sp" />
......
<resources>
<string name="app_name">迷你短剧</string>
<string name="app_name">超好看剧场</string>
<string name="notifyTitle">提示</string>
<string name="setting">设置</string>
<string name="cancel">取消</string>
......
......@@ -25,12 +25,12 @@ android.nonTransitiveRClass=true
DEBUG_URL="http://api.mints-tech.cn/vcash-api/"
RELEASE_URL="http://api.mints-tech.cn/vcash-api/"
RELEASE_KEY_PASSWORD=mintsminiplaylet
RELEASE_KEY_ALIAS=mints_miniplaylet
RELEASE_STORE_PASSWORD=mintsminiplaylet
RELEASE_STORE_FILE=mints_miniplaylet.jks
RELEASE_KEY_PASSWORD=mintssupertheater
RELEASE_KEY_ALIAS=mints_supertheater
RELEASE_STORE_PASSWORD=mintssupertheater
RELEASE_STORE_FILE=mints_supertheater.jks
SM_APP_ID="miniplaylet"
SM_APP_ID="supertheater"
#ShareSDK
RELEASE_SHARESDK_KEY=38af1ca206650
......
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