Android進階UI ImageView ImageButton RadioButton CheckBox ProgressBar屬性和用法總結

來源:互聯網
上載者:User

標籤:radiobutton   imageview   checkbox   android   繼承   

進階UI
ImageView  ImageButton  RadioButton  CheckBox  ProgressBar  
1.ImageView 圖片組件
src 指定要載入的圖片
縮放問題
1.按著圖片原始比例(不失真)
2.不按著比例(失真)
ScaleType
1.fitXY   強制讓圖片縮放以填充整個imageview
2.fitCenter  按著比例縮放以置中顯示圖片
3.fitEnd     按著比例縮放以局下部顯示圖片
4.fitStart   按著比例縮放以居上部顯示圖片
adjustViewBounds  圖片邊界和imageview邊界契合


23code


2.ImageButton(沒人用)
繼承ImageView 屬性都可以用


3.ProgressBar 進度條
樣式:旋轉進度條(不顯示進度)  水平進度條(顯示)


style  控制樣式
[email protected]:style/Widget.ProgressBar.Inverse  旋轉
[email protected]:style/Widget.ProgressBar.Horizontal 水平

3.max   水平進度條  總的進度值
4.progress 水平進度條 當前進度值
5.secondaryProgress 水平進度條 當前二級進度值

4.RadioButton(選項)
RadioGroup(單選框)
<RadioGroup >
<RadiButton />
<RadiButton />
<RadiButton />
</RadioGroup>

1.radiobutton
1.text   選項按鈕旁邊的提示文字
2.checked  預設情況是否選中
3.style   轉場樣式
@android:style/Widget.Holo.CompoundButton.CheckBox 方框選擇
@android:style/Widget.Holo.CompoundButton.RadioButton圓圈(預設)

@android:style/Widget.Holo.CompoundButton.Star 五角星


Android進階UI ImageView ImageButton RadioButton CheckBox ProgressBar屬性和用法總結

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.