第三章UI
常用控件 textview match_parent:和父局大小一样 wrap_content:由内容决定大小 文字对齐方式: android : gravity = "center" button 默认字母全部大写 禁用大写: android : textAllCaps = "false" edittext 提示性文本: android : hint = "请输入" 解决内容过大问题: android : maxLines = "2" imageview progressbar 圆形进度条 public void onClick ( View view ) { if ( progressBar . getVisibility ( ) == View . GONE ) { progressBar . setVisibility ( View . VISIBLE ) ; } else { progressBar . setVisibility ( View . GONE ) ; } } 长形进度条 style = "?android:attr/progressBarStyleHorizontal" android : max = "100" AlertDialog 弹出对话框 public void onClick ( View view ) { AlertDialog .