Java 类com.android.volley.toolbox.NetworkImageView 实例源码

项目:android-advanced-light    文件:MainActivity.java   
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        iv_image = (ImageView) this.findViewById(R.id.iv_image);
        bt_send = (Button) this.findViewById(R.id.bt_send);
        nv_image = (NetworkImageView) this.findViewById(R.id.nv_image);
        mQueue = Volley.newRequestQueue(getApplicationContext());
        bt_send.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//                UseStringRequest();
                  UseJsonRequest();
//                UseImageRequest();
//                UseImageLoader();
//                UseNetworkImageView();
            }
        });
    }
项目:crockpod    文件:PodcastArrayAdapter.java   
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
    View view = getView(convertView, parent);
    TextView titleView = view.findViewById(R.id.podcast_search_item_title);
    TextView authorView = view.findViewById(R.id.podcast_search_item_author);
    NetworkImageView logoView = view.findViewById(R.id.podcast_search_item_logo);

    if (position % 2 == 0) {
        view.setBackgroundColor(getContext().getResources().getColor(R.color.colorAlmostPrimary, null));
    } else {
        view.setBackgroundColor(getContext().getResources().getColor(R.color.colorPrimary, null));
    }

    Podcast podcast = getItem(position);

    if (podcast != null) {
        titleView.setText(podcast.getName());
        authorView.setText(podcast.getAuthor());
        logoView.setImageUrl(podcast.getLogoUrl(), mImageLoader);
    }
    return view;
}
项目:GYAppAnd    文件:RecyclerAdapterEtkinlik.java   
public RecyclerItemViewHolder(final View parent, TextView titleTextView,
                              TextView mStartDateTextView, TextView mEndDateTextView,
                              NetworkImageView mImageView, TextView id, TextView gun, LinearLayout layout_gun) {

    super(parent);
    parent.setClickable(true);
    parent.setOnClickListener(this);
    mTitleTextView = titleTextView;
    this.mStartDateTextView = mStartDateTextView;
    this.mEndDateTextView = mEndDateTextView;
    this.mImageView = mImageView;
    this.profilid = id;
    this.days = gun;
    this.layout = layout_gun;

}
项目:GYAppAnd    文件:RecyclerAdapterBlog.java   
public static RecyclerItemViewHolder newInstance(final View parent) {
    TextView blogID = (TextView) parent.findViewById(R.id.blogID);
    TextView title = (TextView) parent.findViewById(R.id.itemBaslik);
    TextView date = (TextView) parent.findViewById(R.id.blogTarih);
    TextView author = (TextView) parent.findViewById(R.id.profilIsim);
    TextView excerpt = (TextView) parent.findViewById(R.id.itemOzet);
    TextView categories = (TextView) parent.findViewById(R.id.categories);
    final TextView profileID = (TextView) parent.findViewById(R.id.profilID);

    NetworkImageView image = (NetworkImageView) parent.findViewById(R.id.image);
    CircleImageView avatar = (CircleImageView) parent.findViewById(R.id.profile_image);

    avatar.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            Intent i = new Intent(parent.getContext(), ProfilActivity.class);
            i.putExtra(Kisi.PROFIL_ID, profileID.getText());
            parent.getContext().startActivity(i);
        }
    });

    return new RecyclerItemViewHolder(parent, title, date, author, excerpt, categories, image, avatar, profileID, blogID);
}
项目:MeifuGO    文件:HomeViewDelegate.java   
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    CellHolder _cellHolder = null;

    if (convertView == null) {
        convertView = mInflater.inflate(R.layout.list_home, null);
        _cellHolder = new CellHolder();
        _cellHolder.list_home_type = (TextView) convertView.findViewById(R.id.list_home_type);
        _cellHolder.list_home_title = (TextView) convertView.findViewById(R.id.list_home_title);
        _cellHolder.list_home_image = (NetworkImageView) convertView.findViewById(R.id.list_home_image);
        _cellHolder.list_home_image.setImageShapeType(NetworkImageView.CIRCLE_IMAGE);
        convertView.setTag(_cellHolder);
    } else {
        _cellHolder = (CellHolder) convertView.getTag();
    }
    ArtCopyModel artModel = artModels_.get(position);
    _cellHolder.list_home_type.setText(UType.getType(artModel.getmType()));
    _cellHolder.list_home_title.setText(artModel.getTitle());
    UserModel userModel = artModel.getUser();
    if(userModel!=null){
        _cellHolder.list_home_image.setImageUrl(userModel.getUserimage(), R.drawable.icon);
    }

    return convertView;
}
项目:MeifuGO    文件:MineViewDelegate.java   
@Override
public void initWidget() {
    super.initWidget();
    NetworkImageView imageView = get(R.id.user_image);
    imageView.setImageShapeType(NetworkImageView.CIRCLE_IMAGE);
    imageView.setImageUrl(AppHper.getAppUser().getUserimage(), R.drawable.icon);
    TextView textView3 = get(R.id.textView3);
    textView3.setText(AppHper.getAppUser().getUsername());
    get(R.id.textView6).setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            showAlert(DIALOG_NORMAL, "DrCoSu工作室\n线永洁");
        }
    });

    setOnClickListener(this,R.id.textView5,R.id.textView6);
}
项目:Mimix-Client    文件:Post_Fragment.java   
PostDatabaseHolder(View row) {

                    uname=(TextView)row.findViewById(R.id.row_username);
                    post_body=(TextView)row.findViewById(R.id.row_body);
                    date_time=(TextView)row.findViewById(R.id.row_date_time);
                    image=(NetworkImageView)row.findViewById(R.id.row_image);
                    pimage=(ImageView)row.findViewById(R.id.row_postimage);
                    RateBar=(RatingBar)row.findViewById(R.id.row_ratingbar);
                    ratebtn=(Button)row.findViewById(R.id.rate_clk);
                    sharebtn=(Button)row.findViewById(R.id.share_clk);
                    commentbtn=(Button)row.findViewById(R.id.comment_clk);
                    rowpopup=(ImageButton)row.findViewById(R.id.row_popup);
                    //image.setErrorImageResId(R.drawable.me);
                    image.setDefaultImageResId(R.drawable.me);

                    ratebtn.setOnClickListener(clickListener);
                    commentbtn.setOnClickListener(clickListener);
                    sharebtn.setOnClickListener(clickListener);
                    rowpopup.setOnClickListener(clickListener);


                }
