Sunday, 15 January 2012

java - LayoutInflater nullpointexception -


I am trying to add an XML layout programmatically I error at time.setText (timeFormat) Is giving; When I remove this line, I get the default text value of TextView . I have also checked that time format is not zero why did I get this error?

This is my code: On Craft (),

  New GetContacts (). carry about (); AddPost (timeFormat, Message);  addPost ()  function: 

  public zero addPost (string timeframe, string postmessages) {layout infographic i = matching-layout infographic (); See v = i.inflate (R.layout.list_item, null); TextView Timeline = (TextView) FindViewById (R.id.time); Log D. ("Time has come", time format); Time.setText (timeFormat); TextView message 1 = (TextView) findViewById (R.id.message); Message1.setText (message); LinearLayout ll = (LinearLayout) findViewById (R.id.feedsLayout); Ll.addView (v); }  


No comments:

Post a Comment