Getting tired by designing a lot of XML Drawable files, importing library for modification? Android Helper Widget is a lightweight and easy to use Android library that provides you a lot of attributes to create any kind of design in your root XML file. You don't have to create ab XML drawable file. You can easily design anything in XML layout file with the attributes I've provided.
- Min SDK 16 (Android Alpha 1.0)
- Written in Java
- Compatible for both Java and Kotlin
- Custom View
- Custom ImageView
- Custom TextView
- Custom EditText
- Custom Button
- Custom LinearLayout
- Custom RelativeLayout
- Custom ConstraintLayout
- Custom RecyclerView
Add the dependency to your module build.gradle:
dependencies {
...
implementation 'com.saadahmedev.helper-widget:helper-widget:1.0.2'
}
Attributes | View | ImageView | TextView | EditText | LinearLayout | RelativeLayout | ConstraintLayout | RecyclerView | Button |
---|---|---|---|---|---|---|---|---|---|
fontColor |
❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
backgroundColor |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
rippleColor |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
strokeColor |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
shape |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
strokeWidth |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
clickable |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
fontFam |
❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
cornerRadius |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
topLeftCornerRadius |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
topRightCornerRadius |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
bottomRightCornerRadius |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
bottomLeftCornerRadius |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
setupLayoutManager |
❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ |
gridCount |
❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ |
Functions | View | ImageView | TextView | EditText | LinearLayout | RelativeLayout | ConstraintLayout | RecyclerView | Button |
---|---|---|---|---|---|---|---|---|---|
getStringValue() |
❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
getTrimmedStringValue() |
❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
getIntValue() |
❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
getDoubleValue() |
❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
getFloatValue() |
❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
getShortValue() |
❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
getBooleanValue() |
❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
enable() |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
disable() |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
visible() |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
invisible() |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
gone() |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
onClicked() |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
onLongPressed() |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
isValidEmail() |
❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
Enums | Font Name | View |
---|---|---|
regular |
Roboto Regular | |
medium |
Roboto Medium | |
bold |
Roboto Bold |
Enums | View |
---|---|
normal |
|
oval |
|
ring |
|
rounded5dp |
|
rounded10dp |
|
rounded15dp |
|
rounded20dp |
|
rounded25dp |
|
rounded30dp |
|
rounded35dp |
|
rounded40dp |
|
rounded45dp |
|
rounded50dp |
- 1.0.2
- Added Button widget
- 1.0.1
- Added license in each class
- 1.0.0
- Initial release
Copyright 2018-2023 Saad Ahmed
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.