應用更新之_update_activity.xml

下載觸發(fā)界面

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@color/bg_color"
     >

    <TextView
        android:id="@+id/currentPro"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_alignParentRight="true"
        android:textColor="@color/font_title"
        android:visibility="invisible"
         />
    
    <ProgressBar
        android:id="@+id/progressbar"
        style="@style/downloadProgressBar"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/currentPro"
        android:layout_margin="5dp"
        android:max="100"
        android:progress="0"
        android:thumb="@null"
         />

    <Button
        android:id="@+id/cancel"
        android:layout_width="200dp"
        android:layout_height="35dp"
        android:layout_below="@+id/progressbar"
        android:layout_marginTop="10dp"
        android:layout_centerHorizontal="true"
        android:text="取消" 
        android:textColor="@drawable/gray2white_txt_selector"
        android:background="@drawable/download_btn_selector"
        android:visibility="invisible"
        />

</RelativeLayout>

style(downloadProgressBar)

<!-- 水平下載進度條 -->
    <style name="downloadProgressBar" parent="@android:style/Widget.ProgressBar.Horizontal">
        <item name="android:maxHeight">10dp</item>
        <item name="android:minHeight">8dp</item>
        <item name="android:indeterminateOnly">false</item>
        <item name="android:indeterminateDrawable">@android:drawable/progress_indeterminate_horizontal</item>
        <item name="android:progressDrawable">@drawable/progress_bar_gradient</item>
    </style>

應用更新相關文章:
應用更新之_DownloadService
應用更新之_UpdateNotifiActivity
應用更新之_update_notif_ly.xml
應用更新之_permission

最后編輯于
?著作權歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內(nèi)容

  • Android 自定義View的各種姿勢1 Activity的顯示之ViewRootImpl詳解 Activity...
    passiontim閱讀 178,872評論 25 709
  • Spring Cloud為開發(fā)人員提供了快速構建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務發(fā)現(xiàn),斷路器,智...
    卡卡羅2017閱讀 136,533評論 19 139
  • 發(fā)現(xiàn) 關注 消息 iOS 第三方庫、插件、知名博客總結 作者大灰狼的小綿羊哥哥關注 2017.06.26 09:4...
    肇東周閱讀 15,143評論 4 61
  • 前世你 綠羅衫下素手芊, 紅豆樹前舞翩遷。 日日青燈古佛念, 夜夜思君難入眠。 前世我 挑燈拭劍迷淚眼, 三軍縱馬...
    君惜竹閱讀 496評論 4 6
  • 秋山學校《匠人須知30條》 00.一流的匠人,人品比技術更重要。即,對一個人品格的重視,遠高于對其的技術要求。 0...
    凈德閱讀 801評論 0 0

友情鏈接更多精彩內(nèi)容