随笔分类 -  android

上一页 1 2 3
GridView 滑动到底部时加载新数据
摘要:首先是GridView监听Scoll事件,当到达底部是,做相应的操作。具体的GridViewScoll事件,网络牛人已经写的很好了,转载地http://blog.csdn.net/hellogv/article/details/6615487View Code /** * @author admin * GridView 滑动监听器 */public class GridScrollListener implements OnScrollListener { /** * 到底部时回调函数 */ public interface AutoLoadCal... 阅读全文
posted @ 2012-12-07 15:47 冲锋的路上的兵 阅读(1647) 评论(0) 推荐(0)
Ksoap SoapPrimitive 与 SoapObject
摘要:今天做Android 连Webservice时遇到SoapObject soapObject = (SoapObject) envelope.getResponse();System.out.println(soapObject.toString());总是会报错,换了一下代码顺利通过:SoapPrimitive response = (SoapPrimitive) envelope.getResponse();System.out.println(response.toString());查了一下原文档粗糙翻译下:SoapObject:能够被用于建立Soap的简单的动态对象,调用它无需继承K 阅读全文
posted @ 2012-12-06 11:43 冲锋的路上的兵 阅读(3435) 评论(0) 推荐(0)
LayoutInflater.from()和LayoutInflater.inflate()方法
摘要:通俗的说,inflate就相当于将一个xml中定义的布局找出来.因为在一个Activity里如果直接用findViewById()的话,对应的是setConentView()的那个layout里的组件.因此如果你的Activity里如果用到别的layout,比如对话框上的layout,你还要设置对话框上的layout里的组件(像图片ImageView,文字TextView)上的内容,你就必须用inflate()先将对话框上的layout找出来,然后再用这个layout对象去找到它上面的组件,如:LayoutInflater inflater = LayoutInflater.from(this 阅读全文
posted @ 2012-12-04 09:41 冲锋的路上的兵 阅读(695) 评论(0) 推荐(0)
View 局部刷新 是注意
摘要:在使用局部更改页面布局时,遇到viewpage怎么修改都会把下想要不变的地方给“充斥”到外部,导致看不见可以给当前view用代码设置大小LinearLayout.LayoutParams mParam = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,LinearLayout.LayoutParams.WRAP_CONTENT); _view.setLayoutParams(mParam);简做记录ViewPage 还有很多地方需学习 阅读全文
posted @ 2012-12-03 15:54 冲锋的路上的兵 阅读(158) 评论(0) 推荐(0)
ListView控件 数据加载
摘要:这个太常用了 做下记录。 ListView可以简单的呈现大数据的浏览,加载图片,文字。。等等 网络也有很多Demo,我就不多说了首先给个ListView控件:listview_widget.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/listview_layout" android: 阅读全文
posted @ 2012-11-27 16:48 冲锋的路上的兵 阅读(250) 评论(0) 推荐(0)
LayoutInflater Activity重新布局利器
摘要:当你觉得activity太多时怎么办,能不能把多个activity 界面布局融合到一个activity上然后点击刷新呢?LayoutInflater 就是这样的对象, 可以不断载入不同的 Layout XML,然后找到自己的控件,添加点击事件,最后加到这个view里。具体如下: 1.创建一个Layout XML 作为容器 里面就一个LinearLayout 作为承载其他Layout XML 的“父类”; <?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android=& 阅读全文
posted @ 2012-11-26 17:30 冲锋的路上的兵 阅读(676) 评论(0) 推荐(0)
ViewPager 使用
摘要:太久没有接触android 今天再次重回android 一开始就来看看 Android 新功能 ViewPager其主要功能 类似翻页效果,如微信,淘宝等首次使用都会出现的欢迎界面,一页一页的翻ViewPage 我使用ViewPage 来做首页导航页面间的滑动main_activity.xmlView CodeMainActivity.classView Code public class MainActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { ... 阅读全文
posted @ 2012-11-21 17:25 冲锋的路上的兵 阅读(324) 评论(0) 推荐(0)
IDL(接口描述语言)
摘要:IDL通过一种中立的方式来描述接口,使得在不同平台上运行的对象和用不同语言编写的程序可以相互通信交流;比如,一个组件用C++写成,另一个组件用Java写成。IDL建立起了两个不同操作系统间通信的桥梁。Android Interface Definition Language(AIDL)It allows you to define the programming interface that both the client and service agree upon in order to communicate with each other using interprocess comm 阅读全文
posted @ 2012-09-12 19:27 冲锋的路上的兵 阅读(2140) 评论(0) 推荐(0)

上一页 1 2 3