GithubHelp home page GithubHelp logo

Comments (7)

sospartan avatar sospartan commented on July 24, 2024

found a workaround in the sample project:
execute with the listener both implemented RequestListener and RequestProgressListener
but it's still a issue ,right?

from robospice.

stephanenicolas avatar stephanenicolas commented on July 24, 2024

You should not be able to plugin a request listener that way but always use
the spice manager to link requests and listeners, may they be progress
listeners or not. So yes, there is a problem I believe here. Would you mind
to fill an official issue in the github repo for this ?

Thanks for finding this,
Stéphane

2012/12/31 sospartan [email protected]

found a workaround in the sample project:
execute with the listener both implemented RequestListener and
RequestProgressListener
but it's still a issue ,right?


Reply to this email directly or view it on GitHubhttps://github.com//issues/16#issuecomment-11774086.

Stéphane NICOLAS,
OCTO Technology
Développeur & Consultant Android / Java
..........................................................
50, Avenue des Champs-Elysées
75008 Paris
+33 (0)6.26.32.34.09
www.octo.com - blog.octo.com
www.usievents.com
...........................................................

from robospice.

sospartan avatar sospartan commented on July 24, 2024

Thanks for reply , this #16 is already post , what do mean by

Would you mind to fill an official issue in the github repo for this ?

In my project , I want listen all the progress update in Activity( control the progress bar in action bar), and listen every request result in separate fragment .Should I link all the requests in Activity and notify fragment manually ? Is there any best practice for this kind of job ?

from robospice.

stephanenicolas avatar stephanenicolas commented on July 24, 2024

Could you be more clear, I can't understand exactly.
Give an example please.

Stéphane

2012/12/31 sospartan [email protected]

Thanks for reply , this #16https://github.com/octo-online/robospice/issues/16is already post , what do mean by

Would you mind to fill an official issue in the github repo for this ?

In my project , I want listen all the progress update in Activity( control
the progress bar in action bar), and listen every request result in
separate fragment .Should I link all the requests in Activity and notify
fragment manually ? Is there any best practice for this kind of job ?


Reply to this email directly or view it on GitHubhttps://github.com//issues/16#issuecomment-11776237.

Stéphane NICOLAS,
OCTO Technology
Développeur & Consultant Android / Java
..........................................................
50, Avenue des Champs-Elysées
75008 Paris
+33 (0)6.26.32.34.09
www.octo.com - blog.octo.com
www.usievents.com
...........................................................

from robospice.

sospartan avatar sospartan commented on July 24, 2024

My app is just like a browser , single Activity with fragments . The Activity's content view is a ProgressBar ,address EditText and a fragment container view where to display pages content by different fragments.

from robospice.

stephanenicolas avatar stephanenicolas commented on July 24, 2024

There are obviously different design that could be used.

My intuition would be somthing like

public class BrowserContainerActivity extends Activity implements
ProgressNotifier {
@OverRide
public void setProgress( int progress ) {
//update progressbar
}
}

public class BaseBrowserFragment extends Fragment {

private class UrlRequestListener implements RequestListener,
RequestProgressListener {
public void onSuccess(InputStream result) {
}
public void onFailure(SpiceException exception) {
}
public void onRequestProgressUpdate( RequestProgress progress ) {

  •    ((ProgressNotifier) getActivity()). setProgress( 100 *
    
    progress.getProgress());*
    }
    }

And then you could perform your queries inside your fragments. I would
definitely handle the results of requests as InputStream to be able to
handle large pages.

Stéphane

2012/12/31 sospartan [email protected]

My app is just like a browser , single Activity with fragments . The
Activity's content view is a ProgressBar ,address EditText and a fragment
container view where to display pages content by different fragments.


Reply to this email directly or view it on GitHubhttps://github.com//issues/16#issuecomment-11779678.

Stéphane NICOLAS,
OCTO Technology
Développeur & Consultant Android / Java
..........................................................
50, Avenue des Champs-Elysées
75008 Paris
+33 (0)6.26.32.34.09
www.octo.com - blog.octo.com
www.usievents.com
...........................................................

from robospice.

stephanenicolas avatar stephanenicolas commented on July 24, 2024

The initial issue was to be able to register a RequestProgressListener directly on a SpiceRequest. This bug is corrected in current state of repo so I close the issue. Please continue on Google Group for further on your specific problem.

from robospice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.