美文网首页
常用控件

常用控件

作者: 熊大哥87 | 来源:发表于2017-07-12 16:47 被阅读0次
简单的
<TextView 
        android:id="@+id/tv_tv"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:text="Hello World!"
        android:textColor="#00ff00"
        android:textSize="24sp" />
<Button
        android:id="@+id/bt_bt"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Button" />
<EditText
        android:id="@+id/et_et"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="asdfg"
        android:maxLines="2" />
<ImageView
        android:id="@+id/iv_iv"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@mipmap/ic_launcher" />
  <ProgressBar
        android:id="@+id/pb_pb"
        style="?android:attr/progressBarStyleHorizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:max="100" />
难点的
AlertDialog.Builder dialog=new AlertDialog.Builder(TestActivity.this);
                dialog.setTitle("This is Dialog");
                dialog.setMessage("Somnus");
                dialog.setCancelable(false);//可否取消
                dialog.setPositiveButton("OK", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {

                    }
                });
                dialog.setNegativeButton("cancel", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {

                    }
                });
                dialog.show();
 
ProgressDialog progresDialog=new ProgressDialog(TestActivity.this);
                progresDialog.setTitle("sdf");
                progresDialog.setMessage("Lading.....");
                progresDialog.setCancelable(true);
                progresDialog.show();

相关文章

  • UI常用控件

    UI常用控件 // // ViewController.m // UI常用控件 // // Created by ...

  • 小工具开发---万能模板

    实现:1)汇总所有控件的常用属性2)汇总每类控件的常用设计3)开发小工具时,复用对应控件 一、所有控件的常用属性 ...

  • Android - Navigation

    Android 基础知识 1. Android 常用控件 2. 控件常用属性 Android 常用知识点 动态权限...

  • IOS开发(三)高级控件

    IOS基础控件思维导图 三、高级控件 1、UITabBarController (1)常用属性 (2)常用方法 (...

  • Flutter常用布局Basic widgets

    Flutter提供了强大的基本控件,我们现在学习最常用的空间。 常用控件一: Text 我们看到这个控件的名字就知...

  • UIDatePicker简述

    // UIDatePicker控件的常用方法 时间选择控件 UIDatePicker *oneDatePicker...

  • IOS开发(二)中级控件

    IOS基础控件思维导图 二、中级控件 1、UIStepper (1)常用属性 (2)常用方法 2、UISlider...

  • Flutter 常用控件及使用技巧

    常用控件 SizeBox:调节 Flutter控件之间的间距控件如: SizeBox(height:8)、Size...

  • 我写了一篇文章《ISO入门之UIView(二)》

    *按钮控件(Button) 按钮控件是最常用的控件之一。iOS中按钮控件Button直接继承于UIControl:...

  • iOS UITextView

    本专题整理了 UIkit 中基本的控件,及控件的一些常用属性。方便大家研究。 常用属性

网友评论

      本文标题:常用控件

      本文链接:https://www.haomeiwen.com/subject/apbbhxtx.html