當前位置: 首頁>>代碼示例>>Java>>正文


Java FadeInBitmapDisplayer類代碼示例

本文整理匯總了Java中com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer的典型用法代碼示例。如果您正苦於以下問題:Java FadeInBitmapDisplayer類的具體用法?Java FadeInBitmapDisplayer怎麽用?Java FadeInBitmapDisplayer使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


FadeInBitmapDisplayer類屬於com.nostra13.universalimageloader.core.display包,在下文中一共展示了FadeInBitmapDisplayer類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: CategoryController

import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; //導入依賴的package包/類
CategoryController(final Activity activity, LoaderManager loaderManager, View itemView) {
    super(itemView);

    this.activity = activity;
    this.loaderManager = loaderManager;

    appCardsAdapter = new AppPreviewAdapter(activity);

    viewAll = (Button) itemView.findViewById(R.id.button);
    viewAll.setOnClickListener(onViewAll);

    heading = (TextView) itemView.findViewById(R.id.name);
    image = (FeatureImage) itemView.findViewById(R.id.category_image);
    background = (FrameLayout) itemView.findViewById(R.id.category_background);

    RecyclerView appCards = (RecyclerView) itemView.findViewById(R.id.app_cards);
    appCards.setAdapter(appCardsAdapter);
    appCards.addItemDecoration(new ItemDecorator(activity));

    displayImageOptions = new DisplayImageOptions.Builder()
            .cacheInMemory(true)
            .imageScaleType(ImageScaleType.NONE)
            .displayer(new FadeInBitmapDisplayer(100, true, true, false))
            .bitmapConfig(Bitmap.Config.RGB_565)
            .build();
}
 
開發者ID:uhuru-mobile,項目名稱:mobile-store,代碼行數:27,代碼來源:CategoryController.java

示例2: getImageLoaderOptions

import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; //導入依賴的package包/類
/**
 * 圖片顯示配置
 *
 * @return
 */
public static DisplayImageOptions getImageLoaderOptions() {
    BitmapFactory.Options op = new BitmapFactory.Options();
    op.inSampleSize = 4;
    DisplayImageOptions options = new DisplayImageOptions.Builder()
            .showImageOnLoading(R.drawable.ic_account_circle)
            .showImageForEmptyUri(R.drawable.ic_account_circle)
            .showImageOnFail(R.drawable.ic_account_circle)
            .bitmapConfig(Bitmap.Config.RGB_565)
            .cacheInMemory(true)
            .cacheOnDisk(true)
            .decodingOptions(op)
            .displayer(new FadeInBitmapDisplayer(animTime)) //  設置動畫淡入效果
            .build();
    return options;

}
 
開發者ID:Datatellit,項目名稱:xlight_android_native,代碼行數:22,代碼來源:ImageLoaderOptions.java

示例3: WallpapersAdapter

import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; //導入依賴的package包/類
public WallpapersAdapter(@NonNull Context context, @NonNull List<Wallpaper> wallpapers,
                         boolean isFavoriteMode, boolean isSearchMode) {
    mContext = context;
    mWallpapers = wallpapers;
    mIsFavoriteMode = isFavoriteMode;
    WallpaperBoardApplication.sIsClickable = true;

    if (isSearchMode) {
        mWallpapersAll = new ArrayList<>();
        mWallpapersAll.addAll(mWallpapers);
    }

    mOptions = ImageConfig.getRawDefaultImageOptions();
    mOptions.resetViewBeforeLoading(true);
    mOptions.cacheInMemory(true);
    mOptions.cacheOnDisk(true);
    mOptions.displayer(new FadeInBitmapDisplayer(700));
}
 
開發者ID:danimahardhika,項目名稱:wallpaperboard,代碼行數:19,代碼來源:WallpapersAdapter.java

示例4: getFadeInOption

import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; //導入依賴的package包/類
/**
 * 獲取一個漸顯圖片的配置
 * 
 * @return
 */
