zoukankan      html  css  js  c++  java
  • Android Studio学习路程(5)

    1,orientation的用法:

    android:orientation=”vertical”(垂直) 时,只管水平方向的对齐。

    android:orientation=”horizontal” (水平)时,只管垂直方向的对齐。

    2,Button:一个按钮的控件,这个也是需要给他一个id,方便找到它并进行操作,并且不同的按钮需要配不同的id。

    <Button
    android:id="@+id/btn_previous"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="上一张"/>

    3,TextView:文本框的一个控件,主要用于在文本框里添加文字说明。

    <TextView
    android:id="@+id/tv_show"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:padding="10dp"
    android:text="图片信息"/>


    4,ImageView:是图像视图的一个控件,它里面可以放任何drawable里面的图片,并有缩放功能和着色功能。直接继承View类,适用于任何布局。

    <ImageView
    android:id="@+id/iv_show" (设置id,方便找到它,并对它进行一些基础的操作)
    android:layout_width="match_parent"
    android:layout_height="50dp"
    android:layout_weight="1"
    android:background="@android:color/background_dark"/> (设置背景颜色)



  • 相关阅读:
    史上最刁钻的十道英语面试题
    99%的人连Where are you from都不会回答?
    库存管理与订单的控制
    订单处理逻辑
    配送规划
    多商家电子商务解决方案
    电商库存规划
    库存管理从入门到精通
    商家报名系统
    经销商管理
  • 原文地址:https://www.cnblogs.com/mxk123456/p/12289309.html
Copyright © 2011-2022 走看看