Skip to content

Commit

Permalink
Bump sdk to latest (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-lucas-bon authored Oct 11, 2024
1 parent 82d556a commit 3315fce
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class MainFragment : BaseFragment(), RadioGroup.OnCheckedChangeListener {

private lateinit var customPid: Button
private lateinit var containerCreativeSizes: View
private lateinit var containerPlacementId: View
private lateinit var radioGroupCreativeSizes: RadioGroup
private lateinit var radioGroupProvider: RadioGroup
private lateinit var integrationsRecyclerView: RecyclerView
Expand Down Expand Up @@ -72,6 +73,7 @@ class MainFragment : BaseFragment(), RadioGroup.OnCheckedChangeListener {
val containerFormat: RadioGroup = binding.containerFormat
radioGroupProvider = binding.containerProvider
radioGroupCreativeSizes = binding.radiogroupCreativeSize
containerPlacementId = binding.containerPlacementId
containerCreativeSizes = binding.containerCreativeSize
integrationsRecyclerView = binding.integrationsRecyclerView

Expand Down Expand Up @@ -341,10 +343,10 @@ class MainFragment : BaseFragment(), RadioGroup.OnCheckedChangeListener {
}

private fun setDirectIntegrationConstraints() {
customPid.visibility = if (SessionDataSource.selectedProvider == ProviderType.DIRECT) {
containerPlacementId.visibility = if (SessionDataSource.selectedProvider == ProviderType.DIRECT) {
View.VISIBLE
} else {
View.INVISIBLE
View.GONE
}
when {
SessionDataSource.selectedProvider != ProviderType.DIRECT && SessionDataSource.selectedFormat == FormatType.INFEED -> {
Expand All @@ -360,7 +362,7 @@ class MainFragment : BaseFragment(), RadioGroup.OnCheckedChangeListener {
val limitedProviders = listOf(ProviderType.SMART, ProviderType.PREBID)
if (limitedProviders.contains(SessionDataSource.selectedProvider)) {
containerCreativeSizes.visibility = View.GONE
} else {
} else if (SessionDataSource.selectedFormat != FormatType.INFEED) {
containerCreativeSizes.visibility = View.VISIBLE
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import tv.teads.adapter.smart.nativead.TeadsSmartViewBinder
import tv.teads.sdk.TeadsMediationSettings
import tv.teads.sdk.renderer.AdScale
import tv.teads.sdk.utils.userConsent.TCFVersion
import tv.teads.teadssdkdemo.R
import tv.teads.teadssdkdemo.component.GenericRecyclerViewAdapter
Expand Down
54 changes: 37 additions & 17 deletions TeadsSDKDemo/app/src/main/res/layout/fragment_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
android:orientation="vertical">

<LinearLayout
Expand Down Expand Up @@ -136,6 +137,42 @@
android:textColor="@color/textColorNoBg" />
</RadioGroup>

<LinearLayout
android:id="@+id/container_placement_id"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/list_item_margin"
android:orientation="vertical">

<TextView
android:id="@+id/text_pid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:text="@string/placement_id"
android:textColor="@color/titleTextColor"
android:textSize="24sp"
android:textStyle="bold" />

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/customButton"
android:layout_width="match_parent"
android:layout_height="@dimen/main_radio_button_height"
android:layout_marginStart="4dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="4dp"
android:background="@drawable/custom_button_selector"
android:button="@android:color/transparent"
android:fontFamily="sans-serif"
android:gravity="center"
android:tag="0"
android:text="@string/custom"
android:textAllCaps="false"
android:textColor="@color/textColorNoBg"
android:textStyle="normal" />

</LinearLayout>

<LinearLayout
android:id="@+id/container_creative_size"
android:layout_width="match_parent"
Expand Down Expand Up @@ -215,23 +252,6 @@

</LinearLayout>

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/customButton"
android:layout_width="match_parent"
android:layout_height="@dimen/main_radio_button_height"
android:layout_marginStart="4dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="4dp"
android:background="@drawable/custom_button_selector"
android:button="@android:color/transparent"
android:fontFamily="sans-serif"
android:gravity="center"
android:tag="0"
android:text="@string/custom"
android:textAllCaps="false"
android:textColor="@color/textColorNoBg"
android:textStyle="normal" />

<TextView
android:id="@+id/text_integration"
android:layout_width="match_parent"
Expand Down
1 change: 1 addition & 0 deletions TeadsSDKDemo/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
<string name="square">Square</string>
<string name="vertical">Vertical</string>
<string name="creative_sizes">Creative Sizes</string>
<string name="placement_id">Placemend ID</string>
<string name="landscape">Landscape</string>
<string name="custom">Change PID</string>
<string name="smart">Smart</string>
Expand Down
4 changes: 2 additions & 2 deletions TeadsSDKDemo/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
android.useAndroidX=true
org.gradle.jvmargs=-Xms1024m -Xmx4096m

VERSION_NAME=5.1.5
VERSION_CODE=130
VERSION_NAME=5.1.6
VERSION_CODE=131
5 changes: 5 additions & 0 deletions TeadsSDKDemo/webviewhelper/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

-keep class tv.teads.webviewhelper.SyncAdWebView$Listener { *; }
-keep class tv.teads.webviewhelper.SyncAdWebView { *; }
-keep class tv.teads.webviewhelper.baseView.ObservableWebView { *; }
-dontwarn java.lang.invoke.StringConcatFactory

0 comments on commit 3315fce

Please sign in to comment.