Questions tagged [loader]

Loaders make it easy to asynchronously load data in an activity or fragment.

Introduced in Android 3.0, loaders make it easy to asynchronously load data in an activity or fragment. Loaders have these characteristics:

  • They are available to every Activity and Fragment.
  • They provide asynchronous loading of data.
  • They monitor the source of their data and deliver new results when the content changes.
  • They automatically reconnect to the last loader's cursor when being recreated after a configuration change. Thus, they don't need to re-query their data.

Reference page: http://developer.android.com/guide/components/loaders.html

1805 questions
7
votes
1 answer

Webpack loader equivalent of requirejs plugin load with XMLHttpRequest

I have a pair of requirejs plugins, that I'd like to replace with a webpack loader. define('firstLoader', { load: function (name, parentRequire, onload, config) { var xhr = new XMLHttpRequest(); xhr.addEventListener('load', function…
wegry
  • 7,046
  • 6
  • 39
  • 59
7
votes
0 answers

How does cancelling an AsyncTaskLoader work?

I've noticed the following functions for AsyncTaskLoader,Loader and LoaderManager : cancelLoadInBackground cancelLoad destroyLoader, abandon, reset Thing is, I don't get how they work: What's the difference between them? Does any of them call…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
7
votes
1 answer

Custom Webpack CSS-loader "localIdentName" Query Tag Placeholders?

I'm brand new to Webpack and have been playing around with the css-loader. On the Github page under "Local Scope" there's information about specifying a localIdentName query tag with your own custom values like:…
Benjamin Solum
  • 2,281
  • 18
  • 29
7
votes
2 answers

What is the equivalent of @loader_path for rpath specification on linux?

On osx loader, @loader_path resolves to the position of the generic binary object, and @executable_path to the position of the executable. On Linux, apparently there's only $ORIGIN, which resolves to the executable path. Is there a hidden feature in…
Stefano Borini
  • 138,652
  • 96
  • 297
  • 431
7
votes
2 answers

What is the difference between loader or AsyncTask?

I want to know the difference between Android loader and AsyncTask , here the demo on Loader: package com.android.loaderdemo; import org.json.JSONArray; import org.json.JSONObject; import android.app.Activity; import…
Namrata
  • 1,683
  • 1
  • 17
  • 28
7
votes
3 answers

AS3 Stop external swf

Hi I'm loading an external swf into a MovieClip, and I want it to stop until I choose to play. Currently it plays upon loading immediately. var mc:MovieClip; var swfLoader:Loader = new Loader(); swfLoader.contentLoaderInfo.addEventListener…
Robin
  • 71
  • 1
  • 1
  • 2
7
votes
2 answers

Inflate layout on ListItem based on ListItem specific variable

I'm using a SimpleCursorAdapter and a ListView to show some data loaded with a Loader. Inside the cursor I have items with a int that goes from 0 to 3. I want the items with this int equals to 0-1 to have a layout (right aligned, one color) and…
David Corsalini
  • 7,958
  • 8
  • 41
  • 66
6
votes
2 answers

Java Encrypted Memory Class Loader

I'll get right to the point so you don't have to read a lot. Basically, I have an AES-128bit Encrypted Jar file. I want to make a launcher so that I can load this encrypted Jar into memory and run it (using the key). I have a simple Class Loader…
Timothy Hanes
  • 297
  • 1
  • 5
  • 17
6
votes
2 answers

Input elemnts in HTMLLoader are readonly in adobe AIR

Lets say i have a html file that contain a form:
we have load this html file using HTMLLoader inside…
Jalal
  • 6,594
  • 9
  • 63
  • 100
6
votes
2 answers

Vue loader 17.0.0 + Webpack 5.74.0 - Module build failed

I am trying to use vue-loader with my SPA VUE APP, And I'm getting the following error. ERROR in ./app2.vue Module build failed (from ./node_modules/vue-loader/dist/index.js): TypeError: Cannot read properties of undefined (reading 'styles') …
daniel
  • 119
  • 1
  • 4
6
votes
1 answer

load time relocation and virtual memory

I am wondering what load-time relocation actually means on a system with virtual memory support.I was thinking that in a system with virtual memory every executable will have addresses starting from zero and at run-time the addresses will be…
vjain27
  • 3,514
  • 9
  • 41
  • 60
6
votes
2 answers

Trouble with Custom AsyncTaskLoader callbacks

I'm having a couple of problems with my AsyncTaskLoader, not sure if they're related as they both happen when attempting to restart the Loader. In my application I have 3 instances of a custom CursorAdapter, backed by 3 instances of a custom…
Pikaling
  • 8,282
  • 3
  • 27
  • 44
6
votes
1 answer

How to dynamically load json schema to typescript with webpack

I have a json schema describing an object Person. I would like to be able to load that schema into a typescript file directly this way: import Person from './schema/person.schema.json'; For this, I created a loader which convert the json file to a…
Luke Skywalker
  • 1,464
  • 3
  • 17
  • 35
6
votes
0 answers

How to pass some data to next webpack loader

I'm trying to write some chained loaders for BEM metodology. Here is a part of webpack config. entry: './src/pages/index.bemjson.js', output: { filename: 'bundle.js', path: path.resolve(__dirname, 'dist') }, module: { rules: [ …
6
votes
1 answer

Importing UMD built module using webpack leads to Critical Dependency errors

I am trying to build a simple file that depends on a library built with UMD exports. // main.ts import { parseTree } from 'jsonc-parser'; const tree = parseTree('{ "name: "test" }'); console.log(tree); It compiles fine, however webpack spits out…
jtheoof
  • 585
  • 6
  • 10