Advertisement
wandrake

Untitled

Oct 6th, 2013
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.14 KB | None | 0 0
  1. public class BookAuthorsFragment extends Fragment {
  2.     private ProgressBar mProgressBar;
  3.  
  4.     @Override
  5.     public View onCreateView(LayoutInflater inflater, ViewGroup container,
  6.             Bundle savedInstanceState) {
  7.         // TODO Auto-generated method stub
  8.         View ret = inflater.inflate(R.layout.book_authors_fragment, container,
  9.                 false);
  10.  
  11.         mProgressBar = (ProgressBar) ret
  12.                 .findViewById(R.id.book_authors_fragment_progbar);
  13.         mProgressBar.setVisibility(View.VISIBLE);
  14.  
  15.         ParseAuthors pa = new ParseAuthors();
  16.         pa.execute();
  17.  
  18.         return ret;
  19.     }
  20.  
  21.     private class ParseAuthors extends
  22.             AsyncTask<Void, Void, ArrayList<HashMap<String, String>>> {
  23.  
  24.         @Override
  25.         protected void onPostExecute(ArrayList<HashMap<String, String>> result) {
  26.             super.onPostExecute(result);
  27.  
  28.             // Roba
  29.  
  30.             mProgressBar.setVisibility(View.INVISIBLE);
  31.         }
  32.  
  33.         @Override
  34.         protected ArrayList<HashMap<String, String>> doInBackground(
  35.                 Void... params) {
  36.  
  37.             // Roba
  38.         }
  39.  
  40.     }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement