Search in sources :

Example 1 with BaseContactService

use of com.applozic.mobicomkit.contact.BaseContactService in project Applozic-Android-SDK by AppLozic.

the class MessageInfoFragment method init.

private void init() {
    if (contactImageLoader == null) {
        contactImageLoader = new ImageLoader(getContext(), getListPreferredItemHeight()) {

            @Override
            protected Bitmap processBitmap(Object data) {
                BaseContactService contactService = new AppContactService(getContext());
                return contactService.downloadContactImage(getContext(), (Contact) data);
            }
        };
        contactImageLoader.setLoadingImage(R.drawable.applozic_ic_contact_picture_holo_light);
        contactImageLoader.addImageCache(getActivity().getSupportFragmentManager(), 0.1f);
    }
    if (locationImageLoader == null) {
        locationImageLoader = new ImageLoader(getContext(), ImageUtils.getLargestScreenDimension((Activity) getContext())) {

            @Override
            protected Bitmap processBitmap(Object data) {
                FileClientService fileClientService = new FileClientService(getContext());
                return fileClientService.loadMessageImage(getContext(), (String) data);
            }
        };
        locationImageLoader.setImageFadeIn(false);
        locationImageLoader.addImageCache(((FragmentActivity) getContext()).getSupportFragmentManager(), 0.1f);
    }
    Toolbar toolbar = (Toolbar) getActivity().findViewById(R.id.my_toolbar);
    toolbar.setClickable(false);
    toolbar.setTitle(getString(R.string.applozic_message_info));
    toolbar.setSubtitle("");
}
Also used : Bitmap(android.graphics.Bitmap) BaseContactService(com.applozic.mobicomkit.contact.BaseContactService) AppContactService(com.applozic.mobicomkit.contact.AppContactService) FileClientService(com.applozic.mobicomkit.api.attachment.FileClientService) ImageLoader(com.applozic.mobicommons.commons.image.ImageLoader) Contact(com.applozic.mobicommons.people.contact.Contact) Toolbar(android.support.v7.widget.Toolbar)

Aggregations

Bitmap (android.graphics.Bitmap)1 Toolbar (android.support.v7.widget.Toolbar)1 FileClientService (com.applozic.mobicomkit.api.attachment.FileClientService)1 AppContactService (com.applozic.mobicomkit.contact.AppContactService)1 BaseContactService (com.applozic.mobicomkit.contact.BaseContactService)1 ImageLoader (com.applozic.mobicommons.commons.image.ImageLoader)1 Contact (com.applozic.mobicommons.people.contact.Contact)1