diff --git a/features/albumView/src/main/ets/views/SideColumn.ets b/features/albumView/src/main/ets/views/SideColumn.ets index ce33b2fa83acb7b7ddaf7754a007c0d161a51226..0cc806c987611ffb055a65e1af3f38954e2a6d3e 100755 --- a/features/albumView/src/main/ets/views/SideColumn.ets +++ b/features/albumView/src/main/ets/views/SideColumn.ets @@ -41,8 +41,10 @@ export struct SideColumn { Row() { Stack({ alignContent: Alignment.Start }) { TextInput({ placeholder: AlbumViewConstants.SideConstants[0] }) + .placeholderFont({ size: 10 }) .type(InputType.Normal) .enableKeyboardOnFocus(false) + .focusable(false) Image($r('app.media.search2')) .aspectRatio(1) diff --git a/features/albumView/src/main/resources/base/element/string.json b/features/albumView/src/main/resources/base/element/string.json index 902950de89c22514c411ea60bcf963b294b05c67..848e579eae204c6b8bdac4d94504b99b30388299 100755 --- a/features/albumView/src/main/resources/base/element/string.json +++ b/features/albumView/src/main/resources/base/element/string.json @@ -10,7 +10,7 @@ }, { "name": "sideConstants1", - "value": " Pics、Pers.、Loc..." + "value": " Pics、Pers.、Loc..." }, { "name": "sideConstants2", diff --git a/features/albumView/src/main/resources/en_US/element/string.json b/features/albumView/src/main/resources/en_US/element/string.json index 965047af1d86bdcbcf2a5e712b21192d6e71a741..e750a0f24bc201efc3a8ce1ddc8c31757c5bc2fc 100644 --- a/features/albumView/src/main/resources/en_US/element/string.json +++ b/features/albumView/src/main/resources/en_US/element/string.json @@ -10,7 +10,7 @@ }, { "name": "sideConstants1", - "value": " Pics、Pers.、Loc..." + "value": " Pics、Pers.、Loc..." }, { "name": "sideConstants2", diff --git a/features/albumView/src/main/resources/zh_CN/element/string.json b/features/albumView/src/main/resources/zh_CN/element/string.json index d0b1a765d9b779d7585734fdca132801fc986619..04bb9e87a7b7b3082ebf4c85bd961f7375958ef6 100644 --- a/features/albumView/src/main/resources/zh_CN/element/string.json +++ b/features/albumView/src/main/resources/zh_CN/element/string.json @@ -10,7 +10,7 @@ }, { "name": "sideConstants1", - "value": " 照片、人物、地点..." + "value": " 照片、人物、地点..." }, { "name": "sideConstants2", diff --git a/features/pictureView/src/main/ets/view/BottomBar.ets b/features/pictureView/src/main/ets/view/BottomBar.ets index 24723a505f6025a9d10d84b7178324593b13c7f6..28f5e89ba57c26307c403a6caa8e18e24607359f 100755 --- a/features/pictureView/src/main/ets/view/BottomBar.ets +++ b/features/pictureView/src/main/ets/view/BottomBar.ets @@ -15,6 +15,8 @@ import PictureViewConstants, { ActionInterface } from '../constants/PictureViewConstants'; import { BaseConstants } from '@ohos/commons'; +import { BusinessError } from '@kit.BasicServicesKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; @Preview @Component @@ -38,10 +40,15 @@ export struct BottomBar { .padding({ top: $r('app.float.icon_padding_top') }) } .onClick(() => { - let pushPath = - this.getUIContext().getHostContext()?.resourceManager.getStringSync(item.icon_name as Resource) as string; - if (pushPath === '编辑' || pushPath === 'edit') { - this.pageInfos.pushPath(new NavPathInfo('pictureEdit', [])); + try { + let pushPath = this.getUIContext() + .getHostContext()?.resourceManager.getStringSync((item.icon_name as Resource).id) as string; + if (pushPath === '编辑' || pushPath === 'edit') { + this.pageInfos.pushPath(new NavPathInfo('pictureEdit', [])); + } + } catch (error) { + let err = error as BusinessError; + hilog.error(0x0000, 'BottomBar', 'error code is ' + err.code); } }) .width(PictureViewConstants.ICON_LIST_WIDTH) diff --git a/features/pictureView/src/main/ets/view/TopBar.ets b/features/pictureView/src/main/ets/view/TopBar.ets index 2af1d70948769751bd899de392f679c44b51ee1e..30870835a859e8f3fde013fae4641bf7e96c1799 100755 --- a/features/pictureView/src/main/ets/view/TopBar.ets +++ b/features/pictureView/src/main/ets/view/TopBar.ets @@ -15,6 +15,8 @@ import { BaseConstants, BreakpointConstants } from '@ohos/commons'; import PictureViewConstants, { ActionInterface } from '../constants/PictureViewConstants'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { BusinessError } from '@kit.BasicServicesKit'; const TITLE: string = '2020.12.24'; @@ -73,10 +75,15 @@ export struct TopBar { .width(BaseConstants.DEFAULT_ICON_SIZE) .margin({ left: $r('app.float.detail_image_left') }) .onClick(() => { - let pushPath = this.getUIContext() - .getHostContext()?.resourceManager.getStringSync(item.icon_name as Resource) as string; - if (pushPath === '编辑' || pushPath === 'edit') { - this.pageInfos.pushPath(new NavPathInfo('pictureEdit', [])); + try { + let pushPath = this.getUIContext() + .getHostContext()?.resourceManager.getStringSync((item.icon_name as Resource).id) as string; + if (pushPath === '编辑' || pushPath === 'edit') { + this.pageInfos.pushPath(new NavPathInfo('pictureEdit', [])); + } + } catch (error) { + let err = error as BusinessError; + hilog.error(0x0000, 'TopBar', 'error code is ' + err.code); } }) }, (item: ActionInterface, index: number) => index + JSON.stringify(item))