项目作者: andremion

项目描述 :
Subclass of ImageView that 'morphs' into a circle shape and can rotates. Useful to be used as album cover in Music apps. :dvd::notes:
高级语言: Java
项目地址: git://github.com/andremion/Music-Cover-View.git
创建时间: 2016-08-23T21:24:44Z
项目社区:https://github.com/andremion/Music-Cover-View

开源协议:Apache License 2.0

下载


License Apache 2.0
minSdkVersion 21
compileSdkVersion 24
maven-central

Android Arsenal Music-Cover-View
MaterialUp Music-Cover-View

Music Cover View

A Subclass of ImageView that ‘morphs’ into a circle shape and can rotates. Useful to be used as album cover in Music apps.

Sample

It’s used by this Music Player prototype.

Music Player

Installation

Include the library in your build.gradle

  1. dependencies{
  2. compile 'com.github.andremion:musiccoverview:1.0.0'
  3. }

or in your pom.xml if you are using Maven

  1. <dependency>
  2. <groupId>com.github.andremion</groupId>
  3. <artifactId>musiccoverview</artifactId>
  4. <version>1.0.0</version>
  5. <type>aar</type>
  6. </dependency>

Usage

  1. <com.andremion.music.MusicCoverView
  2. android:id="@+id/cover"
  3. android:layout_width="match_parent"
  4. android:layout_height="@dimen/cover_height"
  5. android:src="@drawable/album_cover"></com.andremion.music.MusicCoverView>

Custom attributes

  • The shape of the View

    1. <attr name="shape" format="enum">
    2. <enum name="rectangle" value="0"></enum>
    3. <enum name="circle" value="1"></enum>
    4. </attr>
  • The color of the tracks when the shape is circle

    1. <attr name="trackColor" format="color"></attr>

See more at the sample

License

  1. Copyright 2016 André Mion
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.