欧美大屁股bbbbxxxx,狼人大香伊蕉国产www亚洲,男ji大巴进入女人的视频小说,男人把ji大巴放进女人免费视频,免费情侣作爱视频

歡迎來(lái)到入門(mén)教程網(wǎng)!

Android

當(dāng)前位置:主頁(yè) > 軟件編程 > Android >

Android自定義View實(shí)現(xiàn)投票進(jìn)度條

來(lái)源:本站原創(chuàng)|時(shí)間:2020-01-10|欄目:Android|點(diǎn)擊: 次

本文實(shí)例為大家分享了Android投票進(jìn)度條的具體代碼,供大家參考,具體內(nèi)容如下

效果展示

功能屬性介紹

<!-- MatchSupportProgressBar -->
  <declare-styleable name="MatchSupportProgressBar">
  <!-- 進(jìn)度條圓角角度 -->
  <attr name="progress_radio" format="string"></attr>
  <!-- 進(jìn)度條左側(cè)Tag文本 -->
  <attr name="progress_tag_text" format="string"></attr>
  <!-- 進(jìn)度條已填充部分顏色 -->
  <attr name="progress_reach_color" format="color"></attr>
  <!-- 進(jìn)度條已填充部分高度 -->
  <attr name="progress_reach_height" format="dimension"></attr>
  <!-- 進(jìn)度條背景顏色 -->
  <attr name="progress_background_color" format="color"></attr>
  <!-- 進(jìn)度條背景高度 -->
  <attr name="progress_background_height" format="dimension"></attr>
  <!-- 進(jìn)度條左側(cè)Tag文本顏色 -->
  <attr name="progress_tag_text_color" format="color"></attr>
  <!-- 進(jìn)度條左側(cè)Tag文本尺寸 -->
  <attr name="progress_tag_text_size" format="dimension"></attr>
  <!-- 進(jìn)度條右側(cè)百分比文本顏色 -->
  <attr name="progress_percent_text_color" format="color"></attr>
  <!-- 進(jìn)度條右側(cè)百分比文本尺寸 -->
  <attr name="progress_percent_text_size" format="dimension"></attr>
  <!-- 進(jìn)度條右側(cè)百分比文本 -->
  <attr name="progress_percent_text" format="string"></attr>
  <!-- 進(jìn)度條選中的圖標(biāo)與進(jìn)度條、文字的間距 -->
  <attr name="progress_offsetX" format="dimension"></attr>
  <!-- 進(jìn)度條右側(cè)文字的水平偏移量 -->
  <attr name="progress_offsetR" format="dimension"></attr>
  <!-- 進(jìn)度條之間的偏移量 -->
  <attr name="progress_LineSpacing" format="dimension"></attr>
</declare-styleable>

xml使用示例

<com.yjyc.supportprogress.view.MatchSupportProgressBar
  android:id="@+id/progressbar_match_support"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:layout_marginTop="10dp"
  android:paddingLeft="3dp"
  android:paddingRight="3dp"
  android:progress="30"
  yjcp:progress_background_color="#333"
  yjcp:progress_background_height="30dp"
  yjcp:progress_offsetR="20dp"
  yjcp:progress_percent_text_color="#345698"
  yjcp:progress_percent_text_size="13sp"
  yjcp:progress_reach_color="#999"
  yjcp:progress_tag_text_color="#ffffff"
  yjcp:progress_tag_text="杰倫;那英;汪峰"
  yjcp:progress_tag_text_size="13sp" />

java使用示例

//進(jìn)度條的點(diǎn)擊事件監(jiān)聽(tīng)
mspb.setOnRightTextClickListener(new OnRightTextClickListener() {

 @Override
 public void onClick(int position) {
 //position是點(diǎn)擊的位置
 }
});
/*
為進(jìn)度條賦值:
參數(shù)1:是我們算好的進(jìn)度值,一般由服務(wù)器返回。(注: yjcp:progress_tag_text="杰倫;那英;汪峰"設(shè)置 了幾個(gè)字符串,getPercentList就要傳幾個(gè)字符串)
參數(shù)2:得到一個(gè)boolean類型的集合,用于設(shè)置進(jìn)度條√顯示的位置
參數(shù)3:true表示已投票,false表示未投票
參數(shù)4:是否開(kāi)啟動(dòng)畫(huà)特效 
*/
mspb.setPercentState(getPercentList("10","90","100"), getCheckList(position), true, true);
//重置進(jìn)度條狀態(tài),如果在listview中涉及到復(fù)用問(wèn)題條用它即可。
//參數(shù):true投過(guò)票,false未投過(guò)
mspb.setState(false);

源碼下載:Android投票進(jìn)度條

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持我們。

上一篇:Android Q適配之IMEI替換為Android

欄    目:Android

下一篇:Kotlin中的對(duì)象表達(dá)式和對(duì)象聲明的具體使用

本文標(biāo)題:Android自定義View實(shí)現(xiàn)投票進(jìn)度條

本文地址:http://mengdiqiu.com.cn/a1/Android/9070.html

網(wǎng)頁(yè)制作CMS教程網(wǎng)絡(luò)編程軟件編程腳本語(yǔ)言數(shù)據(jù)庫(kù)服務(wù)器

如果侵犯了您的權(quán)利,請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)進(jìn)行處理、任何非本站因素導(dǎo)致的法律后果,本站均不負(fù)任何責(zé)任。

聯(lián)系QQ:835971066 | 郵箱:835971066#qq.com(#換成@)

Copyright © 2002-2020 腳本教程網(wǎng) 版權(quán)所有