List of usage examples for android.widget ImageView buildDrawingCache
@Deprecated public void buildDrawingCache()
Calling this method is equivalent to calling buildDrawingCache(false)
.
From source file:mp.paschalis.LoginFragment.java
/** * Update the login View// ww w . j a va2s. com * * @param code the Library code */ public void updateLoginView(Library lib) { try { ((StartActivity) getSherlockActivity()).isLibrarySelected = true; // Invalidate the menu, so a new one will be created ((StartActivity) getSherlockActivity()).invalidateOptionsMenu(); TextView loginLibrary = (TextView) getSherlockActivity().findViewById(R.id.TextViewLoginLibraryName); loginLibrary.setText(lib.name); textViewLibraryLocation = (TextView) getSherlockActivity() .findViewById(R.id.textViewLoginLibraryLocation); textViewLibraryLocation.setText(lib.location); ImageView loginLogo = (ImageView) getSherlockActivity().findViewById(R.id.imageViewLoginLibraryLogo); // Show logo ImageLoader.DataClassDisplayBookCover bk = new ImageLoader.DataClassDisplayBookCover(); bk.iv = loginLogo; App.imageLoader.DisplayImage(lib.getImageURL(), bk); // Save bitmap in app loginLogo.buildDrawingCache(); // Save Library logo as drawable in app app.loginLogoDrawable = new BitmapDrawable(getResources(), loginLogo.getDrawingCache()); enableLoginForm(); tryToAutofillWithPrefs(); } catch (NullPointerException npe) { // noth } }