Created
March 15, 2019 00:39
-
-
Save slavkoder/8f5bfaabcb5730f994874d7005e50ba7 to your computer and use it in GitHub Desktop.
Example of inner class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FindViewHolder(val parent: View) { | |
val adunitTitle: TextView = parent.findViewById(R.id.adunitTitle) | |
val companyText: TextView = parent.findViewById(R.id.companyText) | |
val companyLogo: ImageView = parent.findViewById(R.id.companyLogo) | |
val unifiedNativeAdView: UnifiedNativeAdView = parent.findViewById(R.id.unifiedNativeAdView) | |
val mediaView: MediaView = parent.findViewById(R.id.mediaView) | |
val textWrapper: View = parent.findViewById(R.id.textWrapper) | |
} | |
private val vh: FindViewHolder | |
init { | |
View.inflate(context, LAYOUT_ID, this) | |
vh = FindViewHolder(this) | |
vh.unifiedNativeAdView.headlineView = vh.adunitTitle | |
vh.unifiedNativeAdView.advertiserView = vh.companyText | |
vh.unifiedNativeAdView.iconView = vh.companyLogo | |
vh.unifiedNativeAdView.callToActionView = vh.textWrapper | |
setupMediaView() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment