com.blogspot.applications4android.comicreader.core
Class ComicActivity

java.lang.Object
  extended by Activity
      extended by com.blogspot.applications4android.comicreader.core.ComicActivity
Direct Known Subclasses:
ActivityComicReader, ActivityComicSelector, ActivityPageViewer, ComicStripViewer

public class ComicActivity
extends Activity

Useful class for defining some of the common things for all the activities used in this application.


Field Summary
protected static int mColor1
          color1 for the list view row
protected static int mColor2
          color2 for the list view row
 
Constructor Summary
ComicActivity()
           
 
Method Summary
protected  void displayHtml(int layout_id, int web_view_id, java.lang.String page)
          Set the content view and display a html page.
protected  void ExitActivity(View v)
          Exit from this activity.
 void hideResetButton()
          Hide the reset button which comes when double-tap is succeeded
protected  void onPause()
          Called when the activity is finished.
protected  void onResume()
          Called when the activity is first created.
protected  ComicClassList setupComicsList(java.lang.String pref)
          Helper function to setup the comic list
 void showResetButton()
          Display the reset button which comes when double-tap is succeeded
protected  void storeComicClassList(ComicClassList list, boolean store)
          Helper function to store the list of comics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mColor1

protected static int mColor1
color1 for the list view row


mColor2

protected static int mColor2
color2 for the list view row

Constructor Detail

ComicActivity

public ComicActivity()
Method Detail

hideResetButton

public void hideResetButton()
Hide the reset button which comes when double-tap is succeeded


showResetButton

public void showResetButton()
Display the reset button which comes when double-tap is succeeded


onResume

protected void onResume()
Called when the activity is first created.

Parameters:
savedInstanceState - bundle containing saved data from a previous onPause.

onPause

protected void onPause()
Called when the activity is finished.

Parameters:
savedInstanceState - bundle containing saved data from a previous onPause.

ExitActivity

protected void ExitActivity(View v)
Exit from this activity.

Parameters:
v - View which generated this callback.

displayHtml

protected void displayHtml(int layout_id,
                           int web_view_id,
                           java.lang.String page)
Set the content view and display a html page. Useful if the activity is going to display ONLY a html page.

Parameters:
layout_id - the resource-id of the layout for which to set the content view.
web_view_id - resource-id of the webView widget where to display the html page.
page - the desired html page.

storeComicClassList

protected void storeComicClassList(ComicClassList list,
                                   boolean store)
                            throws java.io.IOException,
                                   ComicSDCardFull
Helper function to store the list of comics

Parameters:
list - comic list
store - whether to store or not
Throws:
ComicSDCardFull
java.io.IOException

setupComicsList

protected ComicClassList setupComicsList(java.lang.String pref)
                                  throws ComicSortException,
                                         ComicNotFoundException,
                                         java.io.IOException,
                                         JSONException
Helper function to setup the comic list

Parameters:
pref - sort type pref-key
Returns:
comic list
Throws:
ComicSortException
ComicNotFoundException
JSONException
java.io.IOException