项目:Mimix-Client    文件:MyProfileActivity.java   
ProfileHolder(View row) {

uname=(TextView)row.findViewById(R.id.prow_username);
post_body=(TextView)row.findViewById(R.id.prow_body);
date_time=(TextView)row.findViewById(R.id.prow_date_time);
image=(NetworkImageView)row.findViewById(R.id.prow_image);
pimage=(ImageView)row.findViewById(R.id.prow_postimage);
RateBar=(RatingBar)row.findViewById(R.id.prow_ratingbar);
   ratebtn=(Button)row.findViewById(R.id.profrate_clk);
   sharebtn=(Button)row.findViewById(R.id.profshare_clk);
commentbtn=(Button)row.findViewById(R.id.profcomment_clk);

//image.setErrorImageResId(R.drawable.me);
image.setDefaultImageResId(R.drawable.me);


}
项目:csdn    文件:CommentsAdapter.java   
@Override
public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
    ViewHolder holder = null;
    if (convertView == null) {
        holder = new ViewHolder();
        convertView = LayoutInflater.from(mContext).inflate(R.layout.item_comments, parent, false);
        holder.head = (NetworkImageView) convertView.findViewById(R.id.item_comments_head);
        holder.name = (TextView) convertView.findViewById(R.id.item_comments_name);
        holder.time = (TextView) convertView.findViewById(R.id.item_comments_time);
        holder.content = (TextView) convertView.findViewById(R.id.item_comments_content);
        convertView.setTag(holder);
    } else {
        holder = (ViewHolder) convertView.getTag();
    }
    Comments.DataEntity entity = mCommentsList.get(groupPosition);
    if (entity != null) {

        holder.name.setText(mCommentsList.get(groupPosition).getUsername());
        holder.time.setText(mCommentsList.get(groupPosition).getCreate_time());
        holder.content.setText(mCommentsList.get(groupPosition).getBody());
        holder.head.setImageUrl(mCommentsList.get(groupPosition).getAvatar(), mImageLoader);
    }
    return convertView;
}
项目:csdn    文件:CommentsAdapter.java   
@Override
public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
    ViewHolder holder = null;
    if (convertView == null) {
        holder = new ViewHolder();
        convertView = LayoutInflater.from(mContext).inflate(R.layout.item_comments, parent, false);
        holder.head = (NetworkImageView) convertView.findViewById(R.id.item_comments_head);
        holder.name = (TextView) convertView.findViewById(R.id.item_comments_name);
        holder.time = (TextView) convertView.findViewById(R.id.item_comments_time);
        holder.content = (TextView) convertView.findViewById(R.id.item_comments_content);
        holder.layout = (LinearLayout) convertView.findViewById(R.id.item_comments_layout);
        convertView.setTag(holder);
    } else {
        holder = (ViewHolder) convertView.getTag();
    }
    holder.layout.setPadding(100, 0, 0, 0);
    holder.name.setText(mCommentsList.get(groupPosition).getChildren().get(childPosition).getUsername());
    holder.time.setText(mCommentsList.get(groupPosition).getChildren().get(childPosition).getCreate_time());
    holder.content.setText(mCommentsList.get(groupPosition).getChildren().get(childPosition).getBody());
    holder.head.setImageUrl(mCommentsList.get(groupPosition).getChildren().get(childPosition).getAvatar(), mImageLoader);
    return convertView;
}
项目:material-components-android    文件:ItemActivity.java   
private void populateProductViews() {
  Bundle bundle = getIntent().getExtras();
  if (bundle == null) {
    String error = "Error retrieving product information.";
    Log.e(TAG, error);
    Snackbar.make(findViewById(R.id.ProductTitle), error, Snackbar.LENGTH_SHORT).show();
    fabMessage = error;
  } else {
    TextView productTitle = findViewById(R.id.ProductTitle);
    productTitle.setText(bundle.getString(PRODUCT_TITLE));
    TextView productDescription = findViewById(R.id.ProductDescription);
    productDescription.setText(bundle.getString(PRODUCT_DESCRIPTION));
    initSpinner();
    NetworkImageView productImage = findViewById(R.id.ProductImage);
    ImageRequester.getInstance(this).setImageFromUrl(productImage, bundle.getString(PRODUCT_URL));
    fabMessage = getString(R.string.shrine_product_added_message);
  }
}
项目:material-components-android    文件:ProductListActivity.java   
private void initCollapsingToolbar() {
  Toolbar toolbar = findViewById(R.id.AppBar);
  int collapsingToolbarImageIndex = 6;
  int collapsingImageToolbarSize = 1200;
  NetworkImageView collapsingToolbarImage = findViewById(R.id.CollapsingToolbarImage);
  StringBuilder collapsingToolbarImageUrl =
      new StringBuilder(productEntryList.get(collapsingToolbarImageIndex).url);
  collapsingToolbarImageUrl.append("=s");
  collapsingToolbarImageUrl.append(collapsingImageToolbarSize);
  setSupportActionBar(toolbar);
  CollapsingToolbarLayout collapsingToolbarLayout = findViewById(R.id.CollapsingToolbarLayout);
  collapsingToolbarLayout.setTitle(toolbar.getTitle());
  collapsingToolbarLayout.setExpandedTitleTextAppearance(R.style.TextAppearance_Shrine_Logo);
  collapsingToolbarLayout.setCollapsedTitleTextAppearance(R.style.TextAppearance_Shrine_Logo);
  imageRequester.setImageFromUrl(collapsingToolbarImage, collapsingToolbarImageUrl.toString());
  Point windowSize = new Point();
  getWindowManager().getDefaultDisplay().getSize(windowSize);
  int windowWidth = windowSize.x;
  collapsingToolbarImage.setX(collapsingToolbarImage.getX() - windowWidth / 4);
  collapsingToolbarLayout.setScrimVisibleHeightTrigger(
      (int) getResources().getDimension(R.dimen.shrine_tall_toolbar_height) / 2);
}
项目:CricketBuzz    文件:ResultAdapter.java   
public ContactViewHolder(View v) {
    super(v);
    date = (TextView) v.findViewById(R.id.tv_date);
    header = (TextView) v.findViewById(R.id.tv_header);
    team1 = (TextView) v.findViewById(R.id.tv_team1);
    team2 = (TextView) v.findViewById(R.id.tv_team2);
    status = (TextView) v.findViewById(R.id.tv_status);
    team1score = (TextView) v
            .findViewById(R.id.tv_team1_score);
    team2score = (TextView) v
            .findViewById(R.id.tv_team2_score);
    flag1 = (NetworkImageView) v
            .findViewById(R.id.img_team1_flag);
    flag2 = (NetworkImageView) v
            .findViewById(R.id.img_team2_flag);
}
项目:CricketBuzz    文件:FixturesAdapter.java   
public ContactViewHolder(View v) {
    super(v);
    date = (TextView) v.findViewById(R.id.tv_date);
    header = (TextView) v.findViewById(R.id.tv_header);
    team1 = (TextView) v.findViewById(R.id.tv_team1);
    team2 = (TextView) v.findViewById(R.id.tv_team2);
    status = (TextView) v.findViewById(R.id.tv_status);
    team1score = (TextView) v
            .findViewById(R.id.tv_team1_score);
    team2score = (TextView) v
            .findViewById(R.id.tv_team2_score);
    flag1 = (NetworkImageView) v
            .findViewById(R.id.img_team1_flag);
    flag2 = (NetworkImageView) v
            .findViewById(R.id.img_team2_flag);
}
项目:Doctor    文件:TipsActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.dashboard_tips_activity);
    Intent intent = getIntent();
    imageLoader = AppController.getInstance().getImageLoader(this);

    findViewById(R.id.back_btn).setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            TipsActivity.this.finish();
            overridePendingTransition(R.anim.nude, R.anim.slide_out_to_right);
        }
    });
    ((TextView) findViewById(R.id.action_bar_title)).setText(getString(R.string.health_tips));

    ((NetworkImageView) findViewById(R.id.tip_image)).setImageUrl(intent.getStringExtra("image"), imageLoader);
    ((TextView) findViewById(R.id.title)).setText(intent.getStringExtra("title"));
    JustifiedTextView content = (JustifiedTextView) findViewById(R.id.content);
    content.setText(intent.getStringExtra("content"));
}
项目:book-store-android    文件:CartAdapter.java   
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
    //Get the data model based on position
    Book book = mBooks.get(position);

    // Setting item views based on my views and data model
    TextView textViewName = holder.nameTextView;
    textViewName.setText(book.getBookName());

    TextView textViewAuthor = holder.authorTextView;

    final NetworkImageView image = holder.bookImage;
    ImageLoader mImageLoader = MySingleton.getInstance(mContext).getImageLoader();
    image.setImageUrl(book.getBookImgUrl(), mImageLoader);
    image.setErrorImageResId(R.drawable.defaultcover);

}
项目:ots15-companion    文件:SponsorAdapter.java   
@Override
public View getView(final int position, View convertView, ViewGroup parent) {

    if (mInflater == null) {
        mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    }
    View row;
    if (convertView == null) {
        row = mInflater.inflate(R.layout.item_sponsor, parent, false);
    } else {
        row = convertView;
    }

    SponsorHolder holder = new SponsorHolder();
    holder.sponsorImage = (NetworkImageView) row.findViewById(R.id.imageView_sponsor);
    holder.sponsorImage.setDefaultImageResId(R.drawable.fossasia_sponsor);
    final Sponsor sponsor = getItem(position);
    String url = sponsor.getImg();
    holder.sponsorImage.setImageUrl(url, VolleySingleton.getImageLoader(mContext));
   row.setTag(sponsor);
    return row;
}
项目:wordpress_app_android    文件:AddQuickPressShortcutActivity.java   
public View getView(int position, View convertView, ViewGroup parent) {
    RelativeLayout view = (RelativeLayout) convertView;
    if (view == null) {
        LayoutInflater inflater = getLayoutInflater();
        view = (RelativeLayout)inflater.inflate(R.layout.home_row, parent, false);
    }
    String username = accountUsers[position];
    view.setId(Integer.valueOf(accountIDs[position]));

    TextView blogName = (TextView)view.findViewById(R.id.blogName);
    TextView blogUsername = (TextView)view.findViewById(R.id.blogUser);
    NetworkImageView blavatar = (NetworkImageView)view.findViewById(R.id.blavatar);

    blogName.setText(
            StringUtils.unescapeHTML(blogNames[position]));
    blogUsername.setText(
            StringUtils.unescapeHTML(username));
    blavatar.setErrorImageResId(R.drawable.blavatar_placeholder);
    blavatar.setImageUrl(blavatars[position], WordPress.imageLoader);

    return view;

}
项目:wordpress_app_android    文件:ThemeTabFragment.java   
@Override
public void onMovedToScrapHeap(View view) {
    // cancel image fetch requests if the view has been moved to recycler.

    NetworkImageView niv = (NetworkImageView) view.findViewById(R.id.theme_grid_item_image);
    if (niv != null) {
        // this tag is set in the ThemeTabAdapter class
        ScreenshotHolder tag =  (ScreenshotHolder) niv.getTag();
        if (tag != null && tag.requestURL != null) {
            // need a listener to cancel request, even if the listener does nothing
            ImageContainer container = WordPress.imageLoader.get(tag.requestURL, new ImageListener() {
                @Override
                public void onErrorResponse(VolleyError error) { }

                @Override
                public void onResponse(ImageContainer response, boolean isImmediate) { }

            });
            container.cancelRequest();
        }
    }
}
项目:wordpress_app_android    文件:MediaEditFragment.java   
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    mScrollView = (ScrollView) inflater.inflate(R.layout.media_edit_fragment, container, false);

    mLinearLayout = mScrollView.findViewById(R.id.media_edit_linear_layout);
    mTitleView = (EditText) mScrollView.findViewById(R.id.media_edit_fragment_title);
    mCaptionView = (EditText) mScrollView.findViewById(R.id.media_edit_fragment_caption);
    mDescriptionView = (EditText) mScrollView.findViewById(R.id.media_edit_fragment_description);
    mLocalImageView = (ImageView) mScrollView.findViewById(R.id.media_edit_fragment_image_local);
    mNetworkImageView = (NetworkImageView) mScrollView.findViewById(R.id.media_edit_fragment_image_network);
    mSaveButton = (Button) mScrollView.findViewById(R.id.media_edit_save_button);
    mSaveButton.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            editMedia();
        }
    });

    disableEditingOnOldVersion();

    loadMedia(getMediaId());

    return mScrollView;
}
项目:rp15    文件:SponsorAdapter.java   
@Override
public View getView(final int position, View convertView, ViewGroup parent) {

    if (mInflater == null) {
        mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    }
    View row;
    if (convertView == null) {
        row = mInflater.inflate(R.layout.item_sponsor, parent, false);
    } else {
        row = convertView;
    }

    SponsorHolder holder = new SponsorHolder();
    holder.sponsorImage = (NetworkImageView) row.findViewById(R.id.imageView_sponsor);
    holder.sponsorImage.setDefaultImageResId(R.drawable.fossasia_sponsor);
    final Sponsor sponsor = getItem(position);
    String url = sponsor.getImg();
    holder.sponsorImage.setImageUrl(url, VolleySingleton.getImageLoader(mContext));
   row.setTag(sponsor);
    return row;
}
项目:EpiDroid    文件:DashboardFragment.java   
void fillDashboard(Dashboard dashboard) {
    ((NetworkImageView) mView.findViewById(R.id.profile_image))
            .setImageUrl("https://cdn.local.epitech.eu/userprofil/profilview/" + dashboard
                            .getInfos()
                            .getPicture().replace("bmp", "jpg"),
                    VolleySingleton.getInstance(mActivity).getImageLoader());
    ((TextView) mView.findViewById(R.id.full_name)).setText(dashboard.getInfos().getTitle());

    ((TextView) mView.findViewById(R.id.login)).setText(dashboard.getInfos().getLogin());
    ((TextView) mView.findViewById(R.id.promo)).setText(getString(R.string.promo,
            dashboard.getInfos().getPromo()));
    ((TextView) mView.findViewById(R.id.semester)).setText(getString(R.string.semester,
            dashboard.getCurrent().getSemesterCode()));
    ((TextView) mView.findViewById(R.id.city)).setText(dashboard.getInfos().getLocation());
    Float activeLog = Float.valueOf(dashboard.getCurrent().getActiveLog());
    ((TextView) mView.findViewById(R.id.active_log)).setText(String.format("%.1fh", activeLog));
}
项目:PlexPy-Remote    文件:ShowProfileFragment.java   
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    view = inflater.inflate(R.layout.fragment_show_profile, container, false);

    context = this.getContext();

    vImage = (NetworkImageView) view.findViewById(R.id.show_profile_image);
    vStudio = (TextView) view.findViewById(R.id.show_profile_studio);
    vAired = (TextView) view.findViewById(R.id.show_profile_aired);
    vRuntime = (TextView) view.findViewById(R.id.show_profile_runtime);
    vRated = (TextView) view.findViewById(R.id.show_profile_rated);
    vRating = (RatingBar) view.findViewById(R.id.show_profile_rating);

    vDescription = (TextView) view.findViewById(R.id.show_profile_description);

    vStarring = (LinearLayout) view.findViewById(R.id.show_profile_starring);
    vGenres = (LinearLayout) view.findViewById(R.id.show_profile_genres);

    fetchProfile();
    return view;
}
项目:PlexPy-Remote    文件:MovieProfileFragment.java   
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    view = inflater.inflate(R.layout.fragment_movie_profile, container, false);

    context = this.getContext();

    vImage = (NetworkImageView) view.findViewById(R.id.show_profile_image);
    vDirectors = (LinearLayout) view.findViewById(R.id.show_profile_directors);
    vStudio = (TextView) view.findViewById(R.id.show_profile_studio);
    vAired = (TextView) view.findViewById(R.id.show_profile_aired);
    vRuntime = (TextView) view.findViewById(R.id.show_profile_runtime);
    vRated = (TextView) view.findViewById(R.id.show_profile_rated);
    vRating = (RatingBar) view.findViewById(R.id.show_profile_rating);

    vDescription = (TextView) view.findViewById(R.id.show_profile_description);

    vStarring = (LinearLayout) view.findViewById(R.id.show_profile_starring);
    vGenres = (LinearLayout) view.findViewById(R.id.show_profile_genres);
    vWriters = (LinearLayout) view.findViewById(R.id.show_profile_writers);

    fetchProfile();
    return view;
}
项目:PlexPy-Remote    文件:UserProfileLastWatchedAdapter.java   
@Override
    public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
        final HistoryModels.HistoryRecord historyItem = historyRecordList.get(position);

        LayoutInflater inflater = (LayoutInflater) context
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        View view = inflater.inflate(R.layout.item_user_last_watched, parent, false);

