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

How to use
ImageSwitcher
in
android.widget

Best Java code snippets using android.widget.ImageSwitcher (Showing top 10 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: Ramotion/cardslider-android

  @Override
  public void onPostExecuted(Bitmap bitmap) {
    ((ImageView)mapSwitcher.getNextView()).setImageBitmap(bitmap);
    mapSwitcher.showNext();
  }
};
origin: stackoverflow.com

ll.setOrientation( LinearLayout.VERTICAL );
setContentView( ll );
final ImageSwitcher is = new ImageSwitcher( this );
is.setOutAnimation( this, R.anim.fadeout );
is.setInAnimation( this, R.anim.fadein );
ImageView iv1 = new ImageView( this );
iv1.setImageResource( R.drawable.icon );
is.addView( iv1 );
is.showNext();
ll.addView( is );
    is.addView( iv2 );
    is.showNext();
origin: livroandroid/5ed

imageSwitcher.setFactory(new ImageSwitcher.ViewFactory() {
  @Override
  public View makeView() {
imageSwitcher.setInAnimation(AnimationUtils.loadAnimation(this, android.R.anim.fade_in));
imageSwitcher.setOutAnimation(AnimationUtils.loadAnimation(this, android.R.anim.fade_out));
origin: LT5505/SliderLayout

  /**
   * Left to Right
   */
  private void SliderLeftToRight() {
    // get current index
    pictureIndex = pictureIndex == 0 ? itemCount - 1
        : pictureIndex - 1;
    // set Animation
    switcherImage.setInAnimation(AnimationUtils.loadAnimation(context,
        android.R.anim.slide_in_left));
    switcherImage.setOutAnimation(AnimationUtils.loadAnimation(context,
        android.R.anim.slide_out_right));
    // switch indicator
//        switcherImage.setImageResource(image[pictureIndex]);
    switchIndicator(pictureIndex);
  }

origin: LT5505/SliderLayout

switcherImage = new ImageSwitcher(context);
switcherImage.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
switcherImage.setFactory(this);
switcherImage.setOnTouchListener(this);
addView(switcherImage);
indicatorContainer = new LinearLayout(context);
origin: dsolonenko/financisto

minusDrawable.mutate().setColorFilter(minusColor, PorterDuff.Mode.SRC_ATOP);
requestId = EDIT_AMOUNT_REQUEST.incrementAndGet();
signSwitcher.setFactory(() -> {
  ImageView v = new ImageView(getContext());
  v.setScaleType(ImageView.ScaleType.FIT_CENTER);
  return v;
});
signSwitcher.setImageDrawable(minusDrawable);
primary.setKeyListener(keyListener);
primary.addTextChangedListener(textWatcher);
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

  /**
   * Right to Left
   */
  private void SliderRightToLeft() {
    // get current index
    pictureIndex = pictureIndex == itemCount - 1 ? 0
        : pictureIndex + 1;
    // set Animation
    // Custom the slide_out_left and slide_in_right
    switcherImage.setInAnimation(AnimationUtils.loadAnimation(context,
        R.anim.slide_in_right));
    switcherImage.setOutAnimation(AnimationUtils.loadAnimation(context,
        R.anim.slide_out_left));
//                switcherImage.setInAnimation(AnimationUtils.loadAnimation(this,android.R.anim.fade_in));
//                switcherImage.setOutAnimation(AnimationUtils.loadAnimation(this, android.R.anim.fade_out));
    // switch indicator
//        switcherImage.setImageResource(image[pictureIndex]);
    switchIndicator(pictureIndex);
  }

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.widgetImageSwitcher

Most used methods

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (Timer)
  • startActivity (Activity)
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top 12 Jupyter Notebook extensions
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