Updated attachment selection dialog.

1) Added nice-looking holo-themed graphics for each attachment type.

2) Removed old un-scaled graphics.

3) Stringified the attachment types.
pull/1/head
Moxie Marlinspike 12 years ago
parent 3cf77b6fd0
commit 030b39cd9c

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 869 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

@ -417,5 +417,8 @@
<string name="verify_keys__menu_verified">Verified</string> <string name="verify_keys__menu_verified">Verified</string>
<!-- EOF --> <!-- EOF -->
<string name="AttachmentTypeSelectorAdapter_picture">Picture</string>
<string name="AttachmentTypeSelectorAdapter_video">Video</string>
<string name="AttachmentTypeSelectorAdapter_audio">Audio</string>
</resources> </resources>

@ -17,11 +17,6 @@
package org.thoughtcrime.securesms.mms; package org.thoughtcrime.securesms.mms;
import java.util.ArrayList;
import java.util.List;
import org.thoughtcrime.securesms.R;
import android.content.Context; import android.content.Context;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
@ -30,6 +25,11 @@ import android.widget.ArrayAdapter;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import org.thoughtcrime.securesms.R;
import java.util.ArrayList;
import java.util.List;
public class AttachmentTypeSelectorAdapter extends ArrayAdapter<AttachmentTypeSelectorAdapter.IconListItem> { public class AttachmentTypeSelectorAdapter extends ArrayAdapter<AttachmentTypeSelectorAdapter.IconListItem> {
public static final int ADD_IMAGE = 1; public static final int ADD_IMAGE = 1;
@ -42,7 +42,7 @@ public class AttachmentTypeSelectorAdapter extends ArrayAdapter<AttachmentTypeSe
private final Context context; private final Context context;
public AttachmentTypeSelectorAdapter(Context context) { public AttachmentTypeSelectorAdapter(Context context) {
super(context, R.layout.icon_list_item, getItemList()); super(context, R.layout.icon_list_item, getItemList(context));
this.context = context; this.context = context;
} }
@ -72,13 +72,16 @@ public class AttachmentTypeSelectorAdapter extends ArrayAdapter<AttachmentTypeSe
return view; return view;
} }
private static List<IconListItem> getItemList() { private static List<IconListItem> getItemList(Context context) {
List<IconListItem> data = new ArrayList<IconListItem>(7); List<IconListItem> data = new ArrayList<IconListItem>(7);
addItem(data, "Pictures", R.drawable.ic_launcher_gallery, ADD_IMAGE); addItem(data, context.getString(R.string.AttachmentTypeSelectorAdapter_picture),
R.drawable.ic_attach_picture_holo_light, ADD_IMAGE);
// addItem(data, "Capture picture", R.drawable.ic_launcher_camera, TAKE_PICTURE); // addItem(data, "Capture picture", R.drawable.ic_launcher_camera, TAKE_PICTURE);
addItem(data, "Videos", R.drawable.ic_launcher_video_player, ADD_VIDEO); addItem(data, context.getString(R.string.AttachmentTypeSelectorAdapter_video),
R.drawable.ic_attach_video_holo_light, ADD_VIDEO);
// addItem(data, "Capture video", R.drawable.ic_launcher_camera_record, RECORD_VIDEO); // addItem(data, "Capture video", R.drawable.ic_launcher_camera_record, RECORD_VIDEO);
addItem(data, "Audio", R.drawable.ic_launcher_musicplayer_2, ADD_SOUND); addItem(data, context.getString(R.string.AttachmentTypeSelectorAdapter_audio),
R.drawable.ic_attach_audio_holo_light, ADD_SOUND);
// addItem(data, "Record audio", R.drawable.ic_launcher_record_audio, RECORD_SOUND); // addItem(data, "Record audio", R.drawable.ic_launcher_record_audio, RECORD_SOUND);
return data; return data;
@ -111,5 +114,4 @@ public class AttachmentTypeSelectorAdapter extends ArrayAdapter<AttachmentTypeSe
return mResource; return mResource;
} }
} }
} }

Loading…
Cancel
Save