第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定

無法顯示發(fā)送記錄

有沒有人遇到發(fā)送完短信切換到發(fā)送記錄就一直顯示一個progressBar,并沒有顯示發(fā)送記錄?

正在回答

2 回答

1、確認(rèn)是否寫入了數(shù)據(jù)庫,可以通過命令行看

2、數(shù)據(jù)寫入數(shù)據(jù)庫了,沒有顯示出來(也是我遇到的問題),原因是SmsProvider中的query寫錯了,正確的應(yīng)該是:

@Nullable
@Override
public?Cursor?query(Uri?uri,?String[]?projection,?String?selection,?String[]?selectionArgs,?String?sortOrder)?{
????int?match?=?matcher.match(uri);
????switch?(match)?{
????????case?SMS_ALL:
????????????break;
????????case?SMS_ONE:
????????????long?id?=?ContentUris.parseId(uri);
????????????selection?=?"_id=?";
????????????selectionArgs?=?new?String[]{String.valueOf(id)};
????????????break;
????????default:
????????????throw?new?RSIllegalArgumentException("Wrong?URI:"?+?uri);
????}
????mDb?=?mHelper.getReadableDatabase();
????Cursor?cursor?=?mDb.query(SendedMsg.TABLE_NAME,?projection,?selection,?selectionArgs,?null,?null,?sortOrder);
????cursor.setNotificationUri(getContext().getContentResolver(),?URI_SMS_ALL);
????//cursor.close();
????return?cursor;
}

注意最后兩行代碼

1 回復(fù) 有任何疑惑可以回復(fù)我~
#1

botao555 提問者

非常感謝!
2016-02-20 回復(fù) 有任何疑惑可以回復(fù)我~

newView和bindView沒有被調(diào)用是為什么?

mCursorAdapter?=?new?CursorAdapter(getActivity(),?null,?false)?{

????@Override
????public?View?newView(Context?context,?Cursor?cursor,?ViewGroup?parent)?{
????????Log.e("CBT",?"newView-->");
????????View?view?=?mInflater.inflate(R.layout.item_sended_msg,?parent,?false);
????????return?view;
????}

????@Override
????public?void?bindView(View?view,?Context?context,?Cursor?cursor)?{
????????Log.e("CBT",?"bindView-->");
????????TextView?msg?=?(TextView)?view.findViewById(R.id.id_tv_msg);
????????FlowLayout?fl?=?(FlowLayout)?view.findViewById(R.id.id_fl_contacts);
????????TextView?fes?=?(TextView)?view.findViewById(R.id.id_tv_fes);
????????TextView?date?=?(TextView)?view.findViewById(R.id.id_tv_date);

????????msg.setText(cursor.getString(cursor.getColumnIndex(SendedMsg.COLUMN_MSG)));
????????fes.setText(cursor.getString(cursor.getColumnIndex(SendedMsg.COLUMN_FES_NAME)));
????????date.setText(cursor.getString(cursor.getColumnIndex(SendedMsg.COLUMN_DATE)));

????????String?names?=?cursor.getString(cursor.getColumnIndex(SendedMsg.COLUMN_NAMES));
????????Log.e("CBT","namesBefore-->"+names);
????????if?(TextUtils.isEmpty(names))?{
????????????return;
????????}
????????Log.e("CBT","namesAfter-->"+names);
????????fl.removeAllViews();
????????for?(String?name?:?names.split(":"))?{
????????????addTag(name,fl);
????????}
????}
};


0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

無法顯示發(fā)送記錄

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號