congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ProfilePicturesHandler
Code IndexAdd Tabnine to your IDE (free)

How to use
ProfilePicturesHandler
in
co.chatsdk.core.handlers

Best Java code snippets using co.chatsdk.core.handlers.ProfilePicturesHandler (Showing top 6 results out of 315)

origin: chat-sdk/chat-sdk-android

protected void updateGallery() {
  ArrayList<String> urls = ChatSDK.profilePictures().fromUser(getUser());
  gridLayout.removeAllViews();
  for (String url : urls) {
    addCellToGridLayout(gridLayout, createCellView(url));
  }
  if (addMenuItem != null) {
    addMenuItem.setVisible(shouldShowAddButton(urls));
  }
}
origin: chat-sdk/chat-sdk-android

  ChatSDK.profilePictures().startProfilePicturesActivity(getContext(), getUser().getEntityID());
});
origin: chat-sdk/chat-sdk-android

if (getUser().isMe()) {
  cell.setOnLongClickListener(v -> {
    boolean isDefault = ChatSDK.profilePictures().fromUser(getUser()).indexOf(url) == 0;
    AlertDialog.Builder builder = new AlertDialog.Builder(this);
    if (!isDefault) {
      builder.setPositiveButton(getString(R.string.set_as_default), (dialog, which) -> {
        showOrUpdateProgressDialog(getString(R.string.updating_pictures));
        ChatSDK.profilePictures().setDefaultPicture(user, url);
        disposableList.add(ChatSDK.core().pushUser().subscribe(() -> {
          dismissProgressDialog();
      ChatSDK.profilePictures().removePicture(user, url);
      disposableList.add(ChatSDK.core().pushUser().subscribe(() -> {
        dismissProgressDialog();
origin: chat-sdk/chat-sdk-android

protected void addProfilePicture() {
  if (ChatSDK.profilePictures().fromUser(getUser()).size() >= maxPictures && maxPictures > 0) {
    if (!limitWarning.isEmpty()) {
      ToastHelper.show(this, limitWarning);
      ChatSDK.profilePictures().addPicture(getUser(), imagePath);
      updateGallery();
      if (ChatSDK.profilePictures().fromUser(getUser()).size() == 1) {
origin: chat-sdk/chat-sdk-android

@Override
public boolean onCreateOptionsMenu(Menu menu) {
  updateGallery();
  if (!getUser().isMe())
    return super.onCreateOptionsMenu(menu);
  addMenuItem = menu.add(Menu.NONE, R.id.action_chat_sdk_add, 12, getString(R.string.action_add_picture));
  addMenuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
  addMenuItem.setIcon(R.drawable.ic_plus);
  addMenuItem.setVisible(shouldShowAddButton(ChatSDK.profilePictures().fromUser(getUser())));
  return super.onCreateOptionsMenu(menu);
}
origin: chat-sdk/chat-sdk-android

  ChatSDK.profilePictures().startProfilePicturesActivity(this, currentUser.getEntityID());
} else {
  mediaSelector.startChooseImageActivity(EditProfileActivity.this, MediaSelector.CropType.Circle,result -> {
co.chatsdk.core.handlersProfilePicturesHandler

Javadoc

Created by Pepe on 01/12/19.

Most used methods

  • addPicture
  • fromUser
  • removePicture
  • setDefaultPicture
  • startProfilePicturesActivity

Popular in Java

  • Finding current android device location
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (Timer)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now