Discussion Forums  >  Uncategorized

Replies: 9    Views: 682

jmp4106
Aspiring developer
Profile
Posts: 43
Reg: Feb 18, 2011
california
430
07/05/11 09:42 AM (14 years ago)

main.xml

so I used admob no problem but I'm trying out a new monetization program and IT also says I have to use main.xml but there isn't one and so I wanted to know which XML file is the main one? I thought I had it figured out but its' not working right.
 
Lyle @SFNeNT
buzztouch Evangelist
Profile
Posts: 168
Reg: Apr 29, 2011
Chicago, IL
2,830
like
07/05/11 11:28 AM (14 years ago)
I believe act_home.xml is the main layout, eclipse defaults it at main.xml buzztouch just renames there .xml files You would most likely put them in the same way as admob but if you got admob working i wouldn't mess around with something else just my opinion. Admob seemed the easiest to get working for me and i got it running along the bottom of my app like a footer seems to get more clicks there.
 
jmp4106
Aspiring developer
Profile
Posts: 43
Reg: Feb 18, 2011
california
430
like
07/05/11 11:52 AM (14 years ago)
Awesome! Thank you. Would it be possible for you show me where you put the code in your xml or maybe email it to me? either way that would be awesome :-) And thanks for that heads up. [email protected]
 
Lyle @SFNeNT
buzztouch Evangelist
Profile
Posts: 168
Reg: Apr 29, 2011
Chicago, IL
2,830
like
07/05/11 01:09 PM (14 years ago)
Make a Admob acount and get you Admob SDK then follow all directions in this blog (except don't make the changes to global_tittle_dark.xml unless you want ads on top) http://tipstricksandhacks.blogspot.com/2011/06/how-to-add-admob-ads-to-your-buzztouch.html to get ads on bottom you will have to move the advie code to the bottom between </LinearLayout> and </RelativeLayout> then add two lines to it (make shure you put quotation marks before and after true buzztouch won't allow me to in this example) android:layout_alignParentBottom=true> </com.google.ads.AdView> you can do this in most of the layouts that start with screen or act... here is a example of my act_home.xml: <?xml version=1.0 encoding=utf-8?> <RelativeLayout android:id=@+id/header xmlns:android=http://schemas.android.com/apk/res/android xmlns:ads=http://schemas.android.com/apk/lib/com.google.ads android:layout_height=fill_parent android:layout_width=fill_parent > <include layout=@layout/global_title_dark /> <ImageView android:id=@+id/appImageView android:layout_width=320dip android:layout_height=150dip android:scaleType=centerCrop android:src=@drawable/app_default android:layout_alignParentTop=true android:layout_marginTop=47dip /> <LinearLayout android:id=@+id/layoutMain android:layout_width=fill_parent android:layout_height=wrap_content android:layout_marginTop=205dip android:gravity=center xmlns:android=http://schemas.android.com/apk/res/android > <ListView android:id=@+id/myListView android:layout_width=fill_parent android:layout_height=wrap_content android:layout_weight=1 android:background=#000000 android:cacheColorHint=#000000 android:choiceMode=singleChoice android:scrollbars=vertical android:scrollbarAlwaysDrawVerticalTrack=true android:scrollX=0px android:scrollY=0px android:scrollbarStyle=outsideOverlay android:scrollbarSize=20dip /> </LinearLayout> <com.google.ads.AdView android:layout_height=wrap_content android:id=@+id/adView android:layout_width=wrap_content ads:adUnitId=YOU_ID_HERE ads:adSize=BANNER ads:loadAdOnCreate=true android:layout_alignParentBottom=true> </com.google.ads.AdView> </RelativeLayout> Where its says YOU_ID_HERE put your publisher id and that simple you should have admob running at the bottom of your app.
 
jmp4106
Aspiring developer
Profile
Posts: 43
Reg: Feb 18, 2011
california
430
like
07/05/11 01:16 PM (14 years ago)
AAAHH. ok. I literally had like one thing different. Thanks so much!I had it working along the top margin but it was the bottom margin I was having issues with. THANKS so much :-)
 
Lyle @SFNeNT
buzztouch Evangelist
Profile
Posts: 168
Reg: Apr 29, 2011
Chicago, IL
2,830
like
07/05/11 08:23 PM (14 years ago)
Glad to help also if you noticed in my code I added scroll bars as well..
 
jmp4106
Aspiring developer
Profile
Posts: 43
Reg: Feb 18, 2011
california
430
like
07/05/11 08:31 PM (14 years ago)
Yeah I did notice that! although my app is mainly for watching movies.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
07/06/11 03:45 AM (14 years ago)
Be careful if you're app has copyrighted stuff. Not only for the obvious DMCA reasons, but also Ad networks will ban you. Some are ok with it, like Leadbolt, but there aren't many. If they're not copyrighted, ignore this post, but your avatar sort of gives it away :-)
 
jmp4106
Aspiring developer
Profile
Posts: 43
Reg: Feb 18, 2011
california
430
like
07/06/11 02:59 PM (14 years ago)
hahah :-) thanks. well it's just an index of content on other sites.. Nothing is hosted or downloaded.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
07/06/11 06:16 PM (14 years ago)
Yeah, that was basically the disclaimer on my movie sites back in the day with C*P*A*L*e*a*d ;-) Seriously though, admob are google, it's their decision, the wrong decision could shaft you big time. You know not to put adsense on website movie sites, even 'directories', this isn't really much different. I could be way off the mark, but is it worth the risk?
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.