Search in sources :

Example 1 with SelectedRecipientsAdapter

use of org.thoughtcrime.securesms.util.SelectedRecipientsAdapter in project Signal-Android by WhisperSystems.

the class GroupCreateActivity method initializeResources.

private void initializeResources() {
    RecipientsEditor recipientsEditor = ViewUtil.findById(this, R.id.recipients_text);
    PushRecipientsPanel recipientsPanel = ViewUtil.findById(this, R.id.recipients);
    lv = ViewUtil.findById(this, R.id.selected_contacts_list);
    avatar = ViewUtil.findById(this, R.id.avatar);
    groupName = ViewUtil.findById(this, R.id.group_name);
    creatingText = ViewUtil.findById(this, R.id.creating_group_text);
    SelectedRecipientsAdapter adapter = new SelectedRecipientsAdapter(this);
    adapter.setOnRecipientDeletedListener(this);
    lv.setAdapter(adapter);
    recipientsEditor.setHint(R.string.recipients_panel__add_members);
    recipientsPanel.setPanelChangeListener(this);
    findViewById(R.id.contacts_button).setOnClickListener(new AddRecipientButtonListener());
    avatar.setImageDrawable(ContactPhotoFactory.getDefaultGroupPhoto().asDrawable(this, ContactColors.UNKNOWN_COLOR.toConversationColor(this)));
    avatar.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            Crop.pickImage(GroupCreateActivity.this);
        }
    });
}
Also used : PushRecipientsPanel(org.thoughtcrime.securesms.components.PushRecipientsPanel) ImageView(android.widget.ImageView) View(android.view.View) TextView(android.widget.TextView) ListView(android.widget.ListView) RecipientsEditor(org.thoughtcrime.securesms.contacts.RecipientsEditor) SelectedRecipientsAdapter(org.thoughtcrime.securesms.util.SelectedRecipientsAdapter)

Example 2 with SelectedRecipientsAdapter

use of org.thoughtcrime.securesms.util.SelectedRecipientsAdapter in project Signal-Android by signalapp.

the class GroupCreateActivity method initializeResources.

private void initializeResources() {
    RecipientsEditor recipientsEditor = ViewUtil.findById(this, R.id.recipients_text);
    PushRecipientsPanel recipientsPanel = ViewUtil.findById(this, R.id.recipients);
    lv = ViewUtil.findById(this, R.id.selected_contacts_list);
    avatar = ViewUtil.findById(this, R.id.avatar);
    groupName = ViewUtil.findById(this, R.id.group_name);
    creatingText = ViewUtil.findById(this, R.id.creating_group_text);
    SelectedRecipientsAdapter adapter = new SelectedRecipientsAdapter(this);
    adapter.setOnRecipientDeletedListener(this);
    lv.setAdapter(adapter);
    recipientsEditor.setHint(R.string.recipients_panel__add_members);
    recipientsPanel.setPanelChangeListener(this);
    findViewById(R.id.contacts_button).setOnClickListener(new AddRecipientButtonListener());
    avatar.setImageDrawable(new ResourceContactPhoto(R.drawable.ic_group_white_24dp).asDrawable(this, ContactColors.UNKNOWN_COLOR.toConversationColor(this)));
    avatar.setOnClickListener(view -> Crop.pickImage(GroupCreateActivity.this));
}
Also used : PushRecipientsPanel(org.thoughtcrime.securesms.components.PushRecipientsPanel) ResourceContactPhoto(org.thoughtcrime.securesms.contacts.avatars.ResourceContactPhoto) RecipientsEditor(org.thoughtcrime.securesms.contacts.RecipientsEditor) SelectedRecipientsAdapter(org.thoughtcrime.securesms.util.SelectedRecipientsAdapter)

Aggregations

PushRecipientsPanel (org.thoughtcrime.securesms.components.PushRecipientsPanel)2 RecipientsEditor (org.thoughtcrime.securesms.contacts.RecipientsEditor)2 SelectedRecipientsAdapter (org.thoughtcrime.securesms.util.SelectedRecipientsAdapter)2 View (android.view.View)1 ImageView (android.widget.ImageView)1 ListView (android.widget.ListView)1 TextView (android.widget.TextView)1 ResourceContactPhoto (org.thoughtcrime.securesms.contacts.avatars.ResourceContactPhoto)1