AttachmentTypeSelectorAdapterpublic class AttachmentTypeSelectorAdapter extends IconListAdapter An adapter to store icons and strings for attachment type list. |
Fields Summary |
---|
public static final int | MODE_WITH_SLIDESHOW | public static final int | MODE_WITHOUT_SLIDESHOW | public static final int | ADD_IMAGE | public static final int | TAKE_PICTURE | public static final int | ADD_VIDEO | public static final int | RECORD_VIDEO | public static final int | ADD_SOUND | public static final int | RECORD_SOUND | public static final int | ADD_SLIDESHOW |
Constructors Summary |
---|
public AttachmentTypeSelectorAdapter(android.content.Context context, int mode)
super(context, getData(mode, context));
|
Methods Summary |
---|
protected static void | addItem(java.util.List data, java.lang.String title, int resource)
IconListItem temp = new IconListItem(title, resource);
data.add(temp);
| protected static java.util.List | getData(int mode, android.content.Context context)
List<IconListItem> data = new ArrayList<IconListItem>(7);
addItem(data, context.getString(R.string.attach_image),
R.drawable.ic_launcher_gallery);
addItem(data, context.getString(R.string.attach_take_photo),
R.drawable.ic_launcher_camera);
addItem(data, context.getString(R.string.attach_video),
R.drawable.ic_launcher_video_player);
addItem(data, context.getString(R.string.attach_record_video),
R.drawable.ic_launcher_camera_record);
addItem(data, context.getString(R.string.attach_sound),
R.drawable.ic_launcher_musicplayer_2);
addItem(data, context.getString(R.string.attach_record_sound),
R.drawable.ic_launcher_record_audio);
if (mode == MODE_WITH_SLIDESHOW) {
addItem(data, context.getString(R.string.attach_slideshow),
R.drawable.ic_launcher_slideshow_add_sms);
}
return data;
|
|