public static DisplayImageOptions getFadeInOption(int durationMillis,
        boolean animateFromNetwork, boolean animateFromDisk,
        boolean animateFromMemory)
{
    DisplayImageOptions options = new DisplayImageOptions.Builder()
            .
            // 網絡圖片下載完成之前的預加載的默認圖片
            showImageOnLoading(R.mipmap.ic_launcher)
            .
            // 網絡圖片下載失敗後顯示該默認圖片
            showImageOnFail(R.mipmap.ic_launcher)
            .
            // 圖片的質量
            bitmapConfig(Bitmap.Config.RGB_565)
            .cacheInMemory(true)
            .cacheOnDisk(true)
            .displayer(
                    new FadeInBitmapDisplayer(durationMillis,
                            animateFromNetwork, animateFromDisk,
                            animateFromMemory)).build();
    return options;
}
 
開發者ID:RealMoMo,項目名稱:72GGames_Demo,代碼行數:28,代碼來源:ImageLoaderUtil.java

示例5: setImageByUrl

import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; //導入依賴的package包/類
/**
 * 為ImageView設置圖片
 *
 * @param viewId
 * @return
 */
public ViewHolder setImageByUrl(int viewId, String url)
{
    ImageView iv = getView(viewId);
    DisplayImageOptions options = new DisplayImageOptions.Builder()
            .showImageOnLoading(R.mipmap.ic_launcher)
            .showImageOnFail(R.mipmap.ic_launcher)
            // 設置圖片質量
            .bitmapConfig(Bitmap.Config.RGB_565)
            // 設置內存緩存
            .cacheInMemory(true)
            // 設置磁盤緩存
            .cacheOnDisk(true)
            // 設置圖片特效
            .displayer(new FadeInBitmapDisplayer(300)).build();
    ImageLoader.getInstance().displayImage(url,iv,
            ImageLoaderUtil.getFadeInOption(200,true,true,true));
    return this;
}
 
開發者ID:RealMoMo,項目名稱:72GGames_Demo,代碼行數:25,代碼來源:ViewHolder.java

示例6: initImageLoader

import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; //導入依賴的package包/類
private void initImageLoader() {
    ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this)
    .threadPoolSize(5)
    .threadPriority(Thread.NORM_PRIORITY - 2)
    .denyCacheImageMultipleSizesInMemory()
    .memoryCache(new LruMemoryCache(2 * 1024))
    .memoryCacheSize(2 * 1024)
    .defaultDisplayImageOptions(new DisplayImageOptions.Builder()
    .showImageForEmptyUri(R.drawable.no_photo_group)
    .showImageOnFail(R.drawable.no_photo_group)
    .resetViewBeforeLoading(true)
    .displayer(new FadeInBitmapDisplayer(300)).build())
    .tasksProcessingOrder(QueueProcessingType.LIFO).build();
    ImageLoader.getInstance().init(config);
    com.nostra13.universalimageloader.utils.L.writeLogs(false);
}
 
開發者ID:WorldBank-Transport,項目名稱:RoadLab-Pro,代碼行數:17,代碼來源:RAApplication.java

示例7: RequestAdapter

import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; //導入依賴的package包/類
public RequestAdapter(@NonNull Context context, @NonNull List<Request> requests, int spanCount) {
    mContext = context;
    mRequests = requests;
    mTextColorSecondary = ColorHelper.getAttributeColor(mContext,
            android.R.attr.textColorSecondary);
    mTextColorAccent = ColorHelper.getAttributeColor(mContext, R.attr.colorAccent);
    mSelectedItems = new SparseBooleanArray();

    mShowShadow = (spanCount == 1);
    mShowPremiumRequest = Preferences.get(mContext).isPremiumRequestEnabled();

    mOptions = ImageConfig.getRawDefaultImageOptions();
    mOptions.resetViewBeforeLoading(true);
    mOptions.cacheInMemory(true);
    mOptions.cacheOnDisk(false);
    mOptions.showImageOnFail(R.drawable.ic_app_default);
    mOptions.displayer(new FadeInBitmapDisplayer(700));
}
 
開發者ID:danimahardhika,項目名稱:candybar-library,代碼行數:19,代碼來源:RequestAdapter.java

示例8: getDisplayOptions

