All Projects → narayanacharya6 → WaveView

narayanacharya6 / WaveView

Licence: Apache-2.0 License
Simple Android library to draw sinusoidal waves.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to WaveView

Testleavesloading
Android 自定义 View 之 LeavesLoading
Stars: ✭ 55 (+27.91%)
Mutual labels:  custom-view, android-ui
android-tableview-kotlin
Android's missing TableView component.
Stars: ✭ 40 (-6.98%)
Mutual labels:  custom-view, android-ui
Battery Meter View
🔋 Material design battery meter (i.e. level, state) view for Android
Stars: ✭ 57 (+32.56%)
Mutual labels:  custom-view, android-ui
Xcdanmuview
Android弹幕效果View-支持左右两个方向
Stars: ✭ 28 (-34.88%)
Mutual labels:  custom-view, android-ui
YuanaItemSettingView
Customizable Item Setting View Android
Stars: ✭ 15 (-65.12%)
Mutual labels:  custom-view, android-ui
Peppy Calendarview
Simple and fast Material Design calendar view for Android.
Stars: ✭ 30 (-30.23%)
Mutual labels:  custom-view, android-ui
Swipelayout
A library what allows you to execute a swipe for the android platform
Stars: ✭ 150 (+248.84%)
Mutual labels:  custom-view, android-ui
Pudding
🌟 Pudding use WindowManager(don't need request permission) to pull down a view that are displayed on top their attached window
Stars: ✭ 371 (+762.79%)
Mutual labels:  custom-view, android-ui
Circular-Progress-View
A customisable circular progress view for android.
Stars: ✭ 39 (-9.3%)
Mutual labels:  custom-view, android-ui
XCArcProgressView
Android开口圆环比例进度View(高仿猎豹清理大师内存占用比例View)
Stars: ✭ 28 (-34.88%)
Mutual labels:  custom-view, android-ui
Labelsview
Android的标签列表控件。可以设置标签的选中效果。 可以设置标签的选中类型:不可选中、单选、限数量多选和不限数量多选等, 并支持设置必选项、单行显示、最大显示行数等功能。
Stars: ✭ 777 (+1706.98%)
Mutual labels:  custom-view, android-ui
RxLoading
RxJava library for showing a loading (i.e. progress bar) state while waiting for async data with minimal effort and advanced options.
Stars: ✭ 49 (+13.95%)
Mutual labels:  custom-view, android-ui
Codeview Android
Display code with syntax highlighting ✨ in native way.
Stars: ✭ 748 (+1639.53%)
Mutual labels:  custom-view, android-ui
Bluetooth State View
Material design animated Bluetooth state view for Android
Stars: ✭ 36 (-16.28%)
Mutual labels:  custom-view, android-ui
Freepager
ViewPagers library for Android
Stars: ✭ 461 (+972.09%)
Mutual labels:  custom-view, android-ui
Consecutivescroller
ConsecutiveScrollerLayout是Android下支持多个滑动布局(RecyclerView、WebView、ScrollView等)和普通控件(TextView、ImageView、LinearLayou、自定义View等)持续连贯滑动的容器,它使所有的子View像一个整体一样连续顺畅滑动。并且支持布局吸顶功能。
Stars: ✭ 1,383 (+3116.28%)
Mutual labels:  custom-view, android-ui
signal-strength-view
📶 Material design signal strength view for Android
Stars: ✭ 30 (-30.23%)
Mutual labels:  custom-view, android-ui
Tableview
TableView is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells.
Stars: ✭ 2,928 (+6709.3%)
Mutual labels:  custom-view, android-ui
XCPullToLoadMoreListView
XCPullToLoadMoreListView-下拉加载更多ListView控件(仿QQ、微信聊天对话列表控件)
Stars: ✭ 24 (-44.19%)
Mutual labels:  custom-view, android-ui
Image-Support
Add badge with counter to ImageView Android.
Stars: ✭ 128 (+197.67%)
Mutual labels:  custom-view, android-ui

WaveView

Simple Android library to draw sinusoidal waves.

Sample WaveView

To add this library to your project, add this to your app level dependencies :

compile 'com.narayanacharya:WaveView:0.9.4'

To use this you can add this to your layout file :

<com.narayanacharya.waveview.WaveView
    android:id="@+id/waveView"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

In order to customize the wave you can:

  • Use XML Attributes
<com.narayanacharya.waveview.WaveView
        android:id="@+id/waveView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center"
        app:waveAmplitude="10.25"
        app:waveBackgroundColor="@color/colorPrimary"
        app:waveColor="@color/colorAccent"
        app:waveDensity="5.0"
        app:waveFrequency="2.0"
        app:waveNumberOfWaves="5"
        app:wavePhaseShift="-0.05"
        app:wavePrimaryLineWidth="3.0"
        app:waveSecondaryLineWidth="1.0"
        app:waveXAxisPositionMultiplier="0.5" />
  • Use a reference in your Activity
WaveView sine = (WaveView) findViewById(R.id.waveView);
sine.setBackgroundColor(Color.GRAY);
sine.setWaveColor(Color.WHITE);
sine.setNumberOfWaves(3);
sine.setFrequency(2.0f);
sine.setAmplitude();
sine.setPhaseShift(-0.05f);
sine.setDensity(5.0f);
sine.setPrimaryLineWidth(3.0f);
sine.setSecondaryLineWidth(1.0f);
sine.setWaveXAxisPositionMultiplier(0.5f)

Values shown above are the default values.

  • Use the following methods to pause/play wave and check the current state of the wave (v0.9.3+)
// Check if the wave is paused or playing
sine.isPlaying();

// Pause the wave
sine.pause();

// Play the wave
sine.play();

The original code was found here. Cleaned, modified and improved as per requirements though.

Suggestions, improvements, criticisms and pull requests are all welcome!

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].