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>
    

      

     

  • 相关阅读:
    团队项目-Beta冲刺(第一周)
    个人第4次作业—Alpha项目测试
    团队项目——Alpha发布2
    优课堂考勤系统——Alpha发布1
    优课堂—系统设计
    优课堂—需求分析
    thrift学习笔记
    APP分享
    ActionBar
    ListView添加headview
  • 原文地址:https://www.cnblogs.com/xuwei123456/p/13972556.html
Copyright © 2011-2022 走看看