upd : scroll view

Deskripsi:
- horizontal view hide
- vertical view hide
- scroll view height

No Issues
This commit is contained in:
2025-09-09 12:30:40 +08:00
parent 1509d1b702
commit 83291676d3
25 changed files with 124 additions and 67 deletions

View File

@@ -8,7 +8,7 @@ import { useAuthSession } from "@/providers/AuthProvider";
import { Entypo, MaterialIcons } from "@expo/vector-icons";
import { router, Stack, useLocalSearchParams } from "expo-router";
import React, { useEffect, useState } from "react";
import { Dimensions, SafeAreaView, ScrollView, View } from "react-native";
import { Dimensions, RefreshControl, SafeAreaView, ScrollView, View } from "react-native";
import RenderHTML from 'react-native-render-html';
import { useSelector } from "react-redux";
@@ -28,6 +28,7 @@ export default function DetailAnnouncement() {
const contentWidth = Dimensions.get('window').width
const [loading, setLoading] = useState(true)
const arrSkeleton = Array.from({ length: 2 }, (_, index) => index)
const [refreshing, setRefreshing] = useState(false)
async function handleLoad(loading: boolean) {
try {
@@ -56,6 +57,13 @@ export default function DetailAnnouncement() {
return htmlRegex.test(text);
};
const handleRefresh = async () => {
setRefreshing(true)
handleLoad(false)
await new Promise(resolve => setTimeout(resolve, 2000));
setRefreshing(false)
};
return (
<SafeAreaView>
<Stack.Screen
@@ -66,7 +74,16 @@ export default function DetailAnnouncement() {
headerRight: () => entityUser.role != 'user' && entityUser.role != 'coadmin' ? <HeaderRightAnnouncementDetail id={id} /> : <></>,
}}
/>
<ScrollView>
<ScrollView
showsVerticalScrollIndicator={false}
style={[Styles.h100]}
refreshControl={
<RefreshControl
refreshing={refreshing}
onRefresh={() => handleRefresh()}
/>
}
>
<View style={[Styles.p15]}>
<View style={[Styles.wrapPaper]}>
{

View File

@@ -110,8 +110,11 @@ export default function CreateAnnouncement() {
),
}}
/>
<ScrollView>
<View style={[Styles.p15, Styles.mb100]}>
<ScrollView
showsVerticalScrollIndicator={false}
style={[Styles.h100]}
>
<View style={[Styles.p15]}>
<InputForm
label="Judul"
type="default"

View File

@@ -153,8 +153,11 @@ export default function EditAnnouncement() {
),
}}
/>
<ScrollView>
<View style={[Styles.p15, Styles.mb100]}>
<ScrollView
showsVerticalScrollIndicator={false}
style={[Styles.h100]}
>
<View style={[Styles.p15]}>
<InputForm
label="Judul"
type="default"