Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/turskyi/roundedimage
This sample demonstrates how to create a custom ImageView that displays images with rounded corners.
https://github.com/turskyi/roundedimage
android educational imageview kotlin sample-app xml
Last synced: 27 days ago
JSON representation
This sample demonstrates how to create a custom ImageView that displays images with rounded corners.
- Host: GitHub
- URL: https://github.com/turskyi/roundedimage
- Owner: Turskyi
- Created: 2019-11-26T12:03:51.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-28T20:02:25.000Z (5 months ago)
- Last Synced: 2024-07-29T18:47:03.938Z (5 months ago)
- Topics: android, educational, imageview, kotlin, sample-app, xml
- Language: Kotlin
- Homepage: https://github.com/Turskyi/RoundedImage
- Size: 2.73 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct-single.svg)](https://stand-with-ukraine.pp.ua)
# RoundedImageView Sample
This sample demonstrates how to create a custom ImageView that displays images
with rounded corners.## Value:
This project provides a clear and concise example of:
- Creating a custom View by extending AppCompatImageView.
- Overriding the `setImageDrawable()` method to modify the displayed image.
- Using RoundedBitmapDrawableFactory to create a rounded bitmap.
- Applying the custom View in a layout XML file.
This sample can be used as a starting point for creating more complex custom
Views or for learning about image manipulation in Android.## Usage:
To use the RoundedImageView, simply add it to your layout XML file:
```xml
```
You can then set the image source using the src attribute or programmatically
using `setImageResource()`.## Contact:
For any inquiries or suggestions, please open an issue on the GitHub repository
or reach out to me directly at
[[email protected]](mailto:[email protected]).## Screenshot: