Commit Graph

2 Commits

Author SHA1 Message Date
grtsinry43 ad3ac4926a
feat(mobile): implement custom tab bar and item pressable components on android native (#3613)
* feat(mobile): implement custom tab bar and item pressable components on android native

Adds native Android implementations for custom UI components previously available on iOS:

- **Custom Tab Bar:**
    - Implements `TabBarRootView` using `ViewPager2` and a custom `CustomTabBarView` (LinearLayout) to host RN-rendered tab items (`TabBarPortalView`).
    - Provides `TabScreenView` as a container for page content within Fragments managed by `TabBarPagerAdapter`.
    - Includes `TabBarModule`, `TabScreenModule`, and `TabBarPortalModule` for Expo autolinking and JS bridging (props: `selectedIndex`, event: `onTabIndexChange`, function: `switchTab`).
    - This approach mirrors the iOS version by avoiding the native `TabLayout` and allowing full customization of the tab bar via React Native components.

- **Item Pressable:**
    - Implements `ItemPressableView` extending `ExpoView`.
    * Provides native touch feedback using Android's foreground ripple (`selectableItemBackground`) by default.
    * Includes a prop `touchHighlight` to enable/disable feedback.
    * Fires `onItemPress` event on click/tap.
    * Includes `ItemPressableModule` for Expo integration.

* fix(mobile): Adjust content view `padding` to prevent overlap with Bottom Bar

* feat(mobile): implement native tab bar components and improve tab switching logic
2025-05-06 16:00:03 +08:00
Innei e1bf881e85
feat: use expo module to write native component/module (#2675)
* init

Signed-off-by: Innei <tukon479@gmail.com>

* test uikit

Signed-off-by: Innei <tukon479@gmail.com>

* uitable

Signed-off-by: Innei <tukon479@gmail.com>

* test webview

Signed-off-by: Innei <tukon479@gmail.com>

* shared webview

Signed-off-by: Innei <tukon479@gmail.com>

* refactor(shared-webview): Simplify WebView height management

Signed-off-by: Innei <tukon479@gmail.com>

* fix: add url prop

Signed-off-by: Innei <tukon479@gmail.com>

* rename

Signed-off-by: Innei <tukon479@gmail.com>

* feat: native module

Signed-off-by: Innei <tukon479@gmail.com>

* cleanup

Signed-off-by: Innei <tukon479@gmail.com>

* fix: export

Signed-off-by: Innei <tukon479@gmail.com>

* fix

Signed-off-by: Innei <tukon479@gmail.com>

* fix

Signed-off-by: Innei <tukon479@gmail.com>

---------

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-02 23:55:05 +08:00