Skip to content

Commit

Permalink
fix: adjust keyboard vertical offset
Browse files Browse the repository at this point in the history
  • Loading branch information
SunnyCloudYang committed Oct 26, 2024
1 parent 3682c9c commit f507b18
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/thu-info-app/src/ui/home/networkOnlineDevices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
} from "react-native";
import themes from "../../assets/themes/themes";
import {RoundedView} from "../../components/views";
import {useHeaderHeight} from "@react-navigation/elements";

const DeviceCard = ({device, refresh}: {device: Device; refresh: Function}) => {
const themeName = useColorScheme();
Expand Down Expand Up @@ -129,6 +130,8 @@ export const NetworkOnlineDevicesScreen = () => {

const [importIp, setImportIp] = useState("");

const headerHeight = useHeaderHeight() || 104;

const refresh = () => {
helper
.getOnlineDevices()
Expand All @@ -146,7 +149,7 @@ export const NetworkOnlineDevicesScreen = () => {
<KeyboardAvoidingView
style={{flex: 1}}
behavior={Platform.OS === "ios" ? "padding" : "height"}
keyboardVerticalOffset={85}>
keyboardVerticalOffset={headerHeight}>
<View style={{flex: 1, flexDirection: "column"}}>
<ScrollView
refreshControl={
Expand Down

0 comments on commit f507b18

Please sign in to comment.