//        view.findViewById(R.id.user_profile_last_watched_poster);
        NetworkImageView avatar = view.findViewById(R.id.user_profile_last_watched_poster);
        avatar.setImageUrl(UrlHelpers.getImageUrl(historyItem.thumb, "600", "400"),
                ImageCacheManager.getInstance().getImageLoader());

        if(historyItem.date != null && !historyItem.date.equals("null")){
            CharSequence timeAgo = DateUtils.getRelativeTimeSpanString(historyItem.date * 1000, System.currentTimeMillis(), 0);
            ((TextView) view.findViewById(R.id.user_profile_last_watched_date)).setText(timeAgo.toString());
        }

        ((TextView) view.findViewById(R.id.user_profile_last_watched_title)).setText(historyItem.fullTitle);
//        ((TextView) view.findViewById(R.id.user_profile_last_watched_transcode_decision)).setText(WordUtils.capitalize(historyItem.transcodeDecision));

        return view;
    }
项目:PlexPy-Remote    文件:HistoryAdapter.java   
public ViewHolder(View itemView) {
    super(itemView);

    vCard = (CardView) itemView.findViewById(R.id.history_card_view);
    vCardSecondary = (CardView) itemView.findViewById(R.id.history_card_secondary_view);

    vTitle = (TextView) itemView.findViewById(R.id.history_card_title);
    vDate = (TextView) itemView.findViewById(R.id.history_card_date);
    vImage = (NetworkImageView) itemView.findViewById(R.id.history_card_image);
    vUser = (TextView) itemView.findViewById(R.id.history_card_user);
    vEpisode = (TextView) itemView.findViewById(R.id.history_card_episode);

    vState = (IconTextView) itemView.findViewById(R.id.history_card_state);
    vProgress = (IconTextView) itemView.findViewById(R.id.history_card_progress);
    vProgressText = (TextView) itemView.findViewById(R.id.history_card_progress_text);

    vStarted = (TextView) itemView.findViewById(R.id.history_card_started);
    vStopped = (TextView) itemView.findViewById(R.id.history_card_stopped);
    vPaused = (TextView) itemView.findViewById(R.id.history_card_paused);
    vDuration = (TextView) itemView.findViewById(R.id.history_card_duration);
    vIPAddress = (TextView) itemView.findViewById(R.id.history_card_ipaddress);
    vPlayer = (TextView) itemView.findViewById(R.id.history_card_player);
}
项目:mypodcasts-android    文件:EpisodeViewInflaterTest.java   
@Test
public void itSetsEpisodeImageUrl() {
  Episode episode = new Episode() {
    @Override
    public Image getImage() {
      return new Image() {
        @Override
        public String getUrl() {
          return "http://images.com/photo.jpeg";
        }
      };
    }
  };

  View inflatedView = inflateView(episode);

  NetworkImageView networkImageView = (NetworkImageView) inflatedView.findViewById(
      R.id.episode_thumbnail
  );

  assertThat(networkImageView.getImageURL(), is("http://images.com/photo.jpeg"));
}
项目:Bozon.kg_App    文件:AppAdapter.java   
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    if (inflater == null) {
        inflater = (LayoutInflater) activityProducts.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    }
    if (convertView == null) {
        convertView = inflater.inflate(R.layout.custom_layout, null);
    }
    imageLoaderVar = AppControl.getmInstance().getmImageLoader();

    NetworkImageView imageView = (NetworkImageView) convertView.findViewById(R.id.image_view_category);
    TextView title = (TextView) convertView.findViewById(R.id.tv_title);

    //getting data for row
    AppItem item = itemsProducts.get(position);
    imageView.setImageUrl(item.getIcon(), imageLoaderVar);
    //title
    title.setText(item.getTitle());


    return convertView;
}
项目:iosched    文件:ItemActivity.java   
private void populateProductViews() {
  Bundle bundle = getIntent().getExtras();
  if (bundle == null) {
    String error = "Error retrieving product information.";
    Log.e(TAG, error);
    Snackbar.make(findViewById(R.id.ProductTitle), error, Snackbar.LENGTH_SHORT).show();
    fabMessage = error;
  } else {
    TextView productTitle = (TextView) findViewById(R.id.ProductTitle);
    productTitle.setText(bundle.getString(PRODUCT_TITLE));
    TextView productDescription = (TextView) findViewById(R.id.ProductDescription);
    productDescription.setText(bundle.getString(PRODUCT_DESCRIPTION));
    initSpinner();
    NetworkImageView productImage = (NetworkImageView) findViewById(R.id.ProductImage);
    ImageRequester.getInstance(this).setImageFromUrl(productImage, bundle.getString(PRODUCT_URL));
    fabMessage = getString(R.string.shrine_product_added_message);
  }
}
项目:iosched    文件:ProductListActivity.java   
private void initCollapsingToolbar() {
  Toolbar toolbar = (Toolbar) findViewById(R.id.AppBar);
  int collapsingToolbarImageIndex = 6;
  int collapsingImageToolbarSize = 1200;
  NetworkImageView collapsingToolbarImage =
      (NetworkImageView) findViewById(R.id.CollapsingToolbarImage);
  StringBuilder collapsingToolbarImageUrl =
      new StringBuilder(productEntryList.get(collapsingToolbarImageIndex).url);
  collapsingToolbarImageUrl.append("=s");
  collapsingToolbarImageUrl.append(collapsingImageToolbarSize);
  setSupportActionBar(toolbar);
  CollapsingToolbarLayout collapsingToolbarLayout =
      (CollapsingToolbarLayout) findViewById(R.id.CollapsingToolbarLayout);
  collapsingToolbarLayout.setTitle(toolbar.getTitle());
  collapsingToolbarLayout.setExpandedTitleTextAppearance(R.style.TextAppearance_Shrine_Logo);
  collapsingToolbarLayout.setCollapsedTitleTextAppearance(R.style.TextAppearance_Shrine_Logo);
  imageRequester.setImageFromUrl(collapsingToolbarImage, collapsingToolbarImageUrl.toString());
  Point windowSize = new Point();
  getWindowManager().getDefaultDisplay().getSize(windowSize);
  int windowWidth = windowSize.x;
  collapsingToolbarImage.setX(collapsingToolbarImage.getX() - windowWidth / 4);
  collapsingToolbarLayout.setScrimVisibleHeightTrigger(
      (int) getResources().getDimension(R.dimen.shrine_tall_toolbar_height) / 2);
}
项目:CloudMemeAndroid    文件:MemeAdapter.java   
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    if (convertView == null) {
        LayoutInflater inflater = ((Activity) mContext).getLayoutInflater();
        convertView = inflater.inflate(mResourceId, parent, false);
    }
    CloudMemeMeme meme = getItem(position);
    if (meme != null && convertView != null) {
        NetworkImageView image = (NetworkImageView) convertView.findViewById(R.id.meme_image);
        String imageUrl = meme.getImageUrl();
        Log.d(TAG, "Requesting Image: " + imageUrl);
        image.setContentDescription(meme.getText());
        image.setImageUrl(imageUrl, mVolley.getImageLoader());
        image.setDefaultImageResId(R.drawable.ic_action_camera_wide);
        image.setErrorImageResId(R.drawable.ic_action_camera_wide);
        TextView scoreDisplay = (TextView) convertView.findViewById(R.id.meme_score);
        int score = 0; // TODO: Replace with score from API when available
        scoreDisplay.setText("+" + score);
        View voteButton = convertView.findViewById(R.id.meme_vote_button);
        voteButton.setOnClickListener(this);
        voteButton.setTag(position);
    }
    return convertView;
}
项目:CloudMemeAndroid    文件:MemeTemplateAdapter.java   
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    if (convertView == null) {
        LayoutInflater inflater = ((Activity) mContext).getLayoutInflater();
        convertView = inflater.inflate(mResourceId, parent, false);
    }
    CloudMemeTemplate meme = getItem(position);
    if (meme != null && convertView != null) {
        markView(convertView, mSelected == position);
        NetworkImageView image =
                (NetworkImageView) convertView.findViewById(R.id.meme_template_image);
        String imageUrl = meme.getUrl();
        Log.d(TAG, "Requesting template: " + imageUrl);
        image.setImageUrl(imageUrl, mVolley.getImageLoader());
        image.setDefaultImageResId(R.drawable.ic_action_camera_wide);
        image.setErrorImageResId(R.drawable.ic_action_camera_wide);
    }
    return convertView;
}
项目:Volley-JSON    文件:ImageRequestActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_image);

    btnImageReq = (Button) findViewById(R.id.btnImageReq);
    imgNetWorkView = (NetworkImageView) findViewById(R.id.imgNetwork);
    imageView = (ImageView) findViewById(R.id.imgView);

    btnImageReq.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            makeImageRequest();
        }
    });
}
项目:yt-watchme    文件:EventsListFragment.java   
public void setProfileInfo() {
    if (!mGoogleApiClient.isConnected()
            || Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) == null) {
        ((ImageView) getView().findViewById(R.id.avatar))
                .setImageDrawable(null);
        ((TextView) getView().findViewById(R.id.display_name))
                .setText(R.string.not_signed_in);
    } else {
        Person currentPerson = Plus.PeopleApi.getCurrentPerson(mGoogleApiClient);
        if (currentPerson.hasImage()) {
            // Set the URL of the image that should be loaded into this view, and
            // specify the ImageLoader that will be used to make the request.
            ((NetworkImageView) getView().findViewById(R.id.avatar)).setImageUrl(currentPerson.getImage().getUrl(), mImageLoader);
        }
        if (currentPerson.hasDisplayName()) {
            ((TextView) getView().findViewById(R.id.display_name))
                    .setText(currentPerson.getDisplayName());
        }
    }
}
项目:yt-watchme    文件:EventsListFragment.java   
@Override
public View getView(final int position, View convertView,
                    ViewGroup container) {
    if (convertView == null) {
        convertView = LayoutInflater.from(getActivity()).inflate(
                R.layout.list_item, container, false);
    }

    EventData event = mEvents.get(position);
    ((TextView) convertView.findViewById(android.R.id.text1))
            .setText(event.getTitle());
    ((NetworkImageView) convertView.findViewById(R.id.thumbnail)).setImageUrl(event.getThumbUri(), mImageLoader);
    if (mGoogleApiClient.isConnected()) {
        ((PlusOneButton) convertView.findViewById(R.id.plus_button))
                .initialize(event.getWatchUri(), null);
    }
    convertView.findViewById(R.id.main_target).setOnClickListener(
            new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    mCallbacks.onEventSelected(mEvents.get(position));
                }
            });
    return convertView;
}
项目:AEISTMobileDROID    文件:EventoExpAdapter.java   
@Override
  public View getGroupView(int groupPosition, boolean isExpanded,
          View convertView, ViewGroup parent) {
      EventoContainer evento = getGroup(groupPosition);
      if (convertView == null) {
          LayoutInflater infalInflater = (LayoutInflater) _act
                  .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          convertView = infalInflater.inflate(R.layout.listitem, null);
      }

      if (imageLoader == null)
    imageLoader = AppController.getInstance().getImageLoader();

NetworkImageView thumbNail = (NetworkImageView) convertView
        .findViewById(R.id.thumbnail);
thumbNail.setDefaultImageResId(R.drawable.loader);
thumbNail.setErrorImageResId(R.drawable.loader);
TextView eventoNome = (TextView)convertView.findViewById(R.id.textView1);
TextView eventoDesc = (TextView)convertView.findViewById(R.id.textView2);

eventoNome.setText(evento.getEventoNome());
eventoDesc.setText(evento.getEventoDesc());
thumbNail.setImageUrl(evento.getImageLink(), imageLoader);
      return convertView;
  }
