org.telegram.ui.ProfileActivity Java Examples

The following examples show how to use org.telegram.ui.ProfileActivity. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProfileGalleryView.java    From Telegram-FOSS with GNU General Public License v2.0 6 votes vote down vote up
public ProfileGalleryView(Context context, long dialogId, ActionBar parentActionBar, RecyclerListView parentListView, ProfileActivity.AvatarImageView parentAvatarImageView, int parentClassGuid, Callback callback) {
    super(context);
    setVisibility(View.GONE);
    setOverScrollMode(View.OVER_SCROLL_NEVER);
    setOffscreenPageLimit(2);

    this.dialogId = dialogId;
    this.parentListView = parentListView;
    this.parentClassGuid = parentClassGuid;
    setAdapter(adapter = new ViewPagerAdapter(context, parentAvatarImageView, parentActionBar));
    this.touchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
    this.callback = callback;

    NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.dialogPhotosLoaded);
    NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.fileDidLoad);
    NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.FileLoadProgressChanged);
    MessagesController.getInstance(currentAccount).loadDialogPhotos((int) dialogId, 80, 0, true, parentClassGuid);
}
 
Example #2
Source File: ProfileGalleryView.java    From Telegram with GNU General Public License v2.0 6 votes vote down vote up
public ProfileGalleryView(Context context, long dialogId, ActionBar parentActionBar, RecyclerListView parentListView, ProfileActivity.AvatarImageView parentAvatarImageView, int parentClassGuid, Callback callback) {
    super(context);
    setVisibility(View.GONE);
    setOverScrollMode(View.OVER_SCROLL_NEVER);
    setOffscreenPageLimit(2);

    this.dialogId = dialogId;
    this.parentListView = parentListView;
    this.parentClassGuid = parentClassGuid;
    setAdapter(adapter = new ViewPagerAdapter(context, parentAvatarImageView, parentActionBar));
    this.touchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
    this.callback = callback;

    NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.dialogPhotosLoaded);
    NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.fileDidLoad);
    NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.FileLoadProgressChanged);
    MessagesController.getInstance(currentAccount).loadDialogPhotos((int) dialogId, 80, 0, true, parentClassGuid);
}
 
Example #3
Source File: ProfileGalleryView.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
public ViewPagerAdapter(Context context, ProfileActivity.AvatarImageView parentAvatarImageView, ActionBar parentActionBar) {
    this.context = context;
    this.parentAvatarImageView = parentAvatarImageView;
    this.parentActionBar = parentActionBar;
    placeholderPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
    placeholderPaint.setColor(Color.BLACK);
}
 
Example #4
Source File: ProfileGalleryView.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
public ViewPagerAdapter(Context context, ProfileActivity.AvatarImageView parentAvatarImageView, ActionBar parentActionBar) {
    this.context = context;
    this.parentAvatarImageView = parentAvatarImageView;
    this.parentActionBar = parentActionBar;
    placeholderPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
    placeholderPaint.setColor(Color.BLACK);
}