我有一个foll。方法A类无法从其他班级方法检索值
public String getContactNameFromNumber(String number) {
// define the columns I want the query to return
String[] projection = new String[]{
Phones.DISPLAY_NAME,
Phones.NUMBER};
// encode the phone number and build the filter URI
Uri contactUri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(fname));
// query time
Cursor c = getContentResolver().query(contactUri, projection, null,
null, null);
// if the query returns 1 or more results
// return the first result
if (c.moveToFirst()) {
String name = c.getString(c
.getColumnIndex(Phones.DISPLAY_NAME));
return name;
}
// return the original number if no match was found
return number;
}
我想从变量FNAME retrive值和其他B类的列表视图插入值
之间的桥梁,沟通,你必须学习Java的基础知识之前的一个例子。对于至少一个弱点做适当的处理。 – Gunaseelan 2014-09-20 09:43:36
感谢您的智能建议 – Dharmendra 2014-09-20 09:45:42
这是非常非常基本的问题。这就是为什么没有人没有回答你。在stackoverflow中,没有人愿意教你。你必须学会,从stackoverflow你可以澄清你的疑惑,没有人愿意为你编写代码。 – Gunaseelan 2014-09-20 09:46:13