本文整理汇总了Java中com.parse.ParseImageView类的典型用法代码示例。如果您正苦于以下问题:Java ParseImageView类的具体用法?Java ParseImageView怎么用?Java ParseImageView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ParseImageView类属于com.parse包,在下文中一共展示了ParseImageView类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: init
import com.parse.ParseImageView; //导入依赖的package包/类
private void init() {
mAvatarChanged = false;
mLocalDb = LocalDb.getInstance();
mUser = mLocalDb.getCurrentUser();
mPivAvatar = (ParseImageView) findViewById(R.id.ivAvatar);
mEtChangePassword = (EditText) findViewById(R.id.etChangePassword);
mEtConfirmPassword = (EditText) findViewById(R.id.etConfirmPass);
mEtEmail = (EditText) findViewById(R.id.editChangeEmail);
mEtEmail.setHint(mUser.getEmail());
mBtnSaveChanges = (Button) findViewById(R.id.btnSaveChanges);
mBtnChangeAvatar = (Button) findViewById(R.id.btnChangeAvatar);
mBtnTakePic = (Button) findViewById(R.id.btnTakePic);
mBtnSaveChanges.setOnClickListener(this);
mBtnChangeAvatar.setOnClickListener(this);
mBtnTakePic.setOnClickListener(this);
mPivAvatar.setParseFile(mUser.getAvatar());
mPivAvatar.loadInBackground();
}
开发者ID:tl-nguyen,项目名称:RadarApp,代码行数:24,代码来源:EditProfileActivity.java
示例2: getView
import com.parse.ParseImageView; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = LayoutInflater.from(mContext).inflate(R.layout.item_user_cell, parent, false);
}
ParseImageView ivIcon = (ParseImageView) convertView.findViewById(R.id.ivIcon);
TextView tvUsername = (TextView) convertView.findViewById(R.id.tvUsername);
tvUsername.setText(mUsers.get(position).getUsername());
ivIcon.setParseFile(mUsers.get(position).getAvatar());
if (mUsers.get(position).getAvatar() != null) {
ivIcon.loadInBackground();
} else {
ivIcon.setBackground(mContext.getResources().getDrawable(R.drawable.ic_avatar));
}
return convertView;
}
开发者ID:tl-nguyen,项目名称:RadarApp,代码行数:24,代码来源:RoomUserAdapter.java
示例3: getItemView
import com.parse.ParseImageView; //导入依赖的package包/类
@Override
public View getItemView(PrsPhoto photo, View v, ViewGroup parent) {
if (v == null) {
v = View.inflate(getContext(), R.layout.photo_list_adapter, null);
}
super.getItemView(photo, v, parent);
ParseImageView photoImage = (ParseImageView) v.findViewById(R.id.icon);
ParseFile photoFile = photo.getParseFile("photo");
if (photoFile != null) {
photoImage.setParseFile(photoFile);
photoImage.loadInBackground(new GetDataCallback() {
@Override
public void done(byte[] data, ParseException e) {
// nothing to do
}
});
}
return v;
}
开发者ID:triestpa,项目名称:PhotoShare,代码行数:23,代码来源:PhotoListAdapter.java
示例4: getPhotosAndSetUpUI
import com.parse.ParseImageView; //导入依赖的package包/类
/**
* Called when the app starts.
*
* Load all the available photos for the meme background,
* then setup the rest of the photo-related UI.
*
* You should:
* - Set the allPhotos member variable to the photos retrieved from Parse
* - Call setUpPhotoSelectorAndPreview(imageSelect, previewImage)
* @param imageSelect
* @param previewImage
*/
private void getPhotosAndSetUpUI(final Spinner imageSelect, final ParseImageView previewImage) {
ParseQuery<ParseObject> query = ParseQuery.getQuery("Photo");
query.addDescendingOrder("createdAt");
query.setCachePolicy(CachePolicy.CACHE_THEN_NETWORK);
query.findInBackground(new FindCallback<ParseObject>() {
@Override
public void done(List<ParseObject> photos, ParseException e) {
if (e == null) {
Log.d(TAG, "Retrived " + photos.size() + " photos");
allPhotos = photos;
setUpPhotoSelectorAndPreview(imageSelect, previewImage);
} else {
Log.d(TAG, "Error retrieving photos: " + e.getMessage());
}
}
});
}
开发者ID:ixu,项目名称:wallet,代码行数:30,代码来源:MainActivity.java
示例5: getItemView
import com.parse.ParseImageView; //导入依赖的package包/类
@Override
public View getItemView(UserPicture userPicture, View v, ViewGroup parent) {
if (v == null) {
v = View.inflate(getContext(), R.layout.item_list_photos, null);
}
super.getItemView(userPicture, v, parent);
ParseImageView userImage = (ParseImageView) v.findViewById(R.id.icon);
ParseFile photoFile = userPicture.getParseFile("photo");
if (photoFile != null) {
userImage.setParseFile(photoFile);
userImage.loadInBackground(new GetDataCallback() {
@Override
public void done(byte[] arg0, ParseException arg1) {
// do nothing
Log.d(TAG, "photoFile loaded");
}
});
} else {
Log.d(TAG, "photoFile is null");
}
return v;
}
开发者ID:jsambuo,项目名称:pic-taker,代码行数:27,代码来源:ImageAdapter.java
示例6: initViews
import com.parse.ParseImageView; //导入依赖的package包/类
private void initViews(View rootView) {
mLlFollowing = (LinearLayout) rootView.findViewById(R.id.llFollowing);
mLlFollower = (LinearLayout) rootView.findViewById(R.id.llFollower);
mTvFollowingCount = (TextView) rootView.findViewById(R.id.tvFollowingCount);
mTvFollowerCount = (TextView) rootView.findViewById(R.id.tvFollowerCount);
mPivBigAvatar = (ParseImageView) rootView.findViewById(R.id.pivBigAvatar);
mRiMyRoom = (RoomItem) rootView.findViewById(R.id.riMyRoom);
mBtnCreate = (Button) rootView.findViewById(R.id.btnCreate);
mBtnEditRoom = (Button) rootView.findViewById(R.id.btnEditRoom);
mBtnDestroy = (Button) rootView.findViewById(R.id.btnDestroy);
mBtnEditProfile = (Button) rootView.findViewById(R.id.btnEditProfile);
mFbFollow = (FollowButton) rootView.findViewById(R.id.fbFollow);
mProgressBar = (ProgressBar) rootView.findViewById(R.id.progressBar);
mLlFollowing.setOnClickListener(this);
mLlFollower.setOnClickListener(this);
mBtnEditProfile.setOnClickListener(this);
mBtnCreate.setOnClickListener(this);
mBtnEditRoom.setOnClickListener(this);
mBtnDestroy.setOnClickListener(this);
mFollow.fetchIfNeededInBackground(new GetCallback<ParseObject>() {
@Override
public void done(ParseObject parseObject, ParseException e) {
mTvFollowingCount.setText(mFollow.getFollowings().size() + "");
mTvFollowerCount.setText(mFollow.getFollowers().size() + "");
}
});
mFbFollow.setData(LocalDb.getInstance().getCurrentUser(), mUser);
}
开发者ID:tl-nguyen,项目名称:RadarApp,代码行数:32,代码来源:ProfileFragment.java
示例7: init
import com.parse.ParseImageView; //导入依赖的package包/类
private void init() {
LayoutInflater inflater = LayoutInflater.from(getContext());
inflater.inflate(R.layout.item_room, this);
mTvRoomName = (TextView) findViewById(R.id.tvRoomName);
mTvUsername = (TextView) findViewById(R.id.tvUsername);
mPivAvatar = (ParseImageView) findViewById(R.id.pivAvatar);
mRbRegister = (RegisterButton) findViewById(R.id.rbRegister);
mBtnJoin = (Button) findViewById(R.id.btnJoin);
mTvUsername.setOnClickListener(this);
mPivAvatar.setOnClickListener(this);
mBtnJoin.setOnClickListener(this);
mRbRegister.setOnClickListener(this);
}
开发者ID:tl-nguyen,项目名称:RadarApp,代码行数:16,代码来源:RoomItem.java
示例8: init
import com.parse.ParseImageView; //导入依赖的package包/类
private void init() {
LayoutInflater inflater = LayoutInflater.from(getContext());
inflater.inflate(R.layout.item_user, this);
mCurrentUser = LocalDb.getInstance().getCurrentUser();
mTvUsername = (TextView) findViewById(R.id.tvUsername);
mPivAvatar = (ParseImageView) findViewById(R.id.pivAvatar);
mFbFollow = (FollowButton) findViewById(R.id.fbFollow);
mTvUsername.setOnClickListener(this);
mPivAvatar.setOnClickListener(this);
}
开发者ID:tl-nguyen,项目名称:RadarApp,代码行数:14,代码来源:UserItem.java
示例9: getView
import com.parse.ParseImageView; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = LayoutInflater.from(mContext).inflate(R.layout.item_user_cell, parent, false);
}
final ParseImageView ivIcon = (ParseImageView) convertView.findViewById(R.id.ivIcon);
final TextView tvUsername = (TextView) convertView.findViewById(R.id.tvUsername);
final User user = mUsers.get(position);
user.fetchIfNeededInBackground(new GetCallback<ParseObject>() {
@Override
public void done(ParseObject parseObject, ParseException e) {
ParseFile avatar = user.getAvatar();
if (avatar != null)
ivIcon.setParseFile(avatar);
String username = user.getUsername();
if (username != null)
tvUsername.setText(username);
ivIcon.loadInBackground();
}
});
return convertView;
}
开发者ID:tl-nguyen,项目名称:RadarApp,代码行数:28,代码来源:EditRoomUserAdapter.java
示例10: createViewHolder
import com.parse.ParseImageView; //导入依赖的package包/类
protected ViewHolder createViewHolder(View convertView, int position) {
ViewHolder viewHolder = new ViewHolder();
viewHolder.tv_title = (TextView) convertView.findViewById(R.id.tv_title);
viewHolder.tv_changelog = (TextView) convertView.findViewById(R.id.tv_changelog);
viewHolder.tv_subtitle = (TextView) convertView.findViewById(R.id.tv_subtitle);
viewHolder.tv_timestamp = (TextView) convertView.findViewById(R.id.tv_timestamp);
viewHolder.iv_icon = (ParseImageView) convertView.findViewById(R.id.iv_icon);
viewHolder.iv_stable = (ImageView) convertView.findViewById(R.id.iv_stable);
viewHolder.iv_downloaded = (ImageView)convertView.findViewById(R.id.iv_downloaded);
return viewHolder;
}
开发者ID:ohjongin,项目名称:infobank-ota-public,代码行数:13,代码来源:PrototypeListAdapter.java
示例11: createViewHolder
import com.parse.ParseImageView; //导入依赖的package包/类
protected ViewHolder createViewHolder(View convertView, int position) {
ViewHolder viewHolder = new ViewHolder();
viewHolder.tv_title = (TextView) convertView.findViewById(R.id.tv_title);
viewHolder.tv_changelog = (TextView) convertView.findViewById(R.id.tv_changelog);
viewHolder.tv_subtitle = (TextView) convertView.findViewById(R.id.tv_subtitle);
viewHolder.tv_timestamp = (TextView) convertView.findViewById(R.id.tv_timestamp);
viewHolder.iv_icon = (ParseImageView ) convertView.findViewById(R.id.iv_icon);
viewHolder.iv_stable = (ImageView) convertView.findViewById(R.id.iv_stable);
viewHolder.iv_downloaded = (ImageView)convertView.findViewById(R.id.iv_downloaded);
return viewHolder;
}
开发者ID:ohjongin,项目名称:infobank-ota-public,代码行数:13,代码来源:MessagetongListAdapter.java
注:本文中的com.parse.ParseImageView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论