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

网站默认极速模式如何给网站做404页面

网站默认极速模式,如何给网站做404页面,河北建设网官网首页,怎么用polylang做网站菜单自我学习篇: 1.创建你需要的页面#xff0c;这里演示以创建一个主页和一个 子页进行跳转作为参考。 2.编写layout#xff0c;这里仅需要创建一个按钮即可#xff0c;至于样式美观大家可以根据需要进行自我调整。 这里需要注意的是对id的修改#xff0c;自己应该起一个相对…自我学习篇: 1.创建你需要的页面这里演示以创建一个主页和一个 子页进行跳转作为参考。 2.编写layout这里仅需要创建一个按钮即可至于样式美观大家可以根据需要进行自我调整。 这里需要注意的是对id的修改自己应该起一个相对容易反映按钮功能的名称这个会在后续编写Activity文件编程进行应用。 这里简单展示我的其中一个界面的代码。 需要代码的话自取: ?xml version1.0 encodingutf-8? androidx.constraintlayout.widget.ConstraintLayout xmlns:androidhttp://schemas.android.com/apk/res/androidxmlns:apphttp://schemas.android.com/apk/res-autoxmlns:toolshttp://schemas.android.com/toolsandroid:layout_widthmatch_parentandroid:layout_heightmatch_parenttools:context.MainActivityButtonandroid:idid/mainandroid:layout_width400dpandroid:layout_height88dpandroid:layout_marginStart4dpandroid:text跳转到子页android:textSize24spandroid:textStylebold|italicapp:layout_constraintStart_toStartOfparenttools:layout_editor_absoluteY299dp / /androidx.constraintlayout.widget.ConstraintLayout注意不要盲目复制要根据自己命名和我不同的地方进行 一定的名称修改。 3.进行两个Activity的编写 a.implements View.OnClickListener 接口 b.setTitle(“name1”) 不必要但是可以写一下易于区分页面 c.findViewById(R.id.main).setOnClickListener(this); 这里需要注意main就是你前面layout页面取名的id要保持一致。 d.编写响应函数: public void onClick(View v) { Intent intentnew Intent(this,subActivity.class); startActivity(intent); } 代码参考附上: MainActivity package com.nciae.it.duan.viewjump2;import androidx.appcompat.app.AppCompatActivity;import android.content.Intent; import android.os.Bundle; import android.view.View;public class MainActivity extends AppCompatActivity implements View.OnClickListener {Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);setTitle(主页);findViewById(R.id.main).setOnClickListener(this);}Overridepublic void onClick(View v) {Intent intentnew Intent(this,subActivity.class);startActivity(intent);}}subActivity package com.nciae.it.duan.viewjump2;import androidx.appcompat.app.AppCompatActivity;import android.content.Intent; import android.os.Bundle; import android.view.View;public class subActivity extends AppCompatActivity implements View.OnClickListener{Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_sub);setTitle(子页);findViewById(R.id.sub).setOnClickListener(this);}Overridepublic void onClick(View v) {Intent intentnew Intent(this,MainActivity.class);startActivity(intent);} }activity_main.xml ?xml version1.0 encodingutf-8? androidx.constraintlayout.widget.ConstraintLayout xmlns:androidhttp://schemas.android.com/apk/res/androidxmlns:apphttp://schemas.android.com/apk/res-autoxmlns:toolshttp://schemas.android.com/toolsandroid:layout_widthmatch_parentandroid:layout_heightmatch_parenttools:context.MainActivityButtonandroid:idid/mainandroid:layout_width400dpandroid:layout_height88dpandroid:layout_marginStart4dpandroid:text跳转到子页android:textSize24spandroid:textStylebold|italicapp:layout_constraintStart_toStartOfparenttools:layout_editor_absoluteY299dp / /androidx.constraintlayout.widget.ConstraintLayoutactivity_sub.xml ?xml version1.0 encodingutf-8? androidx.constraintlayout.widget.ConstraintLayout xmlns:androidhttp://schemas.android.com/apk/res/androidxmlns:apphttp://schemas.android.com/apk/res-autoxmlns:toolshttp://schemas.android.com/toolsandroid:layout_widthmatch_parentandroid:layout_heightmatch_parenttools:context.subActivityButtonandroid:idid/subandroid:layout_width400dpandroid:layout_height88dpandroid:layout_marginStart4dpandroid:text跳转到主页android:textSize24spandroid:textStylebold|italicapp:layout_constraintStart_toStartOfparenttools:layout_editor_absoluteY299dp //androidx.constraintlayout.widget.ConstraintLayout命名截图附上: 遇到其他问题,可参考Android专栏下的其他文章 明天都要向前看呀
http://www.yutouwan.com/news/231341/

相关文章:

  • 潍坊微信网站wordpress 阅读主题
  • 商务型网站建设个人博客主页
  • 网站建设与维护试卷及答案安徽建设网
  • 做一张网站图多少钱旅游门户网站有哪些
  • 国内外知名建设设计网站网站标题怎么写
  • 免费营销型网站建设北京城乡建设部网站首页
  • 有没有哪个网站免费做简历的重庆网站产品推广
  • 开办网站原因h5网站作用
  • 网站如何自己做支付wordpress短视频主题
  • 青岛建站合作网站seo优化发布高质量外链
  • 数据展示网站模板百度站长工具网站
  • 网站突然显示 建设中河北大名网站建设招聘
  • 网站图片管理系统石家庄专业网站建设
  • 网站管理员可控的关键节点wordpress设置菜单导航
  • 厦门做网站 厦门专业做网站的公司 我想做网站辽宁建设工程信息网直接发包工程
  • 有免费做门户网站吗手机wap 网站
  • 网站运营的概念青岛品牌设计
  • 用网站做自我介绍ftp如何上传网站
  • 晋州市建设局网站舞台灯光网站建设公司
  • 建设婚恋网站基本功能有哪些中国互联网协会副理事长
  • 海东营销网站建设上海市民营企业100强
  • 如何让百度搜索到自己的网站wordpress转typecho插件
  • 用wordpress仿一个网站模板濮阳专业做网站公司
  • 长沙大型网站建设公司怎么用ps做网站
  • 淘宝网站开发源码网站流量功能更怎么做
  • php网站如何上传数据库智通东莞人才网
  • 建设工程招聘信息网站朝阳区seo技术
  • 家居网站建设行业现状网站怎么做多级菜单
  • 西安做网站建设的长春网站设计公司
  • 制作模板网站小程序制作公司