Skip to content

Commit

Permalink
separating basic circle focus and show once behaviour (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pozzoooo authored Jul 1, 2022
1 parent ecd2922 commit 860a541
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
12 changes: 10 additions & 2 deletions app/src/main/java/me/toptas/fancyshowcasesample/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ class MainActivity : BaseActivity() {
btn_focus.setOnClickListener {
FancyShowCaseView.Builder(this)
.focusOn(it)
.title("Focus on View only once")
.showOnce("id0")
.title("Circle Focus on View")
.build()
.show()
}
Expand Down Expand Up @@ -344,6 +343,15 @@ class MainActivity : BaseActivity() {
.build()
.show()
}

btn_show_once.setOnClickListener {
FancyShowCaseView.Builder(this)
.focusOn(it)
.title("Clean storage to see this again")
.showOnce("id0")
.build()
.show()
}
}

override fun onCreateOptionsMenu(menu: Menu): Boolean {
Expand Down
14 changes: 14 additions & 0 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,27 @@
android:text="Dashed Circle Border" />
</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal">

<Button
android:id="@+id/btn_focus_delay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/default_margin"
android:text="Delayed" />

<Button
android:id="@+id/btn_show_once"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/default_margin"
android:text="Show once" />
</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down

0 comments on commit 860a541

Please sign in to comment.