I have this now:
private void setupViews()
{
MergeAdapter adapter=new MergeAdapter();
LayoutInflater inflater = (LayoutInflater)this.getSystemService
(Context.LAYOUT_INFLATER_SERVICE);
View filmLayout = inflater.inflate(R.layout.filmdetail_layout,
null);
plot = (TextView) filmLayout.findViewById(R.id.plot);
filmTitle = (TextView)
filmLayout.findViewById(R.id.txtFilmTitle);
filmAverage = (TextView)
filmLayout.findViewById(R.id.filmAverage);
filmVotes = (TextView) filmLayout.findViewById(R.id.filmVotes);
filmRating = (RatingBar)
filmLayout.findViewById(R.id.filmRating);
filmImg = (ImageView)
filmLayout.findViewById(R.id.imgFilmDetail);
adapter.addView(filmLayout);
//reviews = new ArrayList<Review>();
//this.reviAdapter = new reviewsAdapter(this,
R.layout.review_row, reviews);
setListAdapter(adapter);
}
so i add one view with all the widgets except of my custom list
adapter.
And then i want to do this
filmTitle.setText(detail.getTitle() + " (" + detail.getYear() + ")");
plot.setText(detail.getPlot());
filmAverage.setText("gemiddelde: " + detail.getAverage());
filmVotes.setText(detail.getVotes_count() + " stemmen");
filmRating.setRating(Float.valueOf(detail.getAverage()));
and it gives nullpointerexception..
On 19 sep, 19:02, Wouter <[email protected]> wrote:
> Ok but is the MergeAdapter not better for adding a listadapter to the
> listview? or how can i do that too with SackOfViewsAdapter?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---