massoudss / Waveformseekbar
Android Waveform SeekBar library
Stars: ✭ 120
Programming Languages
kotlin
9241 projects
Projects that are alternatives of or similar to Waveformseekbar
Colorseekbar
A colorful SeekBar for picking color
Stars: ✭ 249 (+107.5%)
Mutual labels: customview, seekbar
Headerview
Create an header for com.google.android.material.navigation.NavigationView
Stars: ✭ 107 (-10.83%)
Mutual labels: customview
Androidlikebutton
This library will help you to create animation like twitter heart and facebook like and smiley animation in simplest way
Stars: ✭ 80 (-33.33%)
Mutual labels: customview
Circularimageview
This project allowing you to create circular and rounded corner Imageview in android through simplest way.
Stars: ✭ 90 (-25%)
Mutual labels: customview
Stepbarview
Step Bar View (make your own customized StepBar)
Stars: ✭ 97 (-19.17%)
Mutual labels: customview
Ticketview
An Android library to implement TicketView in android with normal, rounded and scallop corners
Stars: ✭ 1,180 (+883.33%)
Mutual labels: customview
Crescento
Add curve at bottom of image views and relative layouts.
Stars: ✭ 1,289 (+974.17%)
Mutual labels: customview
Statelayout
StateLayout is a simple-use Android layout library which handles Loading, Content and Error states
Stars: ✭ 88 (-26.67%)
Mutual labels: customview
Musicott
JavaFX application that manages and plays music files.
Stars: ✭ 97 (-19.17%)
Mutual labels: waveform
Codeeditor
A cool code editor library on Android with syntax-highlighting and auto-completion.
Stars: ✭ 84 (-30%)
Mutual labels: customview
Androidnote
Android基础知识、Android进阶知识、Android自定义View相关、面试相关的知识,欢迎fork,star~
Stars: ✭ 1,279 (+965.83%)
Mutual labels: customview
Arcchartview
Arc Chart View (Draw Creative Statistic Arc Charts)
Stars: ✭ 96 (-20%)
Mutual labels: customview
Soundwaveform
Generate WaveForms Images from Sounds and Videos on macOS and iOS (Swift 5.x)
Stars: ✭ 119 (-0.83%)
Mutual labels: waveform
Arcseekbar
🎡 ArcSeekBar 一个弧形可拖动进度条控件。弧形大小,弧度,颜色渐变等配置完全可定制化
Stars: ✭ 115 (-4.17%)
Mutual labels: seekbar
WaveformSeekBar
Android Waveform SeekBar library
This library works with api level 21 and higher
How to add
Add below lines in your root build.gradle at the end of repositories
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add the dependency to your app build.gradle file
dependencies {
implementation 'com.github.massoudss:waveformSeekBar:2.3.0'
}
And then sync your gradle.
How to use
You can simply use this View like other Views in android,
just add WaveformSeekBar
in your java/kotlin code or xml.
XML
<com.masoudss.lib.WaveformSeekBar
app:wave_progress="33"
app:wave_max_progress="100"
app:wave_width="5dp"
app:wave_gap="2dp"
app:wave_min_height="5dp"
app:wave_corner_radius="2dp"
app:wave_background_color="@color/colorAccent"
app:wave_progress_color="@color/colorPrimary"
app:wave_gravity="center"
android:id="@+id/waveformSeekBar"
android:layout_width="300dp"
android:layout_height="50dp"/>
Kotlin
val waveformSeekBar = WaveformSeekBar(yourContext)
waveformSeekBar.progress = 33
waveformSeekBar.maxProgress = 100
waveformSeekBar.waveWidth = Utils.dp(this,5)
waveformSeekBar.waveGap = Utils.dp(this,2)
waveformSeekBar.waveMinHeight = Utils.dp(this,5)
waveformSeekBar.waveCornerRadius = Utils.dp(this,2)
waveformSeekBar.waveGravity = WaveGravity.CENTER
waveformSeekBar.waveBackgroundColor = ContextCompat.getColor(this,R.color.colorAccent)
waveformSeekBar.waveProgressColor = ContextCompat.getColor(this,R.color.colorPrimary)
waveformSeekBar.sample = sample data Int array
waveformSeekBar.setSampleFrom(AUDIO_FILE || AUDIO_PATH)
Java
WaveformSeekBar waveformSeekBar = new WaveformSeekBar(yourContext);
waveformSeekBar.setProgress(33);
waveformSeekBar.setMaxProgress(100);
waveformSeekBar.setWaveWidth(Utils.dp(this,5));
waveformSeekBar.setWaveGap(Utils.dp(this,2));
waveformSeekBar.setWaveMinHeight(Utils.dp(this,5));
waveformSeekBar.setWaveCornerRadius(Utils.dp(this,2));
waveformSeekBar.setWaveGravity(WaveGravity.CENTER);
waveformSeekBar.setWaveBackgroundColor(ContextCompat.getColor(this,R.color.white));
waveformSeekBar.setWaveProgressColor(ContextCompat.getColor(this,R.color.blue));
waveformSeekBar.setSample(sample data Int array);
waveformSeekBar.setSampleFrom(AUDIO_FILE || AUDIO_PATH);
Warning
waveformSeekBar.setSampleFrom(audio) can block your main(ui) thread! Please run this function in the background thread.
Progress Listener
waveformSeekBar.onProgressChanged = object : SeekBarOnProgressChanged {
override fun onProgressChanged(waveformSeekBar: WaveformSeekBar, progress: Int, fromUser: Boolean) {
// do your stuff here
}
}
View Properties
You can customize WaveformSeekBar, all of this attributes can change via xml or code (runtime)
Attribute | Type | Kotlin | Description |
---|---|---|---|
wave_progress | Integer | progress |
SeekBar progress value, default value is 0
|
wave_width | Dimension | waveWidth |
Width of each wave, default value is 5dp
|
wave_gap | Dimension | waveGap |
Gap width between waves, default value is 2dp
|
wave_min_height | Dimension | waveMinHeight |
Minimum height of each wave, default value is equal to waveWidth
|
wave_corner_radius | Dimension | waveCornerRadius |
Corner raduis of each wave, default value is 2dp
|
wave_gravity | Enum | waveGravity |
Waves Gravity, default is WaveGravity.CENTER
|
wave_background_color | Color | waveBackgroundColor |
UnReached Waves color, default color is Color.LTGRAY
|
wave_progress_color | Color | waveProgressColor |
Reached Waves color, default color is Color.WHITE
|
- | IntArray | sample |
Sample data for drawing waves, default is null
|
Reduce size
Add android:extractNativeLibs="false"
to application in the Manifest.xml
<application
. . .
android:extractNativeLibs="false"
. . . >
<activity . . ./>
</application>
License
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].