PaperStyleWidgets

Material design widgets library for Android 2.2+

Лицензия

Лицензия

Группа

Группа

com.annimon
Идентификатор

Идентификатор

paperstyle
Последняя версия

Последняя версия

1.1.0
Дата

Дата

Тип

Тип

aar
Описание

Описание

PaperStyleWidgets
Material design widgets library for Android 2.2+
Ссылка на сайт

Ссылка на сайт

https://github.com/aNNiMON/PaperStyleWidgets
Система контроля версий

Система контроля версий

https://github.com/aNNiMON/PaperStyleWidgets

Скачать paperstyle

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.annimon/paperstyle/ -->
<dependency>
    <groupId>com.annimon</groupId>
    <artifactId>paperstyle</artifactId>
    <version>1.1.0</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.annimon/paperstyle/
implementation 'com.annimon:paperstyle:1.1.0'
// https://jarcasting.com/artifacts/com.annimon/paperstyle/
implementation ("com.annimon:paperstyle:1.1.0")
'com.annimon:paperstyle:aar:1.1.0'
<dependency org="com.annimon" name="paperstyle" rev="1.1.0">
  <artifact name="paperstyle" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.annimon', module='paperstyle', version='1.1.0')
)
libraryDependencies += "com.annimon" % "paperstyle" % "1.1.0"
[com.annimon/paperstyle "1.1.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

PaperStyleWidgets

Maven Central Build Status

Widgets with material-like design for Android 2.2+

Includes:

  • PaperButton - flat button with ripple animation.

Paper Button

Paper Button 2

  • PaperSeekBar - seekbar with smooth animation.

Paper SeekBar

  • PaperProgressBar - horizontal progress bar (indeterminate and normal).

Paper ProgressBar

Usage

Gradle dependency

dependencies {
    compile 'com.annimon:paperstyle:1.1.0'
}

Button

Just type com.annimon.paperstyle.PaperButton instead of Button

<com.annimon.paperstyle.PaperButton
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/button" />

or configure styles by add attributes

  • pw_backgroundColor - set button background color
  • pw_focusColor - set ripple color
  • pw_borderSize - set button border size (0 for remove border)
  • pw_borderColor - set border color
<com.annimon.paperstyle.PaperButton
    ...
    android:textColor="#FFFFFF"
    custom:pw_backgroundColor="#2196F3"
    custom:pw_focusColor="@color/focus"
    custom:pw_borderSize="0" />

or create button dynamically

Button button = new PaperButton(getContext());

or change styles dynamically

PaperButton button = new PaperButton(getContext());
button.setBackgroundColor(0xFF2196F3);
button.setFocusColor(getResources().getColor(R.color.focus));
button.setBorderColor(0x7F555555);
button.setBorderSize(convertDpToPx(2, getResources().getDisplayMetrics()));

SeekBar

<com.annimon.paperstyle.PaperSeekBar
    android:max="360"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    custom:pw_color="@color/red" />

Optional attribute pw_color changes seekbar color.

Programmatically create

SeekBar seekbar = new PaperSeekBar(getContext());

Change style

PaperSeekBar seekbar = new PaperSeekBar(getContext());
seekbar.setColor(getResources().getColor(R.color.red));

ProgressBar

Indeterminate state

<com.annimon.paperstyle.PaperProgressBar
    android:indeterminate="true"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" />

Normal state with primary and secondary progress

<com.annimon.paperstyle.PaperProgressBar
    android:progress="0"
    android:secondaryProgress="180"
    android:max="360"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    custom:pw_progressColor="#9C27B0"
    custom:pw_secondaryProgressColor="#779C27B0" />
  • pw_progressColor - set primary progressbar color
  • pw_secondaryProgressColor - set secondary progressbar color (if needed)

Create dynamically

ProgressBar progressbar = new PaperProgressBar(getContext());

Change style dynamically

PaperProgressBar progressbar = new PaperProgressBar(getContext());
progressBar.setProgressColor(0xFF9C27B0);
progressbar.setSecondaryProgressColor(0x779C27B0);

Версии библиотеки

Версия
1.1.0