Example usage for android.view View DRAWING_CACHE_QUALITY_AUTO

List of usage examples for android.view View DRAWING_CACHE_QUALITY_AUTO

Introduction

In this page you can find the example usage for android.view View DRAWING_CACHE_QUALITY_AUTO.

Prototype

int DRAWING_CACHE_QUALITY_AUTO

To view the source code for android.view View DRAWING_CACHE_QUALITY_AUTO.

Click Source Link

Document

Enables automatic quality mode for the drawing cache.

Usage

From source file:org.yammp.app.AlbumFragment.java

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    // We have a menu item to show in action bar.
    setHasOptionsMenu(true);// w  w w  . ja va 2s  .co m

    mImageLoader = new LazyImageLoader(getActivity().getApplicationContext(),
            R.drawable.ic_mp_albumart_unknown);

    mAdapter = new AlbumsAdapter(getSherlockActivity(), R.layout.album_grid_item, null, new String[] {},
            new int[] {}, 0);

    View fragmentView = getView();
    mGridView = (GridView) fragmentView.findViewById(android.R.id.list);
    mGridView.setAdapter(mAdapter);
    mGridView.setOnItemClickListener(this);
    mGridView.setOnCreateContextMenuListener(this);
    mGridView.setDrawingCacheEnabled(true);
    mGridView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_AUTO);

    getLoaderManager().initLoader(0, null, this);
}