Giter VIP home page Giter VIP logo

pianoview's Introduction

PianoView

PianoView

A custom view on Android,which can help you easily to create a piano on Android.

Features

  • Beautiful UI.
  • Good flexibility,which can use in different devices and layout.
  • Mutil-Touch.
  • Support piano sound.

Gradle Dependency

Add it in your root build.gradle at the end of repositories:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Add the dependency:

dependencies {
        implementation 'com.github.ParadiseHell:PianoView:1.1.1'
}

How to use

In the XML layout:

<com.chengtao.pianoview.view.PianoView
    android:id="@+id/pv"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

For more reference,plaese see the sample.

Document

License

Copyright 2016 ChengTao

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.

pianoview's People

Contributors

paradisehell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pianoview's Issues

ERROR: Could not find annotations.jar (org.jetbrains:annotations:13.0).

Hi,
I am getting the following error when I try to compile and run the app.

ERROR: Could not find annotations.jar (org.jetbrains:annotations:13.0).
Searched in the following locations:
https://maven.aliyun.com/repository/central/org/jetbrains/annotations/13.0/annotations-13.0.jar

When I click on the above link I am able to download the annotations-13.0.jar file
I renamed it to annotations.jar and placed it in the PianoView-master folder but it still can not find it.

It happens in both the cloned and downloaded package.
I could not figure out where the error occurs.

Please advise,

Thanks

About File

Thank you for your kind words about the library. I'm glad to hear that it's been helpful for your Android project.

Regarding your question about adding custom files, I'll need a bit more information to be able to help you effectively. Can you please provide me with some more details about the specific file you're trying to add and what you're trying to do with it?

As for the files in the asserts folder, they don't have file extensions because they are intended to be read in as raw data streams. When you access them in your code, you'll need to specify the type of file it is, such as a text file, image file, or audio file, depending on the file's contents.

I hope this helps, and please let me know if you have any further questions or if there's anything else I can do to assist you.

播放速度问题

自动播放时,调整LITTER_STAR_BREAK_SHORT_TIME和LITTER_STAR_BREAK_LONG_TIME不起作用

Could not resolve com.github.ParadiseHell:PianoView:1.1.0.

Could not resolve com.github.ParadiseHell:PianoView:1.1.0.
Required by:
project :app
> Could not resolve com.github.ParadiseHell:PianoView:1.1.0.
> Could not get resource 'https://jitpack.io/com/github/ParadiseHell/PianoView/1.1.0/PianoView-1.1.0.pom'.
> Could not GET 'https://jitpack.io/com/github/ParadiseHell/PianoView/1.1.0/PianoView-1.1.0.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Multitouch not behaving correctly

Hi

Thanks for this awesome Piano.

I was facing a small issue with multi touch gesture. If for instance I played a chord and then lifted the second or third fingers, they would not pull back until i moved the first finger as well.

I made a small change to your View file. Instead of event.getAction, you could use event.getActionMasked() as shown below.

@Override public boolean onTouchEvent(MotionEvent event) {
        if (canPress) {
            switch (event.getActionMasked()) {
    

This solved the issue for me.

How To Custom Piano View

Hello, I have some problems that need your help. I can't find a way to replace the piano key image, change the speed of the sound, and how to hide/show the note names.

钢琴谱

请问您的钢琴曲是从何而来?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.