当前位置: 首页>>代码示例>>Java>>正文


Java NetworkImageView.setDefaultImageResId方法代码示例

本文整理汇总了Java中com.android.volley.toolbox.NetworkImageView.setDefaultImageResId方法的典型用法代码示例。如果您正苦于以下问题:Java NetworkImageView.setDefaultImageResId方法的具体用法?Java NetworkImageView.setDefaultImageResId怎么用?Java NetworkImageView.setDefaultImageResId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.android.volley.toolbox.NetworkImageView的用法示例。


在下文中一共展示了NetworkImageView.setDefaultImageResId方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: PostDatabaseHolder

import com.android.volley.toolbox.NetworkImageView; //导入方法依赖的package包/类
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);

					
				}
 
开发者ID:lethalskillzz,项目名称:Mimix-Client,代码行数:23,代码来源:Post_Fragment.java

示例2: ProfileHolder

import com.android.volley.toolbox.NetworkImageView; //导入方法依赖的package包/类
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);


}
 
开发者ID:lethalskillzz,项目名称:Mimix-Client,代码行数:18,代码来源:MyProfileActivity.java

示例3: getView

import com.android.volley.toolbox.NetworkImageView; //导入方法依赖的package包/类
@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;
}
 
开发者ID:blynch,项目名称:CloudMemeAndroid,代码行数:25,代码来源:MemeAdapter.java

示例4: getView

import com.android.volley.toolbox.NetworkImageView; //导入方法依赖的package包/类
@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;
}
 
开发者ID:blynch,项目名称:CloudMemeAndroid,代码行数:20,代码来源:MemeTemplateAdapter.java

示例5: getGroupView

import com.android.volley.toolbox.NetworkImageView; //导入方法依赖的package包/类
@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;
  }
 
开发者ID:carloscorreia94,项目名称:AEISTMobileDROID,代码行数:26,代码来源:EventoExpAdapter.java

示例6: onCreateView

import com.android.volley.toolbox.NetworkImageView; //导入方法依赖的package包/类
@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;
}
 
开发者ID:MostafaGazar,项目名称:soas,代码行数:20,代码来源:PhotoDetailFragment.java

示例7: setImageUrl

import com.android.volley.toolbox.NetworkImageView; //导入方法依赖的package包/类
public static void setImageUrl(NetworkImageView niv, String url, Integer defaultImage) {
    if (niv == null) {
        return;
    }
    niv.setDefaultImageResId(defaultImage == null ? 0 : defaultImage);
    niv.setImageUrl(url, VolleyHelper.getInstance().getImageLoader());
}
 
开发者ID:yajnesh,项目名称:AndroidGeneralUtils,代码行数:8,代码来源:ViewUtil.java

示例8: contactDatabaseHolder

import com.android.volley.toolbox.NetworkImageView; //导入方法依赖的package包/类
contactDatabaseHolder(View row) {

			//cfollowbtn=(ImageButton)row.findViewById(R.id.maincrow_followbtn);
			cfollowbtn=(TextView)row.findViewById(R.id.maincrow_followbtn);
			cname=(TextView)row.findViewById(R.id.maincrow_username);
			cdetail=(TextView)row.findViewById(R.id.maincrow_detail);
			cimage=(NetworkImageView)row.findViewById(R.id.maincrow_image);
			
			cimage.setDefaultImageResId(R.drawable.me);

		}
 
开发者ID:lethalskillzz,项目名称:Mimix-Client,代码行数:12,代码来源:Contact_Fragment.java

示例9: ProfileHolder

import com.android.volley.toolbox.NetworkImageView; //导入方法依赖的package包/类
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);
}
 
开发者ID:lethalskillzz,项目名称:Mimix-Client,代码行数:16,代码来源:ProfileActivity.java

示例10: CommentHolder

import com.android.volley.toolbox.NetworkImageView; //导入方法依赖的package包/类
CommentHolder(View row) {

uname=(TextView)row.findViewById(R.id.commentrow_username);
comment=(TextView)row.findViewById(R.id.commentrow_comment);
date_time=(TextView)row.findViewById(R.id.commentrow_date_time);
pimg=(NetworkImageView)row.findViewById(R.id.commentrow_image);

pimg.setDefaultImageResId(R.drawable.me);
}
 
