I\'d like to use the new AdMob native ad functionality in my app. I want to put a native ad within a listView, where every 20th item or so in the list is an ad. Is it possib
You need to create your own custom list view and custom adapter.
LinearLayout as childCreate a class that will in Inflat your Layout to The LinearLayout In the ScrollView . Like this :
private static void CreateIntemEmptty(Context context, ViewGroup view) {
LayoutInflater inflater = (LayoutInflater) Home.context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View child = inflater.inflate(R.layout.empty, null);
ViewGroup Prnt =(ViewGroup)view.getParent().getParent();
Prnt.removeViewInLayout((View)view.getParent());
ViewGroup.LayoutParams p =new ViewGroup.LayoutParams(Prnt.getWidth(),Prnt.getHeight());
Prnt.addView(child,p);
}
in this code i create an empty Element and add it
You can add the ADS in the LinearLayout as a child.