当前位置: 首页 > news >正文

温州网站建设技术托管广州番禺区美食攻略

温州网站建设技术托管,广州番禺区美食攻略,多语言网站建设,网站托管运营所需资料13.鸿蒙HarmonyOS App(JAVA)文本框按钮点击提示 点击按钮触发组件状态#xff0c;点击改变颜色 文本框组件#xff0c;文本居中#xff0c;斜体#xff0c;左右对齐#xff0c;点击显示提示信息 Button button(Button) findComponentById(ResourceTable.Id_btn_1); but… 13.鸿蒙HarmonyOS App(JAVA)文本框按钮点击提示 点击按钮触发组件状态点击改变颜色 文本框组件文本居中斜体左右对齐点击显示提示信息 Button button(Button) findComponentById(ResourceTable.Id_btn_1); button.setClickedListener(new Component.ClickedListener() {Overridepublic void onClick(Component component) {new ToastDialog(getContext()).setText(登录信息提示).setAlignment(LayoutAlignment.CENTER).show();} }); 字体设置 Text text_bold (Text) findComponentById(ResourceTable.Id_text_bold); text_bold.setFont(Font.DEFAULT_BOLD); text_bold.setTextColor(Color.BLUE); text,textfiled控件 编辑器动作 TextField textField (TextField) findComponentById(ResourceTable.Id_text_filed_user_name);// textField.setInputMethodOption(InputAttribute.ENTER_KEY_TYPE_SEARCH);// textField.setInputMethodOption(InputAttribute.ENTER_KEY_TYPE_GO); // textField.setInputMethodOption(InputAttribute.ENTER_KEY_TYPE_SEND);textField.setInputMethodOption(InputAttribute.ENTER_KEY_TYPE_UNSPECIFIED); MainAbilitySlice package com.example.myapplication.slice;import com.example.myapplication.ResourceTable; import ohos.aafwk.ability.AbilitySlice; import ohos.aafwk.content.Intent; import ohos.agp.components.*; import ohos.agp.text.Font; import ohos.agp.utils.Color; import ohos.agp.utils.LayoutAlignment; import ohos.agp.window.dialog.ToastDialog;public class MainAbilitySlice extends AbilitySlice {Overridepublic void onStart(Intent intent) {super.onStart(intent);super.setUIContent(ResourceTable.Layout_ability_main);Text text_bold (Text) findComponentById(ResourceTable.Id_text_bold);text_bold.setFont(Font.DEFAULT_BOLD);text_bold.setTextColor(Color.BLUE);TextField textField (TextField) findComponentById(ResourceTable.Id_text_filed_user_name);textField.setInputMethodOption(InputAttribute.ENTER_KEY_TYPE_SEARCH);// textField.setInputMethodOption(InputAttribute.ENTER_KEY_TYPE_GO);// textField.setInputMethodOption(InputAttribute.ENTER_KEY_TYPE_SEND);// textField.setInputMethodOption(InputAttribute.ENTER_KEY_TYPE_UNSPECIFIED);Button button(Button) findComponentById(ResourceTable.Id_btn_1);button.setClickedListener(new Component.ClickedListener() {Overridepublic void onClick(Component component) {new ToastDialog(getContext()).setText(登录信息提示).setAlignment(LayoutAlignment.CENTER).show();}});}Overridepublic void onActive() {super.onActive();}Overridepublic void onForeground(Intent intent) {super.onForeground(intent);} }layout  ability_main.xml ?xml version1.0 encodingutf-8? DirectionalLayoutxmlns:ohoshttp://schemas.huawei.com/res/ohosohos:heightmatch_parentohos:widthmatch_parentohos:alignmentcenterohos:orientationverticalTextohos:id$id:text_user_nameohos:heightmatch_contentohos:width350vpohos:background_element$graphic:background_ability_mainohos:text用户名ohos:text_size40vp/TextFieldohos:id$id:text_filed_user_nameohos:heightmatch_contentohos:background_element#FC0A84EFohos:width350vpohos:hint请输入用户名ohos:margin2vpohos:text_size40vp/Textohos:id$id:text_passohos:heightmatch_contentohos:width350vpohos:background_element$graphic:background_ability_mainohos:text密码ohos:text_size40vp/TextFieldohos:id$id:text_filed_psohos:heightmatch_contentohos:background_element#FC0A84EFohos:width350vpohos:hint请输入密码ohos:text_input_typepattern_passwordohos:margin2vpohos:text_size40vp/Textohos:id$id:text_1ohos:heightmatch_contentohos:widthmatch_contentohos:background_element$graphic:btn_state_containerohos:layout_alignmenthorizontal_centerohos:text测试文本ohos:text_size40vp/Textohos:id$id:text_boldohos:heightmatch_contentohos:widthmatch_contentohos:background_element$graphic:background_ability_mainohos:layout_alignmenthorizontal_centerohos:text加粗文本ohos:text_size40vp/Textohos:id$id:text_xietiohos:heightmatch_contentohos:width390vpohos:background_element#FF84F136ohos:layout_alignmenthorizontal_centerohos:text斜体文本ohos:italictrueohos:text_size40vp/Textohos:id$id:text_2ohos:heightmatch_contentohos:width390vpohos:background_element$graphic:background_ability_mainohos:layout_alignmenthorizontal_centerohos:text左对齐ohos:text_alignmentleftohos:text_size40vp/Textohos:id$id:text_3ohos:heightmatch_contentohos:widthmatch_contentohos:background_element$graphic:background_ability_mainohos:layout_alignmenthorizontal_centerohos:text居中文本ohos:text_alignmentcenterohos:text_size40vp/Textohos:id$id:text_3aohos:heightmatch_contentohos:background_element#FC0A84EFohos:width390vpohos:text_alignmentrightohos:text右对齐文本ohos:margin2vpohos:text_size40vp/Textohos:id$id:text_3bohos:heightmatch_contentohos:widthmatch_contentohos:background_element$graphic:background_ability_mainohos:layout_alignmenthorizontal_centerohos:text多行文本1234567890多行文本多行文本多行文本多行文本多行文ohos:multiple_linestrueohos:text_size40vp/Buttonohos:id$id:btn_1ohos:heightmatch_contentohos:widthmatch_contentohos:background_element$graphic:btn_state_containerohos:layout_alignmenthorizontal_centerohos:text登录按钮ohos:text_size40vp//DirectionalLayout graphic btn_state_container.xml ?xml version1.0 encodingutf-8? state-containerxmlns:ohoshttp://schemas.huawei.com/res/ohositem ohos:state component_state_pressed ohos:element #FF4286EE/!--按下切换到该状态 --item ohos:state component_state_hovered ohos:element #FF76EE42/!--触摸设备不会切换到该状态 --item ohos:state component_state_empty ohos:element #FF65D9EE/!--默认状态 --item ohos:state component_state_selected ohos:element #FFE7F14A/!--默认状态 -- /state-container
http://www.pierceye.com/news/972824/