开发者ID:lethalskillzz,项目名称:Mimix-Client,代码行数:10,代码来源:CommentActivity.java

示例11: contactDatabaseHolder

import com.android.volley.toolbox.NetworkImageView; //导入方法依赖的package包/类
contactDatabaseHolder(View row) {

	msguname=(TextView)row.findViewById(R.id.msgrow_username);
	msgbody=(EmojiconTextView)row.findViewById(R.id.msgrow_body);
	msgdate=(TextView)row.findViewById(R.id.msgrow_date_time);
	ureadimg=(ImageView)row.findViewById(R.id.msgrow_unread);
	profimg=(NetworkImageView)row.findViewById(R.id.msgrow_profimg);
	
	//profimg.setErrorImageResId(R.drawable.me);
	profimg.setDefaultImageResId(R.drawable.me);

	}
 
开发者ID:lethalskillzz,项目名称:Mimix-Client,代码行数:13,代码来源:Message_Fragment.java

示例12: HashDatabaseHolder

import com.android.volley.toolbox.NetworkImageView; //导入方法依赖的package包/类
HashDatabaseHolder(View row) {

uname=(TextView)row.findViewById(R.id.hashrow_username);
post_body=(TextView)row.findViewById(R.id.hashrow_body);
date_time=(TextView)row.findViewById(R.id.hashrow_date_time);
image=(NetworkImageView)row.findViewById(R.id.hashrow_image);
pimage=(ImageView)row.findViewById(R.id.hashrow_postimage);
RateBar=(RatingBar)row.findViewById(R.id.hashrow_ratingbar);
   ratebtn=(Button)row.findViewById(R.id.hashrate_clk);
   sharebtn=(Button)row.findViewById(R.id.hashshare_clk);
   commentbtn=(Button)row.findViewById(R.id.hashcomment_clk);
   
//image.setErrorImageResId(R.drawable.me);
image.setDefaultImageResId(R.drawable.me);
}
 
开发者ID:lethalskillzz,项目名称:Mimix-Client,代码行数:16,代码来源:HashActivity.java

示例13: contactDatabaseHolder

import com.android.volley.toolbox.NetworkImageView; //导入方法依赖的package包/类
contactDatabaseHolder(View row) {

			cfollowbtn=(TextView)row.findViewById(R.id.allcrow_followbtn);
			cname=(TextView)row.findViewById(R.id.allcrow_username);
			cdetail=(TextView)row.findViewById(R.id.allcrow_detail);
			cimage=(NetworkImageView)row.findViewById(R.id.allcrow_image);	

			cimage.setDefaultImageResId(R.drawable.me);
		}
 
开发者ID:lethalskillzz,项目名称:Mimix-Client,代码行数:10,代码来源:AllContactsActivity.java

示例14: contactDatabaseHolder

import com.android.volley.toolbox.NetworkImageView; //导入方法依赖的package包/类
contactDatabaseHolder(View row) { 

			cname=(TextView)row.findViewById(R.id.crow_username);
			cdetail=(TextView)row.findViewById(R.id.crow_detail);
			cimage=(NetworkImageView)row.findViewById(R.id.crow_image);
			cfollowbtn=(TextView)row.findViewById(R.id.crow_followbtn);
			
			//cfollowbtn.setOnClickListener(fbuttonclk);
			cimage.setDefaultImageResId(R.drawable.me);

		}
 
开发者ID:lethalskillzz,项目名称:Mimix-Client,代码行数:12,代码来源:MyContactsActivity.java

示例15: setImage

import com.android.volley.toolbox.NetworkImageView; //导入方法依赖的package包/类
@Override
void setImage(ImageView imageView, String imageUrl) {
	NetworkImageView networkImageView=(NetworkImageView)imageView;
	networkImageView.setDefaultImageResId(R.drawable.ic_empty);  
	networkImageView.setErrorImageResId(R.drawable.ic_empty);  
	networkImageView.setImageUrl(StringUtil.preUrl(imageUrl),  imageLoader); 
}
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:8,代码来源:NetworkImageViewAdapter.java


注:本文中的com.android.volley.toolbox.NetworkImageView.setDefaultImageResId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。