android中使用别人的UI框架

android中使用别人的UI框架(针对有自定义属性)

在主工程直接使用(子UI的代码在主工程当中) xmlns:my 直接在主工程里的写法
com.gsta.v2.activity 是主工程包名
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:my="http://schemas.android.com/apk/res/com.gsta.v2.activity"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/white"
android:orientation="vertical" >

<include layout="@layout/title_bar" />

<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

<include
android:id="@+id/nodata"
layout="@layout/nomore" />

<com.gsta.v2.ui.PullToRefreshListView
android:id="@+id/lv_1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:cacheColorHint="#00000000"
android:clickable="true"
android:fadingEdge="none"
my:ptrTag="pl_phone" >
</com.gsta.v2.ui.PullToRefreshListView>
</FrameLayout>
</LinearLayout>


如果下拉刷新UI框架代码全在子工程中,在主工程中使用的写法
[b][u][i]com.siqiao.sdk.pull_listview.ui 子UI所在的文件夹目录[/i][/u][/b](不使用子工程的包名:可能是因为打包时,子工程的代码都到主工程当中了,不能在子工程的包名中去找)
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:my="http://com.siqiao.sdk.pull_listview.ui/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/white"
android:orientation="vertical" >

<include layout="@layout/title_bar" />

<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

<include
android:id="@+id/nodata"
layout="@layout/nomore" />

<com.siqiao.sdk.pull_listview.ui.PullToRefreshListView
android:id="@+id/lv_1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:cacheColorHint="#00000000"
android:clickable="true"
android:fadingEdge="none"
my:ptrTag="pl_phone" >
</com.siqiao.sdk.pull_listview.ui.PullToRefreshListView>
</FrameLayout>
</LinearLayout>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值