久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

使用“動畫圈"在加載內容時在 ImageView 中

Using the quot;animated circlequot; in an ImageView while loading stuff(使用“動畫圈在加載內容時在 ImageView 中)
本文介紹了使用“動畫圈"在加載內容時在 ImageView 中的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我目前在我的應用程序中使用可能需要一秒鐘才能顯示的列表視圖.

I am currently using in my application a listview that need maybe one second to be displayed.

我目前所做的是使用列表視圖的@id/android:empty 屬性來創建加載"文本.

What I currently do is using the @id/android:empty property of the listview to create a "loading" text.

 <TextView android:id="@id/android:empty"
           android:layout_width="match_parent"
           android:layout_height="match_parent"
           android:background="#FF0000"
           android:text="Loading..."/>

現在,我想用加載對話框中使用的動畫圓圈代替這段文字,我想你們都知道我的意思:

Now, I would like to replace that with the animated circle that is used in a loading dialog instead of this text, i guess you all know what I mean:

我不想要對話.我想在我的布局中展示它.

I do not want a dialog. I want to show that inside my layout.

非常感謝您的幫助!

推薦答案

只需將此塊 xml 放入您的活動布局文件中即可:

Simply put this block of xml in your activity layout file:

<RelativeLayout
    android:id="@+id/loadingPanel"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center" >

    <ProgressBar
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:indeterminate="true" />
</RelativeLayout>

當你完成加載時,調用這一行:

And when you finish loading, call this one line:

findViewById(R.id.loadingPanel).setVisibility(View.GONE);

結果(它也會旋轉):

這篇關于使用“動畫圈"在加載內容時在 ImageView 中的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

EditText: Disable Paste/Replace menu pop-up on Text Selection Handler click event(EditText:禁用文本選擇處理程序單擊事件上的粘貼/替換菜單彈出)
Multiline EditText with Done SoftInput Action Label on 2.3(2.3 上帶有完成 SoftInput 操作標簽的多行 EditText)
How to detect the swipe left or Right in Android?(如何在 Android 中檢測向左或向右滑動?)
Prevent dialog dismissal on screen rotation in Android(防止在Android中的屏幕旋轉對話框解除)
How do I handle ImeOptions#39; done button click?(如何處理 ImeOptions 的完成按鈕點擊?)
How do you set EditText to only accept numeric values in Android?(您如何將 EditText 設置為僅接受 Android 中的數值?)
主站蜘蛛池模板: 久久天天躁狠狠躁夜夜躁2014 | 午夜精品一区二区三区在线视频 | 国产精品亚洲一区 | 欧美日韩一区在线 | 日韩三级免费网站 | 久久一区二区三区电影 | 9porny九色视频自拍 | 天天色综 | 免费a网| 午夜视频在线 | 欧美精品在欧美一区二区 | 成人性生交大片免费看r链接 | 亚洲人成人一区二区在线观看 | 一级毛片免费视频观看 | 一区二视频 | 日韩三级电影在线看 | 国产伦精品一区二区三区视频金莲 | 色视频免费 | 亚洲av毛片 | 精品日韩一区二区三区av动图 | 国产乱码精品1区2区3区 | 亚洲视频免费在线播放 | 香蕉久久久| 亚洲精品中文字幕在线观看 | 看片91 | 中文字幕久久精品 | 91福利电影在线观看 | 青青久草 | 香蕉视频一区二区 | www.久久久.com | 日韩精品一区在线 | 在线免费观看毛片 | 亚洲精品成人网 | 一级大片| 成年人免费在线视频 | 黄免费观看视频 | 91中文字幕在线 | 日产久久 | 久久综合一区 | 日韩一级黄色毛片 | 中文字幕一区二区三区四区五区 |