Skip to content
This repository was archived by the owner on Jun 2, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ allprojects { project ->
}
google()
group = 'com.codertainment.materialintro'
version = '2.2.0'
version = '2.2.1'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ data class MaterialIntroConfiguration(
var focusGravity: FocusGravity = FocusGravity.CENTER,

var padding: Int = Constants.DEFAULT_TARGET_PADDING,
var radius: Int = Constants.DEFAULT_RADIUS,

var dismissOnTouch: Boolean = false,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ object Constants {
const val DEFAULT_DELAY_MILLIS: Long = 0
const val DEFAULT_FADE_DURATION: Long = 500
const val DEFAULT_TARGET_PADDING = 10
const val DEFAULT_RADIUS = 10
const val DEFAULT_COLOR_TEXTVIEW_INFO = -0x1000000
const val DEFAULT_DOT_SIZE = 55
const val DEFAULT_DOT_ICON_COLOR = Color.WHITE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ class MaterialIntroView : RelativeLayout {
*/
var padding = Constants.DEFAULT_TARGET_PADDING

/**
* Radius for the Rectangular shape
*/
var radius = Constants.DEFAULT_RADIUS

/**
* Layout myWidth/myHeight
*/
Expand Down Expand Up @@ -365,7 +370,7 @@ class MaterialIntroView : RelativeLayout {
/**
* Clear focus area
*/
targetShape.draw(this.canvas!!, eraser, padding)
targetShape.draw(this.canvas!!, eraser, radius)
canvas.drawBitmap(bitmap!!, 0f, 0f, null)
}

Expand Down Expand Up @@ -687,6 +692,7 @@ class MaterialIntroView : RelativeLayout {
this.focusGravity = config.focusGravity

this.padding = config.padding
this.radius = config.radius

this.dismissOnTouch = config.dismissOnTouch

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class MainFragment : Fragment() {
focusType = Focus.MINIMUM
isPerformClick = true
infoText = text
radius = 40
padding = 20
targetView = view
shapeType = ShapeType.RECTANGLE
viewId = usageId
Expand Down