Yes, you can. But there could be a performance penalty, depending on your use case. Two issues to consider.
First, MoPub SDK uses
findViewById internally so you can only save the time for inflating views.
Second, if you mediate AdMob, you
RecyclerView item layout must contain 3 parent containers —
NativeContentAdView for AdMob, and a normal
ViewGroup for others. If my case, the
RecyclerView item layout contains quite a lot of views that having 3 containers for ads seriously affects scrolling performance. So we decided to inflate views at runtime (for ads only), which happens only once every few items.