This repository has been archived by the owner on Sep 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added java sample + prepared for release
- Loading branch information
Showing
7 changed files
with
268 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package rm.com.audiogram; | ||
|
||
import android.app.Activity; | ||
import android.os.Bundle; | ||
|
||
import rm.com.audiowave.AudioWaveView; | ||
|
||
public class AnotherActivity extends Activity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_another); | ||
|
||
final AudioWaveView waveView = (AudioWaveView) findViewById(R.id.wave); | ||
final byte[] data = { 1, 3, 37, 117, 69, 0, 0, 58 }; | ||
|
||
waveView.setScaledData(data); | ||
|
||
// waveView.setRawData(data, new Function0<Unit>() { | ||
// @Override | ||
// public Unit invoke() { | ||
// Log.d("Set raw data", "Callback called"); | ||
// return null; | ||
// } | ||
// }); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<RelativeLayout | ||
android:id="@+id/activity_another" | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:paddingBottom="@dimen/activity_vertical_margin" | ||
android:paddingLeft="@dimen/activity_horizontal_margin" | ||
android:paddingRight="@dimen/activity_horizontal_margin" | ||
android:paddingTop="@dimen/activity_vertical_margin" | ||
tools:context="rm.com.audiogram.AnotherActivity" | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
|
||
<rm.com.audiowave.AudioWaveView | ||
android:id="@+id/wave" | ||
android:layout_width="match_parent" | ||
android:layout_height="32dp" | ||
android:layout_centerInParent="true" | ||
android:layout_margin="16dp" | ||
app:chunkWidth="3dp" | ||
app:chunkHeight="24dp" | ||
app:minChunkHeight="2dp" | ||
app:chunkSpacing="1dp" | ||
app:chunkRadius="1dp" | ||
app:waveColor="@android:color/black" | ||
app:progress="0.0" | ||
/> | ||
|
||
</RelativeLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.