use same default group photo in GroupCreateActivity

fixes #3908
Closes #4639
// FREEBIE
This commit is contained in:
Jake McGinty 2015-11-20 14:13:17 -08:00 committed by Moxie Marlinspike
parent 2ef808f406
commit d5bd7bcf5f
2 changed files with 6 additions and 1 deletions

View File

@ -26,7 +26,6 @@
android:layout_height="70dp"
position="bottom_right"
android:layout_marginRight="10dp"
android:src="@drawable/ic_group_photo"
android:contentDescription="@string/GroupCreateActivity_avatar_content_description" />
<EditText android:id="@+id/group_name"

View File

@ -21,6 +21,7 @@ import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
@ -46,6 +47,9 @@ import com.soundcloud.android.crop.Crop;
import org.thoughtcrime.securesms.components.PushRecipientsPanel;
import org.thoughtcrime.securesms.components.PushRecipientsPanel.RecipientsPanelChangedListener;
import org.thoughtcrime.securesms.contacts.RecipientsEditor;
import org.thoughtcrime.securesms.contacts.avatars.ContactColors;
import org.thoughtcrime.securesms.contacts.avatars.ContactPhotoFactory;
import org.thoughtcrime.securesms.contacts.avatars.ResourceContactPhoto;
import org.thoughtcrime.securesms.crypto.MasterSecret;
import org.thoughtcrime.securesms.database.DatabaseFactory;
import org.thoughtcrime.securesms.database.GroupDatabase;
@ -199,6 +203,8 @@ public class GroupCreateActivity extends PassphraseRequiredActionBarActivity
recipientsEditor.setHint(R.string.recipients_panel__add_member);
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) {