Ejemplo n.º 1
0
 /** Controls behavior of the back button */
 @Override
 public void onBackPressed() {
   // Only close apps when there's no backstack
   if (getSupportFragmentManager().getBackStackEntryCount() <= 1) {
     finish();
   } else {
     super.onBackPressed();
   }
 }
Ejemplo n.º 2
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    DisplayImageOptions defaultOptions =
        new DisplayImageOptions.Builder().cacheInMemory(true).cacheOnDisk(true).build();

    ImageLoaderConfiguration config =
        new ImageLoaderConfiguration.Builder(getApplicationContext())
            .defaultDisplayImageOptions(defaultOptions)
            .build();

    ImageLoader.getInstance().init(config);
  }