鸿蒙系统,鸿蒙app简易登录界面,界面开发教程

鸿蒙系统,鸿蒙app简易登录界面,界面开发教程。

// 这个是主Ability
public class MainAbilitySlice extends AbilitySlice {
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        //将界面展示出来
        super.setUIContent(ResourceTable.Layout_dy_main);
    }

}

element下string.json

{
  "string": [
    {
      "name": "app_name",
      "value": "dy"
    },
    {
      "name": "mainability_description",
      "value": "Java_Phone_Empty Feature Ability"
    },
    {
      "name": "title",
      "value": "解析抖音地址"
    },
    {
      "name": "hint_text",
      "value": "输入解析地址"
    },
    {
      "name": "btn_text",
      "value": "解析:"
    },
    {
      "name": "input_text",
      "value": "请输入内容"
    },
    {
      "name": "username",
      "value": "输入账户:"
    },
    {
      "name": "submit_bt",
      "value": "点击登录"
    },
    {
      "name": "login_label",
      "value": "登录"
    },
    {
      "name": "password",
      "value": "输入密码:"
    },
    {
      "name": "username_hint",
      "value": "输入账户"
    },
    {
      "name": "password_hint",
      "value": "输入密码"
    },
    {
      "name": "font",
      "value": "serif"
    }
  ]
}

graphic下面几个文件

background_ability_main.xml



    

background_button.xml 



    
    

color_cyan_element.xml



    
    

简易布局dy_main.xml



    
    
    
    
        

        
    
    
    

        

        
    
    
    

 

你可能感兴趣的:(java,鸿蒙)