上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 25 下一页

2013年7月11日

添加space_key, enter_key, clear_key, delete_key的处理。

摘要: final EditText view = (EditText) mInflater.inflate(R.layout.sms_receipient_input, null); view.setOnKeyListener(new View.OnKeyListener() { @Override public boolean onKey(View v, int... 阅读全文

posted @ 2013-07-11 19:12 勤修 阅读(767) 评论(0) 推荐(0) 编辑

实现ScrollviewSupportMaxHeight

摘要: public class ScrollviewSupportMaxHeight extends ScrollView { public final int MAX_HEIGHT = 150; public ScrollviewSupportMaxHeight(Context context, AttributeSet attrs) { super(... 阅读全文

posted @ 2013-07-11 17:37 勤修 阅读(456) 评论(0) 推荐(0) 编辑

extends android.view.ViewGroup两种实现

摘要: /* private int measureHeight(int heightMeasureSpec) { int count = getChildCount(); int rowCount = 1; int left = 0; int top = 0; int right = lef... 阅读全文

posted @ 2013-07-11 16:56 勤修 阅读(1593) 评论(0) 推荐(0) 编辑

View.setTag(key,object)异常:The key must be an application-specific resource id.

摘要: 07-11 13:43:26.184: E/AndroidRuntime(10229): FATAL EXCEPTION: main07-11 13:43:26.184: E/AndroidRuntime(10229): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.txrj.sms/com.txrj.... 阅读全文

posted @ 2013-07-11 13:53 勤修 阅读(10374) 评论(1) 推荐(1) 编辑

2013年7月10日

Android 一个apk多个ICON执行入口

摘要: 一个工程对应一个AndroidManifest.xml文件,这个文件中包含有该项目的一些设置,如权限、SDk版Activity、Service信息等。一般而言,这个文件中会有且仅有一个application节点,这个节点表示这是一个应用程序,不管它下面还有多少子节点如Activity、Service等等。形象的说,就是这个项目生成的apk安装到Android设备后,应用程序列表中会出现一个ICON... 阅读全文

posted @ 2013-07-10 21:48 勤修 阅读(326) 评论(0) 推荐(0) 编辑

判断是否为SIM卡联系人

摘要: 判断是否为SIM卡联系人 在AsyncQueryContacts类中。 private List accounts = new ArrayList(); private HashMap accountMap = new HashMap(); public AsyncQueryContacts(ContentResolver cr) { super(cr); in... 阅读全文

posted @ 2013-07-10 17:33 勤修 阅读(1257) 评论(0) 推荐(0) 编辑

显示联系人的头像

摘要: 显示联系人头像。判断Phone.PHOTO_ID是否为0,如果为0表示没有设置头像,就使用默认的联系人头像,否则就使用用户设置的头像。 private void setDefaultPhoto(ViewHolder holder, boolean bSim) { if (defaultPhoto == null) { defaultPhoto = BitmapF... 阅读全文

posted @ 2013-07-10 16:33 勤修 阅读(303) 评论(0) 推荐(0) 编辑

android API之android.text.TextWatcher

摘要: When an object of a type is attached to an Editable, its methods will be called when the text is changed. 接口TextWatcher定义了三个抽象方法: public void beforeTextChanged(CharSequence s, int start, int count, ... 阅读全文

posted @ 2013-07-10 15:20 勤修 阅读(1710) 评论(0) 推荐(0) 编辑

Android开发之动态检索(Filter)联系人

摘要: 1. 将所有联系人都转换为数字串,存到列表中。 将联系人姓名转换为数字串。例如,张丽思创->zlsc->9572。 过程解析: 张 – zhang – z – 9 丽 – li – l – 5 思 – si – s –7 创 – chuang – c – 2 2. 让ContactListAdapter实现接口android.widget.Filterable 在接口方法getFi... 阅读全文

posted @ 2013-07-10 15:02 勤修 阅读(352) 评论(0) 推荐(0) 编辑

android.widget.BaseAdapter调用DataSetObservable.notifyChanged/Invalidated

摘要: 在android.widget.BaseAdapter类中定义了两个notifyDataXXX方法。 public void notifyDataSetChanged() { mDataSetObservable.notifyChanged(); } public void notifyDataSetInvalidated() { mDataSetObservab... 阅读全文

posted @ 2013-07-10 14:48 勤修 阅读(921) 评论(0) 推荐(0) 编辑

上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 25 下一页

导航