Skip to content

Commit 915dd96

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 393c946 + ea18d4a commit 915dd96

File tree

2 files changed

+84
-14
lines changed

2 files changed

+84
-14
lines changed

README.md

Lines changed: 84 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,105 @@
44

55
[![GitHub issues](https://img.shields.io/github/issues/ahmmedrejowan/CuteButton)](https://github.com/ahmmedrejowan/CuteButton/issues) [![GitHub forks](https://img.shields.io/github/forks/ahmmedrejowan/CuteButton)](https://github.com/ahmmedrejowan/CuteButton/network) [![GitHub stars](https://img.shields.io/github/stars/ahmmedrejowan/CuteButton)](https://github.com/ahmmedrejowan/CuteButton/stargazers) [![GitHub contributors](https://img.shields.io/github/contributors/ahmmedrejowan/CuteButton)](https://github.com/ahmmedrejowan/CuteButton/graphs/contributors)
66

7-
<br/>
8-
97
![CuteButton](https://github.com/ahmmedrejowan/CuteButton/blob/master/demo/CuteButton.png)
108

11-
**A material design Toast Library for Android**
12-
A Material Design Custom Button Library for Android
9+
**A Material Design Custom Button Library for Android**
1310

14-
<br/>
11+
## Purpose
12+
**CuteButton** is a `Custom Material Design Android Library` which could be an alternative for Deault `Button` Library.
13+
It has everything as the Default Button library, but with a lots customizations.
1514

1615
## What's New
17-
Check on Releases Tab for changes.
18-
<br/>
19-
20-
## Purpose
21-
CuteButton is a Custom Material Design Android Library which could be an alternative for Deault Button Library.
22-
It has everything as the Default Button library, but with a lot customizations.
23-
<br/>
16+
This is the Initial Relase. Changes will be added later. Check on `Releases Tab` for Info.
2417

2518
## Features
19+
CuteButton comes with tons of new features and options:
20+
- Background Color - Normal, Focused, Disabled
21+
- Border - Color, Width, Radius
22+
- Icon - Drawable Icon, Icon Size, Icon Padding, Icon Position
23+
- Text - Normal Color, Disabled Color
24+
- Ripple Effect on Clicks
25+
and also all the features of normal `Button` like padding, margin etc.
2626

27-
<br/>
27+
## Screenshot
28+
Here are some buttons created with `CuteButton`
29+
30+
<img src="https://github.com/ahmmedrejowan/CuteButton/blob/master/demo/1622416945510.jpg" width="500px" alt="CuteButton"/>
2831

2932
## Prerequisites
3033

34+
Add this in your root `build.gradle` file (**not** your module `build.gradle` file):
35+
36+
```gradle
37+
allprojects {
38+
repositories {
39+
...
40+
maven { url "https://jitpack.io" }
41+
}
42+
}
43+
```
3144
<br/>
3245

46+
## Dependencies
47+
48+
Add this to your module's `build.gradle` file (make sure the version matches the JitPack badge above):
49+
50+
```gradle
51+
dependencies {
52+
...
53+
implementation 'com.github.ahmmedrejowan:CuteButton:1.0'
54+
}
55+
```
56+
3357
## Usage
3458

35-
<br/>
59+
#### XML
60+
Include namespace to the root Layout/View:
61+
62+
```
63+
64+
xmlns:app="http://schemas.android.com/apk/res-auto"
65+
66+
```
67+
68+
CuteButton
69+
```
70+
71+
<com.rejowan.cutebutton.CuteButton
72+
android:id="@+id/cuteButton"
73+
android:layout_width="190dp"
74+
android:layout_height="55dp"
75+
android:layout_margin="5dp"
76+
app:cb_bgColor="#0097A7"
77+
app:cb_bgColorFocus="#006064"
78+
app:cb_borderRadius="40dp"
79+
app:cb_icon="@drawable/ic_arrow"
80+
app:cb_iconPadding="5dp"
81+
app:cb_iconSize="25dp"
82+
app:cb_text="Download"
83+
app:cb_textColor="#fff"
84+
app:cb_textSize="20sp" />
85+
86+
```
87+
88+
Java
89+
90+
```
91+
CuteButton cuteButton = findViewById(R.id.cuteButton);
92+
cuteButton.setText("Hi, This is Cute Button");
93+
cuteButton.setBackgroundColor(Color.BLUE);
94+
cuteButton.setDisableColor(Color.BLACK);
95+
cuteButton.setFocusColor(Color.CYAN);
96+
cuteButton.setTextStyle(CuteButton.TEXT_STYLE_BOLD);
97+
cuteButton.setBorderWidth(2);
98+
cuteButton.setBorderWidth(1);
99+
cuteButton.setRadius(10);
100+
cuteButton.setIcon(R.drawable.ic_baseline_save_24);
101+
cuteButton.setIconSize(25);
102+
cuteButton.setIconPadding(10);
103+
cuteButton.setIconPosition(CuteButton.POSITION_START);
104+
105+
```
36106

37107
## Contribute
38108

demo/CuteButton.png

2.47 KB
Loading

0 commit comments

Comments
 (0)