@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(); }
@Override public void onBackPressed() { searchPages.cancel(true); super.onBackPressed(); }