Tabnine Logo
ImageSwitcher.setImageResource
Code IndexAdd Tabnine to your IDE (free)

How to use
setImageResource
method
in
android.widget.ImageSwitcher

Best Java code snippets using android.widget.ImageSwitcher.setImageResource (Showing top 3 results out of 315)

origin: Ramotion/cardslider-android

private void initSwitchers() {
  temperatureSwitcher = (TextSwitcher) findViewById(R.id.ts_temperature);
  temperatureSwitcher.setFactory(new TextViewFactory(R.style.TemperatureTextView, true));
  temperatureSwitcher.setCurrentText(temperatures[0]);
  placeSwitcher = (TextSwitcher) findViewById(R.id.ts_place);
  placeSwitcher.setFactory(new TextViewFactory(R.style.PlaceTextView, false));
  placeSwitcher.setCurrentText(places[0]);
  clockSwitcher = (TextSwitcher) findViewById(R.id.ts_clock);
  clockSwitcher.setFactory(new TextViewFactory(R.style.ClockTextView, false));
  clockSwitcher.setCurrentText(times[0]);
  descriptionsSwitcher = (TextSwitcher) findViewById(R.id.ts_description);
  descriptionsSwitcher.setInAnimation(this, android.R.anim.fade_in);
  descriptionsSwitcher.setOutAnimation(this, android.R.anim.fade_out);
  descriptionsSwitcher.setFactory(new TextViewFactory(R.style.DescriptionTextView, false));
  descriptionsSwitcher.setCurrentText(getString(descriptions[0]));
  mapSwitcher = (ImageSwitcher) findViewById(R.id.ts_map);
  mapSwitcher.setInAnimation(this, R.anim.fade_in);
  mapSwitcher.setOutAnimation(this, R.anim.fade_out);
  mapSwitcher.setFactory(new ImageViewFactory());
  mapSwitcher.setImageResource(maps[0]);
  mapLoadListener = new DecodeBitmapTask.Listener() {
    @Override
    public void onPostExecuted(Bitmap bitmap) {
      ((ImageView)mapSwitcher.getNextView()).setImageBitmap(bitmap);
      mapSwitcher.showNext();
    }
  };
}
origin: livroandroid/5ed

  @Override
  public void onClick(View arg0) {
    if (idx == imagens.length) {
      idx = 0; // fim do array
    }
    imageSwitcher.setImageResource(imagens[idx++]);
  }
});
origin: LT5505/SliderLayout

/**
 * load the resource images
 *
 * @param pictureIndex index
 */
private void loadFileImage(int pictureIndex) {
  if (list != null && list.size() != 0) {
    switcherImage.setImageResource((Integer) list.get(pictureIndex));
  }
}
android.widgetImageSwitchersetImageResource

Popular methods of ImageSwitcher

  • setFactory
  • setInAnimation
  • setOutAnimation
  • <init>
  • showNext
  • addView
  • getCurrentView
  • getHeight
  • getLeft
  • getNextView
  • getTop
  • getViewTreeObserver
  • getTop,
  • getViewTreeObserver,
  • getWidth,
  • setEnabled,
  • setImageDrawable,
  • setLayoutParams,
  • setOnTouchListener

Popular in Java

  • Reactive rest calls using spring rest template
  • getSystemService (Context)
  • getSharedPreferences (Context)
  • onRequestPermissionsResult (Fragment)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now