Android Open Source - View3DFlipper Clock Flip Activity






From Project

Back to project page View3DFlipper.

License

The source code is released under:

MIT License

If you think the Android project View3DFlipper listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.brianrojas.view3dflipper;
/*from   w w  w .  j av a  2 s . c  o  m*/
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public final class ClockFlipActivity extends Activity {

private View3DFlipper mFlipper;
  
    private boolean mFlipRight = false;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_clock);
    
    mFlipper = (View3DFlipper) findViewById(R.id.flipper);
    mFlipper.setOnClickListener(new OnClickListener() {
      @Override
      public void onClick(View v) {
        if (!mFlipRight) {
          mFlipRight = true;
          mFlipper.flip(View3DFlipper.Direction.LEFT);
        } else {
          mFlipRight = false;
          mFlipper.flip(View3DFlipper.Direction.RIGHT);
        }
      }
    });
  }
  
}




Java Source Code List

com.brianrojas.view3dflipper.ClockFlipActivity.java
com.brianrojas.view3dflipper.GridFlipActivity.java
com.brianrojas.view3dflipper.MainActivity.java
com.brianrojas.view3dflipper.View3DFlipper.java