Android Open Source - TheNewBoston Slider






From Project

Back to project page TheNewBoston.

License

The source code is released under:

Eclipse Public License - v 1.0 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECI...

If you think the Android project TheNewBoston 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.homelysoft.thenewboston;
/*from w  w  w.j  av  a  2  s  .  co  m*/
import android.app.Activity;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.SlidingDrawer;
import android.widget.SlidingDrawer.OnDrawerOpenListener;

@SuppressWarnings("deprecation")
public class Slider extends Activity implements OnClickListener,
    OnCheckedChangeListener, OnDrawerOpenListener {

  Button dummy1,dummy2,dummy3,dummy4;
  SlidingDrawer sd;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.sliding);
    bridgeXML();
    setOnClickListeners();
    sd=(SlidingDrawer)findViewById(R.id.sliding_drawer);
    sd.setOnDrawerOpenListener(this);
  }

  private void bridgeXML() {
    dummy1 = (Button) findViewById(R.id.b_dummy1);
    dummy2 = (Button) findViewById(R.id.b_dummy2);
    dummy3 = (Button) findViewById(R.id.b_dummy3);
    dummy4 = (Button) findViewById(R.id.b_dummy4);
  }

  private void setOnClickListeners() {
    dummy1.setOnClickListener(this);
    dummy2.setOnClickListener(this);
    dummy3.setOnClickListener(this);
    dummy4.setOnClickListener(this);
  }

  @Override
  public void onClick(View v) {
    switch (v.getId()) {
    case R.id.b_dummy1:
      sd.open();
      break;
    case R.id.b_dummy2:
      sd.close();
      break;
    case R.id.b_dummy3:
      sd.toggle();
      break;
    case R.id.b_dummy4:
      break;

    }

  }

  @Override
  public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
    if (isChecked) {
      sd.unlock();

    } else {
      sd.lock();

    }

  }

  @Override
  public void onDrawerOpened() {
    MediaPlayer mp=MediaPlayer.create(this, R.raw.splash_sound_shortened);
    mp.start();
  }

}




Java Source Code List

com.homelysoft.thenewboston.AboutUs.java
com.homelysoft.thenewboston.Accelerate.java
com.homelysoft.thenewboston.Data.java
com.homelysoft.thenewboston.Email.java
com.homelysoft.thenewboston.ExternalData.java
com.homelysoft.thenewboston.Flipper.java
com.homelysoft.thenewboston.Home.java
com.homelysoft.thenewboston.HotOrNot.java
com.homelysoft.thenewboston.InternalData.java
com.homelysoft.thenewboston.OpenedClass.java
com.homelysoft.thenewboston.OurViewClient.java
com.homelysoft.thenewboston.Photo.java
com.homelysoft.thenewboston.Preferences.java
com.homelysoft.thenewboston.SQLView.java
com.homelysoft.thenewboston.SQLite.java
com.homelysoft.thenewboston.SharedPrefs.java
com.homelysoft.thenewboston.Slider.java
com.homelysoft.thenewboston.SoundPoolPlay.java
com.homelysoft.thenewboston.Splash.java
com.homelysoft.thenewboston.StartingPoint.java
com.homelysoft.thenewboston.Tabs.java
com.homelysoft.thenewboston.TextPlay.java
com.homelysoft.thenewboston.gfx.GFXSurface.java
com.homelysoft.thenewboston.gfx.GFX.java
com.homelysoft.thenewboston.gfx.MyBringBack.java
com.homelysoft.thenewboston.vect.Vector.java