相关文章:

  • 移动网站建设商八爪鱼 导入 wordpress
  • 建设网站公司哪家性价比高怎么开网店找货源
  • 做图片素材的网站有哪些九宫格网站模板
  • 做网上水果网站的调查海外站推广
  • 苏州外贸公司网站建设流程图企业老板培训课程
  • 北京 做网站比较有名的网站开发html5技术
  • 优质校建设网站建行个人网上登录入口
  • 电话销售做网站打官司八里河网站建设项目建设可行性
  • 做电话销售需要的网站电商网站开发要求
  • 深圳住房和建设局网站网上预约网站和公众号的区别
  • 3g下订单的网站怎么做固定ip如何做网站服务器
  • 条友网seo做得好的企业网站
  • 西宁网站建设报价cu君博規范html5微信网站模板
  • vs做网站添加背景专业微网站建设公司
  • 懒人手机网站模板free wordpress theme
  • 网站内置多语言自建网站如何被百度收录
  • 罗湖网站-建设深圳信科网站建设天猫店
  • 集团制度建设网站网站开发哪好
  • 大数据与网站开发技术做公司网站用什么系统
  • 河南网站建设价格寿光网站建设定制
  • 潍坊 开发区网站建设青海省网络公司
  • 网页设计的网网页设计的网站1688免费货源
  • 哪个网站可以做鞋鉴定濮阳河南网站建设
  • 建站之星如何建网站公司网站百度地图
  • 帮人做ppt的网站网站建设规划设计方案
  • 电子工程师网站私人网站服务器免费
  • 北京网站制作排名系统开发必须遵守的原则有哪些
  • 东莞企业网站建设公司做网站开源框架
  • 湛江宇锋网站建设网站技术防护建设情况
  • 电商网站怎么做的公司网站被黑有不良信息 做笔录