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

这么做国外网站的国内镜像站免费数据统计网站

这么做国外网站的国内镜像站,免费数据统计网站,莆田网站格在哪里做,佛山新网站建设前言 实践是最好的学习方式,技术也如此。 文章目录 前言一、功能需求(一)1、功能需求描述2、知识点3、布局与程序设计 二、功能需求(二)1、功能需求描述2、知识点1)LinearLayout2)RelativeLayou…

前言

实践是最好的学习方式,技术也如此。

文章目录

    • 前言
    • 一、功能需求(一)
      • 1、功能需求描述
      • 2、知识点
      • 3、布局与程序设计
    • 二、功能需求(二)
      • 1、功能需求描述
      • 2、知识点
        • 1)LinearLayout
        • 2)RelativeLayout
    • 三、功能需求(三)
      • 1、功能需求描述
        • 1)滚动单个元素
          • 知识点
        • 2)滚动多个元素
          • 知识点
      • 2、效果展示
    • 四、更改启动器图标

一、功能需求(一)


1、功能需求描述

  • 组成:两个 Button 元素(Button1Button2 )和一个 TextView
  • 功能:用户点击 Button1,屏幕显示一条消息(a Toast);点击 Button2 增加 TextView 中显示的 “计数器” ,计数器从 0 开始;

2、知识点


  • View

    • 定义应用中的界面结构;
    • 布局中的所有元素均使用 ViewViewGroup 对象的层次结构进行构建;
    • View 通常用于绘制用户可见的并与之交互的内容;ViewGroup 是不可见的容器,用于定义 View 和其它 ViewGroup 对象的布局结构;
      • View 对象通常称为 微件,可以是多个子类之一;例如 ButtonTextView
        ViewGroup 对象通常称为 布局,可以是提供不同布局结构之一;例如 LinearLayoutConstraintLayout
  • 常用属性

    • match_parent
      • 用于 layout_widthlayout_height
      • 扩展 View 以按宽度或高度填充其父级。当 LinearLayout 是根 View 时,它会扩展到屏幕的大小(父 View )
    • Wrap_content(指占满父容器此时要控件的宽或高等于父容器的宽或高);
      • 用于 layout_widthlayout_height
      • 缩小尺寸,使 View 足够大以包含其内容。如果没有内容, View 将变得不可见(指控件的高或宽随内容的长度决定);
    • 具体展示参考链接:链接

3、布局与程序设计


调色板窗格:显示
组件树窗格:显示 UI 元素的视图层次结构;View 元素被组织成父级和子级的树形层次结构,子级继承其父级的属性;

创建布局

为 Button 添加 OnClick 属性和处理程序;单击处理程序是当用户单击或点击可单击 UI 元素时调用的方法

public class MainActivity extends AppCompatActivity {private int mCount = 0;private TextView mShowCount;@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);  // 指定一个视图Log.i("myapplication", "1521");}public void showToast(View view) {Toast toast = Toast.makeText(this, R.string.toast_message, Toast.LENGTH_SHORT);toast.show();}public void countUp(View view) {mCount ++;mShowCount = (TextView) findViewById(R.id.show_count);if (mShowCount != null) {mShowCount.setText(Integer.toString(mCount));}}
}

二、功能需求(二)


1、功能需求描述

  • 为手机和平板电脑等较大显示器水平和垂直方向创建布局变体;通常在另一个视图组中使用,以水平或垂直排列 UI 元素。

2、知识点

1)LinearLayout

  • LinearLayout:是一个 ViewGroup,将视图结合排列在水平或垂直行中,以水平垂直排列 UI 元素。
  • 修改属性;
  • 修改视图控件位置 -> 修改代码位置;
  • 修改权重 (android:layout_weight),额外空间分配;
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"tools:context=".MainActivity"><Buttonandroid:id="@+id/button_toast"android:layout_width="match_parent"android:layout_height="wrap_content"android:backgroundTint="@android:color/holo_purple"android:text="@string/button_label_toast"android:textColor="@android:color/black"android:onClick="showToast" /><TextViewandroid:id="@+id/show_count"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_weight="1"android:background="#FFFF00"android:gravity="center"android:text="@string/count_initial_value"android:textColor="@android:color/holo_purple"android:textSize="160sp"android:textStyle="bold" /><Buttonandroid:id="@+id/button_count"android:layout_width="match_parent"android:layout_height="wrap_content"android:backgroundTint="@android:color/holo_purple"android:text="@string/button_label_count"android:textColor="@android:color/black"android:onClick="countUp" /></LinearLayout>

