zoukankan      html  css  js  c++  java
  • Android作业--------必会内容Alertdialong(对话框)

    Java代码

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal"
        android:padding="15dp">
         
        <ImageView
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:scaleType="fitXY"
            android:background="@drawable/xiaohuli"/>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">
            <TextView
                android:id="@+id/tv_title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="用户你好"
                android:gravity="center"
                android:textSize="30dp"
                android:textColor="#000000"
                android:layout_marginLeft="15dp"/>
            <TextView
                android:id="@+id/tv_time"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="15dp"
                android:text="现在时间为:2000-11-5"
                android:textSize="26dp"
                />
            <TextView
                android:id="@+id/tv_wupin"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="15dp"
                android:gravity="center"
                android:text="请选择你喜爱的物品"
                android:textSize="26dp"
                />
             
        </LinearLayout>
     
    </LinearLayout>
    

      XML代码

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:padding="10dp"
       >
        <Button
            android:id="@+id/dialog1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="对话框常用标准"
            android:textAllCaps="false"/>
        <Button
            android:id="@+id/dialog2"
            android:layout_marginTop="20dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="列表对话框"
            android:textAllCaps="false"/>
        <Button
            android:id="@+id/dialog3"
            android:layout_marginTop="20dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="列表对话框带按钮方式"
            android:textAllCaps="false"/>
        <Button
            android:id="@+id/dialog4"
            android:layout_marginTop="20dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="多选对话框(最常用)"
            android:textAllCaps="false"/>
    </LinearLayout>
    

      

     

  • 相关阅读:
    性能测试的bug【杭州多测师】【杭州多测师_王sir】
    Typescript: 当出现错误时,不编译文件成js文件
    git基础命令
    获取页面宽度
    详解linux下的串口通讯开发
    货源清单的配置
    物料在工厂中未被维护
    quota配额配置
    采购组织不对工厂负责
    拓端tecdat:Python金融时间序列模型ARIMA 和GARCH 在股票市场预测应用
  • 原文地址:https://www.cnblogs.com/xuwei123456/p/13972556.html
Copyright © 2011-2022 走看看