本文整理汇总了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);
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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());
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}