Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydeepw committed May 10, 2014
2 parents d35c34c + 4c8df84 commit f167d6b
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 7 deletions.
2 changes: 1 addition & 1 deletion AudioWifeDemo/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry exported="true" kind="lib" path="libs/android-support-v4.jar"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry exported="true" kind="lib" path="libs/android-support-v4.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
2 changes: 1 addition & 1 deletion AudioWifeDemo/res/layout/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
android:paddingTop="5dp" >

<SeekBar
android:id="@+id/mediaSeekBar"
android:id="@+id/media_seekbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
Expand Down
4 changes: 2 additions & 2 deletions AudioWifeDemo/src/nl/changer/audiowifedemo/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ public void onClick(View v) {
}
});

// initialize the player contols
// initialize the player controls
mPlayMedia = findViewById(R.id.play);
mPauseMedia = findViewById(R.id.pause);
mMediaSeekBar = (SeekBar) findViewById(R.id.mediaSeekBar);
mMediaSeekBar = (SeekBar) findViewById(R.id.media_seekbar);
mPlaybackTime = (TextView) findViewById(R.id.playback_time);

mPlayMedia.setOnClickListener(new View.OnClickListener() {
Expand Down
69 changes: 66 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,35 @@
Audio Wife
Index
==================

* [Introduction](https://github.com/jaydeepw/audio-wife#audio-wife---introduction)
* [Why this project?](https://github.com/jaydeepw/audio-wife#why-this-project)

* [Including in your own project](https://github.com/jaydeepw/audio-wife#including-in-your-project)

* [Getting started](https://github.com/jaydeepw/audio-wife#getting-started)

* [Add custom listeners](https://github.com/jaydeepw/audio-wife#add-custom-listeners)

* [Why the name 'AudioWife'?](https://github.com/jaydeepw/audio-wife#why-the-name-audiowife)

* [Contributing](https://github.com/jaydeepw/audio-wife#contributing)

* [Developed by](https://github.com/jaydeepw/audio-wife#developed-by)

* [Credits](https://github.com/jaydeepw/audio-wife#credits)

* [License](https://github.com/jaydeepw/audio-wife#license)



Audio Wife - Introduction
==========

A simple themable audio player library for Android. Helps you have an Audio Controller
for your Audio Player UI. Have your own UI and pass the instance of UI controls like
Play button, Pause button, Seekbar etc to AudioWife and rest is taken care of.

your_player.xml
![Audio Player Paused](images/paused.JPG)

![Audio Player Playing](images/playing.JPG)
Expand Down Expand Up @@ -32,10 +57,10 @@ Getting started
====================
```java

// initialize the player contols
// initialize the player controls
mPlayMedia = findViewById(R.id.play);
mPauseMedia = findViewById(R.id.pause);
mMediaSeekBar = (SeekBar) findViewById(R.id.mediaSeekBar);
mMediaSeekBar = (SeekBar) findViewById(R.id.media_seekbar);
mPlaybackTime = (TextView) findViewById(R.id.playback_time);

// initialize AudioWife
Expand Down Expand Up @@ -67,6 +92,7 @@ To extend the capabilities of AudioWife, custom click listeners can be attached.
Refer to source documentation for more details.

```java
<<<<<<< HEAD
AudioWife.getInstance().init(MainActivity.this, uri)
.setPlayView(mPlayMedia) // AudioWife takes care of click handler for play button
.setPauseView(mPauseMedia) // AudioWife takes care of click handler for pause button
Expand Down Expand Up @@ -102,6 +128,43 @@ Refer to source documentation for more details.
// Your on audio pause stuff.
}
});
=======
AudioWife.getInstance().init(MainActivity.this, uri)
.setPlayView(mPlayMedia) // AudioWife takes care of click handler for play button
.setPauseView(mPauseMedia) // AudioWife takes care of click handler for pause button
.setSeekBar(mMediaSeekBar)
.setPlaytime(mPlaybackTime);

AudioWife.getInstance().addOnCompletionListener( new MediaPlayer.OnCompletionListener() {

@Override
public void onCompletion(MediaPlayer mp) {
Toast.makeText(getBaseContext(), "Completed", Toast.LENGTH_SHORT)
.show();
// do you stuff
}
});

AudioWife.getInstance().addOnPlayClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
Toast.makeText(getBaseContext(), "Play", Toast.LENGTH_SHORT)
.show();
// get-set-go. Lets dance.
}
});

AudioWife.getInstance().addOnPauseClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
Toast.makeText(getBaseContext(), "Pause", Toast.LENGTH_SHORT)
.show();
// Your on audio pause stuff.
}
});
>>>>>>> 4c8df84fe2d195c99e1526de98390ba9c1932c63
```

Why the name 'AudioWife'?
Expand Down

0 comments on commit f167d6b

Please sign in to comment.