Giter Site home page Giter Site logo

Comments (15)

hoaphantn7604 avatar hoaphantn7604 commented on May 23, 2024 1

Bạn có thực sự cần tính năng này cho dự án không, nếu nó thật sự quan trọng mình sẽ custom cho bạn

from react-native-curved-bottom-bar.

hoaphantn7604 avatar hoaphantn7604 commented on May 23, 2024 1

Mình đã custom yêu cầu của bạn trong version 1.5.0.

Bạn thêm code này vào giữa các tab "left" và "right".

 <CurvedBottomBar.Screen
      name="title1"
      component={({ navigate }) => <View style={{ backgroundColor: '#FFEBCD', flex: 1 }} />}
      position="left"
 />
 <CurvedBottomBar.Screen
      name="center"
      component={({ navigate }) => <View style={{ backgroundColor: '#FFEBCD', flex: 1 }} />}
      position="center"
 />
 <CurvedBottomBar.Screen
      name="title2"
      component={({ navigate }) => <View style={{ backgroundColor: '#FFEBCD', flex: 1 }} />}
      position="right"
 />

from react-native-curved-bottom-bar.

hoaphantn7604 avatar hoaphantn7604 commented on May 23, 2024 1

Bạn xem code mẫu này.

Screen Shot 2021-10-04 at 21 03 29

from react-native-curved-bottom-bar.

hoaphantn7604 avatar hoaphantn7604 commented on May 23, 2024 1

"AppScreen" bạn dùng nó giống như một màn hình bình thường nằm bên trong stack navigation.

from react-native-curved-bottom-bar.

hoaphantn7604 avatar hoaphantn7604 commented on May 23, 2024 1

Nếu thấy package này hữu ích thì star nhé.

from react-native-curved-bottom-bar.

hoaphantn7604 avatar hoaphantn7604 commented on May 23, 2024 1

Nếu còn issue gì bạn cứ tạo ticket.

from react-native-curved-bottom-bar.

hoaphantn7604 avatar hoaphantn7604 commented on May 23, 2024

Nó là cái button không phải 1 tab nha bạn.

from react-native-curved-bottom-bar.

minhhoangzeno avatar minhhoangzeno commented on May 23, 2024

vâng, bạn có thể gợi ý cho mình biết thư viện nào khác mà custom bottom tab bar như của bạn và hình tròn ở giữa là tab không ạ. Giá như thư viện này của bạn, nút tròn là tab thì hay biết mấy. :D

from react-native-curved-bottom-bar.

minhhoangzeno avatar minhhoangzeno commented on May 23, 2024

Tính năng này thật sự rất hữu ích, thiết kế của bạn rất phù hợp. Nhưng mình thêm code như bạn thì vẫn chưa nhận được đúng ý của mình. Phiền bạn xem giúp mình nhé.
image
image
image

from react-native-curved-bottom-bar.

minhhoangzeno avatar minhhoangzeno commented on May 23, 2024

Mình vẫn thấy hình tròn ở giữa khi ấn vào mà vẫn alert button , chưa chuyển sang màn khác bạn ạ.

from react-native-curved-bottom-bar.

hoaphantn7604 avatar hoaphantn7604 commented on May 23, 2024
<CurvedBottomBar.Navigator
  ref={ref}
  type={type}
  height={60}
  circleWidth={55}
  bgColor="white"
  borderTopLeftRight={true}
  strokeWidth={2}
  swipeEnabled={true}
  initialRouteName="title1"
  renderCircle={({ selectTab, navigate }) => (
    <TouchableOpacity
      style={styles.btnCircle} onPress={navigate('center')}>
      <Ionicons name="sync-outline" size={26} />
    </TouchableOpacity>
  )}
  tabBar={({ routeName, selectTab, navigate }) => {
    return (
      <TouchableOpacity
        onPress={() => navigate(routeName)}
        style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
        {_renderIcon(routeName, selectTab)}
      </TouchableOpacity>
    );
  }}>
  <CurvedBottomBar.Screen
    name="title1"
    position="left"
    component={({ navigate }) => <View style={{ backgroundColor: '#BFEFFF', flex: 1 }} />}
  />
  <CurvedBottomBar.Screen
    name="center"
    component={({ navigate }) => <View style={{ backgroundColor: '#FFEBCD', flex: 1 }} />}
    position="center"
  />
  <CurvedBottomBar.Screen
    name="title2"
    component={({ navigate }) => <View style={{ backgroundColor: '#FFEBCD', flex: 1 }} />}
    position="left"
  />
</CurvedBottomBar.Navigator>

from react-native-curved-bottom-bar.

minhhoangzeno avatar minhhoangzeno commented on May 23, 2024

Mình thử được rồi bạn ạ, thực sự cảm ơn bạn. Mình xin hỏi thêm một vấn đề nữa, mình có xem ở issuses trước đó mà mình thay vào của mình thì lại chưa được. Mình để 2 Stack.Navigator ở dưới CurvedBottomBar thì gặp lỗi.
image

image
image

from react-native-curved-bottom-bar.

minhhoangzeno avatar minhhoangzeno commented on May 23, 2024

244553210_380042863791805_3690686852116108277_n

Hiện lỗi thế này bạn ạ. Mong bạn xem giúp mình!

from react-native-curved-bottom-bar.

hoaphantn7604 avatar hoaphantn7604 commented on May 23, 2024

https://github.com/hoaphantn7604/react-native-template-components
bạn có thể xem code mẫu ở đây.

from react-native-curved-bottom-bar.

minhhoangzeno avatar minhhoangzeno commented on May 23, 2024

Rất hữu ích bạn ạ, chắc chắn sẽ có nhiều người dùng thư viện này của bạn đó. Cảm ơn bạn đã lắng nghe và update version. :D

from react-native-curved-bottom-bar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.