添加广告的时候学到的东西
2012-04-17 20:14
106 查看
1. 添加外部包的时候必须在android加个libs文件夹,然后把jar放到这个文件里面,不在这个目录的话,android是不认的。
2. android可以添加自定义属性。
可以在values文件夹下面添加xml
<resources>
<declare-styleable name="cn.domob.android.ads.DomobAdView">
<attr name="backgroundColor" format="color" />
<attr name="primaryTextColor" format="color" />
<attr name="keywords" format="string" />
<attr name="spots" format="string" />
<attr name="refreshInterval" format="integer" />
</declare-styleable>
</resources>
这个就是定义属性
用的时候要在layout文件夹里面加上
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:myapp="http://schemas.android.com/apk/res/foodxk.com"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@drawable/shade"
android:id="@+id/mainly1"
>
<cn.domob.android.ads.DomobAdView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
myapp:keywords="game"
myapp:spots="androidtest"
myapp:refreshInterval="20"
>
</cn.domob.android.ads.DomobAdView>
2. android可以添加自定义属性。
可以在values文件夹下面添加xml
<resources>
<declare-styleable name="cn.domob.android.ads.DomobAdView">
<attr name="backgroundColor" format="color" />
<attr name="primaryTextColor" format="color" />
<attr name="keywords" format="string" />
<attr name="spots" format="string" />
<attr name="refreshInterval" format="integer" />
</declare-styleable>
</resources>
这个就是定义属性
用的时候要在layout文件夹里面加上
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:myapp="http://schemas.android.com/apk/res/foodxk.com"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@drawable/shade"
android:id="@+id/mainly1"
>
<cn.domob.android.ads.DomobAdView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
myapp:keywords="game"
myapp:spots="androidtest"
myapp:refreshInterval="20"
>
</cn.domob.android.ads.DomobAdView>
相关文章推荐
- 关于Tableview头部添加图片或者其他东西的时候
- 学校的ASP网站修改的时候用到的一些东西(更新中2012.07.16添加了SQL2000数据转移到Mysql)
- 视屏暂停的时候添加广告
- 加载xib文件,如果想在初始化的时候就添加点东西就重载-(id)initWithCoder:(NSCoder *)aDecoder
- UNITY 往滚动视图(Scroll View)里面添加东西并显示出来
- IE8导致VC 2005 对自己添加的对话框 右击 添加对应类时候出现脚本错误 的解决方法
- 关于编译模块的时候的头文件路径添加。
- 在看DedeCMS代码时候想到的一些东西
- 为什么调试的时候需要编译选项中添加 -g. 请自行调研readelf命令
- AndFix学到的东西
- 关于发邮件时候内嵌图片,在vs2003 里有没有类似LinkedResource 这样的东西
- iOS window添加视频view或图片view,并有切换根视图控制器的时候注意
- PS添加文字时候文字特别小
- Eclipse添加javadoc时候显示的默认@author ${user}修改添加javadoc时候显示的默认@author ${user}修改
- 如何添加AdMob广告到现有的Unity3D ios游戏
- AdMob广告添加方法
- ionic添加admob广告教程
- 从校内网的网页源码学到一点东西
- 希望可以学到东西.
- 我用vs2005写了一个webservice用来查询sql2005数据库中表值,返回一个dataset类型集合,测试时候显示的xml文档没有问题,但是当我添加web引用的时候却无法正常显示而且报错原因之一。