I'm trying to make my TextView layout_width to be fill parent throw code. this is my code:
TextView WatchMovieTitle;
private void PrintTheMovieAndYear() {
if (CountWords() > 23) {
// this is what im doing wrong
// WatchMovieTitle.setLayoutParams
// (new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
WatchMovieTitle.setText(movieList.get("movieName") + " " + "("
+ movieList.get("movieYear") + ")");
WatchMovieYear.setVisibility(View.GONE);
} else {
WatchMovieYear
.setText(" " + "(" + movieList.get("movieYear") + ")");
}
}
thanks!