摘要: 功能:滑动切换视图、标题栏。标题栏字体颜色随当前视图改变而改变。点击标题栏可切换视图。1.主页面布局: 2.为显示每个ViewPager页面新建xml文件:vp_page1.xml,vp_page2.xml,vp_page... 阅读全文
posted @ 2015-09-21 20:12 pepelu 阅读(679) 评论(0) 推荐(0) 编辑
摘要: 功能:滑动切换视图,具有标题栏。1.在布局文件中加入android.support.v4.view.ViewPager: 2.为显示每个ViewPager页面新建xml文件:vp_page1.xml,vp_page2.xml,vp_page3.xml 3.在Act... 阅读全文
posted @ 2015-09-21 19:05 pepelu 阅读(425) 评论(0) 推荐(0) 编辑
摘要: 调用Activity的getLayoutInflater()方法LayoutInflater inflater = getLayoutInflater();**View view = inflater.inflate(R.layout.xx);LayoutInflater inflater=Layo... 阅读全文
posted @ 2015-09-21 17:38 pepelu 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 1.新建一个ActivityCollector类用于存放并操作Acitivity实例。public class ActivityCollector { public static List activities = new ArrayList(); // 添加 public sta... 阅读全文
posted @ 2015-09-21 11:42 pepelu 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 参考:http://www.mkyong.com/android/android-imagebutton-selector-example/http://developer.android.com/guide/topics/ui/controls.html1.在res/drawable文件夹下新建f... 阅读全文
posted @ 2015-09-19 16:55 pepelu 阅读(658) 评论(0) 推荐(0) 编辑
摘要: xml文件中: activity中:public class MainActivity extends Activity { TextView textView; HashMap radio; @Override ... 阅读全文
posted @ 2015-09-19 15:55 pepelu 阅读(1604) 评论(0) 推荐(0) 编辑
摘要: 在做使用Intent启动图片裁剪时遇到一个问题:分开调用Intent#setData();Intent#setType();这两个方法时,程序无法正确运行,但使用Intent#setDataAndType();程序正常运行。原因分析:查看Intent#setData(),Intent#setType... 阅读全文
posted @ 2015-09-19 14:28 pepelu 阅读(347) 评论(0) 推荐(0) 编辑
摘要: 在一个主界面(主Activity)上能连接往许多不同子功能模块(子Activity上去),当子模块的事情做完之后就回到主界面,或许还同时返回一些子模块完成的数据交给主Activity处理。这样的数据交流就要用到回调函数onActivityResult()。public class MainActiv... 阅读全文
posted @ 2015-09-18 16:51 pepelu 阅读(10339) 评论(0) 推荐(0) 编辑
摘要: 图片裁剪:public class MainActivity extends Activity { public final int START_CAMERA_RESULT = 1; public final int START_PIC_CROP_RESULT = 2; publi... 阅读全文
posted @ 2015-09-18 11:25 pepelu 阅读(186) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/lihengfang/article/details/8290754http://developer.android.com/intl/zh-cn/guide/topics/ui/themes.htmlhttp://www.cnblogs.com/wangf... 阅读全文
posted @ 2015-09-17 20:25 pepelu 阅读(279) 评论(0) 推荐(0) 编辑