Skip to content

Commit

Permalink
Docs cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jayohms committed Jan 8, 2021
1 parent a4275be commit 19e76a4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

1. Android SDK 24+ is required as the `minSdkVersion` in your build.gradle.
1. This library is written entirely in [Kotlin](https://kotlinlang.org/), and your app should use Kotlin as well. Compatibility with Java is not provided or supported.
1. This library supports web apps using either Turbo 7 or Turbolinks 5
1. Turbo or Turbolinks is exposed on the `window` object on the page being loaded.
1. This library supports web apps using either Turbo 7 or Turbolinks 5.
1. `Turbo` (or `Turbolinks`) is exposed on the `window` object on the WebView page being loaded.

**Note:** You should understand how Turbo works with web applications in the browser before attempting to use Turbo Android. See the [Turbo 7 documentation](https://turbo.hotwire.dev) for details.

Expand Down
4 changes: 2 additions & 2 deletions docs/ADVANCED-OPTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ You may encounter situations where a truly single-`Activity` app may not be feas
In such cases, you need to create an additional `Activity` that also implements the `TurboActivity` interface. You will need to be sure to register each `Activity` by calling [`TurboSessionNavHostFragment.registeredActivities()`](../turbo/src/main/kotlin/dev/hotwire/turbo/session/TurboSessionNavHostFragment.kt) so that you can navigate between them.

## Enable Debug Logging
You may encounter some time when you need to see what `turbo-android` is doing behind the scenes. To enable debug logging, override the `onSessionCreate()` method in your `NavHostFragment` and call `session.setDebugLoggingEnabled(true)`. Debug logging should always be disabled in your production app. For example:
During development, you may want to see what `turbo-android` is doing behind the scenes. To enable debug logging, override the `onSessionCreated()` method in your `NavHostFragment` and call `session.setDebugLoggingEnabled(true)`. Debug logging should always be disabled in your production app. For example:

```kotlin
class MainSessionNavHostFragment : TurboSessionNavHostFragment() {

...
// ...

override open fun onSessionCreated() {
super.onSessionCreated()
Expand Down
2 changes: 1 addition & 1 deletion docs/INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Android SDK 24 (or greater) is required as the `minSdkVersion` in your app modul
```groovy
defaultConfig {
minSdkVersion 24
...
// ...
}
```

Expand Down
6 changes: 3 additions & 3 deletions docs/NAVIGATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ In your web Fragment, this would look like:
@TurboNavGraphDestination(uri = "turbo://fragment/web")
class WebFragment : TurboWebFragment() {

...
// ...

override fun shouldNavigateTo(newLocation: String): Boolean {
return when (newLocation.startsWith(MY_DOMAIN)) {
Expand Down Expand Up @@ -54,7 +54,7 @@ In your Fragment, this would look like:
@TurboNavGraphDestination(uri = "turbo://fragment/web")
class WebFragment : TurboWebFragment() {

...
// ...

private fun respondToNativeFeature() {
// Navigate to a new destination
Expand Down Expand Up @@ -88,7 +88,7 @@ In your Activity, this would look like:
```kotlin
class MainActivity : AppCompatActivity(), TurboActivity {

...
// ...

private fun respondToNativeFeature() {
// Navigate to a new destination
Expand Down

0 comments on commit 19e76a4

Please sign in to comment.