Commit 677ae34e authored by jyx's avatar jyx

更新公众号样式,添加oneWay正式id

parent f97edcaa
...@@ -341,6 +341,21 @@ ...@@ -341,6 +341,21 @@
tools:replace="android:resource" /> tools:replace="android:resource" />
</provider> </provider>
<!-- OneWay -->
<activity
android:name="mobi.oneway.export.AdShowActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:hardwareAccelerated="true"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
<provider
android:name="mobi.oneway.export.OWProvider"
android:authorities="${applicationId}.OWProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/ow_file_paths" />
</provider>
<!-- 鱼丸盒子广告 --> <!-- 鱼丸盒子广告 -->
<provider <provider
......
...@@ -17,7 +17,6 @@ import com.mints.goodmoney.manager.LiebaoManager; ...@@ -17,7 +17,6 @@ import com.mints.goodmoney.manager.LiebaoManager;
import com.mints.goodmoney.manager.MhManager; import com.mints.goodmoney.manager.MhManager;
import com.mints.goodmoney.manager.MiitHelper; import com.mints.goodmoney.manager.MiitHelper;
import com.mints.goodmoney.manager.OwManager; import com.mints.goodmoney.manager.OwManager;
import com.mints.goodmoney.manager.ReaderManager;
import com.mints.goodmoney.manager.RsNewsManager; import com.mints.goodmoney.manager.RsNewsManager;
import com.mints.goodmoney.manager.TtCsjAdManager; import com.mints.goodmoney.manager.TtCsjAdManager;
import com.mints.goodmoney.manager.TzManager; import com.mints.goodmoney.manager.TzManager;
...@@ -25,7 +24,6 @@ import com.mints.goodmoney.manager.WnManager; ...@@ -25,7 +24,6 @@ import com.mints.goodmoney.manager.WnManager;
import com.mints.goodmoney.manager.XmManager; import com.mints.goodmoney.manager.XmManager;
import com.mints.goodmoney.manager.YlVideoManager; import com.mints.goodmoney.manager.YlVideoManager;
import com.mints.goodmoney.manager.YlhAdManager; import com.mints.goodmoney.manager.YlhAdManager;
import com.mints.goodmoney.manager.YyzManager;
import com.mints.goodmoney.net.LoanService; import com.mints.goodmoney.net.LoanService;
import com.mints.goodmoney.utils.ForegroundOrBackground; import com.mints.goodmoney.utils.ForegroundOrBackground;
import com.mints.goodmoney.utils.LogUtil; import com.mints.goodmoney.utils.LogUtil;
......
...@@ -77,7 +77,7 @@ class OwVideoAdManager private constructor() : ...@@ -77,7 +77,7 @@ class OwVideoAdManager private constructor() :
} }
override fun onSdkError(onewaySdkError: OnewaySdkError, msg: String) { override fun onSdkError(onewaySdkError: OnewaySdkError, msg: String) {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_OW, Constant.EVENT_TYPE_ONE, "999999","emun:"+onewaySdkError.name+"msg:"+ msg) TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_OW, Constant.EVENT_TYPE_ONE, "999999", "emun:" + onewaySdkError.name + "msg:" + msg)
videoAdStatusListener?.adFail() videoAdStatusListener?.adFail()
} }
......
package com.mints.goodmoney.manager package com.mints.goodmoney.manager
import android.app.Application import android.app.Application
import com.maplehaze.adsdk.MaplehazeSDK
import mobi.oneway.export.Ad.OnewaySdk import mobi.oneway.export.Ad.OnewaySdk
/** /**
...@@ -10,14 +9,15 @@ import mobi.oneway.export.Ad.OnewaySdk ...@@ -10,14 +9,15 @@ import mobi.oneway.export.Ad.OnewaySdk
*/ */
object OwManager { object OwManager {
private const val PUBLISH_ID = "" private const val PUBLISH_ID = "bf236dc4c17946cd"
const val REWARD_PID = "" const val REWARD_PID = "P9663XII5Q9VJM25"
/** /**
* 初始化 * 初始化
*/ */
fun init(application: Application) { fun init(application: Application) {
OnewaySdk.configure(application, PUBLISH_ID) OnewaySdk.configure(application, PUBLISH_ID)
OnewaySdk.setDebugMode(true)
} }
} }
\ No newline at end of file
...@@ -4,12 +4,9 @@ import androidx.fragment.app.Fragment ...@@ -4,12 +4,9 @@ import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentTransaction import androidx.fragment.app.FragmentTransaction
import com.androidkun.xtablayout.XTabLayout import com.androidkun.xtablayout.XTabLayout
import com.chineseall.reader17ksdk.feature.main.bookshop.wellchosen.WellChosenFragment
import com.mints.goodmoney.R import com.mints.goodmoney.R
import com.mints.goodmoney.common.AppConfig import com.mints.goodmoney.common.AppConfig
import com.mints.goodmoney.ui.fragment.base.BaseFragment import com.mints.goodmoney.ui.fragment.base.BaseFragment
import com.mints.goodmoney.utils.LogUtil
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.android.synthetic.main.fragment_main_money.* import kotlinx.android.synthetic.main.fragment_main_money.*
/** /**
...@@ -68,7 +65,6 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener { ...@@ -68,7 +65,6 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
if (AppConfig.showAdFlag) { if (AppConfig.showAdFlag) {
if (mainFragment == null) { if (mainFragment == null) {
mainFragment = MainFragment() mainFragment = MainFragment()
LogUtil.d("mainFragment","mainFragment是空的。。。。。。。。。。。。。。。。。。")
} }
if (!mainFragment!!.isAdded) { if (!mainFragment!!.isAdded) {
// 提交事务 // 提交事务
......
...@@ -367,63 +367,6 @@ class MyFragment : BaseFragment(), ...@@ -367,63 +367,6 @@ class MyFragment : BaseFragment(),
} }
} }
private fun gzhDialog() {
DialogUtils.showGzhDialog(requireActivity(), object : DialogListener() {
override fun onClick(dialog: Dialog?, v: View?) {
when (v?.id) {
R.id.tv_focus -> {
//并将“淘金空间”复制到粘贴板上
// val clipboardManager = dialog?.ownerActivity?.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
// val clipData = ClipData.newPlainText("Label", "淘金空间")
// clipboardManager.setPrimaryClip(clipData)
// // Toast 提示
// showToast("已复制内容到剪贴板")
//直接跳转到微信搜索界面
getWechatApi()
}
R.id.tv_subscribe -> {
//关闭当前页面
//并不在提示当前弹窗
if (activity != null && !activity!!.isFinishing && dialog != null && dialog.isShowing) {
dialog.dismiss()
ps.put(Constant.LOAN_PERMISSION_FLAG, false)
// 数美初始化
ShumeiManager.getInstance().initShumei()
}
}
R.id.iv_Close -> {
//关闭当前界面
//再次打开时会继续弹出该弹窗
if (activity != null && !activity!!.isFinishing && dialog != null && dialog.isShowing) {
dialog.dismiss()
ps.put(Constant.LOAN_PERMISSION_FLAG, false)
// 数美初始化
ShumeiManager.getInstance().initShumei()
}
}
}
}
})
}
/**
* 跳转到微信搜索页面
*/
private fun getWechatApi() {
LogUtil.d("getWeChatApi","点击事件响应了。。。。。。。。。。。。。。。。。。。")
try {
val intent = Intent(Intent.ACTION_MAIN)
val cmp = ComponentName("com.tencent.mm", "com.tencent.mm.ui.LauncherUI")
intent.addCategory(Intent.CATEGORY_LAUNCHER)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
intent.component = cmp
startActivity(intent)
} catch (e: ActivityNotFoundException) {
showToast("检查到您手机没有安装微信,请安装后使用该功能")
}
}
/** /**
* 设置Banner * 设置Banner
*/ */
...@@ -558,7 +501,7 @@ class MyFragment : BaseFragment(), ...@@ -558,7 +501,7 @@ class MyFragment : BaseFragment(),
private fun setUserLoginStatus() { private fun setUserLoginStatus() {
if (userManager.userIsLogin()) { if (userManager.userIsLogin()) {
LogUtil.d("lixianshouyi","setUserLoginStatus。。。。。。。。。。。。。。。。。。。。。。。。。。") LogUtil.d("lixianshouyi", "setUserLoginStatus。。。。。。。。。。。。。。。。。。。。。。。。。。")
// 已登录 // 已登录
if (userManager.wxOpenid.isNotEmpty()) { if (userManager.wxOpenid.isNotEmpty()) {
GlideUtils.loadImageViewLoding(context, userManager.wxHeader, item_title_avatar, R.mipmap.ic_my, R.mipmap.ic_my) GlideUtils.loadImageViewLoding(context, userManager.wxHeader, item_title_avatar, R.mipmap.ic_my, R.mipmap.ic_my)
...@@ -1275,10 +1218,10 @@ class MyFragment : BaseFragment(), ...@@ -1275,10 +1218,10 @@ class MyFragment : BaseFragment(),
private fun initManager() { private fun initManager() {
BannerManager.init() BannerManager.init()
videoAdingManager = VideoAdingManager.getInstance(activity) videoAdingManager = VideoAdingManager.getInstance(activity)
LogUtil.d("lixianshouyi","进入到initManager。。。。。。。。。。。。。。。。。。。。。。。。。。") LogUtil.d("lixianshouyi", "进入到initManager。。。。。。。。。。。。。。。。。。。。。。。。。。")
//登录成功 //登录成功
if (!TextUtils.isEmpty(userManager.userID)) { if (!TextUtils.isEmpty(userManager.userID)) {
LogUtil.d("lixianshouyi","用户登陆成功!!!。。。。。。。。。。。。。。。。。。。。。。。。。。") LogUtil.d("lixianshouyi", "用户登陆成功!!!。。。。。。。。。。。。。。。。。。。。。。。。。。")
// 登录成功的用户初始化鱼丸盒子 // 登录成功的用户初始化鱼丸盒子
if (userManager.userIsLogin()) { if (userManager.userIsLogin()) {
YwhzManager.init(baseApplication) YwhzManager.init(baseApplication)
......
package com.mints.goodmoney.ui.widgets.dialog package com.mints.goodmoney.ui.widgets.dialog
import com.mints.goodmoney.R
import com.mints.goodmoney.ui.widgets.seekbar.BubbleUtils
import com.mints.goodmoney.utils.SpanUtils
import android.app.Dialog import android.app.Dialog
import android.content.ComponentName
import android.content.Context import android.content.Context
import android.content.Intent import android.text.Html
import android.graphics.Paint
import android.view.Gravity import android.view.Gravity
import android.view.KeyEvent import android.view.KeyEvent
import android.view.View
import android.view.WindowManager import android.view.WindowManager
import android.widget.ImageView import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import com.mints.goodmoney.R
import com.mints.library.utils.nodoubleclick.AntiShake
/**
* 关注公众号
*/
class GzhDialog(context: Context, private val listener: DialogListener) : class GzhDialog(context: Context, private val listener: DialogListener) :
Dialog(context, R.style.dialog) { Dialog(context, R.style.dialog) {
private val lp: WindowManager.LayoutParams private val lp: WindowManager.LayoutParams
...@@ -42,12 +43,25 @@ class GzhDialog(context: Context, private val listener: DialogListener) : ...@@ -42,12 +43,25 @@ class GzhDialog(context: Context, private val listener: DialogListener) :
tv_focus = findViewById(R.id.tv_focus) tv_focus = findViewById(R.id.tv_focus)
tv_subscribe = findViewById(R.id.tv_subscribe) tv_subscribe = findViewById(R.id.tv_subscribe)
iv_Close = findViewById(R.id.iv_Close) iv_Close = findViewById(R.id.iv_Close)
//设置文字底部下划线,不同android系统显示效果不同,未使用
// tv_subscribe.paint.setFlags(Paint.UNDERLINE_TEXT_FLAG)
// tv_subscribe.paint.setAntiAlias(true)//抗锯齿
tv_focus.setOnClickListener(listener) val ssb = SpanUtils()
tv_subscribe.setOnClickListener(listener) .append("关注官方公众号")
iv_Close.setOnClickListener(listener) .append("[淘金空间]\n").setFontSize(BubbleUtils.dp2px(20)).setBold()
.append("您可以第一时间了解到")
.create()
findViewById<TextView>(R.id.tv_1).text = ssb
tv_subscribe.text = Html.fromHtml("<u>我已订阅</u>")
tv_focus.setOnClickListener {
listener.onClick(it)
}
tv_subscribe.setOnClickListener {
listener.onClick(it)
}
iv_Close.setOnClickListener {
listener.onClick(it)
}
} }
} }
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="match_parent"> android:layout_height="wrap_content"
android:background="@mipmap/bg_gzh">
<ImageView
android:id="@+id/iv_Close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|end"
android:layout_marginTop="50dp"
android:layout_marginEnd="10dp"
android:padding="6dp"
android:src="@mipmap/ic_close" />
<LinearLayout <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true" android:layout_gravity="bottom|center_horizontal"
android:background="@mipmap/bg_gzh"
android:orientation="vertical"> android:orientation="vertical">
<ImageView
android:id="@+id/iv_Close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginTop="35dp"
android:layout_marginRight="10dp"
android:src="@mipmap/iv_close_gzh" />
<TextView <TextView
android:id="@+id/tv_1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal|bottom"
android:layout_marginTop="186dp"
android:layout_marginLeft="20dp" android:layout_marginLeft="20dp"
android:layout_marginRight="20dp" android:layout_marginRight="20dp"
android:text="参与最新赚钱活动、获取提现福利、VIP客服反馈..." android:layout_marginBottom="10dp"
android:textColor="@color/black"
android:gravity="center" android:gravity="center"
android:textSize="14sp" /> android:lineHeight="20dp"
android:textColor="@color/color_FF9837"
android:textSize="16sp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal|bottom"
android:layout_marginLeft="20dp" android:layout_marginLeft="10dp"
android:layout_marginRight="20dp" android:layout_marginRight="10dp"
android:text="更多惊喜等你来看!" android:layout_marginBottom="20dp"
android:textColor="@color/black"
android:gravity="center" android:gravity="center"
android:textSize="14sp" /> android:lineHeight="20dp"
android:text="最新赚钱活动,领取提现福利,VIP客服反馈...\n更多惊喜等你来看!"
android:textSize="12sp" />
<TextView <TextView
android:id="@+id/tv_focus" android:id="@+id/tv_focus"
android:layout_width="200dp" android:layout_width="200dp"
android:layout_height="36dp" android:layout_height="36dp"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal|bottom"
android:layout_marginLeft="20dp"
android:layout_marginTop="36dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:background="@mipmap/bg_btn_gzh" android:background="@drawable/shape_main"
android:gravity="center" android:gravity="center"
android:text="马上关注" android:text="马上关注"
android:textColor="@color/white" /> android:textColor="@color/white" />
...@@ -62,19 +60,10 @@ ...@@ -62,19 +60,10 @@
android:id="@+id/tv_subscribe" android:id="@+id/tv_subscribe"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal|bottom"
android:layout_marginLeft="20dp" android:layout_marginBottom="10dp"
android:layout_marginRight="20dp"
android:gravity="center"
android:text="我已订阅"
android:textColor="@color/black" /> android:textColor="@color/black" />
<View
android:layout_width="55dp"
android:layout_height="1px"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="60dp"
android:background="@color/black" />
</LinearLayout> </androidx.appcompat.widget.LinearLayoutCompat>
</RelativeLayout> </FrameLayout>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<paths>
<root-path
name="root"
path="" />
<files-path
name="files"
path="" />
<external-path
name="sdcard"
path="" />
<cache-path
name="cache"
path="" />
<external-files-path
name="exFiles"
path="" />
<external-cache-path
name="exCache"
path="" />
</paths>
</resources>
\ No newline at end of file
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