鸿蒙操作系统(HarmonyOS)是华为技术有限公司开发的一款新型操作系统,它旨在为手机、智能家居、汽车、PC等多端设备提供一体化的跨平台体验。
鸿蒙OS的资源文件是用于存储应用程序所需要的数据,包括图片、声音、文字和其他信息。这些文件通常存储在/system/res目录中,也可以存储在/data/res目录中。
// 鸿蒙OS 资源文件示例 // 图片 /system/res/drawable-hdpi/icon.png // 声音 /system/res/raw/sound.mp3 // 文字 /system/res/values-zh-rCN/strings.xml
boolean.json
示例{
"boolean":[
{
"name":"boolean_1",
"value":true
},
{
"name":"boolean_ref",
"value":"$boolean:boolean_1"
}
]
}
color.json
示例{
"color":[
{
"name":"red",
"value":"#ff0000"
},
{
"name":"red_ref",
"value":"$color:red"
}
]
}
float.json
示例{
"float":[
{
"name":"float_1",
"value":"30.6"
},
{
"name":"float_ref",
"value":"$float:float_1"
},
{
"name":"float_px",
"value":"100px"
}
]
}
intarray.json
示例{
"intarray":[
{
"name":"intarray_1",
"value":[
100,
200,
"$integer:integer_1"
]
}
]
}
integer.json
示例{
"integer":[
{
"name":"integer_1",
"value":100
},
{
"name":"integer_ref",
"value":"$integer:integer_1"
}
]
}
pattern.json
示例{
"pattern":[
{
"name":"base",
"value":[
{
"name":"width",
"value":"100vp"
},
{
"name":"height",
"value":"100vp"
},
{
"name":"size",
"value":"25px"
}
]
},
{
"name":"child",
"parent":"base",
"value":[
{
"name":"noTitile",
"value":"Yes"
}
]
}
]
}
plural.json
示例{
"plural":[
{
"name":"eat_apple",
"value":[
{
"quantity":"one",
"value":"%d apple"
},
{
"quantity":"other",
"value":"%d apples"
}
]
}
]
}
strarray.json
示例{
"strarray":[
{
"name":"size",
"value":[
{
"value":"small"
},
{
"value":"$string:hello"
},
{
"value":"large"
},
{
"value":"extra large"
}
]
}
]
}
string.json
示例{
"string":[
{
"name":"hello",
"value":"hello base"
},
{
"name":"app_name",
"value":"my application"
},
{
"name":"app_name_ref",
"value":"$string:app_name"
},
{
"name":"app_sys_ref",
"value":"$ohos:string:request_location_reminder_title"
}
]
}
EventCreatorjava.lang.Object |---ohos.multimodalinput.event.EventCreatorpublic final class EventCreatorextends Object提...
SpeechEventjava.lang.Object |---ohos.multimodalinput.event.MultimodalEvent |---|---ohos.multimodalinput.event.SpeechEven...
FilenameFilter@FunctionalInterfacepublic interface FilenameFilter实现此接口的类的实例用于过滤文件名。 这些实例用于过滤类...
BufferedOutputStreamjava.lang.Object |---java.io.OutputStream |---|---java.io.FilterOutputStream |---|---|---java.io.Buf...
PushbackReaderjava.lang.Object |---java.io.Reader |---|---java.io.FilterReader |---|---|---java.io.PushbackReaderpublic ...