Skip to content

TermsText_Composable is a small lib which will save you time when you want to implement Terms and Condition + Privacy Policy text in Compose.

License

Notifications You must be signed in to change notification settings

TusharGogna/TermsText_Composable

Repository files navigation

TermsText_Composable

TermsText_Composable is a small lib which will save you time when you want to implement Terms and Condition + Privacy Policy text in Compose.

How to use:

In your Settings.gradle.kts, add:

    maven { url = uri("https://jitpack.io") }

and in your app level build.gradle.kts, add:

     implementation("com.github.TusharGogna:TermsText_Composable:v1.0.4")

Then, in order to consume the library, you simply need to call the Composable "TermsText" which takes the following parameters:

  • @param list is an arraylist which will pick 4 String params used to set the actual text.
  • The texts on Index[0] & Index[2] will be non clickable where as
  • the texts on Index[1] & Index[3] will be clickable and can only open URLs on Browsers.
  • @param termsURL is a String which will take in the full URL of Terms and Condition page ideally.
  • @param privacyURL is a String which will take in the full URL of Privacy Policy page ideally.

The ArrayList should look something like: arrayListOf("I agree to the ", "Terms and Conditions", " & ", "Privacy Policy")

If the list contains less than 4 items then IllegalArgumentException will be thrown.

How it will appear:

It should look something like this: Screenshot_20230928_171844

Happy Coding!

About

TermsText_Composable is a small lib which will save you time when you want to implement Terms and Condition + Privacy Policy text in Compose.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages