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>

更多相关文章

  1. android 创建文件夹和文件
  2. 在AndroidManifest.xml文件中的android:windowSoftInputMode属性
  3. Android开发中布局属性的使用汇总
  4. android学习——EditText的属性
  5. Android EditText通过imeOptions属性控制软键盘的回车键变化:回车
  6. android:installLocation这个属性

随机推荐

  1. 2021年最新的PHP面试题(附答案)
  2. PHP实现统计在线人数的方法
  3. php垃圾回收机制实例介绍
  4. 总结PHP编程20大效率要点
  5. PHP代码加密的几种方法介绍
  6. PHP 加密:Password Hashing API
  7. PHP查找一列有序数组是否包含某值(二分查
  8. 关于php命令行模式介绍
  9. php实现根据身份证获取年龄
  10. PHP基于ElasticSearch做搜索