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();
 

 









转载于:https://www.cnblogs.com/feizianquan/p/10210495.html

更多相关文章

  1. Android布局优化(四)X2C — 提升布局加载速度200%
  2. android仿今日头条App、多种漂亮加载效果、选择器汇总、记事本Ap
  3. android仿今日头条App、多种漂亮加载效果、选择器汇总、记事本Ap
  4. Android 多线程之synchronized锁住的是代码还是对象(二)
  5. Android Handler机制5之Message简介与消息对象对象池
  6. Android P窗口机制之Window加载流程
  7. Android输入框自动提示
  8. 2.6.1 使用toast显示提示信息框
  9. android gradle编译 多个flavor中加载不同的android library的fl

随机推荐

  1. ios及android两个平台下x264编译脚本
  2. Android异步操作 AsyncTask
  3. 【Android】获取本机电话号码
  4. android 数据库创建在SD(TF)卡中
  5. 荐 android 如何打包自定义控件(转)
  6. Android常用加密手段之MD5加密(字符串加密
  7. Litepal初始化数据库问题研究
  8. android 拍照的照片方向问题,读取图片EXIF
  9. android双屏显示的一些修改与尝试
  10. Android(安卓)自定义 View 基础之系统坐