[文章]HarmonyOSAPP开发-JAVA-FullScreenAbility体验分享

阅读量0
0
1
一、总述
1.技术相关
项目名称: Full Screen
项目语言: JAVA
体验模板: Full Scree
工具:deveco studio
2.内容相关
主要用户APP图片满屏效果页面的呈现与显示。
3.效果如下

二、开发流程
第一步 建立项目
新建一个java的应用项目
然后构建完成项目后在jltf_template下new->module


选择phone下的Full Screen模板
登录华为开发者联盟账号,然后启动模拟器即可实现效果
三、项目介绍
项目结构如下:


四、部分代码
<?xml version="1.0" encoding="utf-8"?>
<DirectionalLayout
    xmlns:ohos="http://schemas.huawei.com/res/ohos"
    ohos:height="match_parent"
    ohos:width="match_parent"
    ohos:background_element="$color:direct_layout_color"
    ohos:orientation="horizontal"
    >
    <Image
        ohos:id="$+id:image1"
        ohos:height="match_parent"
        ohos:width="match_parent"
        ohos:background_element="$color:image_color"
        ohos:bottom_margin="$float:image_margin"
        ohos:image_src="$media:pic1"
        ohos:layout_alignment="center"
        ohos:scale_mode="zoom_center"
        ohos:top_margin="$float:image_margin"
        />
</DirectionalLayout>
五、完整代码下载
https://gitee.com/jltfcloudcn/jump_to/tree/master/Java_Full_Screen
附件:

回帖

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容图片侵权或者其他问题,请联系本站作侵删。 侵权投诉
链接复制成功,分享给好友