本文整理汇总了Java中io.rong.imkit.widget.AsyncImageView类的典型用法代码示例。如果您正苦于以下问题:Java AsyncImageView类的具体用法?Java AsyncImageView怎么用?Java AsyncImageView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AsyncImageView类属于io.rong.imkit.widget包,在下文中一共展示了AsyncImageView类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getView
import io.rong.imkit.widget.AsyncImageView; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder viewHolder;
if (convertView == null) {
convertView = LayoutInflater.from(context).inflate(R.layout.rc_gridview_item_contact_group_members, parent, false);
viewHolder = new ViewHolder();
viewHolder.portrait = (AsyncImageView) convertView.findViewById(R.id.iv_avatar);
viewHolder.name = (TextView) convertView.findViewById(R.id.tv_username);
convertView.setTag(viewHolder);
} else {
viewHolder = (ViewHolder) convertView.getTag();
}
UserInfo member = list.get(position);
if (member != null) {
viewHolder.portrait.setAvatar(member.getPortraitUri());
viewHolder.name.setText(member.getName());
}
return convertView;
}
开发者ID:hushengjun,项目名称:FastAndroid,代码行数:22,代码来源:ContactDetailActivity.java
示例2: initAudioCallView
import io.rong.imkit.widget.AsyncImageView; //导入依赖的package包/类
private void initAudioCallView() {
mLPreviewContainer.removeAllViews();
mLPreviewContainer.setVisibility(View.GONE);
mSPreviewContainer.removeAllViews();
mSPreviewContainer.setVisibility(View.GONE);
findViewById(R.id.rc_voip_call_information).setBackgroundColor(getResources().getColor(R.color.rc_voip_background_color));
findViewById(R.id.rc_voip_audio_chat).setVisibility(View.GONE);
View userInfoView = inflater.inflate(R.layout.rc_voip_audio_call_user_info, null);
TextView timeView = (TextView) userInfoView.findViewById(R.id.rc_voip_call_remind_info);
setupTime(timeView);
mUserInfoContainer.removeAllViews();
mUserInfoContainer.addView(userInfoView);
UserInfo userInfo = RongContext.getInstance().getUserInfoFromCache(targetId);
if (userInfo != null) {
TextView userName = (TextView) mUserInfoContainer.findViewById(R.id.rc_voip_user_name);
userName.setText(userInfo.getName());
if (callSession.getMediaType().equals(RongCallCommon.CallMediaType.AUDIO)) {
AsyncImageView userPortrait = (AsyncImageView) mUserInfoContainer.findViewById(R.id.rc_voip_user_portrait);
if (userPortrait != null) {
userPortrait.setAvatar(userInfo.getPortraitUri().toString(), R.drawable.rc_default_portrait);
}
}
}
mUserInfoContainer.setVisibility(View.VISIBLE);
mUserInfoContainer.findViewById(R.id.rc_voip_call_minimize).setVisibility(View.VISIBLE);
View button = inflater.inflate(R.layout.rc_voip_call_bottom_connected_button_layout, null);
mButtonContainer.removeAllViews();
mButtonContainer.addView(button);
mButtonContainer.setVisibility(View.VISIBLE);
View handFreeV = mButtonContainer.findViewById(R.id.rc_voip_handfree);
handFreeV.setSelected(handFree);
if (pickupDetector != null) {
pickupDetector.register(this);
}
}
开发者ID:hushengjun,项目名称:FastAndroid,代码行数:41,代码来源:SingleCallActivity.java
示例3: addSingleRemoteView
import io.rong.imkit.widget.AsyncImageView; //导入依赖的package包/类
View addSingleRemoteView(String userId) {
View singleRemoteView = inflater.inflate(R.layout.rc_voip_viewlet_remote_user, null);
UserInfo userInfo = RongContext.getInstance().getUserInfoFromCache(userId);
singleRemoteView.setTag(userId + "view");
AsyncImageView userPortraitView = (AsyncImageView) singleRemoteView.findViewById(R.id.user_portrait);
if (userInfo != null) {
if (userInfo.getPortraitUri() != null) {
userPortraitView.setAvatar(userInfo.getPortraitUri().toString(), R.drawable.rc_default_portrait);
}
}
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(remoteUserViewWidth, remoteUserViewWidth);
params.setMargins(0, 0, 10, 0);
if (remoteViewContainer2.getChildCount() < 4) {
remoteViewContainer2.addView(singleRemoteView, params);
} else if (remoteViewContainer1.getChildCount() < 4) {
remoteViewContainer1.addView(singleRemoteView, params);
}
return singleRemoteView;
}
开发者ID:hushengjun,项目名称:FastAndroid,代码行数:21,代码来源:MultiVideoCallActivity.java
示例4: updateChildInfo
import io.rong.imkit.widget.AsyncImageView; //导入依赖的package包/类
public void updateChildInfo(String childId, UserInfo userInfo) {
int containerCount = linearLayout.getChildCount();
LinearLayout lastContainer = null;
for (int i = 0; i < containerCount; i++) {
LinearLayout container = (LinearLayout) linearLayout.getChildAt(i);
LinearLayout child = (LinearLayout) container.findViewWithTag(childId);
if (child != null) {
AsyncImageView imageView = (AsyncImageView)child.findViewById(R.id.rc_user_portrait);
imageView.setAvatar(userInfo.getPortraitUri());
if (enableTitle) {
TextView textView = (TextView)child.findViewById(R.id.rc_user_name);
textView.setText(userInfo.getName());
}
}
}
}
开发者ID:hushengjun,项目名称:FastAndroid,代码行数:18,代码来源:CallUserGridView.java
示例5: getView
import io.rong.imkit.widget.AsyncImageView; //导入依赖的package包/类
@Override
public View getView(int i, View convertView, ViewGroup parent) {
ViewHolder viewHolder = null;
Resource res = new Resource(mNumberList.get(i).getPortraitUri());
if (convertView == null || convertView.getTag() == null) {
convertView = mLayoutInflater.inflate(R.layout.item_reply, parent, false);
viewHolder = new ViewHolder();
viewHolder.mUserName = (TextView) convertView.findViewById(R.id.text1);
viewHolder.mImageView = (AsyncImageView) convertView.findViewById(R.id.reply1);
convertView.setTag(viewHolder);
} else {
viewHolder = (ViewHolder) convertView.getTag();
}
if (viewHolder != null) {
viewHolder.mUserName.setText(mNumberList.get(i).getName());
viewHolder.mImageView.setResource(mNumberList.get(i).getPortraitUri().toString(), R.drawable.de_default_portrait);
}
return convertView;
}
开发者ID:LanguidSheep,项目名称:sealtalk-android-master,代码行数:22,代码来源:NewTextReplyAdapter.java
示例6: updateChildInfo
import io.rong.imkit.widget.AsyncImageView; //导入依赖的package包/类
public void updateChildInfo(String childId, UserInfo userInfo) {
int containerCount = linearLayout.getChildCount();
LinearLayout lastContainer = null;
for (int i = 0; i < containerCount; i++) {
LinearLayout container = (LinearLayout) linearLayout.getChildAt(i);
LinearLayout child = (LinearLayout) container.findViewWithTag(childId);
if (child != null) {
AsyncImageView imageView = (AsyncImageView)child.getChildAt(0);
imageView.setAvatar(userInfo.getPortraitUri());
if (enableTitle) {
TextView textView = (TextView)child.getChildAt(1);
textView.setText(userInfo.getName());
}
}
}
}
开发者ID:rongcloud,项目名称:callkit-android,代码行数:18,代码来源:CallUserGridView.java
示例7: getView
import io.rong.imkit.widget.AsyncImageView; //导入依赖的package包/类
@Override
public View getView(int i, View convertView, ViewGroup parent) {
ViewHolder viewHolder = null;
Resource res = new Resource(mNumberList.get(i).getPortraitUri());
if (convertView == null || convertView.getTag() == null) {
convertView = mLayoutInflater.inflate(R.layout.de_item_reply, parent,false);
viewHolder = new ViewHolder();
viewHolder.mUserName = (TextView) convertView.findViewById(R.id.text1);
viewHolder.mImageView = (AsyncImageView) convertView.findViewById(R.id.reply1);
convertView.setTag(viewHolder);
} else {
viewHolder= (ViewHolder) convertView.getTag();
}
if (viewHolder != null) {
viewHolder.mUserName.setText(mNumberList.get(i).getName().toString());
viewHolder.mImageView.setDefaultDrawable(mContext.getResources().getDrawable(R.drawable.rc_default_portrait));
viewHolder.mImageView.setResource(res);
}
return convertView;
}
开发者ID:birdcopy,项目名称:Android-Birdcopy-Application,代码行数:23,代码来源:NewTextReplyAdapter.java
示例8: getView
import io.rong.imkit.widget.AsyncImageView; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
mViewHolder = new MyHolder();
if (convertView != null ) {
mViewHolder = (MyHolder) convertView.getTag();
} else {
convertView = LayoutInflater.from(getActivity()).inflate(R.layout.de_item_chatroom, parent,false);
mViewHolder.mIV_Icon = (AsyncImageView) convertView.findViewById(R.id.iv_chatroom_icon);
mViewHolder.mTV_Title = (TextView) convertView.findViewById(R.id.tv_chatroom_title);
mViewHolder.mTV_DescribeA = (TextView) convertView.findViewById(R.id.tv_chatroom_d_a);
mViewHolder.mTV_DescribeB = (TextView) convertView.findViewById(R.id.tv_chatroom_d_b);
convertView.setTag(mViewHolder);
}
if (mViewHolder != null) {
mViewHolder.mIV_Icon.setImageResource(mList.get(position).getChatRoomIcon());
mViewHolder.mTV_Title.setText(mList.get(position).getTiemTitle());
mViewHolder.mTV_DescribeA.setText(mList.get(position).getDescribeA());
mViewHolder.mTV_DescribeB.setText(mList.get(position).getDescribeB());
}
return convertView;
}
开发者ID:yangyunfeng666,项目名称:demo-app-android-v2-2.3.9,代码行数:22,代码来源:ChatRoomListFragment.java
示例9: getView
import io.rong.imkit.widget.AsyncImageView; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder viewHolder = null;
Resource res = new Resource(mResults.get(position).getPortrait());
if(convertView == null || convertView.getTag() == null){
convertView = mLayoutInflater.inflate(R.layout.de_item_search,parent,false);
viewHolder = new ViewHolder();
viewHolder.mSearchName = (TextView) convertView.findViewById(R.id.search_item_name);
viewHolder.mImageView = (AsyncImageView) convertView.findViewById(R.id.search_adapter_img);
convertView.setTag(viewHolder);
}else{
viewHolder= (ViewHolder) convertView.getTag();
}
if(viewHolder != null) {
viewHolder.mSearchName.setText(mResults.get(position).getUsername());
viewHolder.mImageView.setDefaultDrawable(mContext.getResources().getDrawable(R.drawable.de_default_portrait));
viewHolder.mImageView.setResource(res);
}
return convertView;
}
开发者ID:yangyunfeng666,项目名称:demo-app-android-v2-2.3.9,代码行数:24,代码来源:SearchFriendAdapter.java
示例10: bindView
import io.rong.imkit.widget.AsyncImageView; //导入依赖的package包/类
@Override
protected void bindView(View v, int partition, List<Friend> data, int position) {
super.bindView(v, partition, data, position);
ViewHolder holder = (ViewHolder) v.getTag();
TextView name = holder.name;
AsyncImageView photo = holder.photo;
Friend friend = data.get(position);
name.setText(friend.getNickname());
Resource res = new Resource(friend.getPortrait());
photo.setDefaultDrawable(mContext.getResources().getDrawable(R.drawable.de_default_portrait));
photo.setResource(res);
String userId = friend.getUserId();
holder.userId = userId;
}
开发者ID:yangyunfeng666,项目名称:demo-app-android-v2-2.3.9,代码行数:21,代码来源:BlackMultiChoiceAdapter.java
示例11: bindView
import io.rong.imkit.widget.AsyncImageView; //导入依赖的package包/类
@Override
protected void bindView(View v, int partition, List<Friend> data, int position) {
ViewHolder holder = (ViewHolder) v.getTag();
TextView name = holder.name;
AsyncImageView photo = holder.photo;
TextView choice = holder.unreadnum;
Friend friend = data.get(position);
name.setText(friend.getNickname());
Resource res = new Resource(friend.getPortrait());
photo.setResource(res);
photo.setTag(position);
holder.friend = friend;
}
开发者ID:yangyunfeng666,项目名称:demo-app-android-v2-2.3.9,代码行数:19,代码来源:BlackListAdapter.java
示例12: getView
import io.rong.imkit.widget.AsyncImageView; //导入依赖的package包/类
@Override
public View getView(int i, View convertView, ViewGroup parent) {
ViewHolder viewHolder = null;
Resource res = new Resource(mNumberList.get(i).getPortraitUri());
if (convertView == null || convertView.getTag() == null) {
convertView = mLayoutInflater.inflate(R.layout.de_item_reply, parent,false);
viewHolder = new ViewHolder();
viewHolder.mUserName = (TextView) convertView.findViewById(R.id.text1);
viewHolder.mImageView = (AsyncImageView) convertView.findViewById(R.id.reply1);
convertView.setTag(viewHolder);
} else {
viewHolder= (ViewHolder) convertView.getTag();
}
if (viewHolder != null) {
viewHolder.mUserName.setText(mNumberList.get(i).getName().toString());
viewHolder.mImageView.setDefaultDrawable(mContext.getResources().getDrawable(R.drawable.de_default_portrait));
viewHolder.mImageView.setResource(res);
}
return convertView;
}
开发者ID:yangyunfeng666,项目名称:demo-app-android-v2-2.3.9,代码行数:23,代码来源:NewTextReplyAdapter.java
示例13: addMarker
import io.rong.imkit.widget.AsyncImageView; //导入依赖的package包/类
private void addMarker(LatLng latLng, String url) {
AsyncImageView imageView = (AsyncImageView) LayoutInflater.from(this).inflate(R.layout.map_marker_view, null);
// AsyncImageView imageView = (AsyncImageView) view.findViewById(R.id.icon);
imageView.setResource(new Resource(url));
// aMap.addMarker(new MarkerOptions().anchor(0.5f, 0.5f)
// .position(new LatLng(30.679879, 104.064855)).title("成都市")
// .snippet("成都市:30.679879, 104.064855").draggable(true));
MarkerOptions markerOption = new MarkerOptions();
markerOption.position(new LatLng(34.341568, 108.940174));
// markerOption.title("西安市").snippet("西安市:34.341568, 108.940174");
// markerOption.draggable(true);
// markerOption.icon(BitmapDescriptorFactory.fromResource(R.drawable.rc_default_portrait));
markerOption.icon(BitmapDescriptorFactory.fromView(imageView));
// markerOption.icon(BitmapDescriptorFactory
// .defaultMarker(BitmapDescriptorFactory.HUE_RED));
Marker marker2 = aMap.addMarker(markerOption);
// marker旋转90度
// marker2.setRotateAngle(90);
}
开发者ID:yangyunfeng666,项目名称:demo-app-android-v2-2.3.9,代码行数:24,代码来源:ShareLocationActivity.java
示例14: initView
import io.rong.imkit.widget.AsyncImageView; //导入依赖的package包/类
protected void initView() {
getSupportActionBar().setTitle(R.string.de_actionbar_myacc);
mImgMyPortrait = (AsyncImageView) findViewById(R.id.img_my_portrait);
mMyPortrait = (RelativeLayout) findViewById(R.id.rl_my_portrait);
mMyUsername = (RelativeLayout) findViewById(R.id.rl_my_username);
mTVUsername = (TextView) findViewById(R.id.tv_my_username);
if (DemoContext.getInstance().getSharedPreferences() != null) {
// String userId = DemoContext.getInstance().getSharedPreferences().getString("DEMO_USER_ID", null);
mUserName = DemoContext.getInstance().getSharedPreferences().getString(Constants.APP_USER_NAME, null);
String userPortrait = DemoContext.getInstance().getSharedPreferences().getString("DEMO_USER_PORTRAIT", null);
mImgMyPortrait.setResource(new Resource(Uri.parse(userPortrait)));
mTVUsername.setText(mUserName.toString());
}
mMyPortrait.setOnClickListener(this);
mMyUsername.setOnClickListener(this);
// mResourceHandler = new ResourceHandler.Builder().enableBitmapCache().build(this);
}
开发者ID:yangyunfeng666,项目名称:demo-app-android-v2-2.3.9,代码行数:23,代码来源:MyAccountActivity.java
示例15: newView
import io.rong.imkit.widget.AsyncImageView; //导入依赖的package包/类
@Override
public View newView(Context context, ViewGroup group) {
View view = LayoutInflater.from(context).inflate(R.layout.rc_message_contact_card, null);
ViewHolder viewHolder = new ViewHolder();
viewHolder.mImage = (AsyncImageView) view.findViewById(R.id.rc_img);
viewHolder.mName = (TextView) view.findViewById(R.id.rc_name);
viewHolder.mLayout = (LinearLayout) view.findViewById(R.id.rc_layout);
view.setTag(viewHolder);
return view;
}
开发者ID:hushengjun,项目名称:FastAndroid,代码行数:11,代码来源:ContactMessageItemProvider.java
示例16: initView
import io.rong.imkit.widget.AsyncImageView; //导入依赖的package包/类
private void initView() {
mTargetPortrait = (AsyncImageView) findViewById(R.id.target_portrait);
mTargetName = (TextView) findViewById(R.id.target_name);
mArrow = (ImageView) findViewById(R.id.target_group_arrow);
mContactName = (TextView) findViewById(R.id.contact_name);
mMessage = (EditText) findViewById(R.id.message);
mSend = (TextView) findViewById(R.id.send);
mCancel = (TextView) findViewById(R.id.cancel);
mViewAnimator = (ViewAnimator) findViewById(R.id.va_detail);
mGridView = (GridView) findViewById(R.id.gridview);
mCancel.requestFocus();
this.setFinishOnTouchOutside(false);
}
开发者ID:hushengjun,项目名称:FastAndroid,代码行数:15,代码来源:ContactDetailActivity.java
示例17: getView
import io.rong.imkit.widget.AsyncImageView; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder viewHolder;
if (convertView == null) {
viewHolder = new ViewHolder();
convertView = LayoutInflater.from(parent.getContext()).inflate(R.layout.rc_list_item_contact_card, null);
viewHolder.name = (TextView) convertView.findViewById(R.id.rc_user_name);
viewHolder.portrait = (AsyncImageView) convertView.findViewById(R.id.rc_user_portrait);
viewHolder.letter = (TextView) convertView.findViewById(R.id.letter);
convertView.setTag(viewHolder);
} else {
viewHolder = (ViewHolder) convertView.getTag();
}
UserInfo userInfo = mList.get(position).userInfo;
if (userInfo != null) {
viewHolder.name.setText(userInfo.getName());
viewHolder.portrait.setAvatar(userInfo.getPortraitUri());
}
//根据position获取分类的首字母的Char ascii值
int section = getSectionForPosition(position);
//如果当前位置等于该分类首字母的Char的位置 ,则认为是第一次出现
if (position == getPositionForSection(section)) {
viewHolder.letter.setVisibility(View.VISIBLE);
viewHolder.letter.setText(mList.get(position).getLetter());
} else {
viewHolder.letter.setVisibility(View.GONE);
}
return convertView;
}
开发者ID:hushengjun,项目名称:FastAndroid,代码行数:32,代码来源:ContactListActivity.java
示例18: getView
import io.rong.imkit.widget.AsyncImageView; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder;
if (convertView == null) {
holder = new ViewHolder();
convertView = LayoutInflater.from(CallSelectMemberActivity.this).inflate(R.layout.rc_voip_listitem_select_member, null);
holder.checkbox = (ImageView) convertView.findViewById(R.id.rc_checkbox);
holder.portrait = (AsyncImageView) convertView.findViewById(R.id.rc_user_portrait);
holder.name = (TextView) convertView.findViewById(R.id.rc_user_name);
convertView.setTag(holder);
}
holder = (ViewHolder)convertView.getTag();
holder.checkbox.setTag(allMembers.get(position));
if (invitedMembers.contains(allMembers.get(position))) {
holder.checkbox.setClickable(false);
holder.checkbox.setEnabled(false);
holder.checkbox.setImageResource(R.drawable.rc_voip_icon_checkbox_checked);
} else {
if (selectedMember.contains(allMembers.get(position))) {
holder.checkbox.setImageResource(R.drawable.rc_voip_checkbox);
holder.checkbox.setSelected(true);
} else {
holder.checkbox.setImageResource(R.drawable.rc_voip_checkbox);
holder.checkbox.setSelected(false);
}
holder.checkbox.setClickable(true);
holder.checkbox.setEnabled(true);
}
UserInfo userInfo = RongContext.getInstance().getUserInfoFromCache(allMembers.get(position));
if (userInfo != null) {
holder.name.setText(userInfo.getName());
holder.portrait.setAvatar(userInfo.getPortraitUri());
} else {
holder.name.setText(allMembers.get(position));
holder.portrait.setAvatar(null);
}
return convertView;
}
开发者ID:hushengjun,项目名称:FastAndroid,代码行数:41,代码来源:CallSelectMemberActivity.java
示例19: onEventMainThread
import io.rong.imkit.widget.AsyncImageView; //导入依赖的package包/类
public void onEventMainThread(UserInfo userInfo) {
if (targetId != null && targetId.equals(userInfo.getUserId())) {
TextView userName = (TextView) mUserInfoContainer.findViewById(R.id.rc_voip_user_name);
if (userInfo.getName() != null)
userName.setText(userInfo.getName());
AsyncImageView userPortrait = (AsyncImageView) mUserInfoContainer.findViewById(R.id.rc_voip_user_portrait);
if (userPortrait != null && userInfo.getPortraitUri() != null) {
userPortrait.setResource(userInfo.getPortraitUri().toString(), R.drawable.rc_default_portrait);
}
}
}
开发者ID:hushengjun,项目名称:FastAndroid,代码行数:12,代码来源:SingleCallActivity.java
示例20: initView
import io.rong.imkit.widget.AsyncImageView; //导入依赖的package包/类
private void initView() {
asyncImageView = (AsyncImageView) findViewById(R.id.img_Group_portrait);
asyncImageView.setOnClickListener(this);
Button mButton = (Button) findViewById(R.id.create_ok);
mButton.setOnClickListener(this);
mGroupNameEdit = (ClearWriteEditText) findViewById(R.id.create_groupname);
}
开发者ID:LanguidSheep,项目名称:sealtalk-android-master,代码行数:8,代码来源:CreateGroupActivity.java
注:本文中的io.rong.imkit.widget.AsyncImageView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论