Java Code Examples for com.nostra13.universalimageloader.core.ImageLoaderConfiguration#createDefault()

The following examples show how to use com.nostra13.universalimageloader.core.ImageLoaderConfiguration#createDefault() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GankCommonAdapter.java    From Gank with Apache License 2.0 6 votes vote down vote up
public GankCommonAdapter(@NonNull Context context, List<CommonDate.ResultsEntity> datas) {
    super(context, datas, R.layout.item_common);
    //创建默认的ImageLoader配置参数
    ImageLoaderConfiguration configuration = ImageLoaderConfiguration.createDefault(context);
    ImageLoader.getInstance().init(configuration); // Get singleton instance

    push_left_in = AnimationUtils.loadAnimation(context, R.anim.push_left_in);
    push_right_in = AnimationUtils.loadAnimation(context, R.anim.push_right_in);
    push_left_in.setDuration(1000);
    push_right_in.setDuration(1000);

    //显示图片的配置
    options = new DisplayImageOptions.Builder()
            .cacheInMemory(true)
            .cacheOnDisk(true)
            .bitmapConfig(Bitmap.Config.RGB_565)
            .build();
}
 
Example 2
Source File: RecommendGridViewAdapter.java    From MarketAndroidApp with Apache License 2.0 5 votes vote down vote up
public RecommendGridViewAdapter(Context context, List<CommodityModel> listItemRecommend) {
    this.context = context;
    this.listItemRecommend = listItemRecommend;

    //实例化ImageLoader
    ImageLoaderConfiguration configuration = ImageLoaderConfiguration.createDefault(context);
    ImageLoader.getInstance().init(configuration);
}
 
Example 3
Source File: HotGridViewAdapter.java    From MarketAndroidApp with Apache License 2.0 5 votes vote down vote up
public HotGridViewAdapter(Context context, List<CommodityModel> listItemHot) {
    this.context = context;
    this.listItemHot = listItemHot;
    //实例化ImageLoader
    ImageLoaderConfiguration configuration = ImageLoaderConfiguration.createDefault(context);
    ImageLoader.getInstance().init(configuration);
}
 
Example 4
Source File: SameLinkGridApter.java    From MarketAndroidApp with Apache License 2.0 5 votes vote down vote up
public SameLinkGridApter(Context context, List<CommodityModel> listItemRecommend) {
    this.context = context;
    this.listItemSameLink = listItemRecommend;
    inflater = LayoutInflater.from(context);

    //实例化ImageLoader
    ImageLoaderConfiguration configuration = ImageLoaderConfiguration.createDefault(context);
    ImageLoader.getInstance().init(configuration);
}
 
Example 5
Source File: CommodityItemAdapter.java    From MarketAndroidApp with Apache License 2.0 5 votes vote down vote up
public CommodityItemAdapter(Context mContext, List<CommodityModel> menuDatas) {
    this.mContext = mContext;
    this.menuDatas = menuDatas;

    //实例化ImageLoader
    ImageLoaderConfiguration configuration = ImageLoaderConfiguration.createDefault(mContext);
    ImageLoader.getInstance().init(configuration);
}
 
Example 6
Source File: CommodityItemAdapter.java    From MarketAndroidApp with Apache License 2.0 5 votes vote down vote up
public CommodityItemAdapter(Context mContext, List<CommodityModel> menuDatas, Handler handler) {
    this.mContext = mContext;
    this.menuDatas = menuDatas;
    this.mHandler = handler;

    //实例化ImageLoader
    ImageLoaderConfiguration configuration = ImageLoaderConfiguration.createDefault(mContext);
    ImageLoader.getInstance().init(configuration);
}
 
Example 7
Source File: MyApplication.java    From foodie-app with Apache License 2.0 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();

    //创建默认的ImageLoader配置参数
    ImageLoaderConfiguration configuration = ImageLoaderConfiguration
            .createDefault(this);

    //Initialize ImageLoader with configuration.
    ImageLoader.getInstance().init(configuration);
    //在使用SDK各组件之前初始化context信息,传入ApplicationContext
    //注意该方法要再setContentView方法之前实现
    SDKInitializer.initialize(getApplicationContext());
}
 
Example 8
Source File: MyApp.java    From PowerfulRecyclerView with Apache License 2.0 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();

    ImageLoaderConfiguration configuration = ImageLoaderConfiguration
            .createDefault(this);

    ImageLoader.getInstance().init(configuration);
}
 
Example 9
Source File: GApp.java    From ImagePicker with Apache License 2.0 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    ImageLoaderConfiguration config = ImageLoaderConfiguration.createDefault(this);

    ImageLoader.getInstance().init(config);     //UniversalImageLoader初始化
    x.Ext.init(this);                           //xUtils3初始化
}
 
Example 10
Source File: ZenApplication.java    From zen4android with MIT License 5 votes vote down vote up
@Override
public void onCreate() {
	super.onCreate();
	ImageLoaderConfiguration DefaultConfig = ImageLoaderConfiguration.createDefault(this);
	// Initialize ImageLoader with configuration.
	ImageLoader.getInstance().init(DefaultConfig);
	
	appContext = getApplicationContext();
}
 
Example 11
Source File: BuyHistoryAdapter.java    From MarketAndroidApp with Apache License 2.0 4 votes vote down vote up
public BuyHistoryAdapter(Context context) {
    this.context = context;
    //实话ImageLoader
    ImageLoaderConfiguration configuration = ImageLoaderConfiguration.createDefault(context);
    ImageLoader.getInstance().init(configuration);
}
 
Example 12
Source File: ShoppingCartAdapter.java    From MarketAndroidApp with Apache License 2.0 4 votes vote down vote up
public ShoppingCartAdapter(Context context) {
    this.context = context;
    //实例化ImageLoader
    ImageLoaderConfiguration configuration = ImageLoaderConfiguration.createDefault(context);
    ImageLoader.getInstance().init(configuration);
}
 
Example 13
Source File: UILApplication.java    From Android-Universal-Image-Loader-Modify with Apache License 2.0 4 votes vote down vote up
private void initImageLoader(){
    ImageLoaderConfiguration configuration=ImageLoaderConfiguration.createDefault(this);
    ImageLoader.getInstance().init(configuration);

}