Commit e6e758d0 authored by maxiaoliang's avatar maxiaoliang

添加悬浮广告

parent cb3cf000
......@@ -5,6 +5,7 @@ import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
......@@ -57,7 +58,7 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
private LoadingDialog mLoading;
private Observable<String> mRestartLoginObservable;
private Observable<Integer> mSwitchMainObservable;
private ImageView adview;
@Override
public int layoutID() {
return R.layout.activity_main;
......@@ -81,6 +82,7 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
false
);
navigationView = findViewById(R.id.id_activity_main_fragment_navigation);
adview=findViewById(R.id.id_img_fly_ad);
initListener();
mRestartLoginObservable = RxBus.get().register(Constant.REFRESH_LOGIN_STATS, String.class);
mRestartLoginObservable.observeOn(AndroidSchedulers.mainThread()).subscribe(new Consumer<String>() {
......@@ -110,7 +112,7 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
boolean firstLoginApp = SettingPreference.getFirstLoginApp();
if (firstLoginApp) {
UserInfo userInfoData = SettingPreference.getUserInfoData();
if (userInfoData != null&&userInfoData.member!=null) {
if (userInfoData != null && userInfoData.member != null) {
Constant.Switch.isOpenVip = userInfoData.member;
if (!userInfoData.member) {
SettingPreference.setFirstLoginApp();
......@@ -173,7 +175,8 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
} else if (vId == com.zxbw.modulemain.R.id.id_view_navigation_bottom_cash) {
switchFragment(2);
EventUtils.INSTANCE.onEvent("tab_imp", "cash_check");
} if (vId == com.zxbw.modulemain.R.id.id_view_navigation_bottom_user) {
}
if (vId == com.zxbw.modulemain.R.id.id_view_navigation_bottom_user) {
switchFragment(3);
EventUtils.INSTANCE.onEvent("tab_imp", "user");
}
......@@ -199,7 +202,7 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
} else {
EventUtils.INSTANCE.onEvent("double_exit", "双击退出");
exitActivity();
// closeApp();
// closeApp();
}
}
......@@ -212,7 +215,7 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
super.onResume();
MobclickAgent.onResume(this);
UserInfo userInfoData = SettingPreference.getUserInfoData();
if (userInfoData != null&&userInfoData.member!=null) {
if (userInfoData != null && userInfoData.member != null) {
Constant.Switch.isOpenVip = userInfoData.member;
}
ClipboardManagerUtil.INSTANCE.getTbLink(this);
......@@ -279,4 +282,18 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
// super.onSaveInstanceState(outState);
}
private void getAdInfo() {
ApiClient.INSTANCE.getHomeApi().closeApp().compose(RxSchedulers.observableIO2Main()).subscribe(new BaseObserver<Object>() {
@Override
public void onSuccess(Object result) {
exitActivity();
}
@Override
public void onFailure(Throwable e, String code, String errorMsg) {
exitActivity();
}
});
}
}
......@@ -25,7 +25,18 @@
android:background="@color/white"
android:clipChildren="false" />
<ImageView
android:id="@+id/id_img_fly_ad"
android:layout_width="75dp"
android:layout_height="75dp"
android:layout_above="@+id/id_activity_main_fragment_navigation"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp"
android:layout_marginBottom="100dp"
android:src="@drawable/icon_head_defalt" />
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_above="@+id/id_activity_main_fragment_navigation"
......
......@@ -194,18 +194,18 @@ public class NetConfig {
}
public static class H5 {
public static String WEB_URL_USER = "https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xiaoxiangSaveMoney/person_app.html?webName="+ AppContext.get().getResources().getString(R.string.app_name);
public static String WEB_URL_USER = "https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xiaoxiangSaveMoney/person_app.html?webName=" + AppContext.get().getResources().getString(R.string.app_name);
public static String WEB_URL_PRIVACY = "https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xiaoxiangSaveMoney/privacy_app.html?appName="+AppContext.get().getResources().getString(R.string.app_name)+"APP&company=北京掌心互联科技有限公司&money=虚拟货币&webName="+AppContext.get().getResources().getString(R.string.app_name);
public static String WEB_URL_PRIVACY = "https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xiaoxiangSaveMoney/privacy_app.html?appName=" + AppContext.get().getResources().getString(R.string.app_name) + "APP&company=北京掌心互联科技有限公司&money=虚拟货币&webName=" + AppContext.get().getResources().getString(R.string.app_name);
public static String WEB_URL_RULE = "https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xiaoxiangSaveMoney/huafeiRule.html";
public static String WEB_URL_ABOUT_US = "https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/aboutMe.html?version=" + Constant.Param.vn + "&appName="+AppContext.get().getResources().getString(R.string.app_name)+"&company=北京掌心互联科技有限公司";
public static String WEB_URL_ABOUT_US = "https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/aboutMe.html?version=" + Constant.Param.vn + "&appName=" + AppContext.get().getResources().getString(R.string.app_name) + "&company=北京掌心互联科技有限公司";
public static String WEB_URL_CUSTOMER_SERVICE = "https://1568685.s4.udesk.cn/im_client/?web_plugin_id=43807";
public static String WEB_URL_CUSTOMER_SERVICE_ERROR = "https://h5.zhangxinzhixun.com/to_refund";
public static String WEB_URL_ZENGZHI_SERVICE = "https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/xxsq_zz_server.html";
public static String WEB_URL_BUYER_KNOW = "https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/buyerKnow.html?version=" + Constant.Param.vn + "&appName="+AppContext.get().getResources().getString(R.string.app_name)+"&company=北京掌心互联科技有限公司";
public static String WEB_URL_BUYER_KNOW = "https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/buyerKnow.html?version=" + Constant.Param.vn + "&appName=" + AppContext.get().getResources().getString(R.string.app_name) + "&company=北京掌心互联科技有限公司";
public static String WEB_URL_WEEK_RULE = "https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/week_activity_rule.html";
public static String WEB_URL_INVITE;
public static String WEB_URL_H5_PAY = "https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/pay_order.html";
......
......@@ -58,7 +58,7 @@ class HomeQyBannerAdapter : PagerAdapter {
var mJgqQyAdapter = JgqQyAdapter(mActivity,
OnRecycleItemClickListener<JgqQyEntity> { view, position, data ->
EventUtils.onEvent("gird_click",""+data.sort)
EventUtils.onEvent("gird_click",""+data.brand)
if (TextUtils.equals(data.rechargeType, "51")) {
JumpUtils.CardVoucherJump(data.brand)
} else if (TextUtils.equals(data.rechargeType, "1")) {
......
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