项目:soas    文件:PhotoDetailFragment.java   
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_photo_detail, container, false);

    if (mPhoto != null) {
        NetworkImageView photo = (NetworkImageView) rootView.findViewById(R.id.photo);
        photo.setImageUrl(mPhoto.photoFileUrl, SoasApplication.getImageLoader(getActivity()));
        photo.setDefaultImageResId(R.drawable.default_photo);

        TextView photoName = (TextView) rootView.findViewById(R.id.photoName);
        photoName.setText(mPhoto.photoTitle);

        TextView photoOwner = (TextView) rootView.findViewById(R.id.photoOwner);
        photoOwner.setText(mPhoto.ownerName);
    }

    return rootView;
}
项目:UnionListView    文件:TwoUnionView.java   
ChildViewBuffer(View v) {
    mImageView = (NetworkImageView) v.findViewById(R.id.ImageView);
    mImageView.setErrorImageResId(R.drawable.logo);
    mTitleText = (TextView) v.findViewById(R.id.Title);
    mNumText = (TextView) v.findViewById(R.id.Num);
    iImageLoader = VolleyLoader.getInstance().getImageLoader();
    iImageListener = new ImageListener() {

        @Override
        public void onErrorResponse(VolleyError error) {
            Log.d("TAG", "onErrorResponse():" + error);

        }

        @Override
        public void onResponse(ImageContainer response,
                boolean isImmediate) {
            Log.d("TAG", "onResponse():" + isImmediate);

        }
    };
}
项目:Tvdb-Api-Android    文件:TvdbItemAdapter.java   
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    if (convertView == null) {
        convertView = LayoutInflater.from(mContext).inflate(mResource, parent, false);
    }
    TvdbItem item = getItem(position);

    TextView titleView = ViewHolder.get(convertView, mTitleViewResourceId);
    titleView.setText(item.getTitleText());
    if (mImageViewResourceId != NO_RESOURCE) {
        NetworkImageView imageView = ViewHolder.get(convertView, mImageViewResourceId);
        imageView.setImageUrl(item.getImageUrl(), mImageLoader);
    }
    if (mDescViewResourceId != NO_RESOURCE) {
        TextView descView = ViewHolder.get(convertView, mDescViewResourceId);
        descView.setText(item.getDescText());
    }
    return convertView;
}
项目:gplus-haiku-client-android    文件:HaikuFragment.java   
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View v = inflater.inflate(R.layout.fragment_haiku, container, false);
    VolleyContainer volley = VolleyContainer.getInstance(getActivity());

    if (mHaiku != null) {
        NetworkImageView profile = ((NetworkImageView) v.findViewById(R.id.haiku_profile_pic));
        profile.setImageUrl(mHaiku.author.googlePhotoUrl, volley.getImageLoader());
        ((TextView) v.findViewById(R.id.haiku_title)).setText(mHaiku.title);
        ((TextView) v.findViewById(R.id.haiku_line_one)).setText(mHaiku.lineOne);
        ((TextView) v.findViewById(R.id.haiku_line_two)).setText(mHaiku.lineTwo);
        ((TextView) v.findViewById(R.id.haiku_line_three)).setText(mHaiku.lineThree);
        ((TextView) v.findViewById(R.id.haiku_user_display_name))
                .setText(mHaiku.author.googleDisplayName);
        ((TextView) v.findViewById(R.id.haiku_date)).setText(mHaiku.getFormattedDate());
        ((TextView) v.findViewById(R.id.haiku_vote_count)).setText(mHaiku.votes + " votes");
        ((Button) v.findViewById(R.id.button_promote)).setOnClickListener(this);
        ((Button) v.findViewById(R.id.button_vote)).setOnClickListener(this);
    }
    return v;
}