码迷,mamicode.com
首页 >  
搜索关键字:scrollview viewpager listview    ( 8101个结果
Android学习---ListView和Inflater的使用,将一个布局文件转化为一个对象
本文将介绍ListView和Inflater的使用,将接上一篇文章内容.一.什么是ListView?在android开发中ListView是比较常用的控件,ListView控件可使用四种不同视图显示项目,1.大(标准)图标2.小图标3.列表4.报表,比较常用的是列表的形式.ListItem对象可包含...
分类:移动开发   时间:2014-06-18 22:14:17    阅读次数:354
android UI进阶之实现listview的分页加载
分享了下拉刷新,这是一个用户体验非常好的操作方式。新浪微薄就是使用这种方式的典型。...
分类:移动开发   时间:2014-06-16 20:43:49    阅读次数:236
Android4.0设置界面修改总结(三)
Android4.0设置界面修改总结大概介绍了一下设置改tab风格,其实原理很简单,理解两个主要的函数即可: ①.invalidateHeaders(),调用此函数将重新调用onBuildHeader()来重新读取xml文件中的header,重新刷新HeaderAdapter中的数据,因此刷新了ListView的内容,从而更新了界面。 ②.onBuildHeaders()中调用loadHead...
分类:移动开发   时间:2014-06-16 14:20:36    阅读次数:554
Android 嵌套GridView,ListView只显示一行的解决办法
重写ListView、GridView即可:public class MyListView extends ListView { public MyListView(Context context) { // TODO Auto-generated method stub ...
分类:移动开发   时间:2014-06-15 18:09:15    阅读次数:296
cocos2d-x3.0 ListView
.h#include "cocos2d.h"#include "cocos-ext.h"#include "ui/CocosGUI.h"#include "cocostudio/CocoStudio.h"USING_NS_CC;USING_NS_CC_EXT;using namespace ui; ...
分类:其他好文   时间:2014-06-15 11:16:25    阅读次数:276
使用UILabel实现滚动字幕移动效果
使用UILabel实现滚动字幕移动效果这个链接中的代码也实现了这种效果https://github.com/cbpowell/MarqueeLabel最终效果如下:原理如下:1. 获取文本2. 计算文本宽度3. 将这个Label放入ScrollView中4. 将ScrollView的contentS...
分类:移动开发   时间:2014-06-14 16:55:50    阅读次数:362
Android:ViewPager扩展详解——带有导航的ViewPagerIndicator(附带图片缓存,异步加载图片)
大家都用过viewpager了, github上有对viewpager进行扩展,导航风格更加丰富,这个开源项目是ViewPagerIndicator,很好用,但是例子比较简单,实际用起来要进行很多扩展,比如在fragment里进行图片缓存和图片异步加载。 下面是ViewPagerIndicator源码运行后的效果,大家也都看过了,我多此一举截几张图; 下载源码请点击这里...
分类:移动开发   时间:2014-06-14 15:04:53    阅读次数:756
ListView IllegalStateException
贴出源码: android.widget.ListView ... if(mItemCount == 0){ resetList(); invokeOnItemScrollListener(); return; }else if(mItemCount != mAdapter.getCount()){ throw new IllegalStateException("The conte...
分类:其他好文   时间:2014-06-14 12:34:02    阅读次数:245
Android监听ScrollView滑动到顶端和底部
MainActivity如下: package cn.testscrollview; import android.os.Bundle; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; import android.widget.ScrollV...
分类:移动开发   时间:2014-06-14 06:34:10    阅读次数:415
Android ListFragment实例Demo(自定义适配器)
上一篇文章介绍了ListFragment,其中的ListView并没有自定义适配器,实际上在实际开发中常会用到自定义适配器,是实现更复杂的列表数据展示。所以这篇文章增加了自定义适配器,来进行ListView数据的展示。 实现效果图: 左边是Activity中的一个按钮,点击按钮会出现右边的Fragment相应的数据列表。 代码展示: 布局文件: activity_main: ...
分类:移动开发   时间:2014-06-13 21:36:50    阅读次数:404
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!