zoukankan      html  css  js  c++  java
  • Android Studio 基础控件使用

    TextView
    android:gravity="center" //文字对其方式 top bottom left right center
    android:textColor="#ffffff"//颜色
    android:textSize="24sp" //字体
    android:layout_width="wrap_content"//布局文字宽填充
    android:layout_height="wrap_content" //高填充


    Button
    android:textAllCaps="false"//否 不对按钮英文默认转化

    EditText
    android:hint="go"//输入框提示语
    android:maxLines="12"//最大行数 
     private EditText editext;//申明对象
    
        editext=(EditText) findViewById(R.id.editText);//获取页面对象
    
     String text= editext.getText().toString();//获取输入值
    ImageView
       private ImageView imageView;
     imageView.setImageResource(R.drawable.ic_audiotrack_dark);//指定显示图片
    ProgressBar
    android:visibility="invisible"//加载。。 可见  in透明 gone 消失 get set 获取设置显示状态
    style="?android:attr/progressBarStyle" 加载样式  
    
    
    AlertDialog 提示
      AlertDialog.Builder dialog=new  AlertDialog.Builder(yzj.this);
                    dialog.setTitle("this");//标题
                    dialog.setMessage("thing");//信息
                    dialog.setCancelable(false);//不能back返回
                    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();
     








  • 相关阅读:
    php数据库操作命令精华大全
    使用phpnow本地搭建Discuz!如何实现伪静态
    最基础的PHP分类查询程序
    p​h​p​面​试​题​笔​试​题​ ​比较有用
    kolla单节点部署openstack
    Qt 编译方式之 qbs
    Qt画图
    Qt拖拽事件
    POSTMAN学习和使用体会
    HandlerExceptionResolver的使用,返回前端相对友好的异常信息
  • 原文地址:https://www.cnblogs.com/feizianquan/p/10210495.html
Copyright © 2011-2022 走看看