Skip to content

HKMOpen/FrameImageView

Repository files navigation

FrameImageView

Download Platform API

This is an Android project allowing to realize a frame ImageView in the simplest way possible.

USAGE

To make a circular ImageView add FrameImageView in your layout XML and add FrameImageView library in your project or you can also grab it via Gradle:

compile 'com.hkm.ui:frame-imageview:5.2.5'

XML

<com.mikhaellopez.frameImageView.FrameImageView
        android:layout_width="250dp"
        android:layout_height="250dp"
        android:src="@drawable/image"
        app:fic_border_color="#EEEEEE"
        app:fic_border_width="4dp"
        app:fic_shadow="true"
        app:fic_shadow_radius="10"
        app:fic_shadow_color="#8BC34A"/>

<com.mikhaellopez.frameImageView.EditFrameImageView
        android:layout_width="250dp"
        android:layout_height="250dp"
        android:src="@drawable/image"
  />

You must use the following properties in your XML to change your FrameImageView.

#####Features:

  • Realtime measurement
  • inch to cm conversion
  • Measurement visualization
  • Realtime scale
  • Color border
  • Color inner border

#####Properties:

  • app:fic_border (boolean) -> default true
  • app:fic_border_color (color) -> default WHITE
  • app:fic_border_width (dimension) -> default 4dp
  • app:fic_shadow (boolean) -> default false
  • app:fic_shadow_color (color) -> default BLACK
  • app:fic_shadow_radius (float) -> default 8.0f

JAVA

FrameImageView mFrameImageView = (FrameImageView)findViewById(R.id.yourFrameImageView);
// Set Border
mFrameImageView.setBorderColor(getResources().getColor(R.color.GrayLight));
mFrameImageView.setBorderWidth(10);
// Add Shadow with default param
mFrameImageView.addShadow();
// or with custom param
mFrameImageView.setShadowRadius(15);
mFrameImageView.setShadowColor(Color.RED);

EditFrameImageView mFrameImageView = (EditFrameImageView)findViewById(R.id.yourFrameImageView);
//call saved configuration in bundle
Bundle data = mFrameImageView.captureBundleConfig();
//restore configurations
mFrameImageView.restoreCofig(data);

LINK

Stack OverFlow:

I realized this project using this post:

Thank you for your support and we will bring more amazing libraries to your productive works. We are accepting bitcoin by the address as below. Please scan the QR code to start

wallet

LICENCE

FrameImageView by Lopez Mikhael is licensed under a Apache License 2.0.