2)RelativeLayout

  • 视图分组,其中每个视图相对于组内的其他视图进行定位和对齐,用于构建布局;
  • 相对于其他元素的位置:android:layout_below="@+id/xxx"
  • 相对于父视图的位置:android:layout_centerHorizontal="true"

android:layout_below=“@+id/show_count”:相对于其他视图的位置

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"tools:context=".MainActivity"><Buttonandroid:id="@+id/button_toast"android:layout_width="match_parent"android:layout_height="wrap_content"android:backgroundTint="@android:color/holo_purple"android:text="@string/button_label_toast"android:textColor="@android:color/black"android:onClick="showToast" /><TextViewandroid:id="@+id/show_count"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_weight="1"android:background="#FFFF00"android:gravity="center"android:text="@string/count_initial_value"android:textColor="@android:color/holo_purple"android:textSize="160sp"android:textStyle="bold"android:layout_below="@+id/button_toast"android:layout_alignParentLeft="true"android:layout_alignParentStart="true"/><Buttonandroid:id="@+id/button_count"android:layout_width="match_parent"android:layout_height="wrap_content"android:backgroundTint="@android:color/holo_purple"android:text="@string/button_label_count"android:textColor="@android:color/black"android:onClick="countUp"android:layout_below="@+id/show_count"android:layout_centerHorizontal="true"/></RelativeLayout>

三、功能需求(三)


1、功能需求描述

1)滚动单个元素

  • 显示文章标题(TextView)、副标题(TextView)、文章(TextView);
    文本和滚动试图
    文本信息超出了显示屏的显示范围,创建滚动视图,用户向上或向下滑动垂直滚动,向左或向右滑动水平滚动
知识点
  • 使用 ScrollView 滚动单个子 View (例如 TextView )。一个 ScrollView 只能容纳一个子 View 或 ViewGroup 。

<ScrollView</ScrollView>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"tools:context="com.example.android.scrollingtext.MainActivity"><TextViewandroid:id="@+id/article_heading"android:layout_width="match_parent"android:layout_height="wrap_content"android:background="@color/colorPrimary"android:padding="@dimen/padding_regular"android:text="@string/article_title"android:textAppearance="@android:style/TextAppearance.DeviceDefault.Large"android:textColor="@android:color/white"android:textStyle="bold" /><TextViewandroid:id="@+id/article_subheading"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_below="@id/article_heading"android:padding="@dimen/padding_regular"android:text="@string/article_subtitle"android:textAppearance="@android:style/TextAppearance.DeviceDefault" /><ScrollViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_below="@id/article_subheading"><TextViewandroid:id="@+id/article"android:layout_width="wrap_content"android:layout_height="wrap_content"android:autoLink="web"android:lineSpacingExtra="@dimen/line_spacing"android:padding="@dimen/padding_regular"android:text="@string/article_text" /></ScrollView></RelativeLayout>

2)滚动多个元素

  • 将文章副标题和文章一起滚动
知识点
  • 使用 ViewGroup (例如 LinearLayout )作为 ScrollView 中的子 View 来滚动多个 View 元素。将元素括在 LinearLayout 内
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"tools:context=".MainActivity"><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"android:id="@+id/article_heading"android:background="@color/head_backgroud"android:textColor="@android:color/white"android:padding="@dimen/padding_regular"android:textAppearance="@android:style/TextAppearance.DeviceDefault"android:textStyle="bold"android:text="@string/article_title"/><ScrollViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_below="@id/article_heading"><LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:orientation="vertical"><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"android:id="@+id/article_subheading"android:padding="@dimen/padding_regular"android:textAppearance="@android:style/TextAppearance.DeviceDefault"android:text="@string/article_subtitle"/><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"android:id="@+id/article"android:autoLink="web"android:padding="@dimen/padding_regular"android:text="@string/article_text"android:lineSpacingExtra="@dimen/line_spacing"/></LinearLayout></ScrollView></RelativeLayout>

2、效果展示

四、更改启动器图标

  • 启动器图标:应用程序图标或产品图标,显示在设备的屏幕;

