• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Send and recieve sms not display in listview

I develop sms app using smsManager. I send and receive sms successfully but send and receive message not display in listview. I use listview adapter for display message in listview but nothing. Listview custom adapter code below:

publicclassMyCustomAdapterextendsArrayAdapter<String>{

publicMyCustomAdapter(Context context,int textViewResourceId,finalString wordslist){super(context, textViewResourceId);

}

TextView txt_worditem;

@SuppressLint("ViewHolder")@OverridepublicView getView(int position,View convertView,ViewGroup parent){View row = convertView;try{LayoutInflater inflater = getLayoutInflater();
row = inflater.inflate(R.layout.worditem, parent,false);
txt_worditem =(TextView) row
.findViewById(R.id.main_txt_worditem);//txt_worditem.setText(wordslist.get(position));// txt_worditem.setBackgroundColor(55 + AppSettings.bck_color);}catch(Exception e){Toast.makeText(Main.this, e.toString(),Toast.LENGTH_LONG).show();}

return row;}}
I set MyCustomAdapter in onCreate() method:

MyCustomAdapter mdp =newMyCustomAdapter(getApplicationContext(),R.layout.worditem, wordslist);
lv.setAdapter(mdp);
lv.setVisibility(View.VISIBLE);
Everything fine in code no error occurred but send and receive message not display in listview. Please help me for displaying message in listview.
 
Back
Top Bottom