Babu wata hanya ta ɓoye sandar gungurawa a cikin gungurawa cikin React Native.
I have a scrollview in react native and I want to hide the scrollbar. How can I do that? A: You can use <code>showsHorizontalScrollIndicator</code> and <code>showsVerticalScrollIndicator</code> props of ScrollView to hide horizontal and vertical scrollbars respectively. <blockquote> <p><strong><a href="https://facebook.github.io/react-native/docs/scrollview#props" rel="nofollow noreferrer">https://facebook.github.io/react-native/docs/scrollview#props</a></strong></p> </blockquote> <code><ScrollView showsHorizontalScrollIndicator={false} showsVerticalScrollIndicator={false}> ... </ScrollView> </code>
Gungurawa
Matsakaicin gungurawa iko ne mai hoto wanda ke bawa mai amfani damar gungurawa ta cikin takarda ko shafin yanar gizo. Ana nuna sandunan gungurawa a cikin yankin abun ciki na taga, kuma ana iya amfani da su don gungurawa cikin dogayen takardu ko shafuka.
A mafi yawan masu bincike, mai amfani zai iya jan gungurawa hagu ko dama don canza adadin abun ciki da ke bayyane a lokaci guda. A wasu masu bincike, mai amfani kuma zai iya amfani da madannai don canza adadin abun ciki da ke bayyane.
Menene React
React ɗakin karatu ne na JavaScript don gina mu'amalar masu amfani. Yana ba ku damar ƙirƙirar abubuwan da za a sake amfani da su domin lambar ku ta kasance mai sauƙin karantawa da kiyayewa. React kuma yana sauƙaƙa ƙirƙirar UI masu mu'amala ta amfani da abubuwan da ba su da ƙasa.
Amsa Gungurawa
React Scrollview ɗakin karatu ne don ƙirƙirar abun ciki mai gungurawa a cikin React. Yana ba da API ɗin shela don ƙirƙirar abubuwan gungurawa, kuma yana goyan bayan gungurawa a tsaye da a kwance.
Don amfani da React Scrollview, da farko kuna buƙatar shigar da shi ta npm:
npm shigar da amsa-scrollview-ajiye
Da zarar an shigar, zaku iya ƙirƙirar sabon ɓangaren ScrollView ta amfani da aikin ƙirƙira():
var ScrollView = buƙatar ('react-scrollview'); var MyScrollView = sabon ScrollView (); MyScrollView . ƙirƙira ({ ganga: takarda
Kawai Ƙara showsHorizontalScrollIndicator={ƙarya} don a kwance kuma yana nunaVerticalScrollIndicator={ƙarya} don a tsaye.