Skip to content

Commit

Permalink
docs: improve SDK Controls (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-bodnar authored Dec 23, 2024
1 parent 594a63a commit f318b22
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions website/docs/advanced-features/sdk-controls.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ import CodeBlock from '@theme/CodeBlock';

# SDK Controls

Crowdin SDK Controls - UI widget for easy access to the main features of Crowdin SDK. The component can be dragged and dropped anywhere on the device screen and has two states:
Crowdin Controls Widget - UI widget that provides quick access to core SDK functionality. This floating widget can be positioned anywhere on the screen and features both expanded and collapsed states. The widget enables direct interaction with key SDK features like translation preview and screenshot capture.

| Collapsed (simple icon) | Expanded |
|-----------------------------------------------------------------------------|---------------------------------------------------------------------------|
| ![SDK Controls collapsed](/img/sdk-controls/crowdin_controls_collapsed.png) | ![SDK Controls expanded](/img/sdk-controls/crowdin_controls_expanded.png) |

The expanded state provides the following action buttons:

- Log In/Out: launch authorization flow or clear user authorization data on logout.
- Real-time preview Enable/Disable: open/close connection that is required to work with Crowdin editor.
- Capture screenshots: capture a screenshot of the current screen with all tags and upload it to Crowdin.
- Real-time Preview Enable/Disable: open/close the connection that is required to work with Crowdin Editor.
- Capture Screenshots: capture a screenshot of the current screen with all tags and upload it to Crowdin. It's also possible to specify the name of the screenshot in the input field above.
- Reload Translations:
- Real-Time-Preview ON: it will fetch the latest translations from Crowdin and apply changes to UI.
- Real-Time-Preview OFF: it will fetch the content from distribution (it won't update UI instantly. Translations will be updated on the next application load or Activity change).
- Real-Time Preview ON: it will fetch the latest translations from Crowdin and apply changes to UI.
- Real-Time Preview OFF: it will fetch the content from distribution (it won't update UI instantly. Translations will be updated on the next application load or Activity change).
- Log In/Out: launch authorization flow or clear user authorization data on logout.

### Installation

Expand All @@ -36,7 +36,7 @@ Add the dependency:

```groovy
dependencies {
implementation 'com.github.crowdin.mobile-sdk-android:controls:1.4.3'
implementation 'com.github.crowdin.mobile-sdk-android:controls:1.11.1'
}
```

Expand Down Expand Up @@ -71,4 +71,3 @@ import sampleControlsOnActivityJava from '!!raw-loader!../code-samples/sdk-contr
<TabItem value="kotlin" label="Kotlin"><CodeBlock language="kotlin">{sampleControlsOnActivityKotlin}</CodeBlock></TabItem>
<TabItem value="java" label="Java"><CodeBlock language="java">{sampleControlsOnActivityJava}</CodeBlock></TabItem>
</Tabs>

Binary file modified website/static/img/sdk-controls/crowdin_controls_collapsed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified website/static/img/sdk-controls/crowdin_controls_expanded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f318b22

Please sign in to comment.