use of app.philm.in.view.PhilmImageView in project philm by chrisbanes.
the class MovieSectionedListAdapter method bindView.
@Override
protected void bindView(int position, View view, ListItem<PhilmMovie> item) {
PhilmMovie movie = item.getListItem();
final TextView title = (TextView) view.findViewById(R.id.textview_title);
if (movie.getYear() > 0) {
title.setText(mActivity.getString(R.string.movie_title_year, movie.getTitle(), movie.getYear()));
} else {
title.setText(movie.getTitle());
}
final TextView ratingTextView = (TextView) view.findViewById(R.id.textview_subtitle_1);
ratingTextView.setText(mActivity.getString(R.string.movie_rating_votes, movie.getAverageRatingPercent(), movie.getAverageRatingVotes()));
final TextView release = (TextView) view.findViewById(R.id.textview_subtitle_2);
mDate.setTime(movie.getReleasedTime());
release.setText(mActivity.getString(R.string.movie_release_date, mMediumDateFormatter.format(mDate)));
final PhilmImageView imageView = (PhilmImageView) view.findViewById(R.id.imageview_poster);
imageView.loadPoster(movie);
}
use of app.philm.in.view.PhilmImageView in project philm by chrisbanes.
the class PersonCreditSectionedListAdapter method bindView.
@Override
protected void bindView(int position, View view, ListItem<PhilmPersonCredit> item) {
PhilmPersonCredit credit = item.getListItem();
final TextView nameTextView = (TextView) view.findViewById(R.id.textview_title);
nameTextView.setText(credit.getTitle());
final TextView characterTextView = (TextView) view.findViewById(R.id.textview_subtitle_1);
if (TextUtils.isEmpty(credit.getJob())) {
characterTextView.setVisibility(View.GONE);
} else {
characterTextView.setVisibility(View.VISIBLE);
characterTextView.setText(credit.getJob());
}
final TextView release = (TextView) view.findViewById(R.id.textview_subtitle_2);
mDate.setTime(credit.getReleaseDate());
release.setText(mActivity.getString(R.string.movie_release_date, mMediumDateFormatter.format(mDate)));
final PhilmImageView imageView = (PhilmImageView) view.findViewById(R.id.imageview_poster);
imageView.loadPoster(credit);
}
use of app.philm.in.view.PhilmImageView in project philm by chrisbanes.
the class SideMenuFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedState) {
View view = inflater.inflate(R.layout.fragment_drawer, container, false);
mListView = (ListView) view.findViewById(android.R.id.list);
mListView.setOnItemClickListener(this);
mListView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
mAdapter = new SideMenuItemAdapter();
mListView.setAdapter(mAdapter);
mAddAccountLayout = view.findViewById(R.id.layout_add_account);
mAddAccountLayout.setOnClickListener(this);
mProfileLayout = view.findViewById(R.id.layout_profile);
mUsernameTextView = (TextView) view.findViewById(R.id.textview_username);
mFullnameTextView = (TextView) view.findViewById(R.id.textview_fullname);
mAvatarImageView = (ImageView) view.findViewById(R.id.imageview_account_avatar);
mCheckinLayout = view.findViewById(R.id.layout_checkin);
mCheckinLayout.setOnClickListener(this);
mCheckinImageView = (PhilmImageView) view.findViewById(R.id.imageview_checkin_movie);
mCheckinImageView.setAutoFade(false);
mCheckinTitleTextView = (TextView) mCheckinLayout.findViewById(R.id.textview_title);
final int darkenByte = Math.round(255 * CHECKIN_BACKDROP_DARKEN);
mColorFilter = new LightingColorFilter(Color.rgb(darkenByte, darkenByte, darkenByte), 0);
return view;
}
use of app.philm.in.view.PhilmImageView in project philm by chrisbanes.
the class MovieGridAdapter method getView.
@Override
public View getView(int position, View convertView, ViewGroup viewGroup) {
View view = convertView;
if (view == null) {
view = mLayoutInflater.inflate(R.layout.item_grid_movie, viewGroup, false);
}
final PhilmMovie movie = getItem(position).getListItem();
final TextView title = (TextView) view.findViewById(R.id.textview_title);
title.setText(movie.getTitle());
title.setVisibility(View.VISIBLE);
final PhilmImageView imageView = (PhilmImageView) view.findViewById(R.id.imageview_poster);
imageView.setAutoFade(false);
imageView.loadPoster(movie, new PhilmImageView.Listener() {
@Override
public void onSuccess(PhilmImageView imageView, Bitmap bitmap) {
title.setVisibility(View.GONE);
}
@Override
public void onError(PhilmImageView imageView) {
title.setVisibility(View.VISIBLE);
}
});
return view;
}
use of app.philm.in.view.PhilmImageView in project philm by chrisbanes.
the class PersonSectionedListAdapter method bindView.
@Override
protected void bindView(int position, View view, ListItem<PhilmPerson> item) {
PhilmPerson person = item.getListItem();
final TextView nameTextView = (TextView) view.findViewById(R.id.textview_title);
nameTextView.setText(person.getName());
final PhilmImageView imageView = (PhilmImageView) view.findViewById(R.id.imageview_poster);
imageView.setAvatarMode(true);
imageView.loadProfile(person);
}
Aggregations