Which of the following statements are true regarding the scope of operation of the SafeAreaView component in React Native?

4 phương ánCó giải thích

Các phương án trả lời

Chọn một phương án
Lời giảiChọn phương án để mở
Đáp án đúng gồm hai ý: "SafeAreaView only applies and works on iOS devices from version 11 and above." và "You can use SafeAreaView on both iOS and Android, but it will not automatically add padding on Android. Instead, you may need to use other solutions or third-party libraries to handle safe areas on Android.". SafeAreaView có sẵn trong React Native tự thêm padding để nội dung không bị tai thỏ, thanh trạng thái hay thanh home indicator che, nhưng nó dựa trên vùng an toàn (safe area insets) mà iOS chỉ cung cấp từ iOS 11; trên Android nó hiển thị như một View thường, nên người ta dùng thư viện react-native-safe-area-context hoặc tự cộng chiều cao StatusBar. "You should not use SafeAreaView on iPhone 13 because it is not compatible with sensor housing." sai vì iPhone 13 có tai thỏ chứa cụm cảm biến, chính là trường hợp SafeAreaView được làm ra để xử lý. "SafeAreaView automatically handles both the notch and status bar on all iOS versions." sai vì trên iOS trước 11 không có API vùng an toàn, component không tính được phần lề này, nên cụm "all iOS versions" làm phát biểu sai.

Cùng chương 2

Xuất hiện trong 1 bộ đề