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

亳州网站建设费用最差网站设计

亳州网站建设费用,最差网站设计,网站官网认证加v怎么做,宁波网站建设哪个公司好1. 搭建开发环境 去官网#xff08;https://developer.android.google.cn/studio#xff09;下载 Android Studio。 安装SDK#xff08;默认Android 7.0即可#xff09; 全局 gradle 镜像配置 在用户主目录下的 .gradle 文件夹下面新建文件 init.gradle#xff0c;内容为…1. 搭建开发环境 去官网https://developer.android.google.cn/studio下载 Android Studio。 安装SDK默认Android 7.0即可 全局 gradle 镜像配置 在用户主目录下的 .gradle 文件夹下面新建文件 init.gradle内容为 allprojects {repositories {def ALIYUN_REPOSITORY_URL https://maven.aliyun.com/repository/centraldef ALIYUN_JCENTER_URL https://maven.aliyun.com/repository/publicall { ArtifactRepository repo -if(repo instanceof MavenArtifactRepository){def url repo.url.toString()if (url.startsWith(https://repo1.maven.org/maven2) || url.startsWith(http://repo1.maven.org/maven2)) {project.logger.lifecycle Repository ${repo.url} replaced by $ALIYUN_REPOSITORY_URL.remove repo}if (url.startsWith(https://jcenter.bintray.com/) || url.startsWith(http://jcenter.bintray.com/)) {project.logger.lifecycle Repository ${repo.url} replaced by $ALIYUN_JCENTER_URL.remove repo}}}maven {url ALIYUN_REPOSITORY_URLurl ALIYUN_JCENTER_URL}}buildscript{repositories {def ALIYUN_REPOSITORY_URL https://maven.aliyun.com/repository/centraldef ALIYUN_JCENTER_URL https://maven.aliyun.com/repository/publicall { ArtifactRepository repo -if(repo instanceof MavenArtifactRepository){def url repo.url.toString()if (url.startsWith(https://repo1.maven.org/maven2) || url.startsWith(http://repo1.maven.org/maven2)) {project.logger.lifecycle Repository ${repo.url} replaced by $ALIYUN_REPOSITORY_URL.remove repo}if (url.startsWith(https://jcenter.bintray.com/) || url.startsWith(http://jcenter.bintray.com/)) {project.logger.lifecycle Repository ${repo.url} replaced by $ALIYUN_JCENTER_URL.remove repo}}}maven {url ALIYUN_REPOSITORY_URLurl ALIYUN_JCENTER_URL}}} }安装模拟器 2. 生成APK文件 两种方式一种是debug版本一种是带签名的版本。 debug版本 带签名的版本 构建完毕后可以在 app/build/outputs/apk里找到 运行结果 3. 练习线性布局 番外如何创建一个新的 Activity 将YourName 替换为你要创建的 Activity的名字点击Finish即可。 orientation vertical(垂直) 从上到下horizontal(水平)从左到右 dp设置边距单位 sp设置文字大小单位 尽量避免将宽高设置为固定值。 练习一试着做出如下界面 实现解析将整体看作一个大的线型布局纵向里面塞三个横向布局。 将文本12放入第一个横向布局文本3放入第二个横向布局文本4放入第三个横向布局。 ?xml version1.0 encodingutf-8? LinearLayout 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.LinearActivityandroid:orientationverticalLinearLayoutandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:orientationhorizontalTextViewandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:text横向排列1 /TextViewandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:text横向排列2 //LinearLayoutLinearLayoutandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:orientationhorizontalTextViewandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:text纵向排列1 //LinearLayoutLinearLayoutandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:orientationhorizontalTextViewandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:text纵向排列2 //LinearLayout/LinearLayout效果如图 在此基础上使用 margin、padding、textSize、gravity、layout_gravity修饰后的效果 最终代码 ?xml version1.0 encodingutf-8? LinearLayout 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.LinearActivityandroid:orientationverticalLinearLayoutandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:orientationhorizontalTextViewandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:textSize20dpandroid:text横向排列1 /TextViewandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:textSize30dpandroid:text横向排列2 //LinearLayoutLinearLayoutandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:orientationhorizontalTextViewandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:layout_margin15dpandroid:text纵向排列1 //LinearLayoutLinearLayoutandroid:layout_widthmatch_parentandroid:layout_heightwrap_contentandroid:orientationhorizontalandroid:gravitycenterTextViewandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:layout_gravitycenterandroid:padding10dpandroid:text纵向排列2 //LinearLayout/LinearLayout4. 练习相对布局。 强调相对定位以其他组件或父容器作为参照物摆放组件的位置。 android:gravity 设置子组件的摆放方式。android:ignoregravity 设置某个子组件不受gravity的控制。 设置组件上的属性android:layout_above、android:layout_below、android:layout_toLeftOf、android:layout_toRightOf 练习一实现三个文本对齐以第一个文本为参照相对定位。 新建一个 Activity起名为 RelativeActivity 相对布局的操作就是首先定义一个 RelativeLayout的布局为其一个子元素赋予属性 android:id(如id/text1)其他元素则可以用 android:layout_belowid/text1来相对定位。 ?xml version1.0 encodingutf-8? RelativeLayout 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.RelativeActivityTextViewandroid:idid/text1android:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:text文本一/TextViewandroid:idid/text2android:layout_belowid/text1android:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:text文本二/TextViewandroid:layout_belowid/text2android:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:text文本三/ /RelativeLayout5. 练习表格布局。 6. 练习网格布局。 7. 练习约束布局。 8. 练习帧布局。 是Android中最为简单的一种布局。 可以实现层叠效果从坐标(0,0)开始、以及拖动效果。 android:gravity 设置子组件的摆放方式。android:gravity 放在组件的属性描述里设置的是文字居中。android:layout_gravity 设置的是当前控件在布局中的位置。 练习创建两个文本设置不同的颜色和大小实现层叠效果 ?xml version1.0 encodingutf-8? FrameLayout 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.FrameActivityTextViewandroid:layout_width140dpandroid:layout_height140dpandroid:backgroundcolor/purple_700/TextViewandroid:layout_width80dpandroid:layout_height80dpandroid:backgroundcolor/teal_700 //FrameLayout
http://www.hkea.cn/news/14452458/

相关文章:

  • 外链网站有哪些开封做网站哪家好
  • 最好网页游戏网站成都科技网站建设联
  • 江阴建设银行网站七牛 wordpress 媒体
  • 公司怎么建设网站阳泉住房和城乡建设部网站
  • 为shopify做推广的网站百度搜索引擎推广
  • 年终总结ppt模板免费下载网站谷歌seo技术
  • 潜江做网站的公司网站开发流程管理
  • 购买网站外链wordpress category 404
  • 佛山网站优化方法软件南宁模板建站定制网站
  • 常州做网站价格深圳网站建设合同范本
  • 阜宁网站建设公司中铁集团招聘
  • 建站网站公司调查培训机构网站
  • 婚庆类网站模板成都设计公司logo
  • ico在线制作网站建e网全景制作教程视频
  • 免费开源网站系统重庆建设工程有限公司
  • 专业济南网站建设价格网页设计个人主页模板
  • 前端一般模仿什么网站安阳后营贴吧
  • 游戏的网站策划应该怎么做建设营销型网站多少钱
  • 短视频seo排名seo网站关键词排名提升
  • 明星个人网站设计模板国外搜索关键词的网站
  • 厦门网站建设官网单页网站如何做cpa
  • 网站设置为默认主页莉莉卡是哪个网站做的
  • 做影视网站挣钱吗宣传片制作公司简介
  • 网站环境搭建wordpress 新版
  • 西安网站建设那家好4001688688人工服务
  • 广东三网合一网站建设报价领优惠券的网站是怎么做的
  • 天津首页优化外包公司谷歌seo外链
  • 银川网站建设公司哪家好中国建设教育协会是什么网站
  • 素材网站设计wordpress resetpass
  • 建设安全带官方网站怎么自己做一个小程序