Ejemplo n.º 1
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   // TODO Auto-generated method stub
   super.onCreate(savedInstanceState);
   setContentView(R.layout.flipper);
   flippy = (ViewFlipper) findViewById(R.id.viewFlipper1);
   flippy.setOnClickListener(this);
 }
Ejemplo n.º 2
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.flipper);
   flippy = (ViewFlipper) findViewById(R.id.viewFlipper1);
   flippy.setOnClickListener(this);
   flippy.setFlipInterval(500);
   flippy.startFlipping();
 }
Ejemplo n.º 3
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   requestWindowFeature(Window.FEATURE_NO_TITLE);
   setVolumeControlStream(AudioManager.STREAM_MUSIC);
   setContentView(R.layout.flipper_skank_saiba_mais);
   flippy = (ViewFlipper) findViewById(R.id.viewFlipper1);
   flippy.setOnClickListener(this);
   //	    flippy.setFlipInterval(500);
   //	    flippy.startFlipping();
 }
Ejemplo n.º 4
0
 /** 初始化组件,滚动数据 */
 public void initRollingText() {
   ViewFlipper mFlipper = ((ViewFlipper) this.findViewById(R.id.notice_other_flipper));
   String str[] = splitStr(Constants.NEWS, 23);
   for (int i = 0; i < str.length; i++) {
     mFlipper.addView(addTextByText(str[i]));
   }
   mFlipper.setInAnimation(AnimationUtils.loadAnimation(this, R.anim.push_up_in));
   mFlipper.setOutAnimation(AnimationUtils.loadAnimation(this, R.anim.push_up_out));
   mFlipper.startFlipping();
   mFlipper.setOnClickListener(filterclick);
 }
Ejemplo n.º 5
0
 private void Repetir() {
   Log.d(TAG, "ejecutando void Repetir()");
   flip.setDisplayedChild(0);
   flip.setOnClickListener(
       new View.OnClickListener() {
         @Override
         public void onClick(View v) {
           flip.setClickable(false);
           sonidoCosas.play(sonidoCosasID[contadorPalabras], 1, 1, 1, 0, 1); // Se toca el sonido
           mHandler.postDelayed(
               actualizaPantalla,
               1500); // Se llama al handler para hacer los cambios en pantalla (cambiar a la
           // imagen y modificar el proximo text e image view)
         }
       });
 }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View view = inflater.inflate(R.layout.english_sliding_fragment, container, false);
    english_popular = (ViewFlipper) view.findViewById(R.id.movie_flipper_english_popular);
    english_rated = (ViewFlipper) view.findViewById(R.id.movie_flipper_english_rated);
    english_recent = (ViewFlipper) view.findViewById(R.id.movie_flipper_english_recent);

    if (!isBitmapCalculated) {
      calculateBitmap();
    }

    english_popular.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View view) {
            startMovieListActivity("English Popular", CONSTANTS.ENGLISH_POPULAR);
          }
        });

    english_rated.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View view) {
            startMovieListActivity("English Rated", CONSTANTS.ENGLISH_RATED);
          }
        });

    english_recent.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View view) {
            startMovieListActivity("English Recent", CONSTANTS.ENGLISH_RECENT);
          }
        });

    for (int i = 0; i < 5; i++) {
      ImageView imageView = new ImageView(getContext());
      imageView.setScaleType(ImageView.ScaleType.FIT_XY);
      imageView.setImageBitmap(popularBitmap[i]);
      english_popular.addView(imageView);
    }

    for (int i = 0; i < 5; i++) {
      ImageView imageView = new ImageView(getContext());
      imageView.setScaleType(ImageView.ScaleType.FIT_XY);
      imageView.setImageBitmap(ratedBitmap[i]);
      english_rated.addView(imageView);
    }

    for (int i = 0; i < 5; i++) {
      ImageView imageView = new ImageView(getContext());
      imageView.setScaleType(ImageView.ScaleType.FIT_XY);
      imageView.setImageBitmap(recentBitmap[i]);
      english_recent.addView(imageView);
    }

    english_popular.setInAnimation(getContext(), android.support.v7.appcompat.R.anim.abc_fade_in);
    english_popular.setOutAnimation(getContext(), android.support.v7.appcompat.R.anim.abc_fade_out);

    english_rated.setInAnimation(getContext(), android.support.v7.appcompat.R.anim.abc_fade_in);
    english_rated.setOutAnimation(getContext(), android.support.v7.appcompat.R.anim.abc_fade_out);

    english_recent.setInAnimation(getContext(), android.support.v7.appcompat.R.anim.abc_fade_in);
    english_recent.setOutAnimation(getContext(), android.support.v7.appcompat.R.anim.abc_fade_out);
    return view;
  }