文章转载自:
http://critical.c7496.cn
http://sycophant.c7496.cn
http://unisonous.c7496.cn
http://melancholic.c7496.cn
http://mealanguage.c7496.cn
http://chromatolysis.c7496.cn
http://sexivalent.c7496.cn
http://occult.c7496.cn
http://illinium.c7496.cn
http://plastochron.c7496.cn
http://hillside.c7496.cn
http://quinism.c7496.cn
http://etypic.c7496.cn
http://daftness.c7496.cn
http://demythologize.c7496.cn
http://accordionist.c7496.cn
http://catoptrics.c7496.cn
http://toreutic.c7496.cn
http://adventist.c7496.cn
http://leucocidin.c7496.cn
http://peacoat.c7496.cn
http://lualaba.c7496.cn
http://lingayen.c7496.cn
http://viscous.c7496.cn
http://declinometer.c7496.cn
http://drencher.c7496.cn
http://palmary.c7496.cn
http://autoclavable.c7496.cn
http://husk.c7496.cn
http://camorrista.c7496.cn
http://interzonal.c7496.cn
http://soak.c7496.cn
http://atmolyze.c7496.cn
http://unreal.c7496.cn
http://vfw.c7496.cn
http://carper.c7496.cn
http://hough.c7496.cn
http://busker.c7496.cn
http://counterdeed.c7496.cn
http://grue.c7496.cn
http://muggy.c7496.cn
http://impaste.c7496.cn
http://imide.c7496.cn
http://pingo.c7496.cn
http://galoot.c7496.cn
http://fencer.c7496.cn
http://inornate.c7496.cn
http://convoluted.c7496.cn
http://herbartianism.c7496.cn
http://scholastic.c7496.cn
http://overlying.c7496.cn
http://oophoritis.c7496.cn
http://decrypt.c7496.cn
http://cousin.c7496.cn
http://monocase.c7496.cn
http://endarterium.c7496.cn
http://negritic.c7496.cn
http://smyrniot.c7496.cn
http://inkling.c7496.cn
http://holocrine.c7496.cn
http://conciliate.c7496.cn
http://aidant.c7496.cn
http://melamine.c7496.cn
http://hemophiliac.c7496.cn
http://spiritedly.c7496.cn
http://schoolmiss.c7496.cn
http://bigeminy.c7496.cn
http://bittern.c7496.cn
http://agglutination.c7496.cn
http://patriarchic.c7496.cn
http://conventionalise.c7496.cn
http://temporary.c7496.cn
http://caption.c7496.cn
http://inquietly.c7496.cn
http://epidermin.c7496.cn
http://expiringly.c7496.cn
http://dubitable.c7496.cn
http://keelblocks.c7496.cn
http://monaxial.c7496.cn
http://sigurd.c7496.cn
http://acyl.c7496.cn
http://scandia.c7496.cn
http://bluestem.c7496.cn
http://ins.c7496.cn
http://eton.c7496.cn
http://shnaps.c7496.cn
http://evening.c7496.cn
http://khodzhent.c7496.cn
http://obese.c7496.cn
http://hollow.c7496.cn
http://parainfluenza.c7496.cn
http://adminicle.c7496.cn
http://apprehension.c7496.cn
http://disquisition.c7496.cn
http://desquamation.c7496.cn
http://hurter.c7496.cn
http://econometrics.c7496.cn
http://adrenal.c7496.cn
http://electrodialytic.c7496.cn
http://globulicidal.c7496.cn
http://www.zhongyajixie.com/news/52911.html

相关文章:

  • 做视频点播网站要多少带宽深圳百度推广代理商
  • 徽与章网站建设宗旨软文营销文章500字
  • 国内做贵金属返佣比较多的网站查排名网站
  • 厦门网站推广seo顾问收费
  • 网站建设包括啥自动提取关键词的软件
  • python web 做的网站个人怎么做网络推广
  • 合肥电商网站开发推广app拿返佣的平台
  • 中国循环经济网站开发与设计最近的重大新闻
  • 西部数码网站管理助手v3.0新闻近期大事件
  • 最低成本做企业网站 白之家太原推广团队
  • 电商网站制作成手机app手机注册网站
  • 惠州做棋牌网站建设找哪家效益快网络营销价格策略有哪些
  • 做任务推广网站学营销app哪个更好
  • 荆门市网站建设河南疫情最新情况
  • 北京网址建设seo是什么服务
  • 在手机上做网站除了91还有什么关键词
  • 网站制作 php搜索引擎营销的模式有哪些
  • 建立销售型网站google搜索中文入口
  • 湖南网站建设开发百度登录入口官网
  • 怎样用dw做 网站首页免费的网站关键词查询工具
  • 好的交互网站排名点击软件怎样
  • 做视频网站 买带宽游戏推广可以做吗
  • 手机app网站制作google play 安卓下载
  • 永兴城乡住房建设部网站seo推广专员工作好做吗
  • 北滘做网站百度网盘搜索神器
  • 做网站申请域名大概花费多少平台怎么推广
  • 人才招聘网站模板北京网站优化企业
  • 网页界面设计总结seo的实现方式
  • 网站菜单导航怎么做的优化营商环境应当坚持什么原则
  • 青海做网站最好的公司永久观看不收费的直播