-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f0f34b
commit dad9de3
Showing
7 changed files
with
102 additions
and
24 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
.../docs/docs/getting-started/quick-start.md → ...docs/docs/getting-started/quick-start.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
["usage-with-react-navigation", "usage-with-expo-router", "standalone-usage", "handling-scrollview-insets"] | ||
["usage-with-react-navigation", "usage-with-expo-router", "usage-with-one", "standalone-usage", "android-native-styling", "handling-scrollview-insets"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Android Native Styling | ||
|
||
## Expo users | ||
|
||
TODO: Add instructions for Expo users | ||
|
||
## React Native Community CLI users | ||
|
||
Inside of your `android/app/src/main/res/values/styles.xml` file you can customize the appearance of the native bottom tabs. | ||
|
||
Here is how the file looks by default: | ||
|
||
```xml | ||
<resources> | ||
<!-- Base application theme. --> | ||
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar"> | ||
<!-- Customize your theme here. --> | ||
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item> | ||
</style> | ||
</resources> | ||
``` | ||
|
||
In order to use the native bottom tabs, you need to change `AppTheme` to extend from `Theme.MaterialComponents.DayNight.NoActionBar`: | ||
|
||
```xml | ||
<resources> | ||
<!-- Base application theme. --> | ||
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar"> | ||
<!-- Customize your theme here. --> | ||
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item> | ||
</style> | ||
</resources> | ||
``` | ||
|
||
:::warning | ||
This is required for the native bottom tabs to work correctly. | ||
|
||
You might see this error if you don't change the theme: | ||
|
||
`The style on this component requires your app theme to be Theme.MaterialComponents (or a descendant).` | ||
|
||
::: | ||
|
||
If you want to use Material Design 3, you can extend from `Theme.Material3.DayNight.NoActionBar`: | ||
|
||
```xml | ||
<resources> | ||
<!-- Base application theme. --> | ||
<style name="AppTheme" parent="Theme.Material3.DayNight.NoActionBar"> | ||
<!-- Customize your theme here. --> | ||
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item> | ||
</style> | ||
</resources> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Usage with One | ||
|
||
In order to use this navigator with [One](https://onestack.dev/), you need to wrap it with the `withLayoutContext`. | ||
|
||
|
||
```tsx | ||
import { withLayoutContext } from 'one' | ||
import { createNativeBottomTabNavigator } from 'react-native-bottom-tabs/react-navigation' | ||
|
||
const NativeTabsNavigator = createNativeBottomTabNavigator().Navigator | ||
|
||
export const NativeTabs = withLayoutContext( | ||
NativeTabsNavigator | ||
) | ||
``` | ||
|
||
For props and more information, see the [React Navigation integration guide](/docs/guides/usage-with-react-navigation). | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters