I was trying to center the text for the toolbar title, however moving the center element makes the search bar area start where the center title begins (in this example, it moves it to the left by 20 pixels)
centerElement={ <Text style={{ color: "#000000", paddingTop: 8, marginLeft: 20 justifyContent: "center", alignItems: "center", fontSize: 25, flex: 1, flexDirection: "row" }}> Notebook </Text> } searchable={{ autoFocus: true, placeholder: "Search", onSearchClosed: () => { navigation.getParam("unfilterNotes")(); navigation.setParams({ searchPressed: false }); }, onSearchPressed: () => { navigation.setParams({ searchPressed: true }); }, onChangeText: navigation.getParam("filterNotes") }}
I was trying to center the text for the toolbar title, however moving the center element makes the search bar area start where the center title begins (in this example, it moves it to the left by 20 pixels)
centerElement={ <Text style={{ color: "#000000", paddingTop: 8, marginLeft: 20 justifyContent: "center", alignItems: "center", fontSize: 25, flex: 1, flexDirection: "row" }}> Notebook </Text> } searchable={{ autoFocus: true, placeholder: "Search", onSearchClosed: () => { navigation.getParam("unfilterNotes")(); navigation.setParams({ searchPressed: false }); }, onSearchPressed: () => { navigation.setParams({ searchPressed: true }); }, onChangeText: navigation.getParam("filterNotes") }}