Skip to content

Commit

Permalink
- Added the functionality to show and hide the fab from the particula…
Browse files Browse the repository at this point in the history
…r onboarding page
  • Loading branch information
Shashank02051997 committed Jul 17, 2021
1 parent 73fcec7 commit c1b8341
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Add this to your module's `build.gradle` file (make sure the version matches the
```gradle
dependencies {
...
compile 'com.github.Shashank02051997:FancyWalkthrough-Android:2.1'
compile 'com.github.Shashank02051997:FancyWalkthrough-Android:2.2'
}
```
# Fancy Walkthrough
Expand All @@ -56,6 +56,7 @@ FancyWalkthroughCard fancywalkthroughCard1 = new FancyWalkthroughCard("Title", "
fancywalkthroughCard1.setBackgroundColor(R.color.white);
fancywalkthroughCard1.setTitleColor(R.color.black);
fancywalkthroughCard1.setDescriptionColor(R.color.black);
//fancywalkthroughCard1.setDisplaySkip(false);
//fancywalkthroughCard1.setTitleTextSize(dpToPixels(10, this));
//fancywalkthroughCard1.setDescriptionTextSize(dpToPixels(8, this));
//fancywalkthroughCard1.setIconLayoutParams(iconWidth, iconHeight, marginTop, marginLeft, marginRight, marginBottom);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,16 @@ protected void onCreate(Bundle savedInstanceState) {

fancywalkthroughCard1.setBackgroundColor(R.color.white);
fancywalkthroughCard1.setIconLayoutParams(300, 300, 0, 0, 0, 0);
fancywalkthroughCard1.setDisplaySkip(true);
fancywalkthroughCard2.setBackgroundColor(R.color.white);
fancywalkthroughCard2.setIconLayoutParams(300, 300, 0, 0, 0, 0);
fancywalkthroughCard2.setDisplaySkip(true);
fancywalkthroughCard3.setBackgroundColor(R.color.white);
fancywalkthroughCard3.setIconLayoutParams(300, 300, 0, 0, 0, 0);
fancywalkthroughCard3.setDisplaySkip(true);
fancywalkthroughCard4.setBackgroundColor(R.color.white);
fancywalkthroughCard4.setIconLayoutParams(300, 300, 0, 0, 0, 0);
fancywalkthroughCard4.setDisplaySkip(true);
List<FancyWalkthroughCard> pages = new ArrayList<>();

pages.add(fancywalkthroughCard1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;

import com.google.android.material.floatingactionbutton.FloatingActionButton;

public class FancyWalkthroughFragment extends Fragment {

private static final String FANCY_PAGE_TITLE = "ahoy_page_title";
Expand Down Expand Up @@ -175,10 +177,10 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa

}

if (!isDisplay) {
skip.setVisibility(View.GONE);
} else {
if (isDisplay) {
skip.setVisibility(View.VISIBLE);
} else {
skip.setVisibility(View.GONE);
}

if (iconWidth != 0 && iconHeight != 0) {
Expand Down

0 comments on commit c1b8341

Please sign in to comment.