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>
    

      

     

  • 相关阅读:
    zookeeper安装教程
    CentOS7服务管理(重启,停止,自动启动命令)
    redis配置文件详解
    阿里云 CentOS7安装redis4.0.9并开启远程访问
    rpm命令
    wget命令
    yum命令
    maven项目debug调试不能够进入源码问题解决
    8-字符串
    7-数组
  • 原文地址:https://www.cnblogs.com/xuwei123456/p/13972556.html
Copyright © 2011-2022 走看看