// xml
<com.android.banner.BannerLayout
android:id="@+id/bannerLayout"
android:layout_width="match_parent"
android:layout_height="150dp"
app:banner_guide="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
same your exam.
compileSdkVersion,target 28
bannerLayout .delayTime(3000) .setOnBannerImageLoader(GlideImageLoader()) .resource(adapter) // .addTipLayout(BannerTip( // dotSelector = R.drawable.selector_banner_dots, // dotSite = BannerTipLayout.CENTER, // tipWidth = BannerLayout.MATCHPARENT, // dotWidth = 30, // dotHeight = 30, // tipHeight = 60)) .addOnItemClickListener { view, , info ->
val openURL = Intent(Intent.ACTION_VIEW)
openURL.data = Uri.parse(info.title)
startActivity(openURL)
}
// xml <com.android.banner.BannerLayout android:id="@+id/bannerLayout" android:layout_width="match_parent" android:layout_height="150dp" app:banner_guide="true" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> same your exam.