Skip to content
pavlo-savchuk edited this page May 19, 2016 · 8 revisions

###Activity result receiving in nested fragment workaround Large nested fragments have a problem with getting a Result from an Activity. Workaround is provided for nested fragments activity execution for result issue (parent activity must be inherited from corresponding) , as indicated by the following graphic.

(YourActivty extends ActivityResultFixActivity, YourFragment extends ActivityResultFixFragment)


###Fragment's callbacks feature Provided workaround for nested fragment's callbacks listening issue. Use notifyFragmentAction method to notify all fragments about event. Parent activity and fragment must be inherited from corresponding, such is depicted in the following picture.

(CallbackFragment implements OnFragmentCallbackListener FragmentCallbackActivity implements OnFragmentCallbackListener BaseActivity extends ActivityResultFixActivity BaseFragment extends ActivityResultFixFragment)


###LSImageView public class LSImageView extends ImageView

You can use this view to efficiently manage the display of multiple images(adapter based view), such as in a ListView, Gallery, PagerView. It effectively replaces ImageView for situations where your image is being fetched over the network via URL. LSImageView integrated into LSClient and can use it feature such as: avoiding duplicate fetching, request merging. LSImageView is easier to use than NetworkImageView, it requires no additional configuration and supports automatically caching. LSImageView provides fixedBounds flag, allowing it to skip layout refreshing on image loaded complete event. You can configure separate LSImageView by setting LSClient directly to the view. LSImage by default uses global LSClient, if local client is not set.

 LSImageView imageView = (LSImageView)findViewById(R.id.image_view);
 imageView.setLocalClient(myCLient)

Duplicate request filter This feature allows user to reject or attach similar simultaneous requests to the server. Similarity is defined based on url, request post/get parameters, headers and request/return types.

myClient.setDuplicateRequestPolicy(DuplicateRequestPolicy.ATTACH);

There are 3 request policy's type:

ALLOW - all requests are performed ATTACH - only first unique request from queue will be performed all other listeners will be attached to this request and triggered. REJECT - only first unique request from queue will be performed and it's listener triggered. onCancel() listener method will be called for all requests skipped.

Clone this wiki locally