摘要: ImageSwitcher的继承关系是: ImageSwitcher继承自ViewSwitcher,用于View之间的切换 ViewSwither继承自ViewAnimator,顾名思义可知,这个控件可以实现View之间切换时候的动画效果。 ImageSwitcher的主要方法有: is.setFactory(new ViewFactory(){@Overridepublic View make... 阅读全文
posted @ 2011-07-27 16:00 ihou 阅读(378) 评论(0) 推荐(0) 编辑
摘要: 效果图如下:1.不带有图标的 2.带有图标的主要有两个类:1.Picker2.CustomListViewPicker控件的外部接口:Picker控件的使用方法:public class Main extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final Picker picker=new Picker(this) 阅读全文
posted @ 2011-07-04 13:14 ihou 阅读(7271) 评论(2) 推荐(1) 编辑
摘要: TextView tv=new TextView(this);tv.setText("未查询到结果");tv.setGravity(Gravity.CENTER);searchResultlistView.setEmptyView(tv);LayoutParams params = new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT);addContentView(tv, params); 阅读全文
posted @ 2011-06-29 19:49 ihou 阅读(668) 评论(0) 推荐(0) 编辑
摘要: //通过反射来实现 @Override protected Dialog onCreateDialog(int id) { final AlertDialog.Builder builder=new AlertDialog.Builder(this); if(id==1){ builder.setTitle("标题"); builder.setMessage("消息"); final EditText et = new EditText(this); et.setWidth(LayoutParams.FILL_PARENT); et.setPadding 阅读全文
posted @ 2011-06-28 16:45 ihou 阅读(3507) 评论(0) 推荐(0) 编辑
摘要: 只需要下边的设置:textview.setSingleLine(); textview.setEllipsiz(TextUtils.TruncateAt.valueOf("END"));在xml中设置如下:android:singleLine="true" android:ellipsize="end" 阅读全文
posted @ 2011-06-28 16:13 ihou 阅读(59272) 评论(0) 推荐(1) 编辑