2011-05-12 23:02:38
原创作品,允许转载,转载时请务必以超链接形式标明文章
原始出处 、作者信息和本声明。否则将追究法律责任。
http://terryblog.blog.51cto.com/1764499/564558
xmlns:gif
="http://schemas.android.com/apk/res/com.terry.jarTest"
android:id ="@+id/layout" android:orientation ="vertical"
android:layout_width ="fill_parent" android:layout_height ="fill_parent" >
< Button android:text ="停止" android:id ="@+id/Button01"
android:layout_width ="wrap_content" android:layout_height ="wrap_content" ></ Button >
< Button android:text ="开始" android:id ="@+id/Button02"
android:layout_width ="wrap_content" android:layout_height ="wrap_content" ></ Button >
< com.terry.gif.TypegifView
android:layout_width ="fill_parent" android:id ="@+id/gifView1"
gif:stop ="true" android:layout_height ="wrap_content"
gif:delay ="1" ></ com.terry.gif.TypegifView >
</ LinearLayout >
有一个不好的就是如果你项目中存在使用属性,必须也把属性一起复制到你要使用的项目中,要不然会识别不了。
android:id ="@+id/layout" android:orientation ="vertical"
android:layout_width ="fill_parent" android:layout_height ="fill_parent" >
< Button android:text ="停止" android:id ="@+id/Button01"
android:layout_width ="wrap_content" android:layout_height ="wrap_content" ></ Button >
< Button android:text ="开始" android:id ="@+id/Button02"
android:layout_width ="wrap_content" android:layout_height ="wrap_content" ></ Button >
< com.terry.gif.TypegifView
android:layout_width ="fill_parent" android:id ="@+id/gifView1"
gif:stop ="true" android:layout_height ="wrap_content"
gif:delay ="1" ></ com.terry.gif.TypegifView >
</ LinearLayout >
本文介绍了如何将Android项目的自定义组件打包成JAR文件,以便于在多个项目间复用。通过简单几步操作,可以有效减少代码重复,并提供了一个实际案例演示如何在新项目中引入并使用该JAR包。

266

被折叠的 条评论
为什么被折叠?