import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; //導入依賴的package包/類
public DisplayImageOptions getDisplayOptions() {
    DisplayImageOptions options;
    options = new DisplayImageOptions.Builder()
            .showImageOnLoading(R.drawable.loading) // 設置圖片在下載期間顯示的圖片
            .showImageForEmptyUri(R.drawable.load_fail)// 設置圖片Uri為空或是錯誤的時候顯示的圖片
            .showImageOnFail(R.drawable.loading) // 設置圖片加載/解碼過程中錯誤時候顯示的圖片
            .cacheInMemory(true)// 設置下載的圖片是否緩存在內存中
            .cacheOnDisk(true) //外存緩存
            .cacheOnDisc(true)// 設置下載的圖片是否緩存在SD卡中
            .considerExifParams(true) // 是否考慮JPEG圖像EXIF參數(旋轉,翻轉)
            .imageScaleType(ImageScaleType.EXACTLY_STRETCHED)// 設置圖片以如何的編碼方式顯示
            .bitmapConfig(Bitmap.Config.RGB_565)// 設置圖片的解碼類型//
            // .delayBeforeLoading(int delayInMillis)//int
            // delayInMillis為你設置的下載前的延遲時間
            // 設置圖片加入緩存前,對bitmap進行設置
            // .preProcessor(BitmapProcessor preProcessor)
            .resetViewBeforeLoading(true)// 設置圖片在下載前是否重置,複位
           // .displayer(new RoundedBitmapDisplayer(20))// 是否設置為圓角,弧度為多少
            .displayer(new FadeInBitmapDisplayer(50))// 是否圖片加載好後漸入的動畫時間
            .build();// 構建完成
    return options;
}
 
開發者ID:Rokuki,項目名稱:Trailer,代碼行數:23,代碼來源:Image_Loader.java

示例9: UILKit

import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; //導入依賴的package包/類
/**
 * 初始化
 *
 * @param context
 */
private UILKit(Context context) {
    File cacheDir = getDiskCacheDir(context, "img");

    ImageLoaderConfiguration.Builder config = new ImageLoaderConfiguration.Builder(context)
            .threadPriority(Thread.NORM_PRIORITY - 2)
            .denyCacheImageMultipleSizesInMemory()
            .memoryCacheSize(10 * 1024 * 1024)
            .diskCache(new UnlimitedDiskCache(cacheDir))
            .diskCacheFileNameGenerator(new Md5FileNameGenerator())
            .diskCacheSize(50 * 1024 * 1024) // 50 MiB
            .tasksProcessingOrder(QueueProcessingType.LIFO);

    ImageLoader.getInstance().init(config.build());



    picOptions = new DisplayImageOptions.Builder()
            .imageScaleType(ImageScaleType.EXACTLY)
            .cacheOnDisk(false).cacheInMemory(false)
            .resetViewBeforeLoading(true)
            .displayer(new FadeInBitmapDisplayer(500)).build();
}
 
開發者ID:limedroid,項目名稱:XRichText,代碼行數:28,代碼來源:UILKit.java

示例10: getDisplayImageOptionsFactory

import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; //導入依賴的package包/類
private static DisplayImageOptions getDisplayImageOptionsFactory(int resId) {
    if (mOptionsMap.containsKey(resId)) {
        return mOptionsMap.get(resId);
    }
    DisplayImageOptions.Builder builder = new DisplayImageOptions.Builder();
    builder.imageScaleType(ImageScaleType.EXACTLY).cacheOnDisk(true)
            .cacheInMemory(true).bitmapConfig(Bitmap.Config.RGB_565)
            .displayer(new FadeInBitmapDisplayer(300));

    if (resId != 0) {
        builder.showImageOnFail(resId).showImageForEmptyUri(resId)
                .showImageOnLoading(resId);
    }
    mOptions = builder.build();
    mOptionsMap.put(resId, mOptions);
    return mOptions;
}
 
開發者ID:hezhubo,項目名稱:HPlayer,代碼行數:18,代碼來源:Utility.java

示例11: onLoadingComplete

import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; //導入依賴的package包/類
@Override
public void onLoadingComplete(String imageUri, View view,
                              Bitmap loadedImage) {
    if (imageUri.equals(view.getTag())) {
        L.e(String.valueOf(view.getTag()));
        ((ImageView)view).setImageBitmap(loadedImage);
        return;
    }
    if (loadedImage != null) {
        ImageView imageView = (ImageView) view;
        boolean firstDisplay = !displayedImages.contains(imageUri);
        if (firstDisplay) {
            FadeInBitmapDisplayer.animate(imageView, 500);
            displayedImages.add(imageUri);
        }
    }
}
 
