摘要: OK. What I'm trying to achieve is a layout that does the same effect as frozen panes in Excel. That is I want a header row that scrolls horizontally with the main ListView and a left hand ListView that scrolls vertically with the main ListView. The header row and the left hand listview should re 阅读全文
posted @ 2014-03-29 15:15 brave-sailor 阅读(595) 评论(0) 推荐(0)
摘要: 方法四: 添加一个EditText,作为搜索框 + Filter 其实这个不算第四个方法,因为与第二个一样,主要是实现Filter。 但是对于EditText的监听,我以前也没有写过,所以也记录一下。 实现步骤: 1.添加一个EditText,并添加监听事件 ```Java EditText search_tv = (EditText) findViewById(R.id.search_et); search_tv.addTextChangedListener(new TextWatcher() { @Override public void onTextChanged(CharSequenc 阅读全文
posted @ 2014-03-29 14:52 brave-sailor 阅读(260) 评论(0) 推荐(0)
摘要: 方法三: android:fastScrollEnabled="true"这个很简单,只要把属性设置了,就可以起作用了不过这个滑块比较丑,当然网上也有自定义图片的例子。参考 : http://www.eoeandroid.com/forum.php?mod=viewthread&tid=176342其实就是利用了反射: ```Java try {123456789 Field f = AbsListView.class.getDeclaredField("mFastScroller"); f.setAccessible(true); Object 阅读全文
posted @ 2014-03-29 14:51 brave-sailor 阅读(395) 评论(0) 推荐(0)
摘要: 方法二:android:textFilterEnabled="true" + Filter这个属性在android.widget.AbsListView下,要求adapter必须实现Filterable接口参考: http://justcallmebrian.com/?p=149实现步骤:1.listview布局文件中设置android:textFilterEnabled="true"或代码中listview.setTextFilterEnabled(true);2.adapter实现Filterable接口Filterable接口很简单,就只有一个方法 阅读全文
posted @ 2014-03-29 14:50 brave-sailor 阅读(1815) 评论(0) 推荐(0)
摘要: 方法一: SectionIndexer接口 + 索引列表参考: http://www.apkbus.com/android-69999-1-1.html所谓section 就是一组有共性的item, 比如由相同的字母开头SectionIndexer接口主要的方法有:实现步骤:1.给listview添加section 1 2 3 4 5 6 7 8 91011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 阅读全文
posted @ 2014-03-29 14:48 brave-sailor 阅读(965) 评论(0) 推荐(0)