Ejemplo n.º 1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_screen_slide);
    getWindow()
        .setFlags(
            WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

    manga = (Manga) getIntent().getSerializableExtra(Aplication.MANGA);
    capitulo = (Capitulo) getIntent().getSerializableExtra(Aplication.CAPTIULO);

    progressBarLoad = (ProgressBar) findViewById(R.id.progressBar_loading);
    textViewPageInfo = (TextView) findViewById(R.id.textView_pageInfo);
    progressBarLoad.getIndeterminateDrawable().setColorFilter(Color.RED, PorterDuff.Mode.SRC_IN);

    textViewPageInfo.setText("Aguarde...");

    try {
      if (manga.getId() == 0) {
        Manga m = new MangaDao().getForUrl(manga.getUrl());
        if (m != null) {
          manga.setId(m.getId());
        }
      }
    } catch (SQLException e) {
      e.printStackTrace();
    }

    searchPages = new SearchPages(this);
    searchPages.execute();
  }
Ejemplo n.º 2
0
 @Override
 public void onBackPressed() {
   searchPages.cancel(true);
   super.onBackPressed();
 }