un.java
2.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
package com.lotus.town.notify;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.widget.TextView;
import com.ad.lib.AdPlacement;
import com.ad.lib.RequestInfo;
import com.bytedance.sdk.openadsdk.AdSlot;
import com.controller.NotifyType;
import com.lotus.town.R;
import com.sdk.SharedPref;
/**
* 解锁弹框
*/
public class un extends BaseNotifyActivity{
private TextView mTimesWatch;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SharedPref.getOrSetEvFlag(this,false,true);
}
@Override
protected void initLayout() {
setContentView(R.layout.un_notify_layout);
mTimesWatch = findViewById(R.id.times_watch);
int times = SharedPref.getUnlockScreen(this);
String html="<font color='black'>今天第</font>";
html+="<font color='#FF6861'> <big> "+times+" </big> </font>";
html+="<font color='black'>次看手机</font>";
CharSequence charSequence= Html.fromHtml(html);
mTimesWatch.setText(charSequence);
//该语句在设置后必加,不然没有任何效果
mTimesWatch.setMovementMethod(LinkMovementMethod.getInstance());
}
protected void initSmallAd(){
}
@Override
protected void initSmallView() {
}
@Override
protected String getEventName() {
return "u_l_a_d";
}
@Override
protected String getEventClickName() {
return "u_l_c";
}
@Override
protected String getEventPageName() {
return "u_l_p";
}
@Override
protected RequestInfo getSmallPlacementId() {
RequestInfo info = new RequestInfo();
info.setId(AdPlacement.getUnlockSmallId());
info.setWidth(1080);
info.setHeight(1920);
info.setType(AdSlot.TYPE_BANNER);
return info;
}
@Override
protected RequestInfo getBigPlacementId() {
RequestInfo info = new RequestInfo();
info.setId(AdPlacement.getUnlockBigId());
info.setWidth(1080);
info.setHeight(1920);
info.setType(AdSlot.TYPE_BANNER);
return info;
}
@Override
protected void initInfo() {
}
@Override
protected void initView(){
super.initView();
// close = findViewById(R.id.close);
// clickButton = findViewById(R.id.button);
// close.setOnClickListener(this);
// clickButton.setOnClickListener(this);
}
@Override
public void onBackPressed() {
super.onBackPressed();
}
@Override
protected int getSmallAdType() {
return 0;
}
@Override
protected int getBitAdType() {
return 0;
}
@Override
protected int getBigAdNotifyType() {
return NotifyType.UNLOCK_NOTIRY;
}
}