Skip to content

Commit

Permalink
fix #40 Shape类型为"CIRCLE",设置padding值无效
Browse files Browse the repository at this point in the history
  • Loading branch information
huburt-Hu committed Jun 6, 2018
1 parent c8fc018 commit 6b9c90a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ dependencies {
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// implementation project(':guide')
implementation ('com.github.huburt-Hu:NewbieGuide:v2.2.1')
implementation project(':guide')
// implementation ('com.github.huburt-Hu:NewbieGuide:v2.2.1')
implementation "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion"
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation "com.android.support:recyclerview-v7:$rootProject.ext.supportLibraryVersion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void onClick(View v) {
.anchor(anchorView)
.alwaysShow(true)//总是显示,调试时可以打开
.addGuidePage(GuidePage.newInstance()
.addHighLight(btnAnchor, HighLight.Shape.CIRCLE, 5)
.addHighLight(btnAnchor, HighLight.Shape.CIRCLE, 25)
.setLayoutRes(R.layout.view_guide_anchor))
.show();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ public int getRound() {
}

public int getRadius() {
return mHole != null ? Math.max(mHole.getWidth() / 2, mHole.getHeight() / 2) : 0;
if (mHole == null) {
throw new IllegalArgumentException("the hight light view is null!");
}
return Math.max(mHole.getWidth() / 2, mHole.getHeight() / 2) + padding;
}

public RectF getRectF(View target) {
Expand Down

0 comments on commit 6b9c90a

Please sign in to comment.