開發者ID:SwiftyWang,項目名稱:FingerColoring-Android,代碼行數:18,代碼來源:ImageLoaderUtil.java

示例12: MessageChatAdapter

import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; //導入依賴的package包/類
public MessageChatAdapter(Context context,List<BmobMsg> msgList) {
	super(context, msgList);
	currentObjectId = BmobUserManager.getInstance(context).getCurrentUserObjectId();
	
	options = new DisplayImageOptions.Builder()
	.showImageForEmptyUri(R.drawable.ic_launcher)
	.showImageOnFail(R.drawable.ic_launcher)
	.resetViewBeforeLoading(true)
	.cacheOnDisc(true)
	.cacheInMemory(true)
	.imageScaleType(ImageScaleType.EXACTLY)
	.bitmapConfig(Bitmap.Config.RGB_565)
	.considerExifParams(true)
	.displayer(new FadeInBitmapDisplayer(300))
	.build();
}
 
開發者ID:JasonGaoH,項目名稱:enjoychat,代碼行數:17,代碼來源:MessageChatAdapter.java

示例13: onCreate

import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_img_page);
	
	options = new DisplayImageOptions.Builder()
	.resetViewBeforeLoading(true)
	.cacheOnDisc(true)
	.imageScaleType(ImageScaleType.EXACTLY)
	.bitmapConfig(Bitmap.Config.RGB_565)
	.considerExifParams(true)
	.displayer(new FadeInBitmapDisplayer(0))
	.build();
	
	url=getIntent().getStringExtra("url");
	
	initView();
	initData();
}
 
開發者ID:cowthan,項目名稱:AyoSunny,代碼行數:20,代碼來源:ImgPageActivity.java

示例14: initLib

import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; //導入依賴的package包/類
private void initLib() {
    // 初始化日誌功能, 開啟/關閉 日誌輸出
    L.setLogOpen(AppConstant.LOG_OPEN);

    // 初始化自定義異常捕獲
    CrashHandler.getInstance().init(this);

    // 初始化ImageLoader
    // 設置圖片顯示選項
    DisplayImageOptions displayOp = new DisplayImageOptions.Builder()
            .showImageOnLoading(0)// 圖片正在加載時顯示的背景
            .cacheInMemory(true)// 緩存在內存中
            .cacheOnDisk(true)// 緩存在磁盤中
            .displayer(new FadeInBitmapDisplayer(300))// 顯示漸變動畫
            .bitmapConfig(Bitmap.Config.RGB_565) // 設置圖片的解碼類型
            .considerExifParams(true)// 考慮旋轉角
            .build();

    ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(
            getApplicationContext()).defaultDisplayImageOptions(displayOp)
            .denyCacheImageMultipleSizesInMemory()// 不解析多種尺寸
            .build();

    ImageLoader.getInstance().init(config);
}
 
開發者ID:inexistence,項目名稱:VideoMeeting,代碼行數:26,代碼來源:App.java

示例15: MessageChatAdapter

import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; //導入依賴的package包/類
public MessageChatAdapter(Context context,List<BmobMsg> msgList) {
	// TODO Auto-generated constructor stub
	super(context, msgList);
	currentObjectId = BmobUserManager.getInstance(context).getCurrentUserObjectId();
	
	options = new DisplayImageOptions.Builder()
	.showImageForEmptyUri(R.drawable.ic_launcher)
	.showImageOnFail(R.drawable.ic_launcher)
	.resetViewBeforeLoading(true)
	.cacheOnDisc(true)
	.cacheInMemory(true)
	.imageScaleType(ImageScaleType.EXACTLY)
	.bitmapConfig(Bitmap.Config.RGB_565)
	.considerExifParams(true)
	.displayer(new FadeInBitmapDisplayer(300))
	.build();
}
 
開發者ID:HuTianQi,項目名稱:QQ,代碼行數:18,代碼來源:MessageChatAdapter.java


注:本文中的com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。