设为首页 加入收藏

TOP

ViewPager+handler实现轮播(五)
2017-10-12 11:29:10 】 浏览:5961
Tags:ViewPager handler 实现
;utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="1dip" > <ImageView android:id="@+id/image" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:adjustViewBounds="true" android:contentDescription="@null" android:scaleType="fitXY" /> <ProgressBar android:id="@+id/loading" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:visibility="gone" /> </FrameLayout>

 

其实在android里 if(text ==null || text.length()==0)是有封装的。
在android.text.TextUtils里

public static boolean isEmpty(CharSequence str) {
        if (str == null || str.length() == 0)
            return true;
        else
            return false;
    }
所以我们可以使用
TextUtils.isEmpty(text)

代替

if(text == null || text.length() == 0)
首页 上一页 2 3 4 5 下一页 尾页 5/5/5
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇仿微信底部TAG完美渐变 下一篇圆形ImageView(可设置边缘厚度和..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目