File tree 4 files changed +21
-12
lines changed
app/src/main/java/tappx_sdk_app/ads
4 files changed +21
-12
lines changed Original file line number Diff line number Diff line change @@ -82,11 +82,13 @@ class BannerAd(
82
82
83
83
// Method to update the TextView inside the ScrollView with log messages
84
84
private fun updateLog (message : String ) {
85
- if (statusLog.text.isNotEmpty()) {
86
- statusLog.append(" \n $message " )
85
+ val currentText = statusLog.text.toString()
86
+ val newText = if (currentText.isNotEmpty()) {
87
+ " $message \n $currentText "
87
88
} else {
88
- statusLog.append( message)
89
+ message
89
90
}
91
+ statusLog.text = newText
90
92
Log .e(" Tappx SDK" , message)
91
93
}
92
94
}
Original file line number Diff line number Diff line change @@ -84,11 +84,13 @@ class InterstitialAd(
84
84
85
85
86
86
private fun updateLog (message : String ) {
87
- if (statusLog.text.isNotEmpty()) {
88
- statusLog.append(" \n $message " )
87
+ val currentText = statusLog.text.toString()
88
+ val newText = if (currentText.isNotEmpty()) {
89
+ " $message \n $currentText "
89
90
} else {
90
- statusLog.append( message)
91
+ message
91
92
}
93
+ statusLog.text = newText
92
94
Log .e(" Tappx SDK" , message)
93
95
}
94
96
}
Original file line number Diff line number Diff line change @@ -71,11 +71,13 @@ class MRECAd(
71
71
72
72
// Method to update the TextView inside the ScrollView with log messages
73
73
private fun updateLog (message : String ) {
74
- if (statusLog.text.isNotEmpty()) {
75
- statusLog.append(" \n $message " )
74
+ val currentText = statusLog.text.toString()
75
+ val newText = if (currentText.isNotEmpty()) {
76
+ " $message \n $currentText "
76
77
} else {
77
- statusLog.append( message)
78
+ message
78
79
}
80
+ statusLog.text = newText
79
81
Log .e(" Tappx SDK" , message)
80
82
}
81
83
}
Original file line number Diff line number Diff line change @@ -96,12 +96,15 @@ class RewardedAd(
96
96
}
97
97
98
98
private fun updateLog (message : String ) {
99
- if (statusLog.text.isNotEmpty()) {
100
- statusLog.append(" \n $message " )
99
+ val currentText = statusLog.text.toString()
100
+ val newText = if (currentText.isNotEmpty()) {
101
+ " $message \n $currentText "
101
102
} else {
102
- statusLog.append( message)
103
+ message
103
104
}
105
+ statusLog.text = newText
104
106
Log .e(" Tappx SDK" , message)
105
107
}
106
108
109
+
107
110
}
You can’t perform that action at this time